4 plow = x - TMath::ChisquareQuantile(0.16, 2 * x) / 2;
5 pup = TMath::ChisquareQuantile(0.84, 2 * (x + 1)) / 2 - x;
11 TVectorD x, TVectorD dx,
15 int nx = x.GetNoElements();
16 TVectorD y = f(x, mtype);
17 int ny = y.GetNoElements();
19 TMatrixD jacobi(ny, nx);
25 for (
int ix = 0; ix < nx; ++ix) {
29 TVectorD t1 = f(x + e, mtype);
30 TVectorD
t2 = f(x, mtype);
31 TVectorD tmp = (f(x + e, mtype) - f(x, mtype));
37 for (
int iy = 0; iy < ny; ++iy) {
38 jacobi[iy][ix] = der[iy] / dx[ix];
51 TVectorD x, TMatrixD xcov,
54 int ncol = x.GetNoElements();
57 for (
int i = 0; i < ncol; ++i)
58 dx[i] = xcov[i][i] ?
sqrt(xcov[i][i]) * 1e-3 : 1;
60 TMatrixD jacobi =
jacobian(f, x, dx, mtype);
61 TMatrixD jacT(TMatrixD::kTransposed, jacobi);
62 TMatrixD
final = jacobi * (xcov * jacT);
TMatrixD jacobian(TVectorD(*f)(TVectorD, const modeltype), TVectorD x, TVectorD dx, const modeltype mtype)
void poisson_uncertainty(double x, double &plow, double &pup)
TMatrixD propagate_covariance(TVectorD(*f)(TVectorD, const modeltype), TVectorD x, TMatrixD xcov, const modeltype mtype)