11#ifndef ROOSTATS_ModelConfig
12#define ROOSTATS_ModelConfig
56 if(strcmp(
name,
"")==0)
200 if (!
GetWS() )
return;
210 if (!
GetWS() )
return;
221 if (!
GetWS() )
return;
#define ClassDefOverride(name, id)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
RooFIter fwdIterator() const R__SUGGEST_ALTERNATIVE("begin()
One-time forward iterator.
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
virtual void SetSnapshot(const RooArgSet &set)
Set parameter values for a particular hypothesis if using a common PDF by saving a snapshot in the wo...
virtual void SetObservables(const RooArgSet &set)
Specify the observables.
std::string fSnapshotName
name for RooArgSet specifying dataset that should be used as proto-data
void ImportPdfInWS(const RooAbsPdf &pdf)
internal function to import Pdf in WS
std::string fNuisParamsName
name for RooArgSet specifying parameters of interest
virtual void SetPriorPdf(const RooAbsPdf &pdf)
Set the Prior Pdf, add to the the workspace if not already there.
virtual ModelConfig * Clone(const char *name="") const override
clone
virtual void SetObservables(const char *argList)
specify the observables through a comma-separated list of arguments already in the workspace.
RooAbsData * GetProtoData() const
get Proto data set (return NULL if not existing)
void DefineSetInWS(const char *name, const RooArgSet &set)
helper functions to define a set in the WS
virtual void SetNuisanceParameters(const char *argList)
Specify the nuisance parameters using a comma-separated list of arguments already in the workspace.
std::string fWSName
WS reference used in the file.
std::string fPriorPdfName
name for RooArgSet specifying constrained parameters
std::string fDataName
name of PDF in workspace
virtual void SetWorkspace(RooWorkspace &ws)
RooWorkspace * GetWorkspace() const
alias for GetWS()
const RooArgSet * GetConditionalObservables() const
get RooArgSet for conditional observables (return NULL if not existing)
virtual void SetProtoData(const char *name)
Specify the name of the dataset in the workspace to be used.
std::string fConditionalObsName
name for RooAbsPdf specifying a prior on the parameters
const RooArgSet * GetGlobalObservables() const
get RooArgSet for global observables (return NULL if not existing)
virtual void SetParametersOfInterest(const RooArgSet &set)
Specify parameters of interest.
virtual void ReplaceWS(RooWorkspace *ws) override
Remove the existing reference to a workspace and replace it with this new one.
Bool_t SetHasOnlyParameters(const RooArgSet &set, const char *errorMsgPrefix=0)
helper function to check that content of a given set is exclusively parameters
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return NULL if not existing)
std::string fPdfName
name of the WS
std::string fObservablesName
name for RooArgSet that specifies a particular hypothesis
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return NULL if not existing)
virtual void SetGlobalObservables(const RooArgSet &set)
Specify the global observables.
virtual void SetConstraintParameters(const char *argList)
Specify the constraint parameters through a comma-separated list of arguments already in the workspac...
ModelConfig(RooWorkspace *ws=0)
virtual void SetParameters(const char *argList)
Specify parameters using a list of comma-separated list of arguments already in the workspace.
ModelConfig(const char *name, RooWorkspace *ws=0)
void LoadSnapshot() const
load the snapshot from ws if it exists
std::string fConstrParamsName
name for RooArgSet specifying nuisance parameters
virtual void Print(Option_t *option="") const override
overload the print method
std::string fGlobalObsName
name for RooArgSet specifying conditional observables
void ImportDataInWS(RooAbsData &data)
internal function to import data in WS
virtual void SetWS(RooWorkspace &ws) override
Set a workspace that owns all the necessary components for the analysis.
std::string fPOIName
name of data set in workspace
virtual void SetParametersOfInterest(const char *argList)
Specify parameters of interest using a comma-separated list of arguments already in the workspace.
const RooArgSet * GetObservables() const
get RooArgSet for observables (return NULL if not existing)
virtual void SetConditionalObservables(const char *argList)
Specify the conditional observables through a comma-separated list of arguments already in the worksp...
virtual void SetGlobalObservables(const char *argList)
Specify the global observables through a comma-separated list of arguments already in the workspace.
const RooArgSet * GetSnapshot() const
get RooArgSet for parameters for a particular hypothesis (return NULL if not existing)
const RooArgSet * GetConstraintParameters() const
get RooArgSet containing the constraint parameters (return NULL if not existing)
virtual void SetParameters(const RooArgSet &set)
Specify parameters of the PDF.
void GuessObsAndNuisance(const RooAbsData &data)
Makes sensible guesses of observables, parameters of interest and nuisance parameters if one or multi...
RooWorkspace * GetWS() const override
get from TRef
ModelConfig(const char *name, const char *title, RooWorkspace *ws=0)
virtual void SetPriorPdf(const char *name)
Specify the name of the PDF in the workspace to be used.
std::string fProtoDataName
name for RooArgSet specifying global observables
RooAbsPdf * GetPdf() const
get model PDF (return NULL if pdf has not been specified or does not exist)
virtual void SetNuisanceParameters(const RooArgSet &set)
Specify the nuisance parameters (parameters that are not POI).
virtual void SetConstraintParameters(const RooArgSet &set)
Specify the constraint parameters.
virtual void SetPdf(const char *name)
Specify the name of the PDF in the workspace to be used.
virtual void SetProtoData(RooAbsData &data)
Set the proto DataSet, add to the the workspace if not already there.
virtual void SetConditionalObservables(const RooArgSet &set)
Specify the conditional observables.
RooAbsPdf * GetPriorPdf() const
get parameters prior pdf (return NULL if not existing)
virtual void SetPdf(const RooAbsPdf &pdf)
Set the Pdf, add to the the workspace if not already there.
An interface to set and retrieve a workspace.
The RooWorkspace is a persistable container for RooFit projects.
RooAbsData * data(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found.
const RooArgSet * set(const char *name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject.
Namespace for the RooStats classes.