Re: [ROOT] Combination of 2 functions

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Feb 19 2004 - 13:37:11 MET


See the following in the TF1 documentation

...

Fernanda Gallinucci Garcia wrote:
> 
>         Hi,
> 
>         I fitted two 8th degree polinomial to my data. Now,
> I would like to compare these 2 curves. I created another function
> that is the combo of the first two. Root crashes.
>         Why can't a TF1 object reference to other TF1 if is a polN?
> 
>         Is there a way to make this comparison? What should I do?
>         Thanks
//
//  TF1 objects can reference other TF1 objects (thanks John Odonnell)
//  of type A or B defined above.This excludes CINT interpreted functions
//  and compiled functions.
//  However, there is a restriction. A function cannot reference a basic
//  function if the basic function is a polynomial polN.
//  Example:
//{
//  TF1 *fcos = new TF1 ("fcos", "[0]*cos(x)", 0., 10.);
//  fcos->SetParNames( "cos");
//  fcos->SetParameter( 0, 1.1);
//
//  TF1 *fsin = new TF1 ("fsin", "[0]*sin(x)", 0., 10.);
//  fsin->SetParNames( "sin");
//  fsin->SetParameter( 0, 2.1);
//
//  TF1 *fsincos = new TF1 ("fsc", "fcos+fsin");
//
//  TF1 *fs2 = new TF1 ("fs2", "fsc+fsc");
//}
//


Rene Brun



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET