58 for (
auto const *myarg : static_range_cast<RooRealVar *>(coll)) {
59 if (myarg->isConstant())
98 removeConstantParameters(co);
119 removeConstantParameters(
p);
127 if (printModelConfig) {
142 os << endl <<
"=== Using the following for " <<
GetName() <<
" ===" << endl;
146 os <<
"Observables: ";
150 os <<
"Parameters of Interest: ";
154 os <<
"Nuisance Parameters: ";
158 os <<
"Global Observables: ";
162 os <<
"Constraint Parameters: ";
166 os <<
"Conditional Observables: ";
170 os <<
"Proto Data: ";
187 os <<
"Snapshot: " << endl;
188 snapshot->
Print(
"v");
260 if (snapshotVars.
empty())
264 snapshotVars.
snapshot(tempSnapshot);
274 return modelSnapshot;
350 for (
auto const *arg : set) {
351 if (!arg->isFundamental()) {
356 if (errorMsgPrefix && nonparams.
getSize() > 0) {
357 cout << errorMsgPrefix <<
" ERROR: specified set contains non-parameters: " << nonparams << endl;
359 return (nonparams.
empty());
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
void Print(Option_t *options=nullptr) const override
Print the object to the defaultPrintStream().
RooArgSet * getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
RooArgSet * getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
void assignFast(const RooAbsCollection &other, bool setValDirty=true) const
Functional equivalent of assign() but assumes this and other collection have same layout.
Int_t getSize() const
Return the number of elements in the collection.
const char * GetName() const override
Returns name of object.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
RooAbsData is the common abstract base class for binned and unbinned datasets.
void Print(Option_t *options=nullptr) const override
Print TNamed name and title.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
static RooMsgService & instance()
Return reference to singleton instance.
void setGlobalKillBelow(RooFit::MsgLevel level)
RooFit::MsgLevel globalKillBelow() const
static std::ostream & defaultPrintStream(std::ostream *os=nullptr)
Return a reference to the current default stream to use in Print().
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
void ImportPdfInWS(const RooAbsPdf &pdf)
internal function to import Pdf in WS
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
std::string fWSName
name of the WS
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...
const RooArgSet * GetGlobalObservables() const
get RooArgSet for global observables (return nullptr if not existing)
TRef fRefWS
WS reference used in the file.
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return nullptr if not existing)
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.
void LoadSnapshot() const
load the snapshot from ws if it exists
void Print(Option_t *option="") const override
overload the print method
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
const RooArgSet * GetObservables() const
get RooArgSet for observables (return nullptr if not existing)
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)
RooWorkspace * GetWS() const override
get from TRef
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).
RooAbsPdf * GetPriorPdf() const
get parameters prior pdf (return nullptr if not existing)
The RooWorkspace is a persistable container for RooFit projects.
bool import(const RooAbsArg &arg, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
Import a RooAbsArg object, e.g.
bool saveSnapshot(RooStringView, const char *paramNames)
Save snapshot of values and attributes (including "Constant") of given parameters.
void merge(const RooWorkspace &)
bool removeSet(const char *name)
Remove a named set from the workspace.
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...
bool loadSnapshot(const char *name)
Load the values and attributes of the parameters in the snapshot saved with the given name.
bool defineSet(const char *name, const RooArgSet &aset, bool importMissing=false)
Define a named RooArgSet with given constituents.
const char * GetName() const override
Returns name of object.
TObject * GetObject() const
Return a pointer to the referenced object.
RooCmdArg RecycleConflictNodes(bool flag=true)
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
Namespace for the RooStats classes.