ATLAS Offline Software
PhysicsAnalysis
Algorithms
TruthParticleLevelAnalysisAlgorithms
Root
ParticleLevelMissingETAlg.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 "
TruthParticleLevelAnalysisAlgorithms/ParticleLevelMissingETAlg.h
"
8
9
namespace
CP
{
10
11
StatusCode
ParticleLevelMissingETAlg::initialize
() {
12
13
ANA_CHECK
(
m_metKey
.initialize());
14
15
return
StatusCode::SUCCESS;
16
}
17
18
StatusCode
ParticleLevelMissingETAlg::execute
() {
19
20
SG::ReadHandle<xAOD::MissingETContainer>
met
(
m_metKey
);
21
22
// decorators
23
static
const
SG::AuxElement::Decorator<float>
dec_phi(
"phi"
);
24
static
const
SG::AuxElement::Decorator<float>
dec_met(
"met"
);
25
26
for
(
const
auto
* etmiss : *
met
) {
27
dec_met(*etmiss) = etmiss->met();
28
dec_phi(*etmiss) = etmiss->phi();
29
}
30
31
return
StatusCode::SUCCESS;
32
}
33
34
}
// namespace CP
SG::ReadHandle
Definition:
StoreGate/StoreGate/ReadHandle.h:70
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
CP
Select isolated Photons, Electrons and Muons.
Definition:
Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
CP::ParticleLevelMissingETAlg::m_metKey
SG::ReadHandleKey< xAOD::MissingETContainer > m_metKey
Definition:
ParticleLevelMissingETAlg.h:26
met
Definition:
IMETSignificance.h:24
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition:
Decorator.h:59
ParticleLevelMissingETAlg.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::ParticleLevelMissingETAlg::execute
virtual StatusCode execute() final
Definition:
ParticleLevelMissingETAlg.cxx:18
CP::ParticleLevelMissingETAlg::initialize
virtual StatusCode initialize() final
Definition:
ParticleLevelMissingETAlg.cxx:11
Generated on Fri Jan 10 2025 21:15:42 for ATLAS Offline Software by
1.8.18