PandaRoot
genfit::StateOnPlane Class Reference

A state with arbitrary dimension defined in a DetPlane. More...

#include <StateOnPlane.h>

Inheritance diagram for genfit::StateOnPlane:
genfit::MeasuredStateOnPlane genfit::ReferenceStateOnPlane genfit::KalmanFittedStateOnPlane genfit::MeasurementOnPlane

Public Member Functions

 StateOnPlane (const AbsTrackRep *rep=nullptr)
 
 StateOnPlane (const TVectorD &state, const SharedPlanePtr &plane, const AbsTrackRep *rep)
 state is defined by the TrackReps parameterization More...
 
 StateOnPlane (const TVectorD &state, const SharedPlanePtr &plane, const AbsTrackRep *rep, const TVectorD &auxInfo)
 
StateOnPlaneoperator= (StateOnPlane other)
 
void swap (StateOnPlane &other)
 
virtual ~StateOnPlane ()
 
const TVectorD & getState () const
 
TVectorD & getState ()
 
const TVectorD & getAuxInfo () const
 
TVectorD & getAuxInfo ()
 
const SharedPlanePtrgetPlane () const
 
const AbsTrackRepgetRep () const
 
void setState (const TVectorD &state)
 
void setPlane (const SharedPlanePtr &plane)
 
void setStatePlane (const TVectorD &state, const SharedPlanePtr &plane)
 
void setAuxInfo (const TVectorD &auxInfo)
 
void setRep (const AbsTrackRep *rep)
 
