32 using namespace Acts::UnitLiterals;
36 if (not((0 < theta) and (theta < M_PI))) {
51 using namespace Acts::UnitLiterals;
55 if (not((0 < theta) and (theta < M_PI))) {
88 using namespace Acts::UnitLiterals;
92 if (not((0 < theta) and (theta < M_PI))) {
109 double epsPos,
double epsDir,
111 using namespace Acts;
115 ref.template get<eBoundLoc0>(), epsPos);
117 ref.template get<eBoundLoc1>(), epsPos);
119 ref.template get<eBoundTime>(), epsPos);
122 ref.template get<eBoundPhi>()),
125 ref.template get<eBoundTheta>(), epsDir);
127 ref.template get<eBoundQOverP>(), epsMom);
142 double relativeTolerance) {
168 rotation.col(0) = unitU;
169 rotation.col(1) = unitV;
170 rotation.col(2) = unitW;
179 std::shared_ptr<Acts::CylinderSurface> operator()(
182 auto radius = params.
position(geoCtx).template head<2>().
norm();
183 auto halfz = std::numeric_limits<double>::max();
184 return Acts::Surface::makeShared<Acts::CylinderSurface>(
185 Acts::Transform3::Identity(), radius, halfz);
191 std::shared_ptr<Acts::DiscSurface> operator()(
194 using namespace Acts;
195 using namespace Acts::UnitLiterals;
206 cl.pretranslate(globalOriginDelta);
208 return Acts::Surface::makeShared<Acts::DiscSurface>(cl);
214 std::shared_ptr<Acts::PlaneSurface> operator()(
217 return Acts::Surface::makeShared<Acts::PlaneSurface>(
224 std::shared_ptr<Acts::StrawSurface> operator()(
227 return Acts::Surface::makeShared<Acts::StrawSurface>(
237 template <
typename propagator_t,
template <
typename,
typename>
243 using namespace Acts::UnitLiterals;
245 using Actions = Acts::ActionList<>;
246 using Aborts = Acts::AbortList<>;
249 options_t<Actions, Aborts>
options(geoCtx, magCtx);
252 options.targetTolerance = 1_nm;
253 options.tolerance = 1_nm;
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};
263 template <
typename propagator_t,
template <
typename,
typename>
270 using namespace Acts::UnitLiterals;
272 using Actions = Acts::ActionList<>;
273 using Aborts = Acts::AbortList<>;
276 options_t<Actions, Aborts>
options(geoCtx, magCtx);
278 options.pathLimit = pathLimit;
279 options.targetTolerance = 1_nm;
280 options.tolerance = 1_nm;
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};
294 template <
typename propagator_t,
template <
typename,
typename>
300 double epsPos,
double epsDir,
double epsMom) {
302 auto [fwdParams, fwdPathLength] = transportFreely<propagator_t, options_t>(
306 auto [bwdParams, bwdPathLength] = transportFreely<propagator_t, options_t>(
318 template <
typename propagator_t,
typename surface_builder_t,
319 template <
typename,
typename>
325 surface_builder_t&& buildTargetSurface,
double epsPos,
double epsDir,
328 auto [freeParams, freePathLength] = transportFreely<propagator_t, options_t>(
332 auto surface = buildTargetSurface(freeParams, geoCtx);
337 auto [surfParams, surfPathLength] =
338 transportToSurface<propagator_t, options_t>(propagator,
geoCtx,
magCtx,
344 CHECK_CLOSE_ABS(surfParams.position(geoCtx), freeParams.position(geoCtx),
347 CHECK_CLOSE_ABS(surfParams.direction(), freeParams.direction(), epsDir);
348 CHECK_CLOSE_ABS(surfParams.absoluteMomentum(), freeParams.absoluteMomentum(),
357 template <
typename cmp_propagator_t,
typename ref_propagator_t,
358 template <
typename,
typename>
361 const cmp_propagator_t& cmpPropagator,
365 double epsPos,
double epsDir,
double epsMom,
double tolCov) {
367 auto [cmpParams, cmpPath] = transportFreely<cmp_propagator_t, options_t>(
369 auto [refParams, refPath] = transportFreely<ref_propagator_t, options_t>(
384 template <
typename cmp_propagator_t,
typename ref_propagator_t,
385 typename surface_builder_t,
386 template <
typename,
typename>
389 const cmp_propagator_t& cmpPropagator,
393 surface_builder_t&& buildTargetSurface,
double epsPos,
double epsDir,
394 double epsMom,
double tolCov) {
396 auto [freeParams, freePathLength] =
397 transportFreely<ref_propagator_t, options_t>(
402 auto surface = buildTargetSurface(freeParams, geoCtx);
407 auto [cmpParams, cmpPath] = transportToSurface<cmp_propagator_t, options_t>(
409 auto [refParams, refPath] = transportToSurface<ref_propagator_t, options_t>(