gammacombo / gammacombo

A framework to perform a statistical combination of measurements.
GNU General Public License v3.0
14 stars 30 forks source link

Fixing small bug in multipdf prange implementation behaviour #236

Closed fionnbishop closed 3 years ago

fionnbishop commented 3 years ago

This fixes a small bug in the decision to refit with prange implemented when using a multipdf. Essentially, this is made using the final fit, when it should be made using the best fit. This matters if the POI is in the prange for the best fit and not in the final fit, or vice versa.

I think this can be fixed simply by using Utils::setParameters to set the parameters to their best (rather than final) fit values before deciding whether to fix and refit. This is the only change I have made.

This only affects the free fit to B-only and S+B toys in MethodDatasetPluginScan. The global fit at the start of this script already had the desired behaviour.

I have checked that in the two relevant places: