ATLAS Offline Software
Loading...
Searching...
No Matches
PhotonExtraVariablesAlg.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
8
9namespace CP {
10
22
24
25 for (const auto &sys : m_systematicsList.systematicsVector()) {
26
27 const xAOD::PhotonContainer *photons = nullptr;
28 ANA_CHECK(m_photonsHandle.retrieve(photons, sys));
29
30 for (const xAOD::Photon *photon : *photons) {
31 int conversionType = photon->conversionType();
32 m_conversionTypeHandle.set(*photon, conversionType, sys);
33
34 float caloEta2 = photon->caloCluster()->etaBE(2);
35 m_caloEta2Handle.set(*photon, caloEta2, sys);
36 }
37 }
38
39 return StatusCode::SUCCESS;
40 }
41
42} // namespace
#define ANA_CHECK(EXP)
check whether the given expression was successful
virtual StatusCode initialize() override
CP::SysWriteDecorHandle< float > m_caloEta2Handle
virtual StatusCode execute() override
CP::SysReadHandle< xAOD::PhotonContainer > m_photonsHandle
CP::SysWriteDecorHandle< int > m_conversionTypeHandle
Select isolated Photons, Electrons and Muons.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
Photon_v1 Photon
Definition of the current "egamma version".