23 #ifndef genfit_AbsTrackRep_h 24 #define genfit_AbsTrackRep_h 34 #include <TMatrixDSym.h> 94 extrapolateToLine(
StateOnPlane &state,
const TVector3 &linePoint,
const TVector3 &lineDirection,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
108 virtual double extrapolateToLine(
StateOnPlane &state,
const TVector3 &point1,
const TVector3 &point2, TVector3 &poca, TVector3 &dirInPoca, TVector3 &poca_onwire,
109 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const 111 TVector3 wireDir(point2 - point1);
113 double retval = this->extrapolateToLine(state, point1, wireDir, stopAtBoundary, calcJacobianNoise);
114 poca = this->getPos(state);
115 dirInPoca = this->getMom(state);
118 poca_onwire = point1 + wireDir * ((poca - point1) * wireDir);
132 virtual double extrapolateToPoint(
StateOnPlane &state,
const TVector3 &point,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
143 virtual double extrapolateToPoint(
StateOnPlane &state,
const TVector3 &point,
144 const TMatrixDSym &G,
145 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
156 virtual double extrapolateToCylinder(
StateOnPlane &state,
double radius,
const TVector3 &linePoint = TVector3(0., 0., 0.),
const TVector3 &lineDirection = TVector3(0., 0., 1.),
157 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
169 extrapolateToSphere(
StateOnPlane &state,
double radius,
const TVector3 &point = TVector3(0., 0., 0.),
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
180 virtual double extrapolateBy(
StateOnPlane &state,
double step,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const = 0;
183 double extrapolateToMeasurement(
StateOnPlane &state,
const AbsMeasurement *measurement,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
186 virtual unsigned int getDim()
const = 0;
189 virtual TVector3 getPos(
const StateOnPlane &state)
const = 0;
192 virtual TVector3 getMom(
const StateOnPlane &state)
const = 0;
198 virtual void getPosMom(
const StateOnPlane &state, TVector3 &pos, TVector3 &mom)
const = 0;
203 getPosMom(state, pos, dir);
208 virtual TVectorD get6DState(
const StateOnPlane &state)
const;
214 virtual void getPosMomCov(
const MeasuredStateOnPlane &state, TVector3 &pos, TVector3 &mom, TMatrixDSym &cov)
const = 0;
217 virtual void get6DStateCov(
const MeasuredStateOnPlane &state, TVectorD &stateVec, TMatrixDSym &cov)
const;
220 virtual double getMomMag(
const StateOnPlane &state)
const = 0;
228 double getPDGCharge()
const;
234 virtual double getCharge(
const StateOnPlane &state)
const = 0;
236 virtual double getQop(
const StateOnPlane &state)
const = 0;
244 virtual void getForwardJacobianAndNoise(
TMatrixD &jacobian, TMatrixDSym &noise, TVectorD &deltaState)
const = 0;
247 virtual void getBackwardJacobianAndNoise(
TMatrixD &jacobian, TMatrixDSym &noise, TVectorD &deltaState)
const = 0;
250 virtual std::vector<genfit::MatStep> getSteps()
const = 0;
253 virtual double getRadiationLenght()
const = 0;
266 bool switchPDGSign();
269 virtual void setPosMom(
StateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom)
const = 0;
271 virtual void setPosMom(
StateOnPlane &state,
const TVectorD &state6)
const = 0;
273 virtual void setPosMomErr(
MeasuredStateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom,
const TVector3 &posErr,
const TVector3 &momErr)
const = 0;
275 virtual void setPosMomCov(
MeasuredStateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom,
const TMatrixDSym &cov6x6)
const = 0;
277 virtual void setPosMomCov(
MeasuredStateOnPlane &state,
const TVectorD &state6,
const TMatrixDSym &cov6x6)
const = 0;
280 virtual void setChargeSign(
StateOnPlane &state,
double charge)
const = 0;
282 virtual void setQop(
StateOnPlane &state,
double qop)
const = 0;
284 virtual void setTime(
StateOnPlane &state,
double time)
const = 0;
301 virtual bool isSameType(
const AbsTrackRep *other) = 0;
306 virtual void setDebugLvl(
unsigned int lvl = 1) { debugLvl_ = lvl; }
308 virtual void Print(
const Option_t * =
"")
const;
330 #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