Re: Getting access to fit parameters.
Rene Brun (Rene.Brun@cern.ch)
Tue, 12 May 1998 09:51:05 +0200
William Love wrote:
>
> Roothelp
>
> I have make a program to fit 1332 data sets, each with a
> pol2 function. If I type pol2.Print() I can see the results
> of each fit. I want, however to use the polynomial parameters
> in further analysis. I can't figure out how to do something
> like z0 = -0.5*pol2.GetParam(2)/pol2.GetParam(3);
>
> Bill Love
If you have a TF1 object, use
GetParameter(i) to return the value of param i [0,-->]
GetParError(i) to return error on parameter i.
Note that TF1 derives from TFormula. Real functions are:
TFormula::GetParameter
TF1::GetParError.
See examples in
http://root.cern.ch/root/HowtoFit.html
Rene Brun