Re: getting mean and sigma from a fit

From: Patois Yannick (patois@ganil.fr)
Date: Mon Jul 05 1999 - 16:43:11 MEST


Hello,

You can have a look on the exemple "multifit.C"
http://root.cern.ch/root/html/examples/multifit.C.html

Look at the lines :

   g1->GetParameters(&par[0]);
   g2->GetParameters(&par[3]);
   g3->GetParameters(&par[6]);

look at GetParameter and GetParameters in
http://root.cern.ch/root/html/TFormula.h.

Double_t TFormula::GetParameter(Int_t ipar) will let you get one
parameter, eg :
Double_t mean = fit->GetParameter(1);

And void GetParameters(Double_t* params) will gives you every parameter in
an array.

Hope it helps,

	Yannick

 _/ Yannick Patois \_________________ Address (home) __________________ 
| irc(undernet): Garp on #france25+ | La Villa des Sciences            |
| email : patois@ganil.fr           | 12, avenue de Cambridge          |
| web :http://www.sura.org/~patois/ | 14200 Herouville-Saint-Clair     |
| Tel(home) :+33 02 31 94 50 32     | FRANCE                           |
|___________________________________|__________________________________|

On Mon, 5 Jul 1999, Stephen Markacs wrote:

> 
> How do I get the mean and sigma from a fit?  I know it prints them to the
> root session, but I want to actually get at them within my code so I can
> put them on my plot. 
> 
> Thanks.
> 
>    S t e p h e n   M a r k a c s
>    stephen@phys.columbia.edu
>    http://phys.columbia.edu/~stephen/ 
> 
> 



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