ROOT 6.14/05 Reference Guide |
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.
Definition at line 30 of file ModelConfig.h.
Public Member Functions | |
ModelConfig (RooWorkspace *ws=0) | |
ModelConfig (const char *name, RooWorkspace *ws=0) | |
ModelConfig (const char *name, const char *title, RooWorkspace *ws=0) | |
virtual ModelConfig * | Clone (const char *name="") const |
clone More... | |
const RooArgSet * | GetConditionalObservables () const |
get RooArgSet for conditional observables (return NULL if not existing) More... | |
const RooArgSet * | GetConstraintParameters () const |
get RooArgSet containing the constraint parameters (return NULL if not existing) More... | |
const RooArgSet * | GetGlobalObservables () const |
get RooArgSet for global observables (return NULL if not existing) More... | |
const RooArgSet * | GetNuisanceParameters () const |
get RooArgSet containing the nuisance parameters (return NULL if not existing) More... | |
const RooArgSet * | GetObservables () const |
get RooArgSet for observables (return NULL if not existing) More... | |
const RooArgSet * | GetParametersOfInterest () const |
get RooArgSet containing the parameter of interest (return NULL if not existing) More... | |
RooAbsPdf * | GetPdf () const |
get model PDF (return NULL if pdf has not been specified or does not exist) More... | |
RooAbsPdf * | GetPriorPdf () const |
get parameters prior pdf (return NULL if not existing) More... | |
RooAbsData * | GetProtoData () const |
get Proto data set (return NULL if not existing) More... | |
const RooArgSet * | GetSnapshot () const |
get RooArgSet for parameters for a particular hypothesis (return NULL if not existing) More... | |
RooWorkspace * | GetWorkspace () const |
alias for GetWS() More... | |
RooWorkspace * | GetWS () const |
get from TRef More... | |
void | GuessObsAndNuisance (const RooAbsData &data) |
guesses Observables and ParametersOfInterest if not already set More... | |
void | LoadSnapshot () const |
load the snapshot from ws if it exists More... | |
virtual void | Print (Option_t *option="") const |
overload the print method More... | |
virtual void | SetConditionalObservables (const RooArgSet &set) |
specify the conditional observables More... | |
virtual void | SetConditionalObservables (const char *argList) |
specify the conditional observables through a list of comma-separated arguments already in the workspace More... | |
virtual void | SetConstraintParameters (const RooArgSet &set) |
specify the constraint parameters More... | |
virtual void | SetConstraintParameters (const char *argList) |
specify the constraint parameters through a list of comma-separated arguments already in the workspace More... | |
virtual void | SetGlobalObservables (const RooArgSet &set) |
specify the global observables More... | |
virtual void | SetGlobalObservables (const char *argList) |
specify the global observables through a list of comma-separated arguments already in the workspace More... | |
virtual void | SetNuisanceParameters (const RooArgSet &set) |
specify the nuisance parameters (e.g. the rest of the parameters) More... | |
virtual void | SetNuisanceParameters (const char *argList) |
specify the nuisance parameters through a list of comma-separated arguments already in the workspace More... | |
virtual void | SetObservables (const RooArgSet &set) |
specify the observables More... | |
virtual void | SetObservables (const char *argList) |
specify the observables through a list of comma-separated arguments already in the workspace More... | |
virtual void | SetParameters (const RooArgSet &set) |
specify the parameters of interest in the interval More... | |
virtual void | SetParameters (const char *argList) |
specify the parameters of interest through a list of comma-separated arguments already in the workspace More... | |
virtual void | SetParametersOfInterest (const RooArgSet &set) |
virtual void | SetParametersOfInterest (const char *argList) |
virtual void | SetPdf (const RooAbsPdf &pdf) |
Set the Pdf, add to the the workspace if not already there. More... | |
virtual void | SetPdf (const char *name) |
specify the name of the PDF in the workspace to be used More... | |
virtual void | SetPriorPdf (const RooAbsPdf &pdf) |
Set the Prior Pdf, add to the the workspace if not already there. More... | |
virtual void | SetPriorPdf (const char *name) |
specify the name of the PDF in the workspace to be used More... | |
virtual void | SetProtoData (RooAbsData &data) |
Set the proto DataSet, add to the the workspace if not already there. More... | |
virtual void | SetProtoData (const char *name) |
specify the name of the dataset in the workspace to be used More... | |
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 More... | |
virtual void | SetWorkspace (RooWorkspace &ws) |
virtual void | SetWS (RooWorkspace &ws) |
set a workspace that owns all the necessary components for the analysis More... | |
Public Member Functions inherited from TNamed | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TString &name, const TString &title) | |
TNamed (const TNamed &named) | |
TNamed copy ctor. More... | |
virtual | ~TNamed () |
TNamed destructor. More... | |
virtual void | Clear (Option_t *option="") |
Set name and title to empty strings (""). More... | |
virtual Int_t | Compare (const TObject *obj) const |
Compare two TNamed objects. More... | |
virtual void | Copy (TObject &named) const |
Copy this to obj. More... | |
virtual void | FillBuffer (char *&buffer) |
Encode TNamed into output buffer. More... | |
virtual const char * | GetName () const |
Returns name of object. More... | |
virtual const char * | GetTitle () const |
Returns title of object. More... | |
virtual ULong_t | Hash () const |
Return hash value for this object. More... | |
virtual Bool_t | IsSortable () const |
virtual void | ls (Option_t *option="") const |
List TNamed name and title. More... | |
TNamed & | operator= (const TNamed &rhs) |
TNamed assignment operator. More... | |
virtual void | SetName (const char *name) |
Set the name of the TNamed. More... | |
virtual void | SetNameTitle (const char *name, const char *title) |
Set all the TNamed parameters (name and title). More... | |
virtual void | SetTitle (const char *title="") |
Set the title of the TNamed. More... | |
virtual Int_t | Sizeof () const |
Return size of the TNamed part of the TObject. More... | |
Public Member Functions inherited from TObject | |
TObject () | |
TObject constructor. More... | |
TObject (const TObject &object) | |
TObject copy ctor. More... | |
virtual | ~TObject () |
TObject destructor. More... | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. More... | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. More... | |
virtual void | Browse (TBrowser *b) |
Browse object. May be overridden for another default action. More... | |
ULong_t | CheckedHash () |
Checked and record whether for this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More... | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. More... | |
virtual void | Delete (Option_t *option="") |
Delete this object. More... | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Computes distance from point (px,py) to the object. More... | |
virtual void | Draw (Option_t *option="") |
Default Draw method for all objects. More... | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. More... | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad) . More... | |
virtual void | Dump () const |
Dump contents of object on stdout. More... | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. More... | |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
Execute method on this object with the given parameter string, e.g. More... | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
Execute method on this object with parameters stored in the TObjArray. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Execute action corresponding to an event at (px,py). More... | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. More... | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. More... | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. More... | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. More... | |
virtual const char * | GetIconName () const |
Returns mime type name of object. More... | |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). More... | |
virtual Option_t * | GetOption () const |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. More... | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. More... | |
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. More... | |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. More... | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". More... | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. More... | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. More... | |
void | InvertBit (UInt_t f) |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). More... | |
virtual Bool_t | IsFolder () const |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More... | |
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). More... | |
virtual Bool_t | Notify () |
This method must be overridden to handle object notification. More... | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. More... | |
void | operator delete (void *ptr) |
Operator delete. More... | |
void | operator delete[] (void *ptr) |
Operator delete []. More... | |
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) |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. More... | |
virtual void | Paint (Option_t *option="") |
This method must be overridden if a class wants to paint itself. More... | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. More... | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. More... | |
virtual void | RecursiveRemove (TObject *obj) |
Recursively remove this object from a list. More... | |
void | ResetBit (UInt_t f) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object in the file specified by filename. More... | |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
Save a primitive as a C++ statement(s) on output stream "out". More... | |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. More... | |
void | SetBit (UInt_t f) |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. More... | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. More... | |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. More... | |
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. More... | |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
Write this object to the current directory. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Write this object to the current directory. More... | |
Protected Member Functions | |
void | DefineSetInWS (const char *name, const RooArgSet &set) |
helper functions to define a set in the WS More... | |
void | ImportDataInWS (RooAbsData &data) |
internal function to import data in WS More... | |
void | ImportPdfInWS (const RooAbsPdf &pdf) |
internal function to import Pdf in WS More... | |
Bool_t | SetHasOnlyParameters (const RooArgSet &set, const char *errorMsgPrefix=0) |
helper function to check that content of a given set is exclusively parameters More... | |
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). More... | |
void | MakeZombie () |
Protected Attributes | |
std::string | fConditionalObsName |
name for RooAbsPdf specifying a prior on the parameters More... | |
std::string | fConstrParamsName |
name for RooArgSet specifying nuisance parameters More... | |
std::string | fDataName |
name of PDF in workspace More... | |
std::string | fGlobalObsName |
name for RooArgSet specifying conditional observables More... | |
std::string | fNuisParamsName |
name for RooArgSet specifying parameters of interest More... | |
std::string | fObservablesName |
name for RooArgSet that specifies a particular hypothesis More... | |
std::string | fPdfName |
name of the WS More... | |
std::string | fPOIName |
name of data set in workspace More... | |
std::string | fPriorPdfName |
name for RooArgSet specifying constrained parameters More... | |
std::string | fProtoDataName |
name for RooArgSet specifying global observables More... | |
TRef | fRefWS |
std::string | fSnapshotName |
name for RooArgSet specifying dataset that should be used as proto-data More... | |
std::string | fWSName |
WS reference used in the file. More... | |
Protected Attributes inherited from TNamed | |
TString | fName |
TString | fTitle |
Additional Inherited Members | |
Public Types inherited from TObject | |
enum | { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kInconsistent = 0x08000000, kBitMask = 0x00ffffff } |
enum | { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) } |
enum | EDeprecatedStatusBits { kObjInCanvas = BIT(3) } |
enum | EStatusBits { kCanDelete = BIT(0), kMustCleanup = BIT(3), kIsReferenced = BIT(4), kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13) } |
Static Public Member Functions inherited from TObject | |
static Long_t | GetDtorOnly () |
Return destructor only flag. More... | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. More... | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. More... | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. More... | |
#include <RooStats/ModelConfig.h>
|
inline |
Definition at line 34 of file ModelConfig.h.
|
inline |
Definition at line 40 of file ModelConfig.h.
|
inline |
Definition at line 46 of file ModelConfig.h.
|
inlinevirtual |
helper functions to define a set in the WS
helper functions to avoid code duplication
Definition at line 239 of file ModelConfig.cxx.
|
inline |
get RooArgSet for conditional observables (return NULL if not existing)
Definition at line 240 of file ModelConfig.h.
|
inline |
get RooArgSet containing the constraint parameters (return NULL if not existing)
Definition at line 231 of file ModelConfig.h.
|
inline |
get RooArgSet for global observables (return NULL if not existing)
Definition at line 243 of file ModelConfig.h.
|
inline |
get RooArgSet containing the nuisance parameters (return NULL if not existing)
Definition at line 228 of file ModelConfig.h.
|
inline |
get RooArgSet for observables (return NULL if not existing)
Definition at line 237 of file ModelConfig.h.
|
inline |
get RooArgSet containing the parameter of interest (return NULL if not existing)
Definition at line 225 of file ModelConfig.h.
|
inline |
get model PDF (return NULL if pdf has not been specified or does not exist)
Definition at line 222 of file ModelConfig.h.
|
inline |
get parameters prior pdf (return NULL if not existing)
Definition at line 234 of file ModelConfig.h.
|
inline |
get Proto data set (return NULL if not existing)
Definition at line 246 of file ModelConfig.h.
const RooArgSet * RooStats::ModelConfig::GetSnapshot | ( | ) | const |
get RooArgSet for parameters for a particular hypothesis (return NULL 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 206 of file ModelConfig.cxx.
|
inline |
alias for GetWS()
Definition at line 255 of file ModelConfig.h.
RooWorkspace * RooStats::ModelConfig::GetWS | ( | ) | const |
get from TRef
Definition at line 177 of file ModelConfig.cxx.
void RooStats::ModelConfig::GuessObsAndNuisance | ( | const RooAbsData & | data | ) |
guesses Observables and ParametersOfInterest if not already set
Makes sensible guesses of observables, parameters of interest and nuisance parameters.
Defaults: observables: determined from data, global observables = explicit obs - obs from data parameters of interest: empty, nuisance parameters: all parameters except parameters of interest
We use NULL to mean not set, so we don't want to fill with empty RooArgSets/
Definition at line 50 of file ModelConfig.cxx.
|
protected |
internal function to import data in WS
Definition at line 278 of file ModelConfig.cxx.
internal function to import Pdf in WS
Definition at line 264 of file ModelConfig.cxx.
void RooStats::ModelConfig::LoadSnapshot | ( | ) | const |
load the snapshot from ws if it exists
Definition at line 231 of file ModelConfig.cxx.
overload the print method
print contents of Model on the default print stream It can be changed using RooPrintable
Reimplemented from TNamed.
Definition at line 101 of file ModelConfig.cxx.
|
inlinevirtual |
specify the conditional observables
Definition at line 147 of file ModelConfig.h.
|
inlinevirtual |
specify the conditional observables through a list of comma-separated arguments already in the workspace
Definition at line 154 of file ModelConfig.h.
specify the constraint parameters
Definition at line 121 of file ModelConfig.h.
|
inlinevirtual |
specify the constraint parameters through a list of comma-separated arguments already in the workspace
Definition at line 128 of file ModelConfig.h.
specify the global observables
Definition at line 160 of file ModelConfig.h.
|
inlinevirtual |
specify the global observables through a list of comma-separated arguments already in the workspace
Definition at line 177 of file ModelConfig.h.
|
protected |
helper function to check that content of a given set is exclusively parameters
Definition at line 291 of file ModelConfig.cxx.
specify the nuisance parameters (e.g. the rest of the parameters)
Definition at line 108 of file ModelConfig.h.
|
inlinevirtual |
specify the nuisance parameters through a list of comma-separated arguments already in the workspace
Definition at line 115 of file ModelConfig.h.
specify the observables
Definition at line 134 of file ModelConfig.h.
|
inlinevirtual |
specify the observables through a list of comma-separated arguments already in the workspace
Definition at line 141 of file ModelConfig.h.
specify the parameters of interest in the interval
Definition at line 87 of file ModelConfig.h.
|
inlinevirtual |
specify the parameters of interest through a list of comma-separated arguments already in the workspace
Definition at line 99 of file ModelConfig.h.
Definition at line 93 of file ModelConfig.h.
|
inlinevirtual |
Definition at line 103 of file ModelConfig.h.
Set the Pdf, add to the the workspace if not already there.
Definition at line 75 of file ModelConfig.h.
|
inlinevirtual |
specify the name of the PDF in the workspace to be used
Definition at line 187 of file ModelConfig.h.
Set the Prior Pdf, add to the the workspace if not already there.
Definition at line 81 of file ModelConfig.h.
|
inlinevirtual |
specify the name of the PDF in the workspace to be used
Definition at line 197 of file ModelConfig.h.
|
inlinevirtual |
Set the proto DataSet, add to the the workspace if not already there.
Definition at line 69 of file ModelConfig.h.
|
inlinevirtual |
specify the name of the dataset in the workspace to be used
Definition at line 208 of file ModelConfig.h.
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 190 of file ModelConfig.cxx.
|
inlinevirtual |
Definition at line 66 of file ModelConfig.h.
|
virtual |
set a workspace that owns all the necessary components for the analysis
Definition at line 161 of file ModelConfig.cxx.
|
protected |
name for RooAbsPdf specifying a prior on the parameters
Definition at line 289 of file ModelConfig.h.
|
protected |
name for RooArgSet specifying nuisance parameters
Definition at line 286 of file ModelConfig.h.
|
protected |
name of PDF in workspace
Definition at line 282 of file ModelConfig.h.
|
protected |
name for RooArgSet specifying conditional observables
Definition at line 290 of file ModelConfig.h.
|
protected |
name for RooArgSet specifying parameters of interest
Definition at line 285 of file ModelConfig.h.
|
protected |
name for RooArgSet that specifies a particular hypothesis
Definition at line 295 of file ModelConfig.h.
|
protected |
name of the WS
Definition at line 281 of file ModelConfig.h.
|
protected |
name of data set in workspace
Definition at line 283 of file ModelConfig.h.
|
protected |
name for RooArgSet specifying constrained parameters
Definition at line 287 of file ModelConfig.h.
|
protected |
name for RooArgSet specifying global observables
Definition at line 291 of file ModelConfig.h.
|
protected |
Definition at line 277 of file ModelConfig.h.
|
protected |
name for RooArgSet specifying dataset that should be used as proto-data
Definition at line 293 of file ModelConfig.h.
|
protected |
WS reference used in the file.
Definition at line 279 of file ModelConfig.h.