ATLAS Offline Software
HistHandler.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3  */
4 
7 
8 #include <iostream>
9 #include <cmath>
10 #include <cstdint>
11 #include <cstring>
12 
13 #include <TH1.h>
14 #include <TH2Poly.h>
15 
16 namespace CP {
17  //###########################################################################################################
18  // AxisHandlerProvider
19  //###########################################################################################################
20  std::unique_ptr<AxisHandler> AxisHandlerProvider::GetAxisHandler(const TAxis * axisptr) {
21  if (axisptr != nullptr) {
22  std::string axis = axisptr->GetTitle();
24  size_t Abs1 = axis.find("|");
25  size_t Abs2(0);
26  if (Abs1 != std::string::npos) Abs2 = axis.find("|", Abs1 + 1);
27  bool AbsAxis = (Abs2 != std::string::npos) && (Abs2 != 0);
28  if (axis.find("pt") != std::string::npos || axis.find("pT") != std::string::npos || axis.find("p_{T}") != std::string::npos) {
29  return std::make_unique<PtAxisHandler>();
30  } else if (axis.find("phi") != std::string::npos) {
31  return std::make_unique<PhiAxisHandler>();
32  } else if (axis.find("q") != std::string::npos || axis.find("charge") != std::string::npos) {
33  return std::make_unique<ChargeAxisHandler>();
34  } else if (axis.find("eta") != std::string::npos) {
35  if (AbsAxis) return std::make_unique<AbsEtaAxisHandler>();
36  return std::make_unique<EtaAxisHandler>();
37  } else if (axis.find("dRJet") != std::string::npos || axis.find("#DeltaR (jet, #mu)") != std::string::npos) {
38  return std::make_unique<dRJetAxisHandler>();
39  }
40 
41  Error("AxisHandlerProvider", "Can not interpret axis title '%s'", axis.c_str());
42  } else {
43  Error("AxisHandlerProvider", "nullptr pointer passed");
44  }
45  return std::make_unique<UndefinedAxisHandler>();
46  }
47 
48 
50  value = mu.pt() / 1000.;
51  return CorrectionCode::Ok;
52  }
54  value = mu.charge();
55  return CorrectionCode::Ok;
56  }
58  value = mu.eta();
59  return CorrectionCode::Ok;
60  }
62  value = std::abs(mu.eta());
63  return CorrectionCode::Ok;
64  }
66  value = mu.phi();
67  return CorrectionCode::Ok;
68  }
69  void dRJetAxisHandler::set_close_jet_decorator(const std::string& decor_name){
70  s_close_jet_decor = decor_name;
71  }
72 
73  void dRJetAxisHandler::set_use_2D_sf(const bool in)
74  {
75  s_use_2D_sf=in;
76  }
77 
78  std::string dRJetAxisHandler::s_close_jet_decor = "dRJet";
79  bool dRJetAxisHandler::s_use_2D_sf = false;
81  m_acc(s_close_jet_decor),
82  m_use_2D_sf(s_use_2D_sf){}
83 
85 
86  static std::atomic<unsigned int> warned = {0};
87  static const SG::AuxElement::ConstAccessor<float> acc_dR_deriv("DFCommonJetDr");
88 
89  if(!m_use_2D_sf) value = -2.;
90  else if (acc_dR_deriv.isAvailable(mu)){
91  value = acc_dR_deriv(mu);
92  }else if( m_acc.isAvailable(mu) ) {
93  // decoration available in DxAOD
94  value = m_acc(mu);
95  if (warned < 5){
96  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "The DFCommonJetDr jet decoration is not available in the derivation will fall back to %s",s_close_jet_decor.c_str());
97  ++warned;
98  }
99  } else {
100  // decoration not available
101  value = -2.;
102  // We want these warnings to be printed few times per job, so that they're visible, then stop before log file's size blows up
103  if (warned<5){
104  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "The %s decoration has not been found for the Muon. Isolation scale-factors are now also binned in #Delta R(jet,#mu)", s_close_jet_decor.c_str());
105  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "using the closest calibrated AntiKt4EMTopo jet with p_{T}>20~GeV and surving the standard OR criteria.");
106  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "You should decorate your muon appropiately before passing to the tool, and use dRJet = -1 in case there is no jet in an event.");
107  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "For the time being the inclusive scale-factor is going to be returned.");
108  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "In future derivations, muons will also be decorated centrally with DFCommonJetDr, for your benefit.");
109  Warning("MuonEfficiencyCorrections::dRJetAxisHandler()", "You can define custom jet decorations via the 'CloseJetDRDecorator' property of the MuonEfficiencyCorrections tool");
110  ++warned;
111  }
112  }
113  return CorrectionCode::Ok;
114  }
115 
117  return CorrectionCode::Error;
118  }
119  //###########################################################################################################
120  // HistHandler
121  //###########################################################################################################
123  m_H(clone(Hist)) {
124 
125  }
127  if (this == &other) {
128  return;
129  }
130  if (other.m_H) {
131  m_H = clone(other.GetHist());
132  }
133  }
135  m_H() {
136  Copy(other);
137  }
139  }
140  void HistHandler::SetBinContent(int bin, float val) {
141  if (m_H) {
142  m_H->SetBinContent(bin, val);
143  }
144  }
145  void HistHandler::SetBinError(int bin, float val) {
146  if (m_H) {
147  m_H->SetBinError(bin, val);
148  }
149  }
150  //###########################################################################################################
151  // HistHandler_TH1
152  //###########################################################################################################
154  HistHandler(h),
155  m_x_handler(h == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetXaxis())) {
156  }
157 
160  m_x_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetXaxis())) {
161 
162  }
164  if (this == &other) {
165  return *this;
166  }
167  Copy(other);
168  m_x_handler = std::unique_ptr<AxisHandler>(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(GetHist()->GetXaxis()));
169  return *this;
170  }
172  }
173  int HistHandler_TH1::nBins() const {return GetHist()->GetNbinsX() + 2;}
174  int HistHandler_TH1::nOverFlowBins() const {return 2; }
175  bool HistHandler_TH1::isOverFlowBin(int b) const { return b == 0 || b >= nBins() -1; }
176  std::string HistHandler_TH1::GetBinName(unsigned int bin) const {
177  TAxis* xAx = GetHist()->GetXaxis();
178  return Form("%s_%.2f_to_%.2f", xAx->GetTitle(), xAx->GetBinLowEdge(bin), xAx->GetBinUpEdge(bin));
179  }
181  if (!GetHist()) {
182  bin = -1;
183  return CorrectionCode::Error;
184  }
185  float par = 0;
186  if (m_x_handler->GetBinningParameter(muon, par) == CorrectionCode::Error) {
187  return CorrectionCode::Error;
188  } else {
189  bin = GetHist()->FindBin(par);
190  if (bin < 1 || bin > GetHist()->GetNbinsX()) {
192  }
193  }
194  return CorrectionCode::Ok;
195  }
196 
197  //###########################################################################################################
198  // HistHandler_TH2
199  //###########################################################################################################
201  HistHandler(h),
202  m_x_handler(h == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetXaxis())),
203  m_y_handler(h == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetYaxis())) {
204 
205  }
207  return (GetHist()->GetNbinsX() + 2) * (GetHist()->GetNbinsY() + 2);
208  }
209  int HistHandler_TH2::nOverFlowBins() const {return 2*GetHist()->GetNbinsX() + 2*GetHist()->GetNbinsY() + 4; }
211  int x(-1),y(-1), z(-1);
212  GetHist()->GetBinXYZ(b,x,y,z);
213  return x == 0 || x == GetHist()->GetXaxis()->GetNbins() + 1 || y == 0 || y == GetHist()->GetYaxis()->GetNbins() + 1;
214  }
216  if (!GetHist()) return CorrectionCode::Error;
217  float parx = 0;
218  float pary = 0;
219  if (m_x_handler->GetBinningParameter(muon, parx) == CorrectionCode::Error ||
220  m_y_handler->GetBinningParameter(muon, pary) == CorrectionCode::Error) {
221  return CorrectionCode::Error;
222  } else {
223  int binx = GetHist()->GetXaxis()->FindBin(parx);
224  int biny = GetHist()->GetYaxis()->FindBin(pary);
225  if (binx < 1 || binx > GetHist()->GetNbinsX() || biny < 1 || biny > GetHist()->GetNbinsY()) {
227  }
228  bin = GetHist()->GetBin(binx, biny);
229  }
230  return CorrectionCode::Ok;
231  }
233  if (this == &other) {
234  return *this;
235  }
236  Copy(other);
237  m_x_handler = std::unique_ptr<AxisHandler>(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(GetHist()->GetXaxis()));
238  m_y_handler = std::unique_ptr<AxisHandler>(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(GetHist()->GetYaxis()));
239  return *this;
240  }
242  }
245  m_x_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetXaxis())),
246  m_y_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetYaxis())) {
247  }
248  std::string HistHandler_TH2::GetBinName(unsigned int bin) const {
249  int x(0), y(0), z(0);
250  GetHist()->GetBinXYZ(bin, x, y, z);
251  TAxis* xAx = GetHist()->GetXaxis();
252  TAxis* yAx = GetHist()->GetYaxis();
253  return Form("%s_%.2f_to_%.2f_times_%s_%.2f_to_%.2f",
254  //xAxis
255  xAx->GetTitle(), xAx->GetBinLowEdge(x), xAx->GetBinUpEdge(x),
256  //yAxis
257  yAx->GetTitle(), yAx->GetBinLowEdge(y), yAx->GetBinUpEdge(y));
258  }
259  //###########################################################################################################
260  // HistHandler_TH3
261  //###########################################################################################################
262 
264  HistHandler(h),
265  m_x_handler(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetXaxis())),
266  m_y_handler(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetYaxis())),
267  m_z_handler(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetZaxis())) {
268 
269  }
272  m_x_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetXaxis())),
273  m_y_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetYaxis())),
274  m_z_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetZaxis())) {
275 
276  }
278  }
280  if (this == &other) {
281  return *this;
282  }
283  Copy(other);
284  m_x_handler = std::unique_ptr<AxisHandler>(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetXaxis()));
285  m_y_handler = std::unique_ptr<AxisHandler>(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetYaxis()));
286  m_z_handler = std::unique_ptr<AxisHandler>(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.GetHist()->GetZaxis()));
287  return *this;
288  }
290  return (GetHist()->GetNbinsX() + 2) * (GetHist()->GetNbinsY() + 2) * (GetHist()->GetNbinsZ() + 2);
291  }
292  int HistHandler_TH3::nOverFlowBins() const {return 2*(GetHist()->GetNbinsX()*GetHist()->GetNbinsY() +
293  GetHist()->GetNbinsX()*GetHist()->GetNbinsZ() +
294  GetHist()->GetNbinsY()*GetHist()->GetNbinsZ()) + 8; }
296  int x(-1),y(-1), z(-1);
297  GetHist()->GetBinXYZ(b,x,y,z);
298  return x == 0 || x == GetHist()->GetXaxis()->GetNbins() + 1 ||
299  y == 0 || y == GetHist()->GetYaxis()->GetNbins() + 1 ||
300  z == 0 || z == GetHist()->GetZaxis()->GetNbins() + 1;
301  }
303  if (!GetHist()) return CorrectionCode::Error;
304  float parx = 0;
305  float pary = 0;
306  float parz = 0;
307  if (m_x_handler->GetBinningParameter(muon, parx) == CorrectionCode::Error ||
308  m_y_handler->GetBinningParameter(muon, pary) == CorrectionCode::Error ||
309  m_z_handler->GetBinningParameter(muon, parz) == CorrectionCode::Error) return CorrectionCode::Error;
310  else {
311  int binx = GetHist()->GetXaxis()->FindBin(parx);
312  int biny = GetHist()->GetYaxis()->FindBin(pary);
313  int binz = GetHist()->GetZaxis()->FindBin(parz);
314  if (binx < 1 || binx > GetHist()->GetNbinsX() || biny < 1 || biny > GetHist()->GetNbinsY() || binz < 1 || binz > GetHist()->GetNbinsZ()) {
316  }
317  bin = GetHist()->GetBin(binx, biny, binz);
318  }
319  return CorrectionCode::Ok;
320  }
321 
322  std::string HistHandler_TH3::GetBinName(unsigned int bin) const {
323  int x(0), y(0), z(0);
324  GetHist()->GetBinXYZ(bin, x, y, z);
325  TAxis* xAx = GetHist()->GetXaxis();
326  TAxis* yAx = GetHist()->GetYaxis();
327  TAxis* zAx = GetHist()->GetZaxis();
328  return Form("%s_%.2f_to_%.2f_times_%s_%.2f_to_%.2f_times_%s_%.2f_to_%.2f",
329  //xAxis
330  xAx->GetTitle(), xAx->GetBinLowEdge(x), xAx->GetBinUpEdge(x),
331  //yAxis
332  yAx->GetTitle(), yAx->GetBinLowEdge(y), yAx->GetBinUpEdge(y),
333  //zAxis
334  zAx->GetTitle(), zAx->GetBinLowEdge(z), zAx->GetBinUpEdge(z));
335  }
336 
337  //###########################################################################################################
338  // HistHandler_TH2Poly
339  //###########################################################################################################
340 
342  HistHandler(h),
343  m_h(h),
344  m_x_handler(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetXaxis())),
345  m_y_handler(GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(h->GetYaxis())) {
346 
347  }
348 
351  m_h(other.m_h),
352  m_x_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.m_h->GetXaxis())),
353  m_y_handler(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.m_h->GetYaxis())) {
354 
355  }
356 
358  if (this == &other) {
359  return *this;
360  }
361  Copy(other);
362  m_h = other.m_h;
363  m_x_handler = std::unique_ptr<AxisHandler>(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.m_h->GetXaxis()));
364  m_y_handler = std::unique_ptr<AxisHandler>(other.GetHist() == nullptr ? 0 : AxisHandlerProvider::GetAxisHandler(other.m_h->GetYaxis()));
365  return *this;
366  }
367 
369  }
371  return m_h->GetNumberOfBins() + 1;
372  }
373 
374  int HistHandler_TH2Poly::nOverFlowBins() const {return 10;}
375  bool HistHandler_TH2Poly::isOverFlowBin(int b) const {return b < 1;}
376 
378  if (!m_h) return CorrectionCode::Error;
379  float parx = 0;
380  float pary = 0;
381  if (m_x_handler->GetBinningParameter(muon, parx) == CorrectionCode::Error ||
382  m_y_handler->GetBinningParameter(muon, pary) == CorrectionCode::Error) return CorrectionCode::Error;
383  else {
384  bin = GetHist()->FindBin(parx, pary);
385  if (bin < 0) {
387  }
388  }
389  return CorrectionCode::Ok;
390  }
391  std::string HistHandler_TH2Poly::GetBinName(unsigned int bin) const {
392  int x(0), y(0), z(0);
393  GetHist()->GetBinXYZ(bin, x, y, z);
394  TAxis* xAx = GetHist()->GetXaxis();
395  TAxis* yAx = GetHist()->GetYaxis();
396  return Form("%s_%.2f_to_%.2f__times_%s_%.2f_to_%.2f",
397  xAx->GetTitle(), xAx->GetBinLowEdge(x), xAx->GetBinUpEdge(x),
398  yAx->GetTitle(), yAx->GetBinLowEdge(y), yAx->GetBinUpEdge(y));
399  }
400 } // namespace CP
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
CP::HistHandler_TH3::nBins
int nBins() const override
Return the total number of bins in the histogram -> (GetNbins() +2)**n.
Definition: HistHandler.cxx:289
CP::AxisHandlerProvider
Definition: HistHandler.h:190
CP::HistHandler::Copy
void Copy(const HistHandler &other)
Definition: HistHandler.cxx:126
CP::HistHandler_TH3::FindBin
CorrectionCode FindBin(const xAOD::Muon &muon, int &bin) const override
Function that changes from Implementation to implementation.
Definition: HistHandler.cxx:302
CP::HistHandler_TH2::nBins
int nBins() const override
Return the total number of bins in the histogram -> (GetNbins() +2)**n.
Definition: HistHandler.cxx:206
CP::HistHandler::SetBinError
void SetBinError(int bin, float val)
Definition: HistHandler.cxx:145
CP::HistHandler_TH1::HistHandler_TH1
HistHandler_TH1(TH1 *hist)
Definition: HistHandler.cxx:153
CP::HistHandler_TH2::isOverFlowBin
bool isOverFlowBin(int b) const override
States whether a bin is overflow or not.
Definition: HistHandler.cxx:210
CP::HistHandler_TH3::GetBinName
std::string GetBinName(unsigned int bin) const override
Translates the bin number into the borders and return them as name.
Definition: HistHandler.cxx:322
CP::HistHandler_TH1::m_x_handler
std::unique_ptr< AxisHandler > m_x_handler
Definition: HistHandler.h:105
CP::HistHandler_TH1::FindBin
CorrectionCode FindBin(const xAOD::Muon &muon, int &bin) const override
Function that changes from Implementation to implementation.
Definition: HistHandler.cxx:180
CP::HistHandler_TH1::isOverFlowBin
bool isOverFlowBin(int b) const override
States whether a bin is overflow or not.
Definition: HistHandler.cxx:175
CP::HistHandler_TH2Poly::m_h
TH2Poly * m_h
Definition: HistHandler.h:180
yodamerge_tmp.axis
list axis
Definition: yodamerge_tmp.py:241
CP::HistHandler_TH2::FindBin
CorrectionCode FindBin(const xAOD::Muon &muon, int &bin) const override
Function that changes from Implementation to implementation.
Definition: HistHandler.cxx:215
CP::HistHandler_TH2::nOverFlowBins
int nOverFlowBins() const override
Return the number of overflow bins.
Definition: HistHandler.cxx:209
CP::HistHandler_TH2Poly::~HistHandler_TH2Poly
virtual ~HistHandler_TH2Poly()
Definition: HistHandler.cxx:368
bin
Definition: BinsDiffFromStripMedian.h:43
CP::HistHandler_TH3::isOverFlowBin
bool isOverFlowBin(int b) const override
States whether a bin is overflow or not.
Definition: HistHandler.cxx:295
CP::HistHandler_TH2Poly::nOverFlowBins
int nOverFlowBins() const override
Return the number of overflow bins.
Definition: HistHandler.cxx:374
athena.value
value
Definition: athena.py:124
CP::HistHandler_TH3::HistHandler_TH3
HistHandler_TH3(TH1 *hist)
The HistHandler TH3 handles 3D histograms, since TH3 inhertis from TH1,a TH1* object is parsed avoidi...
Definition: HistHandler.cxx:263
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
CP::HistHandler_TH2::~HistHandler_TH2
virtual ~HistHandler_TH2()
Definition: HistHandler.cxx:241
CP::HistHandler_TH1::operator=
virtual HistHandler_TH1 & operator=(const HistHandler_TH1 &other)
Definition: HistHandler.cxx:163
CP::AbsEtaAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &mu, float &value) const override
Definition: HistHandler.cxx:61
x
#define x
CP::HistHandler_TH1
Definition: HistHandler.h:87
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::HistHandler_TH3::m_y_handler
std::unique_ptr< AxisHandler > m_y_handler
Definition: HistHandler.h:157
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
CP::HistHandler::HistHandler
HistHandler(TH1 *Hist)
Definition: HistHandler.cxx:122
CP::clone
std::unique_ptr< TH1 > clone(TH1 *H)
Clones a TH1 and handles the ownership then to a unique_ptr.
Definition: PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx:43
CP::HistHandler_TH2::operator=
virtual HistHandler_TH2 & operator=(const HistHandler_TH2 &other)
Definition: HistHandler.cxx:232
CP::EtaAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &mu, float &value) const override
Definition: HistHandler.cxx:57
CP::HistHandler_TH2Poly::isOverFlowBin
bool isOverFlowBin(int b) const override
States whether a bin is overflow or not.
Definition: HistHandler.cxx:375
CP::HistHandler_TH1::nOverFlowBins
int nOverFlowBins() const override
Return the number of overflow bins.
Definition: HistHandler.cxx:174
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
CP::HistHandler_TH3::nOverFlowBins
int nOverFlowBins() const override
Return the number of overflow bins.
Definition: HistHandler.cxx:292
CP::HistHandler_TH2Poly::GetBinName
std::string GetBinName(unsigned int bin) const override
Translates the bin number into the borders and return them as name.
Definition: HistHandler.cxx:391
CP::HistHandler::GetHist
TH1 * GetHist() const
Definition: HistHandler.h:58
CP::dRJetAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &mu, float &value) const override
Definition: HistHandler.cxx:84
CP::HistHandler_TH3::m_z_handler
std::unique_ptr< AxisHandler > m_z_handler
Definition: HistHandler.h:158
z
#define z
CP::HistHandler_TH3
Definition: HistHandler.h:133
CP::HistHandler_TH2Poly::m_y_handler
std::unique_ptr< AxisHandler > m_y_handler
Definition: HistHandler.h:182
CP::HistHandler::SetBinContent
void SetBinContent(int bin, float val)
Definition: HistHandler.cxx:140
CP::HistHandler_TH2Poly::FindBin
CorrectionCode FindBin(const xAOD::Muon &muon, int &bin) const override
Function that changes from Implementation to implementation.
Definition: HistHandler.cxx:377
CP::HistHandler_TH2Poly
Definition: HistHandler.h:161
CP::HistHandler
Definition: HistHandler.h:37
CP::HistHandler_TH2
Definition: HistHandler.h:108
CP::PhiAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &mu, float &value) const override
Definition: HistHandler.cxx:65
CP::dRJetAxisHandler::m_use_2D_sf
bool m_use_2D_sf
Definition: HistHandler.h:241
CP::HistHandler_TH2::m_x_handler
std::unique_ptr< AxisHandler > m_x_handler
Definition: HistHandler.h:129
CP::dRJetAxisHandler::set_use_2D_sf
static void set_use_2D_sf(const bool)
Definition: HistHandler.cxx:73
CP::HistHandler_TH2::GetBinName
std::string GetBinName(unsigned int bin) const override
Translates the bin number into the borders and return them as name.
Definition: HistHandler.cxx:248
CP::HistHandler_TH3::operator=
virtual HistHandler_TH3 & operator=(const HistHandler_TH3 &other)
Definition: HistHandler.cxx:279
CP::dRJetAxisHandler::m_acc
SG::AuxElement::ConstAccessor< float > m_acc
Definition: HistHandler.h:240
CP::PtAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &mu, float &value) const override
Definition: HistHandler.cxx:49
CP::HistHandler_TH2Poly::nBins
int nBins() const override
Return the total number of bins in the histogram -> (GetNbins() +2)**n.
Definition: HistHandler.cxx:370
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
CP::HistHandler_TH1::nBins
int nBins() const override
Return the total number of bins in the histogram -> (GetNbins() +2)**n.
Definition: HistHandler.cxx:173
CP::HistHandler_TH1::~HistHandler_TH1
virtual ~HistHandler_TH1()
Definition: HistHandler.cxx:171
CP::ChargeAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &mu, float &value) const override
Definition: HistHandler.cxx:53
CP::dRJetAxisHandler::dRJetAxisHandler
dRJetAxisHandler()
Definition: HistHandler.cxx:80
UtilFunctions.h
HistHandler.h
CP::EraseWhiteSpaces
std::string EraseWhiteSpaces(std::string str)
Removes beginning and trailing white spaces from a string.
Definition: PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/UtilFunctions.cxx:31
CP::HistHandler_TH1::GetBinName
std::string GetBinName(unsigned int bin) const override
Translates the bin number into the borders and return them as name.
Definition: HistHandler.cxx:176
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
y
#define y
h
CP::HistHandler_TH2Poly::m_x_handler
std::unique_ptr< AxisHandler > m_x_handler
Definition: HistHandler.h:181
CP::dRJetAxisHandler::set_close_jet_decorator
static void set_close_jet_decorator(const std::string &decor_name)
Definition: HistHandler.cxx:69
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
CP::AxisHandlerProvider::GetAxisHandler
static std::unique_ptr< AxisHandler > GetAxisHandler(const TAxis *axis)
Definition: HistHandler.cxx:20
CP::HistHandler_TH3::m_x_handler
std::unique_ptr< AxisHandler > m_x_handler
Definition: HistHandler.h:156
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
CP::HistHandler_TH2::m_y_handler
std::unique_ptr< AxisHandler > m_y_handler
Definition: HistHandler.h:130
CP::HistHandler::~HistHandler
virtual ~HistHandler()
Definition: HistHandler.cxx:138
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
CP::HistHandler_TH2Poly::HistHandler_TH2Poly
HistHandler_TH2Poly(TH2Poly *hist)
The HistHandler_TH2Poly handles the TH2Poly histograms of the scale-factor maps.
Definition: HistHandler.cxx:341
CP::UndefinedAxisHandler::GetBinningParameter
CorrectionCode GetBinningParameter(const xAOD::Muon &, float &) const override
Definition: HistHandler.cxx:116
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
CP::HistHandler_TH2Poly::operator=
virtual HistHandler_TH2Poly & operator=(const HistHandler_TH2Poly &other)
Definition: HistHandler.cxx:357
CP::HistHandler_TH2::HistHandler_TH2
HistHandler_TH2(TH1 *hist)
The HistHandler TH2 handles 2D histograms which are not TH2Poly, since TH2 inhertis from TH1,...
Definition: HistHandler.cxx:200
CP::HistHandler::m_H
std::unique_ptr< TH1 > m_H
Definition: HistHandler.h:81
CP::HistHandler_TH3::~HistHandler_TH3
virtual ~HistHandler_TH3()
Definition: HistHandler.cxx:277