50void JeffreysPriorDemo(){
52 w.factory(
"Uniform::u(x[0,1])");
53 w.factory(
"mu[100,1,200]");
54 w.factory(
"ExtendPdf::p(u,mu)");
63 cout <<
"variance = " << (cov.
Determinant()) << endl;
68 w.defineSet(
"poi",
"mu");
69 w.defineSet(
"obs",
"x");
76 RooPlot* plot = w.var(
"mu")->frame();
84void TestJeffreysGaussMean(){
86 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,0,10])");
87 w.factory(
"n[10,.1,200]");
88 w.factory(
"ExtendPdf::p(g,n)");
89 w.var(
"sigma")->setConstant();
90 w.var(
"n")->setConstant();
99 cout <<
"variance = " << (cov.
Determinant()) << endl;
104 w.defineSet(
"poi",
"mu");
105 w.defineSet(
"obs",
"x");
110 pi.getParameters(*temp)->Print();
116 RooPlot* plot = w.var(
"mu")->frame();
123void TestJeffreysGaussSigma(){
130 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1,5])");
131 w.factory(
"n[100,.1,2000]");
132 w.factory(
"ExtendPdf::p(g,n)");
134 w.var(
"mu")->setConstant();
135 w.var(
"n")->setConstant();
136 w.var(
"x")->setBins(301);
145 cout <<
"variance = " << (cov.
Determinant()) << endl;
150 w.defineSet(
"poi",
"sigma");
151 w.defineSet(
"obs",
"x");
154 pi.specialIntegratorConfig(
kTRUE)->getConfigSection(
"RooIntegrator1D").setRealValue(
"maxSteps",3);
157 pi.getParameters(*temp)->Print();
162 RooPlot* plot = w.var(
"sigma")->frame();
171void TestJeffreysGaussMeanAndSigma(){
178 w.factory(
"Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1,5])");
179 w.factory(
"n[100,.1,2000]");
180 w.factory(
"ExtendPdf::p(g,n)");
182 w.var(
"n")->setConstant();
183 w.var(
"x")->setBins(301);
192 cout <<
"variance = " << (cov.
Determinant()) << endl;
197 w.defineSet(
"poi",
"mu,sigma");
198 w.defineSet(
"obs",
"x");
201 pi.specialIntegratorConfig(
kTRUE)->getConfigSection(
"RooIntegrator1D").setRealValue(
"maxSteps",3);
204 pi.getParameters(*temp)->Print();
209 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.
RooDataSet 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...
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