NUISANCEMC / nuisance

github mirror of the NUISANCE neutrino interaction generator comparison tool. Compare your favourite neutrino interaction generators to each other and over 350 published data sets
https://nuisance.hepforge.org
GNU General Public License v3.0
11 stars 21 forks source link

Gaussian pull term fix #67

Open jedori0228 opened 1 month ago

jedori0228 commented 1 month ago

Chi2 calculation skips the bins where data=0 OR mc=0 OR CovInv=0. This is find for actual Data vs MC comparison, but we use this feature also in the penalty terms for the nuisance parameters. But when we use "fraction" version (i.e., sigmas), the nominal ("data") is at zero, so the penalties are not calculated. Here I added additional boolean in the StatUtils::GetChi2FromCov function SkipEmptyBin, and skips "zero" bins when it is set to true. Default is true, so backward compatible, but for the ParamPull penalty calculation, I set this to false.