ATLAS Offline Software
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 
8 using CLHEP::GeV;
9 
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),
31  convTruthMatchedRvsEta(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 
51 
52  float weight = 1.;
53  weight = eventInfo.beamSpotWeight();
54 
55  author->Fill(photon.author(),weight);
56  m_oAllPlots.fill(photon, eventInfo, isPrompt);
57 
60 
61  //Select converted photons
62  m_oConvPhotPlots.fill(photon, eventInfo, isPrompt);
63 }
PhotonValidationPlots::m_sParticleType
std::string m_sParticleType
Definition: PhotonValidationPlots.h:24
PhotonValidationPlots::convTruthMatchedRvsEta
TH2 * convTruthMatchedRvsEta
Definition: PhotonValidationPlots.h:48
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
PlotBase
Definition: PlotBase.h:34
PhotonValidationPlots.h
PhotonValidationPlots::res_eta_cut
TProfile * res_eta_cut
Definition: PhotonValidationPlots.h:52
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:59
PlotBase::Book2D
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
PhotonValidationPlots::initializePlots
virtual void initializePlots()
Definition: PhotonValidationPlots.cxx:38
PhotonValidationPlots::convTruthMatchedR
TH1 * convTruthMatchedR
Definition: PhotonValidationPlots.h:46
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:190
PlotBase::Book1D
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
PhotonValidationPlots::author
TH1 * author
Definition: PhotonValidationPlots.h:44
Egamma::PhotonCnvPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: PhotonCnvPlots.cxx:44
PhotonValidationPlots::m_oAllPlots
Egamma::PhotonPlots m_oAllPlots
Definition: PhotonValidationPlots.h:27
PhotonValidationPlots::convTruthR
TH1 * convTruthR
Definition: PhotonValidationPlots.h:45
xAOD::EgammaParameters::AuthorAmbiguous
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition: EgammaDefs.h:32
PhotonValidationPlots::m_oAmbPhotPlots
Egamma::PhotonAmbPlots m_oAmbPhotPlots
Definition: PhotonValidationPlots.h:29
PhotonValidationPlots::res_eta
TProfile * res_eta
Definition: PhotonValidationPlots.h:50
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:200
xAOD::Photon_v1
Definition: Photon_v1.h:37
MCTruthPartClassifier::isPrompt
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
Definition: TruthClassifiers.h:180
PhotonValidationPlots::convTruthRvsEta
TH2 * convTruthRvsEta
Definition: PhotonValidationPlots.h:47
PhotonValidationPlots::m_oConvPhotPlots
Egamma::PhotonCnvPlots m_oConvPhotPlots
Definition: PhotonValidationPlots.h:30
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:25
EgammaDefs.h
PlotBase::BookTProfile
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
xAOD::EgammaParameters::AuthorPhoton
const uint16_t AuthorPhoton
Object Reconstructed by standard cluster-based algorithm.
Definition: EgammaDefs.h:28
PhotonValidationPlots::PhotonValidationPlots
PhotonValidationPlots(PlotBase *pParent, const std::string &sDir)
Definition: PhotonValidationPlots.cxx:10
PhotonValidationPlots::m_oPhotPlots
Egamma::PhotonPlots m_oPhotPlots
Definition: PhotonValidationPlots.h:28
Egamma::PhotonPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: PhotonPlots.cxx:42
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:970
PhotonValidationPlots::res_et_cut
TProfile * res_et_cut
Definition: PhotonValidationPlots.h:51
PhotonValidationPlots::res_et
TProfile * res_et
Definition: PhotonValidationPlots.h:49
Egamma::PhotonAmbPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: PhotonAmbPlots.cxx:24
PhotonValidationPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: PhotonValidationPlots.cxx:50