42{
43
44 SG::ReadHandle<xAOD::PhotonContainer> photons(
m_collName, ctx);
45
46 auto recEta = std::make_unique<std::vector<float>>();
47 auto recPhi = std::make_unique<std::vector<float>>();
48 auto recEt = std::make_unique<std::vector<float>>();
49 auto recE = std::make_unique<std::vector<float>>();
50
51
53
54 float eta(0.0),
phi(0.0),
e(0.0),
et(0.0);
55
56 if (ph->nCaloClusters() > 0) {
62 } else {
64 "Couldn't retrieve photon cluster, will use photon 4-momentum");
69 }
70 recEta->push_back(
eta);
71 recPhi->push_back(
phi);
73 recE->push_back(e);
74 }
75
76
78 SG::WriteHandle<std::vector<float>>
etas(
m_sgEta, ctx);
80 }
82 SG::WriteHandle<std::vector<float>> phis(
m_sgPhi, ctx);
83 ATH_CHECK(phis.record(std::move(recPhi)));
84 }
86 SG::WriteHandle<std::vector<float>> ets(
m_sgEt, ctx);
88 }
90 SG::WriteHandle<std::vector<float>> es(
m_sgE, ctx);
92 }
93 return StatusCode::SUCCESS;
94}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
float et(const xAOD::jFexSRJetRoI *j)
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Photon_v1 Photon
Definition of the current "egamma version".