[ROOT] TTree analysis a la nt/loop with comis

From: Vuko Brigljevic (vuko@SLAC.stanford.edu)
Date: Thu Mar 28 2002 - 17:57:19 MET


Hi root experts,

Still learning how to do analysis in root...

I am trying to do something I would do with a nt/loop and
a fortran function in paw:
- I am looping over a tree
- for each "event" in the tree, I want to plot the sum of
  variables but which ones depends from another variable,
  let's call it run number, e.g:

  I would like a tree->Draw() which plots:
  i)  var1+var2  if (run<LIMIT) 
  ii) var3+var4  if (run>=LIMIT)

  where var{1,4} and run are all separated branches in the 
  tree, all of them elementary types (integers or floats).
- using root 3.02/07

How do I go about doing something like that in root? If
something like that is already documented somewhere and
you know where (usermanual or other roottalk thread,
pleast just point me to it).

Thanks,

Vuko

========================================================================
 Vuko Brigljevic                        | Mail : SLAC, Mail Stop 41
 Lawrence Livermore National Laboratory |        P.O. Box 4349, Stanford
 Nuclear and Particle Physics Division  |        CA 94309, USA
                                        | SLAC-Office : B280- room 143
 Member of the BaBar Collaboration      | Phone : +1-650-926 8512
 <vuko@slac.stanford.edu>          <http://www.slac.stanford.edu/~vuko>  
========================================================================



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