Hello,
I have been a paw user for several years. Now that I am switching to
root, I would like to know how to do something as simple and fast as I
can do with paw. My problem is the following : how to build easily new
variables from the variables stored in a root-tuple ?
Here is an example of what I could have done with paw : suppose I have a
Column Wise Ntuple which contains variables of high energy events. For
example, for each event you have the energy of each track. I can issue
the following commands
PAW_PROMPT_> exec mymacro.kumac
PAW_PROMPT_> nt/plot 1000.Etot Ntrack>=10
in order to plot the Etot distribution which is defined in the following
macro :
(I think the names of the variables are self-explanatory)
---- file mymacro.kumac-----------------------------------------
macro mymacro
hi/fil 1 myHepNtuple.paw | the file contains one CWN #1000
app comis quit
function Etot
include ?
Etot=0.
do itk=1,Ntrack
Etot=Etot+Etrack(itk)
enddo
end
quit
endkumac
----------------------------------------------
How could I do the same thing with root and a root-tuple ?
cheers
Boris Tuchming
PS: please do not answer me that I could have done
n/pl 1000.vadd(Etrack) Ntrack>=10
and that there is something equivalent in root.
My example is here to illustrate that I can build new variables very
easily within paw, and that I can use them as the other variables,
interactively or in other macros.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET