Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooStats::ModelConfig Class Referencefinal

ModelConfig is a simple class that holds configuration information specifying how a model should be used in the context of various RooStats tools.

A single model can be used in different ways, and this class should carry all that is needed to specify how it should be used. ModelConfig requires a workspace to be set.

A ModelConfig holds sets of parameters of the likelihood function that have different interpretations:

  • Parameter of interest Parameters that are measured (i.e. fitted).
  • Nuisance parameters Parameters that are fitted, but their post-fit value is not interesting. Often, they might be constrained because external knowledge about them exists, e.g. from external measurements.
  • Constraint parameters No direct use in RooFit/RooStats. Can be used by the user for bookkeeping.
  • Observables Parameters that have been measured externally, i.e. they exist in a dataset. These are not fitted, but read during fitting from the entries of a dataset.
  • Conditional observables Observables that are not integrated when the normalisation of the PDF is calculated. See e.g. rf306_condpereventerrors in the RooFit tutorials.
  • Global observables Observables that to the fit look like "constant" values, i.e. they are not being fitted and they are not loaded from a dataset, but some knowledge exists that allows to set them to a specific value. Examples: – A signal efficiency measured in a Monte Carlo study. – When constraining a parameter \( b \), the target value ( \( b_0 \)) that this parameter is constrained to:

    \[ \mathrm{Constraint}_b = \mathrm{Gauss}(b_0 \, | \, b, 0.2) \]

  • External constraints Include given external constraints to likelihood by multiplying them with the original likelihood.

Definition at line 35 of file ModelConfig.h.

Public Member Functions

 ModelConfig (const char *name, const char *title, RooWorkspace *ws=nullptr)
 
 ModelConfig (const char *name, RooWorkspace *ws=nullptr)
 
 ModelConfig (RooWorkspace *ws=nullptr)
 
ModelConfigClone (const char *name="") const override
 clone
 
template<typename... CmdArgs_t>
std::unique_ptr< RooAbsRealcreateNLL (RooAbsData &data, CmdArgs_t const &...cmdArgs) const
 Wrapper around RooAbsPdf::createNLL(), where the pdf and some configuration options are retrieved from the ModelConfig.
 
template<typename... CmdArgs_t>
std::unique_ptr< RooFitResultfitTo (RooAbsData &data, CmdArgs_t const &...cmdArgs)
 Wrapper around RooAbsPdf::fitTo(), where the pdf and some configuration options are retrieved from the ModelConfig.
 
const RooArgSetGetConditionalObservables () const
 get RooArgSet for conditional observables (return nullptr if not existing)
 
const RooArgSetGetConstraintParameters () const
 get RooArgSet containing the constraint parameters (return nullptr if not existing)
 
const RooArgSetGetExternalConstraints () const
 get RooArgSet for global observables (return nullptr if not existing)
 
const RooArgSetGetGlobalObservables () const
 get RooArgSet for global observables (return nullptr if not existing)
 
const RooArgSetGetNuisanceParameters () const
 get RooArgSet containing the nuisance parameters (return nullptr if not existing)
 
const RooArgSetGetObservables () const
 get RooArgSet for observables (return nullptr if not existing)
 
const RooArgSetGetParametersOfInterest () const
 get RooArgSet containing the parameter of interest (return nullptr if not existing)
 
RooAbsPdfGetPdf () const
 get model PDF (return nullptr if pdf has not been specified or does not exist)
 
RooAbsPdfGetPriorPdf () const
 get parameters prior pdf (return nullptr if not existing)
 
RooAbsDataGetProtoData () const
 get Proto data set (return nullptr if not existing)
 
const RooArgSetGetSnapshot () const
 get RooArgSet for parameters for a particular hypothesis (return nullptr if not existing)
 
RooWorkspaceGetWorkspace () const
 alias for GetWS()
 
RooWorkspaceGetWS () const override
 get from TRef
 
void GuessObsAndNuisance (const RooAbsData &data, bool printModelConfig=true)
 Makes sensible guesses of observables, parameters of interest and nuisance parameters if one or multiple have been set by the creator of this ModelConfig.
 
