00001
00002
00011
00012
00013 #ifndef APReweight3D_h
00014 #define APReweight3D_h
00015
00016 #include "APReweightBase.h"
00017 #include <vector>
00018
00019 class TTree;
00020 class TH3;
00021 class TH3D;
00022 class TAxis;
00023 class APWeightEntry;
00024
00025 class APReweight3D : public APReweightBase {
00026
00027 public:
00028 APReweight3D();
00029 APReweight3D(TH3* denominator_in, TH3* numerator_in, bool isTrig = false);
00030 virtual ~APReweight3D();
00032 void ReadEfficiency(TH3* efficiency_in, TH3* err_low_in, TH3* err_high_in = 0);
00034 APWeightEntry* GetBinWeight(unsigned int bin_x, unsigned int bin_y, unsigned int bin_z) const;
00035 APWeightEntry* GetWeight(double value_x, double value_y, double value_z) 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;
00041 unsigned int GetBinZ(double value_z) const;
00043 TH3D* GetDenominatorHist() const;
00044 TH3D* GetNumeratorHist() const;
00046 void SetSystUncert(double rel_uncert);
00047 void SetQuietMode(bool isQuiet = true);
00049
00050
00051 private:
00052 TH3D* _denominator_hist;
00053 TH3D* _numerator_hist;
00054 std::vector< std::vector< std::vector< APWeightEntry* > > > _weights;
00055 unsigned int _n_bins_x;
00056 unsigned int _n_bins_y;
00057 unsigned int _n_bins_z;
00058 TAxis *_axis_x;
00059 TAxis *_axis_y;
00060 TAxis *_axis_z;
00061 };
00062
00063 #endif