File indexing completed on 2025-01-18 09:13:05
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/data/test_case.hpp>
0010 #include <boost/test/unit_test.hpp>
0011
0012 #include "Acts/Tests/CommonHelpers/PredefinedMaterials.hpp"
0013 #include "ActsFatras/EventData/Particle.hpp"
0014 #include "ActsFatras/Physics/ElectroMagnetic/BetheBloch.hpp"
0015
0016 #include <array>
0017 #include <random>
0018
0019 #include "Dataset.hpp"
0020
0021 using Generator = std::ranlux48;
0022
0023 BOOST_DATA_TEST_CASE(FatrasBetheBloch, Dataset::parameters, pdg, phi, theta, p,
0024 seed) {
0025 Generator gen(seed);
0026 ActsFatras::Particle before = Dataset::makeParticle(pdg, phi, theta, p);
0027 ActsFatras::Particle after = before;
0028
0029 ActsFatras::BetheBloch process;
0030 const auto outgoing = process(gen, Acts::Test::makeUnitSlab(), after);
0031
0032 BOOST_CHECK_LT(after.absoluteMomentum(), before.absoluteMomentum());
0033 BOOST_CHECK_LT(after.energy(), before.energy());
0034
0035 BOOST_CHECK(outgoing.empty());
0036 }