// ----------------------------------------------------------------------------------- // /* ROOT macro for plotting an Ntuple in a fast way (good for initial inspection of data). Author: Troels C. Petersen (NBI) and Sascha Mehlhase (NBI) Email: petersen@nbi.dk, mehlhase@nbi.dk Date: 20th of September 2011 */ // ----------------------------------------------------------------------------------- // void DrawNtuple() { // Open the file, and then get the Ntuple: TFile* file = TFile::Open("DataSet_ElectronPion_2GeV.root"); TNtuple* ntuple = (TNtuple*)file->Get("ntuple"); // Example of a simple drawing command: ntuple->Draw("Cher"); // Putting in a requirement: // ntuple->Draw("Cher", "nHT < 4"); // Longer example (which might be useful!): // ntuple->Draw("Cher", "nHT == 0"); // ntuple->Draw("Cher", "nHT == 8", "same"); }