35 #ifndef genfit_AbsTrackRep_h 36 #define genfit_AbsTrackRep_h 46 #include <TMatrixDSym.h> 106 extrapolateToLine(
StateOnPlane &state,
const TVector3 &linePoint,
const TVector3 &lineDirection,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
120 virtual double extrapolateToLine(
StateOnPlane &state,
const TVector3 &point1,
const TVector3 &point2, TVector3 &poca, TVector3 &dirInPoca, TVector3 &poca_onwire,
121 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const 123 TVector3 wireDir(point2 - point1);
125 double retval = this->extrapolateToLine(state, point1, wireDir, stopAtBoundary, calcJacobianNoise);
126 poca = this->getPos(state);
127 dirInPoca = this->getMom(state);
130 poca_onwire = point1 + wireDir * ((poca - point1) * wireDir);
144 virtual double extrapolateToPoint(
StateOnPlane &state,
const TVector3 &point,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
155 virtual double extrapolateToPoint(
StateOnPlane &state,
const TVector3 &point,
156 const TMatrixDSym &G,
157 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
168 virtual double extrapolateToCylinder(
StateOnPlane &state,
double radius,
const TVector3 &linePoint = TVector3(0., 0., 0.),
const TVector3 &lineDirection = TVector3(0., 0., 1.),
169 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
181 extrapolateToSphere(
StateOnPlane &state,
double radius,
const TVector3 &point = TVector3(0., 0., 0.),
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
192 virtual double extrapolateBy(
StateOnPlane &state,
double step,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
195 double extrapolateToMeasurement(
StateOnPlane &state,
const AbsMeasurement *measurement,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
198 virtual unsigned int getDim()
const = 0;
201 virtual TVector3 getPos(
const StateOnPlane &state)
const = 0;
204 virtual TVector3 getMom(
const StateOnPlane &state)
const = 0;
210 virtual void getPosMom(
const StateOnPlane &state, TVector3 &pos, TVector3 &mom)
const = 0;
215 getPosMom(state, pos, dir);
220 virtual TVectorD get6DState(
const StateOnPlane &state)
const;
226 virtual void getPosMomCov(
const MeasuredStateOnPlane &state, TVector3 &pos, TVector3 &mom, TMatrixDSym &cov)
const = 0;
229 virtual void get6DStateCov(
const MeasuredStateOnPlane &state, TVectorD &stateVec, TMatrixDSym &cov)
const;
232 virtual double getMomMag(
const StateOnPlane &state)
const = 0;
240 double getPDGCharge()
const;
246 virtual double getCharge(
const StateOnPlane &state)
const = 0;
248 virtual double getQop(
const StateOnPlane &state)
const = 0;
256 virtual void getForwardJacobianAndNoise(
TMatrixD &jacobian, TMatrixDSym &noise, TVectorD &deltaState)
const = 0;
259 virtual void getBackwardJacobianAndNoise(
TMatrixD &jacobian, TMatrixDSym &noise, TVectorD &deltaState)
const = 0;
262 virtual std::vector<genfit::MatStep> getSteps()
const = 0;
265 virtual double getRadiationLenght()
const = 0;
278 bool switchPDGSign();
281 virtual void setPosMom(
StateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom)
const = 0;
283 virtual void setPosMom(
StateOnPlane &state,
const TVectorD &state6)
const = 0;
285 virtual void setPosMomErr(
MeasuredStateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom,
const TVector3 &posErr,
const TVector3 &momErr)
const = 0;
287 virtual void setPosMomCov(
MeasuredStateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom,
const TMatrixDSym &cov6x6)
const = 0;
289 virtual void setPosMomCov(
MeasuredStateOnPlane &state,
const TVectorD &state6,
const TMatrixDSym &cov6x6)
const = 0;
292 virtual void setChargeSign(
StateOnPlane &state,
double charge)
const = 0;
294 virtual void setQop(
StateOnPlane &state,
double qop)
const = 0;
296 virtual void setTime(
StateOnPlane &state,
double time)
const = 0;
313 virtual bool isSameType(
const AbsTrackRep *other) = 0;
318 virtual void setDebugLvl(
unsigned int lvl = 1) { debugLvl_ = lvl; }
320 virtual void Print(
const Option_t * =
"")
const;
342 #endif // genfit_AbsTrackRep_h virtual double extrapolateToLine(StateOnPlane &state, const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &dirInPoca, TVector3 &poca_onwire, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
Resembles the interface of GFAbsTrackRep in old versions of genfit.
void getPosDir(const StateOnPlane &state, TVector3 &pos, TVector3 &dir) const
Get cartesian position and direction vector of a state.
Simple struct containing MaterialProperties and stepsize in the material.
void setPropDir(int dir)
Set propagation direction. (-1, 0, 1) -> (backward, auto, forward).
Abstract base class for a track representation.
void switchPropDir()
Switch propagation direction. Has no effect if propDir_ is set to 0.
StateOnPlane with additional covariance matrix.
Material properties needed e.g. for material effects calculation.
virtual void setDebugLvl(unsigned int lvl=1)
MaterialProperties materialProperties_
char getPropDir() const
Get propagation direction. (-1, 0, 1) -> (backward, auto, forward).
char propDir_
propagation direction (-1, 0, 1) -> (backward, auto, forward)
A state with arbitrary dimension defined in a DetPlane.
int getPDG() const
Get the pdg code.
TVector3 getDir(const StateOnPlane &state) const
Get the direction vector of a state.
int pdgCode_
Particle code.
Contains the measurement and covariance in raw detector coordinates.
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
TMatrixT< double > TMatrixD