Hi all,
I’m encountering some problem with the fit of an invariant mass ditribution, using a gaussian + nth degree polinomial. For polinomial degrees above the 4th I often get from MINUIT the warning that the error matrix is not positively defined. The fits are performed with options like
h->Fit(“func”,“BRN”);
It must be said that in order to get a correct error matrix for polinomials above the 1st degree I have already to do some tricks:
-
center the orizontal scale on the invariant mass peak, so that the peak sits at X=0 and the parameters of the polinomial function are kept as small as possible;
-
do the fit iteratively, each time increasing the polinomial degree and using the result if the ith step as starting values for the (i+1)th, with the highest parameter initialized to zero.
Can someone tell what I’m doing wrong, or if there is a more sophisticated way of making the polinomial fits?
Many thanks to all.