Re: How to catch Fit results manually

From: Arthur E. Snyder <snyder_at_slac.stanford.edu>
Date: Wed, 29 Feb 2012 16:24:55 -0800


Assuming your fitting a TF1 to a histogram see

http://root.cern.ch/root/html/TF1.html

and (for inherited functions)

http://root.cern.ch/root/html/TFormula.html

-Art S

A.E. Snyder, The Former Group C (TFC)        \!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:707-313-0250                          Collaboration
                                                 &
                                            Fermi/GLAST



On Wed, 29 Feb 2012, Asif Saddique wrote:

> Hi rooters,
>
> I am fitting a Gaussian on TH1D and I see following values of Mean & Sigma
> in my terminal:
> ===========================================================
>  FCN=86.9094 FROM MIGRAD    STATUS=CONVERGED      63 CALLS          64 TOTAL
>                      EDM=2.49833e-09    STRATEGY= 1      ERROR MATRIX
> ACCURATE
>   EXT PARAMETER                                   STEP         FIRST  
>   NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE
>    1  Constant     5.98744e+03   4.61314e+01   1.65706e-01  -1.72560e-06
>    2  Mean         9.20998e+01   1.10379e-01   5.04750e-04  -4.60640e-05
>    3  Sigma        1.82326e+01   8.71316e-02   5.68693e-06  -5.16419e-02
> ============================================================
>
> I can see Mean & Sigma from here but how can get them manually. Actually, i
> want to print them in the title of my Histogram. I will convert the value
> into TString then i will put it in the title but how I can get these values,
> I mean
>
>
> cout<<"Mean Value=  "<<????<<<" with Error  ="<<????<<endl;
> cout<<"Sigma Value=  "<<????<<"  with Error  ="<<????<<endl;
>
> should output following:
>
> Mean Value= 9.20998e+01  with Error  =4.61314e+01
> Sigma Value= 1.82326e+01  with Error =8.71316e-02
>
> But how ?
>
> Thanks for help.
>
> Cheers, Asif
>
>
>
>

> Received on Thu Mar 01 2012 - 01:25:03 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 01 2012 - 05:50:01 CET