50 void 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();
84 void 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();
123 void 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();
171 void 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");
static constexpr double pi
RooCmdArg LineColor(Color_t color)
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none(), const RooCmdArg &arg9=RooCmdArg::none(), const RooCmdArg &arg10=RooCmdArg::none()) const
Plot (project) PDF on specified frame.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
RooDataSet is a container class to hold N-dimensional binned data.
RooCmdArg LineStyle(Style_t style)
RooCmdArg ExpectedData(Bool_t flag=kTRUE)
virtual Double_t Determinant() const
virtual void Draw(Option_t *option="")
Draw this histogram with options.
RooCmdArg SumW2Error(Bool_t flag)
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
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 Save(Bool_t flag=kTRUE)
RooGenericPdf is a concrete implementation of a probability density function, which takes a RooArgLis...
The RooWorkspace is a persistable container for RooFit projects.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooCmdArg Binning(const RooAbsBinning &binning)