I am using ROOT version 2.24/04 on IRIX at CDF
When I fit a TGraph with a polinomial function of grade 1
I have problems retreiving the fitting parameters.
I do the follow:
TGraph *emGr[24];
TGraph *hadGr[24];
..................
for(k1=0.................
emGr[k1]= new TGraph(nentries,xetmp,yetmp);
hadGr[k1]= new TGraph(nentries,xhadtmp,yhadtmp);
//xetmp and yetmp are arrays
emGr[k1]->Fit("pol1","Q","");
hadGr[k1]->Fit("pol1","Q","");
emf[k1] = emGr[k1]->GetFunction("pol1");
if(emf[k1]!=0)
printf("p1: %f\n",emf[k1]->GetParameter(1));
my problem is that the pointer returned by GetFunction is always 0...
Any suggestion...
Thanks very much
**************************************************************
* Antoni Munar Ara munar@fnal.gov *
* *
* INFN Sezione di Pisa *
* Fermi National Laboratory Phone: (630)840-8426 *
* P.O. Box 500, MS 223 *
* Batavia, IL 60510 *
* U.S.A. *
**************************************************************
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET