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
PhysicsAnalysis
AnalysisCommon
ParticleJetTools
Root
JetPartonTruthLabel.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 "
ParticleJetTools/JetPartonTruthLabel.h
"
6
#include "
xAODTruth/TruthParticle.h
"
7
#include "
TruthUtils/HepMCHelpers.h
"
8
9
using namespace
std;
10
using namespace
Analysis
;
11
12
int
JetPartonTruthLabel::modifyJet(
xAOD::Jet
&
jet
)
const
{
13
ATH_MSG_VERBOSE
(
"In "
<<
name
() <<
"::modifyJet()"
);
14
15
int
label
= -1;
16
double
e_max = 0;
17
double
pt_max = 0;
18
double
dr_max = 0;
19
20
vector<const xAOD::TruthParticle*> partons;
21
bool
success =
jet
.getAssociatedObjects(
"GhostPartons"
, partons);
22
if
(success) {
23
for
(
auto
it
= partons.begin();
it
!= partons.end();
it
++) {
24
if
(
MC::isTop
(*
it
))
continue
;
// Skip top
25
26
if
((*it)->e() > e_max) {
27
label
= (*it)->absPdgId();
28
e_max = (*it)->e();
29
pt_max = (*it)->pt();
30
dr_max = (*it)->p4().DeltaR(
jet
.p4());
31
}
32
}
33
}
34
35
jet
.setAttribute(
"PartonTruthLabelID"
,
label
);
36
jet
.setAttribute(
"PartonTruthLabelPt"
, pt_max);
37
jet
.setAttribute(
"PartonTruthLabelEnergy"
, e_max);
38
jet
.setAttribute(
"PartonTruthLabelDR"
, dr_max);
39
40
return
0;
41
}
skel.it
it
Definition:
skel.GENtoEVGEN.py:407
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition:
AthMsgStreamMacros.h:28
jet
Definition:
JetCalibTools_PlotJESFactors.cxx:23
add-xsec-uncert-quadrature-N.label
label
Definition:
add-xsec-uncert-quadrature-N.py:104
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition:
BTaggingCnvAlg.h:20
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
xAOD::Jet_v1
Class describing a jet.
Definition:
Jet_v1.h:57
isTop
bool isTop(const T &p)
Definition:
AtlasPID.h:165
JetPartonTruthLabel.h
TruthParticle.h
HepMCHelpers.h
Generated on Sun Mar 23 2025 21:12:52 for ATLAS Offline Software by
1.8.18