ATLAS Offline Software
Loading...
Searching...
No Matches
PhotonValidationPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
7
8using CLHEP::GeV;
9
10PhotonValidationPlots::PhotonValidationPlots(PlotBase* pParent, const std::string& sDir):PlotBase(pParent, sDir),
11 m_oAllPlots(this, "PhotAll/", "Reco All"),
12 m_oPhotPlots(this, "Phot/", "Reco Phot"),
13 m_oAmbPhotPlots(this, "PhotAmb/", "Reco Ambig Phot"),
14 m_oConvPhotPlots(this, "Conv/", "Reco Converted"),
15 m_oTruthRecoPlots(this, "Truth/Reco/all/", "Reco Truth Photon"),
16 m_oTruthRecoConvPlots(this, "Truth/Reco/Conv/", "Reco Truth Conv Photon"),
17 m_oTruthRecoUncPlots(this, "Truth/Reco/Unc/", "Reco Truth Unc Photon"),
18 m_oTruthRecoLoosePlots(this, "Truth/RecoLoose/all/", "Reco Truth as loose Photon"),
19 m_oTruthRecoLooseConvPlots(this, "Truth/RecoLoose/Conv/", "Reco Truth Conv as loose Photon"),
20 m_oTruthRecoLooseUncPlots(this, "Truth/RecoLoose/Unc/", "Reco Truth Unc as loose Photon"),
21 m_oTruthRecoTightPlots(this, "Truth/RecoTight/all/", "Reco Truth as tight Photon"),
22 m_oTruthRecoTightConvPlots(this, "Truth/RecoTight/Conv/", "Reco Truth Conv as tight Photon"),
23 m_oTruthRecoTightUncPlots(this, "Truth/RecoTight/Unc/", "Reco Truth Unc as tight Photon"),
24 m_oTruthIsoPlots(this, "Truth/Iso/all/", "Truth Iso photon"),
25 m_oTruthIsoConvPlots(this, "Truth/Iso/Conv/", "Truth Iso Conv"),
26 m_oTruthIsoUncPlots(this, "Truth/Iso/Unc/", "Truth Iso Unc"),
27 author(nullptr),
28 convTruthR(nullptr),
29 convTruthMatchedR(nullptr),
30 convTruthRvsEta(nullptr),
32 res_et(nullptr),
33 res_eta(nullptr),
34 res_et_cut(nullptr),
35 res_eta_cut(nullptr)
36
37{}
39 author = Book1D("author", "Author of "+ m_sParticleType +"; author;Events", 150, -0.5, 149.5);
40 convTruthR = Book1D("convTruthR", "Radius Of conversion vertex for truth" + m_sParticleType + ";convR;Conversions", 1200,0.,1200.);
41 convTruthMatchedR = Book1D("convTruthMatchedR", "Radius Of conversion vertex for truth matched to reco" + m_sParticleType + ";convR;Conversions", 1200,0.,1200.);
42 convTruthRvsEta = Book2D("convTruthRvsEta", "Radius Of conversion vertex for truth vs #eta" + m_sParticleType + ";convR;#eta", 1200,0.,1200., 1000,-5.,5.);
43 convTruthMatchedRvsEta = Book2D("convTruthMatchedRvsEta", "Radius Of conversion vertex for truth matched to reco vs #eta" + m_sParticleType + ";convR;#eta", 1200,0.,1200., 1000,-5.,5.);
44 res_et = BookTProfile("res_et"," IsoPhoton;E_{T}^{truth}, [GeV];(E_{T} - E_{T}^{truth})/E_{T}^{truth}",100, 0., 200.);
45 res_eta = BookTProfile("res_eta"," IsoPhoton;#eta;(E_{T} - E_{T}^{truth})/E_{T}^{truth}",60, -3., 3.);
46 res_et_cut = BookTProfile("res_et_cut"," IsoPhoton;E_{T}^{truth}, [GeV];(E_{T} - E_{T}^{truth})/E_{T}^{truth}",100, 0., 200.);
47 res_eta_cut = BookTProfile("res_eta_cut"," IsoPhoton;#eta;(E_{T} - E_{T}^{truth})/E_{T}^{truth}",60, -3., 3.);
48}
49
50void PhotonValidationPlots::fill(const xAOD::Photon& photon, const xAOD::EventInfo& eventInfo, bool isPrompt) {
51
52 float weight = 1.;
53 weight = eventInfo.beamSpotWeight();
54
55 author->Fill(photon.author(),weight);
56 m_oAllPlots.fill(photon, eventInfo, isPrompt);
57
58 if (photon.author()&xAOD::EgammaParameters::AuthorPhoton) m_oPhotPlots.fill(photon, eventInfo, isPrompt);
59 if (photon.author()&xAOD::EgammaParameters::AuthorAmbiguous) m_oAmbPhotPlots.fill(photon, eventInfo, isPrompt);
60
61 //Select converted photons
62 m_oConvPhotPlots.fill(photon, eventInfo, isPrompt);
63}
Egamma::PhotonPlots m_oAllPlots
Egamma::KinematicsPlots m_oTruthRecoTightPlots
Egamma::KinematicsPlots m_oTruthRecoLoosePlots
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Egamma::KinematicsPlots m_oTruthIsoUncPlots
Egamma::KinematicsPlots m_oTruthRecoConvPlots
Egamma::KinematicsPlots m_oTruthRecoUncPlots
Egamma::KinematicsPlots m_oTruthRecoTightConvPlots
PhotonValidationPlots(PlotBase *pParent, const std::string &sDir)
Egamma::PhotonPlots m_oPhotPlots
Egamma::KinematicsPlots m_oTruthRecoLooseConvPlots
Egamma::KinematicsPlots m_oTruthIsoConvPlots
Egamma::KinematicsPlots m_oTruthRecoLooseUncPlots
Egamma::PhotonCnvPlots m_oConvPhotPlots
Egamma::KinematicsPlots m_oTruthRecoTightUncPlots
Egamma::PhotonAmbPlots m_oAmbPhotPlots
Egamma::KinematicsPlots m_oTruthRecoPlots
Egamma::KinematicsPlots m_oTruthIsoPlots
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
TProfile * BookTProfile(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
Definition PlotBase.cxx:186
TH2F * Book2D(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, int nBinsY, float startY, float endY, bool prependDir=true)
Book a TH2F histogram.
Definition PlotBase.cxx:123
float beamSpotWeight() const
Weight for beam spot size reweighting.
const uint16_t AuthorPhoton
Object Reconstructed by standard cluster-based algorithm.
Definition EgammaDefs.h:28
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition EgammaDefs.h:32
EventInfo_v1 EventInfo
Definition of the latest event info version.
Photon_v1 Photon
Definition of the current "egamma version".