22 using namespace RooFit;
23 using namespace RooStats;
30 w->
factory(
"SUM::pdf(s[0.001,15]*Uniform(x[0,1]),b[1,0,2]*Uniform(x))");
31 w->
factory(
"Gaussian::prior_b(b,1,1)");
32 w->
factory(
"PROD::model(pdf,prior_b)");
51 if (useBkg) nuisPar = &nuisanceParameters;
54 double size = 1.-confLevel;
55 std::cout <<
"\nBayesian Result using a Flat prior " << std::endl;
60 std::cout << cl <<
"% CL central interval: [ " << interval->
LowerLimit() <<
" - " << interval->
UpperLimit()
62 << cl+(1.-cl)/2 <<
"% CL limits\n";
64 TCanvas *
c1 =
new TCanvas(
"c1",
"Bayesian Calculator Result");
70 std::cout <<
"\nBayesian Result using a 1/sqrt(s) prior " << std::endl;
75 std::cout << cl <<
"% CL central interval: [ " << interval2->
LowerLimit() <<
" - " << interval2->
UpperLimit()
77 << cl+(1.-cl)/2 <<
"% CL limits\n";
RooPlot * GetPosteriorPlot(bool norm=false, double precision=0.01) const
get the plot with option to get it normalized
static RooMsgService & instance()
Return reference to singleton instance.
virtual SimpleInterval * GetInterval() const
compute the interval.
void plot(TString fname="data.root", TString var0="var0", TString var1="var1")
RooAbsPdf * pdf(const char *name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
virtual Double_t LowerLimit()
Double_t getVal(const RooArgSet *set=0) const
void setGlobalKillBelow(RooFit::MsgLevel level)
virtual Double_t ConfidenceLevel() const
Get the Confidence level for the test.
RooDataSet is a container class to hold unbinned data.
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set...
RooRealVar * var(const char *name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found...
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
RooFactoryWSTool & factory()
Return instance to factory tool.
virtual void SetTestSize(Double_t size)
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval) ...
virtual Double_t UpperLimit()
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...
BayesianCalculator is a concrete implementation of IntervalCalculator, providing the computation of a...
The RooWorkspace is a persistable container for RooFit projects.
void rs701_BayesianCalculator(bool useBkg=true, double confLevel=0.90)
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.