• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

BCH1D.h

Go to the documentation of this file.
00001 #ifndef __BCH1D__H
00002 #define __BCH1D__H
00003 
00022 // ---------------------------------------------------------
00023 
00024 #include <vector>
00025 
00026 #include <TH1.h>
00027 
00028 // ---------------------------------------------------------
00029 
00030 class BCH1D
00031 {
00032    public:
00033 
00039       BCH1D();
00040 
00043       BCH1D(TH1D * hist)
00044          { fHistogram = hist; };
00045 
00048       ~BCH1D();
00049 
00057       TH1D * GetHistogram()
00058          { return fHistogram; };
00059 
00062       double GetMean()
00063          { return fHistogram -> GetMean(); };
00064 
00067       double GetMode();
00068 
00071       double GetMedian()
00072          { return this -> GetQuantile(0.5); };
00073 
00079       double GetQuantile(double probablity);
00080 
00086       double GetLimit(double probability)
00087          { return this -> GetQuantile(probability); };
00088 
00091       double GetRMS()
00092          { return fHistogram -> GetRMS(); };
00093 
00099       double GetIntegral(double valuemin, double valuemax);
00100 
00106       double GetPValue(double probability);
00107 
00115       void SetHistogram(TH1D * hist)
00116          { fHistogram = hist; };
00117 
00121       void SetDefaultCLLimit(double limit);
00122 
00125       void SetGlobalMode(double mode)
00126          { fMode=mode; fModeFlag=1; };
00127 
00141       void Print(const char * filename, int options=0, double ovalue=0., int ww=0, int wh=0);
00142 
00164       void Draw(int options=0, double ovalue=0.);
00165 
00169       void DrawDelta(double value) const;
00170 
00175       void DrawShadedLimits(double mode, double min, double max, double limit=0);
00176 
00181       void DrawSmallest(double mode, double prob, bool drawmean=true);
00182 
00188       void DrawLegend(const char* text);
00189 
00196       double GetSmallestInterval(double & min, double & max, double content=.68);
00197 
00198       TH1D * GetSmallestIntervalHistogram(double level);
00199 
00200       std::vector<double> GetSmallestIntervals(double content = 0.68);
00201 
00207       double IntegralWidth(double min, double max);
00208 
00218       TH1D * GetSubHisto(double min, double max, const char * name);
00219 
00222    private:
00223 
00226       TH1D * fHistogram;
00227 
00230       double fDefaultCLLimit;
00231 
00234       double fMode;
00235 
00238       int fModeFlag;
00239 
00240 };
00241 
00242 // ---------------------------------------------------------
00243 
00244 #endif

Generated by  doxygen 1.7.1