ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
egammaPerformance
src
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
12
#include "
AthenaMonitoring/AthMonitorAlgorithm.h
"
13
#include "
StoreGate/ReadDecorHandleKeyArray.h
"
14
#include "
AthenaMonitoringKernel/Monitored.h
"
15
16
#include "
xAODEgamma/Photon.h
"
17
#include "
xAODEgamma/PhotonContainer.h
"
18
#include "
xAODEgamma/PhotonxAODHelpers.h
"
19
20
#include <string>
21
22
class
MonitorPhotonAlgorithm
:
public
AthMonitorAlgorithm
{
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
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
AthMonitorAlgorithm.h
PhotonContainer.h
Photon.h
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
PhotonxAODHelpers.h
ReadDecorHandleKeyArray.h
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthMonitorAlgorithm.cxx:8
MonitorPhotonAlgorithm::~MonitorPhotonAlgorithm
virtual ~MonitorPhotonAlgorithm()=default
MonitorPhotonAlgorithm::Regions
Regions
Definition
MonitorPhotonAlgorithm.h:29
MonitorPhotonAlgorithm::NREGIONS
@ NREGIONS
Definition
MonitorPhotonAlgorithm.h:29
MonitorPhotonAlgorithm::FORWARD
@ FORWARD
Definition
MonitorPhotonAlgorithm.h:29
MonitorPhotonAlgorithm::ENDCAP
@ ENDCAP
Definition
MonitorPhotonAlgorithm.h:29
MonitorPhotonAlgorithm::BARREL
@ BARREL
Definition
MonitorPhotonAlgorithm.h:29
MonitorPhotonAlgorithm::CRACK
@ CRACK
Definition
MonitorPhotonAlgorithm.h:29
MonitorPhotonAlgorithm::m_ParticlePrefix
Gaudi::Property< std::string > m_ParticlePrefix
Definition
MonitorPhotonAlgorithm.h:34
MonitorPhotonAlgorithm::m_RecoName
Gaudi::Property< std::string > m_RecoName
Definition
MonitorPhotonAlgorithm.h:35
MonitorPhotonAlgorithm::GetRegion
Regions GetRegion(Float_t eta) const
Definition
MonitorPhotonAlgorithm.h:38
MonitorPhotonAlgorithm::m_ParticleContainerKey
SG::ReadHandleKey< xAOD::PhotonContainer > m_ParticleContainerKey
Definition
MonitorPhotonAlgorithm.h:32
MonitorPhotonAlgorithm::MonitorPhotonAlgorithm
MonitorPhotonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition
MonitorPhotonAlgorithm.cxx:10
MonitorPhotonAlgorithm::m_WithTrigger
Gaudi::Property< std::string > m_WithTrigger
Definition
MonitorPhotonAlgorithm.h:36
MonitorPhotonAlgorithm::fillHistograms
StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition
MonitorPhotonAlgorithm.cxx:23
MonitorPhotonAlgorithm::m_PhotonIsolationKey
SG::ReadDecorHandleKeyArray< xAOD::PhotonContainer > m_PhotonIsolationKey
Definition
MonitorPhotonAlgorithm.h:33
MonitorPhotonAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition
MonitorPhotonAlgorithm.cxx:15
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::ReadDecorHandleKeyArray
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
Definition
StoreGate/StoreGate/ReadDecorHandleKeyArray.h:35
Generated on
for ATLAS Offline Software by
1.17.0