00001
00002
00011
00012
00013 #ifndef APReweightND_h
00014 #define APReweightND_h
00015
00016 #include "APReweightBase.h"
00017 #include <vector>
00018 #include <map>
00019
00020 class TTree;
00021 class THnSparse;
00022 class TAxis;
00023 class APWeightEntry;
00024
00025 class APReweightND : public APReweightBase {
00026
00027 public:
00028 APReweightND();
00029 APReweightND(THnSparse* denominator_in, THnSparse* numerator_in, bool isTrig = false);
00030 virtual ~APReweightND();
00032 void ReadEfficiency(THnSparse* efficiency_in, THnSparse* err_low_in, THnSparse* err_high_in = 0);
00034 APWeightEntry* GetBinWeight(const int bin[]);
00035 APWeightEntry* GetWeight(double value[]);
00037 double GetSampleScale() const;
00038 unsigned int NBins() const;
00040 THnSparse* GetDenominatorHist() const;
00041 THnSparse* GetNumeratorHist() const;
00043 void SetSystUncert(double rel_uncert);
00044 void SetQuietMode(bool isQuiet = true);
00046
00047
00048 private:
00049 unsigned int _n_dim;
00050 THnSparse* _denominator_hist;
00051 THnSparse* _numerator_hist;
00052 std::map< std::vector<int> , APWeightEntry* > _weights;
00053 std::vector< TAxis* > _axes;
00054 };
00055
00056 #endif