ATLAS Offline Software
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"
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  m_oKinAllPlots(this, "All/KinPlots/", "Reco " + sParticleType +" Photon"),
16  m_oShowerShapesAllPlots(this, "All/ShowerShapesPlots/", sParticleType +" Photon"),
17  m_oPhotonConversionAllPlots(this, "All/PhotonConversionPlots/", sParticleType +" Photon"),
18 //
19  m_oKinIsoPlots(this, "Iso/KinPlots/", "Reco " + sParticleType +" Photon"),
20  m_oShowerShapesIsoPlots(this, "Iso/ShowerShapesPlots/", sParticleType +" Photon"),
21  m_oPhotonConversionIsoPlots(this, "Iso/PhotonConversionPlots/", sParticleType +" Photon"),
22  m_oKinIsoUncPlots(this, "Iso/KinPlotsUnc/", "Reco " + sParticleType +" Photon"),
23  m_oKinIsoConvPlots(this, "Iso/KinPlotsConv/", "Reco " + sParticleType +" Photon"),
24  //
25  m_oKinIsoLoosePlots(this, "IsoLoose/KinPlots/", "Reco " + sParticleType +" Photon"),
26  m_oKinIsoLooseUncPlots(this, "IsoLoose/KinPlotsUnc/", "Reco " + sParticleType +" Photon"),
27  m_oKinIsoLooseConvPlots(this, "IsoLoose/KinPlotsConv/", "Reco " + sParticleType +" Photon"),
28  //
29  m_oKinIsoTightPlots(this, "IsoTight/KinPlots/", "Reco " + sParticleType +" Photon"),
30  m_oKinIsoTightUncPlots(this, "IsoTight/KinPlotsUnc/", "Reco " + sParticleType +" Photon"),
31  m_oKinIsoTightConvPlots(this, "IsoTight/KinPlotsConv/", "Reco " + sParticleType +" Photon"),
32  m_sParticleType(sParticleType),
33  m_nParticles(nullptr),
34  m_nParticles_weighted(nullptr)
35 {}
36 
38  m_nParticles = Book1D("n", "Number of "+ m_sParticleType + "s;#" + m_sParticleType + "s;Events", 15, 0., 15.);
39  m_nParticles_weighted = Book1D("n_weighted", "Number of "+ m_sParticleType + "s;#" + m_sParticleType + "s;Events", 15, 0., 15.);
40 }
41 
42  void PhotonPlots::fill(const xAOD::Photon& photon, const xAOD::EventInfo& eventInfo, bool isPrompt) {
43  m_oKinAllPlots.fill(photon,eventInfo);
46 
47  if(!isPrompt) return;
48 
49  m_oKinIsoPlots.fill(photon,eventInfo);
53  else m_oKinIsoConvPlots.fill(photon,eventInfo);
54 
55  bool val_loose=false;
56 
57  photon.passSelection(val_loose, "Loose");
58  if(val_loose) {
59  m_oKinIsoLoosePlots.fill(photon,eventInfo);
61  else m_oKinIsoLooseConvPlots.fill(photon,eventInfo);
62  }
63 
64  bool val_tight=false;
65 
66  photon.passSelection(val_tight, "Tight");
67  if(val_tight) {
68  m_oKinIsoTightPlots.fill(photon,eventInfo);
70  else m_oKinIsoTightConvPlots.fill(photon,eventInfo);
71  }
72 }
73 
74 }
Egamma::PhotonConversionPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo)
Definition: PhotonConversionPlots.cxx:34
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
Egamma::ShowerShapesPlots::fill
void fill(const xAOD::Egamma &egamma, const xAOD::EventInfo &eventInfo)
Definition: ShowerShapesPlots.cxx:154
PlotBase
Definition: PlotBase.h:34
Egamma::PhotonPlots::m_oPhotonConversionIsoPlots
Egamma::PhotonConversionPlots m_oPhotonConversionIsoPlots
Definition: PhotonPlots.h:29
Egamma
Definition: ClusMomentumPlots.cxx:11
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Egamma::PhotonPlots::m_oKinIsoTightUncPlots
Egamma::KinematicsPlots m_oKinIsoTightUncPlots
Definition: PhotonPlots.h:36
Egamma::PhotonPlots::initializePlots
virtual void initializePlots()
Definition: PhotonPlots.cxx:37
Egamma::PhotonPlots::m_oKinAllPlots
Egamma::KinematicsPlots m_oKinAllPlots
Definition: PhotonPlots.h:24
Egamma::PhotonPlots::m_oKinIsoTightPlots
Egamma::KinematicsPlots m_oKinIsoTightPlots
Definition: PhotonPlots.h:35
Egamma::PhotonPlots::m_oKinIsoLooseConvPlots
Egamma::KinematicsPlots m_oKinIsoLooseConvPlots
Definition: PhotonPlots.h:34
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
Egamma::PhotonPlots::m_nParticles
TH1 * m_nParticles
Definition: PhotonPlots.h:41
Egamma::PhotonPlots::m_oKinIsoPlots
Egamma::KinematicsPlots m_oKinIsoPlots
Definition: PhotonPlots.h:27
MCTruthClassifierDefs.h
EgammaxAODHelpers.h
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition: EgammaxAODHelpers.cxx:25
PhotonPlots.h
Egamma::PhotonPlots::m_oShowerShapesIsoPlots
Egamma::ShowerShapesPlots m_oShowerShapesIsoPlots
Definition: PhotonPlots.h:28
Egamma::PhotonPlots::m_nParticles_weighted
TH1 * m_nParticles_weighted
Definition: PhotonPlots.h:42
Egamma::PhotonPlots::m_oKinIsoUncPlots
Egamma::KinematicsPlots m_oKinIsoUncPlots
Definition: PhotonPlots.h:30
PhotonxAODHelpers.h
Egamma::KinematicsPlots::fill
void fill(const xAOD::IParticle &part, const xAOD::EventInfo &eventInfo)
Definition: Reconstruction/egamma/EgammaPhysValMonitoring/src/KinematicsPlots.cxx:28
Egamma::PhotonPlots::PhotonPlots
PhotonPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
Definition: PhotonPlots.cxx:14
Egamma::PhotonPlots::m_oShowerShapesAllPlots
Egamma::ShowerShapesPlots m_oShowerShapesAllPlots
Definition: PhotonPlots.h:25
Egamma::PhotonPlots::m_oKinIsoLoosePlots
Egamma::KinematicsPlots m_oKinIsoLoosePlots
Definition: PhotonPlots.h:32
Egamma::PhotonPlots::m_sParticleType
std::string m_sParticleType
Definition: PhotonPlots.h:39
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
Egamma::PhotonPlots::m_oKinIsoLooseUncPlots
Egamma::KinematicsPlots m_oKinIsoLooseUncPlots
Definition: PhotonPlots.h:33
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
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
Egamma::PhotonPlots::m_oPhotonConversionAllPlots
Egamma::PhotonConversionPlots m_oPhotonConversionAllPlots
Definition: PhotonPlots.h:26
Egamma::PhotonPlots::m_oKinIsoTightConvPlots
Egamma::KinematicsPlots m_oKinIsoTightConvPlots
Definition: PhotonPlots.h:37
Egamma::PhotonPlots::m_oKinIsoConvPlots
Egamma::KinematicsPlots m_oKinIsoConvPlots
Definition: PhotonPlots.h:31
Egamma::PhotonPlots::fill
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)
Definition: PhotonPlots.cxx:42