{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Thu Feb 5 14:58:13 2009 by ROOT version5.18/00d) // from TChain ZTree/ ////////////////////////////////////////////////////////// //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("/hepstore/store2/dervan/TestNtupleOutput_130GeV_ZZ_1.root"); if (!f) { f = new TFile("/hepstore/store2/dervan/TestNtupleOutput_130GeV_ZZ_1.root"); } TTree *ZTree = (TTree*)gDirectory->Get("ZTree"); #else // SINGLE_TREE // The following code should be used if you want this code to access a chain // of trees. TChain *ZTree = new TChain("ZTree",""); ZTree->Add("/hepstore/store2/dervan/TestNtupleOutput_130GeV_ZZ_1.root/ZTree"); #endif // SINGLE_TREE //Declaration of leaves types Int_t RunNumber; Int_t EventNumber; Char_t Token[153]; vector Zmumu_pt; vector Zmumu_eta; vector Zmumu_rapidity; vector Zmumu_phi; vector Zmumu_m; vector > Zmumu_charge; vector > Zmumu_pdgid; vector > Zmumu_element_pt; vector > Zmumu_element_eta; vector > Zmumu_element_rapidity; vector > Zmumu_element_phi; vector > Zmumu_element_m; vector > Zmumu_element_charge; vector > Zmumu_element_pdgid; vector Zee_pt; vector Zee_eta; vector Zee_rapidity; vector Zee_phi; vector Zee_m; vector > Zee_charge; vector > Zee_pdgid; vector > Zee_element_pt; vector > Zee_element_eta; vector > Zee_element_rapidity; vector > Zee_element_phi; vector > Zee_element_m; vector > Zee_element_charge; vector > Zee_element_pdgid; // Set branch addresses. ZTree->SetBranchAddress("RunNumber",&RunNumber); ZTree->SetBranchAddress("EventNumber",&EventNumber); ZTree->SetBranchAddress("Token",Token); ZTree->SetBranchAddress("Zmumu_pt",&Zmumu_pt); ZTree->SetBranchAddress("Zmumu_eta",&Zmumu_eta); ZTree->SetBranchAddress("Zmumu_rapidity",&Zmumu_rapidity); ZTree->SetBranchAddress("Zmumu_phi",&Zmumu_phi); ZTree->SetBranchAddress("Zmumu_m",&Zmumu_m); ZTree->SetBranchAddress("Zmumu_charge",&Zmumu_charge); ZTree->SetBranchAddress("Zmumu_pdgid",&Zmumu_pdgid); ZTree->SetBranchAddress("Zmumu_element_pt",&Zmumu_element_pt); ZTree->SetBranchAddress("Zmumu_element_eta",&Zmumu_element_eta); ZTree->SetBranchAddress("Zmumu_element_rapidity",&Zmumu_element_rapidity); ZTree->SetBranchAddress("Zmumu_element_phi",&Zmumu_element_phi); ZTree->SetBranchAddress("Zmumu_element_m",&Zmumu_element_m); ZTree->SetBranchAddress("Zmumu_element_charge",&Zmumu_element_charge); ZTree->SetBranchAddress("Zmumu_element_pdgid",&Zmumu_element_pdgid); ZTree->SetBranchAddress("Zee_pt",&Zee_pt); ZTree->SetBranchAddress("Zee_eta",&Zee_eta); ZTree->SetBranchAddress("Zee_rapidity",&Zee_rapidity); ZTree->SetBranchAddress("Zee_phi",&Zee_phi); ZTree->SetBranchAddress("Zee_m",&Zee_m); ZTree->SetBranchAddress("Zee_charge",&Zee_charge); ZTree->SetBranchAddress("Zee_pdgid",&Zee_pdgid); ZTree->SetBranchAddress("Zee_element_pt",&Zee_element_pt); ZTree->SetBranchAddress("Zee_element_eta",&Zee_element_eta); ZTree->SetBranchAddress("Zee_element_rapidity",&Zee_element_rapidity); ZTree->SetBranchAddress("Zee_element_phi",&Zee_element_phi); ZTree->SetBranchAddress("Zee_element_m",&Zee_element_m); ZTree->SetBranchAddress("Zee_element_charge",&Zee_element_charge); ZTree->SetBranchAddress("Zee_element_pdgid",&Zee_element_pdgid); // This is the loop skeleton // To read only selected branches, Insert statements like: // ZTree->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Long64_t nentries = ZTree->GetEntries(); Long64_t nbytes = 0; // for (Long64_t i=0; iGetEntry(i); // } }