Belle II Software development
CKFState< ASeed, AHit > Class Template Reference

State object to store one step in the CKF algorithm together with its parent (the state before), the hit (e.g. More...

#include <CKFState.h>

Classes

struct  stateCache
 Cache containing the most important information of this state which will often be needed. More...
 

Public Types

using Seed = ASeed
 Copy the class of the seed track.
 
using Hit = AHit
 Copy the class of the hits.
 

Public Member Functions

 CKFState ()=default
 Default constructor needed for STL containers.
 
 CKFState (CKFState &&)=default
 Move constructor needed for STL containers.
 
 CKFState (const CKFState &)=delete
 No copy constructor.
 
CKFStateoperator= (const CKFState &)=delete
 No copy constructor.
 
CKFStateoperator= (CKFState &&)=default
 Move assignment constructor.
 
 ~CKFState ()=default
 Destructor.
 
 CKFState (const Seed *seed)
 Initialize the state as a root without a related hit (but with a seed)
 
 CKFState (const Hit *hit)
 Initialize the state as non-root with a related hit (and with a seed)
 
const SeedgetSeed () const
 Return the track this state is related to.
 
const HitgetHit () const
 Return the SP this state is related to. May be nullptr.
 
double getChi2 () const
 Return the chi2 set during fitting. Is only valid after fitting.
 
void setChi2 (double chi2)
 Set the chi2 of this state during fitting.
 
void setMeasuredStateOnPlane (const genfit::MeasuredStateOnPlane &mSoP)
 Set the mSoP.
 
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlane () const
 Get the mSoP if already set during extrapolation (or fitting)
 
bool isFitted () const
 Check if state was already fitted.
 
bool mSoPSet () const
 Is the mSoP already set? (= state was already extrapolated)
 
void reset ()
 Reset the state to be seen as "new".
 
TrackFindingCDC::AutomatonCellgetAutomatonCell ()
 Getter for the automaton cell.
 

Protected Attributes

stateCache m_stateCache
 Cache the most important data of this state for better runtime performance.
 

Private Attributes

const Seedm_seed = nullptr
 The seed this state is related with.
 
const Hitm_hit = nullptr
 The hit object this state is attached to.
 
double m_chi2 = 0
 Chi2 of this special state with this hit and this reco track. Will only be set after fitting state.
 
genfit::MeasuredStateOnPlane m_measuredStateOnPlane
 MSoP after advancing. Is undetermined before extrapolating!
 
TrackFindingCDC::AutomatonCell m_automatonCell
 Memory for the automaton cell.
 
bool m_isFitted = false
 Flag, if this state was already fitted.
 
bool m_hasMSoP = false
 Flag, if this state has a valid mSoP.
 

Detailed Description

template<class ASeed, class AHit>
class Belle2::CKFState< ASeed, AHit >

State object to store one step in the CKF algorithm together with its parent (the state before), the hit (e.g.

a space point) and the seed (e.g. a cdc reco track).

Please remember: the states are reused during the algorithm and only once constructed (in the C++ sense).

Definition at line 29 of file CKFState.h.

Member Typedef Documentation

◆ Hit

using Hit = AHit

Copy the class of the hits.

Definition at line 34 of file CKFState.h.

◆ Seed

using Seed = ASeed

Copy the class of the seed track.

Definition at line 32 of file CKFState.h.

Constructor & Destructor Documentation

◆ CKFState() [1/2]

CKFState ( const Seed seed)
inlineexplicit

Initialize the state as a root without a related hit (but with a seed)

Definition at line 50 of file CKFState.h.

50 : m_seed(seed)
51 {
52 }
const Seed * m_seed
The seed this state is related with.
Definition: CKFState.h:159

◆ CKFState() [2/2]

CKFState ( const Hit hit)
inlineexplicit

Initialize the state as non-root with a related hit (and with a seed)

Definition at line 55 of file CKFState.h.

55 : m_hit(hit)
56 {
57 }
const Hit * m_hit
The hit object this state is attached to.
Definition: CKFState.h:161

Member Function Documentation

◆ getAutomatonCell()

TrackFindingCDC::AutomatonCell & getAutomatonCell ( )
inline

Getter for the automaton cell.

Definition at line 119 of file CKFState.h.

120 {
121 return m_automatonCell;
122 }
TrackFindingCDC::AutomatonCell m_automatonCell
Memory for the automaton cell.
Definition: CKFState.h:167

◆ getChi2()

double getChi2 ( ) const
inline

Return the chi2 set during fitting. Is only valid after fitting.

Definition at line 72 of file CKFState.h.

73 {
74 B2ASSERT("Chi2 is not set", isFitted());
75 return m_chi2;
76 }
double m_chi2
Chi2 of this special state with this hit and this reco track. Will only be set after fitting state.
Definition: CKFState.h:163
bool isFitted() const
Check if state was already fitted.
Definition: CKFState.h:100

◆ getHit()

const Hit * getHit ( ) const
inline

Return the SP this state is related to. May be nullptr.

Definition at line 66 of file CKFState.h.

67 {
68 return m_hit;
69 }

◆ getMeasuredStateOnPlane()

const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlane ( ) const
inline

Get the mSoP if already set during extrapolation (or fitting)

Definition at line 93 of file CKFState.h.

94 {
95 B2ASSERT("You are asking for an invalid variable!", mSoPSet());
97 }
bool mSoPSet() const
Is the mSoP already set? (= state was already extrapolated)
Definition: CKFState.h:106
genfit::MeasuredStateOnPlane m_measuredStateOnPlane
MSoP after advancing. Is undetermined before extrapolating!
Definition: CKFState.h:165

◆ getSeed()

const Seed * getSeed ( ) const
inline

Return the track this state is related to.

Definition at line 60 of file CKFState.h.

61 {
62 return m_seed;
63 }

◆ isFitted()

bool isFitted ( ) const
inline

Check if state was already fitted.

Definition at line 100 of file CKFState.h.

101 {
102 return m_isFitted;
103 }
bool m_isFitted
Flag, if this state was already fitted.
Definition: CKFState.h:169

◆ mSoPSet()

bool mSoPSet ( ) const
inline

Is the mSoP already set? (= state was already extrapolated)

Definition at line 106 of file CKFState.h.

107 {
108 return m_hasMSoP;
109 }
bool m_hasMSoP
Flag, if this state has a valid mSoP.
Definition: CKFState.h:171

◆ reset()

void reset ( )
inline

Reset the state to be seen as "new".

Definition at line 112 of file CKFState.h.

113 {
114 m_isFitted = false;
115 m_hasMSoP = false;
116 }

◆ setChi2()

void setChi2 ( double  chi2)
inline

Set the chi2 of this state during fitting.

Definition at line 79 of file CKFState.h.

80 {
81 m_chi2 = chi2;
82 m_isFitted = true;
83 }

◆ setMeasuredStateOnPlane()

void setMeasuredStateOnPlane ( const genfit::MeasuredStateOnPlane &  mSoP)
inline

Set the mSoP.

Definition at line 86 of file CKFState.h.

87 {
89 m_hasMSoP = true;
90 }

Member Data Documentation

◆ m_automatonCell

TrackFindingCDC::AutomatonCell m_automatonCell
private

Memory for the automaton cell.

Definition at line 167 of file CKFState.h.

◆ m_chi2

double m_chi2 = 0
private

Chi2 of this special state with this hit and this reco track. Will only be set after fitting state.

Definition at line 163 of file CKFState.h.

◆ m_hasMSoP

bool m_hasMSoP = false
private

Flag, if this state has a valid mSoP.

Definition at line 171 of file CKFState.h.

◆ m_hit

const Hit* m_hit = nullptr
private

The hit object this state is attached to.

Definition at line 161 of file CKFState.h.

◆ m_isFitted

bool m_isFitted = false
private

Flag, if this state was already fitted.

Definition at line 169 of file CKFState.h.

◆ m_measuredStateOnPlane

genfit::MeasuredStateOnPlane m_measuredStateOnPlane
private

MSoP after advancing. Is undetermined before extrapolating!

Definition at line 165 of file CKFState.h.

◆ m_seed

const Seed* m_seed = nullptr
private

The seed this state is related with.

Definition at line 159 of file CKFState.h.

◆ m_stateCache

stateCache m_stateCache
protected

Cache the most important data of this state for better runtime performance.

Definition at line 154 of file CKFState.h.


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