24 #ifndef genfit_RKTrackRep_h 25 #define genfit_RKTrackRep_h 42 RKStep() { memset(state7_, 0x00, 7 *
sizeof(
double)); }
54 memset(jac7_, 0,
sizeof(
M7x7));
55 memset(noise7_, 0,
sizeof(
M7x7));
76 virtual double extrapolateToPlane(
StateOnPlane &state,
const SharedPlanePtr &plane,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
81 extrapolateToLine(
StateOnPlane &state,
const TVector3 &linePoint,
const TVector3 &lineDirection,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
85 return extrapToPoint(state, point,
nullptr, stopAtBoundary, calcJacobianNoise);
90 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const 92 return extrapToPoint(state, point, &G, stopAtBoundary, calcJacobianNoise);
95 virtual double extrapolateToCylinder(
StateOnPlane &state,
double radius,
const TVector3 &linePoint = TVector3(0., 0., 0.),
const TVector3 &lineDirection = TVector3(0., 0., 1.),
96 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
99 extrapolateToSphere(
StateOnPlane &state,
double radius,
const TVector3 &point = TVector3(0., 0., 0.),
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
101 virtual double extrapolateBy(
StateOnPlane &state,
double step,
bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
103 unsigned int getDim()
const {
return 5; }
105 virtual TVector3 getPos(
const StateOnPlane &state)
const;
107 virtual TVector3 getMom(
const StateOnPlane &state)
const;
108 virtual void getPosMom(
const StateOnPlane &state, TVector3 &pos, TVector3 &mom)
const;
110 virtual double getMomMag(
const StateOnPlane &state)
const;
114 virtual void getPosMomCov(
const MeasuredStateOnPlane &state, TVector3 &pos, TVector3 &mom, TMatrixDSym &cov)
const;
115 virtual double getCharge(
const StateOnPlane &state)
const;
120 virtual void getForwardJacobianAndNoise(
TMatrixD &jacobian, TMatrixDSym &noise, TVectorD &deltaState)
const;
122 virtual void getBackwardJacobianAndNoise(
TMatrixD &jacobian, TMatrixDSym &noise, TVectorD &deltaState)
const;
124 std::vector<genfit::MatStep> getSteps()
const;
126 virtual double getRadiationLenght()
const;
128 virtual void setPosMom(
StateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom)
const;
129 virtual void setPosMom(
StateOnPlane &state,
const TVectorD &state6)
const;
130 virtual void setPosMomErr(
MeasuredStateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom,
const TVector3 &posErr,
const TVector3 &momErr)
const;
131 virtual void setPosMomCov(
MeasuredStateOnPlane &state,
const TVector3 &pos,
const TVector3 &mom,
const TMatrixDSym &cov6x6)
const;
132 virtual void setPosMomCov(
MeasuredStateOnPlane &state,
const TVectorD &state6,
const TMatrixDSym &cov6x6)
const;
134 virtual void setChargeSign(
StateOnPlane &state,
double charge)
const;
148 double RKPropagate(
M1x7 &state7,
M7x7 *jacobian,
M1x3 &SA,
double S,
bool varField =
true,
bool calcOnlyLastRowOfJ =
false)
const;
154 void initArrays()
const;
156 virtual double extrapToPoint(
StateOnPlane &state,
const TVector3 &point,
157 const TMatrixDSym *G =
nullptr,
158 bool stopAtBoundary =
false,
bool calcJacobianNoise =
false)
const;
165 void calcJ_pM_5x7(
M5x7 &J_pM,
const TVector3 &U,
const TVector3 &V,
const M1x3 &pTilde,
double spu)
const;
169 void transformM7P(
const M7x7 &in7x7,
const M1x7 &state7,
172 void calcJ_Mp_7x5(
M7x5 &J_Mp,
const TVector3 &U,
const TVector3 &V,
const TVector3 &W,
const M1x3 &A)
const;
174 void calcForwardJacobianAndNoise(
const M1x7 &startState7,
const DetPlane &startPlane,
const M1x7 &destState7,
const DetPlane &destPlane)
const;
176 void transformM6P(
const M6x6 &in6x6,
const M1x7 &state7,
189 bool RKutta(
const M1x4 &SU,
const DetPlane &plane,
double charge,
double mass,
M1x7 &state7,
M7x7 *jacobianT,
M1x7 *J_MMT_unprojected_lastRow,
190 double &coveredDistance,
191 double &flightTime,
bool &checkJacProj,
M7x7 &noiseProjection,
StepLimits &limits,
bool onlyOneStep =
false,
bool calcOnlyLastRowOfJ =
false)
const;
193 double estimateStep(
const M1x7 &state7,
const M1x4 &SU,
const DetPlane &plane,
const double &charge,
double &relMomLoss,
StepLimits &limits)
const;
195 TVector3 pocaOnLine(
const TVector3 &linePoint,
const TVector3 &lineDirection,
const TVector3 &point)
const;
206 double Extrap(
const DetPlane &startPlane,
208 double charge,
double mass,
bool &isAtBoundary,
M1x7 &state7,
double &flightTime,
bool fillExtrapSteps, TMatrixDSym *cov =
nullptr,
bool onlyOneStep =
false,
209 bool stopAtBoundary =
false,
double maxStep = 1.E99)
const;
213 double momMag(
const M1x7 &state7)
const;
217 mutable std::vector<RKStep> RKSteps_;
218 mutable int RKStepsFXStart_;
219 mutable int RKStepsFXStop_;
220 mutable std::vector<ExtrapStep> ExtrapSteps_;
223 mutable TMatrixDSym fNoise_;
225 mutable bool useCache_;
226 mutable unsigned int cachePos_;
231 mutable M7x7 noiseArray_;
232 mutable M7x7 noiseProjection_;
242 #endif // genfit_RKTrackRep_h const TVectorD & getState() const
Simple struct containing MaterialProperties and stepsize in the material.
Helper to store different limits on the stepsize for the RKTRackRep.
Abstract base class for a track representation.
StateOnPlane with additional covariance matrix.
virtual AbsTrackRep * clone() const
Clone the trackRep.
A state with arbitrary dimension defined in a DetPlane.
virtual void setQop(StateOnPlane &state, double qop) const
Set charge/momentum.
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
virtual double getQop(const StateOnPlane &state) const
Get charge over momentum.
virtual double extrapolateToPoint(StateOnPlane &state, const TVector3 &point, const TMatrixDSym &G, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
Extrapolates the state to the POCA to a point in the metric of G, and returns the extrapolation lengt...
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...
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v) ...
virtual double extrapolateToPoint(StateOnPlane &state, const TVector3 &point, bool stopAtBoundary=false, bool calcJacobianNoise=false) const
Extrapolates the state to the POCA to a point, and returns the extrapolation length and...
TMatrixT< double > TMatrixD
unsigned int getDim() const
Get the dimension of the state vector used by the track representation.