Belle II Software development
CDCCKFState Class Reference

Define states for CKF algorithm, which can be seed track or CDC wire hit. More...

#include <CDCCKFState.h>

Public Member Functions

 CDCCKFState (const RecoTrack *seed, const genfit::MeasuredStateOnPlane &trackState)
 constructor from the seed recoTrack and genfit trackState
 
 CDCCKFState (const TrackingUtilities::CDCWireHit *wireHit)
 constructor from the CDC wireHit
 
const TrackingUtilities::CDCWireHitgetWireHit () const
 Get CDCWireHit corresponding to the state.
 
const RecoTrackgetSeed () const
 Get RecoTrack seed corresponding to the state.
 
const RecoTrackgetMCRecoTrack (const std::string &mcRecoTrackStoreArrayName="MCRecoTracks") const
 Match seed to the MC track, return it. Works for seed-states only.
 
bool isSeed () const
 Returns true if the state corresponds to the seed track.
 
const genfit::MeasuredStateOnPlane & getTrackState () const
 Get genfit track state (but first check if already present)
 
void setTrackState (const genfit::MeasuredStateOnPlane &trackState)
 Store genfit Measured state on plane.
 
void setRLinfo (const TrackingUtilities::ERightLeft &rl)
 Set right-left info for the hit.
 
TrackingUtilities::ERightLeft getRLinfo () const
 Return right-left info (check if present first)
 
void setArcLength (double arcLength)
 Set the arc-length along the tracjectory to the hit.
 
double getArcLength () const
 Return the arc-length along the tracjectory to the hit.
 
void setHitDistance (double hitDistance)
 Set hit distance to the trajectory.
 
double getHitDistance () const
 Return hit distance to the trajectory.
 
void setWeight (double weight)
 Set state weight.
 
double getWeight () const
 Get state weight.
 
void setChi2 (double chi2)
 Set set chi2.
 
double getChi2 () const
 Get state chi2.
 
void setReconstructedZ (double reconstructedZ)
 Set state Z information.
 
double getReconstructedZ () const
 Get state Z information.
 
TrackingUtilities::CDCTrajectory3D getTrajectory () const
 Helper method to get trajectory from the trackState.
 

Private Attributes

std::optional< const RecoTrack * > m_seed
 (optional) pointer to the seed track
 
std::optional< const TrackingUtilities::CDCWireHit * > m_cdcWireHit
 (optional) pointer to the wire hit
 
std::optional< genfit::MeasuredStateOnPlane > m_trackState
 (optional) genfit MeasuredStateOnPlane
 
double m_arcLength = 0
 arc length along the trajectory to the hit
 
double m_hitDistance = 0
 distance from the trajectory to the hit
 
double m_weight = 0
 state weight
 
double m_chi2 = 0
 state chi2 (using genfit extrapolation)
 
double m_reconstructedZ = 0
 reconstructed Z coordinate
 
TrackingUtilities::ERightLeft m_rl = TrackingUtilities::ERightLeft::c_Unknown
 Store if the track is on the right or left side of the hit.
 

Detailed Description

Define states for CKF algorithm, which can be seed track or CDC wire hit.

Definition at line 26 of file CDCCKFState.h.

Constructor & Destructor Documentation

◆ CDCCKFState() [1/2]

CDCCKFState ( const RecoTrack * seed,
const genfit::MeasuredStateOnPlane & trackState )
inline

constructor from the seed recoTrack and genfit trackState

Definition at line 29 of file CDCCKFState.h.

29 :
30 m_seed(seed), m_trackState(trackState) {}

◆ CDCCKFState() [2/2]

CDCCKFState ( const TrackingUtilities::CDCWireHit * wireHit)
inlineexplicit

constructor from the CDC wireHit

Definition at line 33 of file CDCCKFState.h.

33: m_cdcWireHit(wireHit) {}

Member Function Documentation

◆ getArcLength()

double getArcLength ( ) const
inline

Return the arc-length along the tracjectory to the hit.

Definition at line 95 of file CDCCKFState.h.

96 {
97 return m_arcLength;
98 }

◆ getChi2()

double getChi2 ( ) const
inline

Get state chi2.

Definition at line 131 of file CDCCKFState.h.

132 {
133 return m_chi2;
134 }

◆ getHitDistance()

double getHitDistance ( ) const
inline

Return hit distance to the trajectory.

Definition at line 107 of file CDCCKFState.h.

108 {
109 return m_hitDistance;
110 }

◆ getMCRecoTrack()

const RecoTrack * getMCRecoTrack ( const std::string & mcRecoTrackStoreArrayName = "MCRecoTracks") const
inline

Match seed to the MC track, return it. Works for seed-states only.

Definition at line 50 of file CDCCKFState.h.

51 {
52 const RecoTrack* seed = getSeed();
53 return seed->getRelated<RecoTrack>(mcRecoTrackStoreArrayName);
54 }

◆ getReconstructedZ()

double getReconstructedZ ( ) const
inline

Get state Z information.

Definition at line 143 of file CDCCKFState.h.

144 {
145 return m_reconstructedZ;
146 }

◆ getRLinfo()

TrackingUtilities::ERightLeft getRLinfo ( ) const
inline

Return right-left info (check if present first)

Definition at line 82 of file CDCCKFState.h.

