Polinomial fits & error matrix

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:

  1. 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;

  2. 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.

Hi,

First of all, shifting your fitting variable so that it is nicely centered
around zero is not a “trick” but just numerical common sense … and
(just in case you wonder) no this can not be automated .

Fourth order polynomial ? . If I were you, I would determine the
background by fitting the data first excluding the peak (+/- 2 sigma) .
Now you can see through an F-test whether fourth order really makes
statistical sense .

Eddy