Go to the documentation of this file.00001 #ifndef __BCH2D__H
00002 #define __BCH2D__H
00003
00022
00023
00024 #include <vector>
00025
00026
00027 class TH1D;
00028 class TH2D;
00029 class TGraph;
00030
00031
00032
00033 class BCH2D
00034 {
00035
00036 public:
00037
00043 BCH2D();
00044
00047 BCH2D(TH2D * h);
00048
00051 ~BCH2D();
00052
00059 TH2D * GetHistogram()
00060 { return fHistogram; };
00061
00068 void SetHistogram(TH2D * hist)
00069 { fHistogram = hist; };
00070
00074 void SetGlobalMode(double mode[2])
00075 { fMode[0] = mode[0]; fMode[1] = mode[1]; fModeFlag =1; };
00076
00088 void Print(const char * filename, int options=0, int ww=0, int wh=0);
00089
00094 void Draw(int options=0, bool drawmode=true);
00095
00099 void CalculateIntegratedHistogram();
00100
00105 double GetLevel(double p);
00106
00112 std::vector<int> GetNIntervalsY(TH2D * h, int &nfoundmax);
00113
00116 TGraph * GetLowestBandGraph(TH2D * h, std::vector<int> nint);
00117 TGraph * GetLowestBandGraph(TH2D * h);
00118
00119
00120 std::vector<double> GetLevelBoundary(double level);
00121 std::vector<double> GetLevelBoundary(TH2D * h, double level);
00122 TGraph * GetBandGraph(double level1, double level2);
00123 TGraph * GetBandGraph(TH2D * h , double level1, double level2);
00124
00125
00126 TGraph ** GetBandGraphs(TH2D * h, int &n);
00127
00130 private:
00131
00134 TH2D * fHistogram;
00135
00138 TH1D * fIntegratedHistogram;
00139
00142 double fMode[2];
00143
00146 int fModeFlag;
00147
00148 };
00149
00150
00151
00152 #endif