Belle II Software development
CKFToPXDState Class Reference

Specialized CKF State for extrapolating into the PXD. More...

#include <CKFToPXDState.h>

Inheritance diagram for CKFToPXDState:
CKFState< RecoTrack, SpacePoint >

Public Types

using Seed = RecoTrack
 Copy the class of the seed track.
 
using Hit = SpacePoint
 Copy the class of the hits.
 

Public Member Functions

 CKFToPXDState (const SpacePoint *hit)
 When constructed by a hit, set the reco hit.
 
 CKFToPXDState (const RecoTrack *seed, bool reversed=false)
 Constructor setting the state to the position of the first CDC track seed hit.
 
unsigned int getGeometricalLayer () const
 Extract the real layer this state sits on.
 
genfit::SharedPlanePtr getPlane (const genfit::MeasuredStateOnPlane &state) const
 Return the plane of the first PXD cluster.
 
const PXDRecoHitgetRecoHit () const
 Helper function for getting the already created reco hit (runtime reasons)
 
const std::vector< PXDRecoHit > & getRecoHits () const
 Helper function for getting the already created reco hits (runtime reasons)
 
const struct stateCache & getStateCache () const
 Get the cached data of this state.
 
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

std::vector< PXDRecoHitm_recoHits
 Precache the PXDRecoHits for runtime performance reasons.
 
const Seedm_seed
 The seed this state is related with.
 
const Hitm_hit
 The hit object this state is attached to.
 
double m_chi2
 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
 Flag, if this state was already fitted.
 
bool m_hasMSoP
 Flag, if this state has a valid mSoP.
 

Detailed Description

Specialized CKF State for extrapolating into the PXD.

Definition at line 27 of file CKFToPXDState.h.

Member Typedef Documentation

◆ Hit

using Hit = SpacePoint
inherited

Copy the class of the hits.

Definition at line 34 of file CKFState.h.

◆ Seed

using Seed = RecoTrack
inherited

Copy the class of the seed track.

Definition at line 32 of file CKFState.h.

Constructor & Destructor Documentation

◆ CKFToPXDState() [1/2]

CKFToPXDState ( const SpacePoint hit)
explicit

When constructed by a hit, set the reco hit.

Definition at line 63 of file CKFToPXDState.cc.

64{
65 for (const PXDCluster& pxdCluster : hit->getRelationsTo<PXDCluster>()) {
66 m_recoHits.emplace_back(&pxdCluster);
67 }
68 m_stateCache.isHitState = true;
69 m_stateCache.sensorID = hit->getVxdID();
70 m_stateCache.geoLayer = this->getGeometricalLayer();
71 m_stateCache.ladder = m_stateCache.sensorID.getLadderNumber();
72 const VXD::SensorInfoBase& sensorInfo = VXD::GeoCache::getInstance().getSensorInfo(hit->getVxdID());
73 m_stateCache.sensorCenterPhi = sensorInfo.pointToGlobal(ROOT::Math::XYZVector(0., 0., 0.), true).Phi();
74 m_stateCache.phi = hit->getPosition().Phi();
75 m_stateCache.theta = hit->getPosition().Theta();
76 m_stateCache.perp = hit->getPosition().Perp();
77 m_stateCache.localNormalizedu = hit->getNormalizedLocalU();
78 m_stateCache.localNormalizedv = hit->getNormalizedLocalV();
79}
State object to store one step in the CKF algorithm together with its parent (the state before),...
Definition: CKFState.h:29
stateCache m_stateCache
Cache the most important data of this state for better runtime performance.
Definition: CKFState.h:154
unsigned int getGeometricalLayer() const
Extract the real layer this state sits on.
std::vector< PXDRecoHit > m_recoHits
Precache the PXDRecoHits for runtime performance reasons.
Definition: CKFToPXDState.h:54
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Base class to provide Sensor Information for PXD and SVD.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.

◆ CKFToPXDState() [2/2]

CKFToPXDState ( const RecoTrack seed,
bool  reversed = false 
)
explicit

Constructor setting the state to the position of the first CDC track seed hit.

Definition at line 18 of file CKFToPXDState.cc.

18 : CKFState(seed)
19{
20 if (reversed) {
21 setMeasuredStateOnPlane(seed->getMeasuredStateOnPlaneFromLastHit());
22 } else {
23 setMeasuredStateOnPlane(seed->getMeasuredStateOnPlaneFromFirstHit());
24 }
25 m_stateCache.isHitState = false;
26 m_stateCache.ptSeed = this->getMeasuredStateOnPlane().getMom().Pt();
27 m_stateCache.thetaSeed = this->getMeasuredStateOnPlane().getMom().Theta();
28 m_stateCache.phi = this->getMeasuredStateOnPlane().getPos().Phi();
29 m_stateCache.theta = this->getMeasuredStateOnPlane().getPos().Theta();
30 m_stateCache.perp = this->getMeasuredStateOnPlane().getPos().Perp();
31 m_stateCache.geoLayer = this->getGeometricalLayer();
32}
CKFState()=default
Default constructor needed for STL containers.
const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlane() const
Get the mSoP if already set during extrapolation (or fitting)
Definition: CKFState.h:93
void setMeasuredStateOnPlane(const genfit::MeasuredStateOnPlane &mSoP)
Set the mSoP.
Definition: CKFState.h:86

