Belle II Software development
OffOriginExtension Class Reference

Class performs extension (adding new hits) of given candidate using conformal transformation w.r.t point on the trajectory. More...

#include <OffOriginExtension.h>

Inheritance diagram for OffOriginExtension:
BaseCandidateReceiver

Public Member Functions

 OffOriginExtension (std::vector< const CDCWireHit * > allAxialWireHits, double levelPrecision=9)
 Constructor.
 
void operator() (const std::vector< const CDCWireHit * > &inputWireHits, void *qt) final
 Main entry point for the post processing call from the QuadTreeProcessor.
 
std::vector< const CDCWireHit * > roadSearch (const std::vector< const CDCWireHit * > &wireHits)
 Perform transformation for set of given hits; reference position taken as POCA of the fitted trajectory.
 
std::vector< const CDCWireHit * > getHitsWRTtoRefPos (const Vector2D &refPos, float curv, float theta)
 Get hits which are compatible with given trajectory.
 
const std::vector< CDCTrack > & getTracks () const
 Get the collected tracks.
 

Protected Attributes

std::vector< const CDCWireHit * > m_allAxialWireHits
 Pool of all axial hits from which the road search may select additional hits.
 
std::vector< CDCTrackm_tracks
 Collected tracks.
 

Private Attributes

double m_levelPrecision
 Precision level for the width of the off origin hough search.
 

Detailed Description

Class performs extension (adding new hits) of given candidate using conformal transformation w.r.t point on the trajectory.

Definition at line 26 of file OffOriginExtension.h.

Constructor & Destructor Documentation

◆ OffOriginExtension()

OffOriginExtension ( std::vector< const CDCWireHit * >  allAxialWireHits,
double  levelPrecision = 9 
)
explicit

Constructor.

Definition at line 26 of file OffOriginExtension.cc.

28 : BaseCandidateReceiver(std::move(allAxialWireHits))
29 , m_levelPrecision(levelPrecision)
30{
31}
Base class that receives candidates found by quadtree.
double m_levelPrecision
Precision level for the width of the off origin hough search.

Member Function Documentation

◆ getHitsWRTtoRefPos()

std::vector< const CDCWireHit * > getHitsWRTtoRefPos ( const Vector2D refPos,
float  curv,
float  theta 
)

Get hits which are compatible with given trajectory.

Parameters
refPosdefines 2D reference position with respect to which transformation will be performed
curvcurvarute of the track trajectory
thetaangle between x-axis and vector to the center of the circle which represents trajectory
Returns
vector of CDCWireHit objects which satisfy legendre transformation with respect to the given parameters

Definition at line 98 of file OffOriginExtension.cc.

99{
100 float thetaPrecision = 3.1415 / (pow(2., m_levelPrecision + 1));
101 float curvPrecision = 0.15 / (pow(2., m_levelPrecision));
102
104 YSpan curvSpan{curv - curvPrecision, curv + curvPrecision};
105 LookupTable<Vector2D> thetaSpan(&Vector2D::Phi, 1, theta - thetaPrecision, theta + thetaPrecision);
106
107 AxialHitQuadTreeProcessor qtProcessor(refPos, curvSpan, &thetaSpan);
108 qtProcessor.seed(m_allAxialWireHits);
109
110 std::vector<const CDCWireHit*> newWireHits = qtProcessor.getAssignedItems();
111 return newWireHits;
112}
std::vector< const CDCWireHit * > m_allAxialWireHits
Pool of all axial hits from which the road search may select additional hits.
Class which holds precomputed values of a function.
Definition: LookupTable.h:50
typename QuadTree::YSpan YSpan
This pair describes the span in Y for a node.
static Vector2D Phi(const double phi)
Constructs a unit vector with azimuth angle equal to phi.
Definition: Vector2D.h:62

◆ getTracks()

const std::vector< CDCTrack > & getTracks ( ) const
inherited

Get the collected tracks.

Definition at line 40 of file BaseCandidateReceiver.cc.

41{
42 return m_tracks;
43}
std::vector< CDCTrack > m_tracks
Collected tracks.

◆ operator()()

void operator() ( const std::vector< const CDCWireHit * > &  inputWireHits,
void *  qt 
)
finalvirtual

Main entry point for the post processing call from the QuadTreeProcessor.

Reimplemented from BaseCandidateReceiver.