TClassIsA () const override
 
void LoadSnapshot () const
 load the snapshot from ws if it exists
 
void Print (Option_t *option="") const override
 overload the print method
 
void ReplaceWS (RooWorkspace *ws) override
 Remove the existing reference to a workspace and replace it with this new one.
 
virtual void SetConditionalObservables (const char *argList)
 Specify the conditional observables through a comma-separated list of arguments already in the workspace.
 
virtual void SetConditionalObservables (const RooArgSet &set)
 Specify the conditional observables.
 
virtual void SetConstraintParameters (const char *argList)
 Specify the constraint parameters through a comma-separated list of arguments already in the workspace.
 
virtual void SetConstraintParameters (const RooArgSet &set)
 Specify the constraint parameters.
 
virtual void SetExternalConstraints (const char *argList)
 Specify the external constraints through a comma-separated list of arguments already in the workspace.
 
void SetExternalConstraints (const RooArgSet &set)
 Specify the external constraints.
 
virtual void SetGlobalObservables (const char *argList)
 Specify the global observables through a comma-separated list of arguments already in the workspace.
 
virtual void SetGlobalObservables (const RooArgSet &set)
 Specify the global observables.
 
virtual void SetNuisanceParameters (const char *argList)
 Specify the nuisance parameters using a comma-separated list of arguments already in the workspace.
 
virtual void SetNuisanceParameters (const RooArgSet &set)
 Specify the nuisance parameters (parameters that are not POI).
 
virtual void SetObservables (const char *argList)
 specify the observables through a comma-separated list of arguments already in the workspace.
 
virtual void SetObservables (const RooArgSet &set)
 Specify the observables.
 
virtual void SetParameters (const char *argList)
 Specify parameters using a list of comma-separated list of arguments already in the workspace.
 
virtual void SetParameters (const RooArgSet &set)
 Specify parameters of the PDF.
 
virtual void SetParametersOfInterest (const char *argList)
 Specify parameters of interest using a comma-separated list of arguments already in the workspace.
 
virtual void SetParametersOfInterest (const RooArgSet &set)
 Specify parameters of interest.
 
virtual void SetPdf (const char *name)
 Specify the name of the PDF in the workspace to be used.
 
virtual void SetPdf (const RooAbsPdf &pdf)
 Set the Pdf, add to the workspace if not already there.
 
virtual void SetPriorPdf (const char *name)
 Specify the name of the PDF in the workspace to be used.
 
virtual void SetPriorPdf (const RooAbsPdf &pdf)
 Set the Prior Pdf, add to the workspace if not already there.
 
virtual void SetProtoData (const char *name)
 Specify the name of the dataset 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 SetSnapshot (const RooArgSet &set)
 Set parameter values for a particular hypothesis if using a common PDF by saving a snapshot in the workspace.
 
virtual void SetWorkspace (RooWorkspace &ws)
 
void SetWS (RooWorkspace &ws) override
 Set a workspace that owns all the necessary components for the analysis.
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor.
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor.
 
void Clear (Option_t *option="") override
 Set name and title to empty strings ("").
 
TObjectClone (const char *newname="") const override
 Make a clone of an object using the Streamer facility.
 
Int_t Compare (const TObject *obj) const override
 Compare two TNamed objects.
 
void Copy (TObject &named) const override
 Copy this to obj.
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer.
 
const char * GetName () const override
 Returns name of object.
 
const char * GetTitle () const override
 Returns title of object.
 
ULong_t Hash () const override
 Return hash value for this object.
 
TClassIsA () const override
 
Bool_t IsSortable () const override
 
void ls (Option_t *option="") const override
 List TNamed name and title.
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator.
 
void Print (Option_t *option="") const override
 Print TNamed name and title.
 
virtual void SetName (const char *name)
 Set the name of the TNamed.
 
virtual void SetNameTitle (const char *name, const char *title)
 Set all the TNamed parameters (name and title).
 
