I’m using Chi2Test() to fit response functions and background to some gamma spectra and I’m getting some confusing results. For simplicity, the attached images just try to fit the smallest peak on the right. I’m using the option “UWCHI2NORM” since I’m comparing data to simulation and I want the normalization to be considered. The fit isn’t giving me reasonable results though. When I tried a few things manually I noticed that Chi2Test() doesn’t seem to be considering the normalization as I expected. Using it without the NORM option gives the exact same chi-squared values.
For example, the clearly worse fit below, “bad_fit” gives a slightly lower chi-squared value than the better fitting initial conditions I gave it in the first place, “good_fit”. Does this mean if it’s scaled it will fit better? Can I get it to really consider the normalization? Or am I misunderstanding the meaning of the NORM option.
Any help will be much appreciated.
Thanks!
Matt
I’m using ROOT 5.14