Creating a end of bin histogram

_ROOT Version: 6.22/08
_Platform: Ubuntu 20.04.2 LTS
_Compiler: g++

I made a post a year ago about the ability to fit at the end of a bin. I was told there was no direct way to do it. However, I was told another method I proposed would work.

I recently realized an issue with my proposed method (make a graph from the histogram with the graph points being at the end of the bins) is that I am not able to fit a graph with the log-likelihood method. I need to be able to both, fit a histogram at the end of its bins and fit that data with the log-likelihood method. I have a method to do that but I need to confirm how specifically root fits histogram to make sure it will work.

My idea is to take the histogram I want to fit, shift over the bins by half a bin width, then tell root to leave out that first empty half bin space (from moving the bins over) and fit as normal. So for example, if I was originally fitting a histogram from 0 to 400 and my bin width is 1. In my new histogram the bins would all by shifted over by 0.5 and I would now be fitting from 0.5 to 400.5.

My question is, will telling root to exclude that first width of 0.5 effect my fit if no data point occur in that width of 0.5? Putting this another way, if I had my original histogram of bin width 1 and fit from 0 to 400, would I get different fit values if I fit from 0.001 to 400? I wouldn’t think so because I assume when root fits a histogram, it only “sees” the points made by the middle of the histogram bins. However, if root considers more than just the data point made by the middle of the bin then I can see how I could get a different result between fitting from 0.001 to 400 and from 0 to 400. The information I am working with is sensitive to changes made at the beginning of the fit which is why such a small detail is important.

I think @moneta can help you.

If you want to get rid of any entries for x < 0.5, you can:

  1. create a histogram with 400 bins from 0.5 to 400.5 and then fill it as usual (any entries for x < 0.5 will automatically go into the “underflow bin”),
  2. create a histogram with 400 bins from 0. to 400. but when filling it, apply an x < 0.5 cut (i.e., do not fill it when x < 0.5).

BTW. If you want to take all existing entries into account (without the x < 0.5 cut), maybe you are looking for the "I" histogram fit option.

What exactly does it mean, “Uses the integral of function in the bin instead of the default bin center value”?

Here is my question drawn out. Does root see histogram A (fit from 0 to 3.0) the same as histogram B (fit from 0.5 to 3.5)?