Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
include
scripts
src
AmbiguityResolution
Definitions
Detector
Digitization
EventData
Geometry
MagneticField
Material
Propagator
detail
CovarianceEngine.cpp
JacobianEngine.cpp
PointwiseMaterialInteraction.cpp
CovarianceTransport.cpp
EigenStepperError.cpp
MultiStepperError.cpp
PropagatorError.cpp
StraightLineStepper.cpp
Surfaces
TrackFinding
TrackFitting
Utilities
Vertexing
Visualization
ActsVersion.cpp
docs
Examples
Fatras
Plugins
Tests
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
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
11
#include "
Acts/Material/Interactions.hpp
"
12
13
namespace
Acts {
14
namespace
detail {
15
16
void
PointwiseMaterialInteraction::evaluatePointwiseMaterialInteraction
(
17
bool
multipleScattering,
bool
energyLoss) {
18
if
(energyLoss) {
19
Eloss
=
computeEnergyLossBethe
(
slab
,
mass
,
qOverP
,
absQ
);
20
}
21
// Compute contributions from interactions
22
if
(
performCovarianceTransport
) {
23
covarianceContributions
(multipleScattering, energyLoss);
24
}
25
}
26
27
void
PointwiseMaterialInteraction::covarianceContributions
(
28
bool
multipleScattering,
bool
energyLoss) {
29
// Compute contributions from interactions
30
if
(multipleScattering) {
31
// TODO use momentum before or after energy loss in backward mode?
32
const
float
theta0 =
33
computeMultipleScatteringTheta0
(
slab
,
absPdg
,
mass
,
qOverP
,
absQ
);
34
// sigmaPhi = theta0 / sin(theta)
35
const
auto
sigmaPhi = theta0 * (
dir
.norm() /
VectorHelpers::perp
(
dir
));
36
variancePhi
= sigmaPhi * sigmaPhi;
37
// sigmaTheta = theta0
38
varianceTheta
= theta0 * theta0;
39
}
40
// TODO just ionisation loss or full energy loss?
41
if
(energyLoss) {
42
const
float
sigmaQoverP =
43
computeEnergyLossLandauSigmaQOverP
(
slab
,
mass
,
qOverP
,
absQ
);
44
varianceQoverP
= sigmaQoverP * sigmaQoverP;
45
}
46
}
47
48
double
PointwiseMaterialInteraction::updateVariance
(
49
double
variance,
double
change,
NoiseUpdateMode
updateMode)
const
{
50
// Add/Subtract the change
51
// Protect the variance against becoming negative
52
return
std::max(0., variance +
std::copysign
(change, updateMode));
53
}
54
55
}
// namespace detail
56
}
// end of namespace Acts
acts
blob
sPHENIX
Core
src
Propagator
detail
PointwiseMaterialInteraction.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:36
using
1.8.2 with
sPHENIX GitHub integration