Member Function Documentation

◆ getAutomatonCell()

TrackFindingCDC::AutomatonCell & getAutomatonCell ( )
inlineinherited

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
inlineinherited

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

◆ getGeometricalLayer()

unsigned int getGeometricalLayer ( ) const

Extract the real layer this state sits on.

Definition at line 34 of file CKFToPXDState.cc.

35{
36 const SpacePoint* spacePoint = getHit();
37 if (not spacePoint) {
38 // return number of layer (2) + 1 -> we fake the 3th layer as the SVD
39 return 3;
40 }
41
42 return spacePoint->getVxdID().getLayerNumber();
43}
const Hit * getHit() const
Return the SP this state is related to. May be nullptr.
Definition: CKFState.h:66
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42

◆ getHit()

const Hit * getHit ( ) const
inlineinherited

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 }
const Hit * m_hit
The hit object this state is attached to.
Definition: CKFState.h:161

◆ getMeasuredStateOnPlane()

const genfit::MeasuredStateOnPlane & getMeasuredStateOnPlane ( ) const
inlineinherited

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

◆ getPlane()

genfit::SharedPlanePtr getPlane ( const genfit::MeasuredStateOnPlane &  state) const

Return the plane of the first PXD cluster.

Definition at line 45 of file CKFToPXDState.cc.

46{
47 const PXDRecoHit& recoHit = getRecoHit();
48 return recoHit.constructPlane(state);
49}
const PXDRecoHit & getRecoHit() const
Helper function for getting the already created reco hit (runtime reasons)
PXDRecoHit - an extended form of PXDCluster containing geometry information.
Definition: PXDRecoHit.h:49

◆ getRecoHit()

const PXDRecoHit & getRecoHit ( ) const

Helper function for getting the already created reco hit (runtime reasons)

Definition at line 51 of file CKFToPXDState.cc.

52{
53 B2ASSERT("You are asking for the reco hit, although no hit is present.", not m_recoHits.empty());
54 return m_recoHits.front();
55}

◆ getRecoHits()

const std::vector< PXDRecoHit > & getRecoHits ( ) const

Helper function for getting the already created reco hits (runtime reasons)

Definition at line 57 of file CKFToPXDState.cc.

58{
59 B2ASSERT("You are asking for the reco hit, although no hit is present.", not m_recoHits.empty());
60 return m_recoHits;
61}

◆ getSeed()

const Seed * getSeed ( ) const
inlineinherited

Return the track this state is related to.

Definition at line 60 of file CKFState.h.

61 {
62 return m_seed;
63 }
const Seed * m_seed
The seed this state is related with.
Definition: CKFState.h:159

◆ getStateCache()

const struct stateCache & getStateCache ( ) const
inline

Get the cached data of this state.

Definition at line 48 of file CKFToPXDState.h.

48 {
49 return m_stateCache;
50 }

◆ isFitted()

bool isFitted ( ) const
inlineinherited

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
inlineinherited

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

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)
inlineinherited

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)
inlineinherited

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
privateinherited

Memory for the automaton cell.

Definition at line 167 of file CKFState.h.

◆ m_chi2

double m_chi2
privateinherited

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
privateinherited

Flag, if this state has a valid mSoP.

Definition at line 171 of file CKFState.h.

◆ m_hit

const Hit* m_hit
privateinherited

The hit object this state is attached to.

Definition at line 161 of file CKFState.h.

◆ m_isFitted

bool m_isFitted
privateinherited

Flag, if this state was already fitted.

Definition at line 169 of file CKFState.h.

◆ m_measuredStateOnPlane

genfit::MeasuredStateOnPlane m_measuredStateOnPlane
privateinherited

MSoP after advancing. Is undetermined before extrapolating!

Definition at line 165 of file CKFState.h.

◆ m_recoHits

std::vector<PXDRecoHit> m_recoHits
private

Precache the PXDRecoHits for runtime performance reasons.

Definition at line 54 of file CKFToPXDState.h.

◆ m_seed

const Seed* m_seed
privateinherited

The seed this state is related with.

Definition at line 159 of file CKFState.h.

◆ m_stateCache

stateCache m_stateCache
protectedinherited

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