9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
30 namespace tt = boost::test_tools;
31 using namespace Acts::UnitLiterals;
80 template <
typename rpropagator_t,
typename dpropagator_t>
81 void runTest(
const rpropagator_t& rprop,
const dpropagator_t& dprop,
double pT,
83 double dcharge = -1 + 2 *
charge;
93 double px = pT * cos(phi);
94 double py = pT * sin(phi);
95 double pz = pT / tan(theta);
105 using RefereceActionList =
118 auto& sCollector = pOptions.actionList.template get<SurfaceCollector<>>();
119 sCollector.selector.selectSensitive =
true;
120 sCollector.selector.selectMaterial =
true;
123 const auto& pResult = rprop.propagate(start, pOptions).value();
124 auto& cSurfaces = pResult.template get<SurfaceCollector<>::result_type>();
125 auto& cOutput = pResult.template get<DebugOutput::result_type>();
126 auto& cMaterial = pResult.template get<MaterialInteractor::result_type>();
127 const Surface& destination = pResult.endParameters->referenceSurface();
130 std::cout <<
">>> Standard Navigator output to come : " << std::endl;
131 std::cout << cOutput.debugString << std::endl;
133 std::cout <<
" - the standard navigator yielded "
134 << cSurfaces.collected.size() <<
" collected surfaces"
140 std::vector<const Surface*> surfaceSequence;
141 surfaceSequence.reserve(cSurfaces.collected.size());
142 for (
auto& cs : cSurfaces.collected) {
143 surfaceSequence.push_back(cs.surface);
147 using DirectActionList =
157 dOptions.actionList.get<DirectNavigator::Initializer>();
158 dInitializer.surfaceSequence = surfaceSequence;
160 auto& dCollector = dOptions.actionList.template get<SurfaceCollector<>>();
161 dCollector.selector.selectSensitive =
true;
162 dCollector.selector.selectMaterial =
true;
165 const auto& ddResult =
166 dprop.propagate(start, destination, dOptions).value();
167 auto& ddSurfaces = ddResult.template get<SurfaceCollector<>::result_type>();
168 auto& ddOutput = ddResult.template get<DebugOutput::result_type>();
169 auto& ddMaterial = ddResult.template get<MaterialInteractor::result_type>();
172 BOOST_CHECK_EQUAL(cSurfaces.collected.size(), ddSurfaces.collected.size());
176 std::cout <<
">>> Direct Navigator (with destination) output to come : "
178 std::cout << ddOutput.debugString << std::endl;
182 const auto& dwResult = dprop.propagate(start, dOptions).value();
183 auto& dwSurfaces = dwResult.template get<SurfaceCollector<>::result_type>();
184 auto& dwOutput = dwResult.template get<DebugOutput::result_type>();
187 std::cout <<
">>> Direct Navigator (w/o destination) output to come : "
189 std::cout << dwOutput.debugString << std::endl;
193 BOOST_CHECK_EQUAL(cSurfaces.collected.size(), dwSurfaces.collected.size());
200 test_direct_navigator,
202 bdata::distribution =
203 std::uniform_real_distribution<>(0.15
_GeV, 10
_GeV))) ^
205 bdata::distribution =
206 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
208 bdata::distribution =
209 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
212 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
215 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^