77// file, You can obtain one at http://mozilla.org/MPL/2.0/.
88
99#include " Acts/Utilities/Zip.hpp"
10+ #include " Acts/Propagator/detail/MultiStepperUtils.hpp"
1011
1112namespace Acts {
1213
@@ -65,8 +66,8 @@ void MultiEigenStepperSIMD<N, AA, BB, CC, DD>::transportCovarianceToCurvilinear(
6566template <int N, typename AA, typename BB, typename CC, typename DD>
6667Intersection3D::Status
6768MultiEigenStepperSIMD<N, AA, BB, CC, DD>::updateSurfaceStatus(
68- State& state, const Surface& surface, Direction navDir,
69- const BoundaryCheck& bcheck, const Logger& l ) const {
69+ State& state, const Surface& surface, std:: uint8_t index, Direction navDir,
70+ const BoundaryCheck& bcheck, const Logger& /* l */ ) const {
7071 ACTS_DEBUG (" MultiEigenStepperSIMD::updateSurfaceStatus" );
7172
7273 std::array<int , 4 > counts = {0 , 0 , 0 , 0 };
@@ -80,7 +81,7 @@ MultiEigenStepperSIMD<N, AA, BB, CC, DD>::updateSurfaceStatus(
8081 const auto prevStatus = cmp.status ();
8182
8283 cmp.status () = detail::updateSingleSurfaceStatus<SingleProxyStepper>(
83- cmp.singleStepper (*this ), state, surface, navDir, bcheck,
84+ cmp.singleStepper (*this ), state, surface, index, navDir, bcheck,
8485 s_onSurfaceTolerance, logger () /* Acts::getDummyLogger()*/ );
8586
8687 ACTS_VERBOSE (" cmp" << cmp.index () << " : " << prevStatus << " -> " << cmp.status ());
@@ -103,6 +104,21 @@ MultiEigenStepperSIMD<N, AA, BB, CC, DD>::updateSurfaceStatus(
103104 return Status::missed;
104105}
105106
107+ template <int N, typename AA, typename BB, typename CC, typename DD>
108+ auto MultiEigenStepperSIMD<N, AA, BB, CC, DD>::boundState(
109+ State& state, const Surface& surface,
110+ bool transportCov,
111+ const FreeToBoundCorrection& freeToBoundCorrection) const -> Result<BoundState> {
112+ return detail::multiComponentBoundState (*this , state, surface, transportCov, freeToBoundCorrection);
113+ }
114+
115+ template <int N, typename AA, typename BB, typename CC, typename DD>
116+ auto MultiEigenStepperSIMD<N, AA, BB, CC, DD>::curvilinearState(
117+ State& state,
118+ bool transportCov) const -> CurvilinearState {
119+ return detail::multiComponentCurvilinearState (*this , state, transportCov);
120+ }
121+
106122// Seperated stepsize estimate from Single eigen stepper
107123// / TODO state should be constant, but then magne
108124template <int N, typename AA, typename BB, typename CC, typename DD>
@@ -184,7 +200,7 @@ Result<double> MultiEigenStepperSIMD<N, AA, BB, CC, DD>::estimate_step_size(
184200 0.25 )),
185201 4 .);
186202
187- current_estimate.setValue (current_estimate.value () * stepSizeScaling);
203+ current_estimate.update (current_estimate.value () * stepSizeScaling, ConstrainedStep::actor );
188204
189205 // If step size becomes too small the particle remains at the initial
190206 // place
@@ -219,9 +235,15 @@ Result<double> MultiEigenStepperSIMD<N, AA, BB, CC, DD>::step(
219235 const auto dir = multiDirection (stepping);
220236
221237 ACTS_VERBOSE (" Pos before step:" );
222- ACTS_VERBOSE (" x = " << multiPosition (stepping)[0 ]);
223- ACTS_VERBOSE (" y = " << multiPosition (stepping)[1 ]);
224- ACTS_VERBOSE (" z = " << multiPosition (stepping)[2 ]);
238+ ACTS_VERBOSE (" x = " << pos[0 ]);
239+ ACTS_VERBOSE (" y = " << pos[1 ]);
240+ ACTS_VERBOSE (" z = " << pos[2 ]);
241+
242+
243+ ACTS_VERBOSE (" Dir before step:" );
244+ ACTS_VERBOSE (" dx = " << dir[0 ]);
245+ ACTS_VERBOSE (" dy = " << dir[1 ]);
246+ ACTS_VERBOSE (" dz = " << dir[2 ]);
225247
226248 // First Runge-Kutta point
227249 sd.B_first = getMultiField (stepping, pos);
@@ -270,7 +292,7 @@ Result<double> MultiEigenStepperSIMD<N, AA, BB, CC, DD>::step(
270292 // }();
271293
272294 SimdScalar h = 0 ;
273- for (int i = 0 ; i < stepping.stepSizes .size (); ++i) {
295+ for (auto i = 0ul ; i < stepping.stepSizes .size (); ++i) {
274296 h[i] = stepping.stepSizes [i].value ();
275297 }
276298
@@ -285,13 +307,23 @@ Result<double> MultiEigenStepperSIMD<N, AA, BB, CC, DD>::step(
285307 const SimdScalar half_h = h * SimdScalar (0.5 );
286308
287309 // Second Runge-Kutta point
288- const SimdVector3 pos1 = pos + half_h * dir + h2 * 0.125 * sd.k1 ;
310+ const SimdVector3 pos1 = pos + half_h * dir + h2 * SimdScalar ( 0.125 ) * sd.k1 ;
289311 sd.B_middle = getMultiField (stepping, pos1);
312+
313+ ACTS_VERBOSE (" Runge-Kutta k1:" );
314+ ACTS_VERBOSE (" x = " << sd.k1 [0 ]);
315+ ACTS_VERBOSE (" y = " << sd.k1 [1 ]);
316+ ACTS_VERBOSE (" z = " << sd.k1 [2 ]);
290317
291318 if (!stepping.extension .k2 (state, MultiProxyStepper{}, navigator, sd.k2 ,
292319 sd.B_middle , sd.kQoP , half_h, sd.k1 )) {
293320 return EigenStepperError::StepInvalid;
294321 }
322+
323+ ACTS_VERBOSE (" Runge-Kutta k2:" );
324+ ACTS_VERBOSE (" x = " << sd.k2 [0 ]);
325+ ACTS_VERBOSE (" y = " << sd.k2 [1 ]);
326+ ACTS_VERBOSE (" z = " << sd.k2 [2 ]);
295327
296328 // check for nan
297329 for (int i = 0 ; i < 3 ; ++i) {
@@ -312,12 +344,22 @@ Result<double> MultiEigenStepperSIMD<N, AA, BB, CC, DD>::step(
312344 // Last Runge-Kutta point
313345 const SimdVector3 pos2 = pos + h * dir + h2 * 0.5 * sd.k3 ;
314346 sd.B_last = getMultiField (stepping, pos2);
347+
348+ ACTS_VERBOSE (" Runge-Kutta k3:" );
349+ ACTS_VERBOSE (" x = " << sd.k3 [0 ]);
350+ ACTS_VERBOSE (" y = " << sd.k3 [1 ]);
351+ ACTS_VERBOSE (" z = " << sd.k3 [2 ]);
315352
316353 if (!stepping.extension .k4 (state, MultiProxyStepper{}, navigator, sd.k4 ,
317354 sd.B_last , sd.kQoP , h, sd.k3 )) {
318355 return EigenStepperError::StepInvalid;
319356 }
320-
357+
358+ ACTS_VERBOSE (" Runge-Kutta k4:" );
359+ ACTS_VERBOSE (" x = " << sd.k4 [0 ]);
360+ ACTS_VERBOSE (" y = " << sd.k4 [1 ]);
361+ ACTS_VERBOSE (" z = " << sd.k4 [2 ]);
362+
321363 // check for nan
322364 for (int i = 0 ; i < 3 ; ++i) {
323365 assert (!sd.k4 [i].isNaN ().any () && " k4 contains nan" );
0 commit comments