#ifndef ROOSTATS_ESTIMATESUMMARY_h
#define ROOSTATS_ESTIMATESUMMARY_h
#include "TH1.h"
#include <string>
#include <vector>
#include <map>
#include <iostream>
#include "TObject.h"
namespace RooStats{
namespace HistFactory{
struct EstimateSummary : public TObject {
enum ConstraintType{ Gaussian, Poisson };
struct NormFactor{
std::string name;
double val, high, low;
bool constant;
};
class ShapeSys{
public:
ShapeSys() : name(""), hist(NULL) {;}
std::string name;
TH1* hist;
ConstraintType constraint;
};
typedef std::vector<std::string> vecstring;
typedef std::vector<TH1*> vechist;
typedef std::pair<double, double> pairdouble;
typedef std::map<std::string, std::pair<double, double> > mappair;
EstimateSummary();
virtual ~EstimateSummary();
void Print(const char *opt = 0) const ;
void AddSyst( const std::string & sname, TH1* low, TH1* high);
bool operator==(const EstimateSummary &other) const ;
bool CompareHisto( const TH1 * one, const TH1 * two) const ;
std::string name;
std::string channel;
std::string normName;
TH1* nominal;
std::vector<std::string> systSourceForHist;
std::vector<TH1*> lowHists;
std::vector<TH1*> highHists;
std::map<std::string, std::pair<double, double> > overallSyst;
std::pair<double, double> dummyForRoot;
std::vector<NormFactor> normFactor;
bool IncludeStatError;
ConstraintType StatConstraintType;
Double_t RelErrorThreshold;
TH1* relStatError;
std::string shapeFactorName;
std::vector<ShapeSys> shapeSysts;
ClassDef(RooStats::HistFactory::EstimateSummary,1)
};
}
}
#endif