Belle II Software development
AxialTrackFinderHough Class Referenceabstract

Generates axial tracks from hit using the special leaf processing inspired by the hough algorithm. More...

#include <AxialTrackFinderHough.h>

Inheritance diagram for AxialTrackFinderHough:
Findlet< const CDCWireHit, CDCTrack > 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

 AxialTrackFinderHough ()
 Constructor.
 
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 apply (const std::vector< CDCWireHit > &wireHits, std::vector< CDCTrack > &tracks) final
 Generates the tracks from the given segments into the output argument.
 
std::vector< ParameterVariantMap > getDefaultFineRelaxationSchedule () const
 Get a series of parameters to be set for each pass over the fine hough space.
 
std::vector< ParameterVariantMap > getDefaultRoughRelaxationSchedule () const
 Get a series of parameters to be set for each pass over the rough hough space.
 
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 = 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< const CDCWireHit, CDCTrack >
 Type of the base class.
 

Private Attributes

const double m_maxCurvAcceptance = 0.13
 Maximal curvature acceptance of the CDC.
 
AxialTrackCreatorHitHough m_fineHoughSearch
 First hough search over a fine hough grid.
 
AxialTrackCreatorHitHough m_roughHoughSearch
 Second hough search over a fine hough grid.
 
AxialTrackHitMigrator m_axialTrackHitMigrator
 Findlet to exchange hits between tracks based on their proximity to the respective trajectory.
 
AxialTrackMerger m_axialTrackMerger
 Findlet to merge the tracks after the hough finder.
 
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

Generates axial tracks from hit using the special leaf processing inspired by the hough algorithm.

Definition at line 33 of file AxialTrackFinderHough.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

using Super = Findlet<const CDCWireHit, CDCTrack>
private

Type of the base class.

Definition at line 37 of file AxialTrackFinderHough.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ AxialTrackFinderHough()

Constructor.

Definition at line 21 of file AxialTrackFinderHough.cc.

22 : Super()
23{
28
29 // Set default parameters of the hough spaces
31
32 ModuleParamList moduleParamList;
33 const std::string prefix = "";
34 this->exposeParameters(&moduleParamList, prefix);
35
36 // Setup the default parameters of the fine hough space
37 moduleParamList.getParameter<int>("fineGranularityLevel").setDefaultValue(12);
38 moduleParamList.getParameter<int>("fineSectorLevelSkip").setDefaultValue(2);
39 // moduleParamList.getParameter<std::vector<double>>("fineCurvBounds").setDefaultValue({ -0.018, 0.75});
40 moduleParamList.getParameter<std::vector<float>>("fineCurvBounds").setDefaultValue({{ -0.02, 0.14}});
41 moduleParamList.getParameter<int>("fineDiscretePhi0Width").setDefaultValue(19);
42 moduleParamList.getParameter<int>("fineDiscretePhi0Overlap").setDefaultValue(5);
43 moduleParamList.getParameter<int>("fineDiscreteCurvWidth").setDefaultValue(1);
44 moduleParamList.getParameter<int>("fineDiscreteCurvOverlap").setDefaultValue(-1);
45 moduleParamList.getParameter<std::vector<ParameterVariantMap>>("fineRelaxationSchedule")
46 .setDefaultValue(getDefaultFineRelaxationSchedule());
47
48 // Setup the default parameters of the rough hough space
49 moduleParamList.getParameter<int>("roughGranularityLevel").setDefaultValue(10);
50 moduleParamList.getParameter<int>("roughSectorLevelSkip").setDefaultValue(0);
51 moduleParamList.getParameter<std::vector<float>>("roughCurvBounds").setDefaultValue({{ 0.0, 0.30}});
52 moduleParamList.getParameter<int>("roughDiscretePhi0Width").setDefaultValue(19);
53 moduleParamList.getParameter<int>("roughDiscretePhi0Overlap").setDefaultValue(5);
54 moduleParamList.getParameter<int>("roughDiscreteCurvWidth").setDefaultValue(1);
55 moduleParamList.getParameter<int>("roughDiscreteCurvOverlap").setDefaultValue(-1);
56 moduleParamList.getParameter<std::vector<ParameterVariantMap>>("roughRelaxationSchedule")
57 .setDefaultValue(getDefaultRoughRelaxationSchedule());
58}
The Module parameter list class.
Findlet< const CDCWireHit, CDCTrack > Super
Type of the base class.
std::vector< ParameterVariantMap > getDefaultFineRelaxationSchedule() const
Get a series of parameters to be set for each pass over the fine hough space.
std::vector< ParameterVariantMap > getDefaultRoughRelaxationSchedule() const
Get a series of parameters to be set for each pass over the rough hough space.
AxialTrackCreatorHitHough m_roughHoughSearch
Second hough search over a fine hough grid.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
AxialTrackMerger m_axialTrackMerger
Findlet to merge the tracks after the hough finder.
AxialTrackHitMigrator m_axialTrackHitMigrator
Findlet to exchange hits between tracks based on their proximity to the respective trajectory.
AxialTrackCreatorHitHough m_fineHoughSearch
First hough search over a fine hough grid.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
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 ( const std::vector< CDCWireHit > &  wireHits,
std::vector< CDCTrack > &  tracks 
)
final

