ROOT  6.06/09
Reference Guide
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
RooMCStudy Class Reference

Definition at line 32 of file RooMCStudy.h.

Public Member Functions

 RooMCStudy (const RooAbsPdf &model, const RooArgSet &observables, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 
 RooMCStudy (const RooAbsPdf &genModel, const RooAbsPdf &fitModel, const RooArgSet &dependents, const char *genOptions="", const char *fitOptions="", const RooDataSet *genProtoData=0, const RooArgSet &projDeps=RooArgSet())
 OBSOLETE, RETAINED FOR BACKWARD COMPATIBILY. More...
 
virtual ~RooMCStudy ()
 Destructor. More...
 
void addModule (RooAbsMCStudyModule &module)
 Insert given RooMCStudy add-on module to the processing chain of this MCStudy object. More...
 
Bool_t generateAndFit (Int_t nSamples, Int_t nEvtPerSample=0, Bool_t keepGenData=kFALSE, const char *asciiFilePat=0)
 Generate and fit 'nSamples' samples of 'nEvtPerSample' events. More...
 
Bool_t generate (Int_t nSamples, Int_t nEvtPerSample=0, Bool_t keepGenData=kFALSE, const char *asciiFilePat=0)
 Generate 'nSamples' samples of 'nEvtPerSample' events. More...
 
Bool_t fit (Int_t nSamples, const char *asciiFilePat)
 Fit 'nSamples' datasets, which are read from ASCII files. More...
 
Bool_t fit (Int_t nSamples, TList &dataSetList)
 Fit 'nSamples' datasets, as supplied in 'dataSetList'. More...
 
Bool_t addFitResult (const RooFitResult &fr)
 Utility function to add fit result from external fit to this RooMCStudy and process its results through the standard RooMCStudy statistics gathering tools. More...
 
const RooArgSetfitParams (Int_t sampleNum) const
 Return an argset with the fit parameters for the given sample number. More...
 
const RooFitResultfitResult (Int_t sampleNum) const
 Return the RooFitResult object of the fit to given sample. More...
 
const RooAbsDatagenData (Int_t sampleNum) const
 Return the given generated dataset. More...
 
const RooDataSetfitParDataSet ()
 Return a RooDataSet the resulting fit parameters of each toy cycle. More...
 
const RooDataSetgenParDataSet () const
 
RooPlotplotParamOn (RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 Plot the distribution of fitted values of a parameter. More...
 
RooPlotplotParam (const RooRealVar &param, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 Plot the distribution of the fitted value of the given parameter on a newly created frame. More...
 
RooPlotplotParam (const char *paramName, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 Plot the distribution of the fitted value of the given parameter on a newly created frame. More...
 
RooPlotplotNLL (const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 Plot the distribution of the -log(L) values on a newly created frame. More...
 
RooPlotplotError (const RooRealVar &param, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 Plot the distribution of the fit errors for the specified parameter on a newly created frame. More...
 
RooPlotplotPull (const RooRealVar &param, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
 Plot the distribution of pull values for the specified parameter on a newly created frame. More...
 
RooPlotplotNLL (Double_t lo, Double_t hi, Int_t nBins=100)
 Create a RooPlot of the -log(L) distribution in the range lo-hi with 'nBins' bins. More...
 
RooPlotplotError (const RooRealVar &param, Double_t lo, Double_t hi, Int_t nbins=100)
 Create a RooPlot of the distribution of the fitted errors of the given parameter. More...
 
RooPlotplotPull (const RooRealVar &param, Double_t lo=-3.0, Double_t hi=3.0, Int_t nbins=25, Bool_t fitGauss=kFALSE)
 Create a RooPlot of the pull distribution for the given parameter. 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)
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual ~TNamed ()
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings (""). More...
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. 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 SetName (const char *name)
 Change (i.e. More...
 
virtual void SetNameTitle (const char *name, const char *title)
 Change (i.e. set) all the TNamed parameters (name and title). More...
 
virtual void SetTitle (const char *title="")
 Change (i.e. set) the title of the TNamed. More...
 
virtual void ls (Option_t *option="") const
 List TNamed name and title. More...
 
virtual void Print (Option_t *option="") const
 Print TNamed name and title. More...
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. 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...
 
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 TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. 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 TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. 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...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. 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...
 
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...
 
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 UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. 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...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. 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)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. 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...
 
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...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Protected Member Functions

RooPlotmakeFrameAndPlotCmd (const RooRealVar &param, RooLinkedList &cmdList, Bool_t symRange=kFALSE) const
 Internal function. More...
 
Bool_t run (Bool_t generate, Bool_t fit, Int_t nSamples, Int_t nEvtPerSample, Bool_t keepGenData, const char *asciiFilePat)
 Run engine method. More...
 
Bool_t fitSample (RooAbsData *genSample)
 Internal method. More...
 
RooFitResultdoFit (RooAbsData *genSample)
 Internal function. Performs actual fit according to specifications. More...
 
void calcPulls ()
 Calculate the pulls for all fit parameters in the fit results data set, and add them to that dataset. More...
 
RooFitResultrefit (RooAbsData *genSample=0)
 Redo fit on 'current' toy sample, or if genSample is not NULL do fit on given sample instead. More...
 
void resetFitParams ()
 Reset all fit parameters to the initial model parameters at the time of the RooMCStudy constructor. More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Protected Attributes

RooAbsData_genSample
 
RooAbsPdf_genModel
 
RooAbsGenContext_genContext
 
RooArgSet_genInitParams
 
RooArgSet_genParams
 
const RooDataSet_genProtoData
 
RooArgSet _projDeps
 
RooAbsPdf_constrPdf
 
RooAbsGenContext_constrGenContext
 
RooArgSet _dependents
 
RooArgSet _allDependents
 
RooAbsPdf_fitModel
 
RooArgSet_fitInitParams
 
RooArgSet_fitParams
 
RooRealVar_nllVar
 
RooRealVar_ngenVar
 
TList _genDataList
 
TList _fitResList
 
RooDataSet_genParData
 
RooDataSet_fitParData
 
TString _fitOptions
 
RooLinkedList _fitOptList
 
Bool_t _extendedGen
 
Bool_t _binGenData
 
Double_t _nExpGen
 
Bool_t _randProto
 
Bool_t _canAddFitResults
 
Bool_t _verboseGen
 
Bool_t _perExptGenParams
 
Bool_t _silence
 
std::list< RooAbsMCStudyModule * > _modList
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Private Member Functions

 RooMCStudy (const RooMCStudy &)
 

Friends

class RooAbsMCStudyModule
 

Additional Inherited Members

- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

#include <RooMCStudy.h>

+ Inheritance diagram for RooMCStudy:
+ Collaboration diagram for RooMCStudy:

Constructor & Destructor Documentation

RooMCStudy::RooMCStudy ( const RooAbsPdf model,
const RooArgSet observables,
const RooCmdArg arg1 = RooCmdArg::none(),
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Definition at line 76 of file RooMCStudy.cxx.

RooMCStudy::RooMCStudy ( const RooAbsPdf genModel,
const RooAbsPdf fitModel,
const RooArgSet dependents,
const char *  genOptions = "",
const char *  fitOptions = "",
const RooDataSet genProtoData = 0,
const RooArgSet projDeps = RooArgSet() 
)

OBSOLETE, RETAINED FOR BACKWARD COMPATIBILY.

PLEASE USE CONSTRUCTOR WITH NAMED ARGUMENTS

Constructor with a generator and fit model. Both models may point to the same object. The 'dependents' set of variables is generated in the generator phase. The optional prototype dataset is passed to the generator

Available generator options v - Verbose e - Extended: use Poisson distribution for Nevts generated

Available fit options See RooAbsPdf::fitTo()

Definition at line 324 of file RooMCStudy.cxx.

RooMCStudy::~RooMCStudy ( )
virtual

Destructor.

Definition at line 417 of file RooMCStudy.cxx.

RooMCStudy::RooMCStudy ( const RooMCStudy )
private

Member Function Documentation

Bool_t RooMCStudy::addFitResult ( const RooFitResult fr)

Utility function to add fit result from external fit to this RooMCStudy and process its results through the standard RooMCStudy statistics gathering tools.

This function allows users to run the toy MC generation and/or fitting in a distributed way and to collect and analyze the results in a RooMCStudy as if they were run locally.

This method is only functional if this RooMCStudy object is cleanm, i.e. it was not used to generate and/or fit any samples.

Definition at line 875 of file RooMCStudy.cxx.

void RooMCStudy::addModule ( RooAbsMCStudyModule module)

Insert given RooMCStudy add-on module to the processing chain of this MCStudy object.

Definition at line 440 of file RooMCStudy.cxx.

void RooMCStudy::calcPulls ( )
protected

Calculate the pulls for all fit parameters in the fit results data set, and add them to that dataset.

Definition at line 909 of file RooMCStudy.cxx.

Referenced by fitParDataSet(), plotError(), plotPull(), and run().

RooFitResult * RooMCStudy::doFit ( RooAbsData genSample)
protected

Internal function. Performs actual fit according to specifications.

Definition at line 743 of file RooMCStudy.cxx.

Referenced by fitSample(), and refit().

Bool_t RooMCStudy::fit ( Int_t  nSamples,
const char *  asciiFilePat 
)

Fit 'nSamples' datasets, which are read from ASCII files.

The ascii file pattern, which is a template for snprintf, should look something like "data/toymc_%04d.dat" and should contain one integer field that encodes the sample serial number.

Definition at line 694 of file RooMCStudy.cxx.

Bool_t RooMCStudy::fit ( Int_t  nSamples,
TList dataSetList 
)

Fit 'nSamples' datasets, as supplied in 'dataSetList'.

Definition at line 709 of file RooMCStudy.cxx.

const RooArgSet * RooMCStudy::fitParams ( Int_t  sampleNum) const

Return an argset with the fit parameters for the given sample number.

NB: The fit parameters are only stored for successfull fits, thus the maximum sampleNum can be less that the number of generated samples and if so, the indeces will be out of synch with genData() and fitResult()

Definition at line 978 of file RooMCStudy.cxx.

const RooDataSet & RooMCStudy::fitParDataSet ( )

Return a RooDataSet the resulting fit parameters of each toy cycle.

This dataset also contains any additional output that was generated by study modules that were added to this RooMCStudy

Definition at line 958 of file RooMCStudy.cxx.

const RooFitResult * RooMCStudy::fitResult ( Int_t  sampleNum) const

Return the RooFitResult object of the fit to given sample.

Definition at line 994 of file RooMCStudy.cxx.

Bool_t RooMCStudy::fitSample ( RooAbsData genSample)
protected

Internal method.

Fit given dataset with fit model. If fit converges (TMinuit status code zero) The fit results are appended to the fit results dataset

If the fit option "r" is supplied, the RooFitResult objects will always be saved, regardless of the fit status. RooFitResults objects can be retrieved later via fitResult().

Definition at line 821 of file RooMCStudy.cxx.

Referenced by run().

const RooAbsData * RooMCStudy::genData ( Int_t  sampleNum) const

Return the given generated dataset.

This method will only return datasets if during the run cycle it was indicated that generator data should be saved.

Definition at line 1019 of file RooMCStudy.cxx.

Bool_t RooMCStudy::generate ( Int_t  nSamples,
Int_t  nEvtPerSample = 0,
Bool_t  keepGenData = kFALSE,
const char *  asciiFilePat = 0 
)

Generate 'nSamples' samples of 'nEvtPerSample' events.

If keepGenData is set, all generated data sets will be kept in memory and can be accessed later via genData().

Data sets will be written out in ascii form if the pattern string is supplied. The pattern, which is a template for snprintf, should look something like "data/toymc_%04d.dat" and should contain one integer field that encodes the sample serial number.

Definition at line 677 of file RooMCStudy.cxx.

Bool_t RooMCStudy::generateAndFit ( Int_t  nSamples,
Int_t  nEvtPerSample = 0,
Bool_t  keepGenData = kFALSE,
const char *  asciiFilePat = 0 
)

Generate and fit 'nSamples' samples of 'nEvtPerSample' events.

If keepGenData is set, all generated data sets will be kept in memory and can be accessed later via genData().

Data sets will be written out is ascii form if the pattern string is supplied. The pattern, which is a template for snprintf, should look something like "data/toymc_%04d.dat" and should contain one integer field that encodes the sample serial number.

Definition at line 655 of file RooMCStudy.cxx.

const RooDataSet* RooMCStudy::genParDataSet ( ) const
inline

Definition at line 62 of file RooMCStudy.h.

RooPlot * RooMCStudy::makeFrameAndPlotCmd ( const RooRealVar param,
RooLinkedList cmdList,
Bool_t  symRange = kFALSE 
) const
protected

Internal function.

Construct RooPlot from given parameter and modify the list of named arguments 'cmdList' to only contain the plot arguments that should be forwarded to RooAbsData::plotOn()

Definition at line 1239 of file RooMCStudy.cxx.

Referenced by plotParam(), and plotPull().

RooPlot * RooMCStudy::plotError ( const RooRealVar param,
const RooCmdArg arg1 = RooCmdArg::none(),
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Plot the distribution of the fit errors for the specified parameter on a newly created frame.

This function accepts the following optional arguments FrameRange(double lo, double hi) – Set range of frame to given specification FrameBins(int bins) – Set default number of bins of frame to given number Frame(...) – Pass supplied named arguments to RooAbsRealLValue::frame() function. See frame() function for list of allowed arguments

If no frame specifications are given, the AutoRange() feature will be used to set the range Any other named argument is passed to the RooAbsData::plotOn() call. See that function for allowed options

Definition at line 1151 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotError ( const RooRealVar param,
Double_t  lo,
Double_t  hi,
Int_t  nbins = 100 
)

Create a RooPlot of the distribution of the fitted errors of the given parameter.

The frame is created with a range [lo,hi] and plotted data will be binned in 'nbins' bins

Definition at line 1309 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotNLL ( const RooCmdArg arg1 = RooCmdArg::none(),
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Plot the distribution of the -log(L) values on a newly created frame.

This function accepts the following optional arguments FrameRange(double lo, double hi) – Set range of frame to given specification FrameBins(int bins) – Set default number of bins of frame to given number Frame(...) – Pass supplied named arguments to RooAbsRealLValue::frame() function. See frame() function for list of allowed arguments

If no frame specifications are given, the AutoRange() feature will be used to set the range Any other named argument is passed to the RooAbsData::plotOn() call. See that function for allowed options

Definition at line 1129 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotNLL ( Double_t  lo,
Double_t  hi,
Int_t  nBins = 100 
)

Create a RooPlot of the -log(L) distribution in the range lo-hi with 'nBins' bins.

Definition at line 1295 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotParam ( const RooRealVar param,
const RooCmdArg arg1 = RooCmdArg::none(),
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Plot the distribution of the fitted value of the given parameter on a newly created frame.

This function accepts the following optional arguments FrameRange(double lo, double hi) – Set range of frame to given specification FrameBins(int bins) – Set default number of bins of frame to given number Frame(...) – Pass supplied named arguments to RooAbsRealLValue::frame() function. See frame() function for list of allowed arguments

If no frame specifications are given, the AutoRange() feature will be used to set the range Any other named argument is passed to the RooAbsData::plotOn() call. See that function for allowed options

Definition at line 1097 of file RooMCStudy.cxx.

Referenced by plotError(), plotNLL(), and plotParam().

RooPlot * RooMCStudy::plotParam ( const char *  paramName,
const RooCmdArg arg1 = RooCmdArg::none(),
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Plot the distribution of the fitted value of the given parameter on a newly created frame.

This function accepts the following optional arguments FrameRange(double lo, double hi) – Set range of frame to given specification FrameBins(int bins) – Set default number of bins of frame to given number Frame(...) – Pass supplied named arguments to RooAbsRealLValue::frame() function. See frame() function for list of allowed arguments

If no frame specifications are given, the AutoRange() feature will be used to set the range Any other named argument is passed to the RooAbsData::plotOn() call. See that function for allowed options

Definition at line 1068 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotParamOn ( RooPlot frame,
const RooCmdArg arg1 = RooCmdArg::none(),
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Plot the distribution of fitted values of a parameter.

The parameter shown is the one from which the RooPlot was created, e.g.

RooPlot* frame = param.frame(100,-10,10) ; mcstudy.paramOn(frame,LineStyle(kDashed)) ;

Any named arguments passed to plotParamOn() are forwarded to the underlying plotOn() call

Definition at line 1047 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotPull ( const RooRealVar param,
const RooCmdArg arg1,
const RooCmdArg arg2 = RooCmdArg::none(),
const RooCmdArg arg3 = RooCmdArg::none(),
const RooCmdArg arg4 = RooCmdArg::none(),
const RooCmdArg arg5 = RooCmdArg::none(),
const RooCmdArg arg6 = RooCmdArg::none(),
const RooCmdArg arg7 = RooCmdArg::none(),
const RooCmdArg arg8 = RooCmdArg::none() 
)

Plot the distribution of pull values for the specified parameter on a newly created frame.

If asymmetric errors are calculated in the fit (by MINOS) those will be used in the pull calculation

This function accepts the following optional arguments FrameRange(double lo, double hi) – Set range of frame to given specification FrameBins(int bins) – Set default number of bins of frame to given number Frame(...) – Pass supplied named arguments to RooAbsRealLValue::frame() function. See frame() function for list of allowed arguments FitGauss(Bool_t flag) – Add a gaussian fit to the frame

If no frame specifications are given, the AutoSymRange() feature will be used to set the range Any other named argument is passed to the RooAbsData::plotOn() call. See that function for allowed options

Definition at line 1185 of file RooMCStudy.cxx.

RooPlot * RooMCStudy::plotPull ( const RooRealVar param,
Double_t  lo = -3.0,
Double_t  hi = 3.0,
Int_t  nbins = 25,
Bool_t  fitGauss = kFALSE 
)

Create a RooPlot of the pull distribution for the given parameter.

The range lo-hi is plotted in nbins. If fitGauss is set, an unbinned ML fit of the distribution to a Gaussian p.d.f is performed. The fit result is overlaid on the returned RooPlot and a box with the fitted mean and sigma is added.

Definition at line 1333 of file RooMCStudy.cxx.

RooFitResult * RooMCStudy::refit ( RooAbsData genSample = 0)
protected

Redo fit on 'current' toy sample, or if genSample is not NULL do fit on given sample instead.

Definition at line 794 of file RooMCStudy.cxx.

Referenced by RooAbsMCStudyModule::refit().

void RooMCStudy::resetFitParams ( )
protected

Reset all fit parameters to the initial model parameters at the time of the RooMCStudy constructor.

Definition at line 733 of file RooMCStudy.cxx.

Referenced by fitSample().

Bool_t RooMCStudy::run ( Bool_t  doGenerate,
Bool_t  DoFit,
Int_t  nSamples,
Int_t  nEvtPerSample,
Bool_t  keepGenData,
const char *  asciiFilePat 
)
protected

Run engine method.

Generate and/or fit, according to flags, 'nSamples' samples of 'nEvtPerSample' events. If keepGenData is set, all generated data sets will be kept in memory and can be accessed later via genData().

When generating, data sets will be written out in ascii form if the pattern string is supplied The pattern, which is a template for snprintf, should look something like "data/toymc_%04d.dat" and should contain one integer field that encodes the sample serial number.

When fitting only, data sets may optionally be read from ascii files, using the same file pattern.

Definition at line 461 of file RooMCStudy.cxx.

Referenced by fit(), generate(), and generateAndFit().

Friends And Related Function Documentation

friend class RooAbsMCStudyModule
friend

Definition at line 101 of file RooMCStudy.h.

Member Data Documentation

RooArgSet RooMCStudy::_allDependents
protected

Definition at line 123 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::allDependents(), RooMCStudy(), and run().

Bool_t RooMCStudy::_binGenData
protected

Definition at line 137 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::binGenData(), doFit(), RooMCStudy(), and run().

Bool_t RooMCStudy::_canAddFitResults
protected

Definition at line 141 of file RooMCStudy.h.

Referenced by addFitResult(), fitParDataSet(), plotError(), plotPull(), RooMCStudy(), and run().

RooAbsGenContext* RooMCStudy::_constrGenContext
protected

Definition at line 120 of file RooMCStudy.h.

Referenced by RooMCStudy(), run(), and ~RooMCStudy().

RooAbsPdf* RooMCStudy::_constrPdf
protected

Definition at line 119 of file RooMCStudy.h.

Referenced by RooMCStudy(), run(), and ~RooMCStudy().

RooArgSet RooMCStudy::_dependents
protected

Definition at line 122 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::dependents(), RooMCStudy(), and run().

Bool_t RooMCStudy::_extendedGen
protected

Definition at line 136 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::extendedGen(), RooMCStudy(), and run().

RooArgSet* RooMCStudy::_fitInitParams
protected
RooAbsPdf* RooMCStudy::_fitModel
protected
TString RooMCStudy::_fitOptions
protected
RooLinkedList RooMCStudy::_fitOptList
protected
RooArgSet* RooMCStudy::_fitParams
protected
RooDataSet* RooMCStudy::_fitParData
protected
TList RooMCStudy::_fitResList
protected

Definition at line 131 of file RooMCStudy.h.

Referenced by addFitResult(), fit(), fitResult(), fitSample(), and generateAndFit().

RooAbsGenContext* RooMCStudy::_genContext
protected

Definition at line 113 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::genContext(), RooMCStudy(), run(), and ~RooMCStudy().

TList RooMCStudy::_genDataList
protected

Definition at line 130 of file RooMCStudy.h.

Referenced by fit(), genData(), generate(), generateAndFit(), run(), and ~RooMCStudy().

RooArgSet* RooMCStudy::_genInitParams
protected
RooAbsPdf* RooMCStudy::_genModel
protected
RooArgSet* RooMCStudy::_genParams
protected

Definition at line 115 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::genParams(), RooMCStudy(), run(), and ~RooMCStudy().

RooDataSet* RooMCStudy::_genParData
protected

Definition at line 132 of file RooMCStudy.h.

Referenced by genParDataSet(), RooMCStudy(), run(), and ~RooMCStudy().

const RooDataSet* RooMCStudy::_genProtoData
protected

Definition at line 116 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::genProtoData(), RooMCStudy(), and run().

RooAbsData* RooMCStudy::_genSample
protected

Definition at line 111 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::genSample(), refit(), RooMCStudy(), and run().

std::list<RooAbsMCStudyModule*> RooMCStudy::_modList
protected

Definition at line 146 of file RooMCStudy.h.

Referenced by addModule(), RooMCStudy(), and run().

Double_t RooMCStudy::_nExpGen
protected

Definition at line 138 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::numExpGen(), RooMCStudy(), and run().

RooRealVar* RooMCStudy::_ngenVar
protected

Definition at line 128 of file RooMCStudy.h.

Referenced by addFitResult(), fitSample(), RooMCStudy(), run(), and ~RooMCStudy().

RooRealVar* RooMCStudy::_nllVar
protected
Bool_t RooMCStudy::_perExptGenParams
protected

Definition at line 143 of file RooMCStudy.h.

Referenced by calcPulls(), and RooMCStudy().

RooArgSet RooMCStudy::_projDeps
protected

Definition at line 117 of file RooMCStudy.h.

Referenced by doFit(), RooAbsMCStudyModule::projDeps(), and RooMCStudy().

Bool_t RooMCStudy::_randProto
protected

Definition at line 139 of file RooMCStudy.h.

Referenced by RooAbsMCStudyModule::randProto(), RooMCStudy(), and run().

Bool_t RooMCStudy::_silence
protected

Definition at line 144 of file RooMCStudy.h.

Referenced by doFit(), RooMCStudy(), and run().

Bool_t RooMCStudy::_verboseGen
protected

Definition at line 142 of file RooMCStudy.h.

Referenced by RooMCStudy(), and RooAbsMCStudyModule::verboseGen().


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