ATLAS Offline Software
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 using namespace IDPVM;
13 
14 InDetPerfPlot_FakeRate::InDetPerfPlot_FakeRate(InDetPlotBase* pParent, const std::string& sDir, bool useUnlinked) :
15  InDetPlotBase(pParent, sDir),
16  m_fakerate_vs_eta{},
17  m_fakerate_vs_pt{},
18  m_fakerate_vs_lowpt{},
19  m_fakerate_vs_phi{},
20  m_fakerate_vs_d0{},
21  m_fakerate_vs_z0{},
22  m_fakerate_vs_mu{},
23  m_useUnlinked{useUnlinked} {
24  // nop
25 }
26 
27 void unlinked_ylabel(TEfficiency *teff)
28 {
29  if (teff) {
30  std::string title = std::regex_replace(teff->GetTitle(), std::regex("linked"), "unlinked");
31  std::string xlabel = teff->GetTotalHistogram()->GetXaxis()->GetTitle();
32  std::string ylabel = std::regex_replace(teff->GetTotalHistogram()->GetYaxis()->GetTitle(), std::regex("linked"), "unlinked");
33  std::string s = title + ";" + xlabel + ";" + ylabel;
34  teff->SetTitle(s.c_str());
35  }
36 }
37 
38 void
40 
41  book(m_fakerate_vs_eta, "fakerate_vs_eta");
42  book(m_fakerate_vs_pt, "fakerate_vs_pt");
43  book(m_fakerate_vs_lowpt, "fakerate_vs_lowpt");
44  book(m_fakerate_vs_phi, "fakerate_vs_phi");
45  book(m_fakerate_vs_d0, "fakerate_vs_d0");
46  book(m_fakerate_vs_z0, "fakerate_vs_z0");
47  book(m_fakerate_vs_mu, "fakerate_vs_mu");
48 
49  if (m_useUnlinked) {
57  }
58 }
59 
60 void
62 
63  double eta = track.eta();
64  double pt = track.pt() / Gaudi::Units::GeV; // convert MeV to GeV
65  double phi = track.phi();
66  double d0 = track.d0();
67  double z0 = track.z0();
68 
76 }
77 
78 void
80 
81 }
IDPVM
Class to retrieve associated truth from a track, implementing a cached response.
Definition: InDetPhysValMonitoringTool.h:55
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
InDetPerfPlot_FakeRate.h
InDetPlotBase::book
void book(Htype *&pHisto, const std::string &histoIdentifier, const std::string &nameOverride="", const std::string &folder="default")
Helper method to book histograms using an identifier string.
InDetSecVtxTruthMatchUtils::isFake
bool isFake(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:60
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
InDetPhysValMonitoringUtilities.h
InDetPerfPlot_FakeRate::m_useUnlinked
bool m_useUnlinked
Definition: InDetPerfPlot_FakeRate.h:43
test_pyathena.pt
pt
Definition: test_pyathena.py:11
InDetPerfPlot_FakeRate::m_fakerate_vs_eta
TEfficiency * m_fakerate_vs_eta
Definition: InDetPerfPlot_FakeRate.h:34
InDetPerfPlot_FakeRate::m_fakerate_vs_z0
TEfficiency * m_fakerate_vs_z0
Definition: InDetPerfPlot_FakeRate.h:39
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
InDetPerfPlot_FakeRate::m_fakerate_vs_pt
TEfficiency * m_fakerate_vs_pt
Definition: InDetPerfPlot_FakeRate.h:35
InDetPlotBase
Mixin class to give extra capabilities to plots such as ATH_MSG and an easier booking interface,...
Definition: InDetPlotBase.h:33
unlinked_ylabel
void unlinked_ylabel(TEfficiency *teff)
Definition: InDetPerfPlot_FakeRate.cxx:27
InDetPerfPlot_FakeRate::fill
void fill(const xAOD::TrackParticle &track, const bool isFake, float weight, float mu)
Definition: InDetPerfPlot_FakeRate.cxx:61
covarianceTool.title
title
Definition: covarianceTool.py:542
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
InDetPerfPlot_FakeRate::m_fakerate_vs_phi
TEfficiency * m_fakerate_vs_phi
Definition: InDetPerfPlot_FakeRate.h:37
TruthVertex.h
InDetPerfPlot_FakeRate::finalizePlots
void finalizePlots()
Definition: InDetPerfPlot_FakeRate.cxx:79
InDetPerfPlot_FakeRate::m_fakerate_vs_d0
TEfficiency * m_fakerate_vs_d0
Definition: InDetPerfPlot_FakeRate.h:38
InDetPerfPlot_FakeRate::m_fakerate_vs_lowpt
TEfficiency * m_fakerate_vs_lowpt
Definition: InDetPerfPlot_FakeRate.h:36
InDetPerfPlot_FakeRate::InDetPerfPlot_FakeRate
InDetPerfPlot_FakeRate(InDetPlotBase *pParent, const std::string &dirName, bool useUnlinked=false)
Definition: InDetPerfPlot_FakeRate.cxx:14
InDetPerfPlot_FakeRate::m_fakerate_vs_mu
TEfficiency * m_fakerate_vs_mu
Definition: InDetPerfPlot_FakeRate.h:40
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
TruthParticle.h
InDetPlotBase::fillHisto
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
Definition: InDetPlotBase.cxx:82
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
InDetPerfPlot_FakeRate::initializePlots
void initializePlots()
Definition: InDetPerfPlot_FakeRate.cxx:39