Belle II Software development
BridgingWireHitRelationFilter Class Reference

Wire hit relation filter that is compensating for hit inefficiencies. More...

#include <BridgingWireHitRelationFilter.h>

Inheritance diagram for BridgingWireHitRelationFilter:
RelationFilter< TrackingUtilities::CDCWireHit > Filter< AObject > CompositeProcessingSignalListener ProcessingSignalListener

Public Types

using Object = AObject
 Type of the object to be analysed.
 
using Interface = Filter<AObject>
 Mark this class as the basic interface.
 

Public Member Functions

 BridgingWireHitRelationFilter ()
 Default constructor.
 
 ~BridgingWireHitRelationFilter () override
 Default destructor.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the set of parameters of the filter to the module parameter list.
 
void initialize () override
 Receive signal at the begin of the event processing and prepare some parameters.
 
std::vector< TrackingUtilities::CDCWireHit * > getPossibleTos (TrackingUtilities::CDCWireHit *from, const std::vector< TrackingUtilities::CDCWireHit * > &wireHits) const final
 Returns a vector containing the neighboring wire hits of the given wire hit out of the sorted range given by the two iterator other arguments.
 
void prepare (const std::vector< TrackingUtilities::CDCWireHit * > &wireHits)
 Precompute the wires of the given wire hits to speed up the searches in the following getPossibleTos calls made with the very same vector.
 
virtual std::vector< TrackingUtilities::CDCWireHit * > getPossibleTos (TrackingUtilities::CDCWireHit *from, const std::vector< TrackingUtilities::CDCWireHit * > &objects) const
 Selects the objects possibly related to the given one from the given pool of objects.
 
virtual Weight operator() (const TrackingUtilities::CDCWireHit &from, const TrackingUtilities::CDCWireHit &to)
 Main filter method returning the weight of the neighborhood relation.
 
virtual std::vector< float > operator() (const std::vector< Relation< TrackingUtilities::CDCWireHit > * > &objs) override
 Filter over a vector of relations.
 
Weight operator() (const Relation< TrackingUtilities::CDCWireHit > &relation) override
 Main filter method overriding the filter interface method.
 
virtual Weight operator() (const TrackingUtilities::CDCWireHit &from, const TrackingUtilities::CDCWireHit &to)
 Main filter method returning the weight of the neighborhood relation.
 
virtual std::vector< float > operator() (const std::vector< Relation< TrackingUtilities::CDCWireHit > * > &objs) override
 Filter over a vector of relations.
 
Weight operator() (const Relation< TrackingUtilities::CDCWireHit > &relation) override
 Main filter method overriding the filter interface method.
 
virtual Weight operator() (const Object &obj)
 Function to evaluate the object.
 
Weight operator() (const Object *obj)
 Function to evaluate the object.
 
virtual std::vector< float > operator() (const std::vector< Object * > &objs)
 Function to evaluate a vector of objects Base implementation applies the function to each object.
 
virtual bool needsTruthInformation ()
 Indicates if the filter requires Monte Carlo information.
 
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

void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Types

using Super = TrackingUtilities::RelationFilter<TrackingUtilities::CDCWireHit>
 Type of the base class.
 

Private Attributes

std::map< int, int > m_param_missingPrimaryNeighborThresholdMap
 Parameter: A map from o'clock direction to the number of missing primary drift cells.
 
std::array< short, 12 > m_missingPrimaryNeighborThresholds {}
 Array for the number of primary drift cells to be included for the o'clock position at each index.
 
std::vector< short > m_consideredSecondaryNeighbors
 Indices of the considered o'clock positions of the secondary neighborhood.
 
std::vector< const CDC::CDCWire * > m_preparedWires
 Memory for the wires of the prepared wire hit vector.
 
TrackingUtilities::CDCWireHit *const * m_preparedWireHitsData = nullptr
 Data pointer of the prepared wire hit vector used to recognize it in getPossibleTos.
 
std::size_t m_preparedWireHitsSize = 0
 Size of the prepared wire hit vector used to recognize it in getPossibleTos.
 
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.
 

Detailed Description

Wire hit relation filter that is compensating for hit inefficiencies.

The default setup counters some hits lost due to a drift time cut off if the track enters at the edge of a drift cell. The biggest effect observed in the CDC simulation was observed when the track is along the 2, 4, 8 and 10 o'clock direction since in this case two neighboring hits can be lost due to this time cut off. In an attempt to detect if this occurred the primary wire hit neighborhood is slightly extended to bridge to the secondary neighborhood in the critical directions.

