#define ntpBestPbarp_cxx #include "ntpBestPbarp.h" #include #include #include void ntpBestPbarp::Loop() { // In a ROOT session, you can do: // Root > .L ntpBestPbarp.C // Root > ntpBestPbarp t // Root > t.GetEntry(12); // Fill t data members with entry number 12 // Root > t.Show(); // Show values of entry 12 // Root > t.Show(16); // Read and show values of entry 16 // Root > t.Loop(); // Loop on all entries // // This is the loop skeleton where: // jentry is the global entry number in the chain // ientry is the entry number in the current Tree // Note that the argument to GetEntry must be: // jentry for TChain::GetEntry // ientry for TTree::GetEntry and TBranch::GetEntry // // To read only selected branches, Insert statements like: // METHOD1: // fChain->SetBranchStatus("*",0); // disable all branches // fChain->SetBranchStatus("branchname",1); // activate branchname // METHOD2: replace line // fChain->GetEntry(jentry); //read all branches //by b_branchname->GetEntry(ientry); //read only this branch if (fChain == 0) return; Long64_t nentries = fChain->GetEntriesFast(); Long64_t nbytes = 0, nb = 0; for (Long64_t jentry=0; jentryGetEntry(jentry); nbytes += nb; h_fit_chisq->Fill(fitter_chisq); h_fit2_chisq->Fill(fitter_chisq); if (Cut(ientry) < 0) continue; h_fit_prob->Fill(fitter_prob); h_lam_m->Fill(pbarpfit_d0m); h_lam_vtx_pullx->Fill(pbarpfit_d0d0pullx); h_lam_vtx_pully->Fill(pbarpfit_d0d0pully); h_lam_vtx_pullz->Fill(pbarpfit_d0d0pullz); h_pim_tht->Fill(pbarpfit_d0d1tht*180./TMath::Pi()); h_p_tht->Fill(pbarpfit_d0d0tht*180./TMath::Pi()); //AntiLambda h_fit2_prob->Fill(fitter_prob); h_lam2_m->Fill(pbarpfit_d1m); h_lam2_vtx_pullx->Fill(pbarpfit_d1d0pullx); h_lam2_vtx_pully->Fill(pbarpfit_d1d0pully); h_lam2_vtx_pullz->Fill(pbarpfit_d1d0pullz); h_pim2_tht->Fill(pbarpfit_d1d1tht*180./TMath::Pi()); h_p2_tht->Fill(pbarpfit_d1d0tht*180./TMath::Pi()); } }