ATLAS Offline Software
APReweight3D.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
15 
17 #ifndef APReweight3D_h
18 #define APReweight3D_h
19 
20 #include "APReweightBase.h"
21 #include <vector>
22 
23 class TTree;
24 class TH3;
25 class TH3D;
26 class TAxis;
27 class APWeightEntry;
28 
29 class APReweight3D : public APReweightBase {
30 
31 public:
32  APReweight3D();
33  APReweight3D(TH3* denominator_in, TH3* numerator_in, bool isTrig = false);
34  virtual ~APReweight3D();
36  void ReadEfficiency(TH3* efficiency_in, TH3* err_low_in, TH3* err_high_in = 0);
38  APWeightEntry* GetBinWeight(unsigned int bin_x, unsigned int bin_y, unsigned int bin_z) const;
39  APWeightEntry* GetWeight(double value_x, double value_y, double value_z) const;
41  double GetSampleScale() const;
42  unsigned int NBins() const;
43  unsigned int GetBinX(double value_x) const;
44  unsigned int GetBinY(double value_y) const;
45  unsigned int GetBinZ(double value_z) const;
47  const TH3D* GetDenominatorHist() const;
48  const TH3D* GetNumeratorHist() const;
50  void SetSystUncert(double rel_uncert);
51  void SetQuietMode(bool isQuiet = true);
53  ClassDef(APReweight3D,1)
54 
55 private:
56  TH3D* m_denominator_hist;
58  std::vector< std::vector< std::vector< APWeightEntry* > > > m_weights;
59  unsigned int m_n_bins_x;
60  unsigned int m_n_bins_y;
61  unsigned int m_n_bins_z;
62  TAxis *m_axis_x;
63  TAxis *m_axis_y;
64  TAxis *m_axis_z;
65 };
66 
67 #endif
APWeightEntry
Definition: APWeightEntry.h:25
APReweight3D::SetSystUncert
void SetSystUncert(double rel_uncert)
Set the global relative (!) systematic uncertainty of all efficiencies/weights.
Definition: APReweight3D.cxx:183
APReweight3D::GetDenominatorHist
const TH3D * GetDenominatorHist() const
Get original denominator histogram.
Definition: APReweight3D.cxx:137
APReweight3D::m_n_bins_z
unsigned int m_n_bins_z
Holds the amount of bins in Z.
Definition: APReweight3D.h:61
APReweight3D::m_weights
std::vector< std::vector< std::vector< APWeightEntry * > > > m_weights
Holds all weight entries.
Definition: APReweight3D.h:58
APReweight3D::GetBinWeight
APWeightEntry * GetBinWeight(unsigned int bin_x, unsigned int bin_y, unsigned int bin_z) const
Get Weight entry for a given triplet of bin numbers.
Definition: APReweight3D.cxx:128
APReweight3D::m_n_bins_y
unsigned int m_n_bins_y
Holds the amount of bins in Y.
Definition: APReweight3D.h:60
APReweight3D::m_axis_x
TAxis * m_axis_x
Holds the X axis of the APReweight3D instance (from input histograms).
Definition: APReweight3D.h:62
APReweightBase
Definition: APReweightBase.h:23
APReweightBase.h
APReweight3D::APReweight3D
APReweight3D()
Default constructor.
Definition: APReweight3D.cxx:15
APReweight3D::m_n_bins_x
unsigned int m_n_bins_x
Holds the amount of bins in X.
Definition: APReweight3D.h:59
APReweight3D::m_numerator_hist
ClassDef(APReweight3D, 1) private TH3D * m_numerator_hist
< Holds the original denominator histogram.
Definition: APReweight3D.h:53
APReweight3D::GetNumeratorHist
const TH3D * GetNumeratorHist() const
Get original numerator histogram.
Definition: APReweight3D.cxx:141
APReweight3D::GetWeight
APWeightEntry * GetWeight(double value_x, double value_y, double value_z) const
Get Weight entry for a given triplet of values.
Definition: APReweight3D.cxx:133
APReweight3D::~APReweight3D
virtual ~APReweight3D()
Default destructor.
Definition: APReweight3D.cxx:111
APReweight3D::GetBinX
unsigned int GetBinX(double value_x) const
Get bin number in X that corresponds to a given value.
Definition: APReweight3D.cxx:153
APReweight3D::ReadEfficiency
void ReadEfficiency(TH3 *efficiency_in, TH3 *err_low_in, TH3 *err_high_in=0)
Read efficiencies and upper/lower uncertainty (if numerator/denominator not applicable (e....
Definition: APReweight3D.cxx:75
APReweight3D::GetSampleScale
double GetSampleScale() const
Get scale factor that was calculated from sample sizes upon instantiation.
Definition: APReweight3D.cxx:145
APReweight3D::NBins
unsigned int NBins() const
Get amount of bins.
Definition: APReweight3D.cxx:149
APReweight3D::m_axis_y
TAxis * m_axis_y
Holds the Y axis of the APReweight3D instance (from input histograms).
Definition: APReweight3D.h:63
APReweight3D
Definition: APReweight3D.h:29
APReweight3D::GetBinY
unsigned int GetBinY(double value_y) const
Get bin number in Y that corresponds to a given value.
Definition: APReweight3D.cxx:163
APReweight3D::m_axis_z
TAxis * m_axis_z
Holds the Z axis of the APReweight3D instance (from input histograms).
Definition: APReweight3D.h:64
APReweight3D::SetQuietMode
void SetQuietMode(bool isQuiet=true)
Sets the flag to turn off messages.
Definition: APReweight3D.cxx:193
APReweight3D::GetBinZ
unsigned int GetBinZ(double value_z) const
Get bin number in Z that corresponds to a given value.
Definition: APReweight3D.cxx:173