Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BetheBlochTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BetheBlochTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018-2021 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
11 
15 
16 #include <array>
17 #include <random>
18 
19 #include "Dataset.hpp"
20 
21 using Generator = std::ranlux48;
22 
23 BOOST_DATA_TEST_CASE(FatrasBetheBloch, Dataset::parameters, pdg, phi, lambda, p,
24  seed) {
27  ActsFatras::Particle after = before;
28 
30  const auto outgoing = process(gen, Acts::Test::makeUnitSlab(), after);
31  // energy loss changes momentum and energy
32  BOOST_CHECK_LT(after.absoluteMomentum(), before.absoluteMomentum());
33  BOOST_CHECK_LT(after.energy(), before.energy());
34  // energy loss creates no new particles
35  BOOST_CHECK(outgoing.empty());
36 }