double extrapolateToPlane (const SharedPlanePtr &plane, bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateToLine (const TVector3 &linePoint, const TVector3 &lineDirection, bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateToPoint (const TVector3 &point, bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateToPoint (const TVector3 &point, const TMatrixDSym &G, bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateToCylinder (double radius, const TVector3 &linePoint=TVector3(0., 0., 0.), const TVector3 &lineDirection=TVector3(0., 0., 1.), bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateToSphere (double radius, const TVector3 &point=TVector3(0., 0., 0.), bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateBy (double step, bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
double extrapolateToMeasurement (const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false)
 
TVector3 getPos () const
 
TVector3 getMom () const
 
TVector3 getDir () const
 
void getPosMom (TVector3 &pos, TVector3 &mom) const
 
void getPosDir (TVector3 &pos, TVector3 &dir) const
 
TVectorD get6DState () const
 
double getMomMag () const
 
int getPDG () const
 
double getCharge () const
 
double getQop () const
 
double getMass () const
 
double getTime () const
 
void setPosMom (const TVector3 &pos, const TVector3 &mom)
 
void setPosMom (const TVectorD &state6)
 
void setChargeSign (double charge)
 
void setQop (double qop)
 
void setTime (double time)
 
virtual void Print (Option_t *option="") const
 

Protected Attributes

TVectorD state_
 
TVectorD auxInfo_
 
SharedPlanePtr sharedPlane_
 

Detailed Description

A state with arbitrary dimension defined in a DetPlane.

The dimension and meaning of the state_ vector are defined by the track parameterization of the #rep_. sharedPlane_ is a shared_pointer, the ownership over that plane is shared between all StateOnPlane objects defined in that plane. The definition of the state is bound to the TrackRep #rep_. Therefore, the StateOnPlane contains a pointer to a AbsTrackRep. It will provide functionality to extrapolate it and translate the state it into cartesian coordinates. Shortcuts to all functions of the AbsTrackRep which use this StateOnPlane are also provided here.

Definition at line 44 of file StateOnPlane.h.

Constructor & Destructor Documentation

◆ StateOnPlane() [1/3]

genfit::StateOnPlane::StateOnPlane ( const AbsTrackRep rep = nullptr)
inline

Definition at line 156 of file StateOnPlane.h.

References genfit::AbsTrackRep::getDim(), and state_.

156  : state_(0), auxInfo_(0), sharedPlane_(), rep_(rep)
157 {
158  if (rep != nullptr) {
159  state_.ResizeTo(rep->getDim());
160  }
161 }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

◆ StateOnPlane() [2/3]

genfit::StateOnPlane::StateOnPlane ( const TVectorD &  state,
const SharedPlanePtr plane,
const AbsTrackRep rep 
)
inline

state is defined by the TrackReps parameterization

Definition at line 163 of file StateOnPlane.h.

References sharedPlane_.

163  : state_(state), auxInfo_(0), sharedPlane_(plane), rep_(rep)
164 {
165  assert(rep != nullptr);
166  assert(sharedPlane_.get() != nullptr);
167 }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

◆ StateOnPlane() [3/3]

genfit::StateOnPlane::StateOnPlane ( const TVectorD &  state,
const SharedPlanePtr plane,
const AbsTrackRep rep,
const TVectorD &  auxInfo 
)
inline

Definition at line 169 of file StateOnPlane.h.

References sharedPlane_.

170  : state_(state), auxInfo_(auxInfo), sharedPlane_(plane), rep_(rep)
171 {
172  assert(rep != nullptr);
173  assert(sharedPlane_.get() != nullptr);
174 }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

◆ ~StateOnPlane()

virtual genfit::StateOnPlane::~StateOnPlane ( )
inlinevirtual

Definition at line 55 of file StateOnPlane.h.

55 {}

Member Function Documentation

◆ extrapolateBy()

double genfit::StateOnPlane::extrapolateBy ( double  step,
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 112 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateBy().

112 { return rep_->extrapolateBy(*this, step, stopAtBoundary, calcJacobianNoise); }
virtual double extrapolateBy(StateOnPlane &state, double step, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state by step (cm) and returns the extrapolation length and, via reference...

◆ extrapolateToCylinder()

double genfit::StateOnPlane::extrapolateToCylinder ( double  radius,
const TVector3 &  linePoint = TVector3(0., 0., 0.),
const TVector3 &  lineDirection = TVector3(0., 0., 1.),
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 103 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToCylinder().

105  {
106  return rep_->extrapolateToCylinder(*this, radius, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);
107  }
virtual double extrapolateToCylinder(StateOnPlane &state, double radius, const TVector3 &linePoint=TVector3(0., 0., 0.), const TVector3 &lineDirection=TVector3(0., 0., 1.), bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to the cylinder surface, and returns the extrapolation length and...

◆ extrapolateToLine()

double genfit::StateOnPlane::extrapolateToLine ( const TVector3 &  linePoint,
const TVector3 &  lineDirection,
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 89 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToLine().

90  {
91  return rep_->extrapolateToLine(*this, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);
92  }
virtual double extrapolateToLine(StateOnPlane &state, const TVector3 &linePoint, const TVector3 &lineDirection, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to the POCA to a line, and returns the extrapolation length and...

◆ extrapolateToMeasurement()

double genfit::StateOnPlane::extrapolateToMeasurement ( const AbsMeasurement measurement,
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 113 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToMeasurement().

114  {
115  return rep_->extrapolateToMeasurement(*this, measurement, stopAtBoundary, calcJacobianNoise);
116  }
double extrapolateToMeasurement(StateOnPlane &state, const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
extrapolate to an AbsMeasurement

◆ extrapolateToPlane()

double genfit::StateOnPlane::extrapolateToPlane ( const SharedPlanePtr plane,
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 85 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToPlane().

86  {
87  return rep_->extrapolateToPlane(*this, plane, stopAtBoundary, calcJacobianNoise);
88  }
virtual double extrapolateToPlane(StateOnPlane &state, const genfit::SharedPlanePtr &plane, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to plane, and returns the extrapolation length and, via reference, the extrapolated state.

◆ extrapolateToPoint() [1/2]

double genfit::StateOnPlane::extrapolateToPoint ( const TVector3 &  point,
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 93 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToPoint().

94  {
95  return rep_->extrapolateToPoint(*this, point, stopAtBoundary, calcJacobianNoise);
96  }
virtual double extrapolateToPoint(StateOnPlane &state, const TVector3 &point, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to the POCA to a point, and returns the extrapolation length and...

◆ extrapolateToPoint() [2/2]

double genfit::StateOnPlane::extrapolateToPoint ( const TVector3 &  point,
const TMatrixDSym &  G,
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 97 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToPoint().

100  {
101  return rep_->extrapolateToPoint(*this, point, G, stopAtBoundary, calcJacobianNoise);
102  }
virtual double extrapolateToPoint(StateOnPlane &state, const TVector3 &point, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to the POCA to a point, and returns the extrapolation length and...

◆ extrapolateToSphere()

double genfit::StateOnPlane::extrapolateToSphere ( double  radius,
const TVector3 &  point = TVector3(0., 0., 0.),
bool  stopAtBoundary = false,
bool  calcJacobianNoise = false 
)
inline

Definition at line 108 of file StateOnPlane.h.

References genfit::AbsTrackRep::extrapolateToSphere().

109  {
110  return rep_->extrapolateToSphere(*this, radius, point, stopAtBoundary, calcJacobianNoise);
111  }
virtual double extrapolateToSphere(StateOnPlane &state, double radius, const TVector3 &point=TVector3(0., 0., 0.), bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to the sphere surface, and returns the extrapolation length and...

◆ get6DState()

TVectorD genfit::StateOnPlane::get6DState ( ) const
inline

Definition at line 123 of file StateOnPlane.h.

References genfit::AbsTrackRep::get6DState().

123 { return rep_->get6DState(*this); }
virtual TVectorD get6DState(const StateOnPlane &state) const
Get the 6D state vector (x, y, z, p_x, p_y, p_z).

◆ getAuxInfo() [1/2]

const TVectorD& genfit::StateOnPlane::getAuxInfo ( ) const
inline

Definition at line 59 of file StateOnPlane.h.

References auxInfo_.

59 { return auxInfo_; }

◆ getAuxInfo() [2/2]

TVectorD& genfit::StateOnPlane::getAuxInfo ( )
inline

Definition at line 60 of file StateOnPlane.h.

References auxInfo_.

60 { return auxInfo_; }

◆ getCharge()

double genfit::StateOnPlane::getCharge ( ) const
inline

Definition at line 126 of file StateOnPlane.h.

References genfit::AbsTrackRep::getCharge().

126 { return rep_->getCharge(*this); }
virtual double getCharge(const StateOnPlane &state) const =0
Get the (fitted) charge of a state. This is not always equal the pdg charge (e.g. if the charge sign ...

◆ getDir()

TVector3 genfit::StateOnPlane::getDir ( ) const
inline

Definition at line 120 of file StateOnPlane.h.

References genfit::AbsTrackRep::getDir().

120 { return rep_->getDir(*this); }
TVector3 getDir(const StateOnPlane &state) const
Get the direction vector of a state.
Definition: AbsTrackRep.h:195

◆ getMass()

double genfit::StateOnPlane::getMass ( ) const
inline

Definition at line 128 of file StateOnPlane.h.

References genfit::AbsTrackRep::getMass().

128 { return rep_->getMass(*this); }
double getMass(const StateOnPlane &state) const
Get tha particle mass in GeV/c^2.

◆ getMom()

TVector3 genfit::StateOnPlane::getMom ( ) const
inline

Definition at line 119 of file StateOnPlane.h.

References genfit::AbsTrackRep::getMom().

119 { return rep_->getMom(*this); }
virtual TVector3 getMom(const StateOnPlane &state) const =0
Get the cartesian momentum vector of a state.

◆ getMomMag()

double genfit::StateOnPlane::getMomMag ( ) const
inline

Definition at line 124 of file StateOnPlane.h.

References genfit::AbsTrackRep::getMomMag().

124 { return rep_->getMomMag(*this); }
virtual double getMomMag(const StateOnPlane &state) const =0
get the magnitude of the momentum in GeV.

◆ getPDG()

int genfit::StateOnPlane::getPDG ( ) const
inline

Definition at line 125 of file StateOnPlane.h.

References genfit::AbsTrackRep::getPDG().

125 { return rep_->getPDG(); }
int getPDG() const
Get the pdg code.
Definition: AbsTrackRep.h:225

◆ getPlane()

const SharedPlanePtr& genfit::StateOnPlane::getPlane ( ) const
inline

Definition at line 61 of file StateOnPlane.h.

References sharedPlane_.

61 { return sharedPlane_; }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

◆ getPos()

TVector3 genfit::StateOnPlane::getPos ( ) const
inline

Definition at line 118 of file StateOnPlane.h.

References genfit::AbsTrackRep::getPos().

118 { return rep_->getPos(*this); }
virtual TVector3 getPos(const StateOnPlane &state) const =0
Get the cartesian position of a state.

◆ getPosDir()

void genfit::StateOnPlane::getPosDir ( TVector3 &  pos,
TVector3 &  dir 
) const
inline

Definition at line 122 of file StateOnPlane.h.

References genfit::AbsTrackRep::getPosDir().

122 { rep_->getPosDir(*this, pos, dir); }
void getPosDir(const StateOnPlane &state, TVector3 &pos, TVector3 &dir) const
Get cartesian position and direction vector of a state.
Definition: AbsTrackRep.h:201

◆ getPosMom()

void genfit::StateOnPlane::getPosMom ( TVector3 &  pos,
TVector3 &  mom 
) const
inline

Definition at line 121 of file StateOnPlane.h.

References genfit::AbsTrackRep::getPosMom().

121 { rep_->getPosMom(*this, pos, mom); }
virtual void getPosMom(const StateOnPlane &state, TVector3 &pos, TVector3 &mom) const =0
Get cartesian position and momentum vector of a state.

◆ getQop()

double genfit::StateOnPlane::getQop ( ) const
inline

Definition at line 127 of file StateOnPlane.h.

References genfit::AbsTrackRep::getQop().

127 { return rep_->getQop(*this); }
virtual double getQop(const StateOnPlane &state) const =0
Get charge over momentum.

◆ getRep()

◆ getState() [1/2]

const TVectorD& genfit::StateOnPlane::getState ( ) const
inline

Definition at line 57 of file StateOnPlane.h.

References state_.

Referenced by genfit::RKTrackRep::getQop(), and genfit::RKTrackRep::setQop().

57 { return state_; }

◆ getState() [2/2]

TVectorD& genfit::StateOnPlane::getState ( )
inline

Definition at line 58 of file StateOnPlane.h.

References state_.

58 { return state_; }

◆ getTime()

double genfit::StateOnPlane::getTime ( ) const
inline

Definition at line 129 of file StateOnPlane.h.

References genfit::AbsTrackRep::getTime().

129 { return rep_->getTime(*this); }
virtual double getTime(const StateOnPlane &) const =0
Get the time corresponding to the StateOnPlane. Extrapolation.

◆ operator=()

StateOnPlane & genfit::StateOnPlane::operator= ( StateOnPlane  other)
inline

Definition at line 176 of file StateOnPlane.h.

References swap().

177 {
178  swap(other);
179  return *this;
180 }
void swap(StateOnPlane &other)
Definition: StateOnPlane.h:182

◆ Print()

virtual void genfit::StateOnPlane::Print ( Option_t *  option = "") const
virtual

◆ setAuxInfo()

void genfit::StateOnPlane::setAuxInfo ( const TVectorD &  auxInfo)
inline

Definition at line 76 of file StateOnPlane.h.

References auxInfo_.

77  {
78  if (auxInfo_.GetNrows() == 0)
79  auxInfo_.ResizeTo(auxInfo);
80  auxInfo_ = auxInfo;
81  }

◆ setChargeSign()

void genfit::StateOnPlane::setChargeSign ( double  charge)
inline

Definition at line 133 of file StateOnPlane.h.

References genfit::AbsTrackRep::setChargeSign().

133 { rep_->setChargeSign(*this, charge); }
virtual void setChargeSign(StateOnPlane &state, double charge) const =0
Set the sign of the charge according to charge.

◆ setPlane()

void genfit::StateOnPlane::setPlane ( const SharedPlanePtr plane)
inline

Definition at line 70 of file StateOnPlane.h.

References sharedPlane_.

70 { sharedPlane_ = plane; }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

◆ setPosMom() [1/2]

void genfit::StateOnPlane::setPosMom ( const TVector3 &  pos,
const TVector3 &  mom 
)
inline

Definition at line 131 of file StateOnPlane.h.

References genfit::AbsTrackRep::setPosMom().

131 { rep_->setPosMom(*this, pos, mom); }
virtual void setPosMom(StateOnPlane &state, const TVector3 &pos, const TVector3 &mom) const =0
Set position and momentum of state.

◆ setPosMom() [2/2]

void genfit::StateOnPlane::setPosMom ( const TVectorD &  state6)
inline

Definition at line 132 of file StateOnPlane.h.

References genfit::AbsTrackRep::setPosMom().

132 { rep_->setPosMom(*this, state6); }
virtual void setPosMom(StateOnPlane &state, const TVector3 &pos, const TVector3 &mom) const =0
Set position and momentum of state.

◆ setQop()

void genfit::StateOnPlane::setQop ( double  qop)
inline

Definition at line 134 of file StateOnPlane.h.

References genfit::AbsTrackRep::setQop().

134 { rep_->setQop(*this, qop); }
virtual void setQop(StateOnPlane &state, double qop) const =0
Set charge/momentum.

◆ setRep()

void genfit::StateOnPlane::setRep ( const AbsTrackRep rep)
inline

Definition at line 82 of file StateOnPlane.h.

82 { rep_ = rep; }

◆ setState()

void genfit::StateOnPlane::setState ( const TVectorD &  state)
inline

Definition at line 64 of file StateOnPlane.h.

References state_.

Referenced by genfit::MeasuredStateOnPlane::setStateCov().

65  {
66  if (state_.GetNrows() == 0)
67  state_.ResizeTo(state);
68  state_ = state;
69  }

◆ setStatePlane()

void genfit::StateOnPlane::setStatePlane ( const TVectorD &  state,
const SharedPlanePtr plane 
)
inline

Definition at line 71 of file StateOnPlane.h.

References sharedPlane_, and state_.

Referenced by genfit::MeasuredStateOnPlane::setStateCovPlane().

72  {
73  state_ = state;
74  sharedPlane_ = plane;
75  }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

◆ setTime()

void genfit::StateOnPlane::setTime ( double  time)
inline

Definition at line 135 of file StateOnPlane.h.

References Print(), and genfit::AbsTrackRep::setTime().

135 { rep_->setTime(*this, time); }
virtual void setTime(StateOnPlane &state, double time) const =0
Set time at which the state was defined.

◆ swap()

void genfit::StateOnPlane::swap ( StateOnPlane other)
inline

Definition at line 182 of file StateOnPlane.h.

References auxInfo_, sharedPlane_, and state_.

Referenced by operator=(), and genfit::MeasuredStateOnPlane::swap().

183 {
184  this->state_.ResizeTo(other.state_);
185  std::swap(this->state_, other.state_);
186  this->auxInfo_.ResizeTo(other.auxInfo_);
187  std::swap(this->auxInfo_, other.auxInfo_);
188  this->sharedPlane_.swap(other.sharedPlane_);
189  std::swap(this->rep_, other.rep_);
190 }
SharedPlanePtr sharedPlane_
Definition: StateOnPlane.h:142

Member Data Documentation

◆ auxInfo_

TVectorD genfit::StateOnPlane::auxInfo_
protected

Definition at line 141 of file StateOnPlane.h.

Referenced by getAuxInfo(), setAuxInfo(), and swap().

◆ sharedPlane_

SharedPlanePtr genfit::StateOnPlane::sharedPlane_
protected

Definition at line 142 of file StateOnPlane.h.

Referenced by getPlane(), setPlane(), setStatePlane(), StateOnPlane(), and swap().

◆ state_

TVectorD genfit::StateOnPlane::state_
protected

Definition at line 140 of file StateOnPlane.h.

Referenced by getState(), setState(), setStatePlane(), StateOnPlane(), and swap().


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