Stupid fitting bug/feature?

From: Arthur E. Snyder <>
Date: Fri, 13 May 2005 11:13:28 -0700 (PDT)

When fitting a histogram with a simple function such as "pol0" root has a "stupid" behavior. If you fix a parameter, it still moves the parameter when attempting to make an initial guess. This is not a very intuitive behavior.

E.g., in attempting to extract the chisq with constant value 1 from a ratio plot I do the following:

f=fetchFit("pol0") <----- just does GetObject stuff f->FixParameter(0,1.0)

                 pol0 : pol0 Ndim= 1, Npar= 1, Noper= 1
 fExpr[0] = pol0  action = 130 action param = 1
 Par  0                    p0 = 1

--->so it worked to set the parameter

..root [83] f->GetParError(0)

(const Double_t)0.00000000000000000e+00

----> and it worked to fix the error

...but when I fit with


it gives this:

,  EXT PARAMETER               CURRENT GUESS       STEP         FIRST
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE
   1  p0           2.11704e-01     fixed

---which not sensensible (and incidently not a very good guess, since
'rat' is in fact consistent with 1.0).

This is coming from the code where root fitting tries to guess the initial starting point of the fit. Was this intentional? Off hand I can't see a use case where this is the behavior one would want. It'd make more sense to disable guessing for fixed parameters.

I seem to recall some flag that can turn off initial guessing, but I think it should be automatically turned off when a parameter is fixed.

-Art S.

A.E. Snyder, Group EC                        \!c*p?/
SLAC Mail Stop #95                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`                 o
phone:650-926-2701                              _          BaBar
FAX:650-926-2657                          Collaboration
Received on Fri May 13 2005 - 20:14:40 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:08 MET