11#ifndef ROOSTATS_HISTOTOWORKSPACEFACTORYFAST
12#define ROOSTATS_HISTOTOWORKSPACEFACTORYFAST
62 std::string filename);
69 std::vector<OverallSys>& systList,
70 std::vector<std::string>& likelihoodTermNames,
71 std::vector<std::string>& totSystTermNames);
74 std::string& sigmaEpsilon,
Sample& sample,
bool doRatio);
77 int lowBin,
int highBin,
78 std::vector<std::string>& likelihoodTermNames);
81 std::string expPrefix,
int lowBin,
int highBin,
82 std::vector<std::string>& likelihoodTermNames);
85 std::map<std::string,double> gammaSyst,
86 std::map<std::string,double> uniformSyst,
87 std::map<std::string,double> logNormSyst,
88 std::map<std::string,double> noSyst);
93 const std::vector<RooProduct*>& sampleScaleFactors,
94 std::vector<std::vector<RooAbsArg*>>& sampleHistFuncs)
const;
97 std::vector<std::unique_ptr<RooWorkspace>>& wspace_vec,
98 std::vector<std::string>
const& channel_names,
99 std::string
const& dataSetName,
107 int lowBin,
int highBin);
110 std::vector< std::pair<
const TH1*, std::unique_ptr<TH1>> >
const& HistVec )
const;
115 std::vector<std::string>& constraintTerms,
120 std::vector<std::string>
const& obsNameVec);
#define ClassDef(name, id)
A class which maps the current values of a RooRealVar (or a set of RooRealVars) to one of a number of...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCategory is an object to represent discrete states.
RooDataSet is a container class to hold unbinned data.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
A RooProduct represents the product of a given set of RooAbsReal objects.
This class encapsulates all information for the statistical interpretation of one experiment.
This class provides helper functions for creating likelihood models from histograms.
std::unique_ptr< RooProduct > CreateNormFactor(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)
RooWorkspace * MakeSingleChannelWorkspace(Measurement &measurement, Channel &channel)
void GuessObsNameVec(const TH1 *hist)
void SetObsToExpected(RooWorkspace *proto, std::string obsPrefix, std::string expPrefix, int lowBin, int highBin)
std::unique_ptr< TH1 > MakeScaledUncertaintyHist(const std::string &Name, std::vector< std::pair< const TH1 *, std::unique_ptr< TH1 > > > const &HistVec) const
std::vector< std::string > fPreprocessFunctions
void SetFunctionsToPreprocess(std::vector< std::string > lines)
std::vector< std::string > fObsNameVec
virtual ~HistoToWorkspaceFactoryFast()
RooHistFunc * MakeExpectedHistFunc(const TH1 *hist, RooWorkspace *proto, std::string prefix, const RooArgList &observables) const
Create the nominal hist function from hist, and register it in the workspace.
TH1 * MakeAbsolUncertaintyHist(const std::string &Name, const TH1 *Hist)
std::map< std::string, double > fParamValues
static void ConfigureWorkspaceForMeasurement(const std::string &ModelName, RooWorkspace *ws_single, Measurement &measurement)
RooArgList createStatConstraintTerms(RooWorkspace *proto, std::vector< std::string > &constraintTerms, ParamHistFunc ¶mHist, const TH1 *uncertHist, Constraint::Type type, Double_t minSigma)
void MakeTotalExpected(RooWorkspace *proto, const std::string &totName, const std::vector< RooProduct * > &sampleScaleFactors, std::vector< std::vector< RooAbsArg * > > &sampleHistFuncs) const
void AddPoissonTerms(RooWorkspace *proto, std::string prefix, std::string obsPrefix, std::string expPrefix, int lowBin, int highBin, std::vector< std::string > &likelihoodTermNames)
void ConfigureHistFactoryDataset(RooDataSet &obsData, TH1 const &nominal, RooWorkspace &proto, std::vector< std::string > const &obsNameVec)
static void PrintCovarianceMatrix(RooFitResult *result, RooArgSet *params, std::string filename)
std::vector< std::string > fSystToFix
RooDataSet * MergeDataSets(RooWorkspace *combined, std::vector< std::unique_ptr< RooWorkspace > > &wspace_vec, std::vector< std::string > const &channel_names, std::string const &dataSetName, RooArgList obsList, RooCategory *channelCat)
void AddMultiVarGaussConstraint(RooWorkspace *proto, std::string prefix, int lowBin, int highBin, std::vector< std::string > &likelihoodTermNames)
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)
RooArgList createObservables(const TH1 *hist, RooWorkspace *proto) const
Create observables of type RooRealVar. Creates 1 to 3 observables, depending on the type of the histo...
HistoToWorkspaceFactoryFast()
RooWorkspace * MakeCombinedModel(std::vector< std::string >, std::vector< std::unique_ptr< RooWorkspace > > &)
The RooStats::HistFactory::Measurement class can be used to construct a model by combining multiple R...
The RooWorkspace is a persistable container for RooFit projects.
TH1 is the base class of all histogram classes in ROOT.
Mother of all ROOT objects.
Namespace for the RooStats classes.