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
Trigger
EFTracking
FPGATrackSim
FPGATrackSimSGInput
src
FPGATrackSimInputUtils.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
FPGATrackSimSGInput/FPGATrackSimInputUtils.h
"
6
#include "
AtlasHepMC/GenVertex.h
"
7
#include "
AtlasHepMC/GenParticle.h
"
8
namespace
FPGATrackSimInputUtils
{
9
10
const
ParentBitmask
construct_truth_bitmap
(
HepMC::ConstGenParticlePtr
particle)
11
{
12
ParentBitmask
result
;
13
result
.reset();
14
typedef
std::pair<HepMC::ConstGenParticlePtr, unsigned int> Parent;
15
std::vector<Parent>
parents
;
16
parents
.push_back(Parent(particle, 0));
17
while
(!
parents
.empty()) {
18
HepMC::ConstGenParticlePtr
p
=
parents
.back().first;
19
const
unsigned
int
level
=
parents
.back().second;
20
if
(std::abs(
p
->pdg_id()) == 15) {
result
.set(
TAU_PARENT_BIT
, 1); }
21
if
(std::abs(
p
->pdg_id()) == 5) {
result
.set(
B_PARENT_BIT
, 1); }
22
if
(std::abs(
p
->pdg_id()) == 211) {
result
.set(
PION_PARENT_BIT
, 1); }
23
if
(std::abs(
p
->pdg_id()) == 211 &&
level
<= 1) {
result
.set(
PION_IMMEDIATE_PARENT_BIT
, 1); }
24
if
(
result
.count() ==
NBITS
) {
break
; }
25
parents
.pop_back();
26
if
(!(
p
->production_vertex())) {
continue
; }
27
#ifdef HEPMC3
28
for
(
HepMC::ConstGenParticlePtr
i
:
p
->production_vertex()->particles_in() ) {
29
parents
.push_back(Parent(
i
,
level
+ 1));
30
}
31
#else
32
for
(HepMC::GenVertex::particle_iterator
i
=
p
->production_vertex()->particles_begin(
HepMC::parents
),
f
=
p
->production_vertex()->particles_end(
HepMC::parents
);
i
!=
f
; ++
i
) {
33
parents
.push_back(Parent(*
i
,
level
+ 1));
34
}
35
36
#endif
37
}
38
return
result
;
39
}
40
41
42
}
FPGATrackSimInputUtils
Definition:
FPGATrackSimInputUtils.h:13
FPGATrackSimInputUtils.h
FPGATrackSimInputUtils::ParentBitmask
std::bitset< NBITS > ParentBitmask
Definition:
FPGATrackSimInputUtils.h:16
get_generator_info.result
result
Definition:
get_generator_info.py:21
FPGATrackSimInputUtils::PION_PARENT_BIT
@ PION_PARENT_BIT
Definition:
FPGATrackSimInputUtils.h:15
python.DecayParser.parents
parents
print ("==> buf:",buf)
Definition:
DecayParser.py:31
GenVertex.h
GenParticle.h
FPGATrackSimInputUtils::B_PARENT_BIT
@ B_PARENT_BIT
Definition:
FPGATrackSimInputUtils.h:15
python.iconfTool.models.loaders.level
level
Definition:
loaders.py:20
python.utils.AtlRunQueryDQUtils.p
p
Definition:
AtlRunQueryDQUtils.py:210
lumiFormat.i
int i
Definition:
lumiFormat.py:85
FPGATrackSimInputUtils::PION_IMMEDIATE_PARENT_BIT
@ PION_IMMEDIATE_PARENT_BIT
Definition:
FPGATrackSimInputUtils.h:15
hist_file_dump.f
f
Definition:
hist_file_dump.py:141
FPGATrackSimInputUtils::construct_truth_bitmap
const ParentBitmask construct_truth_bitmap(HepMC::ConstGenParticlePtr p)
Definition:
FPGATrackSimInputUtils.cxx:10
FPGATrackSimInputUtils::TAU_PARENT_BIT
@ TAU_PARENT_BIT
Definition:
FPGATrackSimInputUtils.h:15
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition:
GenParticle.h:38
FPGATrackSimInputUtils::NBITS
@ NBITS
Definition:
FPGATrackSimInputUtils.h:15
Generated on Thu Mar 13 2025 21:10:51 for ATLAS Offline Software by
1.8.18