ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
ISF
ISF_Core
ISF_Event
ISF_Event
ParticleUserInformation.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// ParticleUserInformation.h, (c) ATLAS Detector software
8
9
#ifndef ISF_EVENT_PARTICLEUSERINFORMATION_H
10
#define ISF_EVENT_PARTICLEUSERINFORMATION_H
11
12
#include <cmath>
13
#include <memory>
14
15
namespace
ISF
{
16
27
28
struct
MaterialPathInfo
29
{
30
float
dMax
;
// path limit after which sampled process occurs
31
float
dCollected
;
// material thickness traversed so far
32
int
process
;
// type of pre-sampled material process
33
34
MaterialPathInfo
(
int
proc,
float
pathLimit,
float
pathCurrent ) :
35
dMax
(pathLimit),
dCollected
(pathCurrent),
process
(proc)
36
{}
37
40
void
updatePath
(
float
d) {
dCollected
+= d; }
41
43
bool
operator==
(
const
MaterialPathInfo
& rhs)
const
{
44
float
epsilon = 1e-6;
45
bool
pass =
true
;
46
pass &= std::fabs(
dMax
-rhs.
dMax
) < epsilon;
47
pass &= std::fabs(
dCollected
-rhs.
dCollected
) < epsilon;
48
pass &=
process
== rhs.
process
;
49
return
pass;
50
}
51
};
52
53
class
ParticleUserInformation
{
54
55
public
:
57
ParticleUserInformation
();
58
60
virtual
~ParticleUserInformation
() =
default
;
61
62
int
getExtraBC
()
const
;
63
int
process
()
const
;
64
int
generation
()
const
;
65
const
MaterialPathInfo
*
materialLimit
()
const
;
66
67
void
setExtraBC
(
int
extrabc);
68
void
setProcess
(
int
proc);
69
void
setGeneration
(
int
gen);
70
void
setMaterialLimit
(
int
process
,
float
x0lim,
float
x0coll);
71
73
bool
operator==
(
const
ParticleUserInformation
& rhs)
const
;
74
75
private
:
76
77
int
m_process
;
// generating process
78
int
m_generation
;
// generation number (i.e. number of vertices separating vertex of origin
79
// from the primary vertex (GenEvent input)
80
std::unique_ptr<MaterialPathInfo>
m_matInfo
;
// presampled process and material collection
81
};
82
}
// end of namespace
83
84
85
inline
int
ISF::ParticleUserInformation::process
()
const
{
return
m_process
; }
86
87
inline
int
ISF::ParticleUserInformation::generation
()
const
{
return
m_generation
; }
88
89
inline
const
ISF::MaterialPathInfo
*
ISF::ParticleUserInformation::materialLimit
()
const
{
return
m_matInfo
.get(); }
90
91
inline
void
ISF::ParticleUserInformation::setProcess
(
int
proc) {
m_process
= proc; }
92
93
inline
void
ISF::ParticleUserInformation::setGeneration
(
int
gen) {
m_generation
= gen; }
94
95
inline
void
ISF::ParticleUserInformation::setMaterialLimit
(
int
proc,
float
dMax,
float
d)
96
{
m_matInfo
= std::make_unique<ISF::MaterialPathInfo>(proc,dMax,d); }
97
98
#endif
// ISF_EVENT_PARTICLEUSERINFORMATION_H
ISF::ParticleUserInformation::operator==
bool operator==(const ParticleUserInformation &rhs) const
Comparison.
Definition
ParticleUserInformation.cxx:19
ISF::ParticleUserInformation::materialLimit
const MaterialPathInfo * materialLimit() const
Definition
ParticleUserInformation.h:89
ISF::ParticleUserInformation::m_generation
int m_generation
Definition
ParticleUserInformation.h:78
ISF::ParticleUserInformation::setExtraBC
void setExtraBC(int extrabc)
ISF::ParticleUserInformation::getExtraBC
int getExtraBC() const
ISF::ParticleUserInformation::process
int process() const
Definition
ParticleUserInformation.h:85
ISF::ParticleUserInformation::m_matInfo
std::unique_ptr< MaterialPathInfo > m_matInfo
Definition
ParticleUserInformation.h:80
ISF::ParticleUserInformation::m_process
int m_process
Definition
ParticleUserInformation.h:77
ISF::ParticleUserInformation::ParticleUserInformation
ParticleUserInformation()
empty constructor
Definition
ParticleUserInformation.cxx:13
ISF::ParticleUserInformation::setMaterialLimit
void setMaterialLimit(int process, float x0lim, float x0coll)
Definition
ParticleUserInformation.h:95
ISF::ParticleUserInformation::~ParticleUserInformation
virtual ~ParticleUserInformation()=default
virtual destructor
ISF::ParticleUserInformation::setGeneration
void setGeneration(int gen)
Definition
ParticleUserInformation.h:93
ISF::ParticleUserInformation::generation
int generation() const
Definition
ParticleUserInformation.h:87
ISF::ParticleUserInformation::setProcess
void setProcess(int proc)
Definition
ParticleUserInformation.h:91
ISF
ISFParticleOrderedQueue.
Definition
PrimaryParticleInformation.h:13
ISF::MaterialPathInfo
Definition
ParticleUserInformation.h:29
ISF::MaterialPathInfo::dCollected
float dCollected
Definition
ParticleUserInformation.h:31
ISF::MaterialPathInfo::process
int process
Definition
ParticleUserInformation.h:32
ISF::MaterialPathInfo::MaterialPathInfo
MaterialPathInfo(int proc, float pathLimit, float pathCurrent)
Definition
ParticleUserInformation.h:34
ISF::MaterialPathInfo::operator==
bool operator==(const MaterialPathInfo &rhs) const
comparison
Definition
ParticleUserInformation.h:43
ISF::MaterialPathInfo::dMax
float dMax
Definition
ParticleUserInformation.h:30
ISF::MaterialPathInfo::updatePath
void updatePath(float d)
collected material update
Definition
ParticleUserInformation.h:40
Generated on
for ATLAS Offline Software by
1.17.0