[ROOT] how to cut ntuple events based on an user function II

From: Luiz Martins Mundim Filho (mundim@uerj.br)
Date: Wed Sep 05 2001 - 21:56:55 MEST


Luiz Martins Mundim Filho wrote:

> Hello
>
> I need to plot several variables using several cuts. One of these cuts
> is not a trivial one, but I need to search an array and depending on the
> value of one of its elements, reject the event. This cannot be done on
> the Draw command, one needs to write a C function to do it. Some one can
> tell me how can I do that and use it on the Draw command? Lets call this
> function ngamma.C. What I need is something like the following:
>
> root> h1->Draw("var",cut1&&cut2&&...&&ngamma==0)
>
> I have written a whole analysis program, using h1->MakeSelector, but I
> need to draw several variables to test (and look for) new cuts and it
> has been hard and slow to do that using h1->Process("h1.C").
>
> Thanks in advance.
>
> Luiz


attached mail follows:


Hello First of all, sorry if this question is too trivial... I need to plot several variables using several cuts. One of these cuts is not a trivial one, but I need to search an array and depending on the value of one of its elements, reject the event. This cannot be done on the Draw command, one needs to write a C function to do it. Some one can tell me how can I do that and use it on the Draw command? Lets call this function ngamma.C. What I need is something like the following: root> h1->Draw("var",cut1&&cut2&&...&&ngamma==0) I have written a whole analysis program, using h1->MakeSelector, but I need to draw several variables to test (and look for) new cuts and it has been hard and slow to do that using h1->Process("h1.C"). Thanks in advance. Luiz



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:59 MET