Belle II Software development
BasicTrackVarSet Class Reference

Class to compute floating point variables from a track which can be recorded as a flat TNtuple or serve as input to a MVA method. More...

#include <BasicTrackVarSet.h>

Inheritance diagram for BasicTrackVarSet:
VarSet< BasicTrackVarSetNames > BaseVarSet< AVarNames::Object > CompositeProcessingSignalListener ProcessingSignalListener

Public Types

using statistics_set = bacc::features< bacc::tag::count, bacc::tag::sum, bacc::tag::min, bacc::tag::max, bacc::tag::mean, bacc::tag::lazy_variance >
 Set of statistics/features to accumulate for each variable category (e.g.
 
using statistics_accumulator = bacc::accumulator_set< double, statistics_set >
 A boost accumulators set that aggregates statistics for the values it is called with.
 
using Object = typename Super::Object
 Type from which variables should be extracted.
 

Public Member Functions

bool extract (const CDCTrack *track) override
 Generate and assign the contained variables.
 
std::vector< Named< Float_t * > > getNamedVariables (const std::string &prefix) override
 Getter for the named references to the individual variables Base implementation returns empty vector.
 
std::vector< Named< Float_t * > > getNamedVariables ()
 Getter for the named references to the individual variables.
 
MayBePtr< Float_t > find (const std::string &varName) override
 Pointer to the variable with the given name.
 
virtual bool extract (const Object *obj)
 Main method that extracts the variable values from the complex object.
 
bool extract (const Object &obj)
 Method for extraction from an object instead of a pointer.
 
std::map< std::string, Float_t > getNamedValues (const std::string &prefix) const
 Getter for a map of names to float values.
 
std::map< std::string, Float_t > getNamedValues () const
 Getter for a map of names to float values.
 
void initialize () override
 Receive and dispatch signal before the start of the event processing.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Member Functions

Float_t get () const
 Getter for the value of the ith variable. Static version.
 
Float_t & var ()
 Reference getter for the value of the ith variable. Static version.
 
AssignFinite< Float_t > finitevar ()
 Reference getter for the value of the ith variable. Transforms non-finite values to finite value.
 
void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Static Protected Member Functions

static constexpr int named (const char *name)
 Getter for the index from the name.
 

Private Types

using Super = BaseVarSet< typename AVarNames::Object >
 Type of the super class.
 

Private Attributes

FixedSizeNamedFloatTuple< BasicTrackVarSetNamesm_variables
 Memory for nVars floating point values.
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happened before.
 
bool m_terminated = false
 Flag to keep track whether termination happened before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Static Private Attributes

static const size_t nVars
 Number of floating point values represented by this class.
 

Detailed Description

Class to compute floating point variables from a track which can be recorded as a flat TNtuple or serve as input to a MVA method.

Definition at line 112 of file BasicTrackVarSet.h.

Member Typedef Documentation

◆ Object

using Object = typename Super::Object
inherited

Type from which variables should be extracted.

Definition at line 44 of file VarSet.h.

◆ statistics_accumulator

using statistics_accumulator = bacc::accumulator_set<double, statistics_set>

A boost accumulators set that aggregates statistics for the values it is called with.

It is used to calculate the variables in the extract method. An accumulator set should be created for each category of variables, such as drift length, ADC count, etc. Calling it can be thought of as "filling" it with new values. It then calculates all statistics (corresponding to the final variables) while handling interdependencies in a smart way.

Definition at line 136 of file BasicTrackVarSet.h.

◆ statistics_set

using statistics_set = bacc::features<bacc::tag::count, bacc::tag::sum, bacc::tag::min, bacc::tag::max, bacc::tag::mean, bacc::tag::lazy_variance>

Set of statistics/features to accumulate for each variable category (e.g.

drift length). The statistics set is defined with the boost::accumulator framework, which handles the interdependencies in a smart way. E.g. the calculation of the mean reuses the previously calculated sum. New statistics can be easily added if necessary.

Definition at line 123 of file BasicTrackVarSet.h.

◆ Super

using Super = BaseVarSet<typename AVarNames::Object>
privateinherited

Type of the super class.

Definition at line 40 of file VarSet.h.

Member Function Documentation

◆ addProcessingSignalListener()

void addProcessingSignalListener ( ProcessingSignalListener psl)
protectedinherited

Register a processing signal listener to be notified.

Definition at line 55 of file CompositeProcessingSignalListener.cc.

56{
58}
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
References to subordinary signal processing listener contained in this findlet.

◆ beginEvent()

void beginEvent ( )
overridevirtualinherited

Receive and dispatch signal for the start of a new event.

Reimplemented from ProcessingSignalListener.

Reimplemented in SpacePointTagger< Belle2::CKFToPXDResult, Belle2::PXDCluster >, SpacePointTagger< Belle2::CKFToSVDResult, Belle2::SVDCluster >, BaseEventTimeExtractor< RecoTrack * >, BaseEventTimeExtractor< TrackFindingCDC::CDCWireHit & >, SharingHitsMatcher< Belle2::TrackFindingCDC::CDCTrack, Belle2::TrackFindingCDC::CDCSegment2D >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCFacet >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCWireHit, true >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCTrack >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentTriple >, RecoTrackStorer, ROIFinder, and SVDHoughTracking.

Definition at line 31 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
Interface for an algorithm part that needs to receive the module processing signals.
virtual void beginEvent()
Receive signal for the start of a new event.

◆ beginRun()

void beginRun ( )
overridevirtualinherited

Receive and dispatch signal for the beginning of a new run.

Reimplemented from ProcessingSignalListener.

Reimplemented in LayerRelationFilter< AFilter >, FourHitFilter, QualityIndicatorFilter, ThreeHitFilter, TwoHitVirtualIPFilter, TwoHitVirtualIPQIFilter, RecoTrackStorer, ROIFinder, SpacePointLoaderAndPreparer, and TrackCandidateResultRefiner.

Definition at line 23 of file CompositeProcessingSignalListener.cc.

24{
27 psl->beginRun();
28 }
29}
virtual void beginRun()
Receive signal for the beginning of a new run.

