9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
53 namespace tt = boost::test_tools;
54 using namespace Acts::UnitLiterals;
71 double distance = std::numeric_limits<double>::max();
78 template <
typename propagator_state_t,
typename stepper_t,
80 void operator()(propagator_state_t&
state,
const stepper_t&
stepper,
82 result.
distance =
perp(stepper.position(state.stepping));
87 template <
typename Surface>
96 size_t surfaces_passed = 0;
97 double surface_passed_r = std::numeric_limits<double>::max();
104 template <
typename propagator_state_t,
typename stepper_t,
105 typename navigator_t>
113 ->intersect(state.geoContext, stepper.position(state.stepping),
114 stepper.direction(state.stepping),
true)
118 state.stepping.stepSize.update(distance * state.options.direction,
139 const double Bz = 2_T;
144 auto mCylinder = std::make_shared<CylinderBounds>(10_mm, 1000_mm);
146 Surface::makeShared<CylinderSurface>(Transform3::Identity(),
mCylinder);
147 auto cCylinder = std::make_shared<CylinderBounds>(150_mm, 1000_mm);
149 Surface::makeShared<CylinderSurface>(Transform3::Identity(),
cCylinder);
159 using ActionListType = ActionList<PerpendicularMeasure>;
160 using AbortConditionsType = AbortList<>;
168 cylinder_passage_observer_,
170 bdata::distribution =
171 std::uniform_real_distribution<>(0.4_GeV, 10_GeV))) ^
173 bdata::distribution =
174 std::uniform_real_distribution<>(-M_PI, M_PI))) ^
176 bdata::distribution =
177 std::uniform_real_distribution<>(1.0, M_PI - 1.0))) ^
180 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
183 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
186 double dcharge = -1 + 2 *
charge;
190 using ActionListType = ActionList<CylinderObserver>;
191 using AbortConditionsType = AbortList<>;
203 using so_result =
typename CylinderObserver::result_type;
209 double px =
pT * cos(
phi);
210 double py =
pT * sin(
phi);
216 q / mom.norm(), std::nullopt,
220 auto& sor = result.get<so_result>();
222 BOOST_CHECK_EQUAL(sor.surfaces_passed, 1
u);
227 curvilinear_additive_,
229 bdata::distribution =
230 std::uniform_real_distribution<>(0.4_GeV, 10_GeV))) ^
232 bdata::distribution =
233 std::uniform_real_distribution<>(-M_PI, M_PI))) ^
235 bdata::distribution =
236 std::uniform_real_distribution<>(1.0, M_PI - 1.0))) ^
239 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
242 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
245 double dcharge = -1 + 2 *
charge;
257 double px =
pT * cos(
phi);
258 double py =
pT * sin(
phi);
266 cov << 10_mm, 0, 0.123, 0, 0.5, 0, 0, 10_mm, 0, 0.162, 0, 0, 0.123, 0, 0.1, 0,
267 0, 0, 0, 0.162, 0, 0.1, 0, 0, 0.5, 0, 0, 0, 1. / (10_GeV), 0, 0, 0, 0, 0,
273 const auto& mid_parameters =
275 const auto& end_parameters_2s =
283 const auto& end_parameters_1s =
288 end_parameters_2s->position(
tgContext), 0.001);
290 BOOST_CHECK(end_parameters_1s->covariance().has_value());
291 const auto& cov_1s = *(end_parameters_1s->covariance());
292 BOOST_CHECK(end_parameters_2s->covariance().has_value());
293 const auto& cov_2s = *(end_parameters_2s->covariance());
296 for (
unsigned int i = 0;
i < cov_1s.rows();
i++) {
297 for (
unsigned int j = 0;
j < cov_1s.cols();
j++) {
306 bdata::distribution =
307 std::uniform_real_distribution<>(0.4_GeV, 10_GeV))) ^
309 bdata::distribution =
310 std::uniform_real_distribution<>(-M_PI, M_PI))) ^
312 bdata::distribution =
313 std::uniform_real_distribution<>(1.0, M_PI - 1.0))) ^
316 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
319 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
322 double dcharge = -1 + 2 *
charge;
334 double px =
pT * cos(
phi);
335 double py =
pT * sin(
phi);
343 cov << 10_mm, 0, 0.123, 0, 0.5, 0, 0, 10_mm, 0, 0.162, 0, 0, 0.123, 0, 0.1, 0,
344 0, 0, 0, 0.162, 0, 0.1, 0, 0, 0.5, 0, 0, 0, 1. / (10_GeV), 0, 0, 0, 0, 0,
350 const auto& mid_parameters =
353 const auto& end_parameters_2s =
363 const auto& end_parameters_1s =
368 end_parameters_2s->position(
tgContext), 0.001);
370 BOOST_CHECK(end_parameters_1s->covariance().has_value());
371 const auto& cov_1s = (*(end_parameters_1s->covariance()));
372 BOOST_CHECK(end_parameters_2s->covariance().has_value());
373 const auto& cov_2s = (*(end_parameters_2s->covariance()));
376 for (
unsigned int i = 0;
i < cov_1s.rows();
i++) {
377 for (
unsigned int j = 0;
j < cov_1s.cols();
j++) {