Since sometime now I am facing a problem using root and roofit to fit a charge distribution. In my distribution I have a distribution with bin size one (one for me is 25ns) and I am trying to find the cross-zero point in each distribution. I am using a function: a*(x-g)e^(-b(x-g) with which the fit looks nice but for the zero crossing point or (t0) I am getting:
while the fit for each distribution looks like:
Trying to understand it from a monte carlo I see again thos bumps appearing when the bin size is one but not when the bin size is much smaller:
I decided to change my fit with a linear function and fit only the rising of the histogram until the max and in parallel compute with the least squares method the line that should pass from these points. In the next picture with red I have the roofit fit and with blue the line computed with least squares method:
This is the case in most histograms and seems that the fit always attempts to be in the starting of the bin causing this binning effect shown in first attachment. With the lest square method the bumps are disappearing giving a distributing that I am expecting. Just to mention I am doing the same within root and in roofit and I am getting the same results.
Any help, suggestion is much appreciated
Best Regards, George