24 #ifndef genfit_RKTrackRep_h 25 #define genfit_RKTrackRep_h 45 std::fill(state7_.
begin(), state7_.
end(), 0);
58 std::fill(jac7_.
begin(), jac7_.
end(), 0);
59 std::fill(noise7_.
begin(), jac7_.
end(), 0);
85 bool stopAtBoundary =
false,
86 bool calcJacobianNoise =
false)
const;
91 const TVector3& linePoint,
92 const TVector3& lineDirection,
93 bool stopAtBoundary =
false,
94 bool calcJacobianNoise =
false)
const;
97 const TVector3& point,
98 bool stopAtBoundary =
false,
99 bool calcJacobianNoise =
false)
const {
100 return extrapToPoint(state, point, NULL, stopAtBoundary, calcJacobianNoise);
104 const TVector3& point,
105 const TMatrixDSym& G,
106 bool stopAtBoundary =
false,
107 bool calcJacobianNoise =
false)
const {
108 return extrapToPoint(state, point, &G, stopAtBoundary, calcJacobianNoise);
111 virtual double extrapolateToCylinder(
StateOnPlane& state,
113 const TVector3& linePoint = TVector3(0.,0.,0.),
114 const TVector3& lineDirection = TVector3(0.,0.,1.),
115 bool stopAtBoundary =
false,
116 bool calcJacobianNoise =
false)
const;
121 const TVector3& linePoint = TVector3(0.,0.,0.),
122 const TVector3& lineDirection = TVector3(0.,0.,1.),
123 bool stopAtBoundary =
false,
124 bool calcJacobianNoise =
false)
const;
128 const TVector3& point = TVector3(0.,0.,0.),
129 bool stopAtBoundary =
false,
130 bool calcJacobianNoise =
false)
const;
134 bool stopAtBoundary =
false,
135 bool calcJacobianNoise =
false)
const;
140 virtual TVector3 getPos(
const StateOnPlane& state)
const;
142 virtual TVector3 getMom(
const StateOnPlane& state)
const;
143 virtual void getPosMom(
const StateOnPlane& state, TVector3& pos, TVector3& mom)
const;
145 virtual double getMomMag(
const StateOnPlane& state)
const;
149 virtual void getPosMomCov(
const MeasuredStateOnPlane& state, TVector3& pos, TVector3& mom, TMatrixDSym& cov)
const;
150 virtual double getCharge(
const StateOnPlane& state)
const;
155 virtual void getForwardJacobianAndNoise(TMatrixD& jacobian, TMatrixDSym& noise, TVectorD& deltaState)
const;
157 virtual void getBackwardJacobianAndNoise(TMatrixD& jacobian, TMatrixDSym& noise, TVectorD& deltaState)
const;
159 std::vector<genfit::MatStep> getSteps()
const;
161 virtual double getRadiationLenght()
const;
163 virtual void setPosMom(
StateOnPlane& state,
const TVector3& pos,
const TVector3& mom)
const;
164 virtual void setPosMom(
StateOnPlane& state,
const TVectorD& state6)
const;
165 virtual void setPosMomErr(
MeasuredStateOnPlane& state,
const TVector3& pos,
const TVector3& mom,
const TVector3& posErr,
const TVector3& momErr)
const;
166 virtual void setPosMomCov(
MeasuredStateOnPlane& state,
const TVector3& pos,
const TVector3& mom,
const TMatrixDSym& cov6x6)
const;
167 virtual void setPosMomCov(
MeasuredStateOnPlane& state,
const TVectorD& state6,
const TMatrixDSym& cov6x6)
const;
169 virtual void setChargeSign(
StateOnPlane& state,
double charge)
const;
184 double RKPropagate(
M1x7& state7,
188 bool varField =
true,
189 bool calcOnlyLastRowOfJ =
false)
const;
196 void initArrays()
const;
199 const TVector3& point,
200 const TMatrixDSym* G = NULL,
201 bool stopAtBoundary =
false,
202 bool calcJacobianNoise =
false)
const;
210 void calcJ_pM_5x7(
M5x7& J_pM,
const TVector3& U,
const TVector3& V,
const M1x3& pTilde,
double spu)
const;
215 void transformM7P(
const M7x7& in7x7,
219 void calcJ_Mp_7x5(
M7x5& J_Mp,
const TVector3& U,
const TVector3& V,
const TVector3& W,
const M1x3& A)
const;
221 void calcForwardJacobianAndNoise(
const M1x7& startState7,
const DetPlane& startPlane,
222 const M1x7& destState7,
const DetPlane& destPlane)
const;
224 void transformM6P(
const M6x6& in6x6,
238 bool RKutta(
const M1x4& SU,
244 M1x7* J_MMT_unprojected_lastRow,
245 double& coveredDistance,
248 M7x7& noiseProjection,
250 bool onlyOneStep =
false,
251 bool calcOnlyLastRowOfJ =
false)
const;
253 double estimateStep(
const M1x7& state7,
256 const double& charge,
260 TVector3 pocaOnLine(
const TVector3& linePoint,
261 const TVector3& lineDirection,
262 const TVector3& point)
const;
273 double Extrap(
const DetPlane& startPlane,
280 bool fillExtrapSteps,
281 TMatrixDSym* cov =
nullptr,
282 bool onlyOneStep =
false,
283 bool stopAtBoundary =
false,
284 double maxStep = 1.E99)
const;
288 double momMag(
const M1x7& state7)
const;
320 #endif // genfit_RKTrackRep_h 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...
Helper to store different limits on the stepsize for the RKTRackRep.
M7x7 noiseProjection_
noise matrix of the last extrapolation
virtual double getQop(const StateOnPlane &state) const
Get charge over momentum.
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.
const TVectorD & getState() const
int RKStepsFXStart_
RungeKutta steps made in the last extrapolation.
virtual void setQop(StateOnPlane &state, double qop) const
Set charge/momentum.
TMatrixD fJacobian_
steps made in Extrap during last extrapolation
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...
virtual AbsTrackRep * clone() const
Clone the trackRep.
StateOnPlane lastEndState_
state where the last extrapolation has started
StateOnPlane with additional covariance matrix.
Simple struct containing MaterialProperties and stepsize in the material.
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...
unsigned int cachePos_
use cached RKSteps_ for extrapolation
Abstract base class for a track representation.
StateOnPlane lastStartState_
unsigned int getDim() const
Get the dimension of the state vector used by the track representation.
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v) ...
A state with arbitrary dimension defined in a DetPlane.
std::vector< RKStep > RKSteps_
state where the last extrapolation has ended
std::vector< ExtrapStep > ExtrapSteps_
Defines for I/O streams used for error and debug printing.