Re: [ROOT] selection function

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed May 17 2000 - 20:00:27 MEST


Hi Valentine,
Use TTree::MakeClass to generate a skeleton analysis class
for your ntuple. Look at the instructions in the generated code
for the ways to loop, select, etc.
If you have an ntuple (say T), do
  T.MakeClass("Valentine")
This will generate Valentine.h and Valentine.C
You will have to add your selection code in the function
Valentine::Loop

Rene Brun



On Wed, 17 May 2000, Valentine Kouznetsov wrote:

> Hello,
> I've recently started to use ROOT and found it as a great
> powerfull tool. But unfortunately, none of the examples on
> root web site can help me to understand simple problem.
> Suppose I have Ntuple, created by HBOOK and converted to
> ROOT with three entries (a,b,c). Their type doesn't matter.
> I would like to find out efficiency of variable c with 
> respect to cut on a and b. In old fashion PAW you had
> a possibility to make UWFUNC func(a,b) and perform some arithmetic
> operation with a and b. Based on the return status of
> UWFUNC you can calculate efficiency (number of entries
> with respect to particular cut) of variable c. How to do
> the same in ROOT? 
> Valentin.
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET