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 39 of file BridgingWireHitRelationFilter.cc.

41{
42 moduleParamList
43 ->addParameter(prefixed(prefix, "missingPrimaryNeighborThresholds"),
45 "Map of o'clock directions to number of missing drift cells "
46 "in the primary neighborhood to trigger the inclusion of secondary neighbors "
47 "in that very o'clock direction",
49}
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 81 of file BridgingWireHitRelationFilter.cc.

84{
85 assert(std::is_sorted(wireHits.begin(), wireHits.end(), LessOf<Deref>()) &&
86 "Expected wire hits to be sorted");
87
88 // Use the wires precomputed by prepare() when called with the prepared vector.
89 // The wire hits are sorted by the address of their wire such that a search in the
90 // contiguous wire array gives the same ranges without dereferencing the wire hits.
91 const bool prepared =
92 wireHits.data() == m_preparedWireHitsData and wireHits.size() == m_preparedWireHitsSize;
93
94 auto findWireHitRange = [&](const CDCWire * neighborWire) -> ConstVectorRange<CDCWireHit*> {
95 if (prepared)
96 {
97 const auto itRange = std::equal_range(m_preparedWires.begin(), m_preparedWires.end(), neighborWire);
98 return {
99 wireHits.begin() + (itRange.first - m_preparedWires.begin()),
100 wireHits.begin() + (itRange.second - m_preparedWires.begin())};
101 }
102 return ConstVectorRange<CDCWireHit*>{
103 std::equal_range(wireHits.begin(), wireHits.end(), neighborWire, LessOf<Deref>())
104 };
105 };
106
107 // Stack buffer for the wire neighbors - at most 6 primary
108 // respectively 12 secondary neighbors can be collected
109 std::array<std::pair<const CDCWire*, int>, 12> wireNeighbors;
110 int nWireNeighbors = 0;
111
112 std::vector<CDCWireHit*> wireHitNeighbors;
113 wireHitNeighbors.reserve(12);
114
115 std::array<short, 12> missingPrimaryNeighbor = {0};
116
117 const CDCWireTopology& wireTopology = CDCWireTopology::getInstance();
118
119 const CDCWire& wire = from->getWire();
120
121 // Analyse primary neighborhood - sorted such that the wire hits relations are most likely sorted.
122 for (short oClockDirection : {5, 7, 3, 9, 1, 11}) {
123 MayBePtr<const CDCWire> neighborWire = wireTopology.getPrimaryNeighbor(oClockDirection, wire);
124 if (neighborWire) wireNeighbors[nWireNeighbors++] = {neighborWire, oClockDirection};
125 }
126
127 std::sort(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors);
128
129 for (std::pair<const CDCWire*, int> wireAndOClockDirection :
130 asRange(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors)) {
131 const CDCWire* neighborWire = wireAndOClockDirection.first;
132 // cppcheck-suppress variableScope ; declaration kept at this scope for readability
133 int oClockDirection = wireAndOClockDirection.second;
134
135 ConstVectorRange<CDCWireHit*> wireHitRange = findWireHitRange(neighborWire);
136 if (wireHitRange.empty()) {
137 int ccwOClockDirection = oClockDirection - 1;
138 int cwOClockDirection = oClockDirection == 11 ? 0 : oClockDirection + 1;
139 ++missingPrimaryNeighbor[ccwOClockDirection];
140 ++missingPrimaryNeighbor[oClockDirection];
141 ++missingPrimaryNeighbor[cwOClockDirection];
142 }
143 wireHitNeighbors.insert(wireHitNeighbors.end(), wireHitRange.begin(), wireHitRange.end());
144 }
145
146 size_t nPrimaryWireHitNeighbors = wireHitNeighbors.size();
147 nWireNeighbors = 0;
148
149 // Analyse secondary neighborhood
150 for (short oClockDirection : m_consideredSecondaryNeighbors) {
151 MayBePtr<const CDCWire> neighborWire = wireTopology.getSecondaryNeighbor(oClockDirection, wire);
152 if (not neighborWire) continue;
153 if (missingPrimaryNeighbor[oClockDirection] <
154 m_missingPrimaryNeighborThresholds[oClockDirection])
155 continue;
156 wireNeighbors[nWireNeighbors++] = {neighborWire, oClockDirection};
157 }
158
159 std::sort(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors);
160
161 for (std::pair<const CDCWire*, int> wireAndOClockDirection :
162 asRange(wireNeighbors.begin(), wireNeighbors.begin() + nWireNeighbors)) {
163 const CDCWire* neighborWire = wireAndOClockDirection.first;
164 ConstVectorRange<CDCWireHit*> wireHitRange = findWireHitRange(neighborWire);
165 wireHitNeighbors.insert(wireHitNeighbors.end(), wireHitRange.begin(), wireHitRange.end());
166 }
167
169 std::inplace_merge(wireHitNeighbors.begin(),
170 wireHitNeighbors.begin() + nPrimaryWireHitNeighbors,
171 wireHitNeighbors.end(),
172 std::less<CDCWireHit*>());
173
174 return wireHitNeighbors;
175}
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 51 of file BridgingWireHitRelationFilter.cc.

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

◆ 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 70 of file BridgingWireHitRelationFilter.cc.

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

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