{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Tue Jun 10 10:58:32 2008 by ROOT version5.12/00e) // from TTree CollectionTree/CollectionTree // found on file: TestNtupleOutput.root ////////////////////////////////////////////////////////// //Reset ROOT and connect tree file gROOT->Reset(); TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("TestNtupleOutput.root"); if (!f) { f = new TFile("TestNtupleOutput.root"); } TTree *CollectionTree = (TTree*)gDirectory->Get("CollectionTree"); //Declaration of leaves types Int_t RunNumber; Int_t EventNumber; Char_t StreamESD_ref[153]; Char_t Stream1_ref[153]; Char_t Token[153]; vector truth_px; vector truth_py; vector truth_pz; vector truth_e; vector truth_pdgid; vector electron_pt; vector electron_eta; vector electron_phi; vector electron_incrack; vector electron_cluster_pt; vector electron_cluster_eta; vector electron_cluster_phi; vector electron_cluster_incrack; vector electron_track_pt; vector electron_track_eta; vector electron_track_phi; vector electron_track_incrack; vector electron_isloose; vector electron_ismedium; vector electron_istight; vector electron_charge; vector electron_author_electron; vector electron_author_softe; vector electron_trackmatch_etacorrmag; vector electron_trackmatch_eoverp; vector electron_trackmatch_deta1; vector electron_trackmatch_deta2; vector electron_trackmatch_dphi2; vector electron_shower_ethad1; vector electron_shower_etcone20; vector electron_shower_e233; vector electron_shower_e237; vector electron_shower_e277; vector electron_shower_f1; vector electron_shower_f1core; vector electron_shower_f3core; vector electron_shower_e2tsts1; vector electron_shower_emins1; vector electron_shower_weta1; vector electron_shower_wtots1; vector electron_shower_fracs1; vector electron_shower_weta2; vector electron_shower_widths2; vector electron_shower_pos7; vector electron_shower_iso; // Set branch addresses. CollectionTree->SetBranchAddress("RunNumber",&RunNumber); CollectionTree->SetBranchAddress("EventNumber",&EventNumber); CollectionTree->SetBranchAddress("StreamESD_ref",StreamESD_ref); CollectionTree->SetBranchAddress("Stream1_ref",Stream1_ref); CollectionTree->SetBranchAddress("Token",Token); CollectionTree->SetBranchAddress("truth_px",&truth_px); CollectionTree->SetBranchAddress("truth_py",&truth_py); CollectionTree->SetBranchAddress("truth_pz",&truth_pz); CollectionTree->SetBranchAddress("truth_e",&truth_e); CollectionTree->SetBranchAddress("truth_pdgid",&truth_pdgid); CollectionTree->SetBranchAddress("electron_pt",&electron_pt); CollectionTree->SetBranchAddress("electron_eta",&electron_eta); CollectionTree->SetBranchAddress("electron_phi",&electron_phi); CollectionTree->SetBranchAddress("electron_incrack",&electron_incrack); CollectionTree->SetBranchAddress("electron_cluster_pt",&electron_cluster_pt); CollectionTree->SetBranchAddress("electron_cluster_eta",&electron_cluster_eta); CollectionTree->SetBranchAddress("electron_cluster_phi",&electron_cluster_phi); CollectionTree->SetBranchAddress("electron_cluster_incrack",&electron_cluster_incrack); CollectionTree->SetBranchAddress("electron_track_pt",&electron_track_pt); CollectionTree->SetBranchAddress("electron_track_eta",&electron_track_eta); CollectionTree->SetBranchAddress("electron_track_phi",&electron_track_phi); CollectionTree->SetBranchAddress("electron_track_incrack",&electron_track_incrack); CollectionTree->SetBranchAddress("electron_isloose",&electron_isloose); CollectionTree->SetBranchAddress("electron_ismedium",&electron_ismedium); CollectionTree->SetBranchAddress("electron_istight",&electron_istight); CollectionTree->SetBranchAddress("electron_charge",&electron_charge); CollectionTree->SetBranchAddress("electron_author_electron",&electron_author_electron); CollectionTree->SetBranchAddress("electron_author_softe",&electron_author_softe); CollectionTree->SetBranchAddress("electron_trackmatch_etacorrmag",&electron_trackmatch_etacorrmag); CollectionTree->SetBranchAddress("electron_trackmatch_eoverp",&electron_trackmatch_eoverp); CollectionTree->SetBranchAddress("electron_trackmatch_deta1",&electron_trackmatch_deta1); CollectionTree->SetBranchAddress("electron_trackmatch_deta2",&electron_trackmatch_deta2); CollectionTree->SetBranchAddress("electron_trackmatch_dphi2",&electron_trackmatch_dphi2); CollectionTree->SetBranchAddress("electron_shower_ethad1",&electron_shower_ethad1); CollectionTree->SetBranchAddress("electron_shower_etcone20",&electron_shower_etcone20); CollectionTree->SetBranchAddress("electron_shower_e233",&electron_shower_e233); CollectionTree->SetBranchAddress("electron_shower_e237",&electron_shower_e237); CollectionTree->SetBranchAddress("electron_shower_e277",&electron_shower_e277); CollectionTree->SetBranchAddress("electron_shower_f1",&electron_shower_f1); CollectionTree->SetBranchAddress("electron_shower_f1core",&electron_shower_f1core); CollectionTree->SetBranchAddress("electron_shower_f3core",&electron_shower_f3core); CollectionTree->SetBranchAddress("electron_shower_e2tsts1",&electron_shower_e2tsts1); CollectionTree->SetBranchAddress("electron_shower_emins1",&electron_shower_emins1); CollectionTree->SetBranchAddress("electron_shower_weta1",&electron_shower_weta1); CollectionTree->SetBranchAddress("electron_shower_wtots1",&electron_shower_wtots1); CollectionTree->SetBranchAddress("electron_shower_fracs1",&electron_shower_fracs1); CollectionTree->SetBranchAddress("electron_shower_weta2",&electron_shower_weta2); CollectionTree->SetBranchAddress("electron_shower_widths2",&electron_shower_widths2); CollectionTree->SetBranchAddress("electron_shower_pos7",&electron_shower_pos7); CollectionTree->SetBranchAddress("electron_shower_iso",&electron_shower_iso); // This is the loop skeleton // To read only selected branches, Insert statements like: // CollectionTree->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Long64_t nentries = CollectionTree->GetEntries(); Long64_t nbytes = 0; // for (Long64_t i=0; iGetEntry(i); // } }