Reversed erranous 'fix' to nuisance info calculation
@@ -1358,15 +1358,12 @@ class FisherInformation:
# Nuisance parameter Fisher info
if include_nuisance_parameters and self.include_nuisance_parameters:
nuisance_a = self.nuisance_morpher.calculate_a(weights_benchmarks) # Shape (n_nuisance_params, n_events)
- expected_a = np.einsum("vx,x->v", nuisance_a, sigma / total_xsec)
- nuisance_scores = nuisance_a - expected_a[:, np.newaxis] # Shape (n_nuisance_params, n_events)
-
# grad_i dsigma(x), where i is a nuisance parameter, is given by
# sigma[np.newaxis, :] * a
- fisher_info_nuisance = luminosity * np.einsum("n,in,jn->nij", sigma, nuisance_scores, nuisance_scores)
- fisher_info_mix = luminosity * np.einsum("in,jn->nij", dsigma, nuisance_scores)
- fisher_info_mix_transposed = luminosity * np.einsum("in,jn->nji", dsigma, nuisance_scores)
+ fisher_info_nuisance = luminosity * np.einsum("n,in,jn->nij", sigma, nuisance_a, nuisance_a)
+ fisher_info_mix = luminosity * np.einsum("in,jn->nij", dsigma, nuisance_a)
+ fisher_info_mix_transposed = luminosity * np.einsum("in,jn->nji", dsigma, nuisance_a)
n_all_parameters = self.n_parameters + self.n_nuisance_parameters
fisher_info = np.zeros((fisher_info_phys.shape[0], n_all_parameters, n_all_parameters))
