Re: Accesssing fit parameters and errors

From: Arthur E. Snyder <snyder_at_slac.stanford.edu>
Date: Mon, 5 Feb 2007 12:09:56 -0800 (PST)

It would be nice if root Print commands could take ostream as an argument so one could print to a file, but that doesn't work. I use cut&paste sometimes, but it I want to print a lot of 'em to files I have to use GetParError or GetParErrors (returns an array [a]).

[a] a pointer to the array fParErrors.
virtual Double_t *GetParErrors() const {return fParErrors;}

A.E. Snyder, Group EC                        \!c*p?/
SLAC Mail Stop #95                          ((.   .))
Box 4349                                        |
Stanford, Ca, USA, 94309                      '\|/`
e-mail:snyder_at_slac.stanford.edu                 o
phone:650-926-2701                              _
http://www.slac.stanford.edu/~snyder          BaBar
FAX:650-926-2657                          Collaboration



On Mon, 5 Feb 2007, Roger Mason wrote:

> Hello,
>
> I write the parameters of a fitted TF1 into a root file. I need to
> recover the fit coefficients and their errors for tabulation,
> presentation etc.
>
> I have the following questions:
>
> (1) I can print the parameters using:
> f->GetObject("fit",fForm)
> fForm->Print()
> (fForm being a pointer to the TF1)
>
> Is there an easy way to export the coefficients into a text file? They will
> eventually go in a LaTeX document.
>
> (2) I can access the errors on the fit coefficients as
> fForm->GetParError(0) etc...
> Am a correct in assuming the only way to access the errors is to loop
> over them?
>
> Thanks,
> Roger
>
>
Received on Mon Feb 05 2007 - 21:13:09 CET

This archive was generated by hypermail 2.2.0 : Mon Feb 05 2007 - 23:50:00 CET