Hi Robert,
How will you actually use this feature? Do you plan on minizing for each individual events or do minimize for all events?
Cheers,
Philippe
-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
On Behalf Of Robert Feuerbach
Sent: Wednesday, October 11, 2006 10:42 AM
To: roottalk_at_pcroot.cern.ch
Subject: [ROOT] Using Parameters in TTreeFormula's?
Hi,
Are there plans to permit normal TFormula parameters in an expression using a TTreeFormula? For instance, I'd like to write something like:
TTreeFormula totEdiff("totEdiff",
"electronP-([0]*preshowerE+[1]*showerE)",tree);
where 'electronP', 'preshowerE' and 'showerE' are simple leafs in tree. This can be done in TFormula's, but does not appear to work in TTreeFormula's. In TTreeFormula::DefinedVariable fNpar is set to 0 and the class never looks back.
I'm trying to write a general routine to minimize expressions in terms of tree variables by varying the set of parameters, but the TTreeFormula's are completely unaware of the normal '[0]'-like parameters. I know it can by minimized by writing a macro using TFitter and TMinuit directly, but I'd like to have a more general implementation since this is common task. It could even evolve into a TTree::Minimize kind of method.
Thank you,
Rob Feuerbach
/***************************************************Received on Wed Oct 11 2006 - 20:46:02 MEST
* Dr. Robert J. Feuerbach feuerbac_at_jlab.org *
* 12000 Jefferson Avenue CEBAF Center A120 *
* Suite 4 Office: (757) 269-7254 *
* Newport News, VA 23606 Page: 584-7254 *
* Fax: (757) 269-5703 Mailstop 12H3 *
***************************************************/
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET