ATLAS Offline Software
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
AsgAnalysisAlgorithms
Root
AsgEnergyDecoratorAlg.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
#include <
AsgAnalysisAlgorithms/AsgEnergyDecoratorAlg.h
>
8
9
namespace
CP
{
10
11
StatusCode
AsgEnergyDecoratorAlg::initialize
() {
12
13
ANA_CHECK
(
m_particlesHandle
.initialize (
m_systematicsList
));
14
ANA_CHECK
(
m_energyDecor
.initialize (
m_systematicsList
,
m_particlesHandle
));
15
ANA_CHECK
(
m_systematicsList
.initialize());
16
17
return
StatusCode::SUCCESS;
18
}
19
20
StatusCode
AsgEnergyDecoratorAlg::execute
() {
21
22
for
(
const
auto
&sys :
m_systematicsList
.systematicsVector()) {
23
24
const
xAOD::IParticleContainer
*particles =
nullptr
;
25
ANA_CHECK
(
m_particlesHandle
.retrieve (particles, sys));
26
27
for
(
const
xAOD::IParticle
*particle : *particles) {
28
m_energyDecor
.set(*particle, particle->e(), sys);
29
}
30
31
}
32
33
return
StatusCode::SUCCESS;
34
}
35
36
}
// namespace
AsgEnergyDecoratorAlg.h
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP::AsgEnergyDecoratorAlg::m_systematicsList
CP::SysListHandle m_systematicsList
Definition
AsgEnergyDecoratorAlg.h:27
CP::AsgEnergyDecoratorAlg::initialize
virtual StatusCode initialize() override
Definition
AsgEnergyDecoratorAlg.cxx:11
CP::AsgEnergyDecoratorAlg::execute
virtual StatusCode execute() override
Definition
AsgEnergyDecoratorAlg.cxx:20
CP::AsgEnergyDecoratorAlg::m_energyDecor
CP::SysWriteDecorHandle< float > m_energyDecor
Definition
AsgEnergyDecoratorAlg.h:30
CP::AsgEnergyDecoratorAlg::m_particlesHandle
CP::SysReadHandle< xAOD::IParticleContainer > m_particlesHandle
Definition
AsgEnergyDecoratorAlg.h:28
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:27
xAOD::IParticleContainer
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.
Definition
xAOD/xAODBase/xAODBase/IParticleContainer.h:32
Generated on
for ATLAS Offline Software by
1.14.0