ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
BetheBloch.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file BetheBloch.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2018-2020 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
#pragma once
10
11
#include <array>
12
13
#include "
Acts/Material/Interactions.hpp
"
14
#include "
Acts/Material/MaterialProperties.hpp
"
15
#include "
ActsFatras/EventData/Particle.hpp
"
16
#include "
ActsFatras/Utilities/LandauDistribution.hpp
"
17
18
namespace
ActsFatras {
19
25
struct
BetheBloch
{
27
double
scaleFactorMPV
= 1.;
29
double
scaleFactorSigma
= 1.;
30
39
template
<
typename
generator_t>
40
std::array<Particle, 0>
operator()
(generator_t &
generator
,
41
const
Acts::MaterialProperties
&slab,
42
Particle
&
particle
)
const
{
43
// compute energy loss distribution parameters
44
const
auto
pdg
= particle.
pdg
();
45
const
auto
m
= particle.
mass
();
46
const
auto
qOverP = particle.
charge
() / particle.
absMomentum
();
47
const
auto
q = particle.
charge
();
48
// most probable value
49
const
auto
energyLoss =
50
Acts::computeEnergyLossLandau
(slab,
pdg
,
m
, qOverP, q);
51
// Gaussian-equivalent sigma
52
const
auto
energyLossSigma =
53
Acts::computeEnergyLossLandauSigma
(slab,
pdg
,
m
, qOverP, q);
54
55
// Simulate the energy loss
56
// TODO landau location and scale parameters are not identical to the most
57
// probable value and the Gaussian-equivalent sigma
58
LandauDistribution
lossDistribution(
scaleFactorMPV
* energyLoss,
59
scaleFactorSigma
* energyLossSigma);
60
const
auto
loss = lossDistribution(generator);
61
62
// Apply the energy loss
63
particle.
correctEnergy
(-loss);
64
65
// Generates no new particles
66
return
{};
67
}
68
};
69
70
}
// namespace ActsFatras
acts
blob
master
Fatras
include
ActsFatras
Physics
EnergyLoss
BetheBloch.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:24
using
1.8.2 with
ECCE GitHub integration