◆ endRun()

void endRun ( )
overridevirtualinherited

Receive and dispatch signal for the end of the run.

Reimplemented from ProcessingSignalListener.

Definition at line 39 of file CompositeProcessingSignalListener.cc.

40{
42 psl->endRun();
43 }
45}
virtual void endRun()
Receive signal for the end of the run.

◆ extract() [1/3]

bool extract ( const CDCTrack track)
override

Generate and assign the contained variables.

Definition at line 29 of file BasicTrackVarSet.cc.

30{
31 if (not track) return false;
32
33 if (track->empty()) {
34 return false;
35 }
36
37 // use boost accumulators, which lazily provide different statistics (mean, variance, ...) for the
38 // data that they accumulate (i.e. are "filled" with).
39 statistics_accumulator drift_length_acc; /* correlated to actual distance from hit to wire*/
40 statistics_accumulator adc_acc; /* integrated charge over the cell*/
41 statistics_accumulator empty_s_acc; /* gap within the track?!*/
42 statistics_accumulator tot_acc; /* time over threshold */
43 /* continuous layer number [from 0 to 55] (not to be distinguished from SuperLayer [from 0 to 8] or Layer (within SuperLayer, so from [0 to 7]) */
44 statistics_accumulator cont_layer_acc;
45 statistics_accumulator super_layer_acc;
46
47 unsigned int size = track->size();
48
49 std::vector<unsigned int> cont_layer;
50 std::vector<unsigned int> super_layer;
51 // Fill accumulators with ADC and drift circle information
52 for (const CDCRecoHit3D& recoHit : *track) {
53 drift_length_acc(recoHit.getWireHit().getRefDriftLength());
54 adc_acc(static_cast<unsigned int>(recoHit.getWireHit().getHit()->getADCCount()));
55 tot_acc(static_cast<unsigned int>(recoHit.getWireHit().getHit()->getTOT()));
56 cont_layer_acc(static_cast<unsigned int>(recoHit.getWireHit().getHit()->getICLayer()));
57 super_layer_acc(static_cast<unsigned int>(recoHit.getWireHit().getISuperLayer()));
58 cont_layer.push_back(static_cast<unsigned int>(recoHit.getWireHit().getHit()->getICLayer()));
59 super_layer.push_back(static_cast<unsigned int>(recoHit.getWireHit().getISuperLayer()));
60 }
61
62 // extract wanted quantities from layers
63 unsigned int cont_layer_first = cont_layer.front();
64 unsigned int cont_layer_last = cont_layer.back();
65 unsigned int cont_layer_min = *std::min_element(cont_layer.begin(), cont_layer.end());
66 unsigned int cont_layer_max = *std::max_element(cont_layer.begin(), cont_layer.end());
67 unsigned int cont_layer_count = std::set<unsigned int>(cont_layer.begin(), cont_layer.end()).size();
68 double cont_layer_occupancy = (double)cont_layer_count / (double)(cont_layer_max - cont_layer_min +
69 1); // +1 b/c the first layer should also be counted
70 unsigned int super_layer_first = super_layer.front();
71 unsigned int super_layer_last = super_layer.back();
72 unsigned int super_layer_min = *std::min_element(super_layer.begin(), super_layer.end());
73 unsigned int super_layer_max = *std::max_element(super_layer.begin(), super_layer.end());
74 unsigned int super_layer_count = std::set<unsigned int>(super_layer.begin(), super_layer.end()).size();
75 double super_layer_occupancy = (double)super_layer_count / (double)(super_layer_max - super_layer_min + 1);
76
77 double hits_per_layer = (double)size / (double)cont_layer_count;
78
79 // Extract empty_s (ArcLength2D gap) information
80 double s_range = track->back().getArcLength2D() - track->front().getArcLength2D();
81 double avg_hit_dist = s_range / (double)cont_layer_count;
82
83 // fill a vector with all 2D arc lengths in track
84 std::vector<double> arc_lengths;
85 auto get_arc_length = [](const CDCRecoHit3D & recoHit) { return recoHit.getArcLength2D(); };
86 std::transform(begin(*track), end(*track), back_inserter(arc_lengths), get_arc_length);
87 // Remove all NAN elements. For some reason, last hit in track is sometimes NAN
88 erase_remove_if(arc_lengths, IsNaN());
89
90 // calculate gaps in arc length s between adjacent hits
91 // beware: first element not a difference but mapped onto itself, empty_s_gaps[0] = arc_lengths[0]
92 if (arc_lengths.size() > 1) {
93 std::vector<double> empty_s_gaps;
94 std::adjacent_difference(begin(arc_lengths), end(arc_lengths), back_inserter(empty_s_gaps));
95
96 // Wrap a reference to empty_s_acc in a lambda, b/c it is passed by value to the following
97 // for_each. If used directly, only a copy would filled in the for_each.
98 auto empty_s_acc_ref = [&empty_s_acc](double s) { empty_s_acc(s); };
99 // start filling accumulator with hit gaps, but skip first which is not a difference
100 std::for_each(next(begin(empty_s_gaps)), end(empty_s_gaps), empty_s_acc_ref);
101 }
102
103 unsigned int empty_s_size = bacc::count(empty_s_acc);
104
105 // Overwrite boost-accumulator behavior for containers with 0 or 1 elements
106 // Set variances containers with for 0/1 elements to -1 (boost default: nan/0 respectively)
107 double drift_length_variance = -1;
108 double adc_variance = -1;
109 double tot_variance = -1;
110 double cont_layer_variance = -1;
111 double super_layer_variance = -1;
112 if (size > 1) {
113 // for more than two elements, calculate variance with bessel correction
114 double bessel_corr = (double)size / (size - 1.0);
115 drift_length_variance = std::sqrt(bacc::variance(drift_length_acc) * bessel_corr);
116 adc_variance = std::sqrt(bacc::variance(adc_acc) * bessel_corr);
117 tot_variance = std::sqrt(bacc::variance(tot_acc) * bessel_corr);
118 cont_layer_variance = std::sqrt(bacc::variance(cont_layer_acc) * bessel_corr);
119 super_layer_variance = std::sqrt(bacc::variance(super_layer_acc) * bessel_corr);
120 }
121 double empty_s_variance = -1;
122 if (empty_s_size > 1) {
123 double empty_s_bessel_corr = (double)empty_s_size / (empty_s_size - 1.0);
124 empty_s_variance = std::sqrt(bacc::variance(empty_s_acc) * empty_s_bessel_corr);
125 }
126
127 const CDCTrajectory3D& trajectory3D = track->getStartTrajectory3D();
128 const CDCTrajectory2D& trajectory2D = trajectory3D.getTrajectory2D();
129 const CDCTrajectorySZ& trajectorySZ = trajectory3D.getTrajectorySZ();
130
131 var<named("pt")>() = toFinite(trajectory2D.getAbsMom2D(), 0);
132 var<named("size")>() = size;
133 var<named("hits_per_layer")>() = hits_per_layer;
134
135 var<named("sz_slope")>() = toFinite(trajectorySZ.getTanLambda(), 0);
136 var<named("z0")>() = toFinite(trajectorySZ.getZ0(), 0);
137 var<named("s_range")>() = toFinite(s_range, 0);
138 var<named("avg_hit_dist")>() = toFinite(avg_hit_dist, 0);
139 var<named("has_matching_segment")>() = track->getHasMatchingSegment();
140
141 var<named("cont_layer_mean")>() = toFinite(bacc::mean(cont_layer_acc), 0);
142 var<named("cont_layer_variance")>() = toFinite(cont_layer_variance, 0);
143 var<named("cont_layer_max")>() = toFinite(cont_layer_max, 0);
144 var<named("cont_layer_min")>() = toFinite(cont_layer_min, 0);
145 var<named("cont_layer_first")>() = toFinite(cont_layer_first, 0);
146 var<named("cont_layer_last")>() = toFinite(cont_layer_last, 0);
147 var<named("cont_layer_max_vs_last")>() = toFinite(cont_layer_max - cont_layer_last, 0);
148 var<named("cont_layer_first_vs_min")>() = toFinite(cont_layer_first - cont_layer_min, 0);
149 var<named("cont_layer_count")>() = toFinite(cont_layer_count, 0);
150 var<named("cont_layer_occupancy")>() = toFinite(cont_layer_occupancy, 0);
151
152 var<named("super_layer_mean")>() = toFinite(bacc::mean(super_layer_acc), 0);
153 var<named("super_layer_variance")>() = toFinite(super_layer_variance, 0);
154 var<named("super_layer_max")>() = toFinite(super_layer_max, 0);
155 var<named("super_layer_min")>() = toFinite(super_layer_min, 0);
156 var<named("super_layer_first")>() = toFinite(super_layer_first, 0);
157 var<named("super_layer_last")>() = toFinite(super_layer_last, 0);
158 var<named("super_layer_max_vs_last")>() = toFinite(super_layer_max - super_layer_last, 0);
159 var<named("super_layer_first_vs_min")>() = toFinite(super_layer_first - super_layer_min, 0);
160 var<named("super_layer_count")>() = toFinite(super_layer_count, 0);
161 var<named("super_layer_occupancy")>() = toFinite(super_layer_occupancy, 0);
162
163 var<named("drift_length_mean")>() = toFinite(bacc::mean(drift_length_acc), 0);
164 var<named("drift_length_variance")>() = toFinite(drift_length_variance, 0);
165 var<named("drift_length_max")>() = toFinite(bacc::max(drift_length_acc), 0);
166 var<named("drift_length_min")>() = toFinite(bacc::min(drift_length_acc), 0);
167 var<named("drift_length_sum")>() = toFinite(bacc::sum(drift_length_acc), 0);
168
169 var<named("adc_mean")>() = toFinite(bacc::mean(adc_acc), 0);
170 var<named("adc_variance")>() = toFinite(adc_variance, 0);
171 var<named("adc_max")>() = toFinite(bacc::max(adc_acc), 0);
172 var<named("adc_min")>() = toFinite(bacc::min(adc_acc), 0);
173 var<named("adc_sum")>() = toFinite(bacc::sum(adc_acc), 0);
174
175 var<named("tot_mean")>() = toFinite(bacc::mean(tot_acc), 0);
176 var<named("tot_variance")>() = toFinite(tot_variance, 0);
177 var<named("tot_max")>() = toFinite(bacc::max(tot_acc), 0);
178 var<named("tot_min")>() = toFinite(bacc::min(tot_acc), 0);
179 var<named("tot_sum")>() = toFinite(bacc::sum(tot_acc), 0);
180
181 var<named("empty_s_mean")>() = toFinite(bacc::mean(empty_s_acc), 0);
182 var<named("empty_s_sum")>() = toFinite(bacc::sum(empty_s_acc), 0);
183 var<named("empty_s_variance")>() = toFinite(empty_s_variance, 0);
184 var<named("empty_s_max")>() = toFinite(bacc::max(empty_s_acc), 0);
185 var<named("empty_s_min")>() = toFinite(bacc::min(empty_s_acc), 0);
186
187 return true;
188}
bacc::accumulator_set< double, statistics_set > statistics_accumulator
A boost accumulators set that aggregates statistics for the values it is called with.
Class representing a three dimensional reconstructed hit.
Definition: CDCRecoHit3D.h:52
Particle trajectory as it is seen in xy projection represented as a circle.
double getAbsMom2D(double bZ) const
Get the estimation for the absolute value of the transvers momentum.
Particle full three dimensional trajectory.
CDCTrajectory2D getTrajectory2D() const
Getter for the two dimensional trajectory.
CDCTrajectorySZ getTrajectorySZ() const
Getter for the sz trajectory.
Linear trajectory in sz space.
double getTanLambda() const
Getter for the slope over the travel distance coordinate.
double getZ0() const
Getter for the z coordinate at zero travel distance.
static constexpr int named(const char *name)
Getter for the index from the name.
Definition: VarSet.h:78
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Definition: VarSet.h:93
Unary functor for equality comparison to NAN.
Definition: Functional.h:539

