22 template <
typename scalar_t>
35 template <
typename propagator_state_t,
typename stepper_t,
37 int bid(
const propagator_state_t& ,
const stepper_t& ,
38 const navigator_t& )
const {
59 template <
typename propagator_state_t,
typename stepper_t,
63 const Vector3&
bField, std::array<Scalar, 4>& kQoP,
const int i = 0,
64 const double h = 0.,
const ThisVector3& kprev = ThisVector3::Zero()) {
65 auto qop = stepper.qOverP(state.stepping);
68 knew = qop * stepper.direction(state.stepping).cross(bField);
69 kQoP = {0., 0., 0., 0.};
72 qop * (stepper.direction(state.stepping) +
h * kprev).
cross(bField);
90 template <
typename propagator_state_t,
typename stepper_t,
92 bool finalize(propagator_state_t& state,
const stepper_t& stepper,
93 const navigator_t&
navigator,
const double h)
const {
112 template <
typename propagator_state_t,
typename stepper_t,
113 typename navigator_t>
114 bool finalize(propagator_state_t& state,
const stepper_t& stepper,
131 template <
typename propagator_state_t,
typename stepper_t,
132 typename navigator_t>
134 const navigator_t& ,
const double h)
const {
141 auto m = stepper.particleHypothesis(state.stepping).mass();
142 auto p = stepper.absoluteMomentum(state.stepping);
143 auto dtds = hypot(1,
m /
p);
144 state.stepping.pars[
eFreeTime] += h * dtds;
145 if (state.stepping.covTransport) {
146 state.stepping.derivative(3) = dtds;
162 template <
typename propagator_state_t,
typename stepper_t,
163 typename navigator_t>
165 const navigator_t& ,
const double h,
189 auto m = state.stepping.particleHypothesis.mass();
190 auto& sd = state.stepping.stepData;
191 auto dir = stepper.direction(state.stepping);
192 auto qop = stepper.qOverP(state.stepping);
193 auto p = stepper.absoluteMomentum(state.stepping);
194 auto dtds = hypot(1,
m /
p);
196 D = FreeMatrix::Identity();
198 double half_h = h * 0.5;
201 auto dFdT = D.block<3, 3>(0, 4);
202 auto dFdL = D.block<3, 1>(0, 7);
204 auto dGdT = D.block<3, 3>(4, 4);
205 auto dGdL = D.block<3, 1>(4, 7);
212 Vector3 dk1dL = Vector3::Zero();
213 Vector3 dk2dL = Vector3::Zero();
214 Vector3 dk3dL = Vector3::Zero();
215 Vector3 dk4dL = Vector3::Zero();
218 dk1dL = dir.cross(sd.B_first);
219 dk2dL = (dir + half_h * sd.k1).
cross(sd.B_middle) +
220 qop * half_h * dk1dL.cross(sd.B_middle);
221 dk3dL = (dir + half_h * sd.k2).
cross(sd.B_middle) +
222 qop * half_h * dk2dL.cross(sd.B_middle);
224 (dir + h * sd.k3).
cross(sd.B_last) + qop * h * dk3dL.cross(sd.B_last);
226 dk1dT(0, 1) = sd.B_first.z();
227 dk1dT(0, 2) = -sd.B_first.y();
228 dk1dT(1, 0) = -sd.B_first.z();
229 dk1dT(1, 2) = sd.B_first.x();
230 dk1dT(2, 0) = sd.B_first.y();
231 dk1dT(2, 1) = -sd.B_first.x();
234 dk2dT += half_h * dk1dT;
237 dk3dT += half_h * dk2dT;
244 dFdT += h / 6. * (dk1dT + dk2dT + dk3dT);
247 dFdL = (h *
h) / 6. * (dk1dL + dk2dL + dk3dL);
249 dGdT += h / 6. * (dk1dT + 2. * (dk2dT + dk3dT) + dk4dT);
251 dGdL = h / 6. * (dk1dL + 2. * (dk2dL + dk3dL) + dk4dL);
253 D(3, 7) = h *
m *
m * qop / dtds;