ATLAS Offline Software
PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <utility>
6 
7 #include "ParamPlots.h"
8 
9 namespace Tau{
10 
11 ParamPlots::ParamPlots(PlotBase* pParent, const std::string& sDir, std::string sParticleType)
12  : PlotBase(pParent, sDir),
13  eta(nullptr),
14  phi(nullptr),
15  pt(nullptr),
16  eta_phi(nullptr),
17  eta_pt(nullptr),
18  m_sParticleType(std::move(sParticleType))
19 {
20 }
21 
23 {
24 }
25 
27 {
28  pt = Book1D("pt" , m_sParticleType+" pt;" +m_sParticleType+" Transverse Momentum [GeV];Entries / 1 GeV",25,0.,200);
29  eta = Book1D("eta", m_sParticleType+" eta;"+m_sParticleType+" Pseudo-Rapidity;Entries / 0.05", 32, -3.2, 3.2);
30  phi = Book1D("phi", m_sParticleType+" phi;"+m_sParticleType+" Azimuthal Angle;Entries / 0.05", 32, -3.2, 3.2);
31  eta_pt = Book2D("eta_pt",m_sParticleType+" eta vs pt;"+m_sParticleType+" eta;"+m_sParticleType+" pt;Entries.0.05/1 GeV",32,-3.2,3.2,25,0.,200);
32  eta_phi = Book2D("eta_phi",m_sParticleType+" eta vs phi;"+m_sParticleType+" eta;"+m_sParticleType+" phi;Entries.0.05/0.5",32,-3.2,3.2,32,-3.2,3.2);
33 }
34 
35 
36 void ParamPlots::fill(const xAOD::IParticle& tau, float weight)
37 {
38  pt->Fill(tau.pt()/1000., weight);
39  eta->Fill(tau.eta(), weight);
40  phi->Fill(tau.phi(), weight);
41  eta_pt->Fill(tau.eta(), tau.pt()/1000., weight);
42  eta_phi->Fill(tau.eta(), tau.phi(), weight);
43 }
44 
45 }
46 
Tau::ParamPlots::m_sParticleType
std::string m_sParticleType
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.h:28
Tau::ParamPlots::fill
void fill(const xAOD::IParticle &prt, float weight)
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.cxx:36
PlotBase
Definition: PlotBase.h:34
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
test_pyathena.pt
pt
Definition: test_pyathena.py:11
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
Tau
Definition: EfficiencyPtPlots.cxx:9
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
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
Tau::ParamPlots::eta_pt
TH2 * eta_pt
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.h:24
Tau::ParamPlots::phi
TH1 * phi
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.h:20
Tau::ParamPlots::~ParamPlots
~ParamPlots()
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.cxx:22
Tau::ParamPlots::pt
TH1 * pt
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.h:21
xAOD::IParticle::pt
virtual double pt() const =0
The transverse momentum ( ) of the particle.
Tau::ParamPlots::eta
TH1 * eta
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.h:19
Tau::ParamPlots::eta_phi
TH2 * eta_phi
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.h:23
xAOD::IParticle::eta
virtual double eta() const =0
The pseudorapidity ( ) of the particle.
Tau::ParamPlots::initializePlots
void initializePlots()
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.cxx:26
Tau::ParamPlots::ParamPlots
ParamPlots(PlotBase *pParent, const std::string &sDir, std::string sParticleType)
Definition: PhysicsAnalysis/TauID/TauDQA/src/ParamPlots.cxx:11
xAOD::IParticle::phi
virtual double phi() const =0
The azimuthal angle ( ) of the particle.
ParamPlots.h