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
PropagationAlgorithm.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PropagationAlgorithm.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017 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 "
Acts/Definitions/Algebra.hpp
"
12
#include "
Acts/Definitions/TrackParametrization.hpp
"
13
#include "
Acts/Definitions/Units.hpp
"
14
#include "
Acts/EventData/ParticleHypothesis.hpp
"
15
#include "
Acts/EventData/TrackParameters.hpp
"
16
#include "
Acts/Material/MaterialInteraction.hpp
"
17
#include "
Acts/Propagator/AbortList.hpp
"
18
#include "
Acts/Propagator/ActionList.hpp
"
19
#include "
Acts/Propagator/DenseEnvironmentExtension.hpp
"
20
#include "
Acts/Propagator/MaterialInteractor.hpp
"
21
#include "
Acts/Propagator/Navigator.hpp
"
22
#include "
Acts/Propagator/Propagator.hpp
"
23
#include "
Acts/Propagator/StandardAborters.hpp
"
24
#include "
Acts/Propagator/detail/SteppingLogger.hpp
"
25
#include "
Acts/Surfaces/PerigeeSurface.hpp
"
26
#include "
Acts/Utilities/Helpers.hpp
"
27
#include "
Acts/Utilities/Logger.hpp
"
28
#include "
ActsExamples/Framework/DataHandle.hpp
"
29
#include "
ActsExamples/Framework/IAlgorithm.hpp
"
30
#include "
ActsExamples/Framework/ProcessCode.hpp
"
31
#include "
ActsExamples/Framework/RandomNumbers.hpp
"
32
#include "
ActsExamples/Framework/WhiteBoard.hpp
"
33
34
#include <algorithm>
35
#include <cmath>
36
#include <cstddef>
37
#include <limits>
38
#include <memory>
39
#include <optional>
40
#include <random>
41
#include <string>
42
#include <unordered_map>
43
#include <utility>
44
#include <vector>
45
46
namespace
ActsExamples {
47
48
class
PropagatorInterface;
49
struct
AlgorithmContext;
50
52
using
RecordedMaterial
=
Acts::MaterialInteractor::result_type
;
53
57
using
RecordedMaterialTrack
=
58
std::pair<std::pair<Acts::Vector3, Acts::Vector3>,
RecordedMaterial
>;
59
61
using
PropagationOutput
=
62
std::pair<std::vector<Acts::detail::Step>,
RecordedMaterial
>;
63
69
class
PropagationAlgorithm
:
public
IAlgorithm
{
70
public
:
71
struct
Config
{
73
std::shared_ptr<PropagatorInterface>
propagatorImpl
=
nullptr
;
74
76
std::shared_ptr<RandomNumbers>
randomNumberSvc
=
nullptr
;
78
int
mode
= 0;
80
bool
sterileLogger
=
false
;
82
bool
debugOutput
=
false
;
84
bool
energyLoss
=
true
;
86
bool
multipleScattering
=
true
;
88
bool
recordMaterialInteractions
=
true
;
89
91
size_t
ntests
= 100;
93
double
d0Sigma
= 15 *
Acts::UnitConstants::um
;
95
double
z0Sigma
= 55 *
Acts::UnitConstants::mm
;
97
double
phiSigma
= 0.001;
99
double
thetaSigma
= 0.001;
101
double
qpSigma
= 0.0001 / 1 *
Acts::UnitConstants::GeV
;
103
double
tSigma
= 1 *
Acts::UnitConstants::ns
;
105
std::pair<double, double>
phiRange
= {-M_PI, M_PI};
107
std::pair<double, double>
etaRange
= {-4., 4.};
109
std::pair<double, double>
ptRange
= {100 *
Acts::UnitConstants::MeV
,
110
100 *
Acts::UnitConstants::GeV
};
112
Acts::ParticleHypothesis
particleHypothesis
=
113
Acts::ParticleHypothesis::pion
();
115
double
ptLoopers
= 500 *
Acts::UnitConstants::MeV
;
116
118
double
maxStepSize
= 3 *
Acts::UnitConstants::m
;
119
121
std::string
propagationStepCollection
=
"PropagationSteps"
;
122
124
std::string
propagationMaterialCollection
=
"RecordedMaterialTracks"
;
125
127
bool
covarianceTransport
=
false
;
128
130
Acts::BoundVector
covariances
= Acts::BoundVector::Zero();
131
133
Acts::BoundSquareMatrix
correlations
= Acts::BoundSquareMatrix::Identity();
134
};
135
139
PropagationAlgorithm
(
const
Config
&
config
,
Acts::Logging::Level
level
);
140
144
ActsExamples::ProcessCode
execute
(
145
const
AlgorithmContext
& context)
const override
;
146
148
const
Config
&
config
()
const
{
return
m_cfg
; }
149
150
private
:
151
Config
m_cfg
;
152
153
WriteDataHandle<std::vector<std::vector<Acts::detail::Step>
>>
154
m_outpoutPropagationSteps
{
this
,
"OutputPropagationSteps"
};
155
156
WriteDataHandle<std::unordered_map<size_t, Acts::RecordedMaterialTrack>
>
157
m_recordedMaterial
{
this
,
"RecordedMaterial"
};
158
162
std::optional<Acts::BoundSquareMatrix>
generateCovariance
(
163
ActsExamples::RandomEngine
&
rnd
,
164
std::normal_distribution<double>&
gauss
)
const
;
165
};
166
167
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Algorithms
Propagation
include
ActsExamples
Propagation
PropagationAlgorithm.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:37
using
1.8.2 with
sPHENIX GitHub integration