ROOT » ROOFIT » ROOSTATS » RooStats::MCMCCalculator

class RooStats::MCMCCalculator: public RooStats::IntervalCalculator, public TNamed


MCMCCalculator is a concrete implementation of IntervalCalculator. It uses a MetropolisHastings object to construct a Markov Chain of data points in the parameter space. From this Markov Chain, this class can generate a MCMCInterval as per user specification.

The interface allows one to pass the model, data, and parameters via a workspace and then specify them with names.

After configuring the calculator, one only needs to ask GetInterval(), which will return an ConfInterval (MCMCInterval in this case).



Function Members (Methods)

public:
virtual~MCMCCalculator()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Double_tConfidenceLevel() const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual RooStats::MCMCInterval*GetInterval() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
RooStats::IntervalCalculatorRooStats::IntervalCalculator::IntervalCalculator()
RooStats::IntervalCalculatorRooStats::IntervalCalculator::IntervalCalculator(const RooStats::IntervalCalculator&)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
RooStats::MCMCCalculatorMCMCCalculator()
RooStats::MCMCCalculatorMCMCCalculator(const RooStats::MCMCCalculator&)
RooStats::MCMCCalculatorMCMCCalculator(RooAbsData& data, const RooStats::ModelConfig& model)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
RooStats::MCMCCalculator&operator=(const RooStats::MCMCCalculator&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidSetAxes(RooArgList& axes)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetChainParameters(const RooArgSet& set)
virtual voidSetConditionalObservables(const RooArgSet& set)
virtual voidSetConfidenceLevel(Double_t cl)
virtual voidSetData(RooAbsData& data)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetIntervalType(RooStats::MCMCInterval::IntervalType intervalType)
virtual voidSetKeysConfidenceAccuracy(Double_t epsilon)
virtual voidSetKeysTerminationThreshold(Double_t delta)
virtual voidSetLeftSideTailFraction(Double_t a)
virtual voidSetModel(const RooStats::ModelConfig& model)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
virtual voidSetNuisanceParameters(const RooArgSet& set)
virtual voidSetNumBins(Int_t numBins)
virtual voidSetNumBurnInSteps(Int_t numBurnInSteps)
virtual voidSetNumIters(Int_t numIters)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetParameters(const RooArgSet& set)
virtual voidSetPdf(RooAbsPdf& pdf)
virtual voidSetPriorPdf(RooAbsPdf& pdf)
virtual voidSetProposalFunction(RooStats::ProposalFunction& proposalFunction)
virtual voidSetTestSize(Double_t size)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetUseKeys(Bool_t useKeys)
virtual voidSetUseSparseHist(Bool_t useSparseHist)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Double_tSize() const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
voidSetBins(const RooAbsCollection& coll, Int_t numBins) const
voidSetupBasicUsage()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
RooArgList*fAxeswhich variables to put on each axis
RooArgSetfChainParamsparameters to store in the chain (if not specified they are all of them )
RooArgSetfConditionalObsconditional observables
RooAbsData*fDatapointer to the data (owned by the workspace)
Double_tfDeltaacceptable error for Keys cutoffs being equal
Double_tfEpsilonacceptable error for Keys interval determination
RooStats::MCMCInterval::IntervalTypefIntervalTypetype of interval to find
Double_tfLeftSideTFleft side tail-fraction for interval
TStringTNamed::fNameobject identifier
RooArgSetfNuisParamsnuisance parameters for interval (not really used)
Int_tfNumBinsset the number of bins to create for each
Int_tfNumBurnInStepsnumber of iterations to discard as burn-in, starting from the first
Int_tfNumItersnumber of iterations to run metropolis algorithm
RooArgSetfPOIparameters of interest for interval
RooAbsPdf*fPdfpointer to common PDF (owned by the workspace)
RooAbsPdf*fPriorPdfpointer to prior PDF (owned by the workspace)
RooStats::ProposalFunction*fPropFuncProposal function for MCMC integration
Double_tfSizesize of the test (eg. specified rate of Type I error)
TStringTNamed::fTitleobject title
Bool_tfUseKeyswhether to use kernel estimation to determine interval
Bool_tfUseSparseHistwhether to use sparse histogram (if using hist at all)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

MCMCCalculator()
MCMCCalculator(RooAbsData& data, const RooStats::ModelConfig& model)
void SetModel(const RooStats::ModelConfig& model)
 set the model
void SetupBasicUsage()
void SetLeftSideTailFraction(Double_t a)
MCMCInterval* GetInterval() const
 Main interface to get a RooStats::ConfInterval.
MCMCCalculator()
 default constructor
virtual ~MCMCCalculator()
{}
Double_t Size() const
 Get the size of the test (eg. rate of Type I error)
{return fSize;}
Double_t ConfidenceLevel() const
 Get the Confidence level for the test
{return 1.-fSize;}
void SetData(RooAbsData& data)
 Set the DataSet if not already there
{ fData = &data; }
void SetPdf(RooAbsPdf& pdf)
 Set the Pdf if not already there
{ fPdf = &pdf; }
void SetPriorPdf(RooAbsPdf& pdf)
 Set the Prior Pdf if not already there
{ fPriorPdf = &pdf; }
void SetParameters(const RooArgSet& set)
 specify the parameters of interest in the interval
{ fPOI.removeAll(); fPOI.add(set); }
void SetChainParameters(const RooArgSet& set)
 specify the parameters to store in the Markov chain
 By default all the parameters are stored
void SetNuisanceParameters(const RooArgSet& set)
 specify the nuisance parameters (eg. the rest of the parameters)
void SetConditionalObservables(const RooArgSet& set)
 set the conditional observables which will be used when creating the NLL
 so the pdf's will not be normalized on the conditional observables when computing the NLL
void SetTestSize(Double_t size)
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
{fSize = size;}
void SetConfidenceLevel(Double_t cl)
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{fSize = 1.-cl;}
void SetProposalFunction(RooStats::ProposalFunction& proposalFunction)
 set the proposal function for suggesting new points for the MCMC
{ fPropFunc = &proposalFunction; }
void SetNumIters(Int_t numIters)
 set the number of iterations to run the metropolis algorithm
{ fNumIters = numIters; }
void SetNumBurnInSteps(Int_t numBurnInSteps)
 set the number of steps in the chain to discard as burn-in,
 starting from the first
{ fNumBurnInSteps = numBurnInSteps; }
void SetNumBins(Int_t numBins)
 set the number of bins to create for each axis when constructing the interval
{ fNumBins = numBins; }
void SetAxes(RooArgList& axes)
 set which variables to put on each axis
{ fAxes = &axes; }
void SetUseKeys(Bool_t useKeys)
 set whether to use kernel estimation to determine the interval
{ fUseKeys = useKeys; }
void SetUseSparseHist(Bool_t useSparseHist)
 set whether to use sparse histogram (if using histogram at all)
{ fUseSparseHist = useSparseHist; }
void SetIntervalType(RooStats::MCMCInterval::IntervalType intervalType)
 set what type of interval to have the MCMCInterval represent
{ fIntervalType = intervalType; }
void SetKeysConfidenceAccuracy(Double_t epsilon)
 Set the desired level of confidence-level accuracy  for Keys interval
 determination.

 When determining the cutoff PDF height that gives the
 desired confidence level (C_d), the algorithm will consider acceptable
 any found confidence level c such that Abs(c - C_d) < epsilon.

 Any value of this "epsilon" > 0 is considered acceptable, though it is
 advisable to not use a value too small, because the integration of the
 Keys PDF sometimes does not have extremely high accuracy.
void SetKeysTerminationThreshold(Double_t delta)
 When the shortest interval using Keys PDF could not be found to have
 the desired confidence level +/- the accuracy (see
 SetKeysConfidenceAccuracy()), the interval determination algorithm
 will have to terminate with an unsatisfactory confidence level when
 the bottom and top of the cutoff search range are very close to being
 equal.  This scenario comes into play when there seems to be an error
 in the accuracy of the Keys PDF integration, so the search range
 continues to shrink without converging to a cutoff value that will
 give an acceptable confidence level.  To choose how small to allow the
 search range to be before terminating, set the fraction delta such
 that the search will terminate when topCutoff (a) and bottomCutoff (b)
 satisfy this condition:

 TMath::Abs(a - b) < TMath::Abs(delta * (a + b)/2)
void SetBins(const RooAbsCollection& coll, Int_t numBins) const