83 {
84 B2ASSERT("LR info is not present yet", m_rl != TrackingUtilities::ERightLeft::c_Unknown);
85 return m_rl;
86 }

◆ getSeed()

const RecoTrack * getSeed ( ) const
inline

Get RecoTrack seed corresponding to the state.

Definition at line 43 of file CDCCKFState.h.

44 {
45 B2ASSERT("State does not represent a seed", static_cast<bool>(m_seed));
46 return *m_seed;
47 }

◆ getTrackState()

const genfit::MeasuredStateOnPlane & getTrackState ( ) const
inline

Get genfit track state (but first check if already present)

Definition at line 63 of file CDCCKFState.h.

64 {
65 B2ASSERT("State does not have a track state (yet)", static_cast<bool>(m_trackState));
66 return *m_trackState;
67 }

◆ getTrajectory()

TrackingUtilities::CDCTrajectory3D getTrajectory ( ) const
inline

Helper method to get trajectory from the trackState.

Definition at line 149 of file CDCCKFState.h.

150 {
151 const auto& trackState = getTrackState();
152 const ROOT::Math::XYZVector trackPosition(trackState.getPos());
153 const ROOT::Math::XYZVector trackMomentum(trackState.getMom());
154 return TrackingUtilities::CDCTrajectory3D(trackPosition, trackState.getTime(),
155 trackMomentum, trackState.getCharge());
156 }

◆ getWeight()

double getWeight ( ) const
inline

Get state weight.

Definition at line 119 of file CDCCKFState.h.

120 {
121 return m_weight;
122 }

◆ getWireHit()

const TrackingUtilities::CDCWireHit * getWireHit ( ) const
inline

Get CDCWireHit corresponding to the state.

Definition at line 36 of file CDCCKFState.h.

37 {
38 B2ASSERT("State does not represent a wire hit", static_cast<bool>(m_cdcWireHit));
39 return *m_cdcWireHit;
40 }

◆ isSeed()

bool isSeed ( ) const
inline

Returns true if the state corresponds to the seed track.

Definition at line 57 of file CDCCKFState.h.

58 {
59 return static_cast<bool>(m_seed);
60 }

◆ setArcLength()

void setArcLength ( double arcLength)
inline

Set the arc-length along the tracjectory to the hit.

Definition at line 89 of file CDCCKFState.h.

90 {
91 m_arcLength = arcLength;
92 }

◆ setChi2()

void setChi2 ( double chi2)
inline

Set set chi2.

Definition at line 125 of file CDCCKFState.h.

126 {
127 m_chi2 = chi2;
128 }

◆ setHitDistance()

void setHitDistance ( double hitDistance)
inline

Set hit distance to the trajectory.

Definition at line 101 of file CDCCKFState.h.

102 {
103 m_hitDistance = hitDistance;
104 }

◆ setReconstructedZ()

void setReconstructedZ ( double reconstructedZ)
inline

Set state Z information.

Definition at line 137 of file CDCCKFState.h.

138 {
139 m_reconstructedZ = reconstructedZ;
140 }

◆ setRLinfo()

void setRLinfo ( const TrackingUtilities::ERightLeft & rl)
inline

Set right-left info for the hit.

Definition at line 76 of file CDCCKFState.h.

77 {
78 m_rl = rl;
79 }

◆ setTrackState()

void setTrackState ( const genfit::MeasuredStateOnPlane & trackState)
inline

Store genfit Measured state on plane.

Definition at line 70 of file CDCCKFState.h.

71 {
72 m_trackState = trackState;
73 }

◆ setWeight()

void setWeight ( double weight)
inline

Set state weight.

Definition at line 113 of file CDCCKFState.h.

114 {
115 m_weight = weight;
116 }

Member Data Documentation

◆ m_arcLength

double m_arcLength = 0
private

arc length along the trajectory to the hit

Definition at line 168 of file CDCCKFState.h.

◆ m_cdcWireHit

std::optional<const TrackingUtilities::CDCWireHit*> m_cdcWireHit
private

(optional) pointer to the wire hit

Definition at line 162 of file CDCCKFState.h.

◆ m_chi2

double m_chi2 = 0
private

state chi2 (using genfit extrapolation)

Definition at line 177 of file CDCCKFState.h.

◆ m_hitDistance

double m_hitDistance = 0
private

distance from the trajectory to the hit

Definition at line 171 of file CDCCKFState.h.

◆ m_reconstructedZ

double m_reconstructedZ = 0
private

reconstructed Z coordinate

Definition at line 180 of file CDCCKFState.h.

◆ m_rl

TrackingUtilities::ERightLeft m_rl = TrackingUtilities::ERightLeft::c_Unknown
private

Store if the track is on the right or left side of the hit.

Definition at line 183 of file CDCCKFState.h.

◆ m_seed

std::optional<const RecoTrack*> m_seed
private

(optional) pointer to the seed track

Definition at line 160 of file CDCCKFState.h.

◆ m_trackState

std::optional<genfit::MeasuredStateOnPlane> m_trackState
private

(optional) genfit MeasuredStateOnPlane

Definition at line 165 of file CDCCKFState.h.

◆ m_weight

double m_weight = 0
private

state weight

Definition at line 174 of file CDCCKFState.h.


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