- Timestamp:
- Oct 13, 2016, 6:52:29 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 44b481d
- Parents:
- 06a83b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Validation.cpp
r06a83b3 rcb159ed 250 250 eta = TMath::Abs(genMomentum.Eta()); 251 251 252 252 253 if(eta > etamax || eta < etamin ) continue; 253 254 255 //cout<<"b parton: "<<pt<<endl; 254 256 if (particle->PID == pdgID && genMomentum.Pt() > ptmin && genMomentum.Pt() < ptmax ) 255 257 { … … 279 281 if( !(jet->BTag & (1 << 0)) ) continue; 280 282 } 281 282 if(TMath::Abs(pdgID) == 1)283 284 if(TMath::Abs(pdgID) == 1) 283 285 { 284 286 Jet *jet = (Jet *)recoObj; … … 299 301 } 300 302 } 301 302 303 histGenPt->Fill(pt); 303 if(deltaR < 0.3 ) { histRecoPt->Fill(pt);}304 if(deltaR < 0.3 && bestRecoMomentum.Pt()> 0.20*pt ) { histRecoPt->Fill(pt);} 304 305 305 306 } … … 1352 1353 TClonesArray *branchCaloJet = treeReaderJet->UseBranch("CaloJet"); 1353 1354 TClonesArray *branchJet = treeReaderJet->UseBranch("Jet"); 1354 1355 1355 1356 TClonesArray *branchParticleBJet = treeReaderBJet->UseBranch("Particle"); 1356 1357 TClonesArray *branchPFBJet = treeReaderBJet->UseBranch("Jet"); … … 1439 1440 const int n_ptbins = ptVals.size(); 1440 1441 1441 1442 1442 ////////////////////////// 1443 1443 // Tracking performance // … … 1906 1906 TGraphErrors gr_pfele_res_eta[n_ptbins]; 1907 1907 1908 TGraphErrors gr_trkele_res_e[n_etabins]; 1909 TGraphErrors gr_trkele_res_eeta[n_ptbins]; 1910 1908 1911 std::vector<resolPlot> plots_pfele_res_e[n_etabins], plots_pfele_res_eta[n_ptbins]; 1912 std::vector<resolPlot> plots_trkele_res_e[n_etabins], plots_trkele_res_eeta[n_ptbins]; 1909 1913 1910 1914 TCanvas *c_pfele_res_e[n_etabins]; … … 1922 1926 gr_pfele_res_e[k] = EresGraph(&plots_pfele_res_e[k]); 1923 1927 1928 HistogramsCollection(&plots_trkele_res_e[k], TMath::Log10(ptMin), TMath::Log10(ptMax), "trkele"); 1929 GetEres<Track>(&plots_trkele_res_e[k], branchTrackElectron, branchParticleElectron, 11, etaVals.at(k), etaVals.at(k+1), treeReaderElectron); 1930 gr_trkele_res_e[k] = EresGraph(&plots_trkele_res_e[k]); 1931 1924 1932 s_etaMin = Form("%.1f",etaVals.at(k)); 1925 1933 s_etaMax = Form("%.1f",etaVals.at(k+1)); … … 1930 1938 1931 1939 addResoGraph(mg_pfele_res_e[k], &gr_ecal_res_e[k], leg_pfele_res_e[k], markerStyles.at(0), colors.at(0), "ECAL"); 1932 addResoGraph(mg_pfele_res_e[k], &gr_trkele_res_ pt[k], leg_pfele_res_e[k], markerStyles.at(1), colors.at(1), "Track");1940 addResoGraph(mg_pfele_res_e[k], &gr_trkele_res_e[k], leg_pfele_res_e[k], markerStyles.at(1), colors.at(1), "Track"); 1933 1941 addResoGraph(mg_pfele_res_e[k], &gr_pfele_res_e[k], leg_pfele_res_e[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 1934 1942 … … 1961 1969 gr_pfele_res_eta[k] = EresGraphVsEta(&plots_pfele_res_eta[k]); 1962 1970 1971 HistogramsCollectionVsEta(&plots_trkele_res_eeta[k], etaMin, etaMax, 0.5*ptVals.at(k), 2.0*ptVals.at(k), "trkele", 0.0, 2.0); 1972 GetEresVsEta<Track>(&plots_trkele_res_eeta[k], branchTrackElectron, branchParticleElectron, 11, 0.5*ptVals.at(k), 2.0*ptVals.at(k), treeReaderElectron); 1973 gr_trkele_res_eeta[k] = EresGraphVsEta(&plots_trkele_res_eeta[k]); 1974 1963 1975 s_e = Form("e^{ #pm}, E = %.0f GeV",ptVals.at(k)); 1964 1976 if(ptVals.at(k) >= 1000.) s_e = Form("e^{ #pm}, E = %.0f TeV",ptVals.at(k)/1000.); … … 1969 1981 1970 1982 addResoGraph(mg_pfele_res_eta[k], &gr_ecal_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(0), colors.at(0), "ECAL"); 1971 addResoGraph(mg_pfele_res_eta[k], &gr_trkele_res_e ta[k], leg_pfele_res_eta[k], markerStyles.at(1), colors.at(1), "Track");1983 addResoGraph(mg_pfele_res_eta[k], &gr_trkele_res_eeta[k], leg_pfele_res_eta[k], markerStyles.at(1), colors.at(1), "Track"); 1972 1984 addResoGraph(mg_pfele_res_eta[k], &gr_pfele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 1973 1985 … … 2001 2013 TGraphErrors gr_pfpi_res_eta[n_ptbins]; 2002 2014 2015 TGraphErrors gr_trkpi_res_e[n_etabins]; 2016 TGraphErrors gr_trkpi_res_eeta[n_ptbins]; 2017 2003 2018 std::vector<resolPlot> plots_pfpi_res_e[n_etabins], plots_pfpi_res_eta[n_ptbins]; 2019 std::vector<resolPlot> plots_trkpi_res_e[n_etabins], plots_trkpi_res_eeta[n_ptbins]; 2004 2020 2005 2021 TCanvas *c_pfpi_res_e[n_etabins]; … … 2017 2033 gr_pfpi_res_e[k] = EresGraph(&plots_pfpi_res_e[k]); 2018 2034 2035 HistogramsCollection(&plots_trkpi_res_e[k], TMath::Log10(ptMin), TMath::Log10(ptMax), "trkpi"); 2036 GetEres<Track>(&plots_trkpi_res_e[k], branchTrackPion, branchParticlePion, 211, etaVals.at(k), etaVals.at(k+1), treeReaderPion); 2037 gr_trkpi_res_e[k] = EresGraph(&plots_trkpi_res_e[k]); 2038 2039 2019 2040 s_etaMin = Form("%.1f",etaVals.at(k)); 2020 2041 s_etaMax = Form("%.1f",etaVals.at(k+1)); … … 2025 2046 2026 2047 addResoGraph(mg_pfpi_res_e[k], &gr_hcal_res_e[k], leg_pfpi_res_e[k], markerStyles.at(0), colors.at(0), "HCAL"); 2027 addResoGraph(mg_pfpi_res_e[k], &gr_trkpi_res_ pt[k], leg_pfpi_res_e[k], markerStyles.at(1), colors.at(1), "Track");2048 addResoGraph(mg_pfpi_res_e[k], &gr_trkpi_res_e[k], leg_pfpi_res_e[k], markerStyles.at(1), colors.at(1), "Track"); 2028 2049 addResoGraph(mg_pfpi_res_e[k], &gr_pfpi_res_e[k], leg_pfpi_res_e[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 2029 2050 … … 2056 2077 gr_pfpi_res_eta[k] = EresGraphVsEta(&plots_pfpi_res_eta[k]); 2057 2078 2079 HistogramsCollectionVsEta(&plots_trkpi_res_eeta[k], etaMin, etaMax, 0.5*ptVals.at(k), 2.0*ptVals.at(k), "trkpi", 0.0, 2.0); 2080 GetEresVsEta<Track>(&plots_trkpi_res_eeta[k], branchPion, branchParticlePion, 211, 0.5*ptVals.at(k), 2.0*ptVals.at(k), treeReaderPion); 2081 gr_trkpi_res_eeta[k] = EresGraphVsEta(&plots_trkpi_res_eeta[k]); 2082 2083 2058 2084 s_e = Form("#pi^{ #pm}, E = %.0f GeV",ptVals.at(k)); 2059 2085 if(ptVals.at(k) >= 1000.) s_e = Form("#pi^{ #pm}, E = %.0f TeV",ptVals.at(k)/1000.); … … 2063 2089 2064 2090 addResoGraph(mg_pfpi_res_eta[k], &gr_hcal_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(0), colors.at(0), "HCAL"); 2065 addResoGraph(mg_pfpi_res_eta[k], &gr_trkpi_res_e ta[k], leg_pfpi_res_eta[k], markerStyles.at(1), colors.at(1), "Track");2091 addResoGraph(mg_pfpi_res_eta[k], &gr_trkpi_res_eeta[k], leg_pfpi_res_eta[k], markerStyles.at(1), colors.at(1), "Track"); 2066 2092 addResoGraph(mg_pfpi_res_eta[k], &gr_pfpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 2067 2093 … … 2418 2444 c_recpho_eff_eta->Print(figPath+"img_recpho_eff_eta.png","png"); 2419 2445 2446 2420 2447 ///////////////////////////////////////// 2421 2448 // B-jets Efficiency/ mistag rates /// … … 2482 2509 c_recbjet_eff_eta->Print(figPath+"img_recbjet_eff_eta.png","png"); 2483 2510 2484 2485 2486 2511 // ------ c - mistag ------ 2487 2512 … … 2560 2585 for (k = 0; k < etaVals.size()-1; k++) 2561 2586 { 2562 2587 2563 2588 h_recbjet_lmis_pt = GetEffPt<Jet>(branchJet, branchParticleJet, "Jet", 1, ptMin, ptMax, etaVals.at(k), etaVals.at(k+1), treeReaderJet); 2564 2589 gr_recbjet_lmis_pt[k] = TGraphErrors(h_recbjet_lmis_pt); … … 2589 2614 2590 2615 mg_recbjet_lmis_pt->Draw("APE"); 2591 DrawAxis(mg_recbjet_lmis_pt, leg_recbjet_lmis_pt, ptMin, ptMax, 0.0, 0. 005, "p_{T} [GeV]", "light - mistag rate (%)", true, false);2616 DrawAxis(mg_recbjet_lmis_pt, leg_recbjet_lmis_pt, ptMin, ptMax, 0.0, 0.5, "p_{T} [GeV]", "light - mistag rate (%)", true, false); 2592 2617 leg_recbjet_lmis_pt->Draw(); 2593 2618 pave->Draw(); … … 2600 2625 2601 2626 mg_recbjet_lmis_eta->Draw("APE"); 2602 DrawAxis(mg_recbjet_lmis_eta, leg_recbjet_lmis_eta, etaMin, etaMax, 0.0, 0. 005, " #eta ", "light - mistag rate (%)", false, false);2627 DrawAxis(mg_recbjet_lmis_eta, leg_recbjet_lmis_eta, etaMin, etaMax, 0.0, 0.5, " #eta ", "light - mistag rate (%)", false, false); 2603 2628 leg_recbjet_lmis_eta->Draw(); 2604 2629 pave->Draw(); … … 2718 2743 2719 2744 mg_rectaujet_mis_pt->Draw("APE"); 2720 DrawAxis(mg_rectaujet_mis_pt, leg_rectaujet_mis_pt, ptMin, ptMax, 0.0, 10., "p_{T} [GeV]", "#tau - mistag(%)", true, false);2745 DrawAxis(mg_rectaujet_mis_pt, leg_rectaujet_mis_pt, ptMin, ptMax, 0.0, 5., "p_{T} [GeV]", "#tau - mistag(%)", true, false); 2721 2746 leg_rectaujet_mis_pt->Draw(); 2722 2747 pave->Draw(); … … 2750 2775 plots_trkpi_res_pt[k].at(bin).resolHist->Write(); 2751 2776 plots_trkele_res_pt[k].at(bin).resolHist->Write(); 2752 2777 plots_trkmu_res_pt[k].at(bin).resolHist->Write(); 2753 2778 plots_ecal_res_e[k].at(bin).resolHist->Write(); 2754 2779 plots_hcal_res_e[k].at(bin).resolHist->Write(); … … 2780 2805 2781 2806 fout->Write(); 2807 2808 2809 2782 2810 2783 2811 cout << "** Exiting..." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.