Belle II Software development
SVDHoughTracking Class Referenceabstract

Main Findlet for the SVDHoughTracking. More...

#include <SVDHoughTracking.h>

Inheritance diagram for SVDHoughTracking:
Findlet<> 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

 SVDHoughTracking ()
 Constructor for adding the subfindlets.
 
 ~SVDHoughTracking ()
 Default destructor.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override
 Expose the parameters of the sub findlets.
 
void apply () override
 Function to call all the sub-findlets.
 
void beginEvent () override
 Clear the object pools.
 
virtual std::string getDescription ()
 Brief description of the purpose of the concrete 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 = TrackFindingCDC::Findlet<>
 Parent class.
 

Private Attributes

SpacePointLoaderAndPreparer m_spacePointLoaderAndPreparer
 Findlets:
 
MultiHoughSpaceFastInterceptFinder m_multiHouthSpaceInterceptFinder
 Hough Space intercept finder.
 
SingleHoughSpaceFastInterceptFinder m_singleHouthSpaceInterceptFinder
 Simple Hough Space intercept finder.
 
RawTrackCandCleaner< VXDHoughStatem_rawTCCleaner
 Raw track candidate cleaner.
 
TrackCandidateOverlapResolver m_overlapResolver
 Resolve hit overlaps in track candidates.
 
RecoTrackStorer m_recoTrackStorer
 Store tracks as RecoTracks.
 
ROIFinder m_roiFinder
 ROIFinder findlet, calculates PXD intercepts and ROIs.
 
std::vector< const SpacePoint * > m_spacePointVector
 Container to share data between findlets.
 
std::vector< VXDHoughStatem_vxdHoughStates
 Vector containing the cached hit information.
 
std::vector< std::vector< VXDHoughState * > > m_rawTrackCandidates
 Vector containing raw track candidates.
 
std::vector< SpacePointTrackCandm_trackCandidates
 A track candidate is a vector of SpacePoint, and in each event multiple track candidates will be created, which are stored in a vector themselves.
 
bool m_useMultiHoughSpaceInterceptFinding = false
 Use the elaborate FastInterceptFinder2D with multiple Hough spaces (true) or the simple one with just one Hough space (false)
 
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

Main Findlet for the SVDHoughTracking.

Definition at line 37 of file SVDHoughTracking.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 = TrackFindingCDC::Findlet<>
private

Parent class.

Definition at line 39 of file SVDHoughTracking.h.

◆ ToVector

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

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ SVDHoughTracking()

Constructor for adding the subfindlets.

Definition at line 22 of file SVDHoughTracking.cc.

23{
31}
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
SpacePointLoaderAndPreparer m_spacePointLoaderAndPreparer
Findlets:
MultiHoughSpaceFastInterceptFinder m_multiHouthSpaceInterceptFinder
Hough Space intercept finder.
RawTrackCandCleaner< VXDHoughState > m_rawTCCleaner
Raw track candidate cleaner.
SingleHoughSpaceFastInterceptFinder m_singleHouthSpaceInterceptFinder
Simple Hough Space intercept finder.
TrackCandidateOverlapResolver m_overlapResolver
Resolve hit overlaps in track candidates.
RecoTrackStorer m_recoTrackStorer
Store tracks as RecoTracks.
ROIFinder m_roiFinder
ROIFinder findlet, calculates PXD intercepts and ROIs.

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 ( )
override

Function to call all the sub-findlets.

Definition at line 71 of file SVDHoughTracking.cc.

