Belle II Software development
TrackFinderAutomaton Class Referenceabstract

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

#include <TrackFinderAutomaton.h>

Inheritance diagram for TrackFinderAutomaton:
Findlet<> CompositeProcessingSignalListener ProcessingSignalListener TrackFinderCosmics

Public Types

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

Public Member Functions

 TrackFinderAutomaton ()
 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 beginEvent () final
 Signal the beginning of a new event.
 
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 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

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.
 
TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
 Second stage cellular automaton track finder from segments.
 
TrackFlightTimeAdjuster m_trackFlightTimeAdjuster
 Adjusts the flight time of the tracks to a setable trigger point.
 
TrackExporter m_trackExporter
 Exports the generated CDCTracks as RecoTracks.
 
StoreVectorSwapper< CDCWireHit, true > m_wireHitsSwapper {"CDCWireHitVector"}
 Puts the internal segments on the DataStore.
 
StoreVectorSwapper< CDCSegment2Dm_segmentsSwapper {"CDCSegment2DVector"}
 Puts the internal segments on the DataStore.
 
StoreVectorSwapper< CDCTrackm_tracksSwapper {"CDCTrackVector"}
 Puts the internal segments on the DataStore.
 
std::vector< CDCWireHitm_wireHits
 Memory for the wire hits.
 
std::vector< CDCWireHitClusterm_clusters
 Memory for the wire hits cluster.
 
std::vector< CDCWireHitClusterm_superClusters
 Memory for the wire hits super clusters.
 
std::vector< CDCSegment2Dm_segments
 Memory for the segments.
 
std::vector< CDCTrackm_tracks
 Memory for the tracks.
 
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

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

Definition at line 32 of file TrackFinderAutomaton.h.

Member Typedef Documentation

◆ IOTypes

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

Types that should be served to apply on invocation.

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

Definition at line 53 of file Findlet.h.

◆ Super

using Super = Findlet<>
private

Type of the base class.

Definition at line 36 of file TrackFinderAutomaton.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ TrackFinderAutomaton()

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

Definition at line 18 of file TrackFinderAutomaton.cc.

19{
23
30
31 ModuleParamList moduleParamList;
32 const std::string prefix = "";
33 this->exposeParameters(&moduleParamList, prefix);
34 moduleParamList.getParameter<std::string>("flightTimeEstimation").setDefaultValue("outwards");
35 moduleParamList.getParameter<std::string>("TrackOrientation").setDefaultValue("outwards");
36
37 // Mimics earlier behaviour
38 moduleParamList.getParameter<bool>("WriteSegments").setDefaultValue(true);
39
40 m_wireHits.reserve(1000);
41 m_clusters.reserve(100);
42 m_superClusters.reserve(100);
43 m_segments.reserve(100);
44 m_tracks.reserve(20);
45}
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.
TrackExporter m_trackExporter
Exports the generated CDCTracks as RecoTracks.
WireHitPreparer m_wireHitPreparer
Preparation findlet creating the wire hits from the packed CDCHits.
std::vector< CDCWireHitCluster > m_superClusters
Memory for the wire hits super clusters.
StoreVectorSwapper< CDCWireHit, true > m_wireHitsSwapper
Puts the internal segments on the DataStore.
StoreVectorSwapper< CDCTrack > m_tracksSwapper
Puts the internal segments on the DataStore.
std::vector< CDCWireHit > m_wireHits
Memory for the wire hits.
StoreVectorSwapper< CDCSegment2D > m_segmentsSwapper
Puts the internal segments on the DataStore.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
Second stage cellular automaton track finder from segments.
ClusterPreparer m_clusterPreparer
Preparation findlet creating the clusters wire hits forming locally connected groups.
std::vector< CDCWireHitCluster > m_clusters
Memory for the wire hits cluster.
std::vector< CDCSegment2D > m_segments
Memory for the segments.
std::vector< CDCTrack > m_tracks
Memory for the tracks.
TrackFlightTimeAdjuster m_trackFlightTimeAdjuster
Adjusts the flight time of the tracks to a setable trigger point.
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 76 of file TrackFinderAutomaton.cc.

77{
78 // Acquire the wire hits, segments and tracks from the DataStore in case they have already been created
82
89
90 // Put the segments and tracks on the DataStore
94}
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< 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.
void apply(std::vector< CDCTrack > &tracks) final
Adjust the flight time of the given tracks.
void apply(std::vector< CDCWireHit > &outputWireHits) final
Main function preparing the wire hits.

◆ beginEvent()

void beginEvent ( )
finalvirtual

Signal the beginning of a new event.

Reimplemented from ProcessingSignalListener.

Definition at line 66 of file TrackFinderAutomaton.cc.

67{
68 m_wireHits.clear();
69 m_clusters.clear();
70 m_superClusters.clear();
71 m_segments.clear();
72 m_tracks.clear();
74}
void beginEvent() override
Receive and dispatch 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}
Interface for an algorithm part that needs to receive the module processing signals.
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 52 of file TrackFinderAutomaton.cc.

53{
54 m_wireHitsSwapper.exposeParameters(moduleParamList, prefix);
55 m_segmentsSwapper.exposeParameters(moduleParamList, prefix);
56 m_tracksSwapper.exposeParameters(moduleParamList, prefix);
57
58 m_wireHitPreparer.exposeParameters(moduleParamList, prefix);
59 m_clusterPreparer.exposeParameters(moduleParamList, prefix);
60 m_segmentFinderFacetAutomaton.exposeParameters(moduleParamList, prefix);
62 m_trackFlightTimeAdjuster.exposeParameters(moduleParamList, prefix);
63 m_trackExporter.exposeParameters(moduleParamList, prefix);
64}
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:69
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.
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.

◆ getDescription()

std::string getDescription ( )
overridevirtual

Short description of the findlet.

Reimplemented from Findlet<>.

Reimplemented in TrackFinderCosmics.

Definition at line 47 of file TrackFinderAutomaton.cc.

48{
49 return "Performs pattern recognition in the CDC based on local hit following and application of a cellular automaton in two stages.";
50}

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

ClusterPreparer m_clusterPreparer
private

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

Definition at line 60 of file TrackFinderAutomaton.h.

◆ m_clusters

std::vector<CDCWireHitCluster> m_clusters
private

Memory for the wire hits cluster.

Definition at line 88 of file TrackFinderAutomaton.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_segmentFinderFacetAutomaton

SegmentFinderFacetAutomaton m_segmentFinderFacetAutomaton
private

First stage cellular automaton segment finder.

Definition at line 63 of file TrackFinderAutomaton.h.

◆ m_segments

std::vector<CDCSegment2D> m_segments
private

Memory for the segments.

Definition at line 94 of file TrackFinderAutomaton.h.

◆ m_segmentsSwapper

StoreVectorSwapper<CDCSegment2D> m_segmentsSwapper {"CDCSegment2DVector"}
private

Puts the internal segments on the DataStore.

Definition at line 78 of file TrackFinderAutomaton.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_superClusters

std::vector<CDCWireHitCluster> m_superClusters
private

Memory for the wire hits super clusters.

Definition at line 91 of file TrackFinderAutomaton.h.

◆ m_terminated

bool m_terminated = false
privateinherited

Flag to keep track whether termination happened before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_trackExporter

TrackExporter m_trackExporter
private

Exports the generated CDCTracks as RecoTracks.

Definition at line 72 of file TrackFinderAutomaton.h.

◆ m_trackFinderSegmentPairAutomaton

TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
private

Second stage cellular automaton track finder from segments.

Definition at line 66 of file TrackFinderAutomaton.h.

◆ m_trackFlightTimeAdjuster

TrackFlightTimeAdjuster m_trackFlightTimeAdjuster
private

Adjusts the flight time of the tracks to a setable trigger point.

Definition at line 69 of file TrackFinderAutomaton.h.

◆ m_tracks

std::vector<CDCTrack> m_tracks
private

Memory for the tracks.

Definition at line 97 of file TrackFinderAutomaton.h.

◆ m_tracksSwapper

StoreVectorSwapper<CDCTrack> m_tracksSwapper {"CDCTrackVector"}
private

Puts the internal segments on the DataStore.

Definition at line 81 of file TrackFinderAutomaton.h.

◆ m_wireHitPreparer

WireHitPreparer m_wireHitPreparer
private

Preparation findlet creating the wire hits from the packed CDCHits.

Definition at line 57 of file TrackFinderAutomaton.h.

◆ m_wireHits

std::vector<CDCWireHit> m_wireHits
private

Memory for the wire hits.

Definition at line 85 of file TrackFinderAutomaton.h.

◆ m_wireHitsSwapper

StoreVectorSwapper<CDCWireHit, true> m_wireHitsSwapper {"CDCWireHitVector"}
private

Puts the internal segments on the DataStore.

Definition at line 75 of file TrackFinderAutomaton.h.


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