The criterion can be lowered such that fewer missing hits trigger the inclusion of the secondary neighbors.

Definition at line 46 of file BridgingWireHitRelationFilter.h.

Member Typedef Documentation

◆ Interface

template<class AObject>
using Interface = Filter<AObject>
inherited

Mark this class as the basic interface.

Definition at line 38 of file Filter.dcl.h.

◆ Object

template<class AObject>
using Object = AObject
inherited

Type of the object to be analysed.

Definition at line 35 of file Filter.dcl.h.

◆ Super

Type of the base class.

Definition at line 50 of file BridgingWireHitRelationFilter.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 DATCONFPGAFindlet, SpacePointTagger< AResult, ACluster >, SpacePointTagger< Belle2::CKFToPXDResult, Belle2::PXDCluster >, SpacePointTagger< Belle2::CKFToSVDResult, Belle2::SVDCluster >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, MonopoleStereoHitFinder, MonopoleStereoHitFinderQuadratic, SegmentCreatorMCTruth, SegmentFinderFacetAutomaton, SegmentTrackCombiner, SegmentTrackTruthVarSet, StereoHitFinder, StereoHitTruthVarSet, TrackFinderAutomaton, TrackFinderSegmentPairAutomaton, TrackFinderSegmentTripleAutomaton, TruthAxialSegmentPairVarSet, TruthSegmentVarSet, TruthTrackVarSet, WireHitMCMultiLoopBlocker, FindletStoreArrayInput< TWrappedFindlet >, SharingHitsMatcher< ACollectorItem, ACollectionItem >, SharingHitsMatcher< Belle2::TrackingUtilities::CDCTrack, Belle2::TrackingUtilities::CDCSegment2D >, StoreVectorSwapper< IOType, a_alwaysWrite >, StoreVectorSwapper< Belle2::TrackingUtilities::CDCFacet >, StoreVectorSwapper< Belle2::TrackingUtilities::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackingUtilities::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackingUtilities::CDCSegmentTriple >, StoreVectorSwapper< Belle2::TrackingUtilities::CDCTrack >, StoreVectorSwapper< Belle2::TrackingUtilities::CDCWireHit, true >, RecoTrackStorer, ROIFinder, and SVDHoughTracking.

Definition at line 31 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
virtual void beginEvent()
Receive signal for the start of a new event.
ProcessingSignalListener()
Allow default construction.

◆ beginRun()

void beginRun ( )
overridevirtualinherited

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

Reimplemented from ProcessingSignalListener.

Reimplemented in DATCONSVDClusterizer, LayerPXDRelationFilter< AFilter, APrefilter >, LayerPXDRelationFilter< TrackingUtilities::ChooseableFilter< PXDPairFilterFactory > >, LayerPXDRelationFilter< TrackingUtilities::ChooseableFilter< PXDPairFilterFactory > >, LayerSVDRelationFilter< AFilter, APrefilter >, LayerSVDRelationFilter< TrackingUtilities::ChooseableFilter< SVDPairFilterFactory > >, LayerSVDRelationFilter< TrackingUtilities::ChooseableFilter< SVDPairFilterFactory > >, SectorMapBasedSVDPairFilter, SimplePXDStateFilter, SimpleSVDStateFilter, CutsFromDBWireHitFilter, WireHitCreator, MVA< Filter< AVarSet::Object > >, MVA< Filter< Belle2::TrackFindingCDC::CDCWireHitVarSet::Object > >, MVA< Filter< typename AVarSet::Object > >, MVA< Filter< typename AVarSet::Object > >, FourHitFilter, LayerRelationFilter< AFilter >, LayerRelationFilter< TrackingUtilities::ChooseableFilter< RelationFilterFactory > >, LayerRelationFilter< TrackingUtilities::ChooseableFilter< RelationFilterFactory > >, QualityIndicatorFilter, RawTrackCandCleaner< AHit >, RawTrackCandCleaner< Belle2::vxdHoughTracking::VXDHoughState >, RecoTrackStorer, ROIFinder, SpacePointLoaderAndPreparer, ThreeHitFilter, TrackCandidateOverlapResolver, TrackCandidateResultRefiner, TwoHitVirtualIPFilter, and TwoHitVirtualIPQIFilter.

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.

◆ exposeParameters()

void exposeParameters ( ModuleParamList * moduleParamList,
const std::string & prefix )
overridevirtual

Expose the set of parameters of the filter to the module parameter list.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 38 of file BridgingWireHitRelationFilter.cc.

40{
41 moduleParamList
42 ->addParameter(prefixed(prefix, "missingPrimaryNeighborThresholds"),
44 "Map of o'clock directions to number of missing drift cells "
45 "in the primary neighborhood to trigger the inclusion of secondary neighbors "
46 "in that very o'clock direction",
48}
std::map< int, int > m_param_missingPrimaryNeighborThresholdMap
Parameter: A map from o'clock direction to the number of missing primary drift cells.
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.

◆ getNProcessingSignalListener()

int getNProcessingSignalListener ( )
protectedinherited

Get the number of currently registered listeners.

Definition at line 60 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ getPossibleTos() [1/2]

std::vector< CDCWireHit * > getPossibleTos ( TrackingUtilities::CDCWireHit * from,
const std::vector< TrackingUtilities::CDCWireHit * > & wireHits ) const
finalvirtual

Returns a vector containing the neighboring wire hits of the given wire hit out of the sorted range given by the two iterator other arguments.

Merge the sorted primary and secondary neighbors.

Reimplemented from RelationFilter< TrackingUtilities::CDCWireHit >.

Definition at line 80 of file BridgingWireHitRelationFilter.cc.

83{
84 // Use the wires precomputed by prepare() when called with the prepared vector.
85 // The comparison LessOf<Deref>() used below resolves to operator<(CDCWireHit, CDCWire),
86 // which compares the *address* of the wire of the hit with the address of the wire.
87 // Searching the precomputed wire addresses therefore evaluates exactly the same
88 // predicate on exactly the same values, only without dereferencing the wire hits.
89 const bool prepared =
90 wireHits.data() == m_preparedWireHitsData and wireHits.size() == m_preparedWireHitsSize;
91
92 auto findWireHitRange = [&](const CDCWire * neighborWire) -> ConstVectorRange<CDCWireHit*> {
93 if (prepared)
94 {
95 const auto itRange = std::equal_range(m_preparedWires.begin(), m_preparedWires.end(), neighborWire);
96 return {
97 wireHits.begin() + (itRange.first - m_preparedWires.begin()),
98 wireHits.begin() + (itRange.second - m_preparedWires.begin())};
99 }
100 return ConstVectorRange<CDCWireHit*>{
101 std::equal_range(wireHits.begin(), wireHits.end(), neighborWire, LessOf<Deref>())
102 };
103 };
104
105 // Stack buffer for the wire neighbors - at most 6 primary
106 // respectively 12 secondary neighbors can be collected
107 std::array<std::pair<const CDCWire*, int>, 12> wireNeighbors;
108 int nWireNeighbors = 0;
109
110 std::vector<CDCWireHit*> wireHitNeighbors;
111 wireHitNeighbors.reserve(12);
112
113 std::array<short, 12> missingPrimaryNeighbor = {0};
114
115 const CDCWireTopology& wireTopology = CDCWireTopology::getInstance();
116
117 const CDCWire& wire = from->getWire();
118
119 // Analyse primary neighborhood - sorted such that the wire hits relations are most likely sorted.
120 for (short oClockDirection : {5, 7, 3, 9, 1, 11}) {
121 MayBePtr<const CDCWire> neighborWire = wireTopology.getPrimaryNeighbor(oClockDirection, wire);
122 if (neighborWire) wireNeighbors[nWireNeighbors++] = {neighborWire, oClockDirection};
123 }
124
125 std::sort(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors);
126
127 for (std::pair<const CDCWire*, int> wireAndOClockDirection :
128 asRange(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors)) {
129 const CDCWire* neighborWire = wireAndOClockDirection.first;
130 // cppcheck-suppress variableScope ; declaration kept at this scope for readability
131 int oClockDirection = wireAndOClockDirection.second;
132
133 ConstVectorRange<CDCWireHit*> wireHitRange = findWireHitRange(neighborWire);
134 if (wireHitRange.empty()) {
135 int ccwOClockDirection = oClockDirection - 1;
136 int cwOClockDirection = oClockDirection == 11 ? 0 : oClockDirection + 1;
137 ++missingPrimaryNeighbor[ccwOClockDirection];
138 ++missingPrimaryNeighbor[oClockDirection];
139 ++missingPrimaryNeighbor[cwOClockDirection];
140 }
141 wireHitNeighbors.insert(wireHitNeighbors.end(), wireHitRange.begin(), wireHitRange.end());
142 }
143
144 size_t nPrimaryWireHitNeighbors = wireHitNeighbors.size();
145 nWireNeighbors = 0;
146
147 // Analyse secondary neighborhood
148 for (short oClockDirection : m_consideredSecondaryNeighbors) {
149 MayBePtr<const CDCWire> neighborWire = wireTopology.getSecondaryNeighbor(oClockDirection, wire);
150 if (not neighborWire) continue;
151 if (missingPrimaryNeighbor[oClockDirection] <
152 m_missingPrimaryNeighborThresholds[oClockDirection])
153 continue;
154 wireNeighbors[nWireNeighbors++] = {neighborWire, oClockDirection};
155 }
156
157 std::sort(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors);
158
159 for (std::pair<const CDCWire*, int> wireAndOClockDirection :
160 asRange(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors)) {
161 const CDCWire* neighborWire = wireAndOClockDirection.first;
162 ConstVectorRange<CDCWireHit*> wireHitRange = findWireHitRange(neighborWire);
163 wireHitNeighbors.insert(wireHitNeighbors.end(), wireHitRange.begin(), wireHitRange.end());
164 }
165
167 std::inplace_merge(wireHitNeighbors.begin(),
168 wireHitNeighbors.begin() + nPrimaryWireHitNeighbors,
169 wireHitNeighbors.end(),
170 std::less<CDCWireHit*>());
171
172 return wireHitNeighbors;
173}
TrackingUtilities::MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the secondary neighbor of the given wire id.
TrackingUtilities::MayBePtr< const CDCWire > getPrimaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the primary neighbor of the given wire id.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
TrackingUtilities::CDCWireHit *const * m_preparedWireHitsData
Data pointer of the prepared wire hit vector used to recognize it in getPossibleTos.
std::array< short, 12 > m_missingPrimaryNeighborThresholds
Array for the number of primary drift cells to be included for the o'clock position at each index.
std::vector< const CDC::CDCWire * > m_preparedWires
Memory for the wires of the prepared wire hit vector.
std::size_t m_preparedWireHitsSize
Size of the prepared wire hit vector used to recognize it in getPossibleTos.
std::vector< short > m_consideredSecondaryNeighbors
Indices of the considered o'clock positions of the secondary neighborhood.
Iterator begin() const
Begin of the range for range based for.
Definition Range.h:64
Iterator end() const
End of the range for range based for.
Definition Range.h:68
bool empty() const
Checks if the begin equals the end iterator, hence if the range is empty.
Definition Range.h:72

◆ getPossibleTos() [2/2]

std::vector< TrackingUtilities::CDCWireHit * > getPossibleTos ( TrackingUtilities::CDCWireHit * from,
const std::vector< TrackingUtilities::CDCWireHit * > & objects ) const
virtualinherited

Selects the objects possibly related to the given one from the given pool of objects.

Definition at line 39 of file RelationFilter.icc.h.

30 {
31 return objects;
32 }

◆ initialize()

void initialize ( )
overridevirtual

Receive signal at the begin of the event processing and prepare some parameters.

Prepare the lookup such that it turns out most likely sorted.

Reimplemented from ProcessingSignalListener.

Definition at line 50 of file BridgingWireHitRelationFilter.cc.

51{
53 for (short oClockDirection = 0; oClockDirection < 12; oClockDirection++) {
54 m_missingPrimaryNeighborThresholds[oClockDirection] = 3;
55 if (m_param_missingPrimaryNeighborThresholdMap.count(oClockDirection)) {
56 m_missingPrimaryNeighborThresholds[oClockDirection] =
58 }
59 }
60
62 for (short oClockDirection : {5, 6, 7, 4, 8, 3, 9, 2, 10, 1, 0, 11}) {
63 if (m_missingPrimaryNeighborThresholds[oClockDirection] < 3) {
64 m_consideredSecondaryNeighbors.push_back(oClockDirection);
65 }
66 }
67}

◆ needsTruthInformation()

◆ operator()() [1/9]

template<class AObject>
Weight operator() ( const Object & obj)
virtualinherited

Function to evaluate the object.

Base implementation accepts all objects.

Parameters
objThe object to be accepted or rejected.
Returns
A finite float value if the object is accepted. NAN if the object is rejected.

Reimplemented in AllPXDStateFilter, AllSVDStateFilter, ArcLengthBasedCDCfromEclPathPairFilter, ArcLengthBasedCDCPathPairFilter, Chi2BasedCDCPathPairFilter, DistanceBasedCDCPathPairFilter, DistanceCDCStateFilter, DuplicateCDCPathPairFilter, ExtrapolateAndUpdateCDCStateFilter, HitDistanceBasedCDCPathPairFilter, MCTruthCDCPathPairFilter, MCTruthCDCStateFilter, MCTruthEclSeedFilter, NonIPCrossingStateFilter< AllPXDStateFilter >, NonIPCrossingStateFilter< AllSVDStateFilter >, ResidualSVDStateFilter, RoughCDCfromEclStateFilter, RoughCDCStateFilter, SeedChargeCDCPathFilter, SimplePXDStateFilter, SimpleSVDStateFilter, SizeCDCPathFilter, AllAxialSegmentPairFilter, AllClusterFilter, AllFacetFilter, AllSegmentPairFilter, AllSegmentTripleFilter, AllWireHitFilter, Chi2FacetFilter, CombinedWireHitFilter, CutsFromDBWireHitFilter, FeasibleRLFacetFilter, MCAxialSegmentPairFilter, MCFacetFilter, MCSegmentPairFilter, MCSegmentTripleFilter, RealisticFacetFilter, SimpleAxialSegmentPairFilter, SimpleFacetFilter, SimpleSegmentPairFilter, SimpleSegmentTripleFilter, MVA< Filter< typename AVarSet::Object > >, OnVarSet< Filter< typename AVarSet::Object > >, Recording< Filter< typename AVarSet::Object > >, TruthVarFilter< ATruthVarSet >, and WeightSVDResultFilter.

Definition at line 46 of file Filter.icc.h.

47 {
48 return 1;
49 }

◆ operator()() [2/9]

template<class AObject>
Weight operator() ( const Object * obj)
inherited

Function to evaluate the object.

Base implementation accepts all objects, except nullptr.

Parameters
objThe object to be accepted or rejected.
Returns
A finit float value if the object is accepted. NAN if the object is rejected. Nullptr is always rejected.

Definition at line 52 of file Filter.icc.h.

53 {
54 return obj ? operator()(*obj) : NAN;
55 }

◆ operator()() [3/9]

template<class AObject>
std::vector< float > operator() ( const std::vector< Object * > & objs)
virtualinherited

Function to evaluate a vector of objects Base implementation applies the function to each object.

Can be optimized for MVA filters

Parameters
objsA vector of pointers to objects
Returns
A vector of float or NAN values. See above

Reimplemented in MVA< Filter< typename AVarSet::Object > >.

Definition at line 58 of file Filter.icc.h.

59 {
60 std::vector<float> out;
61 for (const Object* obj : objs) {
62 out.push_back(operator()(obj));
63 }
64 return out;
65 }

◆ operator()() [4/9]

Weight operator() ( const Relation< TrackingUtilities::CDCWireHit > & relation)
overrideinherited

Main filter method overriding the filter interface method.

Checks the validity of the pointers in the relation and unpacks the relation to the method implementing the rejection.

◆ operator()() [5/9]

Weight operator() ( const Relation< TrackingUtilities::CDCWireHit > & relation)
overrideinherited

Main filter method overriding the filter interface method.

Checks the validity of the pointers in the relation and unpacks the relation to the method implementing the rejection.

Definition at line 69 of file RelationFilter.icc.h.

43 {
44 const AObject* from = relation.getFrom();
45 const AObject* to = relation.getTo();
46
47 if (from == to) return NAN; // Prevent relation to same.
48 if ((from == nullptr) or (to == nullptr)) return NAN;
49 return operator()(*from, *to);
50 }

◆ operator()() [6/9]

virtual std::vector< float > operator() ( const std::vector< Relation< TrackingUtilities::CDCWireHit > * > & objs)
inlineoverridevirtualinherited

Filter over a vector of relations.

We need to override it since derived relation classes do not implement a call with a pointer to a relation.

Definition at line 51 of file RelationFilter.dcl.h.

52 {
53 std::vector<float> out(objs.size());
54 for (size_t iObj = 0; iObj < objs.size(); iObj += 1) {
55 if (objs[iObj]) {
56 out[iObj] = operator()(*objs[iObj]);
57 } else {
58 out[iObj] = NAN;
59 }
60 }
61 return out;
62 }

◆ operator()() [7/9]

virtual std::vector< float > operator() ( const std::vector< Relation< TrackingUtilities::CDCWireHit > * > & objs)
inlineoverridevirtualinherited

Filter over a vector of relations.

We need to override it since derived relation classes do not implement a call with a pointer to a relation.

Definition at line 51 of file RelationFilter.dcl.h.

52 {
53 std::vector<float> out(objs.size());
54 for (size_t iObj = 0; iObj < objs.size(); iObj += 1) {
55 if (objs[iObj]) {
56 out[iObj] = operator()(*objs[iObj]);
57 } else {
58 out[iObj] = NAN;
59 }
60 }
61 return out;
62 }

◆ operator()() [8/9]

virtual Weight operator() ( const TrackingUtilities::CDCWireHit & from,
const TrackingUtilities::CDCWireHit & to )
virtualinherited

Main filter method returning the weight of the neighborhood relation.

Return always returns NAN to reject all segment neighbors.

◆ operator()() [9/9]

Weight operator() ( const TrackingUtilities::CDCWireHit & from,
const TrackingUtilities::CDCWireHit & to )
virtualinherited

Main filter method returning the weight of the neighborhood relation.

Return always returns NAN to reject all segment neighbors.

Definition at line 46 of file RelationFilter.icc.h.

37 {
38 return 1;
39 }

◆ prepare()

void prepare ( const std::vector< TrackingUtilities::CDCWireHit * > & wireHits)

Precompute the wires of the given wire hits to speed up the searches in the following getPossibleTos calls made with the very same vector.

Optional - getPossibleTos calls with any other vector fall back to searching the wire hits directly.

Definition at line 69 of file BridgingWireHitRelationFilter.cc.

70{
71 m_preparedWires.clear();
72 m_preparedWires.reserve(wireHits.size());
73 for (const CDCWireHit* wireHit : wireHits) {
74 m_preparedWires.push_back(&wireHit->getWire());
75 }
76 m_preparedWireHitsData = wireHits.data();
77 m_preparedWireHitsSize = wireHits.size();
78}

◆ terminate()

Member Data Documentation

◆ m_consideredSecondaryNeighbors

std::vector<short> m_consideredSecondaryNeighbors
private

Indices of the considered o'clock positions of the secondary neighborhood.

Definition at line 90 of file BridgingWireHitRelationFilter.h.

◆ 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_missingPrimaryNeighborThresholds

std::array<short, 12> m_missingPrimaryNeighborThresholds {}
private

Array for the number of primary drift cells to be included for the o'clock position at each index.

Definition at line 87 of file BridgingWireHitRelationFilter.h.

87{};

◆ m_param_missingPrimaryNeighborThresholdMap

std::map<int, int> m_param_missingPrimaryNeighborThresholdMap
private
Initial value:
=
{{0, 2}, {2, 2}, {4, 2}, {6, 2}, {8, 2}, {10, 2}}

Parameter: A map from o'clock direction to the number of missing primary drift cells.

Definition at line 83 of file BridgingWireHitRelationFilter.h.

84 {{0, 2}, {2, 2}, {4, 2}, {6, 2}, {8, 2}, {10, 2}};

◆ m_preparedWireHitsData

TrackingUtilities::CDCWireHit* const* m_preparedWireHitsData = nullptr
private

Data pointer of the prepared wire hit vector used to recognize it in getPossibleTos.

Definition at line 96 of file BridgingWireHitRelationFilter.h.

◆ m_preparedWireHitsSize

std::size_t m_preparedWireHitsSize = 0
private

Size of the prepared wire hit vector used to recognize it in getPossibleTos.

Definition at line 99 of file BridgingWireHitRelationFilter.h.

◆ m_preparedWires

std::vector<const CDC::CDCWire*> m_preparedWires
private

Memory for the wires of the prepared wire hit vector.

Definition at line 93 of file BridgingWireHitRelationFilter.h.

◆ m_subordinaryProcessingSignalListeners

std::vector<ProcessingSignalListener*> m_subordinaryProcessingSignalListeners
privateinherited

References to subordinary signal processing listener contained in this findlet.

Definition at line 60 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.


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