◆ extract() [2/3]

bool extract ( const Object obj)
inlineinherited

Method for extraction from an object instead of a pointer.

Definition at line 56 of file BaseVarSet.h.

57 {
58 return extract(&obj);
59 }
virtual bool extract(const Object *obj)
Main method that extracts the variable values from the complex object.
Definition: BaseVarSet.h:50

◆ extract() [3/3]

virtual bool extract ( const Object obj)
inlinevirtualinherited

Main method that extracts the variable values from the complex object.

Returns indication whether the extraction could be completed successfully. Base implementation returns always true.

Parameters
objdummy object not used
Returns
: always true for the base implementation

Definition at line 50 of file BaseVarSet.h.

51 {
52 return true;
53 }

◆ find()

MayBePtr< Float_t > find ( const std::string &  varName)
inlineoverridevirtualinherited

Pointer to the variable with the given name.

Returns nullptr if not found.

Reimplemented from BaseVarSet< AVarNames::Object >.

Definition at line 64 of file VarSet.h.

65 {
66 return m_variables.find(varName);
67 }
virtual MayBePtr< Float_t > find(std::string name)
Getter for a pointer to the value with the given name.
FixedSizeNamedFloatTuple< BasicTrackVarSetNames > m_variables
Memory for nVars floating point values.
Definition: VarSet.h:138

