Belle II Software development
SegmentFinderFacetAutomaton Class Referenceabstract

Findlet implementing the segment finding part of the full track finder. More...

#include <SegmentFinderFacetAutomaton.h>

Inheritance diagram for SegmentFinderFacetAutomaton:
Findlet< CDCWireHitCluster &, CDCSegment2D > 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

 SegmentFinderFacetAutomaton ()
 Constructor registering the subordinary findlets to the processing signal distribution machinery.
 
std::string getDescription () final
 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 (std::vector< CDCWireHitCluster > &clusters, std::vector< CDCSegment2D > &outputSegments) final
 Generates the segment from wire hits.
 
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< CDCWireHitCluster &, CDCSegment2D >
 Type of the base class.
 

Private Attributes

FacetCreator m_facetCreator
 Creates the facet (hit triplet) cells of the cellular automaton.
 
WeightedRelationCreator< const CDCFacet, ChooseableFacetRelationFilterm_facetRelationCreator
 Creates the facet (hit triplet) relations of the cellular automaton.
 
SegmentCreatorFacetAutomaton m_segmentCreatorFacetAutomaton
 Find the segments by composition of facets path from a cellular automaton.
 
SegmentFitter m_segmentFitter
 Fits the generated segments.
 
SegmentAliasResolver m_segmentAliasResolver
 Resolves ambiguous right left information alias segments and hits.
 
SegmentOrienter m_segmentOrienter
 Adjustes the orientation of the generated segments to a prefered direction of flight.
 
SegmentLinker m_segmentLinker
 Link segments with closeby segments of the same super cluster.
 
StoreVectorSwapper< CDCFacetm_facetSwapper {"CDCFacetVector"}
 Puts the internal facets on the DataStore.
 
std::vector< CDCFacetm_facets
 Memory for the generated facets.
 
std::vector< WeightedRelation< const CDCFacet > > m_facetRelations
 Memory for the generated facet relations.
 
std::vector< CDCSegment2Dm_segments
 Memory for the reconstructed segments.
 
std::vector< CDCSegment2Dm_intermediateSegments
 Memory for the reconstructed segments.
 
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

Findlet implementing the segment finding part of the full track finder.

Definition at line 36 of file SegmentFinderFacetAutomaton.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

Type of the base class.

Definition at line 40 of file SegmentFinderFacetAutomaton.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ SegmentFinderFacetAutomaton()

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

Definition at line 18 of file SegmentFinderFacetAutomaton.cc.

19{
24
28
30
31 m_facets.reserve(1000);
32 m_facetRelations.reserve(1000);
33 m_segments.reserve(200);
34 m_intermediateSegments.reserve(200);
35
36 ModuleParamList moduleParamList;
37 const std::string prefix = "";
38 this->exposeParameters(&moduleParamList, prefix);
39 moduleParamList.getParameter<std::string>("SegmentOrientation").setDefaultValue("curling");
40}
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
SegmentLinker m_segmentLinker
Link segments with closeby segments of the same super cluster.
SegmentAliasResolver m_segmentAliasResolver
Resolves ambiguous right left information alias segments and hits.
SegmentOrienter m_segmentOrienter
Adjustes the orientation of the generated segments to a prefered direction of flight.
SegmentFitter m_segmentFitter
Fits the generated segments.
std::vector< WeightedRelation< const CDCFacet > > m_facetRelations
Memory for the generated facet relations.
SegmentCreatorFacetAutomaton m_segmentCreatorFacetAutomaton
Find the segments by composition of facets path from a cellular automaton.
FacetCreator m_facetCreator
Creates the facet (hit triplet) cells of the cellular automaton.
std::vector< CDCFacet > m_facets
Memory for the generated facets.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
WeightedRelationCreator< const CDCFacet, ChooseableFacetRelationFilter > m_facetRelationCreator
Creates the facet (hit triplet) relations of the cellular automaton.
std::vector< CDCSegment2D > m_intermediateSegments
Memory for the reconstructed segments.
std::vector< CDCSegment2D > m_segments
Memory for the reconstructed segments.
StoreVectorSwapper< CDCFacet > m_facetSwapper
Puts the internal facets on the DataStore.
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 ( std::vector< CDCWireHitCluster > &  clusters,
std::vector< CDCSegment2D > &  outputSegments 
)
final

Generates the segment from wire hits.

Definition at line 70 of file SegmentFinderFacetAutomaton.cc.

