23 #ifndef genfit_AbsTrackRep_h 24 #define genfit_AbsTrackRep_h 34 #include <TMatrixDSym.h> 87 virtual double extrapolateToPlane(
90 bool stopAtBoundary =
false,
91 bool calcJacobianNoise =
false)
const = 0;
103 const TVector3& linePoint,
104 const TVector3& lineDirection,
105 bool stopAtBoundary =
false,
106 bool calcJacobianNoise =
false)
const = 0;
121 const TVector3& point1,
122 const TVector3& point2,
125 TVector3& poca_onwire,
126 bool stopAtBoundary =
false,
127 bool calcJacobianNoise =
false)
const {
128 TVector3 wireDir(point2 - point1);
130 double retval = this->extrapolateToLine(state, point1, wireDir, stopAtBoundary, calcJacobianNoise);
131 poca = this->getPos(state);
132 dirInPoca = this->getMom(state);
135 poca_onwire = point1 + wireDir*((poca - point1)*wireDir);
150 const TVector3& point,
151 bool stopAtBoundary =
false,
152 bool calcJacobianNoise =
false)
const = 0;
164 const TVector3& point,
165 const TMatrixDSym& G,
166 bool stopAtBoundary =
false,
167 bool calcJacobianNoise =
false)
const = 0;
178 virtual double extrapolateToCylinder(
StateOnPlane& state,
180 const TVector3& linePoint = TVector3(0.,0.,0.),
181 const TVector3& lineDirection = TVector3(0.,0.,1.),
182 bool stopAtBoundary =
false,
183 bool calcJacobianNoise =
false)
const = 0;
196 const TVector3& linePoint = TVector3(0.,0.,0.),
197 const TVector3& lineDirection = TVector3(0.,0.,1.),
198 bool stopAtBoundary =
false,
199 bool calcJacobianNoise =
false)
const = 0;
212 const TVector3& point = TVector3(0.,0.,0.),
213 bool stopAtBoundary =
false,
214 bool calcJacobianNoise =
false)
const = 0;
227 bool stopAtBoundary =
false,
228 bool calcJacobianNoise =
false)
const = 0;
233 bool stopAtBoundary =
false,
234 bool calcJacobianNoise =
false)
const;
237 virtual unsigned int getDim()
const = 0;
240 virtual TVector3 getPos(
const StateOnPlane& state)
const = 0;
243 virtual TVector3 getMom(
const StateOnPlane& state)
const = 0;
249 virtual void getPosMom(
const StateOnPlane& state, TVector3& pos, TVector3& mom)
const = 0;
252 void getPosDir(
const StateOnPlane& state, TVector3& pos, TVector3& dir)
const {getPosMom(state, pos, dir); dir.SetMag(1.);}
255 virtual TVectorD get6DState(
const StateOnPlane& state)
const;
261 virtual void getPosMomCov(
const MeasuredStateOnPlane& state, TVector3& pos, TVector3& mom, TMatrixDSym& cov)
const = 0;
264 virtual void get6DStateCov(
const MeasuredStateOnPlane& state, TVectorD& stateVec, TMatrixDSym& cov)
const;
267 virtual double getMomMag(
const StateOnPlane& state)
const = 0;
275 double getPDGCharge()
const;
281 virtual double getCharge(
const StateOnPlane& state)
const = 0;
283 virtual double getQop(
const StateOnPlane& state)
const = 0;
291 virtual void getForwardJacobianAndNoise(TMatrixD& jacobian, TMatrixDSym& noise, TVectorD& deltaState)
const = 0;
294 virtual void getBackwardJacobianAndNoise(TMatrixD& jacobian, TMatrixDSym& noise, TVectorD& deltaState)
const = 0;
297 virtual std::vector<genfit::MatStep> getSteps()
const = 0;
300 virtual double getRadiationLenght()
const = 0;
312 TMatrixD& jacobian)
const;
315 bool switchPDGSign();
318 virtual void setPosMom(
StateOnPlane& state,
const TVector3& pos,
const TVector3& mom)
const = 0;
320 virtual void setPosMom(
StateOnPlane& state,
const TVectorD& state6)
const = 0;
322 virtual void setPosMomErr(
MeasuredStateOnPlane& state,
const TVector3& pos,
const TVector3& mom,
const TVector3& posErr,
const TVector3& momErr)
const = 0;
324 virtual void setPosMomCov(
MeasuredStateOnPlane& state,
const TVector3& pos,
const TVector3& mom,
const TMatrixDSym& cov6x6)
const = 0;
326 virtual void setPosMomCov(
MeasuredStateOnPlane& state,
const TVectorD& state6,
const TMatrixDSym& cov6x6)
const = 0;
329 virtual void setChargeSign(
StateOnPlane& state,
double charge)
const = 0;
331 virtual void setQop(
StateOnPlane& state,
double qop)
const = 0;
333 virtual void setTime(
StateOnPlane& state,
double time)
const = 0;
337 if (dir>0) propDir_ = 1;
338 else if (dir<0) propDir_ = -1;
346 virtual bool isSameType(
const AbsTrackRep* other) = 0;
353 virtual void Print(
const Option_t* =
"")
const;
378 #endif // genfit_AbsTrackRep_h TVector3 getDir(const StateOnPlane &state) const
Get the direction vector of a state.
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.
char propDir_
propagation direction (-1, 0, 1) -> (backward, auto, forward)
Contains the measurement and covariance in raw detector coordinates.
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
void switchPropDir()
Switch propagation direction. Has no effect if propDir_ is set to 0.
void getPosDir(const StateOnPlane &state, TVector3 &pos, TVector3 &dir) const
Get cartesian position and direction vector of a state.
void setPropDir(int dir)
Set propagation direction. (-1, 0, 1) -> (backward, auto, forward).
char getPropDir() const
Get propagation direction. (-1, 0, 1) -> (backward, auto, forward).
StateOnPlane with additional covariance matrix.
Simple struct containing MaterialProperties and stepsize in the material.
Abstract base class for a track representation.
int pdgCode_
Particle code.
Material properties needed e.g. for material effects calculation.
A state with arbitrary dimension defined in a DetPlane.
virtual void setDebugLvl(unsigned int lvl=1)
MaterialProperties materialProperties_
int getPDG() const
Get the pdg code.
Defines for I/O streams used for error and debug printing.