Belle II Software development
AxialStraightTrackCreator Class Referenceabstract

A findlet that searches for straight tracks in CDC coming form IP to an ECL cluster. More...

#include <AxialStraightTrackCreator.h>

Inheritance diagram for AxialStraightTrackCreator:
Findlet< const ECLCluster *const, const CDCWireHit *const, 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

 AxialStraightTrackCreator ()
 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 initialize () final
 Initialisation before the event processing starts.
 
void apply (const std::vector< const ECLCluster * > &eclClusters, const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &tracks) final
 Execute one pass over given clusters and wirehits and create tracks.
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
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
 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 ECLCluster* const, const CDCWireHit* const, CDCTrack>
 Type of the base class.
 

Private Member Functions

std::vector< const CDCWireHit * > search (const std::vector< const CDCWireHit * > &axialWireHits, const CDCTrajectory2D &guidingTrajectory2D)
 Search for hits compatible with given trajectory.
 

Private Attributes

float m_param_minEnergy = 0.050
 ECL cluster energy threshold.
 
unsigned int m_param_minNHits = 5
 Track number of hits threshold.
 
float m_param_maxDistance = 0.5
 Maximum distance from hits to the track.
 
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

A findlet that searches for straight tracks in CDC coming form IP to an ECL cluster.

Definition at line 28 of file AxialStraightTrackCreator.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<const ECLCluster* const, const CDCWireHit* const, CDCTrack>
private

Type of the base class.

Definition at line 32 of file AxialStraightTrackCreator.h.

◆ ToVector

using ToVector
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

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< const ECLCluster * > & eclClusters,
const std::vector< const CDCWireHit * > & axialWireHits,
std::vector< CDCTrack > & tracks )
final

Execute one pass over given clusters and wirehits and create tracks.

Definition at line 56 of file AxialStraightTrackCreator.cc.

59{
60 for (const ECLCluster* cluster : eclClusters) {
61 if (!cluster->hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)) continue;
62 if (cluster->getEnergy(ECLCluster::EHypothesisBit::c_nPhotons) < m_param_minEnergy) continue;
63 float phi = cluster->getPhi();
64 UncertainPerigeeCircle circle(0, Vector2D::Phi(phi), 0); //no covariance matrix (yet?)
65 CDCTrajectory2D guidingTrajectory2D(circle);
66 CDCTrack track;
67 guidingTrajectory2D.setLocalOrigin(Vector2D(0, 0));
68 std::vector<const CDCWireHit*> foundHits = search(axialWireHits, guidingTrajectory2D);
69 if (foundHits.size() < m_param_minNHits) continue;
70 // Fit trajectory
71 const CDCRiemannFitter& fitter = CDCRiemannFitter::getFitter(true, true);
72 CDCTrajectory2D trajectory2D = fitter.fit(foundHits);
73 track.setStartTrajectory3D(CDCTrajectory3D(trajectory2D, CDCTrajectorySZ::basicAssumption()));
74
75 // Reconstruct and add hits
76 for (const CDCWireHit* wireHit : foundHits) {
77 CDCRecoHit3D recoHit3D = CDCRecoHit3D::reconstructNearest(wireHit, trajectory2D);
78 track.push_back(std::move(recoHit3D));
79 }
80 track.sortByArcLength2D();
81 tracks.emplace_back(std::move(track));
82 }
83}
@ c_nPhotons
CR is split into n photons (N1)
Definition ECLCluster.h:41
std::vector< const CDCWireHit * > search(const std::vector< const CDCWireHit * > &axialWireHits, const CDCTrajectory2D &guidingTrajectory2D)
Search for hits compatible with given trajectory.
unsigned int m_param_minNHits
Track number of hits threshold.
static CDCRecoHit3D reconstructNearest(const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)),...
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
static CDCTrajectorySZ basicAssumption()
Constructs a basic assumption, what the z0 start position and the sz slope are, including some broad ...
static Vector2D Phi(const double phi)
Constructs a unit vector with azimuth angle equal to phi.
Definition Vector2D.h:62

◆ beginEvent()

void beginEvent ( )
overridevirtualinherited

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

Reimplemented from ProcessingSignalListener.

Reimplemented in DATCONFPGAFindlet, SpacePointTagger< AResult, ACluster >, SpacePointTagger< Belle2::CKFToPXDResult, Belle2::PXDCluster >, SpacePointTagger< Belle2::CKFToSVDResult, Belle2::SVDCluster >, FindletStoreArrayInput< TWrappedFindlet >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, MonopoleStereoHitFinder, MonopoleStereoHitFinderQuadratic, SegmentCreatorMCTruth, SegmentFinderFacetAutomaton, SegmentTrackCombiner, SegmentTrackTruthVarSet, SharingHitsMatcher< ACollectorItem, ACollectionItem >, SharingHitsMatcher< Belle2::TrackFindingCDC::CDCTrack, Belle2::TrackFindingCDC::CDCSegment2D >, StereoHitFinder, StereoHitTruthVarSet, StoreVectorSwapper< IOType, a_alwaysWrite >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCFacet >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentTriple >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCTrack >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCWireHit, true >, TrackFinderAutomaton, TrackFinderSegmentPairAutomaton, TrackFinderSegmentTripleAutomaton, TruthAxialSegmentPairVarSet, TruthSegmentVarSet, TruthTrackVarSet, WireHitMCMultiLoopBlocker, RecoTrackStorer, ROIFinder, and SVDHoughTracking.

