24 #ifndef genfit_StateOnPlane_h 25 #define genfit_StateOnPlane_h 66 if (
state_.GetNrows() == 0)
89 double extrapolateToLine(
const TVector3 &linePoint,
const TVector3 &lineDirection,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
91 return rep_->
extrapolateToLine(*
this, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);
93 double extrapolateToPoint(
const TVector3 &point,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
99 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
103 double extrapolateToCylinder(
double radius,
const TVector3 &linePoint = TVector3(0., 0., 0.),
const TVector3 &lineDirection = TVector3(0., 0., 1.),
bool stopAtBoundary =
false,
104 bool calcJacobianNoise =
false)
106 return rep_->
extrapolateToCylinder(*
this, radius, linePoint, lineDirection, stopAtBoundary, calcJacobianNoise);
108 double extrapolateToSphere(
double radius,
const TVector3 &point = TVector3(0., 0., 0.),
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
112 double extrapolateBy(
double step,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false) {
return rep_->
extrapolateBy(*
this, step, stopAtBoundary, calcJacobianNoise); }
137 virtual void Print(Option_t *option =
"")
const;
158 if (rep !=
nullptr) {
165 assert(rep !=
nullptr);
172 assert(rep !=
nullptr);
189 std::swap(this->rep_, other.rep_);
195 #endif // genfit_StateOnPlane_h double extrapolateToMeasurement(StateOnPlane &state, const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
extrapolate to an AbsMeasurement
virtual void setTime(StateOnPlane &state, double time) const =0
Set time at which the state was defined.
const TVectorD & getState() const
double getMass(const StateOnPlane &state) const
Get tha particle mass in GeV/c^2.
double extrapolateToCylinder(double radius, const TVector3 &linePoint=TVector3(0., 0., 0.), const TVector3 &lineDirection=TVector3(0., 0., 1.), bool stopAtBoundary=false, bool calcJacobianNoise=false)
void getPosDir(const StateOnPlane &state, TVector3 &pos, TVector3 &dir) const
Get cartesian position and direction vector of a state.
double extrapolateToPlane(const SharedPlanePtr &plane, bool stopAtBoundary=false, bool calcJacobianNoise=false)
double extrapolateBy(double step, bool stopAtBoundary=false, bool calcJacobianNoise=false)
double extrapolateToSphere(double radius, const TVector3 &point=TVector3(0., 0., 0.), bool stopAtBoundary=false, bool calcJacobianNoise=false)
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...
virtual unsigned int getDim() const =0
Get the dimension of the state vector used by the track representation.
void setChargeSign(double charge)
StateOnPlane & operator=(StateOnPlane other)
virtual double getMomMag(const StateOnPlane &state) const =0
get the magnitude of the momentum in GeV.
Abstract base class for a track representation.
virtual double getQop(const StateOnPlane &state) const =0
Get charge over momentum.
double extrapolateToMeasurement(const AbsMeasurement *measurement, bool stopAtBoundary=false, bool calcJacobianNoise=false)
void setState(const TVectorD &state)
void setStatePlane(const TVectorD &state, const SharedPlanePtr &plane)
virtual TVectorD get6DState(const StateOnPlane &state) const
Get the 6D state vector (x, y, z, p_x, p_y, p_z).
virtual double getTime(const StateOnPlane &) const =0
Get the time corresponding to the StateOnPlane. Extrapolation.
TVectorD get6DState() const
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...
void setPosMom(const TVector3 &pos, const TVector3 &mom)
virtual void Print(Option_t *option="") const
const TVectorD & getAuxInfo() const
virtual void setChargeSign(StateOnPlane &state, double charge) const =0
Set the sign of the charge according to charge.
A state with arbitrary dimension defined in a DetPlane.
StateOnPlane(const AbsTrackRep *rep=nullptr)
void swap(StateOnPlane &other)
double extrapolateToPoint(const TVector3 &point, const TMatrixDSym &G, bool stopAtBoundary=false, bool calcJacobianNoise=false)
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 ...
const AbsTrackRep * getRep() const
void setPosMom(const TVectorD &state6)
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...
virtual TVector3 getPos(const StateOnPlane &state) const =0
Get the cartesian position of a state.
int getPDG() const
Get the pdg code.
void setPlane(const SharedPlanePtr &plane)
double extrapolateToLine(const TVector3 &linePoint, const TVector3 &lineDirection, bool stopAtBoundary=false, bool calcJacobianNoise=false)
virtual TVector3 getMom(const StateOnPlane &state) const =0
Get the cartesian momentum vector of a state.
virtual void getPosMom(const StateOnPlane &state, TVector3 &pos, TVector3 &mom) const =0
Get cartesian position and momentum vector of a state.
TVector3 getDir(const StateOnPlane &state) const
Get the direction vector of a state.
void setRep(const AbsTrackRep *rep)
Contains the measurement and covariance in raw detector coordinates.
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
void setTime(double time)
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...
void getPosDir(TVector3 &pos, TVector3 &dir) const
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...
void setAuxInfo(const TVectorD &auxInfo)
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.
virtual void setQop(StateOnPlane &state, double qop) const =0
Set charge/momentum.
double extrapolateToPoint(const TVector3 &point, bool stopAtBoundary=false, bool calcJacobianNoise=false)
const SharedPlanePtr & getPlane() const
virtual void setPosMom(StateOnPlane &state, const TVector3 &pos, const TVector3 &mom) const =0
Set position and momentum of state.
void getPosMom(TVector3 &pos, TVector3 &mom) const
SharedPlanePtr sharedPlane_