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

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
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOVectors

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<CDCSegment2D&, CDCTrack&>
private

Type of the base class.

Definition at line 62 of file SegmentTrackCombiner.h.

◆ ToVector

using ToVector
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}
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 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 ( 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{
67 m_trackNormalizer.apply(tracks);
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}
std::vector< WeightedRelation< CDCTrack, const CDCSegment2D > > m_relations
Object pools.

◆ beginEvent()

void beginEvent ( )
finalvirtual

Signal the beginning of a new event.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 44 of file SegmentTrackCombiner.cc.

◆ 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 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);
59 m_segmentTrackAdderWithNormalization.exposeParameters(moduleParamList, prefix);
60 m_trackRejecter.exposeParameters(moduleParamList, prefixed(prefix, "track"));
61}
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)

◆ 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 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_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
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 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_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: