ATLAS Offline Software
Loading...
Searching...
No Matches
MonitorPhotonAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
4 Author : B. Laforge (laforge@lpnhe.in2p3.fr)
5 4 May 2020
6*/
7
8
9#ifndef MonitorPhotonAlgorithm_H
10#define MonitorPhotonAlgorithm_H
11
15
16#include "xAODEgamma/Photon.h"
19
20#include <string>
21
23 public:
24 MonitorPhotonAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
25 virtual ~MonitorPhotonAlgorithm() = default;
26 virtual StatusCode initialize() override;
27 StatusCode fillHistograms( const EventContext& ctx ) const override;
28
29 enum Regions : int { BARREL=0, CRACK, ENDCAP, FORWARD, NREGIONS };
30
31 private:
32 SG::ReadHandleKey<xAOD::PhotonContainer> m_ParticleContainerKey {this, "ParticleContainerName", "Photons", "Name of electron container" };
33 SG::ReadDecorHandleKeyArray<xAOD::PhotonContainer> m_PhotonIsolationKey {this, "PhotonIsolationKey", {"Photons.ptcone20", "Photons.topoetcone40"} };
34 Gaudi::Property<std::string> m_ParticlePrefix {this,"ParticlePrefix","photon","Name of the particle prefix to be used to define hists"};
35 Gaudi::Property<std::string> m_RecoName {this,"RecoName","Tight","Name of particle flavor in egamma reco"};
36 Gaudi::Property<std::string> m_WithTrigger {this,"WithTrigger","","Name extension when electrons are chosen from triggered events"};
37
38 Regions GetRegion(Float_t eta) const {
39 Float_t aeta = fabs(eta);
40 // check if object is in barrel
41 if ( aeta < 1.37 ) return MonitorPhotonAlgorithm::BARREL;
42 // check if object is in end-caps
43 if ( aeta > 1.52 && aeta < 2.47 ) return MonitorPhotonAlgorithm::ENDCAP;
44 // check if object is in crack region
45 if ( aeta > 1.37 && aeta < 1.52 ) return MonitorPhotonAlgorithm::CRACK;
46 return MonitorPhotonAlgorithm::NREGIONS; // out of acceptance
47 }
48
49};
50#endif
Scalar eta() const
pseudorapidity method
Header file to be included by clients of the Monitored infrastructure.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual ~MonitorPhotonAlgorithm()=default
Gaudi::Property< std::string > m_ParticlePrefix
Gaudi::Property< std::string > m_RecoName
Regions GetRegion(Float_t eta) const
SG::ReadHandleKey< xAOD::PhotonContainer > m_ParticleContainerKey
MonitorPhotonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_WithTrigger
StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
SG::ReadDecorHandleKeyArray< xAOD::PhotonContainer > m_PhotonIsolationKey
virtual StatusCode initialize() override
initialize
Property holding a SG store/key/clid from which a ReadHandle is made.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray