Hi @sciencecw,
I don’t have time at the moment to read through the notebooks, but here are some ideas concerning the two questions:
-
For the data, you have to decide whether you want to divide by bin width or not, i.e. if you want to plot the bare bin counts or the density of entries. When bin widths change, you have to plot the data density instead of the data counts, but now you cannot use Poisson errors, since they only work for bin counts. PDFs are by definition always densities.
Therefore, try switching theDataError()
to SumW2 when plotting the data.
https://root.cern.ch/doc/master/classRooDataHist.html#a00a476834b0f2d246f85da34a915fcd9
For plotting PDFs in ranges, I don’t think you have to do something special, unless it’s a binned PDF. Is that the case? In this case I can imagine that range boundaries can only be at the actual bin boundaries. -
I guess binned fits should work. I need a bit more details on what’s not working. Again, is it a binned PDF being fit to binned data, or is the PDF continuous?