ATLAS Offline Software
InDetPerfPlot_nTracks.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #include "InDetPerfPlot_nTracks.h"
11 
12 
14  // nop
15 }
16 
17 void
19  const bool prependDirectory(false);
21  m_counters[ALLRECO] = Book1D(hd.name, hd.allTitles, hd.nBinsX, hd.xAxis.first, hd.xAxis.second, prependDirectory);
22  hd = retrieveDefinition("ntracksel");
23  m_counters[SELECTEDRECO] = Book1D(hd.name, hd.allTitles, hd.nBinsX, hd.xAxis.first, hd.xAxis.second, prependDirectory);
24  hd = retrieveDefinition("nparticle");
25  m_counters[ALLTRUTH] = Book1D(hd.name, hd.allTitles, hd.nBinsX, hd.xAxis.first, hd.xAxis.second, prependDirectory);
26  hd = retrieveDefinition("nparticlesel");
27  m_counters[SELECTEDTRUTH] = Book1D(hd.name, hd.allTitles, hd.nBinsX, hd.xAxis.first, hd.xAxis.second, prependDirectory);
28  hd = retrieveDefinition("num_truthmatch_match");
30  Book1D(hd.name, hd.allTitles, hd.nBinsX, hd.xAxis.first, hd.xAxis.second, prependDirectory);
31 
32  book(m_ntracks_vs_truthMu, "ntracks_vs_truthMu");
33  book(m_ntracks_vs_truthMu_absEta_0_2p5, "ntracks_vs_truthMu_absEta_0_2p5");
34  book(m_ntracks_vs_truthMu_pT_1GeV, "ntracks_vs_truthMu_pT_1GeV");
35  book(m_ntracks_vs_actualMu, "ntracks_vs_actualMu");
36  book(m_ntracks_vs_actualMu_absEta_0_2p5, "ntracks_vs_actualMu_absEta_0_2p5");
37  book(m_ntracks_vs_actualMu_pT_1GeV, "ntracks_vs_actualMu_pT_1GeV");
38  book(m_ntracks_vs_nvertices, "ntracks_vs_nvertices");
39  book(m_ntracks_vs_nvertices_absEta_0_2p5, "ntracks_vs_nvertices_absEta_0_2p5");
40  book(m_ntracks_vs_nvertices_pT_1GeV, "ntracks_vs_nvertices_pT_1GeV");
41 
42 }
43 
44 void
45 InDetPerfPlot_nTracks::fill(const unsigned int freq, const CounterCategory counter, float weight) {
46  if (counter < N_COUNTERS) {
48  }
49 }
50 
52 (const unsigned int ntracksFull, const unsigned int ntracksCentral,
53  const unsigned int ntracksPt1GeV, const unsigned int truthMu,
54  const float actualMu, const unsigned int nvertices, const float weight) {
55 
56  fillHisto(m_ntracks_vs_truthMu, truthMu, ntracksFull, weight);
57  fillHisto(m_ntracks_vs_actualMu, actualMu, ntracksFull, weight);
58  fillHisto(m_ntracks_vs_nvertices, nvertices, ntracksFull, weight);
59  fillHisto(m_ntracks_vs_truthMu_absEta_0_2p5, truthMu, ntracksCentral, weight);
60  fillHisto(m_ntracks_vs_actualMu_absEta_0_2p5, actualMu, ntracksCentral, weight);
61  fillHisto(m_ntracks_vs_nvertices_absEta_0_2p5, nvertices, ntracksCentral, weight);
62  fillHisto(m_ntracks_vs_truthMu_pT_1GeV, truthMu, ntracksPt1GeV, weight);
63  fillHisto(m_ntracks_vs_actualMu_pT_1GeV, actualMu, ntracksPt1GeV, weight);
64  fillHisto(m_ntracks_vs_nvertices_pT_1GeV, nvertices, ntracksPt1GeV, weight);
65 
66 }
SingleHistogramDefinition::nBinsX
unsigned int nBinsX
Definition: SingleHistogramDefinition.h:47
InDetPerfPlot_nTracks::N_COUNTERS
@ N_COUNTERS
Definition: InDetPerfPlot_nTracks.h:25
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.
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
InDetPerfPlot_nTracks::m_ntracks_vs_truthMu
TH2 * m_ntracks_vs_truthMu
Definition: InDetPerfPlot_nTracks.h:34
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
PlotBase::Book1D
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
InDetPerfPlot_nTracks::m_counters
TH1 * m_counters[N_COUNTERS]
Definition: InDetPerfPlot_nTracks.h:33
InDetPlotBase
Mixin class to give extra capabilities to plots such as ATH_MSG and an easier booking interface,...
Definition: InDetPlotBase.h:33
SingleHistogramDefinition::xAxis
IHistogramDefinitionSvc::axesLimits_t xAxis
Definition: SingleHistogramDefinition.h:50
InDetPerfPlot_nTracks::InDetPerfPlot_nTracks
InDetPerfPlot_nTracks(InDetPlotBase *pParent, const std::string &dirName)
Definition: InDetPerfPlot_nTracks.cxx:13
InDetPerfPlot_nTracks::m_ntracks_vs_nvertices_pT_1GeV
TH2 * m_ntracks_vs_nvertices_pT_1GeV
Definition: InDetPerfPlot_nTracks.h:42
InDetPerfPlot_nTracks::m_ntracks_vs_nvertices_absEta_0_2p5
TH2 * m_ntracks_vs_nvertices_absEta_0_2p5
Definition: InDetPerfPlot_nTracks.h:41
SingleHistogramDefinition
Almost-a-struct for holding the single histogram definition.
Definition: SingleHistogramDefinition.h:17
InDetPerfPlot_nTracks::m_ntracks_vs_truthMu_absEta_0_2p5
TH2 * m_ntracks_vs_truthMu_absEta_0_2p5
Definition: InDetPerfPlot_nTracks.h:35
InDetPerfPlot_nTracks::m_ntracks_vs_actualMu_absEta_0_2p5
TH2 * m_ntracks_vs_actualMu_absEta_0_2p5
Definition: InDetPerfPlot_nTracks.h:38
InDetPerfPlot_nTracks::fill
void fill(const unsigned int freq, const CounterCategory counter, float weight=1.0)
Definition: InDetPerfPlot_nTracks.cxx:45
InDetPerfPlot_nTracks::m_ntracks_vs_actualMu
TH2 * m_ntracks_vs_actualMu
Definition: InDetPerfPlot_nTracks.h:37
InDetPerfPlot_nTracks::MATCHEDRECO
@ MATCHEDRECO
Definition: InDetPerfPlot_nTracks.h:25
InDetPerfPlot_nTracks::initializePlots
void initializePlots()
Definition: InDetPerfPlot_nTracks.cxx:18
InDetPerfPlot_nTracks::m_ntracks_vs_actualMu_pT_1GeV
TH2 * m_ntracks_vs_actualMu_pT_1GeV
Definition: InDetPerfPlot_nTracks.h:39
SingleHistogramDefinition::name
std::string name
Definition: SingleHistogramDefinition.h:44
InDetPerfPlot_nTracks::m_ntracks_vs_truthMu_pT_1GeV
TH2 * m_ntracks_vs_truthMu_pT_1GeV
Definition: InDetPerfPlot_nTracks.h:36
SingleHistogramDefinition::allTitles
std::string allTitles
Definition: SingleHistogramDefinition.h:56
InDetPerfPlot_nTracks::m_ntracks_vs_nvertices
TH2 * m_ntracks_vs_nvertices
Definition: InDetPerfPlot_nTracks.h:40
InDetPerfPlot_nTracks::CounterCategory
CounterCategory
Definition: InDetPerfPlot_nTracks.h:24
InDetPerfPlot_nTracks.h
InDetPerfPlot_nTracks::SELECTEDRECO
@ SELECTEDRECO
Definition: InDetPerfPlot_nTracks.h:25
InDetPlotBase::fillHisto
static void fillHisto(TProfile *pTprofile, const float bin, const float weight, const float weight2=1.0)
Definition: InDetPlotBase.cxx:82
test_pyathena.counter
counter
Definition: test_pyathena.py:15
InDetPlotBase::retrieveDefinition
SingleHistogramDefinition retrieveDefinition(const std::string &histoIdentifier, const std::string &folder="default", const std::string &nameOverride="")
Retrieve a single histogram definition, given the unique string identifier.
Definition: InDetPlotBase.cxx:151
InDetPerfPlot_nTracks::ALLRECO
@ ALLRECO
Definition: InDetPerfPlot_nTracks.h:25
InDetPerfPlot_nTracks::ALLTRUTH
@ ALLTRUTH
Definition: InDetPerfPlot_nTracks.h:25
InDetPerfPlot_nTracks::SELECTEDTRUTH
@ SELECTEDTRUTH
Definition: InDetPerfPlot_nTracks.h:25