72 wspace->
factory(
"Gaussian::normal(x[-10,10],mu[-1,1],sigma[1])");
79 modelConfig->
SetPdf(*wspace->
pdf(
"normal"));
92 double confidenceLevel = 0.95;
96 plc.SetConfidenceLevel(confidenceLevel);
101 fc.SetConfidenceLevel(confidenceLevel);
103 fc.UseAdaptiveSampling(
true);
107 fc.FluctuateNumDataEntries(
false);
119 wspace->
factory(
"Uniform::prior(mu)");
124 bc.SetConfidenceLevel(confidenceLevel);
129 mc.SetConfidenceLevel(confidenceLevel);
132 mc.SetNumBurnInSteps(500);
133 mc.SetNumIters(100000);
134 mc.SetLeftSideTailFraction(0.5);
144 std::cout <<
"expected interval is [" << expectedLL <<
", " << expectedUL <<
"]" << endl;
146 cout <<
"plc interval is [" << plInt->
LowerLimit(*mu) <<
", " << plInt->
UpperLimit(*mu) <<
"]" << endl;
148 std::cout <<
"fc interval is [" << interval->
LowerLimit(*mu) <<
" , " << interval->
UpperLimit(*mu) <<
"]" << endl;
150 cout <<
"bc interval is [" << bcInt->
LowerLimit() <<
", " << bcInt->
UpperLimit() <<
"]" << endl;
152 cout <<
"mc interval is [" << mcInt->
LowerLimit(*mu) <<
", " << mcInt->
UpperLimit(*mu) <<
"]" << endl;
192 RooPlot *bcPlot = bc.GetPosteriorPlot();
winID h TVirtualViewer3D TVirtualGLPainter char TVirtualGLPainter plot
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
R__EXTERN TStyle * gStyle
RooFit::OwningPtr< RooDataSet > generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooDataSet is a container class to hold unbinned data.
A RooPlot is a plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
RooRealVar represents a variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.
BayesianCalculator is a concrete implementation of IntervalCalculator, providing the computation of a...
The FeldmanCousins class (like the Feldman-Cousins technique) is essentially a specific configuration...
This class provides simple and straightforward utilities to plot a LikelihoodInterval object.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
double UpperLimit(const RooRealVar ¶m)
return the upper bound of the interval on a given parameter
double LowerLimit(const RooRealVar ¶m)
return the lower bound of the interval on a given parameter
bool IsInInterval(const RooArgSet &) const override
check if given point is in the interval
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
This class provides simple and straightforward utilities to plot a MCMCInterval object.
void SetLineColor(Color_t color)
void Draw(const Option_t *options=nullptr) override
void SetLineWidth(Int_t width)
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
virtual double UpperLimit(RooRealVar ¶m)
get the highest value of param that is within the confidence interval
virtual double LowerLimit(RooRealVar ¶m)
get the lowest value of param that is within the confidence interval
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
virtual void SetObservables(const RooArgSet &set)
Specify the observables.
virtual void SetPriorPdf(const RooAbsPdf &pdf)
Set the Prior Pdf, add to the workspace if not already there.
virtual void SetWorkspace(RooWorkspace &ws)
virtual void SetParametersOfInterest(const RooArgSet &set)
Specify parameters of interest.
virtual void SetPdf(const RooAbsPdf &pdf)
Set the Pdf, add to the workspace if not already there.
PointSetInterval is a concrete implementation of the ConfInterval interface.
double UpperLimit(RooRealVar ¶m)
return upper limit on a given parameter
double LowerLimit(RooRealVar ¶m)
return lower limit on a given parameter
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
SimpleInterval is a concrete implementation of the ConfInterval interface.
virtual double UpperLimit()
return the interval upper limit
virtual double LowerLimit()
return the interval lower limit
The RooWorkspace is a persistable container for RooFit projects.
RooAbsPdf * pdf(RooStringView name) const
Retrieve p.d.f (RooAbsPdf) with given name. A null pointer is returned if not found.
const RooArgSet * set(RooStringView name)
Return pointer to previously defined named set with given nmame If no such set is found a null pointe...
RooFactoryWSTool & factory()
Return instance to factory tool.
RooRealVar * var(RooStringView name) const
Retrieve real-valued variable (RooRealVar) with given name. A null pointer is returned if not found.
bool defineSet(const char *name, const RooArgSet &aset, bool importMissing=false)
Define a named RooArgSet with given constituents.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void Update() override
Update canvas pad buffers.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Stop()
Stop the stopwatch.
void Print(Option_t *option="") const override
Print the real and cpu time passed between the start and stop events.
void SetPadBorderMode(Int_t mode=1)
void SetFrameFillColor(Color_t color=1)
void SetCanvasColor(Color_t color=19)
void SetCanvasBorderMode(Int_t mode=1)
void SetTitleFillColor(Color_t color=1)
void SetStatColor(Color_t color=19)
void SetPadColor(Color_t color=19)
double normal_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
double normal_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.