Belle II Software development
TrackFinder Class Referenceabstract

Complete findlet implementing track finding with the cellular automaton in two stages. More...

#include <TrackFinder.h>

Inheritance diagram for TrackFinder:
Findlet<> CompositeProcessingSignalListener ProcessingSignalListener

Public Types

using IOTypes = std::tuple< AIOTypes... >
 Types that should be served to apply on invokation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invokation.
 

Public Member Functions

 TrackFinder ()
 Constructor registering the subordinary findlets to the processing signal distribution machinery.
 
std::string getDescription () override
 Short description of the findlet.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters to a module.
 
void apply () final
 Execute the findlet.
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
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 Types

using ToVector = typename ToVectorImpl< T >::Type
 Short hand for ToRangeImpl.
 

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 = Findlet<>
 Type of the base class.
 

Private Attributes

bool m_param_withCA = false
 Parameter: Activate the combination of the local segment linking.
 
WireHitPreparer m_wireHitPreparer
 Preparation findlet creating the wire hits from the packed CDCHits.
 
ClusterPreparer m_clusterPreparer
 Preparation findlet creating the clusters wire hits forming locally connected groups.
 
SegmentFinderFacetAutomaton m_segmentFinderFacetAutomaton
 First stage cellular automaton segment finder.
 
AxialTrackFinderLegendre m_axialTrackFinderLegendre
 Axial track finder.
 
TrackQualityAsserter m_trackQualityAsserter
 Improve the quality of the axial tracks.
 
StereoHitFinder m_stereoHitFinder
 Assoziate the stereo hits that best match to the axial tracks.
 
SegmentTrackCombiner m_segmentTrackCombiner
 Join the matching segments into the tracks.
 
TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
 Second stage cellular automaton track finder from segments.
 
TrackCombiner m_trackCombiner
 Combine the tracks from the global search with the tracks from the local search.
 
TrackQualityAsserter m_finalTrackQualityAsserter
 Final track quality assertions.
 
TrackCreatorSingleSegments m_trackCreatorSingleSegments
 Add tracks from the first super layer that are contained with in the first super layer.
 
TrackExporter m_trackExporter
 Exports the generated CDCTracks as RecoTracks.
 
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 happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

Complete findlet implementing track finding with the cellular automaton in two stages.

Definition at line 35 of file TrackFinder.h.

Member Typedef Documentation

◆ IOTypes

using IOTypes = std::tuple<AIOTypes...>
inherited

Types that should be served to apply on invokation.

Definition at line 30 of file Findlet.h.

◆ IOVectors

using IOVectors = std::tuple< std::vector<AIOTypes>... >
inherited

Vector types that should be served to apply on invokation.

Definition at line 53 of file Findlet.h.

◆ Super

using Super = Findlet<>
private

Type of the base class.

Definition at line 39 of file TrackFinder.h.

◆ ToVector

using ToVector = typename ToVectorImpl<T>::Type
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ TrackFinder()

Constructor registering the subordinary findlets to the processing signal distribution machinery.

Definition at line 18 of file TrackFinder.cc.

