#ifndef ROOSTATS_HybridPlot
#define ROOSTATS_HybridPlot
#include <vector>
#include <iostream>
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#include "TH1.h"
class TLine;
class TLegend;
class TH1;
class TVirtualPad;
namespace RooStats {
class HybridPlot : public TNamed {
public:
HybridPlot(const char* name,
const char* title,
const std::vector<double> & sb_values,
const std::vector<double> & b_values,
double testStat_data,
int n_bins,
bool verbosity=true);
~HybridPlot();
void Draw (const char* options="");
void DumpToFile (const char* RootFileName, const char* options);
double GetBmean(){return fB_histo->GetMean();};
double GetBrms(){return fB_histo->GetRMS();};
TH1F * GetBhisto(){return fB_histo;}
double GetBCenter(double n_sigmas=1, bool display=false)
{return GetHistoCenter(fB_histo,n_sigmas,display);};
double* GetBIntExtremes(double frac)
{return GetHistoPvals(fB_histo,frac);};
double GetSBmean(){return fSb_histo->GetMean();};
double GetSBCenter(double n_sigmas=1, bool display=false)
{return GetHistoCenter(fSb_histo,n_sigmas,display);};
double GetSBrms(){return fSb_histo->GetRMS();};
double* GetSBIntExtremes(double frac)
{return GetHistoPvals(fSb_histo,frac);};
TH1F* GetSBhisto(){return fSb_histo;}
TVirtualPad * GetCanvas() { return fPad; }
void DumpToImage (const char* filename);
double GetHistoCenter(TH1* histo, double n_rms=1,bool display_result=false);
double* GetHistoPvals (TH1* histo, double percentage);
double GetMedian(TH1* histo);
private:
TH1F* fSb_histo;
TH1F* fSb_histo_shaded;
TH1F* fB_histo;
TH1F* fB_histo_shaded;
TLine* fData_testStat_line;
TLegend* fLegend;
TVirtualPad * fPad;
bool fVerbose;
ClassDef(HybridPlot,1)
};
}
#endif