ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking/TrkValidation/TrkValHistUtils/Root/ResolutionPlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace Trk {
8 void
10 Res_pT = nullptr;
11 Res_eta = nullptr;
12 Res_phi = nullptr;
13 }
14
15 void
17 Res_pT = Book1D("Res" + m_sType + "_pT", "Res" + m_sType + "_pT;(pT-pTtruth)/pTtruth;Entries", 100, -0.5, 0.5);
18 Res_eta = Book1D("Res" + m_sType + "_eta", "Res" + m_sType + "_eta;eta-etatruth;Entries", 100, -0.02, 0.02);
19 Res_phi = Book1D("Res" + m_sType + "_phi", "Res" + m_sType + "_phi;phi-phitruth;Entries", 100, -0.005, 0.005);
20 }
21
22 void
23 ResolutionPlots::fill(const xAOD::TrackParticle &trkprt, const xAOD::TruthParticle &truthprt, float weight) {
24 Res_pT->Fill((trkprt.pt() - truthprt.pt()) / truthprt.pt(), weight);
25 Res_eta->Fill(trkprt.eta() - truthprt.eta(),weight);
26 Res_phi->Fill(trkprt.phi() - truthprt.phi(),weight);
27 }
28}
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
void fill(const xAOD::TrackParticle &trkprt, const xAOD::TruthParticle &truthprt, float weight=1.0)
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Ensure that the ATLAS eigen extensions are properly loaded.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.