11#ifndef ROOSTATS_ModelConfig
12#define ROOSTATS_ModelConfig
56 if(strcmp(
name,
"")==0)
177 for (
auto *arg : set){
178 arg->setAttribute(
"Constant",
true);
197 if (!
GetWS() )
return;
207 if (!
GetWS() )
return;
218 if (!
GetWS() )
return;
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
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 that specifies a particular hypothesis
ModelConfig(const char *name, const char *title, RooWorkspace *ws=nullptr)
void ImportPdfInWS(const RooAbsPdf &pdf)
internal function to import Pdf in WS
std::string fNuisParamsName
name for RooArgSet specifying nuisance parameters
virtual void SetPriorPdf(const RooAbsPdf &pdf)
Set the Prior Pdf, add to the workspace if not already there.
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 nullptr 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
name of the WS
std::string fPriorPdfName
name for RooAbsPdf specifying a prior on the parameters
std::string fDataName
name of data set in workspace
virtual void SetWorkspace(RooWorkspace &ws)
RooWorkspace * GetWorkspace() const
alias for GetWS()
const RooArgSet * GetConditionalObservables() const
get RooArgSet for conditional observables (return nullptr if not existing)
void GuessObsAndNuisance(const RooAbsData &data, bool printModelConfig=true)
Makes sensible guesses of observables, parameters of interest and nuisance parameters if one or multi...
virtual void SetProtoData(const char *name)
Specify the name of the dataset in the workspace to be used.
std::string fConditionalObsName
name for RooArgSet specifying conditional observables
ModelConfig(const char *name, RooWorkspace *ws=nullptr)
const RooArgSet * GetGlobalObservables() const
get RooArgSet for global observables (return nullptr if not existing)
ModelConfig * Clone(const char *name="") const override
clone
virtual void SetParametersOfInterest(const RooArgSet &set)
Specify parameters of interest.
TRef fRefWS
WS reference used in the file.
void ReplaceWS(RooWorkspace *ws) override
Remove the existing reference to a workspace and replace it with this new one.
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return nullptr if not existing)
std::string fPdfName
name of PDF in workspace
std::string fObservablesName
name for RooArgSet specifying observable parameters.
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return nullptr 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...
virtual void SetParameters(const char *argList)
Specify parameters using a list of comma-separated list of arguments already in the workspace.
void LoadSnapshot() const
load the snapshot from ws if it exists
std::string fConstrParamsName
name for RooArgSet specifying constrained parameters
void Print(Option_t *option="") const override
overload the print method
std::string fGlobalObsName
name for RooArgSet specifying global observables
void ImportDataInWS(RooAbsData &data)
internal function to import data in WS
void SetWS(RooWorkspace &ws) override
Set a workspace that owns all the necessary components for the analysis.
bool SetHasOnlyParameters(const RooArgSet &set, const char *errorMsgPrefix=nullptr)
helper function to check that content of a given set is exclusively parameters
std::string fPOIName
name for RooArgSet specifying parameters of interest
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 nullptr if not existing)
ModelConfig(RooWorkspace *ws=nullptr)
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 nullptr if not existing)
const RooArgSet * GetConstraintParameters() const
get RooArgSet containing the constraint parameters (return nullptr if not existing)
virtual void SetParameters(const RooArgSet &set)
Specify parameters of the PDF.
RooWorkspace * GetWS() const override
get from TRef
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 dataset that should be used as proto-data
RooAbsPdf * GetPdf() const
get model PDF (return nullptr 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 workspace if not already there.
virtual void SetConditionalObservables(const RooArgSet &set)
Specify the conditional observables.
RooAbsPdf * GetPriorPdf() const
get parameters prior pdf (return nullptr if not existing)
virtual void SetPdf(const RooAbsPdf &pdf)
Set the Pdf, add to the workspace if not already there.
An interface to set and retrieve a workspace.
The RooWorkspace is a persistable container for RooFit projects.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooAbsData * data(RooStringView 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...
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject.
Namespace for the RooStats classes.