void RootTutorial1() { // Get the data file cout << "[root_tutorial_1] Getting data file" << endl; TFile *f = new TFile("./zjet.root"); // Get the tree from the file cout << "[root_tutorial_1] Getting TTree from file" << endl; TTree *t = (TTree*)f->Get( "Tdata" ); // Create a 1D histogram cout << "[root_tutorial_1] Creating histogram object (TH1F)" << endl; TH1F *h_px = new TH1F("h_px","h_px",100,-1500,1500); // Fill the histogram using information from the "px" branch from the tree cout << "[root_tutorial_1] Filling histogram and drawing it" << endl; t->Draw("px>>h_px"); }