ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
EgammaPhysValMonitoring
src
PhotonPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
PhotonPlots.h
"
6
#include "
xAODEgamma/EgammaxAODHelpers.h
"
7
#include "
xAODEgamma/PhotonxAODHelpers.h
"
8
#include "
TruthUtils/TruthClasses.h
"
9
using
CLHEP::GeV;
10
11
namespace
Egamma
{
12
13
14
PhotonPlots::PhotonPlots
(
PlotBase
* pParent,
const
std::string& sDir,
const
std::string& sParticleType):
PlotBase
(pParent, sDir),
15
// inclusive plots, no isolation , ID or truth-matching requirements
16
m_oKinAllPlots
(this,
"All/KinPlots/"
,
"Reco "
+ sParticleType +
" Photon"
),
17
m_oShowerShapesAllPlots
(this,
"All/ShowerShapesPlots/"
, sParticleType +
" Photon"
),
18
m_oShowerShapesAll10GeVPlots
(this,
"All/ShowerShapes10GeVPlots/"
, sParticleType +
" Photon"
),
19
m_oPhotonConversionAllPlots
(this,
"All/PhotonConversionPlots/"
, sParticleType +
" Photon"
),
20
// truth-matchint "Iso" requirement
21
m_oKinIsoPlots
(this,
"Iso/KinPlots/"
,
"Reco "
+ sParticleType +
" Photon"
),
22
m_oShowerShapesIsoPlots
(this,
"Iso/ShowerShapesPlots/"
, sParticleType +
" Photon"
),
23
m_oShowerShapesIso10GeVPlots
(this,
"Iso/ShowerShapes10GeVPlots/"
, sParticleType +
" Photon"
),
24
m_oPhotonConversionIsoPlots
(this,
"Iso/PhotonConversionPlots/"
, sParticleType +
" Photon"
),
25
m_oKinIsoUncPlots
(this,
"Iso/KinPlotsUnc/"
,
"Reco "
+ sParticleType +
" Photon"
),
26
m_oKinIsoConvPlots
(this,
"Iso/KinPlotsConv/"
,
"Reco "
+ sParticleType +
" Photon"
),
27
//
28
m_oKinIsoLoosePlots
(this,
"IsoLoose/KinPlots/"
,
"Reco "
+ sParticleType +
" Photon"
),
29
m_oKinIsoLooseUncPlots
(this,
"IsoLoose/KinPlotsUnc/"
,
"Reco "
+ sParticleType +
" Photon"
),
30
m_oKinIsoLooseConvPlots
(this,
"IsoLoose/KinPlotsConv/"
,
"Reco "
+ sParticleType +
" Photon"
),
31
//
32
m_oKinIsoTightPlots
(this,
"IsoTight/KinPlots/"
,
"Reco "
+ sParticleType +
" Photon"
),
33
m_oKinIsoTightUncPlots
(this,
"IsoTight/KinPlotsUnc/"
,
"Reco "
+ sParticleType +
" Photon"
),
34
m_oKinIsoTightConvPlots
(this,
"IsoTight/KinPlotsConv/"
,
"Reco "
+ sParticleType +
" Photon"
),
35
m_sParticleType
(sParticleType),
36
m_nParticles
(nullptr),
37
m_nParticles_weighted
(nullptr)
38
{}
39
40
void
PhotonPlots::initializePlots
(){
41
m_nParticles
=
Book1D
(
"n"
,
"Number of "
+
m_sParticleType
+
"s;#"
+
m_sParticleType
+
"s;Events"
, 15, 0., 15.);
42
m_nParticles_weighted
=
Book1D
(
"n_weighted"
,
"Number of "
+
m_sParticleType
+
"s;#"
+
m_sParticleType
+
"s;Events"
, 15, 0., 15.);
43
}
44
45
void
PhotonPlots::fill
(
const
xAOD::Photon
& photon,
const
xAOD::EventInfo
& eventInfo,
bool
isPrompt) {
46
m_oKinAllPlots
.fill(photon,eventInfo);
47
m_oShowerShapesAllPlots
.fill(photon,eventInfo);
48
if
(photon.pt() > 10 * Gaudi::Units::GeV) {
49
m_oShowerShapesAll10GeVPlots
.fill(photon,eventInfo);
50
}
51
m_oPhotonConversionAllPlots
.fill(photon,eventInfo);
52
53
if
(!isPrompt)
return
;
54
55
m_oKinIsoPlots
.fill(photon,eventInfo);
56
m_oShowerShapesIsoPlots
.fill(photon,eventInfo);
57
if
(photon.pt() > 10 * Gaudi::Units::GeV) {
58
m_oShowerShapesIso10GeVPlots
.fill(photon,eventInfo);
59
}
60
61
m_oPhotonConversionIsoPlots
.fill(photon,eventInfo);
62
if
(!
xAOD::EgammaHelpers::isConvertedPhoton
(&photon))
m_oKinIsoUncPlots
.fill(photon,eventInfo);
63
else
m_oKinIsoConvPlots
.fill(photon,eventInfo);
64
65
bool
val_loose=
false
;
66
67
photon.passSelection(val_loose,
"Loose"
);
68
if
(val_loose) {
69
m_oKinIsoLoosePlots
.fill(photon,eventInfo);
70
if
(!
xAOD::EgammaHelpers::isConvertedPhoton
(&photon))
m_oKinIsoLooseUncPlots
.fill(photon,eventInfo);
71
else
m_oKinIsoLooseConvPlots
.fill(photon,eventInfo);
72
}
73
74
bool
val_tight=
false
;
75
76
photon.passSelection(val_tight,
"Tight"
);
77
if
(val_tight) {
78
m_oKinIsoTightPlots
.fill(photon,eventInfo);
79
if
(!
xAOD::EgammaHelpers::isConvertedPhoton
(&photon))
m_oKinIsoTightUncPlots
.fill(photon,eventInfo);
80
else
m_oKinIsoTightConvPlots
.fill(photon,eventInfo);
81
}
82
}
83
84
}
EgammaxAODHelpers.h
PhotonPlots.h
PhotonxAODHelpers.h
TruthClasses.h
Egamma::PhotonPlots::m_oKinIsoLooseUncPlots
Egamma::KinematicsPlots m_oKinIsoLooseUncPlots
Definition
PhotonPlots.h:35
Egamma::PhotonPlots::initializePlots
virtual void initializePlots()
Definition
PhotonPlots.cxx:40
Egamma::PhotonPlots::m_sParticleType
std::string m_sParticleType
Definition
PhotonPlots.h:41
Egamma::PhotonPlots::m_oKinIsoPlots
Egamma::KinematicsPlots m_oKinIsoPlots
Definition
PhotonPlots.h:28
Egamma::PhotonPlots::m_oShowerShapesIsoPlots
Egamma::ShowerShapesPlots m_oShowerShapesIsoPlots
Definition
PhotonPlots.h:29
Egamma::PhotonPlots::PhotonPlots
PhotonPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
Definition
PhotonPlots.cxx:14
Egamma::PhotonPlots::m_oKinIsoTightPlots
Egamma::KinematicsPlots m_oKinIsoTightPlots
Definition
PhotonPlots.h:37
Egamma::PhotonPlots::m_oKinAllPlots
Egamma::KinematicsPlots m_oKinAllPlots
Definition
PhotonPlots.h:24
Egamma::PhotonPlots::m_oPhotonConversionIsoPlots
Egamma::PhotonConversionPlots m_oPhotonConversionIsoPlots
Definition
PhotonPlots.h:31
Egamma::PhotonPlots::m_oKinIsoLooseConvPlots
Egamma::KinematicsPlots m_oKinIsoLooseConvPlots
Definition
PhotonPlots.h:36
Egamma::PhotonPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition
PhotonPlots.cxx:45
Egamma::PhotonPlots::m_oShowerShapesAll10GeVPlots
Egamma::ShowerShapesPlots m_oShowerShapesAll10GeVPlots
Definition
PhotonPlots.h:26
Egamma::PhotonPlots::m_oShowerShapesAllPlots
Egamma::ShowerShapesPlots m_oShowerShapesAllPlots
Definition
PhotonPlots.h:25
Egamma::PhotonPlots::m_oKinIsoTightConvPlots
Egamma::KinematicsPlots m_oKinIsoTightConvPlots
Definition
PhotonPlots.h:39
Egamma::PhotonPlots::m_oKinIsoTightUncPlots
Egamma::KinematicsPlots m_oKinIsoTightUncPlots
Definition
PhotonPlots.h:38
Egamma::PhotonPlots::m_nParticles_weighted
TH1 * m_nParticles_weighted
Definition
PhotonPlots.h:44
Egamma::PhotonPlots::m_oKinIsoLoosePlots
Egamma::KinematicsPlots m_oKinIsoLoosePlots
Definition
PhotonPlots.h:34
Egamma::PhotonPlots::m_oPhotonConversionAllPlots
Egamma::PhotonConversionPlots m_oPhotonConversionAllPlots
Definition
PhotonPlots.h:27
Egamma::PhotonPlots::m_oShowerShapesIso10GeVPlots
Egamma::ShowerShapesPlots m_oShowerShapesIso10GeVPlots
Definition
PhotonPlots.h:30
Egamma::PhotonPlots::m_oKinIsoUncPlots
Egamma::KinematicsPlots m_oKinIsoUncPlots
Definition
PhotonPlots.h:32
Egamma::PhotonPlots::m_nParticles
TH1 * m_nParticles
Definition
PhotonPlots.h:43
Egamma::PhotonPlots::m_oKinIsoConvPlots
Egamma::KinematicsPlots m_oKinIsoConvPlots
Definition
PhotonPlots.h:33
PlotBase::Book1D
TH1D * Book1D(std::string_view name, std::string_view labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition
PlotBase.cxx:94
PlotBase::PlotBase
PlotBase(PlotBase *parent, std::string_view sDir)
Definition
PlotBase.cxx:29
Egamma
Definition
ClusMomentumPlots.cxx:11
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition
EgammaxAODHelpers.cxx:25
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Generated on
for ATLAS Offline Software by
1.17.0