Generates the tracks from the given segments into the output argument.

Definition at line 74 of file AxialTrackFinderHough.cc.

76{
77 // Acquire the axial hits
78 std::vector<const CDCWireHit*> axialWireHits;
79 axialWireHits.reserve(wireHits.size());
80 for (const CDCWireHit& wireHit : wireHits) {
81 wireHit->unsetTemporaryFlags();
82 wireHit->unsetMaskedFlag();
83 if (not wireHit.isAxial()) continue;
84 if (wireHit->hasBackgroundFlag()) continue;
85 axialWireHits.emplace_back(&wireHit);
86 }
87
88 // Fine hough search
89 m_fineHoughSearch.apply(axialWireHits, tracks);
90
91 // One step of migrating hits between the already found tracks
92 m_axialTrackHitMigrator.apply(axialWireHits, tracks);
93
94 // Rough hough search
95 m_roughHoughSearch.apply(axialWireHits, tracks);
96
97 // One step of migrating hits between the already found tracks
98 m_axialTrackHitMigrator.apply(axialWireHits, tracks);
99
100 // Do track merging and finalization steps
101 m_axialTrackMerger.apply(tracks, axialWireHits);
102
103 // Last step of migrating hits between the already found tracks
104 m_axialTrackHitMigrator.apply(axialWireHits, tracks);
105
106}
void apply(const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &tracks) final
Generates the tracks from the given segments into the output argument.
void apply(const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &axialTracks) final
Do the hit migration.
void apply(std::vector< CDCTrack > &axialTracks, const std::vector< const CDCWireHit * > &axialWireHits) final
Merge tracks together. Allows for axial hits to be added as it may see fit.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55

◆ beginEvent()

void beginEvent ( )
overridevirtualinherited

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

Reimplemented from ProcessingSignalListener.

Reimplemented in SpacePointTagger< Belle2::CKFToPXDResult, Belle2::PXDCluster >, SpacePointTagger< Belle2::CKFToSVDResult, Belle2::SVDCluster >, BaseEventTimeExtractor< RecoTrack * >, BaseEventTimeExtractor< TrackFindingCDC::CDCWireHit & >, SharingHitsMatcher< Belle2::TrackFindingCDC::CDCTrack, Belle2::TrackFindingCDC::CDCSegment2D >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, 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 >, RecoTrackStorer, ROIFinder, and SVDHoughTracking.

Definition at line 31 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
Interface for an algorithm part that needs to receive the module processing signals.
virtual void beginEvent()
Receive 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}
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< const CDCWireHit, CDCTrack >.

Definition at line 65 of file AxialTrackFinderHough.cc.

67{
68 m_fineHoughSearch.exposeParameters(moduleParamList, prefixed("fine", prefix));
69 m_roughHoughSearch.exposeParameters(moduleParamList, prefixed("rough", prefix));
70 m_axialTrackHitMigrator.exposeParameters(moduleParamList, prefix);
71 m_axialTrackMerger.exposeParameters(moduleParamList, prefixed("merge", prefix));
72}
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.

◆ getDefaultFineRelaxationSchedule()

std::vector< ParameterVariantMap > getDefaultFineRelaxationSchedule ( ) const

Get a series of parameters to be set for each pass over the fine hough space.

Definition at line 109 of file AxialTrackFinderHough.cc.

