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
 
[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:Minimization --  The following expressions have been identified as constant and will be precalculated and cached: (u)
 **********
 **    1 **SET PRINT           1
 **********
 **********
 **    2 **SET NOGRAD
 **********
 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 mu           1.00000e+02  1.99000e+01    1.00000e+00  2.00000e+02
 **********
 **    3 **SET ERR         0.5
 **********
 **********
 **    4 **SET PRINT           1
 **********
 **********
 **    5 **SET STR           1
 **********
 NOW USING STRATEGY  1: TRY TO BALANCE SPEED AGAINST RELIABILITY
 **********
 **    6 **MIGRAD         500           1
 **********
 FIRST CALL TO USER FUNCTION AT NEW START POINT, WITH IFLAG=4.
 START MIGRAD MINIMIZATION.  STRATEGY  1.  CONVERGENCE WHEN EDM .LT. 1.00e-03
 FCN=-360.517 FROM MIGRAD    STATUS=INITIATE        4 CALLS           5 TOTAL
                     EDM= unknown      STRATEGY= 1      NO ERROR MATRIX       
  EXT PARAMETER               CURRENT GUESS       STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  mu           1.00000e+02   1.99000e+01   2.01361e-01  -5.66619e-05
                               ERR DEF= 0.5
 MIGRAD MINIMIZATION HAS CONVERGED.
 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-360.517 FROM MIGRAD    STATUS=CONVERGED      24 CALLS          25 TOTAL
                     EDM=4.72209e-14    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  mu           1.00000e+02   9.98317e+00   1.31866e-03  -2.16215e-06
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  1    ERR DEF=0.5
  1.000e+02 
 **********
 **    7 **SET ERR         0.5
 **********
 **********
 **    8 **SET PRINT           1
 **********
 **********
 **    9 **HESSE         500
 **********
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-360.517 FROM HESSE     STATUS=OK              7 CALLS          32 TOTAL
                     EDM=9.50228e-17    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME      VALUE            ERROR       STEP SIZE       VALUE   
   1  mu           1.00000e+02   9.98317e+00   2.63731e-04  -5.02515e-03
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  1    ERR DEF=0.5
  1.000e+02 
[#1] INFO:Fitting -- RooAbsPdf::fitTo(p) Calculating sum-of-weights-squared correction matrix for covariance matrix
 **********
 **   10 **SET ERR         0.5
 **********
 **********
 **   11 **SET PRINT           1
 **********
 **********
 **   12 **HESSE         500
 **********
 COVARIANCE MATRIX CALCULATED SUCCESSFULLY
 FCN=-360.517 FROM HESSE     STATUS=OK              5 CALLS          37 TOTAL
                     EDM=8.98159e-17    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME      VALUE            ERROR       STEP SIZE       VALUE   
   1  mu           1.00000e+02   9.98311e+00   1.05492e-05  -5.02515e-03
                               ERR DEF= 0.5
 EXTERNAL ERROR MATRIX.    NDIM=  25    NPAR=  1    ERR DEF=0.5
  1.000e+02 
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
RooDataHist::genData[x] = 100 bins (100 weights)
 
  RooFitResult: minimized FCN value: -360.517, estimated distance to minimum: 8.98159e-17
                covariance matrix quality: Full, accurate covariance matrix
                Status : MINIMIZE=0 HESSE=0 HESSE=0 
 
    Floating Parameter    FinalValue +/-  Error   
  --------------------  --------------------------
                    mu    1.0000e+02 +/-  1.00e+01
 
variance = 100.001
stdev = 10.0001
jeffreys = 0.0999994
[#1] INFO:NumericIntegration -- RooRealIntegral::init(jeffreys_Int[mu]) using numeric integrator RooAdaptiveGaussKronrodIntegrator1D to calculate Int(mu)
[#1] INFO:NumericIntegration -- RooRealIntegral::init(Expected_Int[mu]) using numeric integrator RooIntegrator1D to calculate Int(mu)
   
 
 
 
 
void rs302_JeffreysPriorDemo()
{
   w.factory(
"Uniform::u(x[0,1])");
 
   w.factory(
"mu[100,1,200]");
 
   w.factory(
"ExtendPdf::p(u,mu)");
 
 
   RooDataHist *asimov = 
w.pdf(
"p")->generateBinned(*
w.var(
"x"), ExpectedData());
 
 
   std::unique_ptr<RooFitResult> res{
w.pdf(
"p")->fitTo(*asimov, Save(), SumW2Error(
kTRUE))};
 
 
   res->Print();
   cout << 
"jeffreys = " << sqrt(cov.
Determinant()) << endl;
 
 
   w.defineSet(
"poi", 
"mu");
 
 
 
 
 
   auto legend = 
plot->BuildLegend();
 
}
 
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();
 
 
 
 
   res->Print();
 
   w.defineSet(
"poi", 
"mu");
 
 
 
   pi.getParameters(*temp)->
Print();
 
 
   
 
 
   auto legend = 
plot->BuildLegend();
 
}
 
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);
 
 
 
 
   res->Print();
 
   w.defineSet(
"poi", 
"sigma");
 
 
 
   pi.getParameters(*temp)->
Print();
 
 
 
 
   auto legend = 
plot->BuildLegend();
 
}
 
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);
 
 
 
 
   res->Print();
 
   w.defineSet(
"poi", 
"mu,sigma");
 
 
 
   pi.getParameters(*temp)->
Print();
 
   
 
   TH1 *Jeff2d = pi.createHistogram(
"2dJeffreys", *
w.var(
"mu"), 
Binning(10, -5., 5), 
YVar(*
w.var(
"sigma"), 
Binning(10, 1., 5.)));
 
}
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...