ATLAS Offline Software
PhysicsAnalysis
Algorithms
EgammaAnalysisAlgorithms
Root
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
"
8
#include "
xAODEgamma/EgammaContainer.h
"
9
#include <
EgammaAnalysisAlgorithms/EgammaCaloClusterEtaAlg.h
>
10
11
#include <
AsgDataHandles/ReadHandle.h
>
12
#include <
AsgDataHandles/WriteDecorHandle.h
>
13
14
15
namespace
CP
{
16
17
StatusCode
EgammaCaloClusterEtaAlg::initialize
() {
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
31
SG::ReadHandle<xAOD::EgammaContainer>
particles
(
m_particlesKey
, ctx);
32
33
SG::WriteDecorHandle<xAOD::EgammaContainer, float>
caloEta2Handle(
m_caloEta2Key
, ctx);
34
for
(
const
xAOD::Egamma
*
particle
: *
particles
) {
35
caloEta2Handle(*
particle
) =
particle
->caloCluster()->etaBE(2);
36
}
37
38
return
StatusCode::SUCCESS;
39
}
40
41
}
// namespace
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition:
ParticleHypothesis.h:79
SG::ReadHandle
Definition:
StoreGate/StoreGate/ReadHandle.h:67
CP::EgammaCaloClusterEtaAlg::m_particlesKey
SG::ReadHandleKey< xAOD::EgammaContainer > m_particlesKey
Definition:
EgammaCaloClusterEtaAlg.h:25
ANA_CHECK
#define ANA_CHECK(EXP)
check whether the given expression was successful
Definition:
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:324
xAOD::Egamma_v1
Definition:
Egamma_v1.h:56
CP
Select isolated Photons, Electrons and Muons.
Definition:
Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
EgammaContainer.h
Egamma.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition:
StoreGate/StoreGate/WriteDecorHandle.h:100
WriteDecorHandle.h
Handle class for adding a decoration to an object.
CP::EgammaCaloClusterEtaAlg::m_caloEta2Key
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_caloEta2Key
Definition:
EgammaCaloClusterEtaAlg.h:26
ReadHandle.h
Handle class for reading from StoreGate.
CP::EgammaCaloClusterEtaAlg::initialize
virtual StatusCode initialize() override
Definition:
EgammaCaloClusterEtaAlg.cxx:17
CP::EgammaCaloClusterEtaAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition:
EgammaCaloClusterEtaAlg.cxx:29
LArG4FSStartPointFilter.particles
list particles
Definition:
LArG4FSStartPointFilter.py:84
EgammaCaloClusterEtaAlg.h
Generated on Mon Sep 1 2025 21:09:34 for ATLAS Offline Software by
1.8.18