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 = 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

 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 = 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 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 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

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 = 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 ECLCluster* const, const CDCWireHit* const, CDCTrack>
private

Type of the base class.

Definition at line 32 of file AxialStraightTrackCreator.h.

◆ ToVector

using ToVector = typename ToVectorImpl<T>::Type
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}
ECL cluster data.
Definition: ECLCluster.h:27
@ c_nPhotons
CR is split into n photons (N1)
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.
Class representing a three dimensional reconstructed hit.
Definition: CDCRecoHit3D.h:52
static CDCRecoHit3D reconstructNearest(const CDCWireHit *axialWireHit, const CDCTrajectory2D &trajectory2D)
Reconstruct a three dimensional hit from a wire hit (as in reconstruct(rlWireHit, trajectory2D)),...
Class implementing the Riemann fit for two dimensional trajectory circle.
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
Particle trajectory as it is seen in xy projection represented as a circle.
Particle full three dimensional trajectory.
static CDCTrajectorySZ basicAssumption()
Constucts a basic assumption, what the z0 start position and the sz slope are, including some broad v...
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Adds an uncertainty matrix to the circle in perigee parameterisation.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:32
static Vector2D Phi(const double phi)
Constucts 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 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 ECLCluster *const, const CDCWireHit *const, CDCTrack >.

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.

52{
54}
void initialize() override
Receive and dispatch signal before the start of the event processing.

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

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