ROOT logo
ROOT » ROOFIT » ROOSTATS » RooStats::BayesianCalculator

class RooStats::BayesianCalculator: public RooStats::IntervalCalculator, public TNamed

   BayesianCalculator is a concrete implementation of IntervalCalculator.
   It computes the posterior probability density functions using the
   numerical (or analytical integration) for integrating the product of the
   likelihood and prior functions (Bayes theorem).
   The class works only for problems with only one parameter of interest,
   the posterior is a one-dimensional function
   The class computes via  GetInterval() the central Bayesian credible intervals

   Note: when nuisance parameters are present a multi-dimensional integration is
   needed. In some cases, when the integration must be performed numerically, evaluating the posterior or
   getting the interval (calling GetInterval) can result in long execution time.
   In these case using the MCMCCalculator could be more convenient

Function Members (Methods)

voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
RooStats::BayesianCalculatorBayesianCalculator(const RooStats::BayesianCalculator&)
RooStats::BayesianCalculatorBayesianCalculator(RooAbsData& data, RooStats::ModelConfig& model)
RooStats::BayesianCalculatorBayesianCalculator(RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& POI, RooAbsPdf& priorPOI, const RooArgSet* nuisanceParameters = 0)
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::SimpleInterval*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
RooAbsPdf*GetPosteriorPdf() const
RooPlot*GetPosteriorPlot() 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
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
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static 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::BayesianCalculator&operator=(const RooStats::BayesianCalculator&)
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(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetConfidenceLevel(Double_t cl)
virtual voidSetData(RooAbsData& data)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetModel(const RooStats::ModelConfig& model)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetTestSize(Double_t size)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Double_tSize() const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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
voidClearAll() const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
RooArgSet*GetMode(RooArgSet* parameters) const

Data Members

TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
RooStats::SimpleInterval*fIntervalcached pointer to resulting interval
doublefSizesize used for getting the interval

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

 default constructor. Need to call the Setter methods afterwards
BayesianCalculator( /* const char* name, const char* title, */ RooAbsData& data, RooAbsPdf& pdf, const RooArgSet& POI, RooAbsPdf& priorPOI, const RooArgSet* nuisanceParameters )
TNamed( TString(name), TString(title) ),
 constructor from data set, model pdf, set with the parameter of interest
 (must contain only one parameter for the moment) and prior pdf
 Optionally an additional set of parameters can be specified (nuisance parameters)
 which will be integrated (marginalized) when creating the posterior pdf.
 A default size of 0.05 is used (for 95% CL interval)
BayesianCalculator(RooAbsData& data, RooStats::ModelConfig& model)
 Same constructor but from data and a ModelConfig describing the model pdf and the prior, the parameter
 of interest and the nuisance parameters
 destructor cleaning all managed objects
void ClearAll() const
 clear cached pdf objects (posterior pdf, Likelihood, NLL, etc.)
void SetModel(const RooStats::ModelConfig& model)
 set the model configuration
RooArgSet* GetMode(RooArgSet* parameters) const
 return the mode (not yet implemented) but can be easly obtained from
RooAbsPdf* GetPosteriorPdf() const
 get the posterior pdf as a RooAbsPdf
 the posterior is obtained from the product of the likelihood function and the
 prior pdf which is then intergated in the nuisance parameters (if existing).
 A prior function for the nuisance can be specified either in the prior pdf object
 or in the model itself. If no prior nuisance is specified, but prior parameters are then
 the integration is performed assuming a flat prior for the nuisance parameters.
RooPlot* GetPosteriorPlot() const
 return a RooPlot with the posterior PDF and the credibility region
SimpleInterval* GetInterval() const
 returns a SimpleInterval with the lower/upper limit on
 the scanned variable (the parameter of interest specified in the constructor).
 The returned interval is a central interval with the confidence level specified
 previously in SetConfidenceLevel (default is 0.95).
 NOTE1: for finding only an upper/lower limit of 95 % the CL must be set to 0.90
 NOTE2: The method can result very slow when nuisance parameters are present due to
        the time needed for performing multi-dimensional numerical integration.
        In these case using the MCMCCalculator could be more convenient.
void SetData(RooAbsData& data)
{ fData = &data; }
void SetTestSize(Double_t size)
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
void SetConfidenceLevel(Double_t cl)
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{ SetTestSize(1.-cl); }
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; }