SND@LHC Software
Loading...
Searching...
No Matches
genfit::StateOnPlane Class Reference

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

#include <StateOnPlane.h>

Inheritance diagram for genfit::StateOnPlane:
Collaboration diagram for genfit::StateOnPlane:

Public Member Functions

 StateOnPlane (const AbsTrackRep *rep=NULL)
 
 StateOnPlane (const TVectorD &state, const SharedPlanePtr &plane, const AbsTrackRep *rep)
 
 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
 
void setPosMom (const TVector3 &pos, const TVector3 &mom)
 
void setPosMom (const TVectorD &state6)
 
void setChargeSign (double charge)
 
void setQop (double qop)
 
virtual void Print (Option_t *option="") const
 

Protected Attributes

TVectorD state_
 
TVectorD auxInfo_
 
SharedPlanePtr sharedPlane_
 

Private Attributes

const AbsTrackReprep_
 Shared ownership. '!' in order to silence ROOT, custom streamer writes and reads this.
 

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 45 of file StateOnPlane.h.

Constructor & Destructor Documentation

◆ StateOnPlane() [1/3]

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

Definition at line 142 of file StateOnPlane.h.

142 :
143 state_(0), auxInfo_(0), sharedPlane_(), rep_(rep)
144{
145 if (rep != NULL) {
146 state_.ResizeTo(rep->getDim());
147 }
148}
SharedPlanePtr sharedPlane_
const AbsTrackRep * rep_
Shared ownership. '!' in order to silence ROOT, custom streamer writes and reads this.

◆ StateOnPlane() [2/3]

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

Definition at line 150 of file StateOnPlane.h.

150 :
151 state_(state), auxInfo_(0), sharedPlane_(plane), rep_(rep)
152{
153 assert(rep != NULL);
154 assert(sharedPlane_.get() != NULL);
155}

◆ StateOnPlane() [3/3]

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

Definition at line 157 of file StateOnPlane.h.

157 :
158 state_(state), auxInfo_(auxInfo), sharedPlane_(plane), rep_(rep)
159{
160 assert(rep != NULL);
161 assert(sharedPlane_.get() != NULL);
162}

◆ ~StateOnPlane()

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

Definition at line 57 of file StateOnPlane.h.

57{}

Member Function Documentation

◆ extrapolateBy()

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

Definition at line 96 of file StateOnPlane.h.

