ATLAS Offline Software
Loading...
Searching...
No Matches
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"
9
10namespace Tau{
11
12TauKinematicPlots::TauKinematicPlots(PlotBase* pParent, const std::string& sDir, std::string sParticleType)
13 : PlotBase(pParent, sDir),
14 m_sParticleType(std::move(sParticleType))
15{
16}
17
21
23{
24 pt = Book1D("pt" , m_sParticleType+" pt;" +m_sParticleType+" Transverse Momentum [GeV];Entries / 1 GeV",25,0.,200);
25 eta = Book1D("eta", m_sParticleType+" eta;"+m_sParticleType+" Pseudo-Rapidity;Entries / 0.05", 32, -3.2, 3.2);
26 phi = Book1D("phi", m_sParticleType+" phi;"+m_sParticleType+" Azimuthal Angle;Entries / 0.05", 32, -3.2, 3.2);
27 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);
28 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);
29}
30
31
32void TauKinematicPlots::fill(const xAOD::IParticle& tau, float weight)
33{
34 pt->Fill(tau.pt()/Athena::Units::GeV, weight);
35 eta->Fill(tau.eta(), weight);
36 phi->Fill(tau.phi(), weight);
37 eta_pt->Fill(tau.eta(), tau.pt()/Athena::Units::GeV, weight);
38 eta_phi->Fill(tau.eta(), tau.phi(), weight);
39}
40
41}
42
Wrapper to avoid constant divisions when using units.
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
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
void fill(const xAOD::IParticle &prt, float weight)
TauKinematicPlots(PlotBase *pParent, const std::string &sDir, std::string sParticleType)
Class providing the definition of the 4-vector interface.
virtual double eta() const =0
The pseudorapidity ( ) of the particle.
virtual double pt() const =0
The transverse momentum ( ) of the particle.
virtual double phi() const =0
The azimuthal angle ( ) of the particle.
STL namespace.