Changeset b4ec6ac in git for examples/Validation.cpp
- Timestamp:
- Sep 29, 2016, 6:53:23 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- e0a1a44
- Parents:
- 0b3c137
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/Validation.cpp
r0b3c137 rb4ec6ac 1328 1328 TClonesArray *branchTrackElectron = treeReaderElectron->UseBranch("Track"); 1329 1329 TClonesArray *branchElectron = treeReaderElectron->UseBranch("Electron"); 1330 TClonesArray *branchElectronPF = treeReaderElectron->UseBranch("ElectronPF"); 1330 1331 1331 1332 TClonesArray *branchParticleMuon = treeReaderMuon->UseBranch("Particle"); … … 1915 1916 1916 1917 HistogramsCollection(&plots_pfele_res_e[k], TMath::Log10(ptMin), TMath::Log10(ptMax), "pfele"); 1917 GetEres<Electron>(&plots_pfele_res_e[k], branchElectron , branchParticleElectron, 11, etaVals.at(k), etaVals.at(k+1), treeReaderElectron);1918 GetEres<Electron>(&plots_pfele_res_e[k], branchElectronPF, branchParticleElectron, 11, etaVals.at(k), etaVals.at(k+1), treeReaderElectron); 1918 1919 gr_pfele_res_e[k] = EresGraph(&plots_pfele_res_e[k]); 1919 1920 … … 1925 1926 leg_pfele_res_e[k]->SetHeader(s_eta); 1926 1927 1927 addResoGraph(mg_pfele_res_e[k], &gr_ecal_res_e[k], leg_pfele_res_e[k], markerStyles.at(0), colors.at(0), " ecal");1928 addResoGraph(mg_pfele_res_e[k], &gr_trkele_res_pt[k], leg_pfele_res_e[k], markerStyles.at(1), colors.at(1), " track");1929 addResoGraph(mg_pfele_res_e[k], &gr_pfele_res_e[k], leg_pfele_res_e[k], markerStyles.at(2), colors.at(2), " p-flow");1928 addResoGraph(mg_pfele_res_e[k], &gr_ecal_res_e[k], leg_pfele_res_e[k], markerStyles.at(0), colors.at(0), "ECAL"); 1929 addResoGraph(mg_pfele_res_e[k], &gr_trkele_res_pt[k], leg_pfele_res_e[k], markerStyles.at(1), colors.at(1), "Track"); 1930 addResoGraph(mg_pfele_res_e[k], &gr_pfele_res_e[k], leg_pfele_res_e[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 1930 1931 1931 1932 c_pfele_res_e[k] = new TCanvas("","", 800, 600); … … 1954 1955 1955 1956 HistogramsCollectionVsEta(&plots_pfele_res_eta[k], etaMin, etaMax, 0.5*ptVals.at(k), 2.0*ptVals.at(k), "pfele", 0.0, 2.0); 1956 GetEresVsEta<Electron>(&plots_pfele_res_eta[k], branchElectron , branchParticleElectron, 11, 0.5*ptVals.at(k), 2.0*ptVals.at(k), treeReaderElectron);1957 GetEresVsEta<Electron>(&plots_pfele_res_eta[k], branchElectronPF, branchParticleElectron, 11, 0.5*ptVals.at(k), 2.0*ptVals.at(k), treeReaderElectron); 1957 1958 gr_pfele_res_eta[k] = EresGraphVsEta(&plots_pfele_res_eta[k]); 1958 1959 … … 1964 1965 leg_pfele_res_eta[k]->SetHeader(s_e); 1965 1966 1966 addResoGraph(mg_pfele_res_eta[k], &gr_ecal_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(0), colors.at(0), " ecal");1967 addResoGraph(mg_pfele_res_eta[k], &gr_trkele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(1), colors.at(1), " track");1968 addResoGraph(mg_pfele_res_eta[k], &gr_pfele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(2), colors.at(2), " p-flow");1967 addResoGraph(mg_pfele_res_eta[k], &gr_ecal_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(0), colors.at(0), "ECAL"); 1968 addResoGraph(mg_pfele_res_eta[k], &gr_trkele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(1), colors.at(1), "Track"); 1969 addResoGraph(mg_pfele_res_eta[k], &gr_pfele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 1969 1970 1970 1971 c_pfele_res_eta[k] = new TCanvas("","", 800, 600); … … 2020 2021 leg_pfpi_res_e[k]->SetHeader(s_eta); 2021 2022 2022 addResoGraph(mg_pfpi_res_e[k], &gr_hcal_res_e[k], leg_pfpi_res_e[k], markerStyles.at(0), colors.at(0), " hcal");2023 addResoGraph(mg_pfpi_res_e[k], &gr_trkpi_res_pt[k], leg_pfpi_res_e[k], markerStyles.at(1), colors.at(1), " track");2024 addResoGraph(mg_pfpi_res_e[k], &gr_pfpi_res_e[k], leg_pfpi_res_e[k], markerStyles.at(2), colors.at(2), " p-flow");2023 addResoGraph(mg_pfpi_res_e[k], &gr_hcal_res_e[k], leg_pfpi_res_e[k], markerStyles.at(0), colors.at(0), "HCAL"); 2024 addResoGraph(mg_pfpi_res_e[k], &gr_trkpi_res_pt[k], leg_pfpi_res_e[k], markerStyles.at(1), colors.at(1), "Track"); 2025 addResoGraph(mg_pfpi_res_e[k], &gr_pfpi_res_e[k], leg_pfpi_res_e[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 2025 2026 2026 2027 c_pfpi_res_e[k] = new TCanvas("","", 800, 600); … … 2058 2059 leg_pfpi_res_eta[k]->SetHeader(s_e); 2059 2060 2060 addResoGraph(mg_pfpi_res_eta[k], &gr_hcal_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(0), colors.at(0), " hcal");2061 addResoGraph(mg_pfpi_res_eta[k], &gr_trkpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(1), colors.at(1), " track");2062 addResoGraph(mg_pfpi_res_eta[k], &gr_pfpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(2), colors.at(2), " p-flow");2061 addResoGraph(mg_pfpi_res_eta[k], &gr_hcal_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(0), colors.at(0), "HCAL"); 2062 addResoGraph(mg_pfpi_res_eta[k], &gr_trkpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(1), colors.at(1), "Track"); 2063 addResoGraph(mg_pfpi_res_eta[k], &gr_pfpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(2), colors.at(2), "Particle-flow"); 2063 2064 2064 2065 c_pfpi_res_eta[k] = new TCanvas("","", 800, 600); … … 2107 2108 2108 2109 mg_pfjet_res_e[k] = new TMultiGraph("",""); 2109 leg_pfjet_res_e[k] = new TLegend(0. 60,0.60,0.90,0.90);2110 leg_pfjet_res_e[k] = new TLegend(0.40,0.70,0.90,0.90); 2110 2111 2111 2112 HistogramsCollection(&plots_pfjet_res_e[k], TMath::Log10(ptMin), TMath::Log10(ptMax), "pfjet"); … … 2120 2121 s_etaMin = Form("%.1f",etaVals.at(k)); 2121 2122 s_etaMax = Form("%.1f",etaVals.at(k+1)); 2122 s_eta = " jets,"+ s_etaMin + " < | #eta | < " + s_etaMax;2123 s_eta = "anti-k_{T}, R = 0.4, "+ s_etaMin + " < | #eta | < " + s_etaMax; 2123 2124 2124 2125 leg_pfjet_res_e[k]->SetTextFont(132); 2125 2126 leg_pfjet_res_e[k]->SetHeader(s_eta); 2126 2127 2127 addResoGraph(mg_pfjet_res_e[k], &gr_cajet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(0), colors.at(0), " calo");2128 addResoGraph(mg_pfjet_res_e[k], &gr_pfjet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(1), colors.at(1), " p-flow");2128 addResoGraph(mg_pfjet_res_e[k], &gr_cajet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(0), colors.at(0), "Calorimeter Jets"); 2129 addResoGraph(mg_pfjet_res_e[k], &gr_pfjet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(1), colors.at(1), "Particle-flow Jets"); 2129 2130 2130 2131 c_pfjet_res_e[k] = new TCanvas("","", 800, 600); … … 2150 2151 2151 2152 mg_pfjet_res_eta[k] = new TMultiGraph("",""); 2152 leg_pfjet_res_eta[k] = new TLegend(0. 40,0.60,0.75,0.90);2153 leg_pfjet_res_eta[k] = new TLegend(0.30,0.70,0.85,0.90); 2153 2154 2154 2155 HistogramsCollectionVsEta(&plots_pfjet_res_eta[k], etaMin, etaMax, 0.5*ptVals.at(k), 2.0*ptVals.at(k), "pfjet", 0.0, 2.0); … … 2161 2162 gr_cajet_res_eta[k] = EresGraphVsEta(&plots_cajet_res_eta[k]); 2162 2163 2163 s_e = Form(" jets, E = %.0f GeV",ptVals.at(k));2164 if(ptVals.at(k) >= 1000.) s_e = Form(" jets,E = %.0f TeV",ptVals.at(k)/1000.);2164 s_e = Form("anti-k_{T}, R = 0.4, jets, E = %.0f GeV",ptVals.at(k)); 2165 if(ptVals.at(k) >= 1000.) s_e = Form("anti-k_{T}, R = 0.4, E = %.0f TeV",ptVals.at(k)/1000.); 2165 2166 2166 2167 leg_pfjet_res_eta[k]->SetTextFont(132); 2167 2168 leg_pfjet_res_eta[k]->SetHeader(s_e); 2168 2169 2169 addResoGraph(mg_pfjet_res_eta[k], &gr_cajet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(0), colors.at(0), " calo");2170 addResoGraph(mg_pfjet_res_eta[k], &gr_pfjet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(1), colors.at(1), " p-flow");2170 addResoGraph(mg_pfjet_res_eta[k], &gr_cajet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(0), colors.at(0), "Calorimeter Jets"); 2171 addResoGraph(mg_pfjet_res_eta[k], &gr_pfjet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(1), colors.at(1), "Particle-flow Jets"); 2171 2172 2172 2173 c_pfjet_res_eta[k] = new TCanvas("","", 800, 600); … … 2205 2206 TGraphErrors gr_camet_res_ht = MetResGraph(&plots_camet, true); 2206 2207 2207 addResoGraph(mg_met_res_ht, &gr_camet_res_ht, leg_met_res_ht, markerStyles.at(0), colors.at(0), " calo");2208 addResoGraph(mg_met_res_ht, &gr_pfmet_res_ht, leg_met_res_ht, markerStyles.at(1), colors.at(1), " p-flow");2208 addResoGraph(mg_met_res_ht, &gr_camet_res_ht, leg_met_res_ht, markerStyles.at(0), colors.at(0), "Calorimeter E_{T}^{miss}"); 2209 addResoGraph(mg_met_res_ht, &gr_pfmet_res_ht, leg_met_res_ht, markerStyles.at(1), colors.at(1), "Particle-flow E_{T}^{miss}"); 2209 2210 2210 2211 TCanvas *c_met_res_ht = new TCanvas("","", 800, 600); 2211 2212 2212 2213 mg_met_res_ht->Draw("APE"); 2213 DrawAxis(mg_met_res_ht, leg_met_res_ht, 10, 10000, 0.1, 1000, " #sum p_{T} [GeV]", "resolution in E_{x,y} [GeV]", true, true);2214 DrawAxis(mg_met_res_ht, leg_met_res_ht, 10, 10000, 0.1, 1000, " #sum p_{T} [GeV]", "resolution in E_{x,y}^{miss} [GeV]", true, true); 2214 2215 2215 2216 leg_met_res_ht->Draw();
Note:
See TracChangeset
for help on using the changeset viewer.