10 #define BOOST_TEST_MODULE AbortList Tests
12 #include <boost/test/included/unit_test.hpp>
15 #include <boost/test/data/test_case.hpp>
18 #include <boost/test/output_test_stream.hpp>
22 #include "Acts/Material/MaterialProperties.hpp"
27 #include "Particle.hpp"
32 namespace tt = boost::test_tools;
33 namespace au = Acts::units;
47 1.848 / (au::_cm * au::_cm * au::_cm));
53 template <
typename detector_t,
typename particle_t>
54 bool operator()(
const detector_t,
const particle_t &)
const {
69 bdata::distribution = std::uniform_real_distribution<>(0., 1.))) ^
72 bdata::distribution = std::uniform_real_distribution<>(0., 1.))) ^
75 bdata::distribution = std::uniform_real_distribution<>(0., 1.))) ^
78 std::uniform_real_distribution<>(1.5, 10.5))) ^
89 p * Acts::units::_GeV * Acts::Vector3D(
x,
y,
z).normalized();
92 double m = 105.658367 * Acts::units::_MeV;
93 const double me = 0.51099891 * Acts::units::_MeV;
97 BOOST_CHECK_EQUAL(particle.
m(),
m);
98 BOOST_CHECK_EQUAL(particle.
pdg(), 13);
103 double E = particle.
E();
105 auto bbr = bbloch(
generator, detector, particle);
106 double eloss_io = E - particle.
E();
109 BOOST_CHECK(E >= particle.
E());
110 BOOST_CHECK(bbr.size() == 0);
114 BOOST_CHECK_EQUAL(particle.m(), me);
115 BOOST_CHECK_EQUAL(particle.pdg(), 11);
119 auto bhr = bheitler(
generator, detector, particle);
120 double eloss_rad = E - particle.E();
121 BOOST_CHECK(E >= particle.E());
122 BOOST_CHECK(bhr.size() == 0);
127 os <<
"p,bethe_bloch,bethe_heitler" <<
'\n';
128 os << particle.p() <<
"," << eloss_io <<
"," << eloss_rad <<
'\n';
139 EnergyLoss eLossPhysicsList;
141 std::vector<Particle> outgoing;
142 BOOST_CHECK(!eLossPhysicsList(
generator, detector, particle, outgoing));
143 BOOST_CHECK(!outgoing.size());