50void JeffreysPriorDemo()
53 w.factory(
"Uniform::u(x[0,1])");
54 w.factory(
"mu[100,1,200]");
55 w.factory(
"ExtendPdf::p(u,mu)");
64 cout <<
"variance = " << (cov.
Determinant()) << endl;
69 w.defineSet(
"poi",
"mu");
70 w.defineSet(
"obs",
"x");
72 RooJeffreysPrior pi(
"jeffreys",
"jeffreys", *w.pdf(
"p"), *w.set(
"poi"), *w.set(
"obs"));
77 RooPlot *plot = w.var(
"mu")->frame();
84void TestJeffreysGaussMean()
87 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,0,10])");
88 w.factory(
"n[10,.1,200]");
89 w.factory(
"ExtendPdf::p(g,n)");
90 w.var(
"sigma")->setConstant();
91 w.var(
"n")->setConstant();
100 cout <<
"variance = " << (cov.
Determinant()) << endl;
105 w.defineSet(
"poi",
"mu");
106 w.defineSet(
"obs",
"x");
108 RooJeffreysPrior pi(
"jeffreys",
"jeffreys", *w.pdf(
"p"), *w.set(
"poi"), *w.set(
"obs"));
111 pi.getParameters(*temp)->Print();
117 RooPlot *plot = w.var(
"mu")->frame();
124void TestJeffreysGaussSigma()
132 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1,5])");
133 w.factory(
"n[100,.1,2000]");
134 w.factory(
"ExtendPdf::p(g,n)");
136 w.var(
"mu")->setConstant();
137 w.var(
"n")->setConstant();
138 w.var(
"x")->setBins(301);
147 cout <<
"variance = " << (cov.
Determinant()) << endl;
152 w.defineSet(
"poi",
"sigma");
153 w.defineSet(
"obs",
"x");
155 RooJeffreysPrior pi(
"jeffreys",
"jeffreys", *w.pdf(
"p"), *w.set(
"poi"), *w.set(
"obs"));
156 pi.specialIntegratorConfig(
kTRUE)->getConfigSection(
"RooIntegrator1D").setRealValue(
"maxSteps", 3);
159 pi.getParameters(*temp)->Print();
164 RooPlot *plot = w.var(
"sigma")->frame();
171void TestJeffreysGaussMeanAndSigma()
179 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1,5])");
180 w.factory(
"n[100,.1,2000]");
181 w.factory(
"ExtendPdf::p(g,n)");
183 w.var(
"n")->setConstant();
184 w.var(
"x")->setBins(301);
193 cout <<
"variance = " << (cov.
Determinant()) << endl;
198 w.defineSet(
"poi",
"mu,sigma");
199 w.defineSet(
"obs",
"x");
201 RooJeffreysPrior pi(
"jeffreys",
"jeffreys", *w.pdf(
"p"), *w.set(
"poi"), *w.set(
"obs"));
202 pi.specialIntegratorConfig(
kTRUE)->getConfigSection(
"RooIntegrator1D").setRealValue(
"maxSteps", 3);
205 pi.getParameters(*temp)->Print();
210 Jeff2d->
Draw(
"surf");
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
The RooDataHist is a container class to hold N-dimensional binned data.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
RooGenericPdf is a concrete implementation of a probability density function, which takes a RooArgLis...
A RooPlot is a plot frame and a container for graphics objects within that frame.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
The RooWorkspace is a persistable container for RooFit projects.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual Double_t Determinant() const
TMatrixTSym< Element > & Invert(Double_t *det=0)
Invert the matrix and calculate its determinant Notice that the LU decomposition is used instead of B...
Template specialisation used in RooAbsArg:
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg SumW2Error(Bool_t flag)
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg ExpectedData(Bool_t flag=kTRUE)
RooCmdArg LineColor(Color_t color)
RooCmdArg LineStyle(Style_t style)
static constexpr double pi