Get fit parameters from a TGraph

From: Campa Romero, Julia Monica <julia.campa_at_ciemat.es>
Date: Tue, 28 Sep 2010 17:02:43 +0200

Hi,

I want to access to the fit parameters once a TGraph is fitted with a gaussian. I am using GetFunction but it doesn't work. Bellow is my program. It displays the fit parameters but then if I use GetFunction as in the program bellow, it breaks when it gets the parameters. Could you help me to find the errors. A piece of the program is bellow:


        TGraph *n= new TGraph(8,sig,l);
         n->Fit("gaus","V");
	TF1 *myfunc=n->GetFunction("n");

          Double_t p0=myfunc->GetParameter(0);
	Double_t p1=myfunc->GetParameter(1);
	Double_t p2=myfunc->GetParameter(2);
**********************

 Cheers,

Julia                  



Confidencialidad:
Este mensaje y sus ficheros adjuntos se dirige exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilización, divulgación y/o copia sin autorización está prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente respondiendo al mensaje y proceda a su destrucción.

Disclaimer:
This message and its attached files is intended exclusively for its recipients and may contain confidential information. If you received this e-mail in error you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited and may be unlawful. In this case, please notify us by a reply and delete this email and its contents immediately.


Received on Tue Sep 28 2010 - 17:02:49 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 29 2010 - 17:50:01 CEST