71{
72 outputSegments.reserve(200);
73
74 m_facetCreator.apply(clusters, m_facets);
75
76 std::vector<const CDCFacet*> facetPtrs = as_pointers<const CDCFacet>(m_facets);
78 if (m_facetRelations.size() == 0) return; // Break point for facet recording runs
79
82
85
88
90 m_segmentFitter.apply(outputSegments);
91 m_segmentFitter.apply(outputSegments);
92
93 // Move facets to the DataStore
95}
void apply(const std::vector< CDCWireHitCluster > &inputClusters, std::vector< CDCFacet > &facets) final
Central function creating the hit triplets from the clusters.
Definition: FacetCreator.cc:58
void apply(std::vector< CDCSegment2D > &outputSegments) final
Main algorithm applying the fit to each segment.
void apply(const std::vector< CDCFacet > &inputFacets, const std::vector< WeightedRelation< const CDCFacet > > &inputFacetRelations, std::vector< CDCSegment2D > &outputSegments) final
Main function of the segment finding by the cellular automaton.
void apply(std::vector< CDCSegment2D > &outputSegments) override
Main algorithm applying the fit to each segment.
void apply(const std::vector< CDCSegment2D > &inputSegment2Ds, std::vector< CDCSegment2D > &outputSegment2Ds) final
Main algorithm.
void apply(const std::vector< CDCSegment2D > &inputSegments, std::vector< CDCSegment2D > &outputSegments) final
Main algorithm applying the adjustment of the orientation.

◆ beginEvent()

void beginEvent ( )
finalvirtual

Signal the beginning of a new event.

Reimplemented from ProcessingSignalListener.

Definition at line 61 of file SegmentFinderFacetAutomaton.cc.

62{
63 m_facets.clear();
64 m_facetRelations.clear();
65 m_segments.clear();
68}
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< CDCWireHitCluster &, CDCSegment2D >.

Definition at line 47 of file SegmentFinderFacetAutomaton.cc.

48{
49 m_facetCreator.exposeParameters(moduleParamList, prefixed(prefix, "Facet"));
50 m_facetRelationCreator.exposeParameters(moduleParamList, prefixed(prefix, "FacetRelation"));
51 m_segmentCreatorFacetAutomaton.exposeParameters(moduleParamList, prefix);
52 m_segmentLinker.exposeParameters(moduleParamList, prefixed(prefix, "SegmentRelation"));
53
54 m_segmentFitter.exposeParameters(moduleParamList, prefix);
55 m_segmentAliasResolver.exposeParameters(moduleParamList, prefix);
56 m_segmentOrienter.exposeParameters(moduleParamList, prefix);
57
58 m_facetSwapper.exposeParameters(moduleParamList, prefix);
59}
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Definition: FacetCreator.cc:40
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) override
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 ( )
finalvirtual

Short description of the findlet.

Reimplemented from Findlet< CDCWireHitCluster &, CDCSegment2D >.

Definition at line 42 of file SegmentFinderFacetAutomaton.cc.

43{
44 return "Generates segments from hits using a cellular automaton build from hit triples (facets).";
45}

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

FacetCreator m_facetCreator
private

Creates the facet (hit triplet) cells of the cellular automaton.

Definition at line 61 of file SegmentFinderFacetAutomaton.h.

◆ m_facetRelationCreator

WeightedRelationCreator<const CDCFacet, ChooseableFacetRelationFilter> m_facetRelationCreator
private

Creates the facet (hit triplet) relations of the cellular automaton.

Definition at line 64 of file SegmentFinderFacetAutomaton.h.

◆ m_facetRelations

std::vector<WeightedRelation<const CDCFacet> > m_facetRelations
private

Memory for the generated facet relations.

Definition at line 89 of file SegmentFinderFacetAutomaton.h.

◆ m_facets

std::vector<CDCFacet> m_facets
private

Memory for the generated facets.

Definition at line 86 of file SegmentFinderFacetAutomaton.h.

◆ m_facetSwapper

StoreVectorSwapper<CDCFacet> m_facetSwapper {"CDCFacetVector"}
private

Puts the internal facets on the DataStore.

Definition at line 82 of file SegmentFinderFacetAutomaton.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_intermediateSegments

std::vector<CDCSegment2D> m_intermediateSegments
private

Memory for the reconstructed segments.

Definition at line 95 of file SegmentFinderFacetAutomaton.h.

◆ m_segmentAliasResolver

SegmentAliasResolver m_segmentAliasResolver
private

Resolves ambiguous right left information alias segments and hits.

Definition at line 73 of file SegmentFinderFacetAutomaton.h.

◆ m_segmentCreatorFacetAutomaton

SegmentCreatorFacetAutomaton m_segmentCreatorFacetAutomaton
private

Find the segments by composition of facets path from a cellular automaton.

Definition at line 67 of file SegmentFinderFacetAutomaton.h.

◆ m_segmentFitter

SegmentFitter m_segmentFitter
private

Fits the generated segments.

Definition at line 70 of file SegmentFinderFacetAutomaton.h.

◆ m_segmentLinker

SegmentLinker m_segmentLinker
private

Link segments with closeby segments of the same super cluster.

Definition at line 79 of file SegmentFinderFacetAutomaton.h.

◆ m_segmentOrienter

SegmentOrienter m_segmentOrienter
private

Adjustes the orientation of the generated segments to a prefered direction of flight.

Definition at line 76 of file SegmentFinderFacetAutomaton.h.

◆ m_segments

std::vector<CDCSegment2D> m_segments
private

Memory for the reconstructed segments.

Definition at line 92 of file SegmentFinderFacetAutomaton.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.


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