Dear All, Dear @moneta
I have been trying to fit my histogram with (Gauss * Landau) function which seems to fit my data very well but if you see the Reduced Chi-sqr value it is quite high [Red Chi-sqr = 305.84] . Even if i draw a RatioPlot of fit and histogram, i shows very large deviations. I played alot with the parameters etc but didn’t manage to get good chi-Sqr value. Following is my code and a fitted histogram. I don’t know what am i doing wrong. It would be really appreciate if someone could help me regarding this.
I’m sure @moneta can help you
The histogram is having a very large bin content and it shows fluctuations much larger than the sqrt(N).
For example in a bin close to the peak you gave a bin content of 500,000 and a function value of 540,000 , when the bin error is sqrt(500,000)=707.
I think the histograms has been scaled but the errors are not. You should set the correct errors in the histogram (e.g. calling `TH1::Sumw2() before scaling it).
Thank you for your reply.
I tried what you said but ChiSqr is still almost the same. Here is my code. I am getting histogram from a root file. Originally range of histogram is [0-5000] but i am taking here [0-60].
This will not work, you would need the original unscaled histogram. If the histograms have been saved without its errors, there is no much you can do about the chi2 value.
Alright, Thank you very much for your help.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.