3 from plotting
import Subtract, FakeDuplicate, AggregateBins, ROC, Plot, PlotGroup, PlotFolder, Plotter
5 from html
import PlotPurpose
13 _maxEff = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]
14 _maxFake = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]
17 _minMaxResol = [1e-5, 4e-5, 1e-4, 4e-4, 1e-3, 4e-3, 1e-2, 4e-2, 0.1, 0.4, 1]
18 _minMaxN = [5e-1, 5, 5e1, 5e2, 5e3, 5e4, 5e5, 5e6, 5e7, 5e8, 5e9]
21 Plot(
"efficPt", title=
"Efficiency vs p_{T}", xtitle=
"TP p_{T} (GeV)", ytitle=
"efficiency vs p_{T}", xlog=
True, ymax=_maxEff),
22 Plot(
FakeDuplicate(
"fakeduprate_vs_pT", assoc=
"num_assoc(recoToSim)_pT", dup=
"num_duplicate_pT", reco=
"num_reco_pT", title=
"fake+duplicates vs p_{T}"),
23 xtitle=
"track p_{T} (GeV)", ytitle=
"fake+duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
24 Plot(
"effic", xtitle=
"TP #eta", ytitle=
"efficiency vs #eta", title=
"", ymax=_maxEff),
25 Plot(
FakeDuplicate(
"fakeduprate_vs_eta", assoc=
"num_assoc(recoToSim)_eta", dup=
"num_duplicate_eta", reco=
"num_reco_eta", title=
""),
26 xtitle=
"track #eta", ytitle=
"fake+duplicates rate vs #eta", ymax=_maxFake),
27 Plot(
"effic_vs_phi", xtitle=
"TP #phi", ytitle=
"efficiency vs #phi", ymax=_maxEff),
28 Plot(
FakeDuplicate(
"fakeduprate_vs_phi", assoc=
"num_assoc(recoToSim)_phi", dup=
"num_duplicate_phi", reco=
"num_reco_phi", title=
"fake+duplicates vs #phi"),
29 xtitle=
"track #phi", ytitle=
"fake+duplicates rate vs #phi", ymax=_maxFake),
33 Plot(
"effic_vs_dxy", title=
"Efficiency vs dxy", xtitle=
"TP dxy (cm)", ytitle=
"efficiency vs dxy", ymax=_maxEff),
34 Plot(
FakeDuplicate(
"fakeduprate_vs_dxy", assoc=
"num_assoc(recoToSim)_dxy", dup=
"num_duplicate_dxy", reco=
"num_reco_dxy", title=
"fake+duplicates vs dxy"),
35 xtitle=
"track dxy (cm)", ytitle=
"fake+duplicates rate vs dxy", ymax=_maxFake),
36 Plot(
"effic_vs_dxypv", title=
"Efficiency vs dxy(PV)", xtitle=
"TP dxy(PV) (cm)", ytitle=
"efficiency vs dxy(PV)", ymax=_maxEff),
37 Plot(
FakeDuplicate(
"fakeduprate_vs_dxypv", assoc=
"num_assoc(recoToSim)_dxypv", dup=
"num_duplicate_dxypv", reco=
"num_reco_dxypv", title=
"fake+duplicates vs dxy(PV)"),
38 xtitle=
"track dxy(PV) (cm)", ytitle=
"fake+duplicates rate vs dxy(PV)", ymax=_maxFake),
39 Plot(
"effic_vs_dz", xtitle=
"TP dz (cm)", ytitle=
"Efficiency vs dz", title=
"", ymax=_maxEff),
40 Plot(
FakeDuplicate(
"fakeduprate_vs_dz", assoc=
"num_assoc(recoToSim)_dz", dup=
"num_duplicate_dz", reco=
"num_reco_dz", title=
""),
41 xtitle=
"track dz (cm)", ytitle=
"fake+duplicates rate vs dz", ymax=_maxFake),
42 Plot(
"effic_vs_dzpv", xtitle=
"TP dz(PV) (cm)", ytitle=
"Efficiency vs dz(PV)", title=
"", ymax=_maxEff),
43 Plot(
FakeDuplicate(
"fakeduprate_vs_dz(PV)", assoc=
"num_assoc(recoToSim)_dzpv", dup=
"num_duplicate_dzpv", reco=
"num_reco_dzpv", title=
""),
44 xtitle=
"track dz(PV) (cm)", ytitle=
"fake+duplicates rate vs dz(PV)", ymax=_maxFake),
49 Plot(
"effic_vs_hit", xtitle=
"TP hits", ytitle=
"efficiency vs hits", ymax=_maxEff),
50 Plot(
FakeDuplicate(
"fakeduprate_vs_hit", assoc=
"num_assoc(recoToSim)_hit", dup=
"num_duplicate_hit", reco=
"num_reco_hit", title=
"fake+duplicates vs hit"),
51 xtitle=
"track hits", ytitle=
"fake+duplicates rate vs hits", ymax=_maxFake),
52 Plot(
"effic_vs_layer", xtitle=
"TP layers", ytitle=
"efficiency vs layers", xmax=25, ymax=_maxEff),
53 Plot(
FakeDuplicate(
"fakeduprate_vs_layer", assoc=
"num_assoc(recoToSim)_layer", dup=
"num_duplicate_layer", reco=
"num_reco_layer", title=
"fake+duplicates vs layer"),
54 xtitle=
"track layers", ytitle=
"fake+duplicates rate vs layers", ymax=_maxFake, xmax=25),
55 Plot(
"effic_vs_pixellayer", xtitle=
"TP pixel layers", ytitle=
"efficiency vs pixel layers", title=
"", xmax=6, ymax=_maxEff),
56 Plot(
FakeDuplicate(
"fakeduprate_vs_pixellayer", assoc=
"num_assoc(recoToSim)_pixellayer", dup=
"num_duplicate_pixellayer", reco=
"num_reco_pixellayer", title=
""),
57 xtitle=
"track pixel layers", ytitle=
"fake+duplicates rate vs pixel layers", ymax=_maxFake, xmax=6),
58 Plot(
"effic_vs_3Dlayer", xtitle=
"TP 3D layers", ytitle=
"efficiency vs 3D layers", xmax=20, ymax=_maxEff),
59 Plot(
FakeDuplicate(
"fakeduprate_vs_3Dlayer", assoc=
"num_assoc(recoToSim)_3Dlayer", dup=
"num_duplicate_3Dlayer", reco=
"num_reco_3Dlayer", title=
"fake+duplicates vs 3D layer"),
60 xtitle=
"track 3D layers", ytitle=
"fake+duplicates rate vs 3D layers", ymax=_maxFake, xmax=20),
64 _common = {
"ymin": 0,
"ymax": _maxEff}
66 Plot(
"effic_vs_vertpos", xtitle=
"TP vert xy pos (cm)", ytitle=
"efficiency vs vert xy pos", **_common),
67 Plot(
"effic_vs_zpos", xtitle=
"TP vert z pos (cm)", ytitle=
"efficiency vs vert z pos", **_common),
68 Plot(
"effic_vs_dr", xlog=
True, xtitle=
"min #DeltaR", ytitle=
"efficiency vs #DeltaR", **_common),
69 Plot(
"fakerate_vs_dr", xlog=
True, title=
"", xtitle=
"min #DeltaR", ytitle=
"Fake rate vs #DeltaR", ymin=0, ymax=_maxFake)
75 Plot(
"fakeratePt", xtitle=
"track p_{T} (GeV)", ytitle=
"fakerate vs p_{T}", xlog=
True, ymax=_maxFake),
76 Plot(
"duplicatesRate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
77 Plot(
"pileuprate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"pileup rate vs p_{T}", ymax=_maxFake, xlog=
True),
78 Plot(
"fakerate", xtitle=
"track #eta", ytitle=
"fakerate vs #eta", title=
"", ymax=_maxFake),
79 Plot(
"duplicatesRate", xtitle=
"track #eta", ytitle=
"duplicates rate vs #eta", title=
"", ymax=_maxFake),
80 Plot(
"pileuprate", xtitle=
"track #eta", ytitle=
"pileup rate vs #eta", title=
"", ymax=_maxFake),
81 Plot(
"fakerate_vs_phi", xtitle=
"track #phi", ytitle=
"fakerate vs #phi", ymax=_maxFake),
82 Plot(
"duplicatesRate_phi", xtitle=
"track #phi", ytitle=
"duplicates rate vs #phi", ymax=_maxFake),
83 Plot(
"pileuprate_phi", xtitle=
"track #phi", ytitle=
"pileup rate vs #phi", ymax=_maxFake),
86 Plot(
"fakerate_vs_dxy", xtitle=
"track dxy (cm)", ytitle=
"fakerate vs dxy", ymax=_maxFake),
87 Plot(
"duplicatesRate_dxy", xtitle=
"track dxy (cm)", ytitle=
"duplicates rate vs dxy", ymax=_maxFake),
88 Plot(
"pileuprate_dxy", xtitle=
"track dxy (cm)", ytitle=
"pileup rate vs dxy", ymax=_maxFake),
90 Plot(
"fakerate_vs_dxypv", xtitle=
"track dxy(PV) (cm)", ytitle=
"fakerate vs dxy(PV)", ymax=_maxFake),
91 Plot(
"duplicatesRate_dxypv", xtitle=
"track dxy(PV) (cm)", ytitle=
"duplicates rate vs dxy(PV)", ymax=_maxFake),
92 Plot(
"pileuprate_dxypv", xtitle=
"track dxy(PV) (cm)", ytitle=
"pileup rate vs dxy(PV)", ymax=_maxFake),
94 Plot(
"fakerate_vs_dz", xtitle=
"track dz (cm)", ytitle=
"fakerate vs dz", title=
"", ymax=_maxFake),
95 Plot(
"duplicatesRate_dz", xtitle=
"track dz (cm)", ytitle=
"duplicates rate vs dz", title=
"", ymax=_maxFake),
96 Plot(
"pileuprate_dz", xtitle=
"track dz (cm)", ytitle=
"pileup rate vs dz", title=
"", ymax=_maxFake),
98 Plot(
"fakerate_vs_dzpv", xtitle=
"track dz(PV) (cm)", ytitle=
"fakerate vs dz(PV)", title=
"", ymax=_maxFake),
99 Plot(
"duplicatesRate_dzpv", xtitle=
"track dz(PV) (cm)", ytitle=
"duplicates rate vs dz(PV)", title=
"", ymax=_maxFake),
100 Plot(
"pileuprate_dzpv", xtitle=
"track dz(PV) (cm)", ytitle=
"pileup rate vs dz(PV)", title=
"", ymax=_maxFake),
105 Plot(
"fakerate_vs_hit", xtitle=
"track hits", ytitle=
"fakerate vs hits", ymax=_maxFake),
106 Plot(
"duplicatesRate_hit", xtitle=
"track hits", ytitle=
"duplicates rate vs hits", ymax=_maxFake),
107 Plot(
"pileuprate_hit", xtitle=
"track hits", ytitle=
"pileup rate vs hits", ymax=_maxFake),
109 Plot(
"fakerate_vs_layer", xtitle=
"track layers", ytitle=
"fakerate vs layer", ymax=_maxFake, xmax=25),
110 Plot(
"duplicatesRate_layer", xtitle=
"track layers", ytitle=
"duplicates rate vs layers", ymax=_maxFake, xmax=25),
111 Plot(
"pileuprate_layer", xtitle=
"track layers", ytitle=
"pileup rate vs layers", ymax=_maxFake, xmax=25),
113 Plot(
"fakerate_vs_pixellayer", xtitle=
"track pixel layers", ytitle=
"fakerate vs pixel layers", title=
"", ymax=_maxFake, xmax=6),
114 Plot(
"duplicatesRate_pixellayer", xtitle=
"track pixel layers", ytitle=
"duplicates rate vs pixel layers", title=
"", ymax=_maxFake, xmax=6),
115 Plot(
"pileuprate_pixellayer", xtitle=
"track pixel layers", ytitle=
"pileup rate vs pixel layers", title=
"", ymax=_maxFake, xmax=6),
117 Plot(
"fakerate_vs_3Dlayer", xtitle=
"track 3D layers", ytitle=
"fakerate vs 3D layers", ymax=_maxFake, xmax=20),
118 Plot(
"duplicatesRate_3Dlayer", xtitle=
"track 3D layers", ytitle=
"duplicates rate vs 3D layers", ymax=_maxFake, xmax=20),
119 Plot(
"pileuprate_3Dlayer", xtitle=
"track 3D layers", ytitle=
"pileup rate vs 3D layers", ymax=_maxFake, xmax=20)
124 Plot(
"fakerate_vs_chi2", xtitle=
"track #chi^{2}", ytitle=
"fakerate vs #chi^{2}", ymax=_maxFake),
125 Plot(
"duplicatesRate_chi2", xtitle=
"track #chi^{2}", ytitle=
"duplicates rate vs #chi^{2}", ymax=_maxFake),
126 Plot(
"pileuprate_chi2", xtitle=
"track #chi^{2}", ytitle=
"pileup rate vs #chi^{2}", ymax=_maxFake)
131 "ytitle":
"Fake+pileup rate",
136 _common2.update(_common)
137 _common2[
"drawStyle"] =
"pcolz"
138 _common2[
"ztitleoffset"] = 1.5
139 _common2[
"xtitleoffset"] = 7
140 _common2[
"ytitleoffset"] = 10
141 _common2[
"ztitleoffset"] = 6
143 Plot(
ROC(
"effic_vs_fakepileup_dzpvcut",
"effic_vs_dzpvcut",
FakeDuplicate(
"fakepileup_vs_dzpvcut", assoc=
"num_assoc(recoToSim)_dzpvcut", reco=
"num_reco_dzpvcut", dup=
"num_pileup_dzpvcut")),
144 xtitle=
"Efficiency vs. cut on dz(PV)", **_common),
145 Plot(
ROC(
"effic_vs_fakepileup2_dzpvcut",
"effic_vs_dzpvcut",
FakeDuplicate(
"fakepileup_vs_dzpvcut", assoc=
"num_assoc(recoToSim)_dzpvcut", reco=
"num_reco_dzpvcut", dup=
"num_pileup_dzpvcut"), zaxis=
True),
146 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)", **_common2),
148 Plot(
ROC(
"effic_vs_fakepileup_dzpvsigcut",
"effic_vs_dzpvsigcut",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut", assoc=
"num_assoc(recoToSim)_dzpvsigcut", reco=
"num_reco_dzpvsigcut", dup=
"num_pileup_dzpvcut")),
149 xtitle=
"Efficiency vs. cut on dz(PV)/dzError", **_common),
150 Plot(
ROC(
"effic_vs_fakepileup_dzpvsigcut",
"effic_vs_dzpvsigcut",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut", assoc=
"num_assoc(recoToSim)_dzpvsigcut", reco=
"num_reco_dzpvsigcut", dup=
"num_pileup_dzpvcut"), zaxis=
True),
151 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)/dzError", **_common2),
153 Plot(
ROC(
"effic_vs_fakepileup_dzpvcut_pt",
"effic_vs_dzpvcut_pt",
FakeDuplicate(
"fakepileup_vs_dzpvcut_pt", assoc=
"num_assoc(recoToSim)_dzpvcut_pt", reco=
"num_reco_dzpvcut_pt", dup=
"num_pileup_dzpvcut_pt")),
154 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)", **_common),
155 Plot(
ROC(
"effic_vs_fakepileup_dzpvcut_pt",
"effic_vs_dzpvcut_pt",
FakeDuplicate(
"fakepileup_vs_dzpvcut_pt", assoc=
"num_assoc(recoToSim)_dzpvcut_pt", reco=
"num_reco_dzpvcut_pt", dup=
"num_pileup_dzpvcut_pt"), zaxis=
True),
156 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)", **_common2),
158 Plot(
ROC(
"effic_vs_fakepileup_dzpvsigcut",
"effic_vs_dzpvsigcut",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut", assoc=
"num_assoc(recoToSim)_dzpvsigcut", reco=
"num_reco_dzpvsigcut", dup=
"num_pileup_dzpvcut")),
159 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)/dzError", **_common),
160 Plot(
ROC(
"effic_vs_fakepileup_dzpvsigcut",
"effic_vs_dzpvsigcut",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut", assoc=
"num_assoc(recoToSim)_dzpvsigcut", reco=
"num_reco_dzpvsigcut", dup=
"num_pileup_dzpvcut"), zaxis=
True),
161 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)/dzError", **_common2),
162 ], onlyForPileup=
True,
166 Plot(
"effic_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency vs. cut on dz(PV)", ymax=_maxEff),
167 Plot(
"effic_vs_dzpvcut2", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
168 Plot(
"fakerate_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate vs. cut on dz(PV)", ymax=_maxFake),
169 Plot(
"pileuprate_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate vs. cut on dz(PV)", ymax=_maxFake),
171 Plot(
"effic_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency vs. cut on dz(PV)/dzError", ymax=_maxEff),
172 Plot(
"effic_vs_dzpvsigcut2", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
173 Plot(
"fakerate_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
174 Plot(
"pileuprate_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
175 ], onlyForPileup=
True,
179 Plot(
"effic_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
180 Plot(
"effic_vs_dzpvcut2_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
181 Plot(
"fakerate_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
182 Plot(
"pileuprate_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
184 Plot(
"effic_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
185 Plot(
"effic_vs_dzpvsigcut2_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
186 Plot(
"fakerate_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
187 Plot(
"pileuprate_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
188 ], onlyForPileup=
True,
194 _common = {
"normalizeToUnitArea":
True,
"stat":
True,
"drawStyle":
"hist"}
196 Plot(
"h_dedx_estim1", xtitle=
"dE/dx, harm2", **_common),
197 Plot(
"h_dedx_estim2", xtitle=
"dE/dx, trunc40", **_common),
198 Plot(
"h_dedx_nom1", xtitle=
"dE/dx number of measurements", title=
"", **_common),
199 Plot(
"h_dedx_sat1", xtitle=
"dE/dx number of measurements with saturation", title=
"", **_common),
205 Plot(
"chargeMisIdRate", xtitle=
"#eta", ytitle=
"charge mis-id rate vs #eta", ymax=0.05),
206 Plot(
"chargeMisIdRate_Pt", xtitle=
"p_{T}", ytitle=
"charge mis-id rate vs p_{T}", xmax=300, ymax=0.1, xlog=
True),
207 Plot(
"chargeMisIdRate_hit", xtitle=
"hits", ytitle=
"charge mis-id rate vs hits", title=
""),
208 Plot(
"chargeMisIdRate_phi", xtitle=
"#phi", ytitle=
"charge mis-id rate vs #phi", title=
"", ymax=0.01),
209 Plot(
"chargeMisIdRate_dxy", xtitle=
"dxy", ytitle=
"charge mis-id rate vs dxy", ymax=0.1),
210 Plot(
"chargeMisIdRate_dz", xtitle=
"dz", ytitle=
"charge mis-id rate vs dz", ymax=0.1)
212 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": 1e-6,
"drawStyle":
"hist"}
214 Plot(
"missing_inner_layers", ymax=1, **_common),
215 Plot(
"missing_outer_layers", ymax=1, **_common),
216 Plot(
"hits_eta", stat=
True, statx=0.38, xtitle=
"track #eta", ytitle=
"<hits> vs #eta", ymin=8, ymax=24, statyadjust=[0,0,-0.15]),
217 Plot(
"hits", stat=
True, xtitle=
"track hits", xmin=0, xmax=40, drawStyle=
"hist"),
218 Plot(
"num_simul_pT", xtitle=
"TP p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common),
219 Plot(
"num_reco_pT", xtitle=
"track p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common)
222 Plot(
"chi2", stat=
True, normalizeToUnitArea=
True, ylog=
True, ymin=1e-6, ymax=[0.1, 0.2, 0.5, 1.0001], drawStyle=
"hist", xtitle=
"#chi^{2}", ratioUncertainty=
False),
223 Plot(
"chi2_prob", stat=
True, normalizeToUnitArea=
True, drawStyle=
"hist", xtitle=
"Prob(#chi^{2})"),
224 Plot(
"chi2mean", stat=
True, title=
"", xtitle=
"#eta", ytitle=
"< #chi^{2} / ndf >", ymax=2.5),
225 Plot(
"ptres_vs_eta_Mean", stat=
True, scale=100, title=
"", xtitle=
"#eta", ytitle=
"< #delta p_{T} / p_{T} > [%]", ymin=-1.5, ymax=1.5)
227 _common = {
"stat":
True,
"fit":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist",
"drawCommand":
"",
"xmin": -10,
"xmax": 10,
"ylog":
True,
"ymin": 5e-5,
"ymax": [0.01, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025],
"ratioUncertainty":
False}
229 Plot(
"pullPt", **_common),
230 Plot(
"pullQoverp", **_common),
231 Plot(
"pullPhi", **_common),
232 Plot(
"pullTheta", **_common),
233 Plot(
"pullDxy", **_common),
234 Plot(
"pullDz", **_common),
236 legendDx=0.1, legendDw=-0.1, legendDh=-0.015
238 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"#eta",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
240 Plot(
"phires_vs_eta_Sigma", ytitle=
"#sigma(#delta #phi) [rad]", **_common),
241 Plot(
"cotThetares_vs_eta_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
242 Plot(
"dxyres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{0}) [cm]", **_common),
243 Plot(
"dzres_vs_eta_Sigma", ytitle=
"#sigma(#delta z_{0}) [cm]", **_common),
244 Plot(
"ptres_vs_eta_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
246 _common = {
"title":
"",
"ylog":
True,
"xlog":
True,
"xtitle":
"p_{T}",
"xmin": 0.1,
"xmax": 1000,
"ymin": _minMaxResol,
"ymax": _minMaxResol}
248 Plot(
"phires_vs_pt_Sigma", ytitle=
"#sigma(#delta #phi) [rad]", **_common),
249 Plot(
"cotThetares_vs_pt_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
250 Plot(
"dxyres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{0}) [cm]", **_common),
251 Plot(
"dzres_vs_pt_Sigma", ytitle=
"#sigma(#delta z_{0}) [cm]", **_common),
252 Plot(
"ptres_vs_pt_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
261 _possibleTrackingColls = [
265 'detachedTripletStep',
269 'jetCoreRegionalStep',
270 'muonSeededStepInOut',
271 'muonSeededStepOutIn',
277 quality =
"highPurity"
280 collNameLow = collName.replace(
"Hp",
"").lower()
283 if "general" in collNameLow
or collNameLow
in [
"cutsreco",
"cutsrecofrompv",
"cutsrecofrompvalltp",
284 "cutsrecotracks",
"custrecotracksfrompv",
"cutsrecotracksfrompvalltp"]:
287 for coll
in _possibleTrackingColls:
288 if coll.lower()
in collNameLow:
295 return (algo, quality)
298 return (name, [name])
299 _collLabelMap = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+_possibleTrackingColls))
300 _collLabelMapHp = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+
filter(
lambda n:
"Step" in n, _possibleTrackingColls)))
305 if quality ==
"highPurity":
311 ret =
"generalTracks"
314 _common = {
"drawStyle":
"EP",
"xbinlabelsize": 10,
"xbinlabeloption":
"d"}
315 _commonAB = {
"mapping": _collLabelMap,
317 _commonN = {
"ylog":
True,
"ymin": _minMaxN,
"ymax": _minMaxN}
318 _commonN.update(_common)
321 title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
323 title=
"Efficiency vs collection (no pT cut in denominator)", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
325 Plot(
AggregateBins(
"fakerate",
"fakerate_vs_coll", **_commonAB), title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
326 Plot(
AggregateBins(
"duplicatesRate",
"duplicatesRate_coll", **_commonAB), title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
327 Plot(
AggregateBins(
"pileuprate",
"pileuprate_coll", **_commonAB), title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
330 Plot(
AggregateBins(
"num_reco_coll",
"num_reco_coll", **_commonAB), ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
331 Plot(
AggregateBins(
"num_signal_coll",
"num_assoc(recoToSim)_coll", **_commonAB), ytitle=
"Signal tracks", title=
"Number of signal tracks vs collection", **_commonN),
332 Plot(
AggregateBins(
"num_fake_coll",
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll"), **_commonAB), ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
333 Plot(
AggregateBins(
"num_pileup_coll",
"num_pileup_coll", **_commonAB), ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
334 Plot(
AggregateBins(
"num_duplicate_coll",
"num_duplicate_coll", **_commonAB), ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
336 _commonAB = {
"mapping": _collLabelMapHp,
340 title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
342 title=
"Efficiency vs collection (no pT cut in denominator)", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
343 Plot(
AggregateBins(
"fakerate",
"fakerate_vs_coll", **_commonAB), title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
344 Plot(
AggregateBins(
"duplicatesRate",
"duplicatesRate_coll", **_commonAB), title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
345 Plot(
AggregateBins(
"pileuprate",
"pileuprate_coll", **_commonAB), title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
348 Plot(
AggregateBins(
"num_reco_coll",
"num_reco_coll", **_commonAB), ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
349 Plot(
AggregateBins(
"num_signal_coll",
"num_assoc(recoToSim)_coll", **_commonAB), ytitle=
"Signal tracks", title=
"Number of signal tracks vs collection", **_commonN),
350 Plot(
AggregateBins(
"num_fake_coll",
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll"), **_commonAB), ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
351 Plot(
AggregateBins(
"num_pileup_coll",
"num_pileup_coll", **_commonAB), ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
352 Plot(
AggregateBins(
"num_duplicate_coll",
"num_duplicate_coll", **_commonAB), ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
361 _common = {
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": [1e-6, 1e-5, 1e-4, 1e-3, 1e-2],
"ymax": [1e-2, 1e-1, 1.1]}
363 Plot(
"selectionFlow", xbinlabelsize=10, xbinlabeloption=
"d", drawStyle=
"hist", ylog=
True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]),
364 Plot(
"diffCharge", xtitle=
"Charge", **_common),
365 Plot(
"diffIsHighPurity", xtitle=
"High purity status", **_common),
366 Plot(
"diffNdof", xtitle=
"ndof", **_common),
367 Plot(
"diffNormalizedChi2", xtitle=
"#chi^{2}/ndof", **_common),
370 Plot(
"diffHitPatternNumberOfValidHits", xtitle=
"Valid hits (via HitPattern)", **_common),
371 Plot(
"diffHitPatternNumberOfValidPixelHits", xtitle=
"Valid pixel hits (via HitPattern)", **_common),
372 Plot(
"diffHitPatternHasValidHitInFirstPixelBarrel", xtitle=
"Has valid hit in BPix1 layer (via HitPattern)", **_common),
373 Plot(
"diffHitPatternNumberOfLostPixelHits", xtitle=
"Lost pixel hits (via HitPattern)", **_common),
374 Plot(
"diffNumberOfHits", xtitle=
"Hits", **_common),
375 Plot(
"diffNumberOfPixelHits", xtitle=
"Pixel hits", **_common),
376 Plot(
"diffLostInnerHits", xtitle=
"Lost inner hits", **_common),
381 _common[
"xlabelsize"] = 16
383 Plot(
"diffPx", xtitle=
"p_{x}", **_common),
384 Plot(
"diffVx", xtitle=
"Reference point x", **_common),
385 Plot(
"diffPy", xtitle=
"p_{y}", **_common),
386 Plot(
"diffVy", xtitle=
"Reference point y", **_common),
387 Plot(
"diffPz", xtitle=
"p_{z}", **_common),
388 Plot(
"diffVz", xtitle=
"Reference point z", **_common),
391 _common[
"adjustMarginRight"] = 0.05
393 Plot(
"diffPt", xtitle=
"p_{T}", **_common),
394 Plot(
"diffPtError", xtitle=
"p_{T} error", **_common),
395 Plot(
"diffEta", xtitle=
"#eta", **_common),
396 Plot(
"diffEtaError", xtitle=
"#eta error", **_common),
397 Plot(
"diffPhi", xtitle=
"#phi", **_common),
398 Plot(
"diffPhiError", xtitle=
"#phi error", **_common),
401 Plot(
"diffDxy", xtitle=
"d_{xy}", **_common),
402 Plot(
"diffDxyError", xtitle=
"d_{xy} error", **_common),
403 Plot(
"diffDz", xtitle=
"d_{z}", **_common),
404 Plot(
"diffDzError", xtitle=
"d_{z} error", **_common),
405 Plot(
"diffQoverp", xtitle=
"Q/p", **_common),
406 Plot(
"diffQoverpError", xtitle=
"Q/p error", **_common),
407 Plot(
"diffTheta", xtitle=
"#theta", **_common),
408 Plot(
"diffThetaError", xtitle=
"#theta error", **_common),
415 super(TrackingPlotFolder, self).
__init__(*args, **kwargs)
418 spl = dqmSubFolderName.split(
"_")
425 (algo, quality) = translatedDqmSubFolder
428 if plotFolderName !=
"":
429 ret +=
"_"+plotFolderName
432 if not (algo ==
"ootb" and quality !=
""):
438 """Return True if this subfolder should be processed
441 limitOnlyTo -- Function '(algo, quality) -> bool'
442 translatedDqmSubFolder -- Return value of translateSubFolder
444 (algo, quality) = translatedDqmSubFolder
445 return limitOnlyTo(algo, quality)
449 "DQMData/Run 1/Tracking/Run summary/"+lastDirName,
450 "DQMData/Tracking/"+lastDirName,
451 "DQMData/Run 1/RecoTrackV/Run summary/"+lastDirName,
452 "DQMData/RecoTrackV/"+lastDirName,
485 _packedCandidatePlots = [
486 _packedCandidateFlow,
487 _packedCandidateParam1,
488 _packedCandidateParam2,
489 _packedCandidateMomVert,
490 _packedCandidateHits,
498 summaryName += name+
"_"
499 summaryName +=
"summary"
501 PlotFolder(*_summaryPlots, loopSubFolders=
False, onlyForPileup=onlyForPileup,
504 PlotFolder(*_summaryPlotsHp, loopSubFolders=
False, onlyForPileup=onlyForPileup,
506 section=name+
"_highPurity" if name !=
"" else "highPurity"),
507 fallbackNames=[summaryName])
510 _appendTrackingPlots(
"TrackFromPV",
"fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
515 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
517 plotter.append(
"packedCandidateLostTracks",
_trackingFolders(
"PackedCandidate/lostTracks"),
518 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
521 _iterModuleMap = collections.OrderedDict([
522 (
"initialStepPreSplitting", [
"initialStepSeedLayersPreSplitting",
523 "initialStepSeedsPreSplitting",
524 "initialStepTrackCandidatesPreSplitting",
525 "initialStepTracksPreSplitting",
526 "firstStepPrimaryVerticesPreSplitting",
527 "iter0TrackRefsForJetsPreSplitting",
528 "caloTowerForTrkPreSplitting",
529 "ak4CaloJetsForTrkPreSplitting",
530 "jetsForCoreTrackingPreSplitting",
533 "MeasurementTrackerEvent",
534 "siPixelClusterShapeCache"]),
535 (
"initialStep", [
'initialStepClusters',
536 'initialStepSeedLayers',
538 'initialStepTrackCandidates',
540 'initialStepSelector',
542 (
"lowPtTripletStep", [
'lowPtTripletStepClusters',
543 'lowPtTripletStepSeedLayers',
544 'lowPtTripletStepSeeds',
545 'lowPtTripletStepTrackCandidates',
546 'lowPtTripletStepTracks',
547 'lowPtTripletStepSelector']),
548 (
"pixelPairStep", [
'pixelPairStepClusters',
549 'pixelPairStepSeedLayers',
550 'pixelPairStepSeeds',
551 'pixelPairStepTrackCandidates',
552 'pixelPairStepTracks',
553 'pixelPairStepSelector']),
554 (
"detachedTripletStep", [
'detachedTripletStepClusters',
555 'detachedTripletStepSeedLayers',
556 'detachedTripletStepSeeds',
557 'detachedTripletStepTrackCandidates',
558 'detachedTripletStepTracks',
559 'detachedTripletStepSelector',
560 'detachedTripletStep']),
561 (
"mixedTripletStep", [
'mixedTripletStepClusters',
562 'mixedTripletStepSeedLayersA',
563 'mixedTripletStepSeedLayersB',
564 'mixedTripletStepSeedsA',
565 'mixedTripletStepSeedsB',
566 'mixedTripletStepSeeds',
567 'mixedTripletStepTrackCandidates',
568 'mixedTripletStepTracks',
569 'mixedTripletStepSelector',
570 'mixedTripletStep']),
571 (
"pixelLessStep", [
'pixelLessStepClusters',
572 'pixelLessStepSeedClusters',
573 'pixelLessStepSeedLayers',
574 'pixelLessStepSeeds',
575 'pixelLessStepTrackCandidates',
576 'pixelLessStepTracks',
577 'pixelLessStepSelector',
579 (
"tobTecStep", [
'tobTecStepClusters',
580 'tobTecStepSeedClusters',
581 'tobTecStepSeedLayersTripl',
582 'tobTecStepSeedLayersPair',
583 'tobTecStepSeedsTripl',
584 'tobTecStepSeedsPair',
586 'tobTecStepTrackCandidates',
588 'tobTecStepSelector']),
589 (
"jetCoreRegionalStep", [
'iter0TrackRefsForJets',
592 'jetsForCoreTracking',
593 'firstStepPrimaryVertices',
594 'firstStepGoodPrimaryVertices',
595 'jetCoreRegionalStepSeedLayers',
596 'jetCoreRegionalStepSeeds',
597 'jetCoreRegionalStepTrackCandidates',
598 'jetCoreRegionalStepTracks',
599 'jetCoreRegionalStepSelector']),
600 (
"muonSeededStep", [
'earlyMuons',
601 'muonSeededSeedsInOut',
602 'muonSeededSeedsInOut',
603 'muonSeededTracksInOut',
604 'muonSeededSeedsOutIn',
605 'muonSeededTrackCandidatesOutIn',
606 'muonSeededTracksOutIn',
607 'muonSeededTracksInOutSelector',
608 'muonSeededTracksOutInSelector']),
613 Plot(
AggregateBins(
"iterative",
"reconstruction_step_module_average", _iterModuleMap), ytitle=
"Average processing time [ms]", title=
"Average processing time / event", drawStyle=
"HIST", xbinlabelsize=0.03),
615 Plot(
AggregateBins(
"iterative_norm",
"reconstruction_step_module_average", _iterModuleMap, normalizeTo=
"ak7CaloJets"), ytitle=
"Average processing time / ak7CaloJets", title=
"Average processing time / event (normalized to ak7CaloJets)", drawStyle=
"HIST", xbinlabelsize=0.03)
618 legendDx=-0.1, legendDw=-0.35, legendDy=0.39,
621 Plot(
AggregateBins(
"pixel",
"reconstruction_step_module_average", {
"pixelTracks": [
"pixelTracks"]}), ytitle=
"Average processing time [ms]", title=
"Average processing time / event", drawStyle=
"HIST")
625 timePlotter.append(
"timing", [
626 "DQMData/Run 1/DQM/Run summary/TimerService/Paths",
627 "DQMData/Run 1/DQM/Run summary/TimerService/process RECO/Paths",
633 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist"}
635 Plot(
"TPlip", xtitle=
"TP lip", **_common),
636 Plot(
"TPtip", xtitle=
"TP tip", **_common),
640 tpPlotter.append(
"tp", [
641 "DQMData/Run 1/Tracking/Run summary/TrackingMCTruth/TrackingParticle",
642 "DQMData/Tracking/TrackingMCTruth/TrackingParticle",
def _mapCollectionToAlgoQuality