19{
23
26
29
32
36
37 const std::string prefix = "";
38 // Setup m_wireHitPreparer
39 {
40 ModuleParamList moduleParamList;
41 m_wireHitPreparer.exposeParameters(&moduleParamList, prefix);
42
43 moduleParamList.getParameter<std::string>("flightTimeEstimation").setDefaultValue("outwards");
44 }
45
46 // Setup m_trackQualityAsserter
47 {
48 ModuleParamList moduleParamList;
49 m_trackQualityAsserter.exposeParameters(&moduleParamList, prefix);
50
51 std::vector<std::string> corrections({"B2B"});
52 moduleParamList.getParameter<std::vector<std::string>>("corrections")
53 .setDefaultValue(corrections);
54 }
55
56 // Setup m_finalTrackQualityAsserter
57 {
58 ModuleParamList moduleParamList;
59 m_finalTrackQualityAsserter.exposeParameters(&moduleParamList, prefix);
60
61 std::vector<std::string> corrections({"LayerBreak", "OneSuperlayer", "Small"});
62 moduleParamList.getParameter<std::vector<std::string>>("corrections")
63 .setDefaultValue(corrections);
64 }
65}
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
SegmentFinderFacetAutomaton m_segmentFinderFacetAutomaton
First stage cellular automaton segment finder.
Definition: TrackFinder.h:67
TrackExporter m_trackExporter
Exports the generated CDCTracks as RecoTracks.
Definition: TrackFinder.h:94
WireHitPreparer m_wireHitPreparer
Preparation findlet creating the wire hits from the packed CDCHits.
Definition: TrackFinder.h:61
SegmentTrackCombiner m_segmentTrackCombiner
Join the matching segments into the tracks.
Definition: TrackFinder.h:79
TrackCreatorSingleSegments m_trackCreatorSingleSegments
Add tracks from the first super layer that are contained with in the first super layer.
Definition: TrackFinder.h:91
AxialTrackFinderLegendre m_axialTrackFinderLegendre
Axial track finder.
Definition: TrackFinder.h:70
TrackCombiner m_trackCombiner
Combine the tracks from the global search with the tracks from the local search.
Definition: TrackFinder.h:85
TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
Second stage cellular automaton track finder from segments.
Definition: TrackFinder.h:82
TrackQualityAsserter m_trackQualityAsserter
Improve the quality of the axial tracks.
Definition: TrackFinder.h:73
ClusterPreparer m_clusterPreparer
Preparation findlet creating the clusters wire hits forming locally connected groups.
Definition: TrackFinder.h:64
TrackQualityAsserter m_finalTrackQualityAsserter
Final track quality assertions.
Definition: TrackFinder.h:88
StereoHitFinder m_stereoHitFinder
Assoziate the stereo hits that best match to the axial tracks.
Definition: TrackFinder.h:76
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.

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.

◆ apply()

void apply ( )
final

Execute the findlet.

Definition at line 85 of file TrackFinder.cc.

86{
87 // Reserve some space for the created objects.
88 std::vector<CDCWireHit> m_wireHits;
89 std::vector<CDCWireHitCluster> m_clusters;
90 std::vector<CDCWireHitCluster> m_superClusters;
91 std::vector<CDCSegment2D> m_segments;
92 std::vector<CDCTrack> m_axialTracks;
93 std::vector<CDCTrack> m_tracks;
94 m_wireHits.reserve(2000);
95 m_clusters.reserve(200);
96 m_superClusters.reserve(100);
97 m_segments.reserve(200);
98 m_axialTracks.reserve(30);
99 m_tracks.reserve(30);
100
101 m_wireHitPreparer.apply(m_wireHits);
102 m_clusterPreparer.apply(m_wireHits, m_clusters, m_superClusters);
103 m_segmentFinderFacetAutomaton.apply(m_clusters, m_segments);
104
105 m_axialTrackFinderLegendre.apply(m_wireHits, m_axialTracks);
106 m_trackQualityAsserter.apply(m_axialTracks);
107
108 m_stereoHitFinder.apply(m_wireHits, m_axialTracks);
109 m_segmentTrackCombiner.apply(m_segments, m_axialTracks);
110
111 if (m_param_withCA) {
112 m_trackFinderSegmentPairAutomaton.apply(m_segments, m_tracks);
113 m_trackCombiner.apply(m_axialTracks, m_tracks, m_tracks);
114 } else {
115 m_tracks.swap(m_axialTracks);
116 }
117
119
120 if (m_param_withCA) {
121 m_trackCreatorSingleSegments.apply(m_segments, m_tracks);
122 }
123
124 m_trackExporter.apply(m_tracks);
125}
void apply(const std::vector< CDCWireHit > &wireHits, std::vector< CDCTrack > &tracks)
Main method to apply the track finding.
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCWireHitCluster > &clusters, std::vector< CDCWireHitCluster > &superClusters) final
Generates the segment from wire hits.
void apply(std::vector< CDCWireHitCluster > &clusters, std::vector< CDCSegment2D > &outputSegments) final
Generates the segment from wire hits.
void apply(std::vector< CDCSegment2D > &segments, std::vector< CDCTrack > &tracks) override
Try to combine the segments and the tracks.
void apply(std::vector< CDCWireHit > &inputWireHits, std::vector< CDCTrack > &tracks) final
Generates the segment from wire hits.
void apply(const std::vector< CDCTrack > &inputTracks, const std::vector< CDCTrack > &secondInputTracks, std::vector< CDCTrack > &tracks) final
Main algorithm.
void apply(const std::vector< CDCSegment2D > &segments, std::vector< CDCTrack > &tracks) final
Main algorithm.
void apply(std::vector< CDCTrack > &tracks) final
Write give tracks into track store array.
void apply(const std::vector< CDCSegment2D > &inputSegments, std::vector< CDCTrack > &tracks) final
Generates the tracks from segments.
bool m_param_withCA
Parameter: Activate the combination of the local segment linking.
Definition: TrackFinder.h:56
void apply(std::vector< CDCTrack > &tracks) final
Main function to clean up the tracks.
void apply(std::vector< CDCWireHit > &outputWireHits) final
Main function preparing the wire hits.

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

