Jeffreys's prior is an 'objective prior' based on formal rules. It is calculated from the Fisher information matrix.
The analytic form is not known for most PDFs, but it is for simple cases like the Poisson mean, Gaussian mean, Gaussian sigma.
This class uses numerical tricks to calculate the Fisher Information Matrix efficiently. In particular, it takes advantage of a property of the 'Asimov data' as described in Asymptotic formulae for likelihood-based tests of new physics Glen Cowan, Kyle Cranmer, Eilam Gross, Ofer Vitells http://arxiv.org/abs/arXiv:1007.1727
void JeffreysPriorDemo()
{
w.factory("Uniform::u(x[0,1])");
w.factory("mu[100,1,200]");
w.factory("ExtendPdf::p(u,mu)");
w.defineSet("poi", "mu");
w.defineSet("obs", "x");
*w.set("poi"));
legend->DrawClone();
}
void TestJeffreysGaussMean()
{
w.factory("Gaussian::g(x[0,-20,20],mu[0,-5.,5],sigma[1,0,10])");
w.factory("n[10,.1,200]");
w.factory("ExtendPdf::p(g,n)");
w.var("sigma")->setConstant();
w.var("n")->setConstant();
w.defineSet("poi", "mu");
w.defineSet("obs", "x");
pi.getParameters(*temp)->Print();
legend->DrawClone();
}
void TestJeffreysGaussSigma()
{
w.factory("Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1,5])");
w.factory("n[100,.1,2000]");
w.factory("ExtendPdf::p(g,n)");
w.var("mu")->setConstant();
w.var("n")->setConstant();
w.var("x")->setBins(301);
w.defineSet("poi", "sigma");
w.defineSet("obs", "x");
pi.getParameters(*temp)->Print();
legend->DrawClone();
}
void TestJeffreysGaussMeanAndSigma()
{
w.factory("Gaussian::g(x[0,-20,20],mu[0,-5,5],sigma[1,1.,5.])");
w.factory("n[100,.1,2000]");
w.factory("ExtendPdf::p(g,n)");
w.var("n")->setConstant();
w.var("x")->setBins(301);
w.defineSet("poi", "mu,sigma");
w.defineSet("obs", "x");
pi.getParameters(*temp)->Print();
TH1 *Jeff2d =
pi.createHistogram(
"2dJeffreys", *w.var(
"mu"),
Binning(10, -5., 5),
YVar(*w.var(
"sigma"),
Binning(10, 1., 5.)));
}
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...
Implementation of Jeffrey's prior.
A RooPlot is a plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nBins)
Create a new frame for a given variable in x.
std::unique_ptr< TLegend > BuildLegend() const
Build a legend that contains all objects that have been drawn on the plot.
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...
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
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