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;
53 template <
typename propagator_state_t,
typename stepper_t>
54 void operator()(propagator_state_t& state,
const stepper_t&
stepper,
56 result.
distance =
perp(stepper.position(state.stepping));
59 template <
typename propagator_state_t,
typename stepper_t>
60 void operator()(propagator_state_t& ,
61 const stepper_t& )
const {}
65 template <
typename Surface>
74 size_t surfaces_passed = 0;
82 template <
typename propagator_state_t,
typename stepper_t>
83 void operator()(propagator_state_t& state,
const stepper_t&
stepper,
87 const double distance =
89 ->intersect(state.geoContext, stepper.position(state.stepping),
90 stepper.direction(state.stepping),
true)
91 .intersection.pathLength;
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;
122 auto mCylinder = std::make_shared<CylinderBounds>(10_mm, 1000_mm);
124 Surface::makeShared<CylinderSurface>(Transform3D::Identity(),
mCylinder);
125 auto cCylinder = std::make_shared<CylinderBounds>(150_mm, 1000_mm);
127 Surface::makeShared<CylinderSurface>(Transform3D::Identity(),
cCylinder);
146 cylinder_passage_observer_,
147 bdata::random((bdata::seed = 0,
148 bdata::distribution =
149 std::uniform_real_distribution<>(0.4_GeV, 10_GeV))) ^
150 bdata::random((bdata::seed = 1,
151 bdata::distribution =
152 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
153 bdata::random((bdata::seed = 2,
154 bdata::distribution =
155 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
158 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
161 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
164 double dcharge = -1 + 2 *
charge;
181 using so_result =
typename CylinderObserver::result_type;
187 double px = pT *
cos(
phi);
188 double py = pT * sin(
phi);
189 double pz = pT / tan(
theta);
196 auto& sor = result.get<so_result>();
198 BOOST_CHECK_EQUAL(sor.surfaces_passed, 1
u);
203 curvilinear_additive_,
204 bdata::random((bdata::seed = 0,
205 bdata::distribution =
206 std::uniform_real_distribution<>(0.4_GeV, 10_GeV))) ^
207 bdata::random((bdata::seed = 1,
208 bdata::distribution =
209 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
210 bdata::random((bdata::seed = 2,
211 bdata::distribution =
212 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
215 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
218 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
221 double dcharge = -1 + 2 *
charge;
233 double px = pT *
cos(
phi);
234 double py = pT * sin(
phi);
235 double pz = pT / tan(
theta);
242 cov << 10_mm, 0, 0.123, 0, 0.5, 0, 0, 10_mm, 0, 0.162, 0, 0, 0.123, 0, 0.1, 0,
243 0, 0, 0, 0.162, 0, 0.1, 0, 0, 0.5, 0, 0, 0, 1. / (10_GeV), 0, 0, 0, 0, 0,
248 const auto& mid_parameters =
250 const auto& end_parameters_2s =
258 const auto& end_parameters_1s =
263 end_parameters_2s->position(
tgContext), 0.001);
265 const auto& cov_1s = *(end_parameters_1s->covariance());
266 const auto& cov_2s = *(end_parameters_2s->covariance());
269 for (
unsigned int i = 0; i < cov_1s.rows(); i++) {
270 for (
unsigned int j = 0; j < cov_1s.cols(); j++) {
278 bdata::random((bdata::seed = 0,
279 bdata::distribution =
280 std::uniform_real_distribution<>(0.4_GeV, 10_GeV))) ^
281 bdata::random((bdata::seed = 1,
282 bdata::distribution =
283 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
284 bdata::random((bdata::seed = 2,
285 bdata::distribution =
286 std::uniform_real_distribution<>(1.0,
M_PI - 1.0))) ^
289 bdata::distribution = std::uniform_int_distribution<>(0, 1))) ^
292 bdata::distribution = std::uniform_int_distribution<>(0, 100))) ^
295 double dcharge = -1 + 2 *
charge;
307 double px = pT *
cos(
phi);
308 double py = pT * sin(
phi);
309 double pz = pT / tan(
theta);
316 cov << 10_mm, 0, 0.123, 0, 0.5, 0, 0, 10_mm, 0, 0.162, 0, 0, 0.123, 0, 0.1, 0,
317 0, 0, 0, 0.162, 0, 0.1, 0, 0, 0.5, 0, 0, 0, 1. / (10_GeV), 0, 0, 0, 0, 0,
322 const auto& mid_parameters =
325 const auto& end_parameters_2s =
335 const auto& end_parameters_1s =
340 end_parameters_2s->position(
tgContext), 0.001);
342 const auto& cov_1s = (*(end_parameters_1s->covariance()));
343 const auto& cov_2s = (*(end_parameters_2s->covariance()));
346 for (
unsigned int i = 0; i < cov_1s.rows(); i++) {
347 for (
unsigned int j = 0; j < cov_1s.cols(); j++) {