virtual void SetTitle (const char *title="")
 Set the title of the TNamed.
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject.
 
void Streamer (TBuffer &) override
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 
- Public Member Functions inherited from RooWorkspaceHandle
virtual ~RooWorkspaceHandle ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TNamed
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Static Public Member Functions inherited from RooWorkspaceHandle
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Member Functions

void DefineSetInWS (const char *name, const RooArgSet &set)
 helper functions to define a set in the WS
 
void ImportDataInWS (RooAbsData &data)
 internal function to import data in WS
 
void ImportPdfInWS (const RooAbsPdf &pdf)
 internal function to import Pdf in WS
 
bool SetHasOnlyParameters (const RooArgSet &set, const char *errorMsgPrefix=nullptr)
 helper function to check that content of a given set is exclusively parameters
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

Protected Attributes

std::string fConditionalObsName
 name for RooArgSet specifying conditional observables
 
std::string fConstrParamsName
 name for RooArgSet specifying constrained parameters
 
std::string fDataName
 name of data set in workspace
 
std::string fExtConstraintsName
 name for RooArgSet specifying external constraints
 
std::string fGlobalObsName
 name for RooArgSet specifying global observables
 
std::string fNuisParamsName
 name for RooArgSet specifying nuisance parameters
 
std::string fObservablesName
 name for RooArgSet specifying observable parameters.
 
std::string fPdfName
 name of PDF in workspace
 
std::string fPOIName
 name for RooArgSet specifying parameters of interest
 
std::string fPriorPdfName
 name for RooAbsPdf specifying a prior on the parameters
 
std::string fProtoDataName
 name for RooArgSet specifying dataset that should be used as proto-data
 
TRef fRefWS
 WS reference used in the file.
 
std::string fSnapshotName
 name for RooArgSet that specifies a particular hypothesis
 
std::string fWSName
 name of the WS
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Private Member Functions

std::unique_ptr< RooAbsRealcreateNLLImpl (RooAbsData &data, const RooLinkedList &cmdList) const
 
std::unique_ptr< RooFitResultfitToImpl (RooAbsData &data, const RooLinkedList &cmdList)
 

Additional Inherited Members

- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 

#include <RooFit/ModelConfig.h>

Inheritance diagram for RooStats::ModelConfig:
[legend]

Constructor & Destructor Documentation

◆ ModelConfig() [1/3]

RooStats::ModelConfig::ModelConfig ( RooWorkspace ws = nullptr)
inline

Definition at line 38 of file ModelConfig.h.

◆ ModelConfig() [2/3]

RooStats::ModelConfig::ModelConfig ( const char *  name,
RooWorkspace ws = nullptr 
)
inline

Definition at line 44 of file ModelConfig.h.

◆ ModelConfig() [3/3]

RooStats::ModelConfig::ModelConfig ( const char *  name,
const char *  title,
RooWorkspace ws = nullptr 
)
inline

Definition at line 50 of file ModelConfig.h.

Member Function Documentation

◆ Class()

static TClass * RooStats::ModelConfig::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooStats::ModelConfig::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t RooStats::ModelConfig::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 368 of file ModelConfig.h.

◆ Clone()

ModelConfig * RooStats::ModelConfig::Clone ( const char *  name = "") const
inlineoverridevirtual

clone

Reimplemented from TObject.

Definition at line 57 of file ModelConfig.h.

◆ createNLL()

template<typename... CmdArgs_t>
RooStats::ModelConfig::createNLL ( RooAbsData data,
CmdArgs_t const &...  cmdArgs 
) const
inline

Wrapper around RooAbsPdf::createNLL(), where the pdf and some configuration options are retrieved from the ModelConfig.

The options taken from the ModelConfig are:

  • ConditionalObservables()
  • GlobalObservables()
  • ExternalConstraints()

Except for the options above, you can still pass all the other command arguments supported by RooAbsPdf::createNLL().

Definition at line 318 of file ModelConfig.h.

◆ createNLLImpl()

