11 #ifndef HISTFACTORY_MEASUREMENT_H
12 #define HISTFACTORY_MEASUREMENT_H
28 namespace HistFactory {
30 class Measurement :
public TNamed {
37 Measurement(
const char* Name,
const char* Title=
"");
40 void SetOutputFilePrefix(
const std::string& prefix ) { fOutputFilePrefix = prefix; }
42 std::string GetOutputFilePrefix() {
return fOutputFilePrefix; }
45 void SetPOI(
const std::string& POI ) { fPOI.insert( fPOI.begin(), POI ); }
47 void AddPOI(
const std::string& POI ) { fPOI.push_back(POI); }
49 std::string GetPOI(
unsigned int i=0) {
return fPOI.at(i); }
51 std::vector<std::string>& GetPOIList() {
return fPOI; }
56 void AddConstantParam(
const std::string& param );
58 void ClearConstantParams() { fConstantParams.clear(); }
60 std::vector< std::string >& GetConstantParams() {
return fConstantParams; }
64 void SetParamValue(
const std::string& param,
double value);
66 std::map<std::string, double>& GetParamValues() {
return fParamValues; }
68 void ClearParamValues() { fParamValues.clear(); }
70 void AddPreprocessFunction( std::string name, std::string expression, std::string dependencies );
72 void AddFunctionObject(
const RooStats::HistFactory::PreprocessFunction
function) { fFunctionObjects.push_back(
function ); }
73 void SetFunctionObjects( std::vector< RooStats::HistFactory::PreprocessFunction > objects ) { fFunctionObjects = objects; }
75 std::vector< RooStats::HistFactory::PreprocessFunction >& GetFunctionObjects() {
return fFunctionObjects; }
76 std::vector< std::string > GetPreprocessFunctions();
79 std::vector< RooStats::HistFactory::Asimov >& GetAsimovDatasets() {
return fAsimovDatasets; }
81 void AddAsimovDataset( RooStats::HistFactory::Asimov dataset ) { fAsimovDatasets.push_back(dataset); }
84 void SetLumi(
double Lumi ) { fLumi = Lumi; }
86 void SetLumiRelErr(
double RelErr ) { fLumiRelErr = RelErr; }
88 double GetLumi() {
return fLumi; }
90 double GetLumiRelErr() {
return fLumiRelErr; }
92 void SetBinLow(
int BinLow ) { fBinLow = BinLow; }
93 void SetBinHigh (
int BinHigh ) { fBinHigh = BinHigh; }
94 int GetBinLow() {
return fBinLow; }
95 int GetBinHigh() {
return fBinHigh; }
98 void SetExportOnly(
bool ExportOnly ) { fExportOnly = ExportOnly; }
99 bool GetExportOnly() {
return fExportOnly; }
102 void PrintTree( std::ostream& = std::cout );
103 void PrintXML( std::string Directory=
"", std::string NewOutputPrefix=
"" );
105 std::vector< RooStats::HistFactory::Channel >& GetChannels() {
return fChannels; }
106 RooStats::HistFactory::Channel& GetChannel( std::string );
108 void AddChannel( RooStats::HistFactory::Channel chan ) { fChannels.push_back( chan ); }
110 bool HasChannel( std::string );
111 void writeToFile( TFile* file );
113 void CollectHistograms();
116 void AddGammaSyst(std::string syst,
double uncert);
117 void AddLogNormSyst(std::string syst,
double uncert);
118 void AddUniformSyst(std::string syst);
119 void AddNoSyst(std::string syst);
121 std::map< std::string, double >& GetGammaSyst() {
return fGammaSyst; }
122 std::map< std::string, double >& GetUniformSyst() {
return fUniformSyst; }
123 std::map< std::string, double >& GetLogNormSyst() {
return fLogNormSyst; }
124 std::map< std::string, double >& GetNoSyst() {
return fNoSyst; }
130 std::string fOutputFilePrefix;
131 std::vector<std::string> fPOI;
137 std::string fInterpolationScheme;
140 std::vector< RooStats::HistFactory::Channel > fChannels;
143 std::vector< std::string > fConstantParams;
146 std::map< std::string, double > fParamValues;
149 std::vector< RooStats::HistFactory::PreprocessFunction > fFunctionObjects;
152 std::vector< RooStats::HistFactory::Asimov > fAsimovDatasets;
155 std::map< std::string, double > fGammaSyst;
156 std::map< std::string, double > fUniformSyst;
157 std::map< std::string, double > fLogNormSyst;
158 std::map< std::string, double > fNoSyst;
160 std::string GetDirPath( TDirectory* dir );
162 ClassDef(RooStats::HistFactory::Measurement, 3);