I have to very general questions:
Doing fit with root, I tried to understand deeply how it does the chi square calculation. But I cannot find exactly where this thing is done, can you just
tell me in which part of che code is it ? minuit sources ?
I have to fit a spectrum of events, in which every bin has more or less few hudreds of events for each bin.
After doing the fit I have to scale the results with a pure fixed numerical factor, that reduce the fit result of the order of 10^-2.
For example the fit says for a parameter 10^4 but after the scaling I have 25.
But I can come to this result in two ways:
- I can fit the distribution unscaled, with number of events for every bin more than 10^2, and after obtaining the results, I can scale them by this numerical factor
- I can do the same things as point 1 just doing the numerical scaling on each bin before doing the fit, in this way the output of the fit is just in right values
In case 1 i obtain a value with the error of the order of magnitude of few %
In case 2 I obtain the same value of point 1, BUT with an error about the order of magnitude of 90% of the value itself !!
THAT’S NOT GOOD !
Any suggestion ?
Thanks a lot, I hope to have been clear explaining my questions