9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
28 namespace tt = boost::test_tools;
29 using namespace Acts::UnitLiterals;
52 template <
typename propagator_state_t,
typename stepper_t>
53 void operator()(propagator_state_t& state,
const stepper_t&
stepper,
55 result.
distance =
perp(stepper.position(state.stepping));
58 template <
typename propagator_state_t,
typename stepper_t>
59 void operator()(propagator_state_t& ,
60 const stepper_t& )
const {}
64 template <
typename Surface>
69 double tolerance = 1.e-5;
73 size_t surfaces_passed = 0;
81 template <
typename propagator_state_t,
typename stepper_t>
82 void operator()(propagator_state_t& state,
const stepper_t&
stepper,
86 const double distance =
88 ->intersectionEstimate(state.geoContext,
89 stepper.position(state.stepping),
90 stepper.direction(state.stepping),
true)
95 if (
std::abs(distance) <= tolerance) {
104 template <
typename propagator_state_t,
typename stepper_t>
105 void operator()(propagator_state_t& ,
106 const stepper_t& )
const {}
117 const double Bz = 2
_T;
144 cylinder_passage_observer_,
146 bdata::distribution =
147 std::uniform_real_distribution<>(0.4
_GeV, 10
_GeV))) ^
149 bdata::distribution =
150 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
152 bdata::distribution =
153 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
156 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
159 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
162 double dcharge = -1 + 2 *
charge;
179 using so_result =
typename CylinderObserver::result_type;
185 double px =
pT * cos(
phi);
186 double py =
pT * sin(
phi);
194 auto& sor = result.get<so_result>();
196 BOOST_CHECK_EQUAL(sor.surfaces_passed, 1
u);
201 curvilinear_additive_,
203 bdata::distribution =
204 std::uniform_real_distribution<>(0.4
_GeV, 10
_GeV))) ^
206 bdata::distribution =
207 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
209 bdata::distribution =
210 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
213 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
216 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
219 double dcharge = -1 + 2 *
charge;
231 double px =
pT * cos(
phi);
232 double py =
pT * sin(
phi);
240 cov << 10
_mm, 0, 0.123, 0, 0.5, 0, 0, 10
_mm, 0, 0.162, 0, 0, 0.123, 0, 0.1, 0,
241 0, 0, 0, 0.162, 0, 0.1, 0, 0, 0.5, 0, 0, 0, 1. / (10
_GeV), 0, 0, 0, 0, 0,
245 const auto& mid_parameters =
247 const auto& end_parameters_2s =
255 const auto& end_parameters_1s =
259 CHECK_CLOSE_REL(end_parameters_1s->position(), end_parameters_2s->position(),
262 const auto& cov_1s = *(end_parameters_1s->covariance());
263 const auto& cov_2s = *(end_parameters_2s->covariance());
266 for (
unsigned int i = 0; i < cov_1s.rows(); i++) {
267 for (
unsigned int j = 0; j < cov_1s.cols(); j++) {
276 bdata::distribution =
277 std::uniform_real_distribution<>(0.4
_GeV, 10
_GeV))) ^
279 bdata::distribution =
280 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
282 bdata::distribution =
283 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
286 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
289 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
292 double dcharge = -1 + 2 *
charge;
304 double px =
pT * cos(
phi);
305 double py =
pT * sin(
phi);
313 cov << 10
_mm, 0, 0.123, 0, 0.5, 0, 0, 10
_mm, 0, 0.162, 0, 0, 0.123, 0, 0.1, 0,
314 0, 0, 0, 0.162, 0, 0.1, 0, 0, 0.5, 0, 0, 0, 1. / (10
_GeV), 0, 0, 0, 0, 0,
318 const auto& mid_parameters =
321 const auto& end_parameters_2s =
331 const auto& end_parameters_1s =
335 CHECK_CLOSE_REL(end_parameters_1s->position(), end_parameters_2s->position(),
338 const auto& cov_1s = (*(end_parameters_1s->covariance()));
339 const auto& cov_2s = (*(end_parameters_2s->covariance()));
342 for (
unsigned int i = 0; i < cov_1s.rows(); i++) {
343 for (
unsigned int j = 0; j < cov_1s.cols(); j++) {