98 {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 87 of file StateOnPlane.h.

91 {return rep_->extrapolateToCylinder(*this, radius, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);}
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 76 of file StateOnPlane.h.

79 {return rep_->extrapolateToLine(*this, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);}
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 99 of file StateOnPlane.h.

101 {return rep_->extrapolateToMeasurement(*this, measurement, stopAtBoundary, calcJacobianNoise);}
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 73 of file StateOnPlane.h.

75 {return rep_->extrapolateToPlane(*this, plane, stopAtBoundary, calcJacobianNoise);}
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,...

◆ extrapolateToPoint() [1/2]

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

Definition at line 80 of file StateOnPlane.h.

82 {return rep_->extrapolateToPoint(*this, point, stopAtBoundary, calcJacobianNoise);}
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 83 of file StateOnPlane.h.

86 {return rep_->extrapolateToPoint(*this, point, G, stopAtBoundary, calcJacobianNoise);}

◆ extrapolateToSphere()

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

Definition at line 92 of file StateOnPlane.h.

95 {return rep_->extrapolateToSphere(*this, radius, point, stopAtBoundary, calcJacobianNoise);}
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 109 of file StateOnPlane.h.

109{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]

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

Definition at line 62 of file StateOnPlane.h.

62{return auxInfo_;}

◆ getAuxInfo() [2/2]

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

Definition at line 61 of file StateOnPlane.h.

61{return auxInfo_;}

◆ getCharge()

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

Definition at line 112 of file StateOnPlane.h.

112{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 106 of file StateOnPlane.h.

106{return rep_->getDir(*this);}
TVector3 getDir(const StateOnPlane &state) const
Get the direction vector of a state.

◆ getMass()

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

Definition at line 114 of file StateOnPlane.h.

114{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 105 of file StateOnPlane.h.

105{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 110 of file StateOnPlane.h.

110{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 111 of file StateOnPlane.h.

111{return rep_->getPDG();}
int getPDG() const
Get the pdg code.

◆ getPlane()

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

Definition at line 63 of file StateOnPlane.h.

63{return sharedPlane_;}

◆ getPos()

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

Definition at line 104 of file StateOnPlane.h.

104{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 108 of file StateOnPlane.h.

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

◆ getPosMom()

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

Definition at line 107 of file StateOnPlane.h.

107{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 113 of file StateOnPlane.h.

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

◆ getRep()

const AbsTrackRep * genfit::StateOnPlane::getRep ( ) const
inline

Definition at line 64 of file StateOnPlane.h.

64{return rep_;}

◆ getState() [1/2]

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

Definition at line 60 of file StateOnPlane.h.

60{return state_;}

◆ getState() [2/2]

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

Definition at line 59 of file StateOnPlane.h.

59{return state_;}

◆ operator=()

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

Definition at line 164 of file StateOnPlane.h.

164 {
165 swap(other);
166 return *this;
167}
void swap(StateOnPlane &other)

◆ Print()

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

Reimplemented in genfit::MeasuredStateOnPlane, genfit::MeasurementOnPlane, and genfit::ReferenceStateOnPlane.

Definition at line 30 of file StateOnPlane.cc.

30 {
31 std::cout << "genfit::StateOnPlane ";
32 std::cout << " state vector: "; state_.Print();
33 if (sharedPlane_ != NULL) {
34 std::cout << " defined in plane "; sharedPlane_->Print();
35 TVector3 pos, mom;
36 getRep()->getPosMom(*this, pos, mom);
37 std::cout << " 3D position: "; pos.Print();
38 std::cout << " 3D momentum: "; mom.Print();
39 }
40}
const AbsTrackRep * getRep() const

◆ setAuxInfo()

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

Definition at line 69 of file StateOnPlane.h.

69{if(auxInfo_.GetNrows() == 0) auxInfo_.ResizeTo(auxInfo); auxInfo_ = auxInfo;}

◆ setChargeSign()

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

Definition at line 118 of file StateOnPlane.h.

118{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 67 of file StateOnPlane.h.

67{sharedPlane_ = plane;}

◆ setPosMom() [1/2]

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

Definition at line 116 of file StateOnPlane.h.

116{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 117 of file StateOnPlane.h.

117{rep_->setPosMom(*this, state6);}

◆ setQop()

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

Definition at line 119 of file StateOnPlane.h.

119{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 70 of file StateOnPlane.h.

70{rep_ = rep;}

◆ setState()

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

Definition at line 66 of file StateOnPlane.h.

66{if(state_.GetNrows() == 0) state_.ResizeTo(state); state_ = state;}

◆ setStatePlane()

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

Definition at line 68 of file StateOnPlane.h.

68{state_ = state; sharedPlane_ = plane;}

◆ swap()

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

Definition at line 169 of file StateOnPlane.h.

169 {
170 this->state_.ResizeTo(other.state_);
171 std::swap(this->state_, other.state_);
172 this->auxInfo_.ResizeTo(other.auxInfo_);
173 std::swap(this->auxInfo_, other.auxInfo_);
174 this->sharedPlane_.swap(other.sharedPlane_);
175 std::swap(this->rep_, other.rep_);
176}

Member Data Documentation

◆ auxInfo_

TVectorD genfit::StateOnPlane::auxInfo_
protected

Definition at line 127 of file StateOnPlane.h.

◆ rep_

const AbsTrackRep* genfit::StateOnPlane::rep_
private

Shared ownership. '!' in order to silence ROOT, custom streamer writes and reads this.

Pointer to TrackRep with respect to which StateOnPlane is defined

Definition at line 134 of file StateOnPlane.h.

◆ sharedPlane_

SharedPlanePtr genfit::StateOnPlane::sharedPlane_
protected

Definition at line 128 of file StateOnPlane.h.

◆ state_

TVectorD genfit::StateOnPlane::state_
protected

Definition at line 126 of file StateOnPlane.h.


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