Belle II Software development
SegmentTrackCombiner Class Referenceabstract

Findlet for the combination of tracks and segments. More...

#include <SegmentTrackCombiner.h>

Inheritance diagram for SegmentTrackCombiner:
Findlet< CDCSegment2D &, CDCTrack & > CompositeProcessingSignalListener ProcessingSignalListener

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

 SegmentTrackCombiner ()
 Constructor setting up the filter parameters.
 
std::string getDescription () final
 Short description of the findlet.
 
void beginEvent () final
 Signal the beginning of a new event.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters to a module.
 
void apply (std::vector< CDCSegment2D > &segments, std::vector< CDCTrack > &tracks) override
 Try to combine the segments and the tracks.
 
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< CDCSegment2D &, CDCTrack & >
 Type of the base class.
 

Private Attributes

SharingHitsMatcher< CDCTrack, CDCSegment2Dm_sharedHitsMatcher
 Matcher for creating relations between tracks and segments based on the number of shared hits.
 
CutSelector< CDCTrack, CDCSegment2Dm_selectPairsWithSharedHits
 Select only those pairs, which share at least a certain amount of hits.
 
FilterSelector< CDCTrack, CDCSegment2D, ChooseableFilter< SegmentTrackFilterFactory > > m_chooseableSegmentTrackSelector
 Reference to the chooser to be used for matching segments and tracks in the first step.
 
SingleMatchSelector< CDCTrack, CDCSegment2Dm_singleMatchSelector
 Select only the best matching segment-track relations and remove the hits from the other ones.
 
SegmentTrackAdderWithNormalization m_segmentTrackAdderWithNormalization
 Add the matched segments to tracks.
 
TrackRejecter m_trackRejecter
 Findlet to filter out fake tracks.
 
TrackNormalizer m_trackNormalizer
 Findlet for normalizing the tracks.
 
std::vector< WeightedRelation< CDCTrack, const CDCSegment2D > > m_relations
 Object pools.
 
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

Findlet for the combination of tracks and segments.

This module uses configurable filters to create matches between segments (from the local finder) and tracks (from the global finder). It also has capabilities to filter the remaining tracks for fakes and the remaining segments for new tracks/background.

Use this module at the end of the path, after you have run the local and the global track finder.

It uses several (filtering) steps, to do its job, namely:

  1. Creation of a fast segment and track lookup.
  2. First matching of segment and tracks that share one or more hits.
  3. Filtering of fake tracks in the made combinations.
  4. Cleanup of the lookup cache.

Definition at line 58 of file SegmentTrackCombiner.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<CDCSegment2D&, CDCTrack&>
private

Type of the base class.

Definition at line 62 of file SegmentTrackCombiner.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ SegmentTrackCombiner()

Constructor setting up the filter parameters.

Definition at line 21 of file SegmentTrackCombiner.cc.

22{
30
31 ModuleParamList moduleParamList;
32 const std::string prefix = "";
33 this->exposeParameters(&moduleParamList, prefix);
34 moduleParamList.getParameter<double>("sharedHitsCutValue").setDefaultValue(1.0);
35 moduleParamList.getParameter<bool>("useOnlySingleBestCandidate").setDefaultValue(false);
36 moduleParamList.getParameter<bool>("hitSelectorUseOnlySingleBestCandidate").setDefaultValue(false);
37}
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
FilterSelector< CDCTrack, CDCSegment2D, ChooseableFilter< SegmentTrackFilterFactory > > m_chooseableSegmentTrackSelector
Reference to the chooser to be used for matching segments and tracks in the first step.
CutSelector< CDCTrack, CDCSegment2D > m_selectPairsWithSharedHits
Select only those pairs, which share at least a certain amount of hits.
SingleMatchSelector< CDCTrack, CDCSegment2D > m_singleMatchSelector
Select only the best matching segment-track relations and remove the hits from the other ones.
TrackNormalizer m_trackNormalizer
Findlet for normalizing the tracks.
SegmentTrackAdderWithNormalization m_segmentTrackAdderWithNormalization
Add the matched segments to tracks.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
TrackRejecter m_trackRejecter
Findlet to filter out fake tracks.
SharingHitsMatcher< CDCTrack, CDCSegment2D > m_sharedHitsMatcher
Matcher for creating relations between tracks and segments based on the number of shared hits.
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< CDCSegment2D > &  segments,
std::vector< CDCTrack > &  tracks 
)
override

Try to combine the segments and the tracks.

