I seem to have a problem using graphical cuts with the ntuple. I have two cuts in a file CUTS.root and an ntuple in another file. Contrary to what the TCutG.html says, I cannot use the cut as an argument to the ntuple. The TCutG.html says that: A graphical cut can be used in a TTree selection expression: Root > T.Draw("fEtot","cutg1") where "cutg1" is the name of an existing graphical cut. I am trying to do just that, and I am getting an error message "EMPTY STRING". Any suggestion, why TCutG is not working? *********** protons->Print() x[0]=0.667727, y[0]=5.36767 x[1]=0.667727, y[1]=4.0679 ..... etc.... --> so the cut was read from the file *ERROR 4 : Empty String *ERROR 4 : Empty String total num counts in the ptofH_TB_p histo 0 The macro looks like this: TFile *fil = new TFile ("CUTS.root"); fil->cd(); fil->ls(); TCutG *protons = (TCutG *) fil->Get("protons"); cout<<" \n \n *********** protons->Print()" <<endl; protons->Print(); // ======================================================= // projecting histograms from ntuple // ======================================================= ntFile.cd(); // without this the ntuple NT is unknown // 2d plot of TOF vs momentum, inside the cut NT->Draw("tof1:momentum>>ptofH_TB_p","protons"); c1->Update(); total = ptofH_TB_p ->GetEntries(); cout<<"total num counts in the ptofH_TB_p histo " << total <<endl; Wojtek Skulski skulski@pas.rochester.edu
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:46 MET