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 TrackFindingCDC::CDCWireHit *wireHit)
 constructor from the CDC wireHit
 
const TrackFindingCDC::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 TrackFindingCDC::ERightLeft &rl)
 Set right-left info for the hit.
 
TrackFindingCDC::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.
 
TrackFindingCDC::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 TrackFindingCDC::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
 
TrackFindingCDC::ERightLeft m_rl = TrackFindingCDC::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 25 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 28 of file CDCCKFState.h.

28 :
29 m_seed(seed), m_trackState(trackState) {}
std::optional< const RecoTrack * > m_seed
(optional) pointer to the seed track
Definition: CDCCKFState.h:159
std::optional< genfit::MeasuredStateOnPlane > m_trackState
(optional) genfit MeasuredStateOnPlane
Definition: CDCCKFState.h:164

◆ CDCCKFState() [2/2]

CDCCKFState ( const TrackFindingCDC::CDCWireHit wireHit)
inlineexplicit

constructor from the CDC wireHit

Definition at line 32 of file CDCCKFState.h.

32: m_cdcWireHit(wireHit) {}
std::optional< const TrackFindingCDC::CDCWireHit * > m_cdcWireHit
(optional) pointer to the wire hit
Definition: CDCCKFState.h:161

Member Function Documentation

◆ getArcLength()

double getArcLength ( ) const
inline

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

Definition at line 94 of file CDCCKFState.h.

95 {
96 return m_arcLength;
97 }
double m_arcLength
arc length along the trajectory to the hit
Definition: CDCCKFState.h:167

◆ getChi2()

double getChi2 ( ) const
inline

Get state chi2.

Definition at line 130 of file CDCCKFState.h.

131 {
132 return m_chi2;
133 }
double m_chi2
state chi2 (using genfit extrapolation)
Definition: CDCCKFState.h:176

◆ getHitDistance()

double getHitDistance ( ) const
inline

Return hit distance to the trajectory.

Definition at line 106 of file CDCCKFState.h.

107 {
108 return m_hitDistance;
109 }
double m_hitDistance
distance from the trajectory to the hit
Definition: CDCCKFState.h:170

◆ 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 49 of file CDCCKFState.h.

50 {
51 const RecoTrack* seed = getSeed();
52 return seed->getRelated<RecoTrack>(mcRecoTrackStoreArrayName);
53 }
const RecoTrack * getSeed() const
Get RecoTrack seed corresponding to the state.
Definition: CDCCKFState.h:42

◆ getReconstructedZ()

double getReconstructedZ ( ) const
inline

Get state Z information.

Definition at line 142 of file CDCCKFState.h.

143 {
144 return m_reconstructedZ;
145 }
double m_reconstructedZ
reconstructed Z coordinate
Definition: CDCCKFState.h:179

◆ getRLinfo()

TrackFindingCDC::ERightLeft getRLinfo ( ) const
inline

Return right-left info (check if present first)

Definition at line 81 of file CDCCKFState.h.

82 {
83 B2ASSERT("LR info is not present yet", m_rl != TrackFindingCDC::ERightLeft::c_Unknown);
84 return m_rl;
85 }
TrackFindingCDC::ERightLeft m_rl
Store if the track is on the right or left side of the hit.
Definition: CDCCKFState.h:182

◆ getSeed()

const RecoTrack * getSeed ( ) const
inline

Get RecoTrack seed corresponding to the state.

Definition at line 42 of file CDCCKFState.h.

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

◆ getTrackState()

const genfit::MeasuredStateOnPlane & getTrackState ( ) const
inline

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

Definition at line 62 of file CDCCKFState.h.

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

◆ getTrajectory()

TrackFindingCDC::CDCTrajectory3D getTrajectory ( ) const
inline

Helper method to get trajectory from the trackState.

Definition at line 148 of file CDCCKFState.h.