Definition at line 64 of file SegmentTrackCombiner.cc.

66{
68
69 // Add a precut to add segments which are fully taken immediately at this stage
70 for (const CDCSegment2D& segment : segments) {
71 if (segment.isFullyTaken()) {
72 segment.getAutomatonCell().setTakenFlag();
73 } else {
74 segment.getAutomatonCell().unsetTakenFlag();
75 }
76 }
77
78 // After that, relations contains all pairs of segments and tracks, with the number of shared hits as weight
79 m_sharedHitsMatcher.apply(tracks, segments, m_relations);
80
81 // Require a certain (definable) amount of shared hits between segments and tracks
83
84 // Apply a (mva) filter to all combinations
86
87 // Search for the best combinations
89
90 // Add those combinations and remove all hits, that are part of other tracks (non-selected combinations)
92
93 // Reject tracks according to a (mva) filter
94 m_trackRejecter.apply(tracks);
95}
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
void apply(std::vector< WeightedRelation< CDCTrack, const CDCSegment2D > > &relations, std::vector< CDCTrack > &tracks, const std::vector< CDCSegment2D > &segment) override
Apply the findlet.
std::vector< WeightedRelation< CDCTrack, const CDCSegment2D > > m_relations
Object pools.
void apply(std::vector< CDCTrack > &tracks) final
Fit the tracks.
void apply(std::vector< CDCTrack > &tracks) final
Main algorithm.

◆ beginEvent()

void beginEvent ( )
finalvirtual

Signal the beginning of a new event.

Reimplemented from ProcessingSignalListener.

Definition at line 44 of file SegmentTrackCombiner.cc.

45{
46 m_relations.clear();
47
49}
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< CDCSegment2D &, CDCTrack & >.

Definition at line 51 of file SegmentTrackCombiner.cc.

52{
53 Super::exposeParameters(moduleParamList, prefix);
54
55 m_sharedHitsMatcher.exposeParameters(moduleParamList, prefix);
56 m_selectPairsWithSharedHits.exposeParameters(moduleParamList, prefixed(prefix, "sharedHits"));
57 m_chooseableSegmentTrackSelector.exposeParameters(moduleParamList, prefixed(prefix, "segmentTrack"));
58 m_singleMatchSelector.exposeParameters(moduleParamList, prefix);
60 m_trackRejecter.exposeParameters(moduleParamList, prefixed(prefix, "track"));
61}
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) override
Expose the parameters of the sub-findlets.
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< CDCSegment2D &, CDCTrack & >.

Definition at line 39 of file SegmentTrackCombiner.cc.

40{
41 return "Findlet for the combination of tracks and segments.";
42}

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

FilterSelector<CDCTrack, CDCSegment2D, ChooseableFilter<SegmentTrackFilterFactory> > m_chooseableSegmentTrackSelector
private

Reference to the chooser to be used for matching segments and tracks in the first step.

Definition at line 90 of file SegmentTrackCombiner.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_relations

std::vector<WeightedRelation<CDCTrack, const CDCSegment2D> > m_relations
private

Object pools.

Definition at line 105 of file SegmentTrackCombiner.h.

◆ m_segmentTrackAdderWithNormalization

SegmentTrackAdderWithNormalization m_segmentTrackAdderWithNormalization
private

Add the matched segments to tracks.

Definition at line 96 of file SegmentTrackCombiner.h.

◆ m_selectPairsWithSharedHits

CutSelector<CDCTrack, CDCSegment2D> m_selectPairsWithSharedHits
private

Select only those pairs, which share at least a certain amount of hits.

Definition at line 87 of file SegmentTrackCombiner.h.

◆ m_sharedHitsMatcher

SharingHitsMatcher<CDCTrack, CDCSegment2D> m_sharedHitsMatcher
private

Matcher for creating relations between tracks and segments based on the number of shared hits.

Definition at line 84 of file SegmentTrackCombiner.h.

◆ m_singleMatchSelector

SingleMatchSelector<CDCTrack, CDCSegment2D> m_singleMatchSelector
private

Select only the best matching segment-track relations and remove the hits from the other ones.

Definition at line 93 of file SegmentTrackCombiner.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 happened before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_trackNormalizer

TrackNormalizer m_trackNormalizer
private

Findlet for normalizing the tracks.

Definition at line 102 of file SegmentTrackCombiner.h.

◆ m_trackRejecter

TrackRejecter m_trackRejecter
private

Findlet to filter out fake tracks.

Definition at line 99 of file SegmentTrackCombiner.h.


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