24#ifndef genfit_StateOnPlane_h
25#define genfit_StateOnPlane_h
74 bool stopAtBoundary =
false,
75 bool calcJacobianNoise =
false) {
return rep_->
extrapolateToPlane(*
this, plane, stopAtBoundary, calcJacobianNoise);}
77 const TVector3& lineDirection,
78 bool stopAtBoundary =
false,
79 bool calcJacobianNoise =
false) {
return rep_->
extrapolateToLine(*
this, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);}
81 bool stopAtBoundary =
false,
82 bool calcJacobianNoise =
false) {
return rep_->
extrapolateToPoint(*
this, point, stopAtBoundary, calcJacobianNoise);}
85 bool stopAtBoundary =
false,
86 bool calcJacobianNoise =
false) {
return rep_->
extrapolateToPoint(*
this, point, G, stopAtBoundary, calcJacobianNoise);}
88 const TVector3& linePoint = TVector3(0.,0.,0.),
89 const TVector3& lineDirection = TVector3(0.,0.,1.),
90 bool stopAtBoundary =
false,
91 bool calcJacobianNoise =
false) {
return rep_->
extrapolateToCylinder(*
this, radius, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);}
93 const TVector3& point = TVector3(0.,0.,0.),
94 bool stopAtBoundary =
false,
95 bool calcJacobianNoise =
false) {
return rep_->
extrapolateToSphere(*
this, radius, point, stopAtBoundary, calcJacobianNoise);}
97 bool stopAtBoundary =
false,
98 bool calcJacobianNoise =
false) {
return rep_->
extrapolateBy(*
this, step, stopAtBoundary, calcJacobianNoise);}
100 bool stopAtBoundary =
false,
122 virtual void Print(Option_t* option =
"")
const;
143 state_(0), auxInfo_(0), sharedPlane_(), rep_(rep)
151 state_(state), auxInfo_(0), sharedPlane_(plane), rep_(rep)
158 state_(state), auxInfo_(auxInfo), sharedPlane_(plane), rep_(rep)
Contains the measurement and covariance in raw detector coordinates.
Abstract base class for a track representation.
virtual void getPosMom(const StateOnPlane &state, TVector3 &pos, TVector3 &mom) const =0
Get cartesian position and momentum vector of a state.
double extrapolateToMeasurement(StateOnPlane &state, const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
extrapolate to an AbsMeasurement
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,...
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,...
TVector3 getDir(const StateOnPlane &state) const
Get the direction vector of a state.
void getPosDir(const StateOnPlane &state, TVector3 &pos, TVector3 &dir) const
Get cartesian position and direction vector of a state.
virtual double getQop(const StateOnPlane &state) const =0
Get charge over momentum.
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,...
virtual TVector3 getMom(const StateOnPlane &state) const =0
Get the cartesian momentum vector of a state.
virtual void setPosMom(StateOnPlane &state, const TVector3 &pos, const TVector3 &mom) const =0
Set position and momentum of state.
int getPDG() const
Get the pdg code.
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 ...
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,...
double getMass(const StateOnPlane &state) const
Get tha particle mass in GeV/c^2.
virtual void setChargeSign(StateOnPlane &state, double charge) const =0
Set the sign of the charge according to charge.
virtual TVector3 getPos(const StateOnPlane &state) const =0
Get the cartesian position of a state.
virtual double getMomMag(const StateOnPlane &state) const =0
get the magnitude of the momentum in GeV.
virtual void setQop(StateOnPlane &state, double qop) const =0
Set charge/momentum.
virtual TVectorD get6DState(const StateOnPlane &state) const
Get the 6D state vector (x, y, z, p_x, p_y, p_z).
virtual unsigned int getDim() const =0
Get the dimension of the state vector used by the track representation.
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,...
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,...
A state with arbitrary dimension defined in a DetPlane.
void setPlane(const SharedPlanePtr &plane)
double extrapolateToLine(const TVector3 &linePoint, const TVector3 &lineDirection, bool stopAtBoundary=false, bool calcJacobianNoise=false)
void setPosMom(const TVectorD &state6)
double extrapolateBy(double step, bool stopAtBoundary=false, bool calcJacobianNoise=false)
double extrapolateToPoint(const TVector3 &point, const TMatrixDSym &G, bool stopAtBoundary=false, bool calcJacobianNoise=false)
void setChargeSign(double charge)
const TVectorD & getState() const
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 extrapolateToPlane(const SharedPlanePtr &plane, bool stopAtBoundary=false, bool calcJacobianNoise=false)
virtual void Print(Option_t *option="") const
SharedPlanePtr sharedPlane_
const AbsTrackRep * rep_
Shared ownership. '!' in order to silence ROOT, custom streamer writes and reads this.
double extrapolateToPoint(const TVector3 &point, bool stopAtBoundary=false, bool calcJacobianNoise=false)
void getPosDir(TVector3 &pos, TVector3 &dir) const
TVectorD get6DState() const
StateOnPlane & operator=(StateOnPlane other)
StateOnPlane(const AbsTrackRep *rep=NULL)
void setPosMom(const TVector3 &pos, const TVector3 &mom)
void setAuxInfo(const TVectorD &auxInfo)
void swap(StateOnPlane &other)
double extrapolateToMeasurement(const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false)
void setState(const TVectorD &state)
void getPosMom(TVector3 &pos, TVector3 &mom) const
void setRep(const AbsTrackRep *rep)
void setStatePlane(const TVectorD &state, const SharedPlanePtr &plane)
const AbsTrackRep * getRep() const
const TVectorD & getAuxInfo() const
const SharedPlanePtr & getPlane() const
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.