std::unique_ptr< RooAbsReal > RooStats::ModelConfig::createNLLImpl ( RooAbsData data,
const RooLinkedList cmdList 
) const
private

Definition at line 447 of file ModelConfig.cxx.

◆ DeclFileName()

static const char * RooStats::ModelConfig::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 368 of file ModelConfig.h.

◆ DefineSetInWS()

void RooStats::ModelConfig::DefineSetInWS ( const char *  name,
const RooArgSet set 
)
protected

helper functions to define a set in the WS

helper functions to avoid code duplication

Definition at line 289 of file ModelConfig.cxx.

◆ fitTo()

template<typename... CmdArgs_t>
RooStats::ModelConfig::fitTo ( RooAbsData data,
CmdArgs_t const &...  cmdArgs 
)
inline

Wrapper around RooAbsPdf::fitTo(), where the pdf and some configuration options are retrieved from the ModelConfig.

See ModelConfig::createNLL() for more information.

Definition at line 324 of file ModelConfig.h.

◆ fitToImpl()

std::unique_ptr< RooFitResult > RooStats::ModelConfig::fitToImpl ( RooAbsData data,
const RooLinkedList cmdList 
)
private

Definition at line 461 of file ModelConfig.cxx.

◆ GetConditionalObservables()

const RooArgSet * RooStats::ModelConfig::GetConditionalObservables ( ) const
inline

get RooArgSet for conditional observables (return nullptr if not existing)

Definition at line 289 of file ModelConfig.h.

◆ GetConstraintParameters()

const RooArgSet * RooStats::ModelConfig::GetConstraintParameters ( ) const
inline

get RooArgSet containing the constraint parameters (return nullptr if not existing)

Definition at line 280 of file ModelConfig.h.

◆ GetExternalConstraints()

const RooArgSet * RooStats::ModelConfig::GetExternalConstraints ( ) const
inline

get RooArgSet for global observables (return nullptr if not existing)

Definition at line 298 of file ModelConfig.h.

◆ GetGlobalObservables()

const RooArgSet * RooStats::ModelConfig::GetGlobalObservables ( ) const
inline

get RooArgSet for global observables (return nullptr if not existing)

Definition at line 295 of file ModelConfig.h.

◆ GetNuisanceParameters()

const RooArgSet * RooStats::ModelConfig::GetNuisanceParameters ( ) const
inline

get RooArgSet containing the nuisance parameters (return nullptr if not existing)

Definition at line 277 of file ModelConfig.h.

◆ GetObservables()

const RooArgSet * RooStats::ModelConfig::GetObservables ( ) const
inline

get RooArgSet for observables (return nullptr if not existing)

Definition at line 286 of file ModelConfig.h.

◆ GetParametersOfInterest()

const RooArgSet * RooStats::ModelConfig::GetParametersOfInterest ( ) const
inline

get RooArgSet containing the parameter of interest (return nullptr if not existing)

Definition at line 274 of file ModelConfig.h.

◆ GetPdf()

RooAbsPdf * RooStats::ModelConfig::GetPdf ( ) const
inline

get model PDF (return nullptr if pdf has not been specified or does not exist)

Definition at line 271 of file ModelConfig.h.

◆ GetPriorPdf()

RooAbsPdf * RooStats::ModelConfig::GetPriorPdf ( ) const
inline

get parameters prior pdf (return nullptr if not existing)

Definition at line 283 of file ModelConfig.h.

◆ GetProtoData()

RooAbsData * RooStats::ModelConfig::GetProtoData ( ) const
inline

get Proto data set (return nullptr if not existing)

Definition at line 301 of file ModelConfig.h.

◆ GetSnapshot()

const RooArgSet * RooStats::ModelConfig::GetSnapshot ( ) const

get RooArgSet for parameters for a particular hypothesis (return nullptr if not existing)

Load the snapshot from ws and return the corresponding set with the snapshot values.

User must delete returned RooArgSet.

Definition at line 248 of file ModelConfig.cxx.

◆ GetWorkspace()