72{
74 B2DEBUG(29, "m_vxdHoughStates.size(): " << m_vxdHoughStates.size());
75
78 } else {
80 }
81 B2DEBUG(29, "m_rawTrackCandidates.size: " << m_rawTrackCandidates.size());
82
84
85 // sort by number of hits in the track candidate and by the QI
86 std::sort(m_trackCandidates.begin(), m_trackCandidates.end(),
87 [](const SpacePointTrackCand & a, const SpacePointTrackCand & b) {
88 return ((a.getNHits() > b.getNHits()) or
89 (a.getNHits() == b.getNHits() and a.getQualityIndicator() > b.getQualityIndicator()));
90 });
91
93
95
96 // A check if or if not ROIs shall be calculated is performed within the m_roiFinder findlet to
97 // avoid creation and registration of the ROIs and PXDIntercept StoreArrays
98 // such that StoreArrays with the same name can be registered elsewhere.
100}
Storage for (VXD) SpacePoint-based track candidates.
void apply(std::vector< VXDHoughState > &hits, std::vector< std::vector< VXDHoughState * > > &rawTrackCandidates) override
Load in the prepared hits and create track candidates for further processing like hit filtering and f...
void apply(const std::vector< SpacePointTrackCand > &finalTracks) override
Function to call all the sub-findlets.
Definition: ROIFinder.cc:179
void apply(std::vector< SpacePointTrackCand > &finishedResults, const std::vector< const SpacePoint * > &spacePoints) override
Store the finishey SpacePointTrackCands into RecoTracks and tag the SpacePoints.
std::vector< VXDHoughState > m_vxdHoughStates
Vector containing the cached hit information.
std::vector< const SpacePoint * > m_spacePointVector
Container to share data between findlets.
std::vector< SpacePointTrackCand > m_trackCandidates
A track candidate is a vector of SpacePoint, and in each event multiple track candidates will be crea...
std::vector< std::vector< VXDHoughState * > > m_rawTrackCandidates
Vector containing raw track candidates.
bool m_useMultiHoughSpaceInterceptFinding
Use the elaborate FastInterceptFinder2D with multiple Hough spaces (true) or the simple one with just...
void apply(std::vector< VXDHoughState > &hits, std::vector< std::vector< VXDHoughState * > > &rawTrackCandidates) override
Load in the prepared hits and create track candidates for further processing like hit filtering and f...
void apply(std::vector< const SpacePoint * > &spacePoints, std::vector< VXDHoughState > &hits) override
Load the SVD SpacePoints and create a VXDHoughState object for each hit.
void apply(std::vector< SpacePointTrackCand > &spacePointTrackCandsToResolve) override
Reject bad SpacePointTrackCands and bad hits inside the remaining.

◆ beginEvent()

void beginEvent ( )
overridevirtual

Clear the object pools.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 57 of file SVDHoughTracking.cc.

58{
60
61 // If the capacity of a std::vector is too large, start with a fresh one.
62 // Since std::vector.shrink() or std::vector.shrink_to_fit() not necessarily reduce the capacity in the desired way,
63 // create a temporary vector of the same type and swap them to use the vector at the new location afterwards.
64 checkResizeClear<const SpacePoint*>(m_spacePointVector, 5000);
65 checkResizeClear<VXDHoughState>(m_vxdHoughStates, 5000);
66 checkResizeClear<std::vector<VXDHoughState*>>(m_rawTrackCandidates, 500);
67 checkResizeClear<SpacePointTrackCand>(m_trackCandidates, 500);
68
69}
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 
)
overridevirtual

Expose the parameters of the sub findlets.

Reimplemented from Findlet<>.

Definition at line 33 of file SVDHoughTracking.cc.

34{
35 Super::exposeParameters(moduleParamList, prefix);
36
37 m_spacePointLoaderAndPreparer.exposeParameters(moduleParamList, prefix);
39 m_singleHouthSpaceInterceptFinder.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "simple"));
40 m_rawTCCleaner.exposeParameters(moduleParamList, prefix);
41 m_overlapResolver.exposeParameters(moduleParamList, TrackFindingCDC::prefixed(prefix, "finalOverlapResolver"));
42 m_recoTrackStorer.exposeParameters(moduleParamList, prefix);
43 m_roiFinder.exposeParameters(moduleParamList, prefix);
44
45 moduleParamList->getParameter<std::string>("relationFilter").setDefaultValue("angleAndTime");
46 moduleParamList->getParameter<std::string>("twoHitFilter").setDefaultValue("twoHitVirtualIPQI");
47 moduleParamList->getParameter<std::string>("threeHitFilter").setDefaultValue("qualityIndicator");
48 moduleParamList->getParameter<std::string>("fourHitFilter").setDefaultValue("qualityIndicator");
49 moduleParamList->getParameter<std::string>("fiveHitFilter").setDefaultValue("qualityIndicator");
50
51 moduleParamList->addParameter(TrackFindingCDC::prefixed(prefix, "useMultiHoughSpaceInterceptFinding"),
53 "Use Hough spaces working on a subset of hits (=true), or just one Hough space working on all hits at the same time (=false)?",
55}
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) override
Expose the parameters of the sub findlets.
Definition: ROIFinder.cc:33
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.

