Extended PDF returning nsig/nranges when using Range in fit

Hi all,

I’ve encountered a very odd problem when I fit a RooExtendedPdf (generated from a RooGenericPdf) using subranges. Let me use nsig, as the variable representing the number of events in the fit and N as the true number of events in the subranges of the dataset. If I use 2 subranges for the fit, nsig=N/2. If I use 3 subranges, nsig=N/3.

I feel I’m missing something rather silly. I’m attaching a piece of unit testing code (PyROOT). Any advice would be greatly appreciated.

simple_fitting_to_multiple_ranges.py (2.32 KB)