149 {
150 const auto& trackState = getTrackState();
151 const TrackFindingCDC::Vector3D trackPosition(trackState.getPos());
152 const TrackFindingCDC::Vector3D trackMomentum(trackState.getMom());
153 return TrackFindingCDC::CDCTrajectory3D(trackPosition, trackState.getTime(),
154 trackMomentum, trackState.getCharge());
155 }
const genfit::MeasuredStateOnPlane & getTrackState() const
Get genfit track state (but first check if already present)
Definition: CDCCKFState.h:62

◆ getWeight()

double getWeight ( ) const
inline

Get state weight.

Definition at line 118 of file CDCCKFState.h.

119 {
120 return m_weight;
121 }
double m_weight
state weight
Definition: CDCCKFState.h:173

◆ getWireHit()

const TrackFindingCDC::CDCWireHit * getWireHit ( ) const
inline

Get CDCWireHit corresponding to the state.

Definition at line 35 of file CDCCKFState.h.

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

◆ isSeed()

bool isSeed ( ) const
inline

Returns true if the state corresponds to the seed track.

Definition at line 56 of file CDCCKFState.h.

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

◆ setArcLength()

void setArcLength ( double  arcLength)
inline

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

Definition at line 88 of file CDCCKFState.h.

89 {
90 m_arcLength = arcLength;
91 }

◆ setChi2()

void setChi2 ( double  chi2)
inline

Set set chi2.

Definition at line 124 of file CDCCKFState.h.

125 {
126 m_chi2 = chi2;
127 }

◆ setHitDistance()

void setHitDistance ( double  hitDistance)
inline

Set hit distance to the trajectory.

Definition at line 100 of file CDCCKFState.h.

101 {
102 m_hitDistance = hitDistance;
103 }

◆ setReconstructedZ()

void setReconstructedZ ( double  reconstructedZ)
inline

Set state Z information.

Definition at line 136 of file CDCCKFState.h.

137 {
138 m_reconstructedZ = reconstructedZ;
139 }

◆ setRLinfo()

void setRLinfo ( const TrackFindingCDC::ERightLeft rl)
inline

Set right-left info for the hit.

Definition at line 75 of file CDCCKFState.h.

76 {
77 m_rl = rl;
78 }

◆ setTrackState()

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

Store genfit Measured state on plane.

Definition at line 69 of file CDCCKFState.h.

70 {
71 m_trackState = trackState;
72 }

◆ setWeight()

void setWeight ( double  weight)
inline

Set state weight.

Definition at line 112 of file CDCCKFState.h.

113 {
114 m_weight = weight;
115 }

Member Data Documentation

◆ m_arcLength

double m_arcLength = 0
private

arc length along the trajectory to the hit

Definition at line 167 of file CDCCKFState.h.

◆ m_cdcWireHit

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

(optional) pointer to the wire hit

Definition at line 161 of file CDCCKFState.h.

◆ m_chi2

double m_chi2 = 0
private

state chi2 (using genfit extrapolation)

Definition at line 176 of file CDCCKFState.h.

◆ m_hitDistance

double m_hitDistance = 0
private

distance from the trajectory to the hit

Definition at line 170 of file CDCCKFState.h.

◆ m_reconstructedZ

double m_reconstructedZ = 0
private

reconstructed Z coordinate

Definition at line 179 of file CDCCKFState.h.

◆ m_rl

TrackFindingCDC::ERightLeft m_rl = TrackFindingCDC::ERightLeft::c_Unknown
private

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

Definition at line 182 of file CDCCKFState.h.

◆ m_seed

std::optional<const RecoTrack*> m_seed
private

(optional) pointer to the seed track

Definition at line 159 of file CDCCKFState.h.

◆ m_trackState

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

(optional) genfit MeasuredStateOnPlane

Definition at line 164 of file CDCCKFState.h.

◆ m_weight

double m_weight = 0
private

state weight

Definition at line 173 of file CDCCKFState.h.


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