On Wed, 4 Apr 2001, 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? > Hi Annalisa, for you first question try with: (...) TFile* file = new TFile("strip4_z2.root"); TNtuple* ntuple=(TNtuple*)file->Get("h8;1"); TCut zmincut("Xpos>100."); ntuple->Draw("Iadc1",zmincut); (...) //The last line can also be replaced by TCut myplot("Iadc1"); ntuple->Draw(myplot,zmincut); Hope this helps, Cheers, Antonio _______________________________________________________________________________ a n t o n i o s i d o t i e-mail sidoti@science.unitn.it sidoti@fnal.gov www http://higgs.tn.infn.it/~sidoti/ _______________________________________________________________________________ "If you didn't think Perl was sexy before, you will now." Larry Wall's talk "The Third State of the Onion"
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET