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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
master
CI
Core
include
src
EventData
Geometry
MagneticField
Material
Propagator
detail
CovarianceEngine.cpp
PointwiseMaterialInteraction.cpp
StraightLineStepper.cpp
Surfaces
Utilities
Vertexing
Visualization
doc
Examples
Fatras
Plugins
Tests
thirdparty
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PointwiseMaterialInteraction.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PointwiseMaterialInteraction.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019 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 "
Acts/Propagator/detail/PointwiseMaterialInteraction.hpp
"
10
#include "
Acts/Material/Interactions.hpp
"
11
#include "
Acts/Utilities/Helpers.hpp
"
12
13
namespace
Acts {
14
namespace
detail {
15
void
PointwiseMaterialInteraction::evaluatePointwiseMaterialInteraction
(
16
bool
multipleScattering,
bool
energyLoss) {
17
if
(energyLoss) {
18
Eloss
=
computeEnergyLossBethe
(
slab
,
pdg
,
mass
,
qOverP
,
q
);
19
}
20
// Compute contributions from interactions
21
if
(
performCovarianceTransport
) {
22
covarianceContributions
(multipleScattering, energyLoss);
23
}
24
}
25
26
void
PointwiseMaterialInteraction::covarianceContributions
(
27
bool
multipleScattering,
bool
energyLoss) {
28
// Compute contributions from interactions
29
if
(multipleScattering) {
30
// TODO use momentum before or after energy loss in backward mode?
31
const
auto
theta0 =
32
computeMultipleScatteringTheta0
(
slab
,
pdg
,
mass
,
qOverP
,
q
);
33
// sigmaPhi = theta0 / sin(theta)
34
const
auto
sigmaPhi = theta0 * (
dir
.norm() /
VectorHelpers::perp
(
dir
));
35
variancePhi
= sigmaPhi * sigmaPhi;
36
// sigmaTheta = theta0
37
varianceTheta
= theta0 * theta0;
38
}
39
// TODO just ionisation loss or full energy loss?
40
if
(energyLoss) {
41
const
auto
sigmaQoverP =
42
computeEnergyLossLandauSigmaQOverP
(
slab
,
pdg
,
mass
,
qOverP
,
q
);
43
varianceQoverP
= sigmaQoverP * sigmaQoverP;
44
}
45
}
46
47
double
PointwiseMaterialInteraction::updateVariance
(
48
double
variance,
double
change,
NoiseUpdateMode
updateMode)
const
{
49
// Add/Subtract the change
50
// Protect the variance against becoming negative
51
return
std::max
(0., variance + std::copysign(change, updateMode));
52
}
53
}
// namespace detail
54
}
// end of namespace Acts
acts
blob
master
Core
src
Propagator
detail
PointwiseMaterialInteraction.cpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:22
using
1.8.2 with
ECCE GitHub integration