Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Simulation
G4Atlas
G4AtlasTests
src
SimTestToolBase.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SimTestToolBase.h
"
6
7
#include "
AtlasHepMC/GenEvent.h
"
8
#include "
TruthUtils/MagicNumbers.h
"
9
#include "
GeneratorObjects/McEventCollection.h
"
10
11
SimTestToolBase::SimTestToolBase
(
const
std::string&
type
,
12
const
std::string&
name
,
13
const
IInterface*
parent
) :
14
base_class(
type
,
name
,
parent
)
15
{
16
declareProperty(
"HistPath"
,
m_path
=
"/truth/"
);
17
declareProperty(
"McEventKey"
,
m_key
=
"TruthEvent"
);
18
}
19
20
HepMC::ConstGenParticlePtr
SimTestToolBase::getPrimary
()
21
{
22
const
McEventCollection
* mcCollection;
23
if
(evtStore()->
retrieve
(mcCollection,
m_key
).isSuccess()) {
24
DataVector<HepMC::GenEvent>::const_iterator
e
;
25
for
(
e
=mcCollection->
begin
();
e
!=mcCollection->
end
(); ++
e
) {
26
for
(
auto
p
: (**
e
)) {
27
if
(!
HepMC::is_simulation_particle
(
p
)) {
28
return
p
;
29
}
30
}
31
}
32
}
33
return
0;
34
}
35
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition:
PyKernel.py:110
AllowedVariables::e
e
Definition:
AsgElectronSelectorTool.cxx:37
GenEvent.h
SimTestToolBase::SimTestToolBase
SimTestToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
SimTestToolBase.cxx:11
python.CaloAddPedShiftConfig.type
type
Definition:
CaloAddPedShiftConfig.py:42
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
SimTestToolBase.h
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition:
MagicNumbers.h:355
McEventCollection.h
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition:
McEventCollection.h:33
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition:
GenParticle.h:38
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:240
MagicNumbers.h
SimTestToolBase::getPrimary
HepMC::ConstGenParticlePtr getPrimary()
Definition:
SimTestToolBase.cxx:20
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SimTestHisto::m_path
std::string m_path
Definition:
SimTestHisto.h:34
SimTestToolBase::m_key
std::string m_key
The MC truth key.
Definition:
SimTestToolBase.h:34
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Generated on Mon Apr 21 2025 21:18:44 for ATLAS Offline Software by
1.8.18