110{
111 std::vector<ParameterVariantMap> result;
112 // Relaxation schedule of the original hough implemenation
113 // Augmented by the road search parameters
114 // Note: distinction between integer and double literals is essential
115 // For the record: the setting seem a bit non-sensical, but work kind of well, experimentation needed.
116
117 // NonCurler pass
118 result.push_back(ParameterVariantMap{
119 {"maxLevel", 10},
120 {"minWeight", 50.0},
121 {"maxCurv", 1.0 * 0.02},
122 {"curvResolution", std::string("origin")},
123 {"nRoadSearches", 1},
124 {"roadLevel", 1},
125 });
126
127 result.push_back(ParameterVariantMap{
128 {"maxLevel", 10},
129 {"minWeight", 70.0},
130 {"maxCurv", 2.0 * 0.02},
131 {"curvResolution", std::string("origin")},
132 {"nRoadSearches", 1},
133 {"roadLevel", 1},
134 });
135
136 for (double minWeight = 50.0; minWeight > 10.0; minWeight *= 0.75) {
137 result.push_back(ParameterVariantMap{
138 {"maxLevel", 10},
139 {"minWeight", minWeight},
140 {"maxCurv", 0.07},
141 {"curvResolution", std::string("origin")},
142 {"nRoadSearches", 1},
143 {"roadLevel", 1},
144 });
145 }
146
147 // NonCurlerWithIncreasedThreshold pass
148 result.push_back(ParameterVariantMap{
149 {"maxLevel", 8},
150 {"minWeight", 50.0},
151 {"maxCurv", 1.0 * 0.02},
152 {"curvResolution", std::string("nonOrigin")},
153 {"nRoadSearches", 2},
154 {"roadLevel", 1},
155 });
156
157 result.push_back(ParameterVariantMap{
158 {"maxLevel", 8},
159 {"minWeight", 70.0},
160 {"maxCurv", 2.0 * 0.02},
161 {"curvResolution", std::string("nonOrigin")},
162 {"nRoadSearches", 2},
163 {"roadLevel", 1},
164 });
165
166 result.push_back(ParameterVariantMap{
167 {"maxLevel", 8},
168 {"minWeight", 50.0},
169 {"maxCurv", 0.07},
170 {"curvResolution", std::string("nonOrigin")},
171 {"nRoadSearches", 2},
172 {"roadLevel", 1},
173 });
174
175 for (double minWeight = 37.5; minWeight > 10.0; minWeight *= 0.75) {
176 result.push_back(ParameterVariantMap{
177 {"maxLevel", 8},
178 {"minWeight", minWeight},
179 {"maxCurv", m_maxCurvAcceptance},
180 {"curvResolution", std::string("nonOrigin")},
181 {"nRoadSearches", 2},
182 {"roadLevel", 1},
183 });
184 }
185
186 return result;
187}
const double m_maxCurvAcceptance
Maximal curvature acceptance of the CDC.

◆ getDefaultRoughRelaxationSchedule()

std::vector< ParameterVariantMap > getDefaultRoughRelaxationSchedule ( ) const

Get a series of parameters to be set for each pass over the rough hough space.

Definition at line 190 of file AxialTrackFinderHough.cc.

191{
192 std::vector<ParameterVariantMap> result;
193
194 // FullRange pass
195 result.push_back(ParameterVariantMap{
196 {"maxLevel", 10},
197 {"minWeight", 50.0},
198 {"maxCurv", 1.0 * 0.02},
199 {"curvResolution", std::string("nonOrigin")},
200 {"nRoadSearches", 3},
201 {"roadLevel", 0},
202 });
203
204 result.push_back(ParameterVariantMap{
205 {"maxLevel", 10},
206 {"minWeight", 70.0},
207 {"maxCurv", 2.0 * 0.02},
208 {"curvResolution", std::string("nonOrigin")},
209 {"nRoadSearches", 3},
210 {"roadLevel", 0},
211 });
212
213 for (double minWeight = 30.0; minWeight > 10.0; minWeight *= 0.75) {
214 result.push_back(ParameterVariantMap{
215 {"maxLevel", 10},
216 {"minWeight", minWeight},
217 {"maxCurv", 0.15},
218 {"curvResolution", std::string("nonOrigin")},
219 {"nRoadSearches", 3},
220 {"roadLevel", 0},
221 });
222 }
223
224 return result;
225}

◆ getDescription()

std::string getDescription ( )
finalvirtual

Short description of the findlet.

Reimplemented from Findlet< const CDCWireHit, CDCTrack >.

Definition at line 60 of file AxialTrackFinderHough.cc.

61{
62 return "Generates axial tracks from hits using several increasingly relaxed hough space search over phi0 and curvature.";
63}

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

AxialTrackHitMigrator m_axialTrackHitMigrator
private

Findlet to exchange hits between tracks based on their proximity to the respective trajectory.

Definition at line 71 of file AxialTrackFinderHough.h.

◆ m_axialTrackMerger

AxialTrackMerger m_axialTrackMerger
private

Findlet to merge the tracks after the hough finder.

Definition at line 74 of file AxialTrackFinderHough.h.

◆ m_fineHoughSearch

AxialTrackCreatorHitHough m_fineHoughSearch
private

First hough search over a fine hough grid.

Definition at line 65 of file AxialTrackFinderHough.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_maxCurvAcceptance

const double m_maxCurvAcceptance = 0.13
private

Maximal curvature acceptance of the CDC.

Definition at line 61 of file AxialTrackFinderHough.h.

◆ m_roughHoughSearch

AxialTrackCreatorHitHough m_roughHoughSearch
private

Second hough search over a fine hough grid.

Definition at line 68 of file AxialTrackFinderHough.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: