{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Tue Jul 14 10:50:34 2009 by ROOT version5.18/00d) // from TChain RawElectronTree/ ////////////////////////////////////////////////////////// //Reset ROOT and connect tree file gROOT->Reset(); #ifdef SINGLE_TREE // The following code should be used if you want this code to access // a single tree instead of a chain TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/scratch/dervan/H130GeV_Output.root"); if (!f) { f = new TFile("/scratch/dervan/H130GeV_Output.root"); } TTree *RawElectronTree = (TTree*)gDirectory->Get("RawElectronTree"); #else // SINGLE_TREE // The following code should be used if you want this code to access a chain // of trees. TChain *RawElectronTree = new TChain("RawElectronTree",""); RawElectronTree->Add("/scratch/dervan/H130GeV_Output.root/RawElectronTree"); #endif // SINGLE_TREE //Declaration of leaves types Int_t RunNumber; Int_t EventNumber; Char_t Token[153]; vector electron_pt; vector electron_eta; vector electron_phi; vector electron_m; vector > electron_incrack; vector electron_cluster_pt; vector electron_cluster_etForID; vector electron_cluster_eta; vector electron_cluster_etaBE2; vector electron_cluster_phi; vector electron_cluster_m; vector > electron_cluster_incrack; vector electron_track_pt; vector electron_track_eta; vector electron_track_phi; vector electron_track_m; vector > electron_track_incrack; vector > electron_isloose; vector > electron_ismedium; vector > electron_ismediumnoiso; vector > electron_istight; vector > electron_istightnoiso; vector > electron_isphotontight; vector > electron_charge; vector > electron_author_electron; vector > electron_author_softe; vector > electron_author_photon; vector > electron_author_forward; 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_ethad; vector electron_shower_etcone; vector electron_shower_etcone20; vector electron_shower_etcone30; vector electron_shower_etcone40; 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_r33over37allcalo; // Set branch addresses. RawElectronTree->SetBranchAddress("RunNumber",&RunNumber); RawElectronTree->SetBranchAddress("EventNumber",&EventNumber); RawElectronTree->SetBranchAddress("Token",Token); RawElectronTree->SetBranchAddress("electron_pt",&electron_pt); RawElectronTree->SetBranchAddress("electron_eta",&electron_eta); RawElectronTree->SetBranchAddress("electron_phi",&electron_phi); RawElectronTree->SetBranchAddress("electron_m",&electron_m); RawElectronTree->SetBranchAddress("electron_incrack",&electron_incrack); RawElectronTree->SetBranchAddress("electron_cluster_pt",&electron_cluster_pt); RawElectronTree->SetBranchAddress("electron_cluster_etForID",&electron_cluster_etForID); RawElectronTree->SetBranchAddress("electron_cluster_eta",&electron_cluster_eta); RawElectronTree->SetBranchAddress("electron_cluster_etaBE2",&electron_cluster_etaBE2); RawElectronTree->SetBranchAddress("electron_cluster_phi",&electron_cluster_phi); RawElectronTree->SetBranchAddress("electron_cluster_m",&electron_cluster_m); RawElectronTree->SetBranchAddress("electron_cluster_incrack",&electron_cluster_incrack); RawElectronTree->SetBranchAddress("electron_track_pt",&electron_track_pt); RawElectronTree->SetBranchAddress("electron_track_eta",&electron_track_eta); RawElectronTree->SetBranchAddress("electron_track_phi",&electron_track_phi); RawElectronTree->SetBranchAddress("electron_track_m",&electron_track_m); RawElectronTree->SetBranchAddress("electron_track_incrack",&electron_track_incrack); RawElectronTree->SetBranchAddress("electron_isloose",&electron_isloose); RawElectronTree->SetBranchAddress("electron_ismedium",&electron_ismedium); RawElectronTree->SetBranchAddress("electron_ismediumnoiso",&electron_ismediumnoiso); RawElectronTree->SetBranchAddress("electron_istight",&electron_istight); RawElectronTree->SetBranchAddress("electron_istightnoiso",&electron_istightnoiso); RawElectronTree->SetBranchAddress("electron_isphotontight",&electron_isphotontight); RawElectronTree->SetBranchAddress("electron_charge",&electron_charge); RawElectronTree->SetBranchAddress("electron_author_electron",&electron_author_electron); RawElectronTree->SetBranchAddress("electron_author_softe",&electron_author_softe); RawElectronTree->SetBranchAddress("electron_author_photon",&electron_author_photon); RawElectronTree->SetBranchAddress("electron_author_forward",&electron_author_forward); RawElectronTree->SetBranchAddress("electron_trackmatch_etacorrmag",&electron_trackmatch_etacorrmag); RawElectronTree->SetBranchAddress("electron_trackmatch_eoverp",&electron_trackmatch_eoverp); RawElectronTree->SetBranchAddress("electron_trackmatch_deta1",&electron_trackmatch_deta1); RawElectronTree->SetBranchAddress("electron_trackmatch_deta2",&electron_trackmatch_deta2); RawElectronTree->SetBranchAddress("electron_trackmatch_dphi2",&electron_trackmatch_dphi2); RawElectronTree->SetBranchAddress("electron_shower_ethad1",&electron_shower_ethad1); RawElectronTree->SetBranchAddress("electron_shower_ethad",&electron_shower_ethad); RawElectronTree->SetBranchAddress("electron_shower_etcone",&electron_shower_etcone); RawElectronTree->SetBranchAddress("electron_shower_etcone20",&electron_shower_etcone20); RawElectronTree->SetBranchAddress("electron_shower_etcone30",&electron_shower_etcone30); RawElectronTree->SetBranchAddress("electron_shower_etcone40",&electron_shower_etcone40); RawElectronTree->SetBranchAddress("electron_shower_e233",&electron_shower_e233); RawElectronTree->SetBranchAddress("electron_shower_e237",&electron_shower_e237); RawElectronTree->SetBranchAddress("electron_shower_e277",&electron_shower_e277); RawElectronTree->SetBranchAddress("electron_shower_f1",&electron_shower_f1); RawElectronTree->SetBranchAddress("electron_shower_f1core",&electron_shower_f1core); RawElectronTree->SetBranchAddress("electron_shower_f3core",&electron_shower_f3core); RawElectronTree->SetBranchAddress("electron_shower_e2tsts1",&electron_shower_e2tsts1); RawElectronTree->SetBranchAddress("electron_shower_emins1",&electron_shower_emins1); RawElectronTree->SetBranchAddress("electron_shower_weta1",&electron_shower_weta1); RawElectronTree->SetBranchAddress("electron_shower_wtots1",&electron_shower_wtots1); RawElectronTree->SetBranchAddress("electron_shower_fracs1",&electron_shower_fracs1); RawElectronTree->SetBranchAddress("electron_shower_weta2",&electron_shower_weta2); RawElectronTree->SetBranchAddress("electron_shower_widths2",&electron_shower_widths2); RawElectronTree->SetBranchAddress("electron_shower_pos7",&electron_shower_pos7); RawElectronTree->SetBranchAddress("electron_shower_r33over37allcalo",&electron_shower_r33over37allcalo); // This is the loop skeleton // To read only selected branches, Insert statements like: // RawElectronTree->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Long64_t nentries = RawElectronTree->GetEntries(); Long64_t nbytes = 0; // for (Long64_t i=0; iGetEntry(i); // } }