Belle II Software development
SegmentTrackTruthVarSet.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/varsets/VarSet.h>
11#include <tracking/trackFindingCDC/varsets/VarNames.h>
12
13#include <tracking/trackFindingCDC/mclookup/CDCMCManager.h>
14
15#include <tracking/trackFindingCDC/filters/segmentTrack/BaseSegmentTrackFilter.h>
16
17namespace Belle2 {
22 namespace TrackFindingCDC {
23
25 constexpr
26 static char const* const segmentTrackTruthVarNames[] = {
27 "belongs_to_same_track_truth",
28 "segment_is_fake_truth",
29 "segment_purity_truth",
30 "track_purity_truth",
31 "truth",
32 };
33
35 struct SegmentTrackTruthVarNames : public VarNames<BaseSegmentTrackFilter::Object> {
36
38 static const size_t nVars = size(segmentTrackTruthVarNames);
39
41 static constexpr char const* getName(int iName)
42 {
43 return segmentTrackTruthVarNames[iName];
44 }
45 };
46
51 class SegmentTrackTruthVarSet : public VarSet<SegmentTrackTruthVarNames> {
52
53 public:
55 bool extract(const BaseSegmentTrackFilter::Object* testPair) final;
56
57
58 void initialize() override
59 {
62 }
63
64 void beginEvent() override
65 {
68 }
69 };
70 }
72}
void requireTruthInformation()
Require the MC information store arrays.
void fill()
Fill Monte Carlo look up maps from the DataStore.
static CDCMCManager & getInstance()
Getter for the singleton instance.
Definition: CDCMCManager.cc:74
void initialize() override
Receive and dispatch signal before the start of the event processing.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
AObject Object
Type of the object to be analysed.
Definition: Filter.dcl.h:35
Class to compute floating point variables from a segment to track match which can be recorded as a fl...
bool extract(const BaseSegmentTrackFilter::Object *testPair) final
Generate and assign the contained variables.
void initialize() override
Receive signal before the start of the event processing.
void beginEvent() override
Receive signal for the start of a new event.
Class that specifies the names of the variables.
Definition: VarNames.h:21
Generic class that generates some named float values from a given object.
Definition: VarSet.h:36
Abstract base class for different kinds of events.
Vehicle class to transport the variable names.
static const size_t nVars
Number of variables to be generated.
static constexpr char const * getName(int iName)
Getter for the name at the given index.