RooWorkspace * RooStats::ModelConfig::GetWorkspace ( ) const
inline

alias for GetWS()

Definition at line 310 of file ModelConfig.h.

◆ GetWS()

RooWorkspace * RooStats::ModelConfig::GetWS ( ) const
overridevirtual

get from TRef

Implements RooWorkspaceHandle.

Definition at line 214 of file ModelConfig.cxx.

◆ GuessObsAndNuisance()

void RooStats::ModelConfig::GuessObsAndNuisance ( const RooAbsData data,
bool  printModelConfig = true 
)

Makes sensible guesses of observables, parameters of interest and nuisance parameters if one or multiple have been set by the creator of this ModelConfig.

Defaults:

  • Observables: determined from data,
  • Global observables: explicit obs - obs from data - constant observables
  • Parameters of interest: empty,
  • Nuisance parameters: all parameters except parameters of interest

We use nullptr to mean not set, so we don't want to fill with empty RooArgSets.

Definition at line 87 of file ModelConfig.cxx.

◆ ImportDataInWS()

void RooStats::ModelConfig::ImportDataInWS ( RooAbsData data)
protected

internal function to import data in WS

Definition at line 330 of file ModelConfig.cxx.

◆ ImportPdfInWS()

void RooStats::ModelConfig::ImportPdfInWS ( const RooAbsPdf pdf)
protected

internal function to import Pdf in WS

Definition at line 314 of file ModelConfig.cxx.

◆ IsA()

TClass * RooStats::ModelConfig::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Definition at line 368 of file ModelConfig.h.

◆ LoadSnapshot()

void RooStats::ModelConfig::LoadSnapshot ( ) const

load the snapshot from ws if it exists

Definition at line 279 of file ModelConfig.cxx.

◆ Print()

void RooStats::ModelConfig::Print ( Option_t option = "") const
overridevirtual

overload the print method

print contents of Model on the default print stream It can be changed using RooPrintable

Reimplemented from TObject.

Definition at line 137 of file ModelConfig.cxx.

◆ ReplaceWS()

void RooStats::ModelConfig::ReplaceWS ( RooWorkspace ws)
inlineoverridevirtual

Remove the existing reference to a workspace and replace it with this new one.

Implements RooWorkspaceHandle.

Definition at line 74 of file ModelConfig.h.

◆ SetConditionalObservables() [1/2]

virtual void RooStats::ModelConfig::SetConditionalObservables ( const char *  argList)
inlinevirtual

Specify the conditional observables through a comma-separated list of arguments already in the workspace.

Definition at line 186 of file ModelConfig.h.

◆ SetConditionalObservables() [2/2]

void RooStats::ModelConfig::SetConditionalObservables ( const RooArgSet set)
virtual

Specify the conditional observables.

Definition at line 369 of file ModelConfig.cxx.

◆ SetConstraintParameters() [1/2]

virtual void RooStats::ModelConfig::SetConstraintParameters ( const char *  argList)
inlinevirtual

Specify the constraint parameters through a comma-separated list of arguments already in the workspace.

Definition at line 159 of file ModelConfig.h.

◆ SetConstraintParameters() [2/2]

virtual void RooStats::ModelConfig::SetConstraintParameters ( const RooArgSet set)
inlinevirtual

Specify the constraint parameters.

Definition at line 150 of file ModelConfig.h.

◆ SetExternalConstraints() [1/2]

virtual void RooStats::ModelConfig::SetExternalConstraints ( const char *  argList)
inlinevirtual

Specify the external constraints through a comma-separated list of arguments already in the workspace.

Definition at line 206 of file ModelConfig.h.

◆ SetExternalConstraints() [2/2]

void RooStats::ModelConfig::SetExternalConstraints ( const RooArgSet set)

Specify the external constraints.

Definition at line 362 of file ModelConfig.cxx.

◆ SetGlobalObservables() [1/2]

virtual void RooStats::ModelConfig::SetGlobalObservables ( const char *  argList)
inlinevirtual