◆ finitevar()

AssignFinite< Float_t > finitevar ( )
inlineprotectedinherited

Reference getter for the value of the ith variable. Transforms non-finite values to finite value.

Definition at line 130 of file VarSet.h.

131 {
132 static_assert(I < nVars, "Requested variable index exceeds number of variables.");
133 return AssignFinite<Float_t>(m_variables[I]);
134 }
static const size_t nVars
Number of floating point values represented by this class.
Definition: VarSet.h:48

◆ get()

Float_t get ( ) const
inlineprotectedinherited

Getter for the value of the ith variable. Static version.

Definition at line 85 of file VarSet.h.

86 {
87 static_assert(I < nVars, "Requested variable index exceeds number of variables.");
88 return m_variables.get(I);
89 }
Float_t get() const
Getter for the ith value. Static index version.

◆ getNamedValues() [1/2]

std::map< std::string, Float_t > getNamedValues ( ) const
inlineinherited

Getter for a map of names to float values.

Definition at line 95 of file BaseVarSet.h.

96 {
97 const std::string prefix = "";
98 return this->getNamedValues(prefix);
99 }
std::map< std::string, Float_t > getNamedValues(const std::string &prefix) const
Getter for a map of names to float values.
Definition: BaseVarSet.h:83

◆ getNamedValues() [2/2]

