ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
egamma
EgammaPhysValMonitoring
src
PhotonCnvPlots.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 "
PhotonCnvPlots.h
"
6
#include "
xAODEgamma/EgammaxAODHelpers.h
"
7
#include "
xAODEgamma/PhotonxAODHelpers.h
"
8
#include "
TruthUtils/TruthClasses.h
"
9
10
namespace
Egamma
{
11
12
13
PhotonCnvPlots::PhotonCnvPlots
(
PlotBase
* pParent,
const
std::string& sDir,
const
std::string& sParticleType):
PlotBase
(pParent, sDir),
14
m_oKinAllPlots
(this,
"All/KinPlots/"
,
"Reco "
+ sParticleType +
" Photon"
),
15
m_oKinIsoPlots
(this,
"Iso/KinPlots/"
,
"Reco "
+ sParticleType +
" Photon"
),
16
m_sParticleType
(sParticleType),
17
m_nParticles
(nullptr),
18
m_nParticles_weighted
(nullptr),
19
m_nVtx
(nullptr),
20
m_convR
(nullptr),
21
m_convRvsEta
(nullptr),
22
m_convRvsType
(nullptr),
23
m_convType
(nullptr),
24
m_convDeltaEta
(nullptr),
25
m_convDeltaPhi
(nullptr)
26
27
28
{}
29
30
void
PhotonCnvPlots::initializePlots
(){
31
m_nParticles
=
Book1D
(
"n"
,
"Number of "
+
m_sParticleType
+
"s;#"
+
m_sParticleType
+
";Events"
, 15, 0., 15.);
32
m_nParticles_weighted
=
Book1D
(
"n_weighted"
,
"Number of "
+
m_sParticleType
+
"s;#"
+
m_sParticleType
+
";Events"
, 15, 0., 15.);
33
m_nVtx
=
Book1D
(
"nVtx"
,
"Number of vertexes"
+
m_sParticleType
+
";nVtx;Events"
, 10, -0.5, 9.5);
34
m_convR
=
Book1D
(
"convR"
,
"Radius Of conversion vertex"
+
m_sParticleType
+
";convR;Conversions"
, 1200,0.,1200.);
35
m_convRvsEta
=
Book2D
(
"convRvsEta"
,
"Radius Of conversion vertex vs #eta"
+
m_sParticleType
+
";convR;#eta"
, 1200,0.,1200., 1000.,-5.,5.);
36
m_convRvsType
=
Book2D
(
"convRvsType"
,
"Radius Of conversion vertex vs Type"
+
m_sParticleType
+
";convR;Type"
, 1200,0.,1200., 7.,-.5,6.5);
37
m_convType
=
Book1D
(
"convType"
,
"Conversion Type"
+
m_sParticleType
+
";convType;Conversions"
, 7, -0.5, 6.5);
38
m_convDeltaEta
=
Book1D
(
"convDeltaEta"
,
"Conversion #Delta #eta"
+
m_sParticleType
+
";#eta; Conversions "
, 100,-0.5,0.5);
39
m_convDeltaPhi
=
Book1D
(
"ConvDeltaPhi"
,
"Conversion #Delta #varphi"
+
m_sParticleType
+
";#varphi; Conversions "
,100 ,-0.5,0.5);
40
}
41
42
43
44
void
PhotonCnvPlots::fill
(
const
xAOD::Photon
& photon,
const
xAOD::EventInfo
& eventInfo,
bool
isPrompt) {
45
46
float
weight = 1.;
47
weight = eventInfo.
beamSpotWeight
();
48
49
if
(!
xAOD::EgammaHelpers::isConvertedPhoton
(&photon))
return
;
50
m_oKinAllPlots
.fill(photon,eventInfo);
51
52
if
(!isPrompt)
return
;
53
54
int
nvtx=photon.nVertices();
55
m_nVtx
->Fill(nvtx,weight);
56
57
xAOD::EgammaParameters::ConversionType
cvtype=
xAOD::EgammaHelpers::conversionType
(&photon);
58
m_convType
->Fill(cvtype);
59
float
vtxRad =
xAOD::EgammaHelpers::conversionRadius
(&photon);
60
61
float
cnvDeltaEta1;
62
float
cnvDeltaPhi1;
63
photon.vertexCaloMatchValue(cnvDeltaEta1,
xAOD::EgammaParameters::convMatchDeltaEta1
);
64
photon.vertexCaloMatchValue(cnvDeltaPhi1,
xAOD::EgammaParameters::convMatchDeltaPhi1
);
65
m_convDeltaEta
->Fill(cnvDeltaEta1,weight);
66
m_convDeltaPhi
->Fill(cnvDeltaPhi1,weight);
67
68
m_convR
->Fill(vtxRad);
69
m_convRvsEta
->Fill(vtxRad,photon.eta(),weight);
70
m_convRvsType
->Fill(vtxRad,cvtype,weight);
71
m_oKinIsoPlots
.fill(photon,eventInfo);
72
73
74
}
75
}
EgammaxAODHelpers.h
PhotonCnvPlots.h
PhotonxAODHelpers.h
TruthClasses.h
Egamma::PhotonCnvPlots::m_convDeltaEta
TH1 * m_convDeltaEta
Definition
PhotonCnvPlots.h:36
Egamma::PhotonCnvPlots::m_nParticles_weighted
TH1 * m_nParticles_weighted
Definition
PhotonCnvPlots.h:30
Egamma::PhotonCnvPlots::m_oKinIsoPlots
Egamma::KinematicsPlots m_oKinIsoPlots
Definition
PhotonCnvPlots.h:25
Egamma::PhotonCnvPlots::m_convRvsEta
TH2 * m_convRvsEta
Definition
PhotonCnvPlots.h:33
Egamma::PhotonCnvPlots::m_convR
TH1 * m_convR
Definition
PhotonCnvPlots.h:32
Egamma::PhotonCnvPlots::m_nParticles
TH1 * m_nParticles
Definition
PhotonCnvPlots.h:29
Egamma::PhotonCnvPlots::PhotonCnvPlots
PhotonCnvPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
Definition
PhotonCnvPlots.cxx:13
Egamma::PhotonCnvPlots::m_nVtx
TH1 * m_nVtx
Definition
PhotonCnvPlots.h:31
Egamma::PhotonCnvPlots::m_convType
TH1 * m_convType
Definition
PhotonCnvPlots.h:35
Egamma::PhotonCnvPlots::initializePlots
virtual void initializePlots()
Definition
PhotonCnvPlots.cxx:30
Egamma::PhotonCnvPlots::m_convRvsType
TH2 * m_convRvsType
Definition
PhotonCnvPlots.h:34
Egamma::PhotonCnvPlots::m_convDeltaPhi
TH1 * m_convDeltaPhi
Definition
PhotonCnvPlots.h:37
Egamma::PhotonCnvPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition
PhotonCnvPlots.cxx:44
Egamma::PhotonCnvPlots::m_sParticleType
std::string m_sParticleType
Definition
PhotonCnvPlots.h:27
Egamma::PhotonCnvPlots::m_oKinAllPlots
Egamma::KinematicsPlots m_oKinAllPlots
Definition
PhotonCnvPlots.h:24
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
PlotBase::Book2D
TH2F * Book2D(std::string_view name, std::string_view labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition
PlotBase.cxx:123
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition
EventInfo_v1.cxx:970
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::EgammaHelpers::conversionType
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
Definition
PhotonxAODHelpers.cxx:21
xAOD::EgammaHelpers::conversionRadius
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
Definition
PhotonxAODHelpers.cxx:58
xAOD::EgammaParameters::convMatchDeltaPhi1
@ convMatchDeltaPhi1
difference between the cluster phi and the phi of the first track of the vertex extrapolated to the s...
Definition
EgammaEnums.h:254
xAOD::EgammaParameters::convMatchDeltaEta1
@ convMatchDeltaEta1
difference between the cluster eta and the eta of the first track of the vertex extrapolated to the s...
Definition
EgammaEnums.h:244
xAOD::EgammaParameters::ConversionType
ConversionType
Definition
EgammaEnums.h:269
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