00001 #ifndef __BCMTFSYSTEMATICVARIATION__H 00002 #define __BCMTFSYSTEMATICVARIATION__H 00003 00018 /* 00019 * Copyright (C) 2008-2012, Daniel Kollar and Kevin Kroeninger. 00020 * All rights reserved. 00021 * 00022 * For the licensing terms see doc/COPYING. 00023 */ 00024 00025 // --------------------------------------------------------- 00026 00027 #include <string> 00028 #include <vector> 00029 00030 class TH1D; 00031 00032 // --------------------------------------------------------- 00033 class BCMTFSystematicVariation 00034 { 00035 public: 00036 00037 // Constructors and destructor 00038 BCMTFSystematicVariation(const char * channelname, const char * systematicname, int nprocesses); 00039 ~BCMTFSystematicVariation(); 00040 00041 // setters 00042 00043 // set histogram 00044 void SetHistogramUp(int index, TH1D * hist) 00045 { fHistogramUpContainer[index] = hist; }; 00046 00047 // set histogram 00048 void SetHistogramDown(int index, TH1D * hist) 00049 { fHistogramDownContainer[index] = hist; }; 00050 00051 // set histogram 00052 void SetHistograms(int index, TH1D * hist_up, TH1D * hist_down) 00053 { fHistogramUpContainer[index] = hist_up; 00054 fHistogramDownContainer[index] = hist_down; }; 00055 00056 // getters 00057 00058 // return histogram 00059 TH1D * GetHistogramUp(int index) 00060 { return fHistogramUpContainer.at(index); }; 00061 00062 // return histogram 00063 TH1D * GetHistogramDown(int index) 00064 { return fHistogramDownContainer.at(index); }; 00065 00066 // misc 00067 void AddHistogramUp(TH1D * hist) 00068 { fHistogramUpContainer.push_back(hist); }; 00069 00070 // misc 00071 void AddHistogramDown(TH1D * hist) 00072 { fHistogramDownContainer.push_back(hist); }; 00073 00074 // misc 00075 void AddHistograms(TH1D * hist_up, TH1D * hist_down) 00076 { fHistogramUpContainer.push_back(hist_up); 00077 fHistogramDownContainer.push_back(hist_down); }; 00078 00079 private: 00080 00081 // a container of histograms 00082 std::vector<TH1D *> fHistogramUpContainer; 00083 00084 // a container of histograms 00085 std::vector<TH1D *> fHistogramDownContainer; 00086 00087 // channel name 00088 std::string fChannelName; 00089 00090 // systematic name 00091 std::string fSystematicName; 00092 00093 }; 00094 // --------------------------------------------------------- 00095 00096 #endif 00097