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