Definition at line 31 of file CompositeProcessingSignalListener.cc.

32{
35 psl->beginEvent();
36 }
37}
virtual void beginEvent()
Receive signal for the start of a new event.
ProcessingSignalListener()
Allow default construction.

◆ beginRun()

void beginRun ( )
overridevirtualinherited

Receive and dispatch signal for the beginning of a new run.

Reimplemented from ProcessingSignalListener.

Reimplemented in DATCONSVDClusterizer, LayerPXDRelationFilter< AFilter, APrefilter >, LayerPXDRelationFilter< TrackFindingCDC::ChooseableFilter< PXDPairFilterFactory > >, LayerPXDRelationFilter< TrackFindingCDC::ChooseableFilter< PXDPairFilterFactory > >, LayerSVDRelationFilter< AFilter, APrefilter >, LayerSVDRelationFilter< TrackFindingCDC::ChooseableFilter< SVDPairFilterFactory > >, LayerSVDRelationFilter< TrackFindingCDC::ChooseableFilter< SVDPairFilterFactory > >, SectorMapBasedSVDPairFilter, SimplePXDStateFilter, SimpleSVDStateFilter, CutsFromDBWireHitFilter, MVA< Filter< AVarSet::Object > >, MVA< Filter< typename AVarSet::Object > >, MVA< Filter< typename AVarSet::Object > >, WireHitCreator, FourHitFilter, LayerRelationFilter< AFilter >, LayerRelationFilter< TrackFindingCDC::ChooseableFilter< RelationFilterFactory > >, LayerRelationFilter< TrackFindingCDC::ChooseableFilter< RelationFilterFactory > >, QualityIndicatorFilter, RecoTrackStorer, ROIFinder, SpacePointLoaderAndPreparer, ThreeHitFilter, TrackCandidateResultRefiner, TwoHitVirtualIPFilter, and TwoHitVirtualIPQIFilter.

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 CompositeProcessingSignalListener.

Definition at line 34 of file AxialStraightTrackCreator.cc.

36{
37 moduleParamList->addParameter(prefixed(prefix, "minEnergy"),
39 "Parameter to define minimal threshold of ECL cluster energy.",
41 moduleParamList->addParameter(prefixed(prefix, "minNHits"),
43 "Parameter to define minimal threshold of track number of hits.",
45 moduleParamList->addParameter(prefixed(prefix, "maxDistance"),
47 "Parameter to define maximal threshold of hit distance to a line IP - ECL cluster.",
49}
float m_param_maxDistance
Maximum distance from hits to the track.
void addParameter(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.

◆ getDescription()

std::string getDescription ( )
finalvirtual

Short description of the findlet.

Reimplemented from Findlet< const ECLCluster *const, const CDCWireHit *const, CDCTrack >.

Definition at line 29 of file AxialStraightTrackCreator.cc.

30{
31 return "A findlet looking for straight tracks between IP and reconstructed ECL clusters.";
32}

◆ getNProcessingSignalListener()

int getNProcessingSignalListener ( )
protectedinherited

Get the number of currently registered listeners.

Definition at line 60 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
finalvirtual

Initialisation before the event processing starts.

Reimplemented from ProcessingSignalListener.

Definition at line 51 of file AxialStraightTrackCreator.cc.

◆ search()

std::vector< const CDCWireHit * > search ( const std::vector< const CDCWireHit * > & axialWireHits,
const CDCTrajectory2D & guidingTrajectory2D )
private

Search for hits compatible with given trajectory.

Definition at line 85 of file AxialStraightTrackCreator.cc.

87{
88 std::vector<const CDCWireHit*> foundHits;
89 for (const CDCWireHit* hit : axialWireHits) {
90 const Vector2D point = hit->reconstruct2D(guidingTrajectory2D);
91 float arc = guidingTrajectory2D.calcArcLength2D(point);
92 if (arc < 0) continue; // No b2b tracks
93 float distance = guidingTrajectory2D.getDist2D(point);
94 if (std::fabs(distance) < m_param_maxDistance) {
95 foundHits.push_back(hit);
96 }
97 }
98 return foundHits;
99}
double calcArcLength2D(const Vector2D &point) const
Calculate the travel distance from the start position of the trajectory.
double getDist2D(const Vector2D &point) const
Calculates the distance from the point to the trajectory as seen from the xy projection.

◆ terminate()

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_param_maxDistance

float m_param_maxDistance = 0.5
private

Maximum distance from hits to the track.

Definition at line 65 of file AxialStraightTrackCreator.h.

◆ m_param_minEnergy

float m_param_minEnergy = 0.050
private

ECL cluster energy threshold.

Definition at line 59 of file AxialStraightTrackCreator.h.

◆ m_param_minNHits

unsigned int m_param_minNHits = 5
private

Track number of hits threshold.

Definition at line 62 of file AxialStraightTrackCreator.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 = false
privateinherited

Flag to keep track whether termination happened before.

Definition at line 55 of file ProcessingSignalListener.h.


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