◆ getDescription()

virtual std::string getDescription ( )
inlinevirtualinherited

Brief description of the purpose of the concrete findlet.

Reimplemented in CosmicsTrackMergerFindlet, TrackFinderCosmics, TrackFinder, TrackFinderAutomaton, and FindletStoreArrayInput< TWrappedFindlet >.

Definition at line 60 of file Findlet.h.

61 {
62 return "(no description)";
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_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_multiHouthSpaceInterceptFinder

MultiHoughSpaceFastInterceptFinder m_multiHouthSpaceInterceptFinder
private

Hough Space intercept finder.

Definition at line 65 of file SVDHoughTracking.h.

◆ m_overlapResolver

TrackCandidateOverlapResolver m_overlapResolver
private

Resolve hit overlaps in track candidates.

Definition at line 73 of file SVDHoughTracking.h.

◆ m_rawTCCleaner

RawTrackCandCleaner<VXDHoughState> m_rawTCCleaner
private

Raw track candidate cleaner.

Definition at line 70 of file SVDHoughTracking.h.

◆ m_rawTrackCandidates

std::vector<std::vector<VXDHoughState*> > m_rawTrackCandidates
private

Vector containing raw track candidates.

Definition at line 91 of file SVDHoughTracking.h.

◆ m_recoTrackStorer

RecoTrackStorer m_recoTrackStorer
private

Store tracks as RecoTracks.

Definition at line 76 of file SVDHoughTracking.h.

◆ m_roiFinder

ROIFinder m_roiFinder
private

ROIFinder findlet, calculates PXD intercepts and ROIs.

Definition at line 79 of file SVDHoughTracking.h.

◆ m_singleHouthSpaceInterceptFinder

SingleHoughSpaceFastInterceptFinder m_singleHouthSpaceInterceptFinder
private

Simple Hough Space intercept finder.

Definition at line 67 of file SVDHoughTracking.h.

◆ m_spacePointLoaderAndPreparer

SpacePointLoaderAndPreparer m_spacePointLoaderAndPreparer
private

Findlets:

Load SVDSpacePoints and prepare them for Hough-based tracking by calculating the conformal mapped x and y values of the 3D SpacePoint

Definition at line 62 of file SVDHoughTracking.h.

◆ m_spacePointVector

std::vector<const SpacePoint*> m_spacePointVector
private

Container to share data between findlets.

Pointers to the (const) SpacePoints as a vector

Definition at line 85 of file SVDHoughTracking.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_trackCandidates

std::vector<SpacePointTrackCand> m_trackCandidates
private

A track candidate is a vector of SpacePoint, and in each event multiple track candidates will be created, which are stored in a vector themselves.

Definition at line 95 of file SVDHoughTracking.h.

◆ m_useMultiHoughSpaceInterceptFinding

bool m_useMultiHoughSpaceInterceptFinding = false
private

Use the elaborate FastInterceptFinder2D with multiple Hough spaces (true) or the simple one with just one Hough space (false)

Definition at line 99 of file SVDHoughTracking.h.

◆ m_vxdHoughStates

std::vector<VXDHoughState> m_vxdHoughStates
private

Vector containing the cached hit information.

Definition at line 88 of file SVDHoughTracking.h.


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