11 #ifndef ROOSTATS_HISTOTOWORKSPACEFACTORYFAST
12 #define ROOSTATS_HISTOTOWORKSPACEFACTORYFAST
28 #include <TDirectory.h>
67 std::vector<OverallSys>& systList,
68 std::vector<std::string>& likelihoodTermNames,
69 std::vector<std::string>& totSystTermNames);
72 std::string& sigmaEpsilon,
Sample& sample,
bool doRatio);
75 int lowBin,
int highBin,
76 std::vector<std::string>& likelihoodTermNames);
79 std::string expPrefix,
int lowBin,
int highBin,
80 std::vector<std::string>& likelihoodTermNames);
83 std::map<std::string,double> gammaSyst,
84 std::map<std::string,double> uniformSyst,
85 std::map<std::string,double> logNormSyst,
86 std::map<std::string,double> noSyst);
89 std::string prefix, std::string productPrefix,
91 std::vector<std::string>& likelihoodTermNames);
96 std::vector<std::string>& syst_x_expectedPrefixNames,
97 std::vector<std::string>& normByNames);
100 std::vector<RooWorkspace*> wspace_vec,
101 std::vector<std::string> channel_names,
102 std::string dataSetName,
107 std::string productPrefix, std::string systTerm );
110 int lowBin,
int highBin);
113 std::vector< std::pair<TH1*, TH1*> > HistVec );
118 std::vector<std::string>& constraintTerms,
123 std::vector<std::string> obsNameVec);
RooWorkspace * MakeCombinedModel(std::vector< std::string >, std::vector< RooWorkspace * >)
static void PrintCovarianceMatrix(RooFitResult *result, RooArgSet *params, std::string filename)
void AddMultiVarGaussConstraint(RooWorkspace *proto, std::string prefix, int lowBin, int highBin, std::vector< std::string > &likelihoodTermNames)
void AddPoissonTerms(RooWorkspace *proto, std::string prefix, std::string obsPrefix, std::string expPrefix, int lowBin, int highBin, std::vector< std::string > &likelihoodTermNames)
std::map< std::string, double > fParamValues
TH1 * MakeScaledUncertaintyHist(const std::string &Name, std::vector< std::pair< TH1 *, TH1 * > > HistVec)
void GuessObsNameVec(TH1 *hist)
static const char * filename()
std::string AddNormFactor(RooWorkspace *proto, std::string &channel, std::string &sigmaEpsilon, Sample &sample, bool doRatio)
static void EditSyst(RooWorkspace *proto, const char *pdfNameChar, std::map< std::string, double > gammaSyst, std::map< std::string, double > uniformSyst, std::map< std::string, double > logNormSyst, std::map< std::string, double > noSyst)
RooWorkspace * MakeSingleChannelModel(Measurement &measurement, Channel &channel)
TH1 * MakeAbsolUncertaintyHist(const std::string &Name, const TH1 *Hist)
void SetFunctionsToPreprocess(std::vector< std::string > lines)
#define ClassDef(name, id)
void ProcessExpectedHisto(TH1 *hist, RooWorkspace *proto, std::string prefix, std::string productPrefix, std::string systTerm)
std::vector< std::string > fObsNameVec
void AddConstraintTerms(RooWorkspace *proto, Measurement &measurement, std::string prefix, std::string interpName, std::vector< OverallSys > &systList, std::vector< std::string > &likelihoodTermNames, std::vector< std::string > &totSystTermNames)
RooWorkspace * MakeSingleChannelWorkspace(Measurement &measurement, Channel &channel)
void LinInterpWithConstraint(RooWorkspace *proto, TH1 *nominal, std::vector< HistoSys >, std::string prefix, std::string productPrefix, std::string systTerm, std::vector< std::string > &likelihoodTermNames)
static void ConfigureWorkspaceForMeasurement(const std::string &ModelName, RooWorkspace *ws_single, Measurement &measurement)
void SetObsToExpected(RooWorkspace *proto, std::string obsPrefix, std::string expPrefix, int lowBin, int highBin)
HistoToWorkspaceFactoryFast()
Namespace for the RooStats classes.
RooDataSet * MergeDataSets(RooWorkspace *combined, std::vector< RooWorkspace * > wspace_vec, std::vector< std::string > channel_names, std::string dataSetName, RooArgList obsList, RooCategory *channelCat)
Mother of all ROOT objects.
std::vector< std::string > fPreprocessFunctions
std::vector< std::string > fSystToFix
virtual ~HistoToWorkspaceFactoryFast()
void ConfigureHistFactoryDataset(RooDataSet *obsData, TH1 *nominal, RooWorkspace *proto, std::vector< std::string > obsNameVec)
void MakeTotalExpected(RooWorkspace *proto, std::string totName, std::vector< std::string > &syst_x_expectedPrefixNames, std::vector< std::string > &normByNames)
RooArgList createStatConstraintTerms(RooWorkspace *proto, std::vector< std::string > &constraintTerms, ParamHistFunc ¶mHist, TH1 *uncertHist, Constraint::Type type, Double_t minSigma)