Re: [ROOT] TFormula

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Aug 05 2002 - 22:39:25 MEST


Pierre-Luc,

Did you look at TTreeFormula?
We use this class to make cuts in ROOT TTrees.
What is the format of your SNO events?

Rene Brun

On Mon, 5 Aug 2002, Pierre-Luc Drouin wrote:

> Hi,
> 
> I'm working on a program that reads equations in a dat file and use them
> to apply cuts on some SNO events. Users must be able to change cut
> equations in the dat file without recompiling QSNO (SNO analysis
> program). Cuts may combine more than 4 parameters, that's why I need an
> equation interpreter that can interpret formulas with more than 4
> variables.
> 
> Thank you!
> 
> Pierre-Luc Drouin
> SNO, Carleton University 
> 
> On Mon, 5 Aug 2002, Rene Brun wrote:
> 
> > May be you should explain what you want to do !
> > Why don't you use CINT directly as an interpreter?
> > 
> > The convention in TFormula is to use the letters x,y,z,t
> > to identify the 1st,2nd,3rd,4th dimension in the expression.
> > For sure we could use the 26 characters + upper case.
> > I don't think this would be the right way to proceed.
> > 
> > Rene Brun
> > 
> > On Mon, 5 Aug 2002, Pierre-Luc Drouin wrote:
> > 
> > > Hi,
> > > 
> > > The problem I have is that I'm making a class that must be the most
> > > flexible as possible, and it's possible that it needs more than 4
> > > variables (perhaps 10, or more). Is there a mean to do that using
> > > TFormula? I mean, once an interpreter is able to interpret
> > > complex equations like
> > > TFormula is able to do, what does limit the number of variables?
> > > 
> > > Thank you!
> > > 
> > > Pierre-Luc Drouin
> > > 
> > > On Mon, 5 Aug 2002, Rene Brun wrote:
> > > 
> > > > Hi Pierre-Luc
> > > > 
> > > > TFormula allows up to 4 dimensions. Example:
> > > >  root > TFormula f("f","x+y+z+t")
> > > >  root > double x[4] = {1,2,3,4}
> > > >  root > f.EvalPar(x)
> > > > 
> > > > The current documentation indicates a max of 3 dimensions.
> > > > I have updated the comments in the CVS version.
> > > > 
> > > > Rene Brun
> > > > 
> > > > On Mon, 5 Aug 2002, Pierre-Luc Drouin wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > I need an equation interpreter that can be used with more than 3
> > > > > variables. Is there a class that allows it in ROOT?
> > > > > 
> > > > > Thank you!
> > > > > 
> > > > > Pierre-Luc Drouin
> > > > > 
> > > > 
> > > 
> > 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:03 MET