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