Dear experts,
I want to fit and hist array then plot then in a canvas.
If I do not fit everything works fine, I have all the 16 hist draw in the 16 pad of the canvas:
now I want to fit the wavy distribution (1). When I fit on separate subrange (in red), the fit works fine, but then I make a global fit (in blue), which is a composition of the red, and you can see that the global fit is bad. I tried to fixe some parameters but it does not help. I wonder if it’s normal that the sub-fits work that’s nice while the global is that’s bad? Is there a way to fix this? You can see the code here (2).
Regards
Dear experts,
now I’m doing the fit over 2 file and I want to draw the fit the same pad. but with my code (1) it draws only the last one. I have tried different thing without success. Do you see what is wrong?
Regards
I think the problem is that hist[nlayer]->Fit("fpol", "R"); automatically draws the histogram (and the fitted function), so the previous pad contents is removed.