9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
47 namespace tt = boost::test_tools;
48 using namespace Acts::UnitLiterals;
69 const double Bz = 2_T;
97 template <
typename rpropagator_t,
typename dpropagator_t>
98 void runTest(
const rpropagator_t& rprop,
const dpropagator_t& dprop,
double pT,
100 double dcharge = -1 + 2 *
charge;
107 double p = pT / sin(theta);
109 dcharge / p, std::nullopt,
115 using RefereceActionList = ActionList<MaterialInteractor, SurfaceCollector<>>;
116 using ReferenceAbortList = AbortList<EndOfWorld>;
126 auto& sCollector = pOptions.actionList.template get<SurfaceCollector<>>();
127 sCollector.selector.selectSensitive =
true;
128 sCollector.selector.selectMaterial =
true;
131 const auto& pResult = rprop.propagate(start, pOptions).value();
132 auto& cSurfaces = pResult.template get<SurfaceCollector<>::result_type>();
133 auto& cMaterial = pResult.template get<MaterialInteractor::result_type>();
134 const Surface& destination = pResult.endParameters->referenceSurface();
136 std::cout <<
" - the standard navigator yielded "
137 << cSurfaces.collected.size() <<
" collected surfaces" << std::endl;
141 std::vector<const Surface*> surfaceSequence;
142 surfaceSequence.reserve(cSurfaces.collected.size());
143 for (
auto& cs : cSurfaces.collected) {
144 surfaceSequence.push_back(cs.surface);
148 using DirectActionList = ActionList<DirectNavigator::Initializer,
156 dOptions.actionList.get<DirectNavigator::Initializer>();
157 dInitializer.navSurfaces = surfaceSequence;
159 auto& dCollector = dOptions.actionList.template get<SurfaceCollector<>>();
160 dCollector.selector.selectSensitive =
true;
161 dCollector.selector.selectMaterial =
true;
164 const auto& ddResult =
165 dprop.propagate(start, destination, dOptions).value();
166 auto& ddSurfaces = ddResult.template get<SurfaceCollector<>::result_type>();
167 auto& ddMaterial = ddResult.template get<MaterialInteractor::result_type>();
170 BOOST_CHECK_EQUAL(cSurfaces.collected.size(), ddSurfaces.collected.size());
174 const auto& dwResult = dprop.propagate(start, dOptions).value();
175 auto& dwSurfaces = dwResult.template get<SurfaceCollector<>::result_type>();
178 BOOST_CHECK_EQUAL(cSurfaces.collected.size(), dwSurfaces.collected.size());
185 test_direct_navigator,
187 bdata::distribution =
188 std::uniform_real_distribution<>(0.15_GeV, 10_GeV))) ^
190 bdata::distribution =
191 std::uniform_real_distribution<>(-M_PI, M_PI))) ^
193 bdata::distribution =
194 std::uniform_real_distribution<>(1.0, M_PI - 1.0))) ^
197 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
200 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^