Re: [ROOT] Cut Definition and Command Draw

From: Stève Udriot (Steve.Udriot@cern.ch)
Date: Wed Apr 04 2001 - 13:40:27 MEST


Hi Annalisa,

This should work:

TFormula zmincut("zmincut", "100.");
TCut cut = "Xpos>zmincut";
ntuple->Draw("Iadc1", cut);

Steve

Annalisa De Caro wrote:

>    Hi rooters,
> i discovered that this procedure does not work:
>    TFile* file = new TFile("strip4_z2.root"); 
>    TNtuple* ntuple=(TNtuple*)file->Get("h8;1");
>    Float_t zmincut =100.;
>    ntuple->Draw("Iadc1","Xpos>zmincut");
> ROOT talks: Error 26, Unknow name "zmincut".
> 
> It works only in this other fashion:
>    TFile* file = new TFile("strip4_z2.root"); 
>    TNtuple* ntuple=(TNtuple*)file->Get("h8;1");
>    ntuple->Draw("Iadc1","Xpos>100.");
> How can i introduce a cut where i want?
> 
> And an other problem...
> When the command Draw (ntuple-Draw("Xpos"); or histogram->Draw();)is
> inside a macro, the histogram is plotted only when the macro is closed.
> And When the command Draw is inside a macro called by an other main macro,
> the histogram is plotted only when the main macro is closed. But how can i
> interact with the histogram (to draw a line where i want, for example), if
> i do not see him?
> 
>   Thank you
> 
> *************************************************************************
> *    University of Bologna    |                   |  decaro@bo.infn.it  *
> *     Physics Department      | +39 051  20 91103 |                     *
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> *    University of Salerno    |                   |                     *
> * Physics Sciences Department | +39 089  96 5359  |                     *
> *       (INFN of Napoli)      |                   |                     *
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> *     CERN - EP division      |                   | decaro@mail.cern.ch *
> *        (Bld.29 R019)        | +41  22  76 77767 |                     *
> *************************************************************************



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