ATLAS Offline Software
Loading...
Searching...
No Matches
InDetPerfPlot_FakeRate.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6// #include "TrkValHistUtils/EfficiencyPurityCalculator.h"
10#include <cmath>
11#include <regex>
12
13using namespace IDPVM;
14
26
27void
29 book(m_fakerate_vs_eta, "fakerate_vs_eta", "fakerate_vs_eta");
30 book(m_fakerate_vs_pt, "fakerate_vs_pt", "fakerate_vs_pt");
31 book(m_fakerate_vs_lowpt, "fakerate_vs_lowpt", "fakerate_vs_lowpt");
32 book(m_fakerate_vs_phi, "fakerate_vs_phi", "fakerate_vs_phi");
33 book(m_fakerate_vs_d0, "fakerate_vs_d0", "fakerate_vs_d0");
34 book(m_fakerate_vs_z0, "fakerate_vs_z0", "fakerate_vs_z0");
35 book(m_fakerate_vs_mu, "fakerate_vs_mu", "fakerate_vs_mu");
36}
37
38void
39InDetPerfPlot_FakeRate::fill(const xAOD::TrackParticle& track, const bool isFake, float weight, float mu) {
40
41 double eta = track.eta();
42 double pt = track.pt() / Gaudi::Units::GeV; // convert MeV to GeV
43 double phi = track.phi();
44 double d0 = track.d0();
45 double z0 = track.z0();
46
47 fillHisto(m_fakerate_vs_eta, eta, isFake, weight);
48 fillHisto(m_fakerate_vs_pt, pt, isFake, weight);
49 fillHisto(m_fakerate_vs_lowpt, pt, isFake, weight);
50 fillHisto(m_fakerate_vs_phi, phi, isFake, weight);
51 fillHisto(m_fakerate_vs_d0, d0, isFake, weight);
52 fillHisto(m_fakerate_vs_z0, z0, isFake, weight);
53 fillHisto(m_fakerate_vs_mu, mu, isFake, weight);
54}
55
56void
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
InDetPerfPlot_FakeRate(InDetPlotBase *pParent, const std::string &dirName)
void fill(const xAOD::TrackParticle &track, const bool isFake, float weight, float mu)
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
InDetPlotBase(InDetPlotBase *pParent, const std::string &dirName)
Constructor taking parent node and directory name for plots.
void book(Htype *&pHisto, std::string_view histoIdentifier, std::string_view nameOverride="", std::string_view folder="default")
Helper method to book histograms using an identifier string.
Class to retrieve associated truth from a track, implementing a cached response.
TrackParticle_v1 TrackParticle
Reference the current persistent version: