Problem with fixed parameters while Fitting

From: Mathieu de Naurois (Mathieu.deNaurois@poly.in2p3.fr)
Date: Mon Jun 28 1999 - 11:04:47 MEST


  Hello Rooters,

I cannot understand what ROOT does with fixed parameters whiel fitting:


Here's a simple example, where h2 is a filled histogram


{
  TF1 *fgaus=new TF1("fgaus","gaus",0,20);
  fgaus->SetParameters(1000,0.0,4);    
  fgaus->SetParLimits(1,1,1); // To fix parameter 1

  h2->Fit("fgaus","R");
}

Here's ROOT output:

Chi2 : 49349.3, FCN=288951 FROM MIGRAD    STATUS=CONVERGED      77
CALLS          78 TOTAL
                     EDM=0.00302017    STRATEGY= 1  ERROR MATRIX
UNCERTAINTY   9.5 per cent
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  Constant     8.11320e+04   1.01253e+02  -0.00000e+00   1.07859e-05
   2  Mean         3.83943e+00     fixed    
   3  Sigma        4.33514e+00   2.81893e-03   0.00000e+00  -2.45977e+02

Why is the value taken by ROOT different from the one I told it to use?

If I change the statement  
  fgaus->SetParLimits(1,1,1);
by 
 fgaus->SetParLimits(1,0,0);
  
Root produces the output:

Chi2 : 76219, FCN=54973.9 FROM MIGRAD    STATUS=FAILED        224
CALLS         225 TOTAL
                     EDM=0.0312136    STRATEGY= 1      ERR MATRIX
APPROXIMATE
  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  Constant     4.37930e+05   9.91646e+02   0.00000e+00   6.07322e-05
   2  Mean        -8.68125e+00   5.29279e-03   0.00000e+00  -4.31865e+01
   3  Sigma        6.85899e+00   2.38016e-03  -0.00000e+00   2.60841e+03

Which means that dthe parameter is not fixed anymore.

Am i doing somethig wrong?

(I'm running Root 2.21.08 on Linux RedHat 6.0, egcs 1.1.2)

----------------------------
Mathieu de Naurois
LPNHE Ecole Polytechnique
91128 Palaiseau Cedex
denauroi@poly.in2p3.fr



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:34 MET