std::map< std::string, Float_t > getNamedValues ( const std::string &  prefix) const
inlineinherited

Getter for a map of names to float values.

Parameters
prefixName prefix to apply to all variable names.

Definition at line 83 of file BaseVarSet.h.

84 {
85 std::map<std::string, Float_t> result;
86 std::vector<Named<Float_t*> > namedVariables = this->getNamedVariables(prefix);
87 for (const Named<Float_t*>& namedVariable : namedVariables) {
88 Float_t* variable = namedVariable;
89 result[namedVariable.getName()] = *variable;
90 }
91 return result;
92 }
virtual std::vector< Named< Float_t * > > getNamedVariables(const std::string &prefix)
Getter for the named references to the individual variables Base implementation returns empty vector.
Definition: BaseVarSet.h:67

◆ getNamedVariables() [1/2]

std::vector< Named< Float_t * > > getNamedVariables ( )
inlineinherited

Getter for the named references to the individual variables.

Definition at line 73 of file BaseVarSet.h.

74 {
75 const std::string prefix = "";
76 return this->getNamedVariables(prefix);
77 }

◆ getNamedVariables() [2/2]

std::vector< Named< Float_t * > > getNamedVariables ( const std::string &  prefix)
inlineoverridevirtualinherited

Getter for the named references to the individual variables Base implementation returns empty vector.

Reimplemented from BaseVarSet< AVarNames::Object >.

Definition at line 55 of file VarSet.h.