Specify the global observables through a comma-separated list of arguments already in the workspace.

Definition at line 196 of file ModelConfig.h.

◆ SetGlobalObservables() [2/2]

void RooStats::ModelConfig::SetGlobalObservables ( const RooArgSet set)
virtual

Specify the global observables.

Definition at line 378 of file ModelConfig.cxx.

◆ SetHasOnlyParameters()

bool RooStats::ModelConfig::SetHasOnlyParameters ( const RooArgSet set,
const char *  errorMsgPrefix = nullptr 
)
protected

helper function to check that content of a given set is exclusively parameters

Definition at line 345 of file ModelConfig.cxx.

◆ SetNuisanceParameters() [1/2]

virtual void RooStats::ModelConfig::SetNuisanceParameters ( const char *  argList)
inlinevirtual

Specify the nuisance parameters using a comma-separated list of arguments already in the workspace.

Definition at line 142 of file ModelConfig.h.

◆ SetNuisanceParameters() [2/2]

virtual void RooStats::ModelConfig::SetNuisanceParameters ( const RooArgSet set)
inlinevirtual

Specify the nuisance parameters (parameters that are not POI).

Definition at line 132 of file ModelConfig.h.

◆ SetObservables() [1/2]

virtual void RooStats::ModelConfig::SetObservables ( const char *  argList)
inlinevirtual

specify the observables through a comma-separated list of arguments already in the workspace.

Definition at line 176 of file ModelConfig.h.

◆ SetObservables() [2/2]

virtual void RooStats::ModelConfig::SetObservables ( const RooArgSet set)
inlinevirtual

Specify the observables.

Definition at line 167 of file ModelConfig.h.

◆ SetParameters() [1/2]

virtual void RooStats::ModelConfig::SetParameters ( const char *  argList)
inlinevirtual

Specify parameters using a list of comma-separated list of arguments already in the workspace.

Definition at line 120 of file ModelConfig.h.

◆ SetParameters() [2/2]

virtual void RooStats::ModelConfig::SetParameters ( const RooArgSet set)
inlinevirtual

Specify parameters of the PDF.

Definition at line 102 of file ModelConfig.h.

◆ SetParametersOfInterest() [1/2]

virtual void RooStats::ModelConfig::SetParametersOfInterest ( const char *  argList)
inlinevirtual

Specify parameters of interest using a comma-separated list of arguments already in the workspace.

Definition at line 129 of file ModelConfig.h.

◆ SetParametersOfInterest() [2/2]

virtual void RooStats::ModelConfig::SetParametersOfInterest ( const RooArgSet set)
inlinevirtual

Specify parameters of interest.

Definition at line 111 of file ModelConfig.h.

◆ SetPdf() [1/2]

virtual void RooStats::ModelConfig::SetPdf ( const char *  name)
inlinevirtual

Specify the name of the PDF in the workspace to be used.

Definition at line 218 of file ModelConfig.h.

◆ SetPdf() [2/2]

virtual void RooStats::ModelConfig::SetPdf ( const RooAbsPdf pdf)
inlinevirtual

Set the Pdf, add to the workspace if not already there.

Definition at line 88 of file ModelConfig.h.

◆ SetPriorPdf() [1/2]

virtual void RooStats::ModelConfig::SetPriorPdf ( const char *  name)
inlinevirtual

Specify the name of the PDF in the workspace to be used.

Definition at line 235 of file ModelConfig.h.

◆ SetPriorPdf() [2/2]

virtual void RooStats::ModelConfig::SetPriorPdf ( const RooAbsPdf pdf)
inlinevirtual

Set the Prior Pdf, add to the workspace if not already there.

Definition at line 95 of file ModelConfig.h.

◆ SetProtoData() [1/2]

virtual void RooStats::ModelConfig::SetProtoData ( const char *  name)
inlinevirtual

Specify the name of the dataset in the workspace to be used.

Definition at line 252 of file ModelConfig.h.

◆ SetProtoData() [2/2]

