ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaCaloClusterEtaAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include "xAODEgamma/Egamma.h"
10
13
14
15namespace CP {
16
18
19 if (m_caloEta2Key.contHandleKey().key() == m_caloEta2Key.key()) {
20 m_caloEta2Key = m_particlesKey.key() + "." + m_caloEta2Key.key();
21 }
22
23 ANA_CHECK(m_particlesKey.initialize());
24 ANA_CHECK(m_caloEta2Key.initialize());
25
26 return StatusCode::SUCCESS;
27 }
28
29 StatusCode EgammaCaloClusterEtaAlg::execute(const EventContext &ctx) const {
30
32
34 for (const xAOD::Egamma *particle : *particles) {
35 caloEta2Handle(*particle) = particle->caloCluster()->etaBE(2);
36 }
37
38 return StatusCode::SUCCESS;
39 }
40
41} // namespace
Handle class for reading from StoreGate.
Handle class for adding a decoration to an object.
#define ANA_CHECK(EXP)
check whether the given expression was successful
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_caloEta2Key
SG::ReadHandleKey< xAOD::EgammaContainer > m_particlesKey
virtual StatusCode execute(const EventContext &ctx) const override
virtual StatusCode initialize() override
Handle class for adding a decoration to an object.
Select isolated Photons, Electrons and Muons.
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17