00001
00002
00011
00012
00013 #ifndef APReweight2D_h
00014 #define APReweight2D_h
00015
00016 #include "APReweightBase.h"
00017 #include <vector>
00018
00019 class TTree;
00020 class TH2;
00021 class TH2D;
00022 class TAxis;
00023 class APWeightEntry;
00024
00025 class APReweight2D : public APReweightBase {
00026
00027 public:
00028 APReweight2D();
00029 APReweight2D(TH2* denominator_in, TH2* numerator_in, bool isTrig = false);
00030 virtual ~APReweight2D();
00032 void ReadEfficiency(TH2* efficiency_in, TH2* err_low_in, TH2* err_high_in = 0);
00034 APWeightEntry* GetBinWeight(unsigned int bin_x, unsigned int bin_y) const;
00035 APWeightEntry* GetWeight(double value_x, double value_y) const;
00037 double GetSampleScale() const;
00038 unsigned int NBins() const;
00039 unsigned int GetBinX(double value_x) const;
00040 unsigned int GetBinY(double value_y) const;
00042 TH2D* GetDenominatorHist() const;
00043 TH2D* GetNumeratorHist() const;
00045 void SetSystUncert(double rel_uncert);
00046 void SetQuietMode(bool isQuiet = true);
00048
00049
00050 private:
00051 TH2D* _denominator_hist;
00052 TH2D* _numerator_hist;
00053 std::vector< std::vector< APWeightEntry* > > _weights;
00054 unsigned int _n_bins_x;
00055 unsigned int _n_bins_y;
00056 TAxis *_axis_x;
00057 TAxis *_axis_y;
00058 };
00059
00060 #endif