1 from __future__
import absolute_import
2 from builtins
import range
9 ROOT.gROOT.SetBatch(
True)
10 ROOT.PyConfig.IgnoreCommandLineOptions =
True
12 from .plotting
import Subtract, FakeDuplicate, CutEfficiency, Transform, AggregateBins, ROC, Plot, PlotEmpty, PlotGroup, PlotOnSideGroup, PlotFolder, Plotter
13 from .html
import PlotPurpose
14 from .
import plotting
15 from .
import validation
24 _maxEff = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025, 1.2, 1.5, 2]
25 _maxFake = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]
28 _minMaxResol = [1e-5, 4e-5, 1e-4, 4e-4, 1e-3, 4e-3, 1e-2, 4e-2, 0.1, 0.4, 1]
29 _minMaxN = [5e-1, 5, 5e1, 5e2, 5e3, 5e4, 5e5, 5e6, 5e7, 5e8, 5e9]
32 _maxHits = [5, 10, 20, 40, 60, 80]
33 _minLayers = [0, 5, 10]
34 _maxLayers = [5, 10, 25]
36 _min3DLayers = [0, 5, 10]
37 _max3DLayers = [5, 10, 20]
38 _minZ = [-60, -40, -20, -10, -5]
39 _maxZ = [5, 10, 20, 40, 60]
40 _minPU = [0, 10, 20, 50, 100, 150]
41 _maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
42 _minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
43 _minMaxMVA = [-1.025, -0.5, 0, 0.5, 1.025]
47 return ([-x
for x
in ma], ma)
50 (_minResidualCotTheta, _maxResidualCotTheta) =
_minMaxResidual([1e-4, 2e-4])
52 (_minResidualDz, _maxResidualDz) = (_minResidualDxy, _maxResidualDxy)
57 _legendDy_2rows = -0.025
58 _legendDy_2rows_3cols = -0.17
59 _legendDy_4rows = 0.09
66 _trackingIterationOrderHistogram =
"DQMData/Run 1/Tracking/Run summary/TrackBuilding/num_reco_coll"
73 xq +=
" (" + unit +
")"
75 effargs = dict(xtitle=
"TP "+xq , ytitle=
"efficiency vs "+q , ymax=_maxEff)
76 fakeargs = dict(xtitle=
"track "+xq, ytitle=
"fake+duplicates rate vs "+q, ymax=_maxFake)
77 effargs.update(common)
78 fakeargs.update(common)
79 effargs.update(effopts)
80 fakeargs.update(fakeopts)
83 Plot(
"effic_vs_"+p, **effargs),
84 Plot(
FakeDuplicate(
"fakeduprate_vs_"+p, assoc=
"num_assoc(recoToSim)_"+p, dup=
"num_duplicate_"+p, reco=
"num_reco_"+p, title=
"fake+duplicates vs "+q), **fakeargs)
96 xq +=
" (" + unit +
")"
100 Plot(
"fakerate_vs_"+p , xtitle=xtitle, ytitle=
"fakerate vs "+q , ymax=_maxFake, **common),
101 Plot(
"duplicatesRate_"+p, xtitle=xtitle, ytitle=
"duplicates rate vs "+q, ymax=_maxFake, **common),
102 Plot(
"pileuprate_"+p , xtitle=xtitle, ytitle=
"pileup rate vs "+q , ymax=_maxFake, **common),
106 return Subtract(
"num_fake_"+postfix,
"num_reco_"+postfix,
"num_assoc(recoToSim)_"+postfix)
112 args = dict(xtitle=
"track "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
116 Plot(
"num_reco_"+p , ytitle=
"tracks", **args),
117 Plot(
"num_assoc(recoToSim)_"+p, ytitle=
"true tracks", **args),
119 Plot(
"num_duplicate_"+p , ytitle=
"duplicate tracks", **args),
126 args = dict(xtitle=
"TP "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
130 Plot(
"num_simul_"+p , ytitle=
"TrackingParticles", **args),
131 Plot(
"num_assoc(simToReco)_"+p, ytitle=
"Reconstructed TPs", **args),
135 pfix =
"_hp" if hp
else ""
136 pfix2 =
"Hp" if hp
else ""
138 xtitle =
"MVA%d output"%num
139 xtitlecut =
"Cut on MVA%d output"%num
140 args = dict(xtitle=xtitle, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
143 xtitle=
"Efficiency (excl. trk eff)", ytitle=
"Fake rate",
144 xmax=_maxEff, ymax=_maxFake,
148 ztitle=
"Cut on MVA%d"%num,
149 xtitleoffset=5, ytitleoffset=6.5, ztitleoffset=4,
150 adjustMarginRight=0.12
152 argsroc2.update(argsroc)
153 argsroc2[
"drawStyle"] =
"pcolz"
155 argsprofile = dict(ymin=_minMaxMVA, ymax=_minMaxMVA)
157 true_cuteff =
CutEfficiency(
"trueeff_vs_mva%dcut%s"%(num,pfix),
"num_assoc(recoToSim)_mva%dcut%s"%(num,pfix))
158 fake_cuteff =
CutEfficiency(
"fakeeff_vs_mva%dcut%s"%(num,pfix),
Subtract(
"num_fake_mva%dcut%s"%(num,pfix),
"num_reco_mva%dcut%s"%(num,pfix),
"num_assoc(recoToSim)_mva%dcut%s"%(num,pfix)))
162 Plot(
"num_assoc(recoToSim)_mva%d%s"%(num,pfix), ytitle=
"true tracks", **args),
163 Plot(
Subtract(
"num_fake_mva%d%s"%(num,pfix),
"num_reco_mva%d%s"%(num,pfix),
"num_assoc(recoToSim)_mva%d%s"%(num,pfix)), ytitle=
"fake tracks", **args),
164 Plot(
"effic_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
166 Plot(
"fakerate_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Fake rate", ymax=_maxFake),
167 Plot(
ROC(
"effic_vs_fake_mva%d%s"%(num,pfix),
"effic_vs_mva%dcut%s"%(num,pfix),
"fakerate_vs_mva%dcut%s"%(num,pfix)), **argsroc),
168 Plot(
ROC(
"effic_vs_fake_mva%d%s"%(num,pfix),
"effic_vs_mva%dcut%s"%(num,pfix),
"fakerate_vs_mva%dcut%s"%(num,pfix), zaxis=
True), **argsroc2),
170 Plot(true_cuteff, xtitle=xtitlecut, ytitle=
"True track selection efficiency", ymax=_maxEff),
171 Plot(fake_cuteff, xtitle=xtitlecut, ytitle=
"Fake track selection efficiency", ymax=_maxEff),
172 Plot(
ROC(
"true_eff_vs_fake_rej_mva%d%s"%(num,pfix), true_cuteff,
Transform(
"fake_rej_mva%d%s"%(num,pfix), fake_cuteff,
lambda x: 1-x)), xtitle=
"True track selection efficiency", ytitle=
"Fake track rejection", xmax=_maxEff, ymax=_maxEff),
173 ], ncols=3, legendDy=_legendDy_1row),
175 Plot(
"mva_assoc(recoToSim)_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for true tracks", xlog=
True, **argsprofile),
176 Plot(
"mva_fake_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for fake tracks", xlog=
True, **argsprofile),
177 Plot(
"mva_assoc(recoToSim)_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for true tracks", **argsprofile),
178 Plot(
"mva_fake_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for fake tracks", **argsprofile),
179 ], legendDy=_legendDy_2rows)
183 Plot(
"efficPt", title=
"Efficiency vs p_{T}", xtitle=
"TP p_{T} (GeV)", ytitle=
"efficiency vs p_{T}", xlog=
True, ymax=_maxEff),
184 Plot(
FakeDuplicate(
"fakeduprate_vs_pT", assoc=
"num_assoc(recoToSim)_pT", dup=
"num_duplicate_pT", reco=
"num_reco_pT", title=
"fake+duplicates vs p_{T}"),
185 xtitle=
"track p_{T} (GeV)", ytitle=
"fake+duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
186 Plot(
"effic", xtitle=
"TP #eta", ytitle=
"efficiency vs #eta", title=
"", ymax=_maxEff),
187 Plot(
FakeDuplicate(
"fakeduprate_vs_eta", assoc=
"num_assoc(recoToSim)_eta", dup=
"num_duplicate_eta", reco=
"num_reco_eta", title=
""),
188 xtitle=
"track #eta", ytitle=
"fake+duplicates rate vs #eta", ymax=_maxFake),
196 legendDy=_legendDy_2rows
203 legendDy=_legendDy_4rows
205 _effandfakeHitsLayers =
PlotGroup(
"effandfakeHitsLayers",
209 _makeEffFakeDupPlots(
"3Dlayer" ,
"3D layers" , common=dict(xmin=_min3DLayers, xmax=_max3DLayers)),
210 legendDy=_legendDy_4rows
212 _common = {
"ymin": 0,
"ymax": _maxEff}
214 _makeEffFakeDupPlots(
"vertpos",
"vert r",
"cm", fakeopts=dict(xtitle=
"track ref. point r (cm)", ytitle=
"fake+duplicates vs. r"), common=dict(xlog=
True)) +
215 _makeEffFakeDupPlots(
"zpos" ,
"vert z",
"cm", fakeopts=dict(xtitle=
"track ref. point z (cm)", ytitle=
"fake+duplicates vs. z")) +
216 _makeEffFakeDupPlots(
"simpvz" ,
"Sim. PV z",
"cm", common=dict(xtitle=
"Sim. PV z (cm)", xmin=_minZ, xmax=_maxZ))
219 _makeEffFakeDupPlots(
"dr" ,
"#DeltaR", effopts=dict(xtitle=
"TP min #DeltaR"), fakeopts=dict(xtitle=
"track min #DeltaR"), common=dict(xlog=
True)) +
220 _makeEffFakeDupPlots(
"drj" ,
"#DeltaR(track, jet)", effopts=dict(xtitle=
"#DeltaR(TP, jet)", ytitle=
"efficiency vs #DeltaR(TP, jet"), fakeopts=dict(xtitle=
"#DeltaR(track, jet)"), common=dict(xlog=
True, xmax=_maxDRJ))+
222 legendDy=_legendDy_4rows
226 _algos_common = dict(removeEmptyBins=
True, xbinlabelsize=10, xbinlabeloption=
"d")
227 _duplicateAlgo =
PlotOnSideGroup(
"duplicateAlgo",
Plot(
"duplicates_oriAlgo_vs_oriAlgo", drawStyle=
"COLZ", adjustMarginLeft=0.1, adjustMarginRight=0.1, **_algos_common))
230 Plot(
"fakeratePt", xtitle=
"track p_{T} (GeV)", ytitle=
"fakerate vs p_{T}", xlog=
True, ymax=_maxFake),
231 Plot(
"duplicatesRate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
232 Plot(
"pileuprate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"pileup rate vs p_{T}", ymax=_maxFake, xlog=
True),
233 Plot(
"fakerate", xtitle=
"track #eta", ytitle=
"fakerate vs #eta", title=
"", ymax=_maxFake),
234 Plot(
"duplicatesRate", xtitle=
"track #eta", ytitle=
"duplicates rate vs #eta", title=
"", ymax=_maxFake),
235 Plot(
"pileuprate", xtitle=
"track #eta", ytitle=
"pileup rate vs #eta", title=
"", ymax=_maxFake),
242 ncols=3, legendDy=_legendDy_2rows_3cols
249 ncols=3, legendDy=_legendDy_4rows
251 _dupandfakeHitsLayers =
PlotGroup(
"dupandfakeHitsLayers",
256 ncols=3, legendDy=_legendDy_4rows
266 _makeFakeDupPileupPlots(
"drj" ,
"#DeltaR(track, jet)", xtitle=
"#DeltaR(track, jet)", common=dict(xlog=
True, xmax=_maxDRJ)) +
270 _seedingLayerSet_common = dict(removeEmptyBins=
True, xbinlabelsize=8, xbinlabeloption=
"d", adjustMarginRight=0.1)
271 _dupandfakeSeedingPlots =
_makeFakeDupPileupPlots(
"seedingLayerSet",
"seeding layers", xtitle=
"", common=_seedingLayerSet_common)
272 _dupandfakeChi2Seeding =
PlotGroup(
"dupandfakeChi2Seeding",
274 _dupandfakeSeedingPlots,
275 ncols=3, legendDy=_legendDy_2rows_3cols
279 "ytitle":
"Fake+pileup rate",
284 _common2.update(_common)
285 _common2[
"drawStyle"] =
"pcolz"
286 _common2[
"ztitleoffset"] = 1.5
287 _common2[
"xtitleoffset"] = 7
288 _common2[
"ytitleoffset"] = 10
289 _common2[
"ztitleoffset"] = 6
291 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")),
292 xtitle=
"Efficiency vs. cut on dz(PV)", **_common),
293 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),
294 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)", **_common2),
296 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_dzpvsigcut")),
297 xtitle=
"Efficiency vs. cut on dz(PV)/dzError", **_common),
298 Plot(
ROC(
"effic_vs_fakepileup2_dzpvsigcut",
"effic_vs_dzpvsigcut",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut", assoc=
"num_assoc(recoToSim)_dzpvsigcut", reco=
"num_reco_dzpvsigcut", dup=
"num_pileup_dzpvsigcut"), zaxis=
True),
299 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)/dzError", **_common2),
300 ], onlyForPileup=
True,
301 legendDy=_legendDy_4rows
304 Plot(
"effic_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency vs. cut on dz(PV)", ymax=_maxEff),
305 Plot(
"effic_vs_dzpvcut2", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
306 Plot(
"fakerate_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate vs. cut on dz(PV)", ymax=_maxFake),
307 Plot(
"pileuprate_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate vs. cut on dz(PV)", ymax=_maxFake),
309 Plot(
"effic_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency vs. cut on dz(PV)/dzError", ymax=_maxEff),
310 Plot(
"effic_vs_dzpvsigcut2", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
311 Plot(
"fakerate_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
312 Plot(
"pileuprate_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
313 ], onlyForPileup=
True,
314 legendDy=_legendDy_4rows
319 _common = {
"normalizeToUnitArea":
True,
"stat":
True,
"drawStyle":
"hist"}
321 Plot(
"h_dedx_estim1", xtitle=
"dE/dx, harm2", **_common),
322 Plot(
"h_dedx_estim2", xtitle=
"dE/dx, trunc40", **_common),
323 Plot(
"h_dedx_nom1", xtitle=
"dE/dx number of measurements", title=
"", **_common),
324 Plot(
"h_dedx_sat1", xtitle=
"dE/dx number of measurements with saturation", title=
"", **_common),
326 legendDy=_legendDy_2rows
330 Plot(
"chargeMisIdRate", xtitle=
"#eta", ytitle=
"charge mis-id rate vs #eta", ymax=0.05),
331 Plot(
"chargeMisIdRate_Pt", xtitle=
"p_{T}", ytitle=
"charge mis-id rate vs p_{T}", xmax=300, ymax=0.1, xlog=
True),
332 Plot(
"chargeMisIdRate_hit", xtitle=
"hits", ytitle=
"charge mis-id rate vs hits", title=
""),
333 Plot(
"chargeMisIdRate_phi", xtitle=
"#phi", ytitle=
"charge mis-id rate vs #phi", title=
"", ymax=0.01),
334 Plot(
"chargeMisIdRate_dxy", xtitle=
"dxy", ytitle=
"charge mis-id rate vs dxy", ymax=0.1),
335 Plot(
"chargeMisIdRate_dz", xtitle=
"dz", ytitle=
"charge mis-id rate vs dz", ymax=0.1)
337 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": 1e-6,
"drawStyle":
"hist"}
339 Plot(
"missing_inner_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
340 Plot(
"missing_outer_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
341 Plot(
"hits_eta", xtitle=
"track #eta", ytitle=
"<hits> vs #eta", ymin=_minHits, ymax=_maxHits, statyadjust=[0,0,-0.15],
342 fallback={
"name":
"nhits_vs_eta",
"profileX":
True}),
343 Plot(
"hits", stat=
True, xtitle=
"track hits", xmin=_minHits, xmax=_maxHits, ylog=
True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle=
"hist"),
344 Plot(
"num_simul_pT", xtitle=
"TP p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common),
345 Plot(
"num_reco_pT", xtitle=
"track p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common)
348 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),
349 Plot(
"chi2_prob", stat=
True, normalizeToUnitArea=
True, drawStyle=
"hist", xtitle=
"Prob(#chi^{2})"),
350 Plot(
"chi2mean", title=
"", xtitle=
"#eta", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5],
351 fallback={
"name":
"chi2_vs_eta",
"profileX":
True}),
352 Plot(
"ptres_vs_eta_Mean", scale=100, title=
"", xtitle=
"TP #eta (PCA to beamline)", ytitle=
"< #delta p_{T} / p_{T} > (%)", ymin=_minResidualPt, ymax=_maxResidualPt),
353 Plot(
"chi2mean_vs_pt", title=
"", xtitle=
"p_{T}", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5], xlog=
True, fallback={
"name":
"chi2_vs_pt",
"profileX":
True}),
354 Plot(
"chi2mean_vs_drj", title=
"", xtitle=
"#DeltaR(track, jet)", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5], xlog=
True, xmax=_maxDRJ, fallback={
"name":
"chi2_vs_drj",
"profileX":
True}),
355 Plot(
"ptres_vs_pt_Mean", title=
"", xtitle=
"p_{T}", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt,xlog=
True)
357 _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}
359 Plot(
"pullPt", **_common),
360 Plot(
"pullQoverp", **_common),
361 Plot(
"pullPhi", **_common),
362 Plot(
"pullTheta", **_common),
363 Plot(
"pullDxy", **_common),
364 Plot(
"pullDz", **_common),
366 legendDx=0.1, legendDw=-0.1, legendDh=-0.015
368 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"TP #eta (PCA to beamline)",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
370 Plot(
"phires_vs_eta_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
371 Plot(
"cotThetares_vs_eta_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
372 Plot(
"dxyres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
373 Plot(
"dzres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
374 Plot(
"ptres_vs_eta_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
376 _common = {
"title":
"",
"ylog":
True,
"xlog":
True,
"xtitle":
"TP p_{T} (PCA to beamline)",
"xmin": 0.1,
"xmax": 1000,
"ymin": _minMaxResol,
"ymax": _minMaxResol}
378 Plot(
"phires_vs_pt_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
379 Plot(
"cotThetares_vs_pt_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
380 Plot(
"dxyres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
381 Plot(
"dzres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
382 Plot(
"ptres_vs_pt_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
384 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"TP #Phi (PCA to beamline)",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
386 Plot(
"dxyres_vs_phi_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
387 Plot(
"dzres_vs_phi_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
388 Plot(
"phires_vs_phi_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
389 Plot(
"ptres_vs_phi_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
401 ncols=4, legendDy=_legendDy_2rows)
407 ncols=4, legendDy=_legendDy_4rows)
409 _makeDistPlots(
"hit" ,
"hits" , common=dict(xmin=_minHits , xmax=_maxHits)) +
410 _makeDistPlots(
"layer" ,
"layers" , common=dict(xmin=_minLayers , xmax=_maxLayers)) +
411 _makeDistPlots(
"pixellayer",
"pixel layers", common=dict( xmax=_maxPixelLayers)) +
412 _makeDistPlots(
"3Dlayer" ,
"3D layers" , common=dict(xmin=_min3DLayers, xmax=_max3DLayers)),
413 ncols=4, legendDy=_legendDy_4rows,
416 _makeDistPlots(
"vertpos",
"ref. point r (cm)", common=dict(xlog=
True)) +
418 _makeDistPlots(
"simpvz" ,
"Sim. PV z (cm)", common=dict(xmin=_minZ, xmax=_maxZ)),
423 _makeDistPlots(
"drj" ,
"#DeltaR(track, jet)", common=dict(xlog=
True, xmax=_maxDRJ)),
424 ncols=2, legendDy=_legendDy_2rows,
426 _extDistSeedingPlots =
_makeDistPlots(
"seedingLayerSet",
"seeding layers", common=dict(xtitle=
"", **_seedingLayerSet_common))
429 _extDistSeedingPlots,
430 ncols=4, legendDy=_legendDy_2rows_3cols
432 _common = dict(title=
"", xtitle=
"TP #eta (PCA to beamline)")
434 Plot(
"phires_vs_eta_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
435 Plot(
"cotThetares_vs_eta_Mean", ytitle=
"< #delta cot(#theta) >", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
436 Plot(
"dxyres_vs_eta_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
437 Plot(
"dzres_vs_eta_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
438 Plot(
"ptres_vs_eta_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
440 _common = dict(title=
"", xlog=
True, xtitle=
"TP p_{T} (PCA to beamline)", xmin=0.1, xmax=1000)
442 Plot(
"phires_vs_pt_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
443 Plot(
"cotThetares_vs_pt_Mean", ytitle=
"< #delta cot(#theta > )", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
444 Plot(
"dxyres_vs_pt_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
445 Plot(
"dzres_vs_pt_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
446 Plot(
"ptres_vs_pt_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
448 _common = dict(title=
"", ytitle=
"Selected tracks/TrackingParticles", ymax=_maxEff)
450 Plot(
"nrec_vs_nsim", title=
"", xtitle=
"TrackingParticles", ytitle=
"Tracks", profileX=
True, xmin=_minMaxTracks, xmax=_minMaxTracks, ymin=_minMaxTracks, ymax=_minMaxTracks),
451 Plot(
"nrecPerNsim_vs_pu", xtitle=
"Pileup", xmin=_minPU, xmax=_maxPU, **_common),
452 Plot(
"nrecPerNsimPt", xtitle=
"p_{T} (GeV)", xlog=
True, **_common),
453 Plot(
"nrecPerNsim", xtitle=
"#eta", **_common)
454 ], legendDy=_legendDy_2rows)
456 Plot(
"PXLhits_vs_eta", xtitle=
"#eta", ytitle=
"<pixel hits>"),
457 Plot(
"PXLlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<pixel layers>"),
458 Plot(
"STRIPhits_vs_eta", xtitle=
"#eta", ytitle=
"<strip hits>"),
459 Plot(
"STRIPlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<strip layers>"),
460 ], legendDy=_legendDy_2rows)
472 ncols=2, legendDy=_legendDy_2rows)
478 ncols=2, legendDy=_legendDy_4rows)
481 _makeDistSimPlots(
"layer" ,
"layers" , common=dict(xmin=_minLayers , xmax=_maxLayers)) +
482 _makeDistSimPlots(
"pixellayer",
"pixel layers", common=dict( xmax=_maxPixelLayers)) +
483 _makeDistSimPlots(
"3Dlayer" ,
"3D layers" , common=dict(xmin=_min3DLayers, xmax=_max3DLayers)),
484 ncols=2, legendDy=_legendDy_4rows,
489 _makeDistSimPlots(
"simpvz" ,
"Sim. PV z (cm)", common=dict(xmin=_minZ, xmax=_maxZ)),
494 _makeDistSimPlots(
"drj" ,
"#DeltaR(TP, jet)", common=dict(xlog=
True, xmax=_maxDRJ)),
495 ncols=2, legendDy=_legendDy_2rows,
504 _possibleTrackingNonIterationColls = [
508 _possibleTrackingColls = [
509 'initialStepPreSplitting',
513 'detachedTripletStep',
527 'displacedGeneralStep',
528 'jetCoreRegionalStep',
529 'muonSeededStepInOut',
530 'muonSeededStepOutIn',
532 ] + _possibleTrackingNonIterationColls
533 _possibleTrackingCollsOld = {
547 ret = subfolder.replace(
"trackingParticleRecoAsssociation",
"AssociatorByHitsRecoDenom")
548 for (old, new)
in [(
"InitialStep",
"Zero"),
549 (
"HighPtTripletStep",
"First"),
550 (
"LowPtQuadStep",
"Second"),
551 (
"LowPtTripletStep",
"Third"),
552 (
"DetachedQuadStep",
"Fourth"),
553 (
"PixelPairStep",
"Fifth"),
554 (
"MuonSeededStepInOut",
"Ninth"),
555 (
"MuonSeededStepOutIn",
"Tenth")]:
556 ret = ret.replace(old, new)
561 for (old, new)
in [(
"initialStep",
"iter0"),
562 (
"highPtTripletStep",
"iter1"),
563 (
"lowPtQuadStep",
"iter2"),
564 (
"lowPtTripletStep",
"iter3"),
565 (
"detachedQuadStep",
"iter4"),
566 (
"pixelPairStep",
"iter5"),
567 (
"muonSeededStepInOut",
"iter9"),
568 (
"muonSeededStepOutIn",
"iter10")]:
569 path = path.replace(old, new)
573 return subfolder.replace(
"trackingParticleRecoAsssociation",
"trackingParticleRecoAsssociationSignal")
575 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsConversion")
577 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsPreSplitting")
581 _additionalTrackQualities = [
588 quality =
"highPurity"
591 collNameNoQuality = collName.replace(
"Hp",
"")
592 for qual
in _additionalTrackQualities:
595 collNameNoQuality = collNameNoQuality.replace(qual,
"")
597 collNameNoQuality = collNameNoQuality.replace(
"Tracks",
"", 1)
600 if collNameLow.find(
"seed") == 0:
601 collNameLow = collNameLow[4:]
602 if collNameLow ==
"initialstepseedspresplitting":
603 collNameLow =
"initialsteppresplittingseeds"
604 elif collNameLow ==
"muonseededseedsinout":
605 collNameLow =
"muonseededstepinoutseeds"
606 elif collNameLow ==
"muonseededseedsoutin":
607 collNameLow =
"muonseededstepoutinseeds"
609 i_seeds = collNameLow.index(
"seeds")
610 quality = collNameLow[i_seeds:]+quality
612 collNameLow = collNameLow[:i_seeds]
615 prefixes = [
"cutsreco",
"cutsrecofrompv",
"cutsrecofrompv2",
"cutsrecofrompvalltp",
"cutsrecoetagreater2p7"]
616 if collNameLow
in [
"general",
"generalfrompv",
"generaletagreater2p7"]+prefixes:
618 elif collNameLow
in [
"pixel",
"pixelfrompv",
"pixelfrompvalltp"]:
623 if coll == collNameLow.replace(pfx,
""):
627 for coll
in _possibleTrackingColls:
628 if testColl(coll.lower()):
633 for coll, name
in six.iteritems(_possibleTrackingCollsOld):
634 if testColl(coll.lower()):
640 algo = collNameNoQuality
643 if algo ==
"muonSeededInOut":
644 algo =
"muonSeededStepInOut"
645 if algo ==
"muonSeededOutIn":
646 algo =
"muonSeededStepOutIn"
648 return (algo, quality)
651 return (name, [name])
652 _collLabelMap = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+_possibleTrackingColls))
653 _collLabelMapHp = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+[n
for n
in _possibleTrackingColls
if "Step" in n]))
657 algo =
"generalTracks"
661 if algo !=
"generalTracks" and "ByOriginalAlgo" not in quality:
663 quality = quality.replace(
"ByOriginalAlgo",
"")
665 if algo !=
"generalTracks" and "ByAlgoMask" not in quality:
667 quality = quality.replace(
"ByAlgoMask",
"")
669 if "Pt09" not in quality:
671 quality = quality.replace(
"Pt09",
"")
674 if quality ==
"highPurity":
677 i_seeds = quality.find(
"seeds")
680 seedSubColl = quality[i_seeds+5:]
681 if seedSubColl !=
"":
682 ret += seedSubColl[0].
upper() + seedSubColl[1:]
689 def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, ptCut=False, seeds=False, midfix=""):
690 _common = {
"drawStyle":
"EP",
"xbinlabelsize": 10,
"xbinlabeloption":
"d"}
691 _commonN = dict(ylog=
True, ymin=_minMaxN, ymax=_minMaxN,
692 normalizeToNumberOfEvents=
True,
694 _commonN.update(_common)
695 _commonAB = dict(mapping=mapping,
696 renameBin=
lambda bl:
_summaryBinRename(bl, highPurity, byOriginalAlgo, byAlgoMask, ptCut, seeds),
697 ignoreMissingBins=
True,
700 if byOriginalAlgo
or byAlgoMask:
701 _commonAB[
"minExistingBins"] = 2
702 prefix =
"summary"+midfix
704 h_eff =
"effic_vs_coll"
705 h_fakerate =
"fakerate_vs_coll"
706 h_duplicaterate =
"duplicatesRate_coll"
707 h_pileuprate =
"pileuprate_coll"
709 h_reco =
"num_reco_coll"
710 h_true =
"num_assoc(recoToSim)_coll"
711 h_fake =
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll")
712 h_duplicate =
"num_duplicate_coll"
713 h_pileup =
"num_pileup_coll"
714 if mapping
is not None:
716 h_fakerate =
AggregateBins(
"fakerate", h_fakerate, **_commonAB)
717 h_duplicaterate =
AggregateBins(
"duplicatesRate", h_duplicaterate, **_commonAB)
718 h_pileuprate =
AggregateBins(
"pileuprate", h_pileuprate, **_commonAB)
723 h_duplicate =
AggregateBins(
"num_duplicate_coll", h_duplicate, **_commonAB)
724 h_pileup =
AggregateBins(
"num_pileup_coll", h_pileup, **_commonAB)
727 Plot(h_eff, title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
728 Plot(h_fakerate, title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
730 Plot(h_duplicaterate, title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
731 Plot(h_pileuprate, title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
733 legendDy=_legendDy_2rows
735 summaryN =
PlotGroup(prefix+
"_ntracks", [
742 Plot(h_reco, ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
743 Plot(h_true, ytitle=
"True tracks", title=
"Number of true tracks vs collection", **_commonN),
744 Plot(h_fake, ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
745 Plot(h_duplicate, ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
746 Plot(h_pileup, ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
749 return (summary, summaryN)
754 (_summaryByOriginalAlgo, _summaryByOriginalAlgoN) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo")
755 (_summaryByOriginalAlgoHp, _summaryByOriginalAlgoNHp) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo", highPurity=
True)
756 (_summaryByAlgoMask, _summaryByAlgoMaskN) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask")
757 (_summaryByAlgoMaskHp, _summaryByAlgoMaskNHp) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask", highPurity=
True)
758 (_summaryPt09, _summaryPt09N) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09")
759 (_summaryPt09Hp, _summaryPt09NHp) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09", highPurity=
True)
768 _common = {
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": [1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2],
"ymax": [1e-2, 1e-1, 1.1]}
770 _commonStatus.update(_common)
771 _commonStatus.update({
"xbinlabelsize": 10,
"xbinlabeloption":
"d",
"drawStyle":
"hist",
"adjustMarginRight": 0.08})
772 _commonLabelSize = {}
773 _commonLabelSize.update(_common)
774 _commonLabelSize.update({
"xlabelsize": 17})
777 Plot(
"selectionFlow", xbinlabelsize=10, xbinlabeloption=
"d", adjustMarginRight=0.1, drawStyle=
"hist", ylog=
True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]),
778 Plot(
"diffCharge", xtitle=
"Charge", **_common),
779 Plot(
"diffIsHighPurity", xtitle=
"High purity status", **_common),
780 Plot(
"diffNdof", xtitle=
"ndof", **_common),
781 Plot(
"diffNormalizedChi2", xtitle=
"#chi^{2}/ndof", **_common),
784 _packedCandidateHitsHitPattern =
PlotGroup(
"hitsHitPattern", [
785 Plot(
"diffHitPatternNumberOfValidHits", xtitle=
"Valid hits (via HitPattern)", **_common),
786 Plot(
"diffHitPatternNumberOfValidPixelHits", xtitle=
"Valid pixel hits (via HitPattern)", **_common),
787 Plot(
"diffHitPatternHasValidHitInFirstPixelBarrel", xtitle=
"Has valid hit in BPix1 layer (via HitPattern)", **_common),
788 Plot(
"diffHitPatternNumberOfLostPixelHits", xtitle=
"Lost pixel hits (via HitPattern)", **_common),
790 legendDy=_legendDy_2rows
793 Plot(
"diffNumberOfHits", xtitle=
"Hits", **_common),
794 Plot(
"diffNumberOfPixelHits", xtitle=
"Pixel hits", **_common),
795 Plot(
"diffLostInnerHits", xtitle=
"Lost inner hits", **_common),
796 Plot(
"numberHitsOverMax", xtitle=
"Number of overflown hits", **_common),
797 Plot(
"numberPixelHitsOverMax", xtitle=
"Number of overflown pixel hits", **_common),
798 Plot(
"numberStripHitsOverMax", xtitle=
"Number of overflown strip hits", **_common),
800 ncols=3, legendDy=_legendDy_2rows_3cols
805 Plot(
"diffNumberOfPixelLayers", xtitle=
"Pixel layers", **_common),
806 Plot(
"diffNumberOfStripLayers", xtitle=
"Strip layers", **_common),
808 Plot(
"diffHitPatternTrackerLayersWithMeasurement", xtitle=
"Layers (via HitPattern)", **_common),
809 Plot(
"diffHitPatternPixelLayersWithMeasurement", xtitle=
"Pixel layers (via HitPattern)", **_common),
810 Plot(
"diffHitPatternStripLayersWithMeasurement", xtitle=
"Strip layers (via HitPattern)", **_common),
812 Plot(
"numberLayersOverMax", xtitle=
"Number of overflown layers", **_common),
813 Plot(
"numberPixelLayersOverMax", xtitle=
"Number of overflown pixel layers", **_common),
814 Plot(
"numberStripLayersOverMax", xtitle=
"Number of overflown strip layers", **_common),
820 _packedCandidateImpactParameter1 =
PlotGroup(
"impactParameter1", [
821 Plot(
"diffDxyAssocPV", xtitle=
"dxy(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
822 Plot(
"diffDxyAssocPVStatus", **_commonStatus),
823 Plot(
"diffDxyAssocPVUnderOverFlowSign", xtitle=
"dxy(assocPV)", **_common),
824 Plot(
"diffDzAssocPV", xtitle=
"dz(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
825 Plot(
"diffDzAssocPVStatus", **_commonStatus),
826 Plot(
"diffDzAssocPVUnderOverFlowSign", xtitle=
"dz(assocPV)", **_common),
827 Plot(
"diffDxyError", xtitle=
"dxyError()", adjustMarginRight=0.02, **_commonLabelSize),
828 Plot(
"diffDszError", xtitle=
"dszError()", adjustMarginRight=0.02, **_commonLabelSize),
829 Plot(
"diffDzError", xtitle=
"dzError()", adjustMarginRight=0.02, **_commonLabelSize),
835 _packedCandidateImpactParameter2 =
PlotGroup(
"impactParameter2", [
836 Plot(
"diffDxyPV", xtitle=
"dxy(PV) via PC", **_commonLabelSize),
837 Plot(
"diffDzPV", xtitle=
"dz(PV) via PC", **_commonLabelSize),
838 Plot(
"diffTrackDxyAssocPV", xtitle=
"dxy(PV) via PC::bestTrack()", **_commonLabelSize),
839 Plot(
"diffTrackDzAssocPV", xtitle=
"dz(PV) via PC::bestTrack()", **_commonLabelSize),
840 Plot(
"diffTrackDxyError", xtitle=
"dxyError() via PC::bestTrack()", adjustMarginRight=0.02, **_commonLabelSize),
841 Plot(
"diffTrackDzError", xtitle=
"dzError() via PC::bestTrack()", **_commonLabelSize),
844 _packedCandidateCovarianceMatrix1 =
PlotGroup(
"covarianceMatrix1", [
845 Plot(
"diffCovQoverpQoverp", xtitle=
"cov(qoverp, qoverp)", **_commonLabelSize),
846 Plot(
"diffCovQoverpQoverpStatus", **_commonStatus),
847 Plot(
"diffCovQoverpQoverpUnderOverFlowSign", xtitle=
"cov(qoverp, qoverp)", **_common),
848 Plot(
"diffCovLambdaLambda", xtitle=
"cov(lambda, lambda)", **_commonLabelSize),
849 Plot(
"diffCovLambdaLambdaStatus", **_commonStatus),
850 Plot(
"diffCovLambdaLambdaUnderOverFlowSign", xtitle=
"cov(lambda, lambda)", **_common),
851 Plot(
"diffCovLambdaDsz", xtitle=
"cov(lambda, dsz)", **_commonLabelSize),
852 Plot(
"diffCovLambdaDszStatus", **_commonStatus),
853 Plot(
"diffCovLambdaDszUnderOverFlowSign", xtitle=
"cov(lambda, dsz)", **_common),
854 Plot(
"diffCovPhiPhi", xtitle=
"cov(phi, phi)", **_commonLabelSize),
855 Plot(
"diffCovPhiPhiStatus", **_commonStatus),
856 Plot(
"diffCovPhiPhiUnderOverFlowSign", xtitle=
"cov(phi, phi)", **_common),
858 ncols=3, legendDy=_legendDy_4rows
860 _packedCandidateCovarianceMatrix2 =
PlotGroup(
"covarianceMatrix2", [
861 Plot(
"diffCovPhiDxy", xtitle=
"cov(phi, dxy)", **_commonLabelSize),
862 Plot(
"diffCovPhiDxyStatus", **_commonStatus),
863 Plot(
"diffCovPhiDxyUnderOverFlowSign", xtitle=
"cov(phi, dxy)", **_common),
864 Plot(
"diffCovDxyDxy", xtitle=
"cov(dxy, dxy)", adjustMarginRight=0.02, **_commonLabelSize),
865 Plot(
"diffCovDxyDxyStatus", **_commonStatus),
866 Plot(
"diffCovDxyDxyUnderOverFlowSign", xtitle=
"cov(dxy, dxy)", **_common),
867 Plot(
"diffCovDxyDsz", xtitle=
"cov(dxy, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
868 Plot(
"diffCovDxyDszStatus", **_commonStatus),
869 Plot(
"diffCovDxyDszUnderOverFlowSign", xtitle=
"cov(dxy, dsz)", **_common),
870 Plot(
"diffCovDszDsz", xtitle=
"cov(dsz, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
871 Plot(
"diffCovDszDszStatus", **_commonStatus),
872 Plot(
"diffCovDszDszUnderOverFlowSign", xtitle=
"cov(dsz, dsz)", **_common),
874 ncols=3, legendDy=_legendDy_4rows
877 _common[
"xlabelsize"] = 16
879 Plot(
"diffVx", xtitle=
"Reference point x", **_common),
880 Plot(
"diffVy", xtitle=
"Reference point y", **_common),
881 Plot(
"diffVz", xtitle=
"Reference point z", **_common),
883 legendDy=_legendDy_2rows
886 _common[
"adjustMarginRight"] = 0.05
888 Plot(
"diffPt", xtitle=
"p_{T}", **_common),
889 Plot(
"diffPtError", xtitle=
"p_{T} error", **_common),
890 Plot(
"diffEta", xtitle=
"#eta", **_common),
891 Plot(
"diffEtaError", xtitle=
"#eta error", **_common),
892 Plot(
"diffPhi", xtitle=
"#phi", **_common),
898 PlotFolder.__init__(self, *args, **kwargs)
901 spl = dqmSubFolderName.split(
"_")
908 (algoOrig, quality) = translatedDqmSubFolder
914 if plotFolderName !=
"":
915 ret +=
"_"+plotFolderName
918 if not (algo ==
"ootb" and quality !=
""):
923 """Return True if this subfolder should be processed
926 limitOnlyTo -- Function '(algo, quality) -> bool'
927 translatedDqmSubFolder -- Return value of translateSubFolder
929 (algo, quality) = translatedDqmSubFolder
930 return limitOnlyTo(algo, quality)
934 return algo
not in _possibleTrackingNonIterationColls
946 def __init__(self, section, collection=GeneralTracks):
962 def _getAlgoQuality(data, algo, quality):
963 for label, value
in six.iteritems(data):
965 if a == algo
and q == quality:
969 h = tdirectory.Get(hname)
974 return _getAlgoQuality(data,
"ootb",
"")
976 return _getAlgoQuality(data,
"ootb",
"Pt09")
978 return _getAlgoQuality(data,
"ootb",
"highPurity")
980 return _getAlgoQuality(data,
"ootb",
"highPurityPt09")
982 return _getAlgoQuality(data,
"btvLike",
"")
984 return _getAlgoQuality(data,
"ak4PFJets",
"")
986 return _getAlgoQuality(data,
"pixel",
"")
988 return _getAlgoQuality(data,
"pixel",
"Pt09")
991 def _formatOrNone(num, func):
996 n_tps = _formatOrNone(_getN(
"num_simul_coll"), int)
997 n_m_tps = _formatOrNone(_getN(
"num_assoc(simToReco)_coll"), int)
999 n_tracks = _formatOrNone(_getN(
"num_reco_coll"), int)
1000 n_true = _formatOrNone(_getN(
"num_assoc(recoToSim)_coll"), int)
1001 if n_tracks
is not None and n_true
is not None:
1002 n_fake = n_tracks-n_true
1005 n_pileup = _formatOrNone(_getN(
"num_pileup_coll"), int)
1006 n_duplicate = _formatOrNone(_getN(
"num_duplicate_coll"), int)
1008 eff = _formatOrNone(_getN(
"effic_vs_coll"),
lambda n:
"%.4f" % n)
1009 eff_nopt = _formatOrNone(_getN(
"effic_vs_coll_allPt"),
lambda n:
"%.4f" % n)
1010 fake = _formatOrNone(_getN(
"fakerate_vs_coll"),
lambda n:
"%.4f" % n)
1011 duplicate = _formatOrNone(_getN(
"duplicatesRate_coll"),
lambda n:
"%.4f" % n)
1013 ret = [eff, n_tps, n_m_tps,
1014 eff_nopt, fake, duplicate,
1015 n_tracks, n_true, n_fake, n_pileup, n_duplicate]
1016 if ret.count(
None) == len(ret):
1023 "Number of TrackingParticles (after cuts)",
1024 "Number of matched TrackingParticles",
1025 "Efficiency (w/o pT cut)",
1029 "Number of true tracks",
1030 "Number of fake tracks",
1031 "Number of pileup tracks",
1032 "Number of duplicate tracks"
1037 def __init__(self, fileName, plots, titles, isRate, **kwargs):
1043 if len(plots) != len(titles):
1044 raise Exception(
"Number of plots (%d) has to be the same as number of titles (%d)" % (len(plots), len(titles)))
1046 def _set(attr, default):
1047 setattr(self,
"_"+attr, kwargs.get(attr, default))
1049 _set(
"onlyForPileup",
False)
1052 """Return True if the PlotGroup is intended only for pileup samples"""
1053 return self._onlyForPileup
1055 def create(self, tdirectoryNEvents, requireAllHistograms=False):
1058 plot.create(tdirectoryNEvents, requireAllHistograms)
1060 def draw(self, legendLabels, prefix=None, directory="", *args, **kwargs):
1062 onlyEmptyPlots =
True
1064 if not plot.isEmpty():
1065 onlyEmptyPlots =
False
1070 haveShortLabels =
False
1071 legendLabels = legendLabels[:]
1072 if max(
map(len, legendLabels)) > 20:
1073 haveShortLabels =
True
1074 labels_short = [
str(chr(ord(
'A')+i))
for i
in range(len(legendLabels))]
1075 for i, ls
in enumerate(labels_short):
1076 legendLabels[i] =
"%s: %s" % (ls, legendLabels[i])
1078 labels_short = legendLabels
1083 ' <table border="1">',
1094 for h, l
in zip(plot._histograms, labels_short):
1096 h_tmp.append(len(histos_linear))
1097 histos_linear.append(h)
1101 histos_index.append(h_tmp)
1102 labels.append(l_tmp)
1105 ' <td colspan="%d">%s</td>' % (len(h_tmp), title),
1108 if len(histos_linear) == 0:
1118 if len(histos_linear) == 0:
1122 if len(histos_linear_new) > 0
and len(histos_linear_new) != len(histos_linear):
1123 raise Exception(
"This should never happen. len(histos_linear_new) %d != len(histos_linear) %d" % (len(histos_linear_new), len(histos_linear)))
1124 histos_linear = histos_linear_new
1125 if len(histos_linear) == 0:
1128 data = [ [h.GetBinContent(i)
for i
in range(1, h.GetNbinsX()+1)]
for h
in histos_linear]
1129 table =
html.Table([
"dummy"]*len(histos_linear), xbinlabels, data,
None,
None,
None)
1130 data = table.tableAsRowColumn()
1133 content.append(
' <td></td>')
1134 content.extend([
' <td>%s</td>' % lab
for lab
in labs])
1139 for irow, row
in enumerate(data):
1142 ' <td>%s</td>' % table.rowHeaders()[irow]
1145 for hindices
in histos_index:
1146 for hindex
in hindices:
1148 formatted = self.
_format%item
if item
is not None else ""
1149 content.append(
' <td align="right">%s</td>' % formatted)
1150 content.append(
' <td></td>')
1152 content.append(
' </tr>')
1154 content.append(
' </table>')
1156 for lab
in legendLabels:
1157 content.append(
' %s<br/>' % lab)
1165 if prefix
is not None:
1168 name = os.path.join(directory, name)
1170 with open(name,
"w")
as f:
1171 for line
in content:
1177 [
"Fake rate",
"Duplicate rate",
"Pileup rate"], isRate=
True)
1179 [
"All tracks",
"True tracks",
"Fake tracks",
"Duplicate tracks"], isRate=
False)
1183 "DQMData/Run 1/Tracking/Run summary/"+lastDirName,
1184 "DQMData/Tracking/"+lastDirName,
1185 "DQMData/Run 1/RecoTrackV/Run summary/"+lastDirName,
1186 "DQMData/RecoTrackV/"+lastDirName,
1190 _effandfakePtEtaPhi,
1193 _effandfakeHitsLayers,
1195 _effandfakeDeltaRPU,
1199 _dupandfakePtEtaPhi,
1202 _dupandfakeHitsLayers,
1204 _dupandfakeDeltaRPU,
1205 _dupandfakeChi2Seeding,
1206 _dupandfakeSeedingTable,
1218 _seedingBuildingPlots = _simBasedPlots + [
1219 _dupandfakePtEtaPhi,
1222 _dupandfakeHitsLayers,
1224 _dupandfakeDeltaRPU,
1225 _dupandfakeChi2Seeding,
1226 _dupandfakeSeedingTable,
1234 _buildingExtendedPlots = [
1248 _extDistChi2Seeding,
1249 _extDistSeedingTable,
1254 _extDistSimPtEtaPhi,
1257 _extDistSimHitsLayers,
1264 _summaryByOriginalAlgo,
1265 _summaryByOriginalAlgoN,
1267 _summaryByAlgoMaskN,
1274 _summaryByOriginalAlgoHp,
1275 _summaryByOriginalAlgoNHp,
1276 _summaryByAlgoMaskHp,
1277 _summaryByAlgoMaskNHp,
1281 _summaryPlotsSeeds = [
1285 _packedCandidatePlots = [
1286 _packedCandidateFlow,
1287 _packedCandidateKinematics,
1288 _packedCandidateVertex,
1289 _packedCandidateImpactParameter1,
1290 _packedCandidateImpactParameter2,
1291 _packedCandidateCovarianceMatrix1,
1292 _packedCandidateCovarianceMatrix2,
1293 _packedCandidateHits,
1294 _packedCandidateHitsHitPattern,
1295 _packedCandidateLayers,
1299 def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, onlyForElectron=False, onlyForConversion=False, onlyForBHadron=False, seeding=False, building=False, rawSummary=False, highPuritySummary=True):
1302 limiters = dict(onlyForPileup=onlyForPileup, onlyForElectron=onlyForElectron, onlyForConversion=onlyForConversion, onlyForBHadron=onlyForBHadron)
1304 _trackingRefFileFallbackSLHC_Phase1PU140
1306 common = dict(fallbackDqmSubFolders=[
1307 _trackingSubFoldersFallbackSLHC_Phase1PU140,
1308 _trackingSubFoldersFallbackFromPV, _trackingSubFoldersFallbackConversion,
1309 _trackingSubFoldersFallbackPreSplitting])
1310 plotter.append(name, folders,
TrackingPlotFolder(*algoPlots, **commonForTPF), **common)
1313 extendedPlots.extend(_buildingExtendedPlots)
1314 extendedPlots.extend(_extendedPlots)
1315 plotterExt.append(name, folders,
TrackingPlotFolder(*extendedPlots, **commonForTPF), **common)
1319 summaryName += name+
"_"
1320 summaryName +=
"summary"
1323 summaryPlots.extend([_summaryRaw, _summaryRawN])
1324 summaryPlots.extend(_summaryPlots)
1329 plotter.append(summaryName, folders,
1330 PlotFolder(*summaryPlots, section=name, **common))
1331 if highPuritySummary:
1332 plotter.append(summaryName+
"_highPurity", folders,
1333 PlotFolder(*_summaryPlotsHp, section=name+
"_highPurity" if name !=
"" else "highPurity", **common),
1334 fallbackNames=[summaryName])
1336 plotter.append(summaryName+
"_seeds", folders,
1337 PlotFolder(*_summaryPlotsSeeds, section=name+
"_seeds", **common))
1341 if highPuritySummary:
1342 sectionName = name+
"_highPurity" if name !=
"" else "highPurity"
1350 _appendTrackingPlots(
"TrackTPEtaGreater2p7",
"tpEtaGreater2p7", _simBasedPlots+_recoBasedPlots)
1352 _appendTrackingPlots(
"TrackFromPV",
"fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1353 _appendTrackingPlots(
"TrackFromPVAllTP",
"fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1354 _appendTrackingPlots(
"TrackFromPVAllTP2",
"fromPVAllTP2", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1357 _appendTrackingPlots(
"TrackConversion",
"conversion", _simBasedPlots+_recoBasedPlots, onlyForConversion=
True, rawSummary=
True, highPuritySummary=
False)
1358 _appendTrackingPlots(
"TrackGsf",
"gsf", _simBasedPlots+_recoBasedPlots, onlyForElectron=
True, rawSummary=
True, highPuritySummary=
False)
1359 _appendTrackingPlots(
"TrackBHadron",
"bhadron", _simBasedPlots+_recoBasedPlots, onlyForBHadron=
True)
1366 plotter.append(name, _folders,
TrackingPlotFolder(*(_simBasedPlots+_recoBasedPlots), **_common))
1381 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1383 plotter.append(
"packedCandidateLostTracks",
_trackingFolders(
"PackedCandidate/lostTracks"),
1384 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1389 "DQMData/Run 1/HLT/Run summary/Tracking/ValidationWRTtp",
1394 plotterHLT.append(
"hlt", _hltFolder,
TrackingPlotFolder(*(_simBasedPlots+_recoBasedPlots), **_common))
1395 plotterHLTExt.append(
"hlt", _hltFolder,
TrackingPlotFolder(*_extendedPlots, **_common))
1399 def __init__(self, name, clusterMasking=None, seeding=None, building=None, fit=None, selection=None, other=[]):
1402 def _set(param, name, modules):
1403 if param
is not None:
1404 setattr(self, name, param)
1406 setattr(self, name, modules)
1408 _set(clusterMasking,
"_clusterMasking", [self.
_name+
"Clusters"])
1411 _set(seeding,
"_seeding", [self.
_name+
"SeedingLayers", self.
_name+
"TrackingRegions", self.
_name+
"HitDoublets", self.
_name+
"HitTriplets", self.
_name+
"HitQuadruplets", self.
_name+
"Seeds"])
1412 _set(building,
"_building", [self.
_name+
"TrackCandidates"])
1413 _set(fit,
"_fit", [self.
_name+
"Tracks"])
1414 _set(selection,
"_selection", [self.
_name])
1421 return self._clusterMasking+self._seeding+self._building+self._fit+self._selection+self.
_other
1424 return self._clusterMasking
1427 return self._seeding
1430 return self._building
1436 return self._selection
1445 (
"Fit", self.
fit()),
1447 (
"Other", self.
other())]
1452 seeding=[
"initialStepSeedLayersPreSplitting",
1453 "initialStepTrackingRegionsPreSplitting",
1454 "initialStepHitDoubletsPreSplitting",
1455 "initialStepHitTripletsPreSplitting",
1456 "initialStepHitQuadrupletsPreSplitting",
1457 "initialStepSeedsPreSplitting"],
1458 building=[
"initialStepTrackCandidatesPreSplitting"],
1459 fit=[
"initialStepTracksPreSplitting"],
1460 other=[
"firstStepPrimaryVerticesPreSplitting",
1461 "initialStepTrackRefsForJetsPreSplitting",
1462 "caloTowerForTrkPreSplitting",
1463 "ak4CaloJetsForTrkPreSplitting",
1464 "jetsForCoreTrackingPreSplitting",
1467 "MeasurementTrackerEvent",
1468 "siPixelClusterShapeCache"]),
1469 Iteration(
"initialStep", clusterMasking=[],
1470 selection=[
"initialStepClassifier1",
1471 "initialStepClassifier2",
1472 "initialStepClassifier3",
1474 "initialStepSelector"],
1475 building=[
"initialStepTrackCandidatesMkFitInput",
1476 "initialStepTrackCandidatesMkFit",
1477 "initialStepTrackCandidates"],
1478 other=[
"firstStepPrimaryVerticesUnsorted",
1479 "initialStepTrackRefsForJets",
1481 "ak4CaloJetsForTrk",
1482 "firstStepPrimaryVertices"]),
1484 selection=[
"highPtTripletStepClassifier1",
1485 "highPtTripletStepClassifier2",
1486 "highPtTripletStepClassifier3",
1487 "highPtTripletStep",
1488 "highPtTripletStepSelector"]),
1490 selection=[
"detachedQuadStepClassifier1",
1491 "detachedQuadStepClassifier2",
1493 "detachedQuadStepSelector"]),
1495 selection=[
"detachedTripletStepClassifier1",
1496 "detachedTripletStepClassifier2",
1497 "detachedTripletStep",
1498 "detachedTripletStepSelector"]),
1500 selection=[
"lowPtQuadStepClassifier1",
1501 "lowPtQuadStepClassifier2",
1503 "lowPtQuadStepSelector"]),
1505 selection=[
"lowPtTripletStepClassifier1",
1506 "lowPtTripletStepClassifier2",
1508 "lowPtTripletStepSelector"]),
1510 seeding=[
"pixelPairStepSeedLayers",
1511 "pixelPairStepSeedLayersB",
1512 "pixelPairStepSeedLayersC",
1513 "pixelPairStepTrackingRegions",
1514 "pixelPairStepTrackingRegionsB",
1515 "pixelPairStepTrackingRegionsC",
1516 "pixelPairStepTrackingRegionsSeedLayersB",
1517 "pixelPairStepHitDoublets",
1518 "pixelPairStepHitDoubletsB",
1519 "pixelPairStepHitDoubletsC",
1520 "pixelPairStepSeedsA",
1521 "pixelPairStepSeedsB",
1522 "pixelPairStepSeedsC",
1523 "pixelPairStepSeeds",],
1524 selection=[
"pixelPairStep",
1525 "pixelPairStepSelector"]),
1527 seeding=[
"mixedTripletStepSeedLayersA",
1528 "mixedTripletStepSeedLayersB",
1529 "mixedTripletStepTrackingRegionsA",
1530 "mixedTripletStepTrackingRegionsB",
1531 "mixedTripletStepHitDoubletsA",
1532 "mixedTripletStepHitDoubletsB",
1533 "mixedTripletStepHitTripletsA",
1534 "mixedTripletStepHitTripletsB",
1535 "mixedTripletStepSeedsA",
1536 "mixedTripletStepSeedsB",
1537 "mixedTripletStepSeeds"],
1538 selection=[
"mixedTripletStepClassifier1",
1539 "mixedTripletStepClassifier2",
1541 "mixedTripletStepSelector"]),
1543 selection=[
"pixelLessStepClassifier1",
1544 "pixelLessStepClassifier2",
1546 "pixelLessStepSelector"]),
1548 seeding=[
"tobTecStepSeedLayersTripl",
1549 "tobTecStepSeedLayersPair",
1550 "tobTecStepTrackingRegionsTripl",
1551 "tobTecStepTrackingRegionsPair",
1552 "tobTecStepHitDoubletsTripl",
1553 "tobTecStepHitDoubletsPair",
1554 "tobTecStepHitTripletsTripl",
1555 "tobTecStepSeedsTripl",
1556 "tobTecStepSeedsPair",
1558 selection=[
"tobTecStepClassifier1",
1559 "tobTecStepClassifier2",
1561 "tobTecStepSelector"]),
1563 seeding=[
"displacedGeneralStepSeedLayers",
1564 "displacedGeneralStepTrackingRegions",
1565 "displacedGeneralStepHitDoublets",
1566 "displacedGeneralStepHitTriplets",
1567 "displacedGeneralStepSeeds"],
1568 selection=[
"displacedGeneralStepClassifier1",
1569 "displacedGeneralStepClassifier2",
1570 "displacedGeneralStep",
1571 "displacedGeneralStepSelector"]),
1574 other=[
"jetsForCoreTracking",
1575 "firstStepGoodPrimaryVertices",
1579 seeding=[
"muonSeededSeedsInOut",
1580 "muonSeededSeedsOutIn"],
1581 building=[
"muonSeededTrackCandidatesInOut",
1582 "muonSeededTrackCandidatesOutIn"],
1583 fit=[
"muonSeededTracksInOut",
1584 "muonSeededTracksOutIn"],
1585 selection=[
"muonSeededTracksInOutClassifier",
1586 "muonSeededTracksInOutSelector",
1587 "muonSeededTracksOutIntClassifier",
1588 "muonSeededTracksOutIntSelector"],
1592 clusterMasking=[], seeding=[],
1593 building=[
"duplicateTrackCandidates"],
1594 fit=[
"mergedDuplicateTracks"],
1595 selection=[
"duplicateTrackClassifier"]),
1597 clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1598 other=[
"preDuplicateMergingGeneralTracks",
1601 clusterMasking=[
"convClusters"],
1602 seeding=[
"convLayerPairs",
1603 "photonConvTrajSeedFromSingleLeg"],
1604 building=[
"convTrackCandidates"],
1605 fit=[
"convStepTracks"],
1606 selection=[
"convStepSelector"]),
1607 Iteration(
"Other", clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1608 other=[
"trackerClusterCheckPreSplitting",
1609 "trackerClusterCheck"]),
1613 iterations = _iterations
1614 if not includeConvStep:
1615 iterations = [i
for i
in iterations
if i.name() !=
"ConvStep"]
1617 iterations = [i
for i
in iterations
if i.name() ==
"ConvStep"]
1618 return collections.OrderedDict([(i.name(), i.all())
for i
in iterations])
1622 for i
in _iterations:
1623 if i.name() ==
"ConvStep":
1625 ret.extend(getattr(i, prop)())
1628 return collections.OrderedDict([
1629 (
"ClusterMask", getProp(
"clusterMasking")),
1630 (
"Seeding", getProp(
"seeding")),
1631 (
"Building", getProp(
"building")),
1632 (
"Fitting", getProp(
"fit")),
1633 (
"Selection", getProp(
"selection")),
1634 (
"Other", getProp(
"other"))
1653 if eventsTh1
is None:
1655 nevents = eventsTh1.GetEntries()
1659 ret = timeTh1.Clone(self.
_name)
1660 xaxis = ret.GetXaxis()
1661 for i
in range(1, ret.GetNbinsX()+1):
1662 ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1663 ret.SetBinError(i, ret.GetBinError(i)/nevents)
1664 xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).
replace(
" (unscheduled)",
""))
1668 path = tdirectory.GetPath()
1669 if path
not in self.
_cache:
1674 def __init__(self, name, timeHisto, selectedTracks=False):
1684 tdir = tfile.Get(dirName)
1696 tfile = tdirectory.GetFile()
1701 iterMap = copy.copy(_collLabelMapHp)
1702 del iterMap[
"generalTracks"]
1703 del iterMap[
"jetCoreRegionalStep"]
1705 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
True, byOriginalAlgo=
False, byAlgoMask=
True, ptCut=
False, seeds=
False)
1707 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
False, byOriginalAlgo=
False, byAlgoMask=
False, ptCut=
False, seeds=
False)
1708 recoAB =
AggregateBins(
"tmp",
"num_reco_coll", mapping=iterMap,ignoreMissingBins=
True, renameBin=renameBin)
1709 h_reco_per_iter = recoAB.create(trkDir)
1710 if h_reco_per_iter
is None:
1713 for i
in range(1, h_reco_per_iter.GetNbinsX()+1):
1714 values[h_reco_per_iter.GetXaxis().GetBinLabel(i)] = h_reco_per_iter.GetBinContent(i)
1718 for i
in range(1, timeTh1.GetNbinsX()+1):
1719 iterName = timeTh1.GetXaxis().GetBinLabel(i)
1720 if iterName
in values:
1721 ntrk = values[iterName]
1722 result.append( (iterName,
1723 timeTh1.GetBinContent(i)/ntrk
if ntrk > 0
else 0,
1724 timeTh1.GetBinError(i)/ntrk
if ntrk > 0
else 0) )
1726 if len(result) == 0:
1729 res = ROOT.TH1F(self.
_name, self.
_name, len(result), 0, len(result))
1730 for i, (label, value, error)
in enumerate(result):
1731 res.GetXaxis().SetBinLabel(i+1, label)
1732 res.SetBinContent(i+1, value)
1733 res.SetBinError(i+1, error)
1742 h = f.Get(_trackingIterationOrderHistogram)
1745 xaxis = h.GetXaxis()
1749 return s.replace(
"Tracks",
"").
replace(
"muonSeeded",
"muonSeededStep")
1750 return [_edit(xaxis.GetBinLabel(i))
for i
in range(1, h.GetNbinsX()+1)]
1753 ret = list(
range(0, len(labels)))
1754 f = tdirectory.GetFile()
1758 if not f.GetName()
in self.
_cache:
1762 self.
_cache[f.GetName()] = r
1763 order = self.
_cache[f.GetName()]
1769 orderIndices.append(labels.index(l))
1773 for i, l
in enumerate(labels):
1776 found = orderIndices.index(i)
1780 ret.append(orderIndices[0])
1782 ret.append(orderIndices[0])
1807 h = tdirectory.Get(histo)
1810 totalReco =
"%.1f" % h.Integral()
1813 h = creator.create(tdirectory)
1814 totalTracking =
None
1816 totalTracking =
"%.1f" % h.Integral()
1819 h = creator.create(tdirectory)
1820 totalConvStep =
None
1822 totalConvStep =
"%.1f" % h.Integral()
1831 cpuValues = self.
_getValues(tdirectory, _time_per_event_cpu)
1832 realValues = self.
_getValues(tdirectory, _time_per_event_real)
1834 return cpuValues + realValues
1838 "Average reco CPU time / event (ms)",
1839 "Average tracking (w/o convStep) CPU time / event (ms)",
1840 "Average convStep CPU time / event (ms)",
1841 "Average reco real time / event (ms)",
1842 "Average tracking (w/o convStep) real time / event (ms)",
1843 "Average convStep real time / event (ms)",
1848 "xbinlabelsize": 10,
1849 "xbinlabeloption":
"d"
1857 Plot(_time_per_iter_cpu,
1858 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", legendDx=-0.4, **_common),
1860 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1863 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", **_common),
1865 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1868 ytitle=
"Average CPU time / built track (ms)", title=
"Average CPU time / built track", **_common),
1870 ytitle=
"Average CPU time / selected track (ms)", title=
"Average CPU time / selected HP track by algoMask", **_common),
1874 Plot(_time_per_iter_real,
1875 ytitle=
"Average real time (ms)", title=
"Average real time / event", legendDx=-0.4, **_common),
1877 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1880 ytitle=
"Average real time (ms)", title=
"Average real time / event", **_common),
1882 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1885 ytitle=
"Average real time / built track (ms)", title=
"Average real time / built track", **_common),
1887 ytitle=
"Average real time / selected track (ms)", title=
"Average real time / selected HP track by algoMask", **_common),
1892 Plot(
AggregateBins(i.name(), _time_per_event_cpu, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1893 ytitle=
"Average CPU time (ms)", title=i.name(), **_common)
1894 for i
in _iterations
1896 ncols=4, legend=
False
1899 Plot(
AggregateBins(i.name(), _time_per_event_real, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1900 ytitle=
"Average real time (ms)", title=i.name(), **_common)
1901 for i
in _iterations
1903 ncols=4, legend=
False
1913 "DQMData/Run 1/DQM/Run summary/TimerService/process RECO paths/path prevalidation_step",
1916 timePlotter.append(
"timing", _timeFolders,
PlotFolder(
1918 _timing_iterationsCPU,
1919 _timing_summaryReal,
1920 _timing_iterationsReal,
1926 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist"}
1928 Plot(
"TPlip", xtitle=
"TP lip", **_common),
1929 Plot(
"TPtip", xtitle=
"TP tip", **_common),
1933 tpPlotter.append(
"tp", [
1934 "DQMData/Run 1/Tracking/Run summary/TrackingMCTruth/TrackingParticle",
1935 "DQMData/Tracking/TrackingMCTruth/TrackingParticle",