18 template <
typename path_aborter_t,
typename propagator_state_t,
21 path_aborter_t& pathAborter,
bool releaseLimit,
23 if (!state.options.loopProtection) {
28 pathAborter.internalLimit =
29 state.options.direction * std::numeric_limits<double>::max();
34 stepper.getField(state.stepping, stepper.position(state.stepping));
38 ACTS_WARNING(
"Field lookup was unsuccessful, this is very likely an error");
42 const double B = field.norm();
48 const double p = stepper.absoluteMomentum(state.stepping);
50 const double helixPath = state.options.direction * 2 * M_PI * p / B;
52 const double loopLimit = state.options.loopFraction * helixPath;
53 const double previousLimit = pathAborter.internalLimit;
54 if (std::abs(loopLimit) < std::abs(previousLimit)) {
55 pathAborter.internalLimit = loopLimit;
58 << loopLimit <<
" (full helix = " << helixPath
59 <<
", previous limit = " << previousLimit <<
")");
62 << loopLimit <<
" (full helix = " << helixPath
63 <<
", previous limit = " << previousLimit <<
")");