56 {
57 return m_variables.getNamedVariables(prefix);
58 }
std::vector< Named< Float_t * > > getNamedVariables(std::string prefix="")
Getter for named references to the variables in this tuple.

◆ getNProcessingSignalListener()

int getNProcessingSignalListener ( )
protectedinherited

Get the number of currently registered listeners.

Definition at line 60 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
overridevirtualinherited

Receive and dispatch signal before the start of the event processing.

Reimplemented from ProcessingSignalListener.

Reimplemented in UnionVarSet< AObject >, UnionVarSet< Object >, VariadicUnionVarSet< AVarSets >, ResultStorer< Belle2::CKFToPXDResult >, ResultStorer< Belle2::CKFToSVDResult >, BaseEventTimeExtractor< RecoTrack * >, BaseEventTimeExtractor< TrackFindingCDC::CDCWireHit & >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::HyperHough >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::QuadraticLegendre >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::Z0TanLambdaLegendre >, OnVarSet< Filter< ATruthVarSet::Object > >, OnVarSet< Filter< AVarSet::Object > >, OnVarSet< BaseFacetFilter >, OnVarSet< BaseFacetRelationFilter >, OnVarSet< BaseAxialSegmentPairFilter >, OnVarSet< BaseSegmentRelationFilter >, OnVarSet< BaseTrackRelationFilter >, OnVarSet< BaseSegmentPairRelationFilter >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, StoreArrayLoader< const Belle2::SpacePoint >, StoreArrayLoader< DataStoreInputTypeRefType >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCFacet >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCWireHit, true >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCTrack >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentTriple >, RelationVarSet< ABaseVarSet >, QualityIndicatorFilter, TwoHitVirtualIPQIFilter, MultiHoughSpaceFastInterceptFinder, RawTrackCandCleaner< AHit >, RawTrackCandCleaner< Belle2::vxdHoughTracking::VXDHoughState >, RecoTrackStorer, ROIFinder, SingleHoughSpaceFastInterceptFinder, SpacePointLoaderAndPreparer, TrackCandidateOverlapResolver, and TrackCandidateResultRefiner.

Definition at line 15 of file CompositeProcessingSignalListener.cc.

16{
19 psl->initialize();
20 }
21}
virtual void initialize()
Receive signal before the start of the event processing.

◆ named()

static constexpr int named ( const char *  name)
inlinestaticconstexprprotectedinherited

Getter for the index from the name.

Looks through the associated names and returns the right index if found Returns nVars (one after the last element) if not found.

Parameters
nameName of the sought variable
Returns
Index of the name, nVars if not found.

Definition at line 78 of file VarSet.h.

79 {
80 return index<nVars>(AVarNames::getName, name);
81 }

◆ terminate()

void terminate ( )
overridevirtualinherited

Receive and dispatch Signal for termination of the event processing.

Reimplemented from ProcessingSignalListener.

Reimplemented in StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::HyperHough >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::QuadraticLegendre >, and StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::Z0TanLambdaLegendre >.

Definition at line 47 of file CompositeProcessingSignalListener.cc.

48{
50 psl->terminate();
51 }
53}
virtual void terminate()
Receive Signal for termination of the event processing.

◆ var()

Float_t & var ( )
inlineprotectedinherited

Reference getter for the value of the ith variable. Static version.

Definition at line 93 of file VarSet.h.

94 {
95 static_assert(I < nVars, "Requested variable index exceeds number of variables.");
96 return m_variables[I];
97 }

Member Data Documentation

◆ m_initialized

bool m_initialized = false
privateinherited

Flag to keep track whether initialization happened before.

Definition at line 52 of file ProcessingSignalListener.h.

◆ m_initializedAs

std::string m_initializedAs
privateinherited

Name of the type during initialisation.

Definition at line 58 of file ProcessingSignalListener.h.

◆ m_subordinaryProcessingSignalListeners

std::vector<ProcessingSignalListener*> m_subordinaryProcessingSignalListeners
privateinherited

References to subordinary signal processing listener contained in this findlet.

Definition at line 52 of file CompositeProcessingSignalListener.h.

◆ m_terminated

bool m_terminated = false
privateinherited

Flag to keep track whether termination happened before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_variables

FixedSizeNamedFloatTuple<BasicTrackVarSetNames > m_variables
privateinherited

Memory for nVars floating point values.

Definition at line 138 of file VarSet.h.

◆ nVars

const size_t nVars
staticprivateinherited

Number of floating point values represented by this class.

Definition at line 48 of file VarSet.h.


The documentation for this class was generated from the following files: