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

MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.

It takes as input Markov Chain of data points in the parameter space generated by Monte Carlo using the Metropolis algorithm. From the Markov Chain, the confidence interval can be determined in two ways:

Using a Kernel-Estimated PDF: (not the default method)

A RooNDKeysPdf is constructed from the data set using adaptive kernel width. With this RooNDKeysPdf F, we then integrate over the most likely domain in the parameter space (tallest points in the posterior RooNDKeysPdf) until the target confidence level is reached within an acceptable neighborhood as defined by SetEpsilon(). More specifically: we calculate the following for different cutoff values C until we reach the target confidence level: \(\int_{ F >= C } F d{normset} \). Important note: this is not the default method because of a bug in constructing the RooNDKeysPdf from a weighted data set. Configure to use this method by calling SetUseKeys(true), and the data set will be interpreted without weights.

Using a binned data set: (the default method)

This is the binned analog of the continuous integrative method that uses the kernel-estimated PDF. The points in the Markov Chain are put into a binned data set and the interval is then calculated by adding the heights of the bins in decreasing order until the desired level of confidence has been reached. Note that this means the actual confidence level is >= the confidence level prescribed by the client (unless the user calls SetHistStrict(kFALSE)). This method is the default but may not remain as such in future releases, so you may wish to explicitly configure to use this method by calling SetUseKeys(false)

These are not the only ways for the confidence interval to be determined, and other possibilities are being considered being added, especially for the 1-dimensional case.

One can ask an MCMCInterval for the lower and upper limits on a specific parameter of interest in the interval. Note that this works better for some distributions (ones with exactly one local maximum) than others, and sometimes has little value.

Definition at line 33 of file MCMCInterval.h.

Public Types

enum  { DEFAULT_NUM_BINS = 50 }
 
enum  IntervalType { kShortest , kTailFraction }
 
- 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)
}
 

Public Member Functions

 MCMCInterval (const char *name, const RooArgSet &parameters, MarkovChain &chain)
 constructor from parameter of interest and Markov chain object
 
 MCMCInterval (const char *name=0)
 default constructor
 
virtual ~MCMCInterval ()
 
Bool_t CheckParameters (const RooArgSet &point) const
 check if parameters are correct. (dummy implementation to start)
 
virtual Double_t ConfidenceLevel () const
 get the desired confidence level (see GetActualConfidenceLevel())
 
virtual Double_t GetActualConfidenceLevel ()
 virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; }
 
virtual RooArgListGetAxes ()
 return a list of RooRealVars representing the axes you own the returned RooArgList
 
virtual const MarkovChainGetChain ()
 Get the markov chain on which this interval is based You do not own the returned MarkovChain*.
 
virtual const RooDataSetGetChainAsConstDataSet ()
 Get the markov chain on which this interval is based as a RooDataSet.
 
virtual RooDataHistGetChainAsDataHist (RooArgSet *whichVars=NULL)
 Get a clone of the markov chain on which this interval is based as a RooDataHist.
 
virtual RooDataSetGetChainAsDataSet (RooArgSet *whichVars=NULL)
 Get a clone of the markov chain on which this interval is based as a RooDataSet.
 
virtual THnSparseGetChainAsSparseHist (RooArgSet *whichVars=NULL)
 Get a clone of the markov chain on which this interval is based as a THnSparse.
 
virtual Int_t GetDimension () const
 Get the number of parameters of interest in this interval.
 
virtual Double_t GetHistCutoff ()
 get the cutoff bin height for being considered in the confidence interval
 
virtual enum IntervalType GetIntervalType ()
 Return the type of this interval.
 
Double_t GetKeysMax ()
 Determine the approximate maximum value of the Keys PDF.
 
virtual Double_t GetKeysPdfCutoff ()
 get the cutoff RooNDKeysPdf value for being considered in the confidence interval
 
virtual RooRealVarGetNLLVar () const
 Get a clone of the NLL variable from the markov chain.
 
virtual Int_t GetNumBurnInSteps ()
 get the number of steps in the chain to discard as burn-in,
 
virtual RooArgSetGetParameters () const
 return a set containing the parameters of this interval the caller owns the returned RooArgSet*
 
virtual TH1GetPosteriorHist ()
 set the number of bins to use (same for all axes, for now) virtual void SetNumBins(Int_t numBins);
 
virtual RooNDKeysPdfGetPosteriorKeysPdf ()
 Get a clone of the keys pdf of the posterior.
 
virtual RooProductGetPosteriorKeysProduct ()
 Get a clone of the (keyspdf * heaviside) product of the posterior.
 
virtual Bool_t GetUseKeys ()
 get whether we used kernel estimation to determine the interval
 
virtual RooRealVarGetWeightVar () const
 Get a clone of the weight variable from the markov chain.
 
virtual Bool_t IsInInterval (const RooArgSet &point) const
 determine whether this point is in the confidence interval
 
virtual Double_t LowerLimit (RooRealVar &param)
 get the lowest value of param that is within the confidence interval
 
virtual Double_t LowerLimitByDataHist (RooRealVar &param)
 determine lower limit using histogram
 
virtual Double_t LowerLimitByHist (RooRealVar &param)
 determine lower limit using histogram
 
virtual Double_t LowerLimitByKeys (RooRealVar &param)
 determine lower limit in the shortest interval by using keys pdf
 
virtual Double_t LowerLimitBySparseHist (RooRealVar &param)
 determine lower limit using histogram
 
virtual Double_t LowerLimitShortest (RooRealVar &param)
 get the lower limit of param in the shortest confidence interval Note that this works better for some distributions (ones with exactly one maximum) than others, and sometimes has little value.
 
virtual Double_t LowerLimitTailFraction (RooRealVar &param)
 determine lower limit of the lower confidence interval
 
virtual void SetAxes (RooArgList &axes)
 Set which parameters go on which axis.
 
virtual void SetChain (MarkovChain &chain)
 Set the MarkovChain that this interval is based on.
 
virtual void SetConfidenceLevel (Double_t cl)
 set the desired confidence level (see GetActualConfidenceLevel()) Note: calling this function triggers the algorithm that determines the interval, so call this after initializing all other aspects of this IntervalCalculator Also, calling this function again with a different confidence level re-triggers the calculation of the interval
 
virtual void SetDelta (Double_t delta)
 kbelasco: The inner-workings of the class really should not be exposed like this in a comment, but it seems to be the only way to give the user any control over this process, if they desire it
 
virtual void SetEpsilon (Double_t epsilon)
 set the acceptable level or error for Keys interval determination
 
virtual void SetHistStrict (Bool_t isHistStrict)
 whether the specified confidence level is a floor for the actual confidence level (strict), or a ceiling (not strict)
 
virtual void SetIntervalType (enum IntervalType intervalType)
 Set the type of interval to find.
 
virtual void SetLeftSideTailFraction (Double_t a)
 set the left-side tail fraction for a tail-fraction interval
 
virtual void SetNumBurnInSteps (Int_t numBurnInSteps)
 set the number of steps in the chain to discard as burn-in, starting from the first
 
virtual void SetParameters (const RooArgSet &parameters)
 Set the parameters of interest for this interval and change other internal data members accordingly.
 
virtual void SetShortestInterval ()
 
virtual void SetUseKeys (Bool_t useKeys)
 set whether to use kernel estimation to determine the interval
 
virtual void SetUseSparseHist (Bool_t useSparseHist)
 set whether to use a sparse histogram.
 
virtual Double_t UpperLimit (RooRealVar &param)
 get the highest value of param that is within the confidence interval
 
virtual Double_t UpperLimitByDataHist (RooRealVar &param)
 determine upper limit using histogram
 
virtual Double_t UpperLimitByHist (RooRealVar &param)
 determine upper limit using histogram
 
virtual Double_t UpperLimitByKeys (RooRealVar &param)
 determine upper limit in the shortest interval by using keys pdf
 
virtual Double_t UpperLimitBySparseHist (RooRealVar &param)
 determine upper limit using histogram
 
virtual Double_t UpperLimitShortest (RooRealVar &param)
 get the upper limit of param in the confidence interval Note that this works better for some distributions (ones with exactly one maximum) than others, and sometimes has little value.
 
virtual Double_t UpperLimitTailFraction (RooRealVar &param)
 determine upper limit of the lower confidence interval
 
- Public Member Functions inherited from RooStats::ConfInterval
 ConfInterval (const char *name=0)
 constructor given name and title
 
virtual ~ConfInterval ()
 destructor
 
ConfIntervaloperator= (const ConfInterval &other)
 operator=
 
- 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.
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings ("").
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects.
 
virtual void Copy (TObject &named) const
 Copy this to obj.
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 List TNamed name and title.
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator.
 
virtual void Print (Option_t *option="") const
 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.
 
- 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 for instance with: gROOT->SetSelectedPad(gPad).
 
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=0)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 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.
 
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)
 Operator delete [].
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator 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.
 
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=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Protected Member Functions

virtual Double_t CalcConfLevel (Double_t cutoff, Double_t full)
 
virtual void CreateDataHist ()
 
virtual void CreateHist ()
 
virtual void CreateKeysDataHist ()
 
virtual void CreateKeysPdf ()
 
virtual void CreateSparseHist ()
 
virtual void CreateVector (RooRealVar *param)
 
virtual void DetermineByDataHist ()
 
virtual void DetermineByHist ()
 
virtual void DetermineByKeys ()
 
virtual void DetermineBySparseHist ()
 
virtual void DetermineInterval ()
 
virtual void DetermineShortestInterval ()
 
virtual void DetermineTailFractionInterval ()
 
- 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

RooRealVar ** fAxes
 
MarkovChainfChain
 
Double_t fConfidenceLevel
 
RooRealVarfCutoffVar
 
RooDataHistfDataHist
 
Double_t fDelta
 
Int_t fDimension
 
Double_t fEpsilon
 
Double_t fFull
 
HeavisidefHeaviside
 
TH1fHist
 
Double_t fHistConfLevel
 
Double_t fHistCutoff
 
enum IntervalType fIntervalType
 
Bool_t fIsHistStrict
 
Double_t fKeysConfLevel
 
Double_t fKeysCutoff
 
RooDataHistfKeysDataHist
 
RooNDKeysPdffKeysPdf
 
Double_t fLeftSideTF
 
Int_t fNumBurnInSteps
 
RooArgSet fParameters
 
RooProductfProduct
 
THnSparsefSparseHist
 
Double_t fTFConfLevel
 
Double_t fTFLower
 
Double_t fTFUpper
 
Bool_t fUseKeys
 
Bool_t fUseSparseHist
 
std::vector< Int_tfVector
 
Double_t fVecWeight
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Private Member Functions

Bool_t AcceptableConfLevel (Double_t confLevel)
 
Bool_t WithinDeltaFraction (Double_t a, Double_t b)
 

Additional Inherited Members

- Static Public Member Functions inherited from TObject
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.
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 

#include <RooStats/MCMCInterval.h>

Inheritance diagram for RooStats::MCMCInterval:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DEFAULT_NUM_BINS 

Definition at line 45 of file MCMCInterval.h.

◆ IntervalType

Enumerator
kShortest 
kTailFraction 

Definition at line 46 of file MCMCInterval.h.

Constructor & Destructor Documentation

◆ MCMCInterval() [1/2]

MCMCInterval::MCMCInterval ( const char *  name = 0)
explicit

default constructor

Definition at line 97 of file MCMCInterval.cxx.

◆ MCMCInterval() [2/2]

MCMCInterval::MCMCInterval ( const char *  name,
const RooArgSet parameters,
MarkovChain chain 
)

constructor from parameter of interest and Markov chain object

Definition at line 134 of file MCMCInterval.cxx.

◆ ~MCMCInterval()

MCMCInterval::~MCMCInterval ( )
virtual

Definition at line 171 of file MCMCInterval.cxx.

Member Function Documentation

◆ AcceptableConfLevel()

Bool_t MCMCInterval::AcceptableConfLevel ( Double_t  confLevel)
inlineprivate

Definition at line 1469 of file MCMCInterval.cxx.

◆ CalcConfLevel()

Double_t MCMCInterval::CalcConfLevel ( Double_t  cutoff,
Double_t  full 
)
inlineprotectedvirtual

Definition at line 1393 of file MCMCInterval.cxx.

◆ CheckParameters()

Bool_t MCMCInterval::CheckParameters ( const RooArgSet point) const
virtual

check if parameters are correct. (dummy implementation to start)

Implements RooStats::ConfInterval.

Definition at line 1554 of file MCMCInterval.cxx.

◆ ConfidenceLevel()

virtual Double_t RooStats::MCMCInterval::ConfidenceLevel ( ) const
inlinevirtual

get the desired confidence level (see GetActualConfidenceLevel())

Implements RooStats::ConfInterval.

Definition at line 62 of file MCMCInterval.h.

◆ CreateDataHist()

void MCMCInterval::CreateDataHist ( )
protectedvirtual

Definition at line 503 of file MCMCInterval.cxx.

◆ CreateHist()

void MCMCInterval::CreateHist ( )
protectedvirtual

Definition at line 378 of file MCMCInterval.cxx.

◆ CreateKeysDataHist()

void MCMCInterval::CreateKeysDataHist ( )
protectedvirtual

Definition at line 1483 of file MCMCInterval.cxx.

◆ CreateKeysPdf()

void MCMCInterval::CreateKeysPdf ( )
protectedvirtual

Definition at line 334 of file MCMCInterval.cxx.

◆ CreateSparseHist()

void MCMCInterval::CreateSparseHist ( )
protectedvirtual

Definition at line 449 of file MCMCInterval.cxx.

◆ CreateVector()

void MCMCInterval::CreateVector ( RooRealVar param)
protectedvirtual

Definition at line 527 of file MCMCInterval.cxx.

◆ DetermineByDataHist()

void MCMCInterval::DetermineByDataHist ( )
protectedvirtual

Definition at line 916 of file MCMCInterval.cxx.

◆ DetermineByHist()

void MCMCInterval::DetermineByHist ( )
protectedvirtual

Definition at line 835 of file MCMCInterval.cxx.

◆ DetermineByKeys()

void MCMCInterval::DetermineByKeys ( )
protectedvirtual

Definition at line 718 of file MCMCInterval.cxx.

◆ DetermineBySparseHist()

void MCMCInterval::DetermineBySparseHist ( )
protectedvirtual

Definition at line 845 of file MCMCInterval.cxx.

◆ DetermineInterval()

void MCMCInterval::DetermineInterval ( )
protectedvirtual

Definition at line 588 of file MCMCInterval.cxx.

◆ DetermineShortestInterval()

void MCMCInterval::DetermineShortestInterval ( )
protectedvirtual

Definition at line 606 of file MCMCInterval.cxx.

◆ DetermineTailFractionInterval()

void MCMCInterval::DetermineTailFractionInterval ( )
protectedvirtual

Definition at line 616 of file MCMCInterval.cxx.

◆ GetActualConfidenceLevel()

Double_t MCMCInterval::GetActualConfidenceLevel ( )
virtual

virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; }

get the actual value of the confidence level for this interval.

Definition at line 988 of file MCMCInterval.cxx.

◆ GetAxes()

virtual RooArgList * RooStats::MCMCInterval::GetAxes ( )
inlinevirtual

return a list of RooRealVars representing the axes you own the returned RooArgList

Definition at line 102 of file MCMCInterval.h.

◆ GetChain()

virtual const MarkovChain * RooStats::MCMCInterval::GetChain ( )
inlinevirtual

Get the markov chain on which this interval is based You do not own the returned MarkovChain*.

Definition at line 198 of file MCMCInterval.h.

◆ GetChainAsConstDataSet()

virtual const RooDataSet * RooStats::MCMCInterval::GetChainAsConstDataSet ( )
inlinevirtual

Get the markov chain on which this interval is based as a RooDataSet.

You do not own the returned RooDataSet*

Definition at line 207 of file MCMCInterval.h.

◆ GetChainAsDataHist()

virtual RooDataHist * RooStats::MCMCInterval::GetChainAsDataHist ( RooArgSet whichVars = NULL)
inlinevirtual

Get a clone of the markov chain on which this interval is based as a RooDataHist.

You own the returned RooDataHist*

Definition at line 212 of file MCMCInterval.h.

◆ GetChainAsDataSet()

virtual RooDataSet * RooStats::MCMCInterval::GetChainAsDataSet ( RooArgSet whichVars = NULL)
inlinevirtual

Get a clone of the markov chain on which this interval is based as a RooDataSet.

You own the returned RooDataSet*

Definition at line 202 of file MCMCInterval.h.

◆ GetChainAsSparseHist()

virtual THnSparse * RooStats::MCMCInterval::GetChainAsSparseHist ( RooArgSet whichVars = NULL)
inlinevirtual

Get a clone of the markov chain on which this interval is based as a THnSparse.

You own the returned THnSparse*

Definition at line 217 of file MCMCInterval.h.

◆ GetDimension()

virtual Int_t RooStats::MCMCInterval::GetDimension ( ) const
inlinevirtual

Get the number of parameters of interest in this interval.

Definition at line 194 of file MCMCInterval.h.

◆ GetHistCutoff()

Double_t MCMCInterval::GetHistCutoff ( )
virtual

get the cutoff bin height for being considered in the confidence interval

Definition at line 1369 of file MCMCInterval.cxx.

◆ GetIntervalType()

virtual enum IntervalType RooStats::MCMCInterval::GetIntervalType ( )
inlinevirtual

Return the type of this interval.

Definition at line 247 of file MCMCInterval.h.

◆ GetKeysMax()

Double_t MCMCInterval::GetKeysMax ( )

Determine the approximate maximum value of the Keys PDF.

Definition at line 1337 of file MCMCInterval.cxx.

◆ GetKeysPdfCutoff()

Double_t MCMCInterval::GetKeysPdfCutoff ( )
virtual

get the cutoff RooNDKeysPdf value for being considered in the confidence interval

Definition at line 1379 of file MCMCInterval.cxx.

◆ GetNLLVar()

virtual RooRealVar * RooStats::MCMCInterval::GetNLLVar ( ) const
inlinevirtual

Get a clone of the NLL variable from the markov chain.

Definition at line 221 of file MCMCInterval.h.

◆ GetNumBurnInSteps()

virtual Int_t RooStats::MCMCInterval::GetNumBurnInSteps ( )
inlinevirtual

get the number of steps in the chain to discard as burn-in,

get the number of steps in the chain to discard as burn-in, starting from the first

Definition at line 179 of file MCMCInterval.h.

◆ GetParameters()

RooArgSet * MCMCInterval::GetParameters ( ) const
virtual

return a set containing the parameters of this interval the caller owns the returned RooArgSet*

Implements RooStats::ConfInterval.

Definition at line 1461 of file MCMCInterval.cxx.

◆ GetPosteriorHist()

TH1 * MCMCInterval::GetPosteriorHist ( )
virtual

set the number of bins to use (same for all axes, for now) virtual void SetNumBins(Int_t numBins);

Get a clone of the histogram of the posterior

Definition at line 1408 of file MCMCInterval.cxx.

◆ GetPosteriorKeysPdf()

RooNDKeysPdf * MCMCInterval::GetPosteriorKeysPdf ( )
virtual

Get a clone of the keys pdf of the posterior.

Definition at line 1425 of file MCMCInterval.cxx.

◆ GetPosteriorKeysProduct()

RooProduct * MCMCInterval::GetPosteriorKeysProduct ( )
virtual

Get a clone of the (keyspdf * heaviside) product of the posterior.

Definition at line 1442 of file MCMCInterval.cxx.

◆ GetUseKeys()

virtual Bool_t RooStats::MCMCInterval::GetUseKeys ( )
inlinevirtual

get whether we used kernel estimation to determine the interval

Definition at line 173 of file MCMCInterval.h.

◆ GetWeightVar()

virtual RooRealVar * RooStats::MCMCInterval::GetWeightVar ( ) const
inlinevirtual

Get a clone of the weight variable from the markov chain.

Definition at line 225 of file MCMCInterval.h.

◆ IsInInterval()

Bool_t MCMCInterval::IsInInterval ( const RooArgSet point) const
virtual

determine whether this point is in the confidence interval

kbelasco: for this method, consider running DetermineInterval() if fKeysPdf==NULL, fSparseHist==NULL, fDataHist==NULL, or fVector.size()==0 rather than just returning false.

Though this should not be an issue because nobody should be able to get an MCMCInterval that has their interval or posterior representation NULL/empty since they should only get this through the MCMCCalculator

Implements RooStats::ConfInterval.

Definition at line 229 of file MCMCInterval.cxx.

◆ LowerLimit()

Double_t MCMCInterval::LowerLimit ( RooRealVar param)
virtual

get the lowest value of param that is within the confidence interval

Definition at line 1006 of file MCMCInterval.cxx.

◆ LowerLimitByDataHist()

Double_t MCMCInterval::LowerLimitByDataHist ( RooRealVar param)
virtual

determine lower limit using histogram

Determine the lower limit for param on this interval using the binned data set.

Definition at line 1145 of file MCMCInterval.cxx.

◆ LowerLimitByHist()

Double_t MCMCInterval::LowerLimitByHist ( RooRealVar param)
virtual

determine lower limit using histogram

Determine the lower limit for param on this interval using the binned data set.

Definition at line 1080 of file MCMCInterval.cxx.

◆ LowerLimitByKeys()

Double_t MCMCInterval::LowerLimitByKeys ( RooRealVar param)
virtual

determine lower limit in the shortest interval by using keys pdf

Determine the lower limit for param on this interval using the keys pdf.

Definition at line 1258 of file MCMCInterval.cxx.

◆ LowerLimitBySparseHist()

Double_t MCMCInterval::LowerLimitBySparseHist ( RooRealVar param)
virtual

determine lower limit using histogram

Determine the lower limit for param on this interval using the binned data set.

Definition at line 1104 of file MCMCInterval.cxx.

◆ LowerLimitShortest()

Double_t MCMCInterval::LowerLimitShortest ( RooRealVar param)
virtual

get the lower limit of param in the shortest confidence interval Note that this works better for some distributions (ones with exactly one maximum) than others, and sometimes has little value.

Definition at line 1058 of file MCMCInterval.cxx.

◆ LowerLimitTailFraction()

Double_t MCMCInterval::LowerLimitTailFraction ( RooRealVar param)
virtual

determine lower limit of the lower confidence interval

Definition at line 1038 of file MCMCInterval.cxx.

◆ SetAxes()

void MCMCInterval::SetAxes ( RooArgList axes)
virtual

Set which parameters go on which axis.

The first list element goes on the x axis, second (if it exists) on y, third (if it exists) on z, etc

Definition at line 318 of file MCMCInterval.cxx.

◆ SetChain()

virtual void RooStats::MCMCInterval::SetChain ( MarkovChain chain)
inlinevirtual

Set the MarkovChain that this interval is based on.

Definition at line 93 of file MCMCInterval.h.

◆ SetConfidenceLevel()

void MCMCInterval::SetConfidenceLevel ( Double_t  cl)
virtual

set the desired confidence level (see GetActualConfidenceLevel()) Note: calling this function triggers the algorithm that determines the interval, so call this after initializing all other aspects of this IntervalCalculator Also, calling this function again with a different confidence level re-triggers the calculation of the interval

Implements RooStats::ConfInterval.

Definition at line 288 of file MCMCInterval.cxx.

◆ SetDelta()

virtual void RooStats::MCMCInterval::SetDelta ( Double_t  delta)
inlinevirtual

kbelasco: The inner-workings of the class really should not be exposed like this in a comment, but it seems to be the only way to give the user any control over this process, if they desire it

Set the fraction delta such that topCutoff (a) is considered == bottomCutoff (b) iff (TMath::Abs(a - b) < TMath::Abs(fDelta * (a + b)/2)) when determining the confidence interval by Keys

Definition at line 263 of file MCMCInterval.h.

◆ SetEpsilon()

virtual void RooStats::MCMCInterval::SetEpsilon ( Double_t  epsilon)
inlinevirtual

set the acceptable level or error for Keys interval determination

Definition at line 229 of file MCMCInterval.h.

◆ SetHistStrict()

virtual void RooStats::MCMCInterval::SetHistStrict ( Bool_t  isHistStrict)
inlinevirtual

whether the specified confidence level is a floor for the actual confidence level (strict), or a ceiling (not strict)

Definition at line 82 of file MCMCInterval.h.

◆ SetIntervalType()

virtual void RooStats::MCMCInterval::SetIntervalType ( enum IntervalType  intervalType)
inlinevirtual

Set the type of interval to find.

This will only have an effect for 1-D intervals. If is more than 1 parameter of interest, then a "shortest" interval will always be used, since it generalizes directly to N dimensions

Definition at line 242 of file MCMCInterval.h.

◆ SetLeftSideTailFraction()

virtual void RooStats::MCMCInterval::SetLeftSideTailFraction ( Double_t  a)
inlinevirtual

set the left-side tail fraction for a tail-fraction interval

Definition at line 250 of file MCMCInterval.h.

◆ SetNumBurnInSteps()

virtual void RooStats::MCMCInterval::SetNumBurnInSteps ( Int_t  numBurnInSteps)
inlinevirtual

set the number of steps in the chain to discard as burn-in, starting from the first

Definition at line 161 of file MCMCInterval.h.

◆ SetParameters()

void MCMCInterval::SetParameters ( const RooArgSet parameters)
virtual

Set the parameters of interest for this interval and change other internal data members accordingly.

Definition at line 564 of file MCMCInterval.cxx.

◆ SetShortestInterval()

virtual void RooStats::MCMCInterval::SetShortestInterval ( )
inlinevirtual

Definition at line 244 of file MCMCInterval.h.

◆ SetUseKeys()

virtual void RooStats::MCMCInterval::SetUseKeys ( Bool_t  useKeys)
inlinevirtual

set whether to use kernel estimation to determine the interval

Definition at line 165 of file MCMCInterval.h.

◆ SetUseSparseHist()

virtual void RooStats::MCMCInterval::SetUseSparseHist ( Bool_t  useSparseHist)
inlinevirtual

set whether to use a sparse histogram.

you MUST also call SetUseKeys(kFALSE) to use a histogram.

Definition at line 169 of file MCMCInterval.h.

◆ UpperLimit()

Double_t MCMCInterval::UpperLimit ( RooRealVar param)
virtual

get the highest value of param that is within the confidence interval

Definition at line 1022 of file MCMCInterval.cxx.

◆ UpperLimitByDataHist()

Double_t MCMCInterval::UpperLimitByDataHist ( RooRealVar param)
virtual

determine upper limit using histogram

Determine the upper limit for param on this interval using the binned data set.

Definition at line 1222 of file MCMCInterval.cxx.

◆ UpperLimitByHist()

Double_t MCMCInterval::UpperLimitByHist ( RooRealVar param)
virtual

determine upper limit using histogram

Determine the upper limit for param on this interval using the binned data set.

Definition at line 1092 of file MCMCInterval.cxx.

◆ UpperLimitByKeys()

Double_t MCMCInterval::UpperLimitByKeys ( RooRealVar param)
virtual

determine upper limit in the shortest interval by using keys pdf

Determine the upper limit for param on this interval using the keys pdf.

Definition at line 1298 of file MCMCInterval.cxx.

◆ UpperLimitBySparseHist()

Double_t MCMCInterval::UpperLimitBySparseHist ( RooRealVar param)
virtual

determine upper limit using histogram

Determine the upper limit for param on this interval using the binned data set.

Definition at line 1181 of file MCMCInterval.cxx.

◆ UpperLimitShortest()

Double_t MCMCInterval::UpperLimitShortest ( RooRealVar param)
virtual

get the upper limit of param in the confidence interval Note that this works better for some distributions (ones with exactly one maximum) than others, and sometimes has little value.

Definition at line 1068 of file MCMCInterval.cxx.

◆ UpperLimitTailFraction()

Double_t MCMCInterval::UpperLimitTailFraction ( RooRealVar param)
virtual

determine upper limit of the lower confidence interval

Definition at line 1048 of file MCMCInterval.cxx.

◆ WithinDeltaFraction()

Bool_t MCMCInterval::WithinDeltaFraction ( Double_t  a,
Double_t  b 
)
inlineprivate

Definition at line 1476 of file MCMCInterval.cxx.

Member Data Documentation

◆ fAxes

RooRealVar** RooStats::MCMCInterval::fAxes
protected

Definition at line 315 of file MCMCInterval.h.

◆ fChain

MarkovChain* RooStats::MCMCInterval::fChain
protected

Definition at line 279 of file MCMCInterval.h.

◆ fConfidenceLevel

Double_t RooStats::MCMCInterval::fConfidenceLevel
protected

Definition at line 280 of file MCMCInterval.h.

◆ fCutoffVar

