Can not fit user function

From: Torsten Henkel (Torsten.Henkel@physik.uni-marburg.de)
Date: Thu Jul 10 1997 - 10:36:46 MEST


Hi,

I want to fit an user function to a profile histogram:

   [first part of the macro is sniped]

   h1->Draw("sm2:p>>smprof","side==1","profs");
   TF1 *fun2 = new TF1("fun2","[0]+[1]*pow(x,2)",3,10,2);
   fun2->SetParName(0,"const");
   fun2->SetParName(1,"sigma_b");
   fun2->SetParameter(0,0.03);
   fun2->SetParameter(1,0.003);
   smprof->Fit("fun2");

   [the rest also]

I'm doing this in a macro, but all I get is a 'segmentation violation'.
If i comment out the fit part it is working and making the histogram,
but with it I get the error every time. I tried different names and
functions but it's still the same. I'm running root version 1.01/07 on a
Sparc 20.
I hope anyone can help.

Greetings Torsten
-- 
////////////////////////////////////////////////////////////////////
/        Torsten Henkel              Fachbereich Physik            /
/     AG Schwerionenphysik      Philipps-Universitaet Marburg      /
/          Renthof 5              Telephon: +49-6421-284128        /
/        35032 Marburg            Fax:      +49-6421-288993        /
////////////////////////////////////////////////////////////////////



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