4 plow = x - TMath::ChisquareQuantile(0.16, 2 * x) / 2;
5 pup = TMath::ChisquareQuantile(0.84, 2 * (x + 1)) / 2 - x;
10 TMatrixD
jacobian(TVectorD(*f)(TVectorD,
string),
11 TVectorD x, TVectorD dx,
15 int nx = x.GetNoElements();
16 TVectorD y = f(x, stringtype);
17 int ny = y.GetNoElements();
19 TMatrixD jacobi(ny, nx);
25 for (
int ix = 0; ix < nx; ++ix) {
29 TVectorD t1 = f(x + e, stringtype);
30 TVectorD
t2 = f(x, stringtype);
31 TVectorD tmp = (f(x + e, stringtype) - f(x, stringtype));
35 for (
int iy = 0; iy < ny; ++iy) {
36 jacobi[iy][ix] = der[iy] / dx[ix];
47 TVectorD x, TMatrixD xcov,
50 int ncol = x.GetNoElements();
53 for (
int i = 0; i < ncol; ++i)
54 dx[i] = xcov[i][i] ?
sqrt(xcov[i][i]) * 1e-3 : 1;
56 TMatrixD jacobi =
jacobian(f, x, dx, stringtype);
57 TMatrixD jacT(TMatrixD::kTransposed, jacobi);
58 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)