RooRealVar* RooStats::MCMCInterval::fCutoffVar
protected

Definition at line 291 of file MCMCInterval.h.

◆ fDataHist

RooDataHist* RooStats::MCMCInterval::fDataHist
protected

Definition at line 282 of file MCMCInterval.h.

◆ fDelta

Double_t RooStats::MCMCInterval::fDelta
protected

Definition at line 321 of file MCMCInterval.h.

◆ fDimension

Int_t RooStats::MCMCInterval::fDimension
protected

Definition at line 311 of file MCMCInterval.h.

◆ fEpsilon

Double_t RooStats::MCMCInterval::fEpsilon
protected

Definition at line 319 of file MCMCInterval.h.

◆ fFull

Double_t RooStats::MCMCInterval::fFull
protected

Definition at line 294 of file MCMCInterval.h.

◆ fHeaviside

Heaviside* RooStats::MCMCInterval::fHeaviside
protected

Definition at line 289 of file MCMCInterval.h.

◆ fHist

TH1* RooStats::MCMCInterval::fHist
protected

Definition at line 303 of file MCMCInterval.h.

◆ fHistConfLevel

Double_t RooStats::MCMCInterval::fHistConfLevel
protected

Definition at line 284 of file MCMCInterval.h.

◆ fHistCutoff

Double_t RooStats::MCMCInterval::fHistCutoff
protected

Definition at line 285 of file MCMCInterval.h.

◆ fIntervalType

enum IntervalType RooStats::MCMCInterval::fIntervalType
protected

Definition at line 326 of file MCMCInterval.h.

◆ fIsHistStrict

Bool_t RooStats::MCMCInterval::fIsHistStrict
protected

Definition at line 307 of file MCMCInterval.h.

◆ fKeysConfLevel

Double_t RooStats::MCMCInterval::fKeysConfLevel
protected

Definition at line 292 of file MCMCInterval.h.

◆ fKeysCutoff

Double_t RooStats::MCMCInterval::fKeysCutoff
protected

Definition at line 293 of file MCMCInterval.h.

◆ fKeysDataHist

RooDataHist* RooStats::MCMCInterval::fKeysDataHist
protected

Definition at line 290 of file MCMCInterval.h.

◆ fKeysPdf

RooNDKeysPdf* RooStats::MCMCInterval::fKeysPdf
protected

Definition at line 287 of file MCMCInterval.h.

◆ fLeftSideTF

Double_t RooStats::MCMCInterval::fLeftSideTF
protected

Definition at line 296 of file MCMCInterval.h.

◆ fNumBurnInSteps

Int_t RooStats::MCMCInterval::fNumBurnInSteps
protected

Definition at line 312 of file MCMCInterval.h.

◆ fParameters

RooArgSet RooStats::MCMCInterval::fParameters
protected

Definition at line 278 of file MCMCInterval.h.

◆ fProduct

RooProduct* RooStats::MCMCInterval::fProduct
protected

Definition at line 288 of file MCMCInterval.h.

◆ fSparseHist

THnSparse* RooStats::MCMCInterval::fSparseHist
protected

Definition at line 283 of file MCMCInterval.h.

◆ fTFConfLevel

Double_t RooStats::MCMCInterval::fTFConfLevel
protected

Definition at line 297 of file MCMCInterval.h.

◆ fTFLower

Double_t RooStats::MCMCInterval::fTFLower
protected

Definition at line 300 of file MCMCInterval.h.

◆ fTFUpper

Double_t RooStats::MCMCInterval::fTFUpper
protected

Definition at line 301 of file MCMCInterval.h.

◆ fUseKeys

Bool_t RooStats::MCMCInterval::fUseKeys
protected

Definition at line 305 of file MCMCInterval.h.

◆ fUseSparseHist

Bool_t RooStats::MCMCInterval::fUseSparseHist
protected

Definition at line 306 of file MCMCInterval.h.

◆ fVector

std::vector<Int_t> RooStats::MCMCInterval::fVector
protected

Definition at line 298 of file MCMCInterval.h.

◆ fVecWeight

Double_t RooStats::MCMCInterval::fVecWeight
protected

Definition at line 299 of file MCMCInterval.h.

Libraries for RooStats::MCMCInterval:

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