Re: [ROOT] Function cannot be compiled

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Apr 13 2001 - 11:14:52 MEST


Hi Chris,
As stated in the mail you refer to, references to other functions
in the definition of a new function is only implemented when
the referenced function is a simple inline expression.
This is not a CINT limitation, but a TF1/TFormula limitation.

I am hesitating in implementing more in TFormula (it could be done).
I believe that using directly C++ is better when working with more
complex cases.
You can see an example of use of multiple functions in one of the standard
Fit demos in $ROOTSYS/tutorials/FittingDemo.C

Rene Brun

On Thu, 12 Apr 2001, Chris Roat wrote:

> 
> >From reading the "[ROOT] function can not be compiled" thread from last
> June, I understand that only one TF1 can be build from the same CINT
> function. Is this still the case?  The claim was that there are tricks to
> solve most problems, as there was in that thread.
> 
> I have the following situation, and I would like to know if there is a
> trick.  I have a Bethe-Bloch function which I use to make a TF1:
> 
> TF1 bb("bb", bethebloch, 0, 5 , 4);
> 
> and I know that the width of the distribution is a function of momentum
> (and may even me a constant).  If I want to draw the bb function with the
> upper/lower 1-sigma contours, I would like to imagine creating a function
> like:
> 
> TF1 width("width", "[0]*bb", 0, 5, 1);
> 
> and then adding it to the original function to get
> 
> TF1 upper("upper", "bb+width", 0, 5);
> TF1 lower("lower", "bb-width", 0, 5);
> 
> Since 'width' also depends on bethebloch, I get the "Function width cannot
> be compiled" warning, since bethebloch was already interpreted for the bb
> function.  I figure 'upper' and 'lower' will have the same problems.
> 
> I'm in 3.00/06 on SunOS.
> 
> In plotting (or even getting numerical values), I could just .Eval(x) at
> each x and use a separate resolution function to determine the high/low
> values, but the ability to do what is above seems more useful in the long
> run.
> 
> Chris
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET