ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
TauID
TauDQA
src
TauKinematicPlots.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <utility>
6
7
#include "
TauKinematicPlots.h
"
8
#include "
AthenaKernel/Units.h
"
9
10
namespace
Tau
{
11
12
TauKinematicPlots::TauKinematicPlots
(
PlotBase
* pParent,
const
std::string& sDir, std::string sParticleType)
13
:
PlotBase
(pParent, sDir),
14
m_sParticleType
(
std
::move(sParticleType))
15
{
16
}
17
18
void
TauKinematicPlots::initializePlots
()
19
{
20
pt
=
Book1D
(
"pt"
,
m_sParticleType
+
" pt;"
+
m_sParticleType
+
" Transverse Momentum [GeV];Entries / 1 GeV"
,25,0.,200);
21
eta
=
Book1D
(
"eta"
,
m_sParticleType
+
" eta;"
+
m_sParticleType
+
" Pseudo-Rapidity;Entries / 0.05"
, 32, -3.2, 3.2);
22
phi
=
Book1D
(
"phi"
,
m_sParticleType
+
" phi;"
+
m_sParticleType
+
" Azimuthal Angle;Entries / 0.05"
, 32, -3.2, 3.2);
23
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);
24
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);
25
}
26
27
28
void
TauKinematicPlots::fill
(
const
xAOD::IParticle
& tau,
float
weight)
29
{
30
pt
->Fill(tau.
pt
()/Athena::Units::GeV, weight);
31
eta
->Fill(tau.
eta
(), weight);
32
phi
->Fill(tau.
phi
(), weight);
33
eta_pt
->Fill(tau.
eta
(), tau.
pt
()/Athena::Units::GeV, weight);
34
eta_phi
->Fill(tau.
eta
(), tau.
phi
(), weight);
35
}
36
37
}
38
TauKinematicPlots.h
Units.h
Wrapper to avoid constant divisions when using units.
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
Tau::TauKinematicPlots::m_sParticleType
std::string m_sParticleType
Definition
TauKinematicPlots.h:28
Tau::TauKinematicPlots::fill
void fill(const xAOD::IParticle &prt, float weight)
Definition
TauKinematicPlots.cxx:28
Tau::TauKinematicPlots::TauKinematicPlots
TauKinematicPlots(PlotBase *pParent, const std::string &sDir, std::string sParticleType)
Definition
TauKinematicPlots.cxx:12
Tau::TauKinematicPlots::eta_pt
TH2 * eta_pt
Definition
TauKinematicPlots.h:24
Tau::TauKinematicPlots::pt
TH1 * pt
Definition
TauKinematicPlots.h:21
Tau::TauKinematicPlots::eta
TH1 * eta
Definition
TauKinematicPlots.h:19
Tau::TauKinematicPlots::eta_phi
TH2 * eta_phi
Definition
TauKinematicPlots.h:23
Tau::TauKinematicPlots::initializePlots
void initializePlots()
Definition
TauKinematicPlots.cxx:18
Tau::TauKinematicPlots::phi
TH1 * phi
Definition
TauKinematicPlots.h:20
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::IParticle::eta
virtual double eta() const =0
The pseudorapidity ( ) of the particle.
xAOD::IParticle::pt
virtual double pt() const =0
The transverse momentum ( ) of the particle.
xAOD::IParticle::phi
virtual double phi() const =0
The azimuthal angle ( ) of the particle.
Tau
Definition
TauDQA/src/CorePlots.cxx:8
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0