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
Algorithms
AsgAnalysisAlgorithms
Root
AsgClassificationDecorationAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
#include <
AsgAnalysisAlgorithms/AsgClassificationDecorationAlg.h
>
9
10
11
namespace
CP
12
{
13
14
StatusCode
AsgClassificationDecorationAlg::initialize
()
15
{
16
17
ANA_CHECK
(
m_particlesHandle
.initialize (
m_systematicsList
));
18
ANA_CHECK
(
m_classificationDecorator
.
initialize
(
m_systematicsList
,
m_particlesHandle
));
19
ANA_CHECK
(
m_systematicsList
.
initialize
());
20
21
ANA_CHECK
(
m_tool
->initialize());
22
23
return
StatusCode::SUCCESS;
24
}
25
26
27
28
StatusCode
AsgClassificationDecorationAlg::execute
()
29
{
30
31
std::vector<unsigned int> classifications;
32
33
for
(
const
auto
&
sys
:
m_systematicsList
.
systematicsVector
())
34
{
35
const
xAOD::IParticleContainer
*
particles
=
nullptr
;
36
ANA_CHECK
(
m_particlesHandle
.retrieve(
particles
,
sys
));
37
38
if
(
sys
.empty()) {
39
// we only run the IFF tool on the nominal calibration
40
for
(
const
xAOD::IParticle
*particle : *
particles
)
41
{
42
unsigned
int
classification(0);
43
ANA_CHECK
(
m_tool
->classify(*particle, classification));
44
m_classificationDecorator
.
set
(*particle, classification,
sys
);
45
classifications.push_back(classification);
46
}
47
}
48
else
{
49
// and for all other systematics, just propagate the decoration
50
unsigned
int
index
= 0;
51
for
(
const
xAOD::IParticle
*particle : *
particles
)
52
{
53
m_classificationDecorator
.
set
(*particle, classifications.at(
index
),
sys
);
54
index
++;
55
}
56
}
57
}
58
59
return
StatusCode::SUCCESS;
60
}
61
62
}
// namespace CP
CP::SysWriteDecorHandle::set
void set(const SG::AuxElement &object, const T &value, const CP::SystematicSet &sys) const
set the object decoration for the given systematic
CP::AsgClassificationDecorationAlg::m_systematicsList
CP::SysListHandle m_systematicsList
the systematics list we run
Definition:
AsgClassificationDecorationAlg.h:40
index
Definition:
index.py:1
CP::AsgClassificationDecorationAlg::execute
virtual StatusCode execute() override
Definition:
AsgClassificationDecorationAlg.cxx:28
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
AsgClassificationDecorationAlg.h
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition:
SysListHandle.cxx:96
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition:
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
CP
Select isolated Photons, Electrons and Muons.
Definition:
Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
mapkey::sys
@ sys
Definition:
TElectronEfficiencyCorrectionTool.cxx:42
CP::AsgClassificationDecorationAlg::m_tool
ToolHandle< IClassificationTool > m_tool
truth classifier tool handle
Definition:
AsgClassificationDecorationAlg.h:36
CP::AsgClassificationDecorationAlg::m_particlesHandle
CP::SysReadHandle< xAOD::IParticleContainer > m_particlesHandle
particles container handle
Definition:
AsgClassificationDecorationAlg.h:44
CP::AsgClassificationDecorationAlg::m_classificationDecorator
CP::SysWriteDecorHandle< int > m_classificationDecorator
the decoration for the truth classification
Definition:
AsgClassificationDecorationAlg.h:49
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition:
SysListHandle.cxx:69
CP::AsgClassificationDecorationAlg::initialize
virtual StatusCode initialize() override
Definition:
AsgClassificationDecorationAlg.cxx:14
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::SysWriteDecorHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize this handle
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
LArG4FSStartPointFilter.particles
list particles
Definition:
LArG4FSStartPointFilter.py:84
Generated on Fri Mar 28 2025 21:07:15 for ATLAS Offline Software by
1.8.18