17 template <
typename path_arborter_t>
26 template <
typename propagator_state_t,
typename stepper_t>
29 if (state.options.loopProtection) {
32 stepper.getField(state.stepping, stepper.position(state.stepping));
33 const double B = field.norm();
36 const double p = stepper.momentum(state.stepping);
38 const double helixPath = state.stepping.navDir * 2 *
M_PI * p /
B;
41 state.options.abortList.template get<path_arborter_t>();
42 double loopLimit = state.options.loopFraction * helixPath;
43 double pathLimit = pathAborter.internalLimit;
44 if (loopLimit * loopLimit < pathLimit * pathLimit) {
45 pathAborter.internalLimit = loopLimit;
47 std::stringstream dstream;
48 dstream <<
"Path aborter limit set to ";
49 dstream << loopLimit <<
" (full helix = " << helixPath <<
")";
69 template <
typename propagator_state_t>
72 if (state.options.debug) {
73 std::vector<std::string> lines;
74 std::string input = logAction();
76 for (
const auto& line : lines) {
77 std::stringstream dstream;
79 dstream <<
" ∞ " << std::setw(state.options.debugPfxWidth)
80 <<
" loop protection "
82 dstream << std::setw(state.options.debugMsgWidth) << line <<
'\n';
83 state.options.debugString += dstream.str();