30 using namespace Acts::UnitLiterals;
34 if (not((0 < theta) and (theta <
M_PI))) {
46 using namespace Acts::UnitLiterals;
50 if (not((0 < theta) and (theta <
M_PI))) {
80 using namespace Acts::UnitLiterals;
84 if (not((0 < theta) and (theta <
M_PI))) {
97 template <
typename charge_t>
103 using namespace Acts;
107 ref.template get<eBoundLoc0>(), epsPos);
109 ref.template get<eBoundLoc1>(), epsPos);
111 ref.template get<eBoundTime>(), epsPos);
114 ref.template get<eBoundPhi>()),
117 ref.template get<eBoundTheta>(), epsDir);
119 ref.template get<eBoundQOverP>(), epsMom);
132 template <
typename charge_t>
136 double relativeTolerance) {
155 template <
typename charge_t>
163 rotation.col(0) = unitU;
164 rotation.col(1) = unitV;
165 rotation.col(2) = unitW;
174 template <
typename charge_t>
175 std::shared_ptr<Acts::CylinderSurface> operator()(
180 return Acts::Surface::makeShared<Acts::CylinderSurface>(
181 Acts::Transform3D::Identity(),
radius, halfz);
187 template <
typename charge_t>
188 std::shared_ptr<Acts::DiscSurface> operator()(
191 using namespace Acts;
192 using namespace Acts::UnitLiterals;
203 cl.pretranslate(globalOriginDelta);
205 return Acts::Surface::makeShared<Acts::DiscSurface>(cl);
211 template <
typename charge_t>
212 std::shared_ptr<Acts::PlaneSurface> operator()(
215 return Acts::Surface::makeShared<Acts::PlaneSurface>(
222 template <
typename charge_t>
223 std::shared_ptr<Acts::StrawSurface> operator()(
226 return Acts::Surface::makeShared<Acts::StrawSurface>(
237 template <
typename,
typename>
244 using namespace Acts::UnitLiterals;
253 options.maxStepSize = 1_cm;
255 auto result = propagator.propagate(initialParams, options);
256 BOOST_CHECK(result.ok());
257 BOOST_CHECK(result.value().endParameters);
259 return {*result.value().endParameters, result.value().pathLength};
264 template <
typename,
typename>
271 using namespace Acts::UnitLiterals;
279 options.pathLimit = pathLimit;
280 options.maxStepSize = 1_cm;
282 auto result = propagator.propagate(initialParams, targetSurface, options);
283 BOOST_CHECK(result.ok());
284 BOOST_CHECK(result.value().endParameters);
286 return {*result.value().endParameters, result.value().pathLength};
295 template <
typename,
typename>
301 double pathLength,
double epsPos,
double epsDir,
double epsMom) {
303 auto [fwdParams, fwdPathLength] =
304 transportFreely<propagator_t, charge_t, options_t>(
308 auto [bwdParams, bwdPathLength] =
309 transportFreely<propagator_t, charge_t, options_t>(
321 template <
typename propagator_t,
typename charge_t,
typename surface_builder_t,
322 template <
typename,
typename>
328 double pathLength, surface_builder_t&& buildTargetSurface,
double epsPos,
329 double epsDir,
double epsMom) {
331 auto [freeParams, freePathLength] =
332 transportFreely<propagator_t, charge_t, options_t>(
336 auto surface = buildTargetSurface(freeParams, geoCtx);
341 auto [surfParams, surfPathLength] =
342 transportToSurface<propagator_t, charge_t, options_t>(
348 CHECK_CLOSE_ABS(surfParams.position(geoCtx), freeParams.position(geoCtx),
351 CHECK_CLOSE_ABS(surfParams.unitDirection(), freeParams.unitDirection(),
353 CHECK_CLOSE_ABS(surfParams.absoluteMomentum(), freeParams.absoluteMomentum(),
363 typename cmp_propagator_t,
typename ref_propagator_t,
typename charge_t,
366 const cmp_propagator_t& cmpPropagator,
370 double pathLength,
double epsPos,
double epsDir,
double epsMom,
373 auto [cmpParams, cmpPath] =
374 transportFreely<cmp_propagator_t, charge_t, options_t>(
376 auto [refParams, refPath] =
377 transportFreely<ref_propagator_t, charge_t, options_t>(
392 template <
typename cmp_propagator_t,
typename ref_propagator_t,
393 typename charge_t,
typename surface_builder_t,
394 template <
typename,
typename>
397 const cmp_propagator_t& cmpPropagator,
401 double pathLength, surface_builder_t&& buildTargetSurface,
double epsPos,
402 double epsDir,
double epsMom,
double tolCov) {
404 auto [freeParams, freePathLength] =
405 transportFreely<ref_propagator_t, charge_t, options_t>(
410 auto surface = buildTargetSurface(freeParams, geoCtx);
415 auto [cmpParams, cmpPath] =
416 transportToSurface<cmp_propagator_t, charge_t, options_t>(
419 auto [refParams, refPath] =
420 transportToSurface<ref_propagator_t, charge_t, options_t>(