virtual void RooStats::ModelConfig::SetProtoData ( RooAbsData data)
inlinevirtual

Set the proto DataSet, add to the workspace if not already there.

Definition at line 81 of file ModelConfig.h.

◆ SetSnapshot()

void RooStats::ModelConfig::SetSnapshot ( const RooArgSet set)
virtual

Set parameter values for a particular hypothesis if using a common PDF by saving a snapshot in the workspace.

save snapshot in the workspace and use values passed with the set

Definition at line 228 of file ModelConfig.cxx.

◆ SetWorkspace()

virtual void RooStats::ModelConfig::SetWorkspace ( RooWorkspace ws)
inlinevirtual

Definition at line 71 of file ModelConfig.h.

◆ SetWS()

void RooStats::ModelConfig::SetWS ( RooWorkspace ws)
overridevirtual

Set a workspace that owns all the necessary components for the analysis.

If a workspace already exists in this ModelConfig, RooWorkspace::merge(ws) will be called on the existing workspace.

Implements RooWorkspaceHandle.

Definition at line 198 of file ModelConfig.cxx.

◆ Streamer()

void RooStats::ModelConfig::Streamer ( TBuffer R__b)
overridevirtual

Stream an object of class TObject.

Reimplemented from TObject.

◆ StreamerNVirtual()

void RooStats::ModelConfig::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 368 of file ModelConfig.h.

Member Data Documentation

◆ fConditionalObsName

std::string RooStats::ModelConfig::fConditionalObsName
protected

name for RooArgSet specifying conditional observables

Definition at line 354 of file ModelConfig.h.

◆ fConstrParamsName

std::string RooStats::ModelConfig::fConstrParamsName
protected

name for RooArgSet specifying constrained parameters

Definition at line 351 of file ModelConfig.h.

◆ fDataName

std::string RooStats::ModelConfig::fDataName
protected

name of data set in workspace

Definition at line 347 of file ModelConfig.h.

◆ fExtConstraintsName

std::string RooStats::ModelConfig::fExtConstraintsName
protected

name for RooArgSet specifying external constraints

Definition at line 356 of file ModelConfig.h.

◆ fGlobalObsName

std::string RooStats::ModelConfig::fGlobalObsName
protected

name for RooArgSet specifying global observables

Definition at line 355 of file ModelConfig.h.

◆ fNuisParamsName

std::string RooStats::ModelConfig::fNuisParamsName
protected

name for RooArgSet specifying nuisance parameters

Definition at line 350 of file ModelConfig.h.

◆ fObservablesName

std::string RooStats::ModelConfig::fObservablesName
protected

name for RooArgSet specifying observable parameters.

Definition at line 361 of file ModelConfig.h.

◆ fPdfName

std::string RooStats::ModelConfig::fPdfName
protected

name of PDF in workspace

Definition at line 346 of file ModelConfig.h.

◆ fPOIName

std::string RooStats::ModelConfig::fPOIName
protected

name for RooArgSet specifying parameters of interest

Definition at line 348 of file ModelConfig.h.

◆ fPriorPdfName

std::string RooStats::ModelConfig::fPriorPdfName
protected

name for RooAbsPdf specifying a prior on the parameters

Definition at line 352 of file ModelConfig.h.

◆ fProtoDataName

std::string RooStats::ModelConfig::fProtoDataName
protected

name for RooArgSet specifying dataset that should be used as proto-data

Definition at line 357 of file ModelConfig.h.

◆ fRefWS

TRef RooStats::ModelConfig::fRefWS
protected

WS reference used in the file.

Definition at line 342 of file ModelConfig.h.

◆ fSnapshotName

std::string RooStats::ModelConfig::fSnapshotName
protected

name for RooArgSet that specifies a particular hypothesis

Definition at line 359 of file ModelConfig.h.

◆ fWSName

std::string RooStats::ModelConfig::fWSName
protected

name of the WS

Definition at line 344 of file ModelConfig.h.

Libraries for RooStats::ModelConfig:

The documentation for this class was generated from the following files: