Small fixes and improvements to BB-lite
- Protect against infinite gradient if the error in a bin is zero. The yields are computed as
total_yields(x) + BBlite_nuisances * sqrt(total_variances(x))
, wherex
are all the variables in the model, andBBlite_nuisances
is the array of BB-lite nuisance parameters. But iftotal_variances(x)
is zero, then the derivative ofsqrt(total_variances(x))
is infinite. This adds a protection in case some bins have zero variance (but this should generally be avoided anyway). - Keep a reference to the BB-lite variable in the model as
model.bblite_vars
- Give meaningful names (using channel names) to the BB-lite variable sub-components
Edited by Sebastien Wertz