9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
29 namespace tt = boost::test_tools;
30 using namespace Acts::UnitLiterals;
79 template <
typename rpropagator_t,
typename dpropagator_t>
80 void runTest(
const rpropagator_t& rprop,
const dpropagator_t& dprop,
double pT,
82 double dcharge = -1 + 2 *
charge;
89 double p = pT / sin(theta);
107 auto& sCollector = pOptions.actionList.template get<SurfaceCollector<>>();
108 sCollector.selector.selectSensitive =
true;
109 sCollector.selector.selectMaterial =
true;
112 const auto& pResult = rprop.propagate(start, pOptions).value();
113 auto& cSurfaces = pResult.template get<SurfaceCollector<>::result_type>();
114 auto& cMaterial = pResult.template get<MaterialInteractor::result_type>();
115 const Surface& destination = pResult.endParameters->referenceSurface();
117 std::cout <<
" - the standard navigator yielded "
118 << cSurfaces.collected.size() <<
" collected surfaces" << std::endl;
122 std::vector<const Surface*> surfaceSequence;
123 surfaceSequence.reserve(cSurfaces.collected.size());
124 for (
auto& cs : cSurfaces.collected) {
125 surfaceSequence.push_back(cs.surface);
137 dOptions.actionList.get<DirectNavigator::Initializer>();
138 dInitializer.navSurfaces = surfaceSequence;
140 auto& dCollector = dOptions.actionList.template get<SurfaceCollector<>>();
141 dCollector.selector.selectSensitive =
true;
142 dCollector.selector.selectMaterial =
true;
145 const auto& ddResult =
146 dprop.propagate(start, destination, dOptions).value();
147 auto& ddSurfaces = ddResult.template get<SurfaceCollector<>::result_type>();
148 auto& ddMaterial = ddResult.template get<MaterialInteractor::result_type>();
151 BOOST_CHECK_EQUAL(cSurfaces.collected.size(), ddSurfaces.collected.size());
155 const auto& dwResult = dprop.propagate(start, dOptions).value();
156 auto& dwSurfaces = dwResult.template get<SurfaceCollector<>::result_type>();
159 BOOST_CHECK_EQUAL(cSurfaces.collected.size(), dwSurfaces.collected.size());
166 test_direct_navigator,
167 bdata::random((bdata::seed = 20,
168 bdata::distribution =
169 std::uniform_real_distribution<>(0.15_GeV, 10_GeV))) ^
170 bdata::random((bdata::seed = 21,
171 bdata::distribution =
172 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
173 bdata::random((bdata::seed = 22,
174 bdata::distribution =
175 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
178 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
181 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^