◆ exposeParameters()

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

Expose the parameters to a module.

Reimplemented from Findlet<>.

Definition at line 73 of file TrackFinder.cc.

74{
75 // Expose a selection of the parameters
76 m_wireHitPreparer.exposeParameters(moduleParamList, prefix);
77 m_trackExporter.exposeParameters(moduleParamList, prefix);
78
79 moduleParamList->addParameter("withCA",
81 "Also run the segment linking track finder and combine results.",
83}
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.

◆ getDescription()

std::string getDescription ( )
overridevirtual

Short description of the findlet.

Reimplemented from Findlet<>.

Definition at line 67 of file TrackFinder.cc.

68{
69 return "Combined track finder using the global legendre finder as well as the cellular automaton "
70 "track finder.";
71}

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

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

Member Data Documentation

◆ m_axialTrackFinderLegendre

AxialTrackFinderLegendre m_axialTrackFinderLegendre
private

Axial track finder.

Definition at line 70 of file TrackFinder.h.

◆ m_clusterPreparer

ClusterPreparer m_clusterPreparer
private

Preparation findlet creating the clusters wire hits forming locally connected groups.

Definition at line 64 of file TrackFinder.h.

◆ m_finalTrackQualityAsserter

TrackQualityAsserter m_finalTrackQualityAsserter
private

Final track quality assertions.

Definition at line 88 of file TrackFinder.h.

◆ m_initialized

bool m_initialized = false
privateinherited

Flag to keep track whether initialization happend 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_param_withCA

bool m_param_withCA = false
private

Parameter: Activate the combination of the local segment linking.

Definition at line 56 of file TrackFinder.h.

◆ m_segmentFinderFacetAutomaton

SegmentFinderFacetAutomaton m_segmentFinderFacetAutomaton
private

First stage cellular automaton segment finder.

Definition at line 67 of file TrackFinder.h.

◆ m_segmentTrackCombiner

SegmentTrackCombiner m_segmentTrackCombiner
private

Join the matching segments into the tracks.

Definition at line 79 of file TrackFinder.h.

◆ m_stereoHitFinder

StereoHitFinder m_stereoHitFinder
private

Assoziate the stereo hits that best match to the axial tracks.

Definition at line 76 of file TrackFinder.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 happend before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_trackCombiner

TrackCombiner m_trackCombiner
private

Combine the tracks from the global search with the tracks from the local search.

Definition at line 85 of file TrackFinder.h.

◆ m_trackCreatorSingleSegments

TrackCreatorSingleSegments m_trackCreatorSingleSegments
private

Add tracks from the first super layer that are contained with in the first super layer.

Definition at line 91 of file TrackFinder.h.

◆ m_trackExporter

TrackExporter m_trackExporter
private

Exports the generated CDCTracks as RecoTracks.

Definition at line 94 of file TrackFinder.h.

◆ m_trackFinderSegmentPairAutomaton

TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
private

Second stage cellular automaton track finder from segments.

Definition at line 82 of file TrackFinder.h.

◆ m_trackQualityAsserter

TrackQualityAsserter m_trackQualityAsserter
private

Improve the quality of the axial tracks.

Definition at line 73 of file TrackFinder.h.

◆ m_wireHitPreparer

WireHitPreparer m_wireHitPreparer
private

Preparation findlet creating the wire hits from the packed CDCHits.

Definition at line 61 of file TrackFinder.h.


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