27 void rs701_BayesianCalculator(
bool useBkg =
true,
double confLevel = 0.90)
32 w->
factory(
"SUM::pdf(s[0.001,15]*Uniform(x[0,1]),b[1,0,2]*Uniform(x))");
33 w->
factory(
"Gaussian::prior_b(b,1,1)");
34 w->
factory(
"PROD::model(pdf,prior_b)");
53 if (useBkg) nuisPar = &nuisanceParameters;
56 double size = 1.-confLevel;
57 std::cout <<
"\nBayesian Result using a Flat prior " << std::endl;
59 bcalc.SetTestSize(size);
62 std::cout << cl <<
"% CL central interval: [ " << interval->
LowerLimit() <<
" - " << interval->
UpperLimit()
64 << cl+(1.-cl)/2 <<
"% CL limits\n";
65 RooPlot * plot = bcalc.GetPosteriorPlot();
72 std::cout <<
"\nBayesian Result using a 1/sqrt(s) prior " << std::endl;
74 bcalc2.SetTestSize(size);
77 std::cout << cl <<
"% CL central interval: [ " << interval2->
LowerLimit() <<
" - " << interval2->
UpperLimit()
79 << cl+(1.-cl)/2 <<
"% CL limits\n";
81 RooPlot * plot2 = bcalc2.GetPosteriorPlot();
virtual void Draw(Option_t *option="")=0
Default Draw method for all objects.
Double_t getVal(const RooArgSet *set=0) const
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
static RooMsgService & instance()
Return reference to singleton instance.
virtual Double_t LowerLimit()
virtual Double_t ConfidenceLevel() const
return confidence level
void setGlobalKillBelow(RooFit::MsgLevel level)
RooDataSet is a container class to hold unbinned data.
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
Namespace for the RooStats classes.
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
RooRealVar * var(const char *name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found...
RooFactoryWSTool & factory()
Return instance to factory tool.
virtual Double_t UpperLimit()
SimpleInterval is a concrete implementation of the ConfInterval interface.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
virtual void Update()
Update canvas pad buffers.
BayesianCalculator is a concrete implementation of IntervalCalculator, providing the computation of a...
The RooWorkspace is a persistable container for RooFit projects.