11 #ifndef HISTFACTORY_SAMPLE_H
12 #define HISTFACTORY_SAMPLE_H
25 namespace HistFactory {
33 Sample(std::string Name);
34 Sample(
const Sample& other);
35 Sample& operator=(
const Sample& other);
37 Sample(std::string Name, std::string HistoName, std::string InputFile, std::string HistoPath=
"");
40 void Print(std::ostream& = std::cout)
const;
41 void PrintXML( std::ofstream& xml );
42 void writeToFile( std::string FileName, std::string DirName );
44 const TH1* GetHisto()
const;
46 void SetHisto( TH1* histo ) { fhNominal = histo; fHistoName=histo->GetName(); }
47 void SetValue( Double_t Val );
53 void ActivateStatError();
54 void ActivateStatError( std::string HistoName, std::string InputFile, std::string HistoPath=
"" );
56 void AddOverallSys( std::string Name, Double_t Low, Double_t High );
57 void AddOverallSys(
const OverallSys& Sys );
59 void AddNormFactor( std::string Name, Double_t Val, Double_t Low, Double_t High,
bool Const=
false );
60 void AddNormFactor(
const NormFactor& Factor );
62 void AddHistoSys( std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow,
63 std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh );
64 void AddHistoSys(
const HistoSys& Sys );
66 void AddHistoFactor( std::string Name, std::string HistoNameLow, std::string HistoFileLow, std::string HistoPathLow,
67 std::string HistoNameHigh, std::string HistoFileHigh, std::string HistoPathHigh );
68 void AddHistoFactor(
const HistoFactor& Factor );
70 void AddShapeFactor( std::string Name );
71 void AddShapeFactor(
const ShapeFactor& Factor );
73 void AddShapeSys( std::string Name, Constraint::Type ConstraintType, std::string HistoName, std::string HistoFile, std::string HistoPath=
"" );
74 void AddShapeSys(
const ShapeSys& Sys );
77 void SetNormalizeByTheory(
bool norm ) { fNormalizeByTheory = norm; }
79 bool GetNormalizeByTheory()
const {
return fNormalizeByTheory; }
83 std::string GetName()
const {
return fName; }
85 void SetName(
const std::string& Name) { fName = Name; }
88 std::string GetInputFile()
const {
return fInputFile; }
90 void SetInputFile(
const std::string& InputFile) { fInputFile = InputFile; }
93 std::string GetHistoName()
const {
return fHistoName; }
95 void SetHistoName(
const std::string& HistoName) { fHistoName = HistoName; }
98 std::string GetHistoPath()
const {
return fHistoPath; }
100 void SetHistoPath(
const std::string& HistoPath) { fHistoPath = HistoPath; }
103 std::string GetChannelName()
const {
return fChannelName; }
105 void SetChannelName(
const std::string& ChannelName) { fChannelName = ChannelName; }
109 std::vector< RooStats::HistFactory::OverallSys >& GetOverallSysList() {
return fOverallSysList; }
110 std::vector< RooStats::HistFactory::NormFactor >& GetNormFactorList() {
return fNormFactorList; }
112 std::vector< RooStats::HistFactory::HistoSys >& GetHistoSysList() {
return fHistoSysList; }
113 std::vector< RooStats::HistFactory::HistoFactor >& GetHistoFactorList() {
return fHistoFactorList; }
115 std::vector< RooStats::HistFactory::ShapeSys >& GetShapeSysList() {
return fShapeSysList; }
116 std::vector< RooStats::HistFactory::ShapeFactor >& GetShapeFactorList() {
return fShapeFactorList; }
118 RooStats::HistFactory::StatError& GetStatError() {
return fStatError; }
119 void SetStatError( RooStats::HistFactory::StatError Error ) {
120 fStatError = std::move(Error);
127 std::string fInputFile;
128 std::string fHistoName;
129 std::string fHistoPath;
132 std::string fChannelName;
138 std::vector< RooStats::HistFactory::OverallSys > fOverallSysList;
139 std::vector< RooStats::HistFactory::NormFactor > fNormFactorList;
141 std::vector< RooStats::HistFactory::HistoSys > fHistoSysList;
142 std::vector< RooStats::HistFactory::HistoFactor > fHistoFactorList;
144 std::vector< RooStats::HistFactory::ShapeSys > fShapeSysList;
145 std::vector< RooStats::HistFactory::ShapeFactor > fShapeFactorList;
149 RooStats::HistFactory::StatError fStatError;
151 bool fNormalizeByTheory;
152 bool fStatErrorActivate;