13 #include <type_traits>
15 template <
typename S,
typename N>
16 template <
typename result_t,
typename propagator_state_t>
18 result_t& result)
const
24 m_navigator.initialize(
state, m_stepper);
31 bool terminatedNormally =
true;
34 if (!
state.options.abortList(
state, m_stepper, m_navigator, result,
39 terminatedNormally =
false;
42 for (; result.steps <
state.options.maxSteps; ++result.steps) {
44 m_navigator.preStep(
state, m_stepper);
50 result.pathLength +=
s;
53 ACTS_ERROR(
"Step failed with " << res.error() <<
": "
54 << res.error().message());
60 m_navigator.postStep(
state, m_stepper);
62 if (
state.options.abortList(
state, m_stepper, m_navigator, result,
64 terminatedNormally =
true;
69 ACTS_VERBOSE(
"Propagation terminated without going into stepping loop.");
74 if (!terminatedNormally) {
75 m_navigator.navigationBreak(
state.navigation,
true);
76 ACTS_ERROR(
"Propagation reached the step count limit of "
77 <<
state.options.maxSteps <<
" (did " << result.steps
79 return PropagatorError::StepCountLimitReached;
90 template <
typename S,
typename N>
91 template <
typename parameters_t,
typename propagator_options_t,
92 typename path_aborter_t>
94 const propagator_options_t&
options,
95 bool makeCurvilinear)
const
98 typename propagator_options_t::action_list_type>> {
103 "return track parameter type must be copy-constructible");
108 typename propagator_options_t::action_list_type>;
110 return propagate<parameters_t, propagator_options_t, path_aborter_t>(
114 template <
typename S,
typename N>
115 template <
typename parameters_t,
typename propagator_options_t,
116 typename path_aborter_t>
118 const parameters_t&
start,
const propagator_options_t&
options,
119 bool makeCurvilinear,
121 typename propagator_options_t::action_list_type>&&
125 typename propagator_options_t::action_list_type>> {
126 static_assert(Concepts::BoundTrackParametersConcept<parameters_t>,
127 "Parameters do not fulfill bound parameters concept.");
129 using ResultType = std::decay_t<decltype(inputResult)>;
132 using ReturnParameterType = StepperCurvilinearTrackParameters;
135 "return track parameter type must be copy-constructible");
138 path_aborter_t pathAborter;
139 pathAborter.internalLimit = options.pathLimit;
141 auto abortList = options.abortList.append(pathAborter);
144 auto eOptions = options.extend(abortList);
145 using OptionsType = decltype(eOptions);
147 using StateType = State<OptionsType>;
150 m_stepper.makeState(eOptions.geoContext, eOptions.magFieldContext, start,
151 eOptions.maxStepSize),
152 m_navigator.makeState(&start.referenceSurface(),
nullptr)};
156 StateType&,
const N&>,
157 "Step method of the Stepper is not compatible with the propagator "
162 state, m_stepper,
state.options.abortList.template get<path_aborter_t>(),
165 auto result = propagate_impl<ResultType>(
state, inputResult);
167 if (makeCurvilinear) {
169 auto curvState = m_stepper.curvilinearState(state.stepping);
171 inputResult.endParameters =
172 std::get<StepperCurvilinearTrackParameters>(curvState);
174 if (state.stepping.covTransport) {
175 inputResult.transportJacobian = std::get<Jacobian>(curvState);
180 return result.error();
184 template <
typename S,
typename N>
185 template <
typename parameters_t,
typename propagator_options_t,
186 typename target_aborter_t,
typename path_aborter_t>
189 const propagator_options_t& options)
const
192 typename propagator_options_t::action_list_type>> {
193 static_assert(Concepts::BoundTrackParametersConcept<parameters_t>,
194 "Parameters do not fulfill bound parameters concept.");
197 using return_parameter_type = StepperBoundTrackParameters;
202 typename propagator_options_t::action_list_type>;
204 return propagate<parameters_t, propagator_options_t, target_aborter_t,
208 template <
typename S,
typename N>
209 template <
typename parameters_t,
typename propagator_options_t,
210 typename target_aborter_t,
typename path_aborter_t>
213 const propagator_options_t& options,
215 typename propagator_options_t::action_list_type>
218 StepperBoundTrackParameters,
219 typename propagator_options_t::action_list_type>> {
220 static_assert(Concepts::BoundTrackParametersConcept<parameters_t>,
221 "Parameters do not fulfill bound parameters concept.");
223 using ResultType = std::decay_t<decltype(inputResult)>;
226 target_aborter_t targetAborter;
227 path_aborter_t pathAborter;
228 pathAborter.internalLimit = options.pathLimit;
229 auto abortList = options.abortList.append(targetAborter, pathAborter);
232 auto eOptions = options.extend(abortList);
233 using OptionsType = decltype(eOptions);
236 using StateType = State<OptionsType>;
239 m_stepper.makeState(eOptions.geoContext, eOptions.magFieldContext, start,
240 eOptions.maxStepSize),
241 m_navigator.makeState(&start.referenceSurface(), &
target)};
245 StateType&,
const N&>,
246 "Step method of the Stepper is not compatible with the propagator "
251 state, m_stepper,
state.options.abortList.template get<path_aborter_t>(),
255 auto result = propagate_impl<ResultType>(
state, inputResult);
259 auto bsRes = m_stepper.boundState(state.stepping, target);
261 return bsRes.error();
264 const auto& bs = *bsRes;
267 inputResult.endParameters = std::get<StepperBoundTrackParameters>(bs);
269 if (state.stepping.covTransport) {
270 inputResult.transportJacobian = std::get<Jacobian>(bs);
274 return result.error();