Definition at line 33 of file OffOriginExtension.cc.

35{
36 // Unset the taken flag and let the postprocessing decide
37 for (const CDCWireHit* wireHit : inputWireHits) {
38 (*wireHit)->setTakenFlag(false);
39 }
40
41 std::vector<const CDCWireHit*> candidateHits = roadSearch(inputWireHits);
45 true);
46}
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
std::vector< const CDCWireHit * > roadSearch(const std::vector< const CDCWireHit * > &wireHits)
Perform transformation for set of given hits; reference position taken as POCA of the fitted trajecto...
static void addCandidateFromHits(const std::vector< const CDCWireHit * > &foundAxialWireHits, const std::vector< const CDCWireHit * > &allAxialWireHits, std::vector< CDCTrack > &axialTracks, bool withPostprocessing=true)
Create CDCTrack using CDCWireHit hits and store it in the list. Then call the postprocessing on it.

◆ roadSearch()

std::vector< const CDCWireHit * > roadSearch ( const std::vector< const CDCWireHit * > &  wireHits)

Perform transformation for set of given hits; reference position taken as POCA of the fitted trajectory.

Definition at line 49 of file OffOriginExtension.cc.

50{
52 CDCTrajectory2D trackTrajectory2D = fitter.fit(wireHits);
53
54 double chi2 = trackTrajectory2D.getChi2();
55 Vector2D refPos = trackTrajectory2D.getGlobalPerigee();
56
57 // change sign of the curvature; should be the same as the charge of the candidate
58 double curv = trackTrajectory2D.getCurvature();
59
60 // theta is the vector normal to the trajectory at the perigee
61 double theta = trackTrajectory2D.getGlobalCircle().phi0() + M_PI_2;
62
63 // Hide the current hits from the road search
64 for (const CDCWireHit* hit : wireHits) {
65 hit->getAutomatonCell().setTakenFlag(true);
66 }
67
68 std::vector<const CDCWireHit*> newWireHits = getHitsWRTtoRefPos(refPos, curv, theta);
69
70 // Unhide the current hits from the road search
71 for (const CDCWireHit* hit : wireHits) {
72 hit->getAutomatonCell().setTakenFlag(false);
73 }
74
75 if (newWireHits.size() == 0) return wireHits;
76
77 std::vector<const CDCWireHit*> combinedWireHits;
78
79 for (const CDCWireHit* hit : wireHits) {
80 combinedWireHits.push_back(hit);
81 }
82
83 for (const CDCWireHit* hit : newWireHits) {
84 combinedWireHits.push_back(hit);
85 }
86
87 CDCTrajectory2D combinedTrajectory2D = fitter.fit(wireHits);
88 double combinedChi2 = combinedTrajectory2D.getChi2();
89
90 if (combinedChi2 < chi2 * 2.) {
91 return combinedWireHits;
92 }
93
94 return wireHits;
95}
Class implementing the fitter using Karimakis method.
static const CDCKarimakiFitter & getNoDriftVarianceFitter()
Static getter for a general fitter that does not use the drift length variances.
Particle trajectory as it is seen in xy projection represented as a circle.
PerigeeCircle getGlobalCircle() const
Getter for the circle in global coordinates.
double getChi2() const
Getter for the chi2 value of the circle fit.
Vector2D getGlobalPerigee() const
Getter for the closest approach on the trajectory to the global origin.
double getCurvature() const
Getter for the curvature as seen from the xy projection.
std::vector< const CDCWireHit * > getHitsWRTtoRefPos(const Vector2D &refPos, float curv, float theta)
Get hits which are compatible with given trajectory.
double phi0() const
Getter for the azimuth angle of the direction of flight at the perigee.
A two dimensional vector which is equipped with functions for correct handling of orientation relate...
Definition: Vector2D.h:32

Member Data Documentation

◆ m_allAxialWireHits

std::vector<const CDCWireHit*> m_allAxialWireHits
protectedinherited

Pool of all axial hits from which the road search may select additional hits.

Definition at line 39 of file BaseCandidateReceiver.h.

◆ m_levelPrecision

double m_levelPrecision
private

Precision level for the width of the off origin hough search.

Definition at line 50 of file OffOriginExtension.h.

◆ m_tracks

std::vector<CDCTrack> m_tracks
protectedinherited

Collected tracks.

Definition at line 42 of file BaseCandidateReceiver.h.


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