{ ////////////////////////////////////////////////////////// // This file has been automatically generated // (Tue Jul 14 10:50:36 2009 by ROOT version5.18/00d) // from TChain HiggsTree/ ////////////////////////////////////////////////////////// //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 *HiggsTree = (TTree*)gDirectory->Get("HiggsTree"); #else // SINGLE_TREE // The following code should be used if you want this code to access a chain // of trees. TChain *HiggsTree = new TChain("HiggsTree",""); HiggsTree->Add("/scratch/dervan/H130GeV_Output.root/HiggsTree"); #endif // SINGLE_TREE //Declaration of leaves types Int_t RunNumber; Int_t EventNumber; Char_t Token[153]; vector H4e_pt; vector H4e_eta; vector H4e_rapidity; vector H4e_phi; vector H4e_m; vector > H4e_charge; vector > H4e_pdgid; vector > H4e_element_pt; vector > H4e_element_eta; vector > H4e_element_rapidity; vector > H4e_element_phi; vector > H4e_element_m; vector > H4e_element_charge; vector > H4e_element_pdgid; vector > H4e_element_index; vector H2e2mu_pt; vector H2e2mu_eta; vector H2e2mu_rapidity; vector H2e2mu_phi; vector H2e2mu_m; vector > H2e2mu_charge; vector > H2e2mu_pdgid; vector > H2e2mu_element_pt; vector > H2e2mu_element_eta; vector > H2e2mu_element_rapidity; vector > H2e2mu_element_phi; vector > H2e2mu_element_m; vector > H2e2mu_element_charge; vector > H2e2mu_element_pdgid; vector > H2e2mu_element_index; vector H4mu_pt; vector H4mu_eta; vector H4mu_rapidity; vector H4mu_phi; vector H4mu_m; vector > H4mu_charge; vector > H4mu_pdgid; vector > H4mu_element_pt; vector > H4mu_element_eta; vector > H4mu_element_rapidity; vector > H4mu_element_phi; vector > H4mu_element_m; vector > H4mu_element_charge; vector > H4mu_element_pdgid; vector > H4mu_element_index; // Set branch addresses. HiggsTree->SetBranchAddress("RunNumber",&RunNumber); HiggsTree->SetBranchAddress("EventNumber",&EventNumber); HiggsTree->SetBranchAddress("Token",Token); HiggsTree->SetBranchAddress("H4e_pt",&H4e_pt); HiggsTree->SetBranchAddress("H4e_eta",&H4e_eta); HiggsTree->SetBranchAddress("H4e_rapidity",&H4e_rapidity); HiggsTree->SetBranchAddress("H4e_phi",&H4e_phi); HiggsTree->SetBranchAddress("H4e_m",&H4e_m); HiggsTree->SetBranchAddress("H4e_charge",&H4e_charge); HiggsTree->SetBranchAddress("H4e_pdgid",&H4e_pdgid); HiggsTree->SetBranchAddress("H4e_element_pt",&H4e_element_pt); HiggsTree->SetBranchAddress("H4e_element_eta",&H4e_element_eta); HiggsTree->SetBranchAddress("H4e_element_rapidity",&H4e_element_rapidity); HiggsTree->SetBranchAddress("H4e_element_phi",&H4e_element_phi); HiggsTree->SetBranchAddress("H4e_element_m",&H4e_element_m); HiggsTree->SetBranchAddress("H4e_element_charge",&H4e_element_charge); HiggsTree->SetBranchAddress("H4e_element_pdgid",&H4e_element_pdgid); HiggsTree->SetBranchAddress("H4e_element_index",&H4e_element_index); HiggsTree->SetBranchAddress("H2e2mu_pt",&H2e2mu_pt); HiggsTree->SetBranchAddress("H2e2mu_eta",&H2e2mu_eta); HiggsTree->SetBranchAddress("H2e2mu_rapidity",&H2e2mu_rapidity); HiggsTree->SetBranchAddress("H2e2mu_phi",&H2e2mu_phi); HiggsTree->SetBranchAddress("H2e2mu_m",&H2e2mu_m); HiggsTree->SetBranchAddress("H2e2mu_charge",&H2e2mu_charge); HiggsTree->SetBranchAddress("H2e2mu_pdgid",&H2e2mu_pdgid); HiggsTree->SetBranchAddress("H2e2mu_element_pt",&H2e2mu_element_pt); HiggsTree->SetBranchAddress("H2e2mu_element_eta",&H2e2mu_element_eta); HiggsTree->SetBranchAddress("H2e2mu_element_rapidity",&H2e2mu_element_rapidity); HiggsTree->SetBranchAddress("H2e2mu_element_phi",&H2e2mu_element_phi); HiggsTree->SetBranchAddress("H2e2mu_element_m",&H2e2mu_element_m); HiggsTree->SetBranchAddress("H2e2mu_element_charge",&H2e2mu_element_charge); HiggsTree->SetBranchAddress("H2e2mu_element_pdgid",&H2e2mu_element_pdgid); HiggsTree->SetBranchAddress("H2e2mu_element_index",&H2e2mu_element_index); HiggsTree->SetBranchAddress("H4mu_pt",&H4mu_pt); HiggsTree->SetBranchAddress("H4mu_eta",&H4mu_eta); HiggsTree->SetBranchAddress("H4mu_rapidity",&H4mu_rapidity); HiggsTree->SetBranchAddress("H4mu_phi",&H4mu_phi); HiggsTree->SetBranchAddress("H4mu_m",&H4mu_m); HiggsTree->SetBranchAddress("H4mu_charge",&H4mu_charge); HiggsTree->SetBranchAddress("H4mu_pdgid",&H4mu_pdgid); HiggsTree->SetBranchAddress("H4mu_element_pt",&H4mu_element_pt); HiggsTree->SetBranchAddress("H4mu_element_eta",&H4mu_element_eta); HiggsTree->SetBranchAddress("H4mu_element_rapidity",&H4mu_element_rapidity); HiggsTree->SetBranchAddress("H4mu_element_phi",&H4mu_element_phi); HiggsTree->SetBranchAddress("H4mu_element_m",&H4mu_element_m); HiggsTree->SetBranchAddress("H4mu_element_charge",&H4mu_element_charge); HiggsTree->SetBranchAddress("H4mu_element_pdgid",&H4mu_element_pdgid); HiggsTree->SetBranchAddress("H4mu_element_index",&H4mu_element_index); // This is the loop skeleton // To read only selected branches, Insert statements like: // HiggsTree->SetBranchStatus("*",0); // disable all branches // TTreePlayer->SetBranchStatus("branchname",1); // activate branchname Long64_t nentries = HiggsTree->GetEntries(); Long64_t nbytes = 0; // for (Long64_t i=0; iGetEntry(i); // } }