52void rs302_JeffreysPriorDemo()
55 w.factory(
"Uniform::u(x[0,1])");
56 w.factory(
"mu[100,1,200]");
57 w.factory(
"ExtendPdf::p(u,mu)");
66 cout <<
"variance = " << (cov.
Determinant()) << endl;
71 w.defineSet(
"poi",
"mu");
72 w.defineSet(
"obs",
"x");
85 auto legend =
plot->BuildLegend();
90void TestJeffreysGaussMean()
93 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5.,5],sigma[1,0,10])");
94 w.factory(
"n[10,.1,200]");
95 w.factory(
"ExtendPdf::p(g,n)");
96 w.var(
"sigma")->setConstant();
97 w.var(
"n")->setConstant();
106 cout <<
"variance = " << (cov.
Determinant()) << endl;
111 w.defineSet(
"poi",
"mu");
112 w.defineSet(
"obs",
"x");
117 pi.getParameters(*temp)->
Print();
128 auto legend =
plot->BuildLegend();
133void TestJeffreysGaussSigma()
141 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1,5])");
142 w.factory(
"n[100,.1,2000]");
143 w.factory(
"ExtendPdf::p(g,n)");
145 w.var(
"mu")->setConstant();
146 w.var(
"n")->setConstant();
147 w.var(
"x")->setBins(301);
156 cout <<
"variance = " << (cov.
Determinant()) << endl;
161 w.defineSet(
"poi",
"sigma");
162 w.defineSet(
"obs",
"x");
167 pi.getParameters(*temp)->
Print();
177 auto legend =
plot->BuildLegend();
182void TestJeffreysGaussMeanAndSigma()
190 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1.,5.])");
191 w.factory(
"n[100,.1,2000]");
192 w.factory(
"ExtendPdf::p(g,n)");
194 w.var(
"n")->setConstant();
195 w.var(
"x")->setBins(301);
204 cout <<
"variance = " << (cov.
Determinant()) << endl;
209 w.defineSet(
"poi",
"mu,sigma");
210 w.defineSet(
"obs",
"x");
215 pi.getParameters(*temp)->
Print();
219 TH1 *Jeff2d = pi.createHistogram(
"2dJeffreys", *
w.var(
"mu"),
Binning(10, -5., 5),
YVar(*
w.var(
"sigma"),
Binning(10, 1., 5.)));
220 Jeff2d->
Draw(
"surf");
winID h TVirtualViewer3D TVirtualGLPainter char TVirtualGLPainter plot
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
The RooDataHist is a container class to hold N-dimensional binned data.
RooGenericPdf is a concrete implementation of a probability density function, which takes a RooArgLis...
Implementation of Jeffrey's prior.
A RooPlot is a plot frame and a container for graphics objects within that frame.
The RooWorkspace is a persistable container for RooFit projects.
TH1 is the base class of all histogram classes in ROOT.
void Draw(Option_t *option="") override
Draw this histogram with options.
Double_t Determinant() const override
TMatrixTSym< Element > & Invert(Double_t *det=nullptr)
Invert the matrix and calculate its determinant Notice that the LU decomposition is used instead of B...
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg Save(bool flag=true)
RooCmdArg SumW2Error(bool flag)
RooCmdArg ExpectedData(bool flag=true)
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg LineColor(Color_t color)
RooCmdArg LineStyle(Style_t style)
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...