Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
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
12
#include "
Acts/Tests/CommonHelpers/PredefinedMaterials.hpp
"
13
#include "
ActsFatras/EventData/Particle.hpp
"
14
#include "
ActsFatras/Physics/ElectroMagnetic/BetheBloch.hpp
"
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
) {
25
Generator
gen
(
seed
);
26
ActsFatras::Particle
before =
Dataset::makeParticle
(
pdg
,
phi
, lambda,
p
);
27
ActsFatras::Particle
after = before;
28
29
ActsFatras::BetheBloch
process
;
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
}
acts
blob
sPHENIX
Tests
UnitTests
Fatras
Physics
BetheBlochTests.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:45
using
1.8.2 with
sPHENIX GitHub integration