TF1 Parameters in Fit

Hello Rooters,

I have the following question:

Is is possible to fix the parameters of a TF1 function
such that e.g. for a pol1 fit I do something like

TF1 *f = new TF1(“f”,"[0]+[1]*x",0,1);
f->SetParameter(1,8000); // and

and have the parameter fixed within this range for the fit, such that the outcome for [0] would include the given error on [1] ?

The above code does not lead to the desired result,

Also using SetParLimits does not work, having
does always end up with 8400 being used for the fit, and the error being calculated again.

I would be glad for any suggestions on this subject.



ROOT Version:

  •                                     *
  •    W E L C O M E  to  R O O T       *
  •                                     *
  • Version 4.00/04 1 May 2004 *
  •                                     *
  • You are welcome to visit our Web site *
  •      [](            *
  •                                     *

FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.133, Apr 18 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

The right method is to use:


if fit converge to the limits problably there some other problems, in example data don’t follow the simple linear relation.