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
 Types that should be served to apply on invocation.
 
using IOTypes
 Types that should be served to apply on invocation.
 
using IOVectors
 Vector types that should be served to apply on invocation.
 
using IOVectors
 Vector types that should be served to apply on invocation.
 

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
 Short hand for ToRangeImpl.
 
using ToVector
 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
 Associate 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
 Flag to keep track whether initialization happened before.
 
bool m_terminated
 Flag to keep track whether termination happened 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 [1/2]

using IOTypes
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOTypes [2/2]

using IOTypes
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOVectors [1/2]

using IOVectors
inherited

Vector types that should be served to apply on invocation.

Definition at line 53 of file Findlet.h.

◆ IOVectors [2/2]

using IOVectors
inherited

Vector types that should be served to apply on invocation.

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 [1/2]

using ToVector
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

◆ ToVector [2/2]

using ToVector
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}
void addProcessingSignalListener(ProcessingSignalListener *psl)
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
Associate the stereo hits that best match to the axial tracks.
Definition TrackFinder.h:76
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 53 of file CompositeProcessingSignalListener.cc.

56{
58}
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26

◆ 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
118 m_finalTrackQualityAsserter.apply(m_tracks);
119
120 if (m_param_withCA) {
121 m_trackCreatorSingleSegments.apply(m_segments, m_tracks);
122 }
123
124 m_trackExporter.apply(m_tracks);
125}
bool m_param_withCA
Parameter: Activate the combination of the local segment linking.
Definition TrackFinder.h:56

◆ beginEvent()

void beginEvent ( )
overrideinherited

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

Definition at line 36 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
void beginEvent() override
Receive and dispatch signal for the start of a new event.
virtual void beginEvent()
Receive signal for the start of a new event.

◆ beginRun()

void beginRun ( )
overrideinherited

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

Definition at line 33 of file CompositeProcessingSignalListener.cc.

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

◆ endRun()

void endRun ( )
overrideinherited

Receive and dispatch signal for the end of the run.

Definition at line 39 of file CompositeProcessingSignalListener.cc.

40{
42 psl->endRun();
43 }
45}
void endRun() override
Receive and dispatch signal for the end of the run.
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 CompositeProcessingSignalListener.

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 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 56 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
overrideinherited

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

Definition at line 30 of file CompositeProcessingSignalListener.cc.

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

◆ terminate()

void terminate ( )
overrideinherited

Receive and dispatch Signal for termination of the event processing.

Definition at line 42 of file CompositeProcessingSignalListener.cc.

48{
50 psl->terminate();
51 }
53}
void terminate() override
Receive and dispatch Signal for termination of the event processing.
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
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_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

Associate 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 60 of file CompositeProcessingSignalListener.h.

◆ m_terminated

bool m_terminated
privateinherited

Flag to keep track whether termination happened 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: