RE: Using Parameters in TTreeFormula's?

From: Robert Feuerbach <feuerbac_at_jlab.org>
Date: Wed, 11 Oct 2006 15:01:13 -0400 (EDT)

Hi Philippe,

The idea was to find the best single set of [0], [1], etc. to minimize the expression over all events. It is effectively the same as a 'fit', but I'm trying to remove the overhead of re-writing the macro to process the events in the tree for the potentially arbitrary number of tree variables involved. The TTree::Fit method does not permit for this.

As long as TTreeFormula can use the [0]-like parameter in the expression, this method can be easily written and follow the same spirit as other fits.

Take care,
Rob

On Wed, 11 Oct 2006, Philippe Canal wrote:

> Date: Wed, 11 Oct 2006 13:38:24 -0500
> From: Philippe Canal <pcanal_at_fnal.gov>
> To: 'Robert Feuerbach' <feuerbac_at_jlab.org>, roottalk_at_pcroot.cern.ch
> Subject: RE: [ROOT] Using Parameters in TTreeFormula's?
>
> 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
>
> /***************************************************
> * 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 *
> ***************************************************/
>
>

/***************************************************
 * 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 *
 ***************************************************/
Received on Wed Oct 11 2006 - 21:01:24 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET