7 ROOT.gROOT.SetBatch(
True)
8 ROOT.PyConfig.IgnoreCommandLineOptions =
True 10 from plotting
import Subtract, FakeDuplicate, CutEfficiency, Transform, AggregateBins, ROC, Plot, PlotEmpty, PlotGroup, PlotOnSideGroup, PlotFolder, Plotter
11 from html
import PlotPurpose
22 _maxEff = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025, 1.2, 1.5, 2]
23 _maxFake = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]
26 _minMaxResol = [1e-5, 4e-5, 1e-4, 4e-4, 1e-3, 4e-3, 1e-2, 4e-2, 0.1, 0.4, 1]
27 _minMaxN = [5e-1, 5, 5e1, 5e2, 5e3, 5e4, 5e5, 5e6, 5e7, 5e8, 5e9]
30 _maxHits = [5, 10, 20, 40, 60, 80]
31 _minLayers = [0, 5, 10]
32 _maxLayers = [5, 10, 25]
34 _min3DLayers = [0, 5, 10]
35 _max3DLayers = [5, 10, 20]
36 _minZ = [-60, -40, -20, -10, -5]
37 _maxZ = [5, 10, 20, 40, 60]
38 _minPU = [0, 10, 20, 50, 100, 150]
39 _maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
40 _minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
41 _minMaxMVA = [-1.025, -0.5, 0, 0.5, 1.025]
44 return ([-x
for x
in ma], ma)
47 (_minResidualCotTheta, _maxResidualCotTheta) =
_minMaxResidual([1e-4, 2e-4])
49 (_minResidualDz, _maxResidualDz) = (_minResidualDxy, _maxResidualDxy)
54 _legendDy_2rows = -0.025
55 _legendDy_2rows_3cols = -0.17
56 _legendDy_4rows = 0.09
63 _trackingIterationOrderHistogram =
"DQMData/Run 1/Tracking/Run summary/TrackBuilding/num_reco_coll" 70 xq +=
" (" + unit +
")" 72 effargs =
dict(xtitle=
"TP "+xq , ytitle=
"efficiency vs "+q , ymax=_maxEff)
73 fakeargs =
dict(xtitle=
"track "+xq, ytitle=
"fake+duplicates rate vs "+q, ymax=_maxFake)
74 effargs.update(common)
75 fakeargs.update(common)
76 effargs.update(effopts)
77 fakeargs.update(fakeopts)
80 Plot(
"effic_vs_"+p, **effargs),
81 Plot(
FakeDuplicate(
"fakeduprate_vs_"+p, assoc=
"num_assoc(recoToSim)_"+p, dup=
"num_duplicate_"+p, reco=
"num_reco_"+p, title=
"fake+duplicates vs "+q), **fakeargs)
93 xq +=
" (" + unit +
")" 97 Plot(
"fakerate_vs_"+p , xtitle=xtitle, ytitle=
"fakerate vs "+q , ymax=_maxFake, **common),
98 Plot(
"duplicatesRate_"+p, xtitle=xtitle, ytitle=
"duplicates rate vs "+q, ymax=_maxFake, **common),
99 Plot(
"pileuprate_"+p , xtitle=xtitle, ytitle=
"pileup rate vs "+q , ymax=_maxFake, **common),
103 return Subtract(
"num_fake_"+postfix,
"num_reco_"+postfix,
"num_assoc(recoToSim)_"+postfix)
109 args =
dict(xtitle=
"track "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
113 Plot(
"num_reco_"+p , ytitle=
"tracks", **args),
114 Plot(
"num_assoc(recoToSim)_"+p, ytitle=
"true tracks", **args),
116 Plot(
"num_duplicate_"+p , ytitle=
"duplicate tracks", **args),
123 args =
dict(xtitle=
"TP "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
127 Plot(
"num_simul_"+p , ytitle=
"TrackingParticles", **args),
128 Plot(
"num_assoc(simToReco)_"+p, ytitle=
"Reconstructed TPs", **args),
132 pfix =
"_hp" if hp
else "" 133 pfix2 =
"Hp" if hp
else "" 135 xtitle =
"MVA%d output"%num
136 xtitlecut =
"Cut on MVA%d output"%num
137 args =
dict(xtitle=xtitle, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
140 xtitle=
"Efficiency (excl. trk eff)", ytitle=
"Fake rate",
141 xmax=_maxEff, ymax=_maxFake,
145 ztitle=
"Cut on MVA%d"%num,
146 xtitleoffset=5, ytitleoffset=6.5, ztitleoffset=4,
147 adjustMarginRight=0.12
149 argsroc2.update(argsroc)
150 argsroc2[
"drawStyle"] =
"pcolz" 152 argsprofile =
dict(ymin=_minMaxMVA, ymax=_minMaxMVA)
154 true_cuteff =
CutEfficiency(
"trueeff_vs_mva%dcut%s"%(num,pfix),
"num_assoc(recoToSim)_mva%dcut%s"%(num,pfix))
155 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)))
159 Plot(
"num_assoc(recoToSim)_mva%d%s"%(num,pfix), ytitle=
"true tracks", **args),
160 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),
161 Plot(
"effic_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
163 Plot(
"fakerate_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Fake rate", ymax=_maxFake),
164 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),
165 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),
167 Plot(true_cuteff, xtitle=xtitlecut, ytitle=
"True track selection efficiency", ymax=_maxEff),
168 Plot(fake_cuteff, xtitle=xtitlecut, ytitle=
"Fake track selection efficiency", ymax=_maxEff),
169 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),
170 ], ncols=3, legendDy=_legendDy_1row),
172 Plot(
"mva_assoc(recoToSim)_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for true tracks", xlog=
True, **argsprofile),
173 Plot(
"mva_fake_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for fake tracks", xlog=
True, **argsprofile),
174 Plot(
"mva_assoc(recoToSim)_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for true tracks", **argsprofile),
175 Plot(
"mva_fake_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for fake tracks", **argsprofile),
176 ], legendDy=_legendDy_2rows)
180 Plot(
"efficPt", title=
"Efficiency vs p_{T}", xtitle=
"TP p_{T} (GeV)", ytitle=
"efficiency vs p_{T}", xlog=
True, ymax=_maxEff),
181 Plot(
FakeDuplicate(
"fakeduprate_vs_pT", assoc=
"num_assoc(recoToSim)_pT", dup=
"num_duplicate_pT", reco=
"num_reco_pT", title=
"fake+duplicates vs p_{T}"),
182 xtitle=
"track p_{T} (GeV)", ytitle=
"fake+duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
183 Plot(
"effic", xtitle=
"TP #eta", ytitle=
"efficiency vs #eta", title=
"", ymax=_maxEff),
184 Plot(
FakeDuplicate(
"fakeduprate_vs_eta", assoc=
"num_assoc(recoToSim)_eta", dup=
"num_duplicate_eta", reco=
"num_reco_eta", title=
""),
185 xtitle=
"track #eta", ytitle=
"fake+duplicates rate vs #eta", ymax=_maxFake),
193 legendDy=_legendDy_2rows
200 legendDy=_legendDy_4rows
202 _effandfakeHitsLayers =
PlotGroup(
"effandfakeHitsLayers",
207 legendDy=_legendDy_4rows
209 _common = {
"ymin": 0,
"ymax": _maxEff}
211 _makeEffFakeDupPlots(
"vertpos",
"vert r",
"cm", fakeopts=
dict(xtitle=
"track ref. point r (cm)", ytitle=
"fake+duplicates vs. r"), common=
dict(xlog=
True)) +
212 _makeEffFakeDupPlots(
"zpos" ,
"vert z",
"cm", fakeopts=
dict(xtitle=
"track ref. point z (cm)", ytitle=
"fake+duplicates vs. z")) +
218 legendDy=_legendDy_2rows
222 _algos_common =
dict(removeEmptyBins=
True, xbinlabelsize=10, xbinlabeloption=
"d")
223 _duplicateAlgo =
PlotOnSideGroup(
"duplicateAlgo",
Plot(
"duplicates_oriAlgo_vs_oriAlgo", drawStyle=
"COLZ", adjustMarginLeft=0.1, adjustMarginRight=0.1, **_algos_common))
226 Plot(
"fakeratePt", xtitle=
"track p_{T} (GeV)", ytitle=
"fakerate vs p_{T}", xlog=
True, ymax=_maxFake),
227 Plot(
"duplicatesRate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
228 Plot(
"pileuprate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"pileup rate vs p_{T}", ymax=_maxFake, xlog=
True),
229 Plot(
"fakerate", xtitle=
"track #eta", ytitle=
"fakerate vs #eta", title=
"", ymax=_maxFake),
230 Plot(
"duplicatesRate", xtitle=
"track #eta", ytitle=
"duplicates rate vs #eta", title=
"", ymax=_maxFake),
231 Plot(
"pileuprate", xtitle=
"track #eta", ytitle=
"pileup rate vs #eta", title=
"", ymax=_maxFake),
238 ncols=3, legendDy=_legendDy_2rows_3cols
245 ncols=3, legendDy=_legendDy_4rows
247 _dupandfakeHitsLayers =
PlotGroup(
"dupandfakeHitsLayers",
252 ncols=3, legendDy=_legendDy_4rows
263 ncols=3, legendDy=_legendDy_2rows_3cols
265 _seedingLayerSet_common =
dict(removeEmptyBins=
True, xbinlabelsize=8, xbinlabeloption=
"d", adjustMarginRight=0.1)
266 _dupandfakeSeedingPlots =
_makeFakeDupPileupPlots(
"seedingLayerSet",
"seeding layers", xtitle=
"", common=_seedingLayerSet_common)
267 _dupandfakeChi2Seeding =
PlotGroup(
"dupandfakeChi2Seeding",
269 _dupandfakeSeedingPlots,
270 ncols=3, legendDy=_legendDy_2rows_3cols
274 "ytitle":
"Fake+pileup rate",
279 _common2.update(_common)
280 _common2[
"drawStyle"] =
"pcolz" 281 _common2[
"ztitleoffset"] = 1.5
282 _common2[
"xtitleoffset"] = 7
283 _common2[
"ytitleoffset"] = 10
284 _common2[
"ztitleoffset"] = 6
286 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")),
287 xtitle=
"Efficiency vs. cut on dz(PV)", **_common),
288 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),
289 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)", **_common2),
291 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")),
292 xtitle=
"Efficiency vs. cut on dz(PV)/dzError", **_common),
293 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),
294 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)/dzError", **_common2),
296 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")),
297 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)", **_common),
298 Plot(
ROC(
"effic_vs_fakepileup2_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),
299 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)", **_common2),
301 Plot(
ROC(
"effic_vs_fakepileup_dzpvsigcut_pt",
"effic_vs_dzpvsigcut_pt",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut_pt", assoc=
"num_assoc(recoToSim)_dzpvsigcut_pt", reco=
"num_reco_dzpvsigcut_pt", dup=
"num_pileup_dzpvsigcut_pt")),
302 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)/dzError", **_common),
303 Plot(
ROC(
"effic_vs_fakepileup2_dzpvsigcut_pt",
"effic_vs_dzpvsigcut_pt",
FakeDuplicate(
"fakepileup_vs_dzpvsigcut_pt", assoc=
"num_assoc(recoToSim)_dzpvsigcut_pt", reco=
"num_reco_dzpvsigcut_pt", dup=
"num_pileup_dzpvsigcut_pt"), zaxis=
True),
304 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)/dzError", **_common2),
305 ], onlyForPileup=
True,
306 legendDy=_legendDy_4rows
309 Plot(
"effic_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency vs. cut on dz(PV)", ymax=_maxEff),
310 Plot(
"effic_vs_dzpvcut2", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
311 Plot(
"fakerate_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate vs. cut on dz(PV)", ymax=_maxFake),
312 Plot(
"pileuprate_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate vs. cut on dz(PV)", ymax=_maxFake),
314 Plot(
"effic_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency vs. cut on dz(PV)/dzError", ymax=_maxEff),
315 Plot(
"effic_vs_dzpvsigcut2", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
316 Plot(
"fakerate_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
317 Plot(
"pileuprate_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
318 ], onlyForPileup=
True,
319 legendDy=_legendDy_4rows
322 Plot(
"effic_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
323 Plot(
"effic_vs_dzpvcut2_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
324 Plot(
"fakerate_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
325 Plot(
"pileuprate_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
327 Plot(
"effic_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
328 Plot(
"effic_vs_dzpvsigcut2_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
329 Plot(
"fakerate_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
330 Plot(
"pileuprate_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
331 ], onlyForPileup=
True,
332 legendDy=_legendDy_4rows
337 _common = {
"normalizeToUnitArea":
True,
"stat":
True,
"drawStyle":
"hist"}
339 Plot(
"h_dedx_estim1", xtitle=
"dE/dx, harm2", **_common),
340 Plot(
"h_dedx_estim2", xtitle=
"dE/dx, trunc40", **_common),
341 Plot(
"h_dedx_nom1", xtitle=
"dE/dx number of measurements", title=
"", **_common),
342 Plot(
"h_dedx_sat1", xtitle=
"dE/dx number of measurements with saturation", title=
"", **_common),
344 legendDy=_legendDy_2rows
348 Plot(
"chargeMisIdRate", xtitle=
"#eta", ytitle=
"charge mis-id rate vs #eta", ymax=0.05),
349 Plot(
"chargeMisIdRate_Pt", xtitle=
"p_{T}", ytitle=
"charge mis-id rate vs p_{T}", xmax=300, ymax=0.1, xlog=
True),
350 Plot(
"chargeMisIdRate_hit", xtitle=
"hits", ytitle=
"charge mis-id rate vs hits", title=
""),
351 Plot(
"chargeMisIdRate_phi", xtitle=
"#phi", ytitle=
"charge mis-id rate vs #phi", title=
"", ymax=0.01),
352 Plot(
"chargeMisIdRate_dxy", xtitle=
"dxy", ytitle=
"charge mis-id rate vs dxy", ymax=0.1),
353 Plot(
"chargeMisIdRate_dz", xtitle=
"dz", ytitle=
"charge mis-id rate vs dz", ymax=0.1)
355 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": 1e-6,
"drawStyle":
"hist"}
357 Plot(
"missing_inner_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
358 Plot(
"missing_outer_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
359 Plot(
"hits_eta", xtitle=
"track #eta", ytitle=
"<hits> vs #eta", ymin=_minHits, ymax=_maxHits, statyadjust=[0,0,-0.15],
360 fallback={
"name":
"nhits_vs_eta",
"profileX":
True}),
361 Plot(
"hits", stat=
True, xtitle=
"track hits", xmin=_minHits, xmax=_maxHits, ylog=
True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle=
"hist"),
362 Plot(
"num_simul_pT", xtitle=
"TP p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common),
363 Plot(
"num_reco_pT", xtitle=
"track p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common)
366 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),
367 Plot(
"chi2_prob", stat=
True, normalizeToUnitArea=
True, drawStyle=
"hist", xtitle=
"Prob(#chi^{2})"),
368 Plot(
"chi2mean", title=
"", xtitle=
"#eta", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5],
369 fallback={
"name":
"chi2_vs_eta",
"profileX":
True}),
370 Plot(
"ptres_vs_eta_Mean", scale=100, title=
"", xtitle=
"TP #eta (PCA to beamline)", ytitle=
"< #delta p_{T} / p_{T} > (%)", ymin=_minResidualPt, ymax=_maxResidualPt)
372 _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}
374 Plot(
"pullPt", **_common),
375 Plot(
"pullQoverp", **_common),
376 Plot(
"pullPhi", **_common),
377 Plot(
"pullTheta", **_common),
378 Plot(
"pullDxy", **_common),
379 Plot(
"pullDz", **_common),
381 legendDx=0.1, legendDw=-0.1, legendDh=-0.015
383 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"TP #eta (PCA to beamline)",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
385 Plot(
"phires_vs_eta_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
386 Plot(
"cotThetares_vs_eta_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
387 Plot(
"dxyres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
388 Plot(
"dzres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
389 Plot(
"ptres_vs_eta_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
391 _common = {
"title":
"",
"ylog":
True,
"xlog":
True,
"xtitle":
"TP p_{T} (PCA to beamline)",
"xmin": 0.1,
"xmax": 1000,
"ymin": _minMaxResol,
"ymax": _minMaxResol}
393 Plot(
"phires_vs_pt_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
394 Plot(
"cotThetares_vs_pt_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
395 Plot(
"dxyres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
396 Plot(
"dzres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
397 Plot(
"ptres_vs_pt_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
409 ncols=4, legendDy=_legendDy_2rows)
415 ncols=4, legendDy=_legendDy_4rows)
420 _makeDistPlots(
"3Dlayer" ,
"3D layers" , common=
dict(xmin=_min3DLayers, xmax=_max3DLayers)),
421 ncols=4, legendDy=_legendDy_4rows,
428 ncols=4, legendDy=_legendDy_4rows,
430 _extDistSeedingPlots =
_makeDistPlots(
"seedingLayerSet",
"seeding layers", common=
dict(xtitle=
"", **_seedingLayerSet_common))
433 _extDistSeedingPlots,
434 ncols=4, legendDy=_legendDy_2rows_3cols
436 _common =
dict(title=
"", xtitle=
"TP #eta (PCA to beamline)")
438 Plot(
"phires_vs_eta_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
439 Plot(
"cotThetares_vs_eta_Mean", ytitle=
"< #delta cot(#theta) >", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
440 Plot(
"dxyres_vs_eta_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
441 Plot(
"dzres_vs_eta_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
442 Plot(
"ptres_vs_eta_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
444 _common =
dict(title=
"", xlog=
True, xtitle=
"TP p_{T} (PCA to beamline)", xmin=0.1, xmax=1000)
446 Plot(
"phires_vs_pt_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
447 Plot(
"cotThetares_vs_pt_Mean", ytitle=
"< #delta cot(#theta > )", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
448 Plot(
"dxyres_vs_pt_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
449 Plot(
"dzres_vs_pt_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
450 Plot(
"ptres_vs_pt_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
452 _common =
dict(title=
"", ytitle=
"Selected tracks/TrackingParticles", ymax=_maxEff)
454 Plot(
"nrec_vs_nsim", title=
"", xtitle=
"TrackingParticles", ytitle=
"Tracks", profileX=
True, xmin=_minMaxTracks, xmax=_minMaxTracks, ymin=_minMaxTracks, ymax=_minMaxTracks),
455 Plot(
"nrecPerNsim_vs_pu", xtitle=
"Pileup", xmin=_minPU, xmax=_maxPU, **_common),
456 Plot(
"nrecPerNsimPt", xtitle=
"p_{T} (GeV)", xlog=
True, **_common),
457 Plot(
"nrecPerNsim", xtitle=
"#eta", **_common)
458 ], legendDy=_legendDy_2rows)
460 Plot(
"PXLhits_vs_eta", xtitle=
"#eta", ytitle=
"<pixel hits>"),
461 Plot(
"PXLlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<pixel layers>"),
462 Plot(
"STRIPhits_vs_eta", xtitle=
"#eta", ytitle=
"<strip hits>"),
463 Plot(
"STRIPlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<strip layers>"),
464 ], legendDy=_legendDy_2rows)
476 ncols=2, legendDy=_legendDy_2rows)
482 ncols=2, legendDy=_legendDy_4rows)
488 ncols=2, legendDy=_legendDy_4rows,
495 ncols=2, legendDy=_legendDy_4rows,
504 _possibleTrackingNonIterationColls = [
508 _possibleTrackingColls = [
509 'initialStepPreSplitting',
513 'detachedTripletStep',
527 'jetCoreRegionalStep',
528 'muonSeededStepInOut',
529 'muonSeededStepOutIn',
531 ] + _possibleTrackingNonIterationColls
532 _possibleTrackingCollsOld = {
546 ret = subfolder.replace(
"trackingParticleRecoAsssociation",
"AssociatorByHitsRecoDenom")
547 for (old, new)
in [(
"InitialStep",
"Zero"),
548 (
"HighPtTripletStep",
"First"),
549 (
"LowPtQuadStep",
"Second"),
550 (
"LowPtTripletStep",
"Third"),
551 (
"DetachedQuadStep",
"Fourth"),
552 (
"PixelPairStep",
"Fifth"),
553 (
"MuonSeededStepInOut",
"Ninth"),
554 (
"MuonSeededStepOutIn",
"Tenth")]:
555 ret = ret.replace(old, new)
560 for (old, new)
in [(
"initialStep",
"iter0"),
561 (
"highPtTripletStep",
"iter1"),
562 (
"lowPtQuadStep",
"iter2"),
563 (
"lowPtTripletStep",
"iter3"),
564 (
"detachedQuadStep",
"iter4"),
565 (
"pixelPairStep",
"iter5"),
566 (
"muonSeededStepInOut",
"iter9"),
567 (
"muonSeededStepOutIn",
"iter10")]:
568 path = path.replace(old, new)
572 return subfolder.replace(
"trackingParticleRecoAsssociation",
"trackingParticleRecoAsssociationSignal")
574 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsConversion")
578 _additionalTrackQualities = [
585 quality =
"highPurity" 588 collNameNoQuality = collName.replace(
"Hp",
"")
589 for qual
in _additionalTrackQualities:
592 collNameNoQuality = collNameNoQuality.replace(qual,
"")
594 collNameNoQuality = collNameNoQuality.replace(
"Tracks",
"", 1)
597 if collNameLow.find(
"seed") == 0:
598 collNameLow = collNameLow[4:]
599 if collNameLow ==
"initialstepseedspresplitting":
600 collNameLow =
"initialsteppresplittingseeds" 601 elif collNameLow ==
"muonseededseedsinout":
602 collNameLow =
"muonseededstepinoutseeds" 603 elif collNameLow ==
"muonseededseedsoutin":
604 collNameLow =
"muonseededstepoutinseeds" 606 i_seeds = collNameLow.index(
"seeds")
607 quality = collNameLow[i_seeds:]+quality
609 collNameLow = collNameLow[:i_seeds]
612 prefixes = [
"cutsreco",
"cutsrecofrompv",
"cutsrecofrompv2",
"cutsrecofrompvalltp"]
613 if collNameLow
in [
"general",
"generalfrompv"]+prefixes:
618 if coll == collNameLow.replace(pfx,
""):
622 for coll
in _possibleTrackingColls:
623 if testColl(coll.lower()):
628 for coll, name
in six.iteritems(_possibleTrackingCollsOld):
629 if testColl(coll.lower()):
635 algo = collNameNoQuality
638 if algo ==
"muonSeededInOut":
639 algo =
"muonSeededStepInOut" 640 if algo ==
"muonSeededOutIn":
641 algo =
"muonSeededStepOutIn" 643 return (algo, quality)
646 return (name, [name])
647 _collLabelMap = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+_possibleTrackingColls))
648 _collLabelMapHp = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+[n
for n
in _possibleTrackingColls
if "Step" in n]))
652 algo =
"generalTracks" 656 if algo !=
"generalTracks" and "ByOriginalAlgo" not in quality:
658 quality = quality.replace(
"ByOriginalAlgo",
"")
660 if algo !=
"generalTracks" and "ByAlgoMask" not in quality:
662 quality = quality.replace(
"ByAlgoMask",
"")
664 if "Pt09" not in quality:
666 quality = quality.replace(
"Pt09",
"")
669 if quality ==
"highPurity":
672 i_seeds = quality.find(
"seeds")
675 seedSubColl = quality[i_seeds+5:]
676 if seedSubColl !=
"":
677 ret += seedSubColl[0].
upper() + seedSubColl[1:]
684 def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, ptCut=False, seeds=False, midfix=""):
685 _common = {
"drawStyle":
"EP",
"xbinlabelsize": 10,
"xbinlabeloption":
"d"}
686 _commonN =
dict(ylog=
True, ymin=_minMaxN, ymax=_minMaxN,
687 normalizeToNumberOfEvents=
True,
689 _commonN.update(_common)
690 _commonAB =
dict(mapping=mapping,
691 renameBin=
lambda bl:
_summaryBinRename(bl, highPurity, byOriginalAlgo, byAlgoMask, ptCut, seeds),
692 ignoreMissingBins=
True,
695 if byOriginalAlgo
or byAlgoMask:
696 _commonAB[
"minExistingBins"] = 2
697 prefix =
"summary"+midfix
699 h_eff =
"effic_vs_coll" 700 h_fakerate =
"fakerate_vs_coll" 701 h_duplicaterate =
"duplicatesRate_coll" 702 h_pileuprate =
"pileuprate_coll" 704 h_reco =
"num_reco_coll" 705 h_true =
"num_assoc(recoToSim)_coll" 706 h_fake =
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll")
707 h_duplicate =
"num_duplicate_coll" 708 h_pileup =
"num_pileup_coll" 709 if mapping
is not None:
711 h_fakerate =
AggregateBins(
"fakerate", h_fakerate, **_commonAB)
712 h_duplicaterate =
AggregateBins(
"duplicatesRate", h_duplicaterate, **_commonAB)
713 h_pileuprate =
AggregateBins(
"pileuprate", h_pileuprate, **_commonAB)
718 h_duplicate =
AggregateBins(
"num_duplicate_coll", h_duplicate, **_commonAB)
719 h_pileup =
AggregateBins(
"num_pileup_coll", h_pileup, **_commonAB)
722 Plot(h_eff, title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
723 Plot(h_fakerate, title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
725 Plot(h_duplicaterate, title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
726 Plot(h_pileuprate, title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
728 legendDy=_legendDy_2rows
730 summaryN =
PlotGroup(prefix+
"_ntracks", [
737 Plot(h_reco, ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
738 Plot(h_true, ytitle=
"True tracks", title=
"Number of true tracks vs collection", **_commonN),
739 Plot(h_fake, ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
740 Plot(h_duplicate, ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
741 Plot(h_pileup, ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
744 return (summary, summaryN)
749 (_summaryByOriginalAlgo, _summaryByOriginalAlgoN) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo")
750 (_summaryByOriginalAlgoHp, _summaryByOriginalAlgoNHp) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo", highPurity=
True)
751 (_summaryByAlgoMask, _summaryByAlgoMaskN) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask")
752 (_summaryByAlgoMaskHp, _summaryByAlgoMaskNHp) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask", highPurity=
True)
753 (_summaryPt09, _summaryPt09N) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09")
754 (_summaryPt09Hp, _summaryPt09NHp) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09", highPurity=
True)
763 _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]}
765 _commonStatus.update(_common)
766 _commonStatus.update({
"xbinlabelsize": 10,
"xbinlabeloption":
"d",
"drawStyle":
"hist",
"adjustMarginRight": 0.08})
767 _commonLabelSize = {}
768 _commonLabelSize.update(_common)
769 _commonLabelSize.update({
"xlabelsize": 17})
772 Plot(
"selectionFlow", xbinlabelsize=10, xbinlabeloption=
"d", adjustMarginRight=0.1, drawStyle=
"hist", ylog=
True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]),
773 Plot(
"diffCharge", xtitle=
"Charge", **_common),
774 Plot(
"diffIsHighPurity", xtitle=
"High purity status", **_common),
775 Plot(
"diffNdof", xtitle=
"ndof", **_common),
776 Plot(
"diffNormalizedChi2", xtitle=
"#chi^{2}/ndof", **_common),
779 _packedCandidateHitsHitPattern =
PlotGroup(
"hitsHitPattern", [
780 Plot(
"diffHitPatternNumberOfValidHits", xtitle=
"Valid hits (via HitPattern)", **_common),
781 Plot(
"diffHitPatternNumberOfValidPixelHits", xtitle=
"Valid pixel hits (via HitPattern)", **_common),
782 Plot(
"diffHitPatternHasValidHitInFirstPixelBarrel", xtitle=
"Has valid hit in BPix1 layer (via HitPattern)", **_common),
783 Plot(
"diffHitPatternNumberOfLostPixelHits", xtitle=
"Lost pixel hits (via HitPattern)", **_common),
785 legendDy=_legendDy_2rows
788 Plot(
"diffNumberOfHits", xtitle=
"Hits", **_common),
789 Plot(
"diffNumberOfPixelHits", xtitle=
"Pixel hits", **_common),
790 Plot(
"diffLostInnerHits", xtitle=
"Lost inner hits", **_common),
791 Plot(
"numberHitsOverMax", xtitle=
"Number of overflown hits", **_common),
792 Plot(
"numberPixelHitsOverMax", xtitle=
"Number of overflown pixel hits", **_common),
793 Plot(
"numberStripHitsOverMax", xtitle=
"Number of overflown strip hits", **_common),
795 ncols=3, legendDy=_legendDy_2rows_3cols
800 Plot(
"diffNumberOfPixelLayers", xtitle=
"Pixel layers", **_common),
801 Plot(
"diffNumberOfStripLayers", xtitle=
"Strip layers", **_common),
803 Plot(
"diffHitPatternTrackerLayersWithMeasurement", xtitle=
"Layers (via HitPattern)", **_common),
804 Plot(
"diffHitPatternPixelLayersWithMeasurement", xtitle=
"Pixel layers (via HitPattern)", **_common),
805 Plot(
"diffHitPatternStripLayersWithMeasurement", xtitle=
"Strip layers (via HitPattern)", **_common),
807 Plot(
"numberLayersOverMax", xtitle=
"Number of overflown layers", **_common),
808 Plot(
"numberPixelLayersOverMax", xtitle=
"Number of overflown pixel layers", **_common),
809 Plot(
"numberStripLayersOverMax", xtitle=
"Number of overflown strip layers", **_common),
815 _packedCandidateImpactParameter1 =
PlotGroup(
"impactParameter1", [
816 Plot(
"diffDxyAssocPV", xtitle=
"dxy(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
817 Plot(
"diffDxyAssocPVStatus", **_commonStatus),
818 Plot(
"diffDxyAssocPVUnderOverFlowSign", xtitle=
"dxy(assocPV)", **_common),
819 Plot(
"diffDzAssocPV", xtitle=
"dz(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
820 Plot(
"diffDzAssocPVStatus", **_commonStatus),
821 Plot(
"diffDzAssocPVUnderOverFlowSign", xtitle=
"dz(assocPV)", **_common),
822 Plot(
"diffDxyError", xtitle=
"dxyError()", adjustMarginRight=0.02, **_commonLabelSize),
823 Plot(
"diffDszError", xtitle=
"dszError()", adjustMarginRight=0.02, **_commonLabelSize),
824 Plot(
"diffDzError", xtitle=
"dzError()", adjustMarginRight=0.02, **_commonLabelSize),
830 _packedCandidateImpactParameter2 =
PlotGroup(
"impactParameter2", [
831 Plot(
"diffDxyPV", xtitle=
"dxy(PV) via PC", **_commonLabelSize),
832 Plot(
"diffDzPV", xtitle=
"dz(PV) via PC", **_commonLabelSize),
833 Plot(
"diffTrackDxyAssocPV", xtitle=
"dxy(PV) via PC::bestTrack()", **_commonLabelSize),
834 Plot(
"diffTrackDzAssocPV", xtitle=
"dz(PV) via PC::bestTrack()", **_commonLabelSize),
835 Plot(
"diffTrackDxyError", xtitle=
"dxyError() via PC::bestTrack()", adjustMarginRight=0.02, **_commonLabelSize),
836 Plot(
"diffTrackDzError", xtitle=
"dzError() via PC::bestTrack()", **_commonLabelSize),
839 _packedCandidateCovarianceMatrix1 =
PlotGroup(
"covarianceMatrix1", [
840 Plot(
"diffCovQoverpQoverp", xtitle=
"cov(qoverp, qoverp)", **_commonLabelSize),
841 Plot(
"diffCovQoverpQoverpStatus", **_commonStatus),
842 Plot(
"diffCovQoverpQoverpUnderOverFlowSign", xtitle=
"cov(qoverp, qoverp)", **_common),
843 Plot(
"diffCovLambdaLambda", xtitle=
"cov(lambda, lambda)", **_commonLabelSize),
844 Plot(
"diffCovLambdaLambdaStatus", **_commonStatus),
845 Plot(
"diffCovLambdaLambdaUnderOverFlowSign", xtitle=
"cov(lambda, lambda)", **_common),
846 Plot(
"diffCovLambdaDsz", xtitle=
"cov(lambda, dsz)", **_commonLabelSize),
847 Plot(
"diffCovLambdaDszStatus", **_commonStatus),
848 Plot(
"diffCovLambdaDszUnderOverFlowSign", xtitle=
"cov(lambda, dsz)", **_common),
849 Plot(
"diffCovPhiPhi", xtitle=
"cov(phi, phi)", **_commonLabelSize),
850 Plot(
"diffCovPhiPhiStatus", **_commonStatus),
851 Plot(
"diffCovPhiPhiUnderOverFlowSign", xtitle=
"cov(phi, phi)", **_common),
853 ncols=3, legendDy=_legendDy_4rows
855 _packedCandidateCovarianceMatrix2 =
PlotGroup(
"covarianceMatrix2", [
856 Plot(
"diffCovPhiDxy", xtitle=
"cov(phi, dxy)", **_commonLabelSize),
857 Plot(
"diffCovPhiDxyStatus", **_commonStatus),
858 Plot(
"diffCovPhiDxyUnderOverFlowSign", xtitle=
"cov(phi, dxy)", **_common),
859 Plot(
"diffCovDxyDxy", xtitle=
"cov(dxy, dxy)", adjustMarginRight=0.02, **_commonLabelSize),
860 Plot(
"diffCovDxyDxyStatus", **_commonStatus),
861 Plot(
"diffCovDxyDxyUnderOverFlowSign", xtitle=
"cov(dxy, dxy)", **_common),
862 Plot(
"diffCovDxyDsz", xtitle=
"cov(dxy, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
863 Plot(
"diffCovDxyDszStatus", **_commonStatus),
864 Plot(
"diffCovDxyDszUnderOverFlowSign", xtitle=
"cov(dxy, dsz)", **_common),
865 Plot(
"diffCovDszDsz", xtitle=
"cov(dsz, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
866 Plot(
"diffCovDszDszStatus", **_commonStatus),
867 Plot(
"diffCovDszDszUnderOverFlowSign", xtitle=
"cov(dsz, dsz)", **_common),
869 ncols=3, legendDy=_legendDy_4rows
872 _common[
"xlabelsize"] = 16
874 Plot(
"diffVx", xtitle=
"Reference point x", **_common),
875 Plot(
"diffVy", xtitle=
"Reference point y", **_common),
876 Plot(
"diffVz", xtitle=
"Reference point z", **_common),
878 legendDy=_legendDy_2rows
881 _common[
"adjustMarginRight"] = 0.05
883 Plot(
"diffPt", xtitle=
"p_{T}", **_common),
884 Plot(
"diffPtError", xtitle=
"p_{T} error", **_common),
885 Plot(
"diffEta", xtitle=
"#eta", **_common),
886 Plot(
"diffEtaError", xtitle=
"#eta error", **_common),
887 Plot(
"diffPhi", xtitle=
"#phi", **_common),
893 PlotFolder.__init__(self, *args, **kwargs)
896 spl = dqmSubFolderName.split(
"_")
903 (algoOrig, quality) = translatedDqmSubFolder
909 if plotFolderName !=
"":
910 ret +=
"_"+plotFolderName
913 if not (algo ==
"ootb" and quality !=
""):
918 """Return True if this subfolder should be processed 921 limitOnlyTo -- Function '(algo, quality) -> bool' 922 translatedDqmSubFolder -- Return value of translateSubFolder 924 (algo, quality) = translatedDqmSubFolder
925 return limitOnlyTo(algo, quality)
929 return algo
not in _possibleTrackingNonIterationColls
940 def __init__(self, section, collection=GeneralTracks):
956 def _getAlgoQuality(data, algo, quality):
957 for label, value
in six.iteritems(data):
959 if a == algo
and q == quality:
963 h = tdirectory.Get(hname)
968 return _getAlgoQuality(data,
"ootb",
"")
970 return _getAlgoQuality(data,
"ootb",
"Pt09")
972 return _getAlgoQuality(data,
"ootb",
"highPurity")
974 return _getAlgoQuality(data,
"ootb",
"highPurityPt09")
976 return _getAlgoQuality(data,
"btvLike",
"")
978 return _getAlgoQuality(data,
"ak4PFJets",
"")
980 return _getAlgoQuality(data,
"pixel",
"")
983 def _formatOrNone(num, func):
988 n_tps = _formatOrNone(_getN(
"num_simul_coll"), int)
989 n_m_tps = _formatOrNone(_getN(
"num_assoc(simToReco)_coll"), int)
991 n_tracks = _formatOrNone(_getN(
"num_reco_coll"), int)
992 n_true = _formatOrNone(_getN(
"num_assoc(recoToSim)_coll"), int)
993 if n_tracks
is not None and n_true
is not None:
994 n_fake = n_tracks-n_true
997 n_pileup = _formatOrNone(_getN(
"num_pileup_coll"), int)
998 n_duplicate = _formatOrNone(_getN(
"num_duplicate_coll"), int)
1000 eff = _formatOrNone(_getN(
"effic_vs_coll"),
lambda n:
"%.4f" % n)
1001 eff_nopt = _formatOrNone(_getN(
"effic_vs_coll_allPt"),
lambda n:
"%.4f" % n)
1002 fake = _formatOrNone(_getN(
"fakerate_vs_coll"),
lambda n:
"%.4f" % n)
1003 duplicate = _formatOrNone(_getN(
"duplicatesRate_coll"),
lambda n:
"%.4f" % n)
1005 ret = [eff, n_tps, n_m_tps,
1006 eff_nopt, fake, duplicate,
1007 n_tracks, n_true, n_fake, n_pileup, n_duplicate]
1008 if ret.count(
None) == len(ret):
1015 "Number of TrackingParticles (after cuts)",
1016 "Number of matched TrackingParticles",
1017 "Efficiency (w/o pT cut)",
1021 "Number of true tracks",
1022 "Number of fake tracks",
1023 "Number of pileup tracks",
1024 "Number of duplicate tracks" 1029 def __init__(self, fileName, plots, titles, isRate, **kwargs):
1035 if len(plots) != len(titles):
1036 raise Exception(
"Number of plots (%d) has to be the same as number of titles (%d)" % (len(plots), len(titles)))
1038 def _set(attr, default):
1039 setattr(self,
"_"+attr, kwargs.get(attr, default))
1041 _set(
"onlyForPileup",
False)
1044 """Return True if the PlotGroup is intended only for pileup samples""" 1045 return self._onlyForPileup
1047 def create(self, tdirectoryNEvents, requireAllHistograms=False):
1050 plot.create(tdirectoryNEvents, requireAllHistograms)
1052 def draw(self, legendLabels, prefix=None, directory="", *args, **kwargs):
1054 onlyEmptyPlots =
True 1056 if not plot.isEmpty():
1057 onlyEmptyPlots =
False 1062 haveShortLabels =
False 1063 legendLabels = legendLabels[:]
1064 if max(
map(len, legendLabels)) > 20:
1065 haveShortLabels =
True 1066 labels_short = [
str(chr(ord(
'A')+i))
for i
in xrange(len(legendLabels))]
1067 for i, ls
in enumerate(labels_short):
1068 legendLabels[i] =
"%s: %s" % (ls, legendLabels[i])
1070 labels_short = legendLabels
1075 ' <table border="1">',
1086 for h, l
in zip(plot._histograms, labels_short):
1088 h_tmp.append(len(histos_linear))
1089 histos_linear.append(h)
1093 histos_index.append(h_tmp)
1094 labels.append(l_tmp)
1097 ' <td colspan="%d">%s</td>' % (len(h_tmp), title),
1100 if len(histos_linear) == 0:
1110 if len(histos_linear) == 0:
1114 if len(histos_linear_new) > 0
and len(histos_linear_new) != len(histos_linear):
1115 raise Exception(
"This should never happen. len(histos_linear_new) %d != len(histos_linear) %d" % (len(histos_linear_new), len(histos_linear)))
1116 histos_linear = histos_linear_new
1117 if len(histos_linear) == 0:
1120 data = [ [h.GetBinContent(i)
for i
in xrange(1, h.GetNbinsX()+1)]
for h
in histos_linear]
1121 table =
html.Table([
"dummy"]*len(histos_linear), xbinlabels, data,
None,
None,
None)
1122 data = table.tableAsRowColumn()
1125 content.append(
' <td></td>')
1126 content.extend([
' <td>%s</td>' % lab
for lab
in labs])
1131 for irow, row
in enumerate(data):
1134 ' <td>%s</td>' % table.rowHeaders()[irow]
1137 for hindices
in histos_index:
1138 for hindex
in hindices:
1140 formatted = self.
_format%item
if item
is not None else "" 1141 content.append(
' <td align="right">%s</td>' % formatted)
1142 content.append(
' <td></td>')
1144 content.append(
' </tr>')
1146 content.append(
' </table>')
1148 for lab
in legendLabels:
1149 content.append(
' %s<br/>' % lab)
1157 if prefix
is not None:
1160 name = os.path.join(directory, name)
1162 with open(name,
"w")
as f:
1163 for line
in content:
1169 [
"Fake rate",
"Duplicate rate",
"Pileup rate"], isRate=
True)
1171 [
"All tracks",
"True tracks",
"Fake tracks",
"Duplicate tracks"], isRate=
False)
1175 "DQMData/Run 1/Tracking/Run summary/"+lastDirName,
1176 "DQMData/Tracking/"+lastDirName,
1177 "DQMData/Run 1/RecoTrackV/Run summary/"+lastDirName,
1178 "DQMData/RecoTrackV/"+lastDirName,
1182 _effandfakePtEtaPhi,
1185 _effandfakeHitsLayers,
1187 _effandfakeDeltaRPU,
1191 _dupandfakePtEtaPhi,
1194 _dupandfakeHitsLayers,
1196 _dupandfakeDeltaRPU,
1197 _dupandfakeChi2Seeding,
1198 _dupandfakeSeedingTable,
1210 _seedingBuildingPlots = _simBasedPlots + [
1211 _dupandfakePtEtaPhi,
1214 _dupandfakeHitsLayers,
1216 _dupandfakeDeltaRPU,
1217 _dupandfakeChi2Seeding,
1218 _dupandfakeSeedingTable,
1232 _extDistChi2Seeding,
1233 _extDistSeedingTable,
1238 _extDistSimPtEtaPhi,
1241 _extDistSimHitsLayers,
1242 _extDistSimPosDeltaR,
1247 _summaryByOriginalAlgo,
1248 _summaryByOriginalAlgoN,
1250 _summaryByAlgoMaskN,
1257 _summaryByOriginalAlgoHp,
1258 _summaryByOriginalAlgoNHp,
1259 _summaryByAlgoMaskHp,
1260 _summaryByAlgoMaskNHp,
1264 _summaryPlotsSeeds = [
1268 _packedCandidatePlots = [
1269 _packedCandidateFlow,
1270 _packedCandidateKinematics,
1271 _packedCandidateVertex,
1272 _packedCandidateImpactParameter1,
1273 _packedCandidateImpactParameter2,
1274 _packedCandidateCovarianceMatrix1,
1275 _packedCandidateCovarianceMatrix2,
1276 _packedCandidateHits,
1277 _packedCandidateHitsHitPattern,
1278 _packedCandidateLayers,
1282 def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, onlyForElectron=False, onlyForConversion=False, onlyForBHadron=False, seeding=False, rawSummary=False, highPuritySummary=True):
1285 limiters =
dict(onlyForPileup=onlyForPileup, onlyForElectron=onlyForElectron, onlyForConversion=onlyForConversion, onlyForBHadron=onlyForBHadron)
1287 _trackingRefFileFallbackSLHC_Phase1PU140
1289 common =
dict(fallbackDqmSubFolders=[
1290 _trackingSubFoldersFallbackSLHC_Phase1PU140,
1291 _trackingSubFoldersFallbackFromPV, _trackingSubFoldersFallbackConversion])
1292 plotter.append(name, folders,
TrackingPlotFolder(*algoPlots, **commonForTPF), **common)
1293 plotterExt.append(name, folders,
TrackingPlotFolder(*_extendedPlots, **commonForTPF), **common)
1297 summaryName += name+
"_" 1298 summaryName +=
"summary" 1301 summaryPlots.extend([_summaryRaw, _summaryRawN])
1302 summaryPlots.extend(_summaryPlots)
1307 plotter.append(summaryName, folders,
1308 PlotFolder(*summaryPlots, section=name, **common))
1309 if highPuritySummary:
1310 plotter.append(summaryName+
"_highPurity", folders,
1311 PlotFolder(*_summaryPlotsHp, section=name+
"_highPurity" if name !=
"" else "highPurity", **common),
1312 fallbackNames=[summaryName])
1314 plotter.append(summaryName+
"_seeds", folders,
1315 PlotFolder(*_summaryPlotsSeeds, section=name+
"_seeds", **common))
1319 if highPuritySummary:
1320 sectionName = name+
"_highPurity" if name !=
"" else "highPurity" 1329 _appendTrackingPlots(
"TrackFromPV",
"fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1330 _appendTrackingPlots(
"TrackFromPVAllTP",
"fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1331 _appendTrackingPlots(
"TrackFromPVAllTP2",
"fromPVAllTP2", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1334 _appendTrackingPlots(
"TrackConversion",
"conversion", _simBasedPlots+_recoBasedPlots, onlyForConversion=
True, rawSummary=
True, highPuritySummary=
False)
1335 _appendTrackingPlots(
"TrackGsf",
"gsf", _simBasedPlots+_recoBasedPlots, onlyForElectron=
True, rawSummary=
True, highPuritySummary=
False)
1336 _appendTrackingPlots(
"TrackBHadron",
"bhadron", _simBasedPlots+_recoBasedPlots, onlyForBHadron=
True)
1347 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1349 plotter.append(
"packedCandidateLostTracks",
_trackingFolders(
"PackedCandidate/lostTracks"),
1350 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1355 "DQMData/Run 1/HLT/Run summary/Tracking/ValidationWRTtp",
1360 plotterHLT.append(
"hlt", _hltFolder,
TrackingPlotFolder(*(_simBasedPlots+_recoBasedPlots), **_common))
1361 plotterHLTExt.append(
"hlt", _hltFolder,
TrackingPlotFolder(*_extendedPlots, **_common))
1365 def __init__(self, name, clusterMasking=None, seeding=None, building=None, fit=None, selection=None, other=[]):
1368 def _set(param, name, modules):
1369 if param
is not None:
1370 setattr(self, name, param)
1372 setattr(self, name, modules)
1374 _set(clusterMasking,
"_clusterMasking", [self.
_name+
"Clusters"])
1377 _set(seeding,
"_seeding", [self.
_name+
"SeedingLayers", self.
_name+
"TrackingRegions", self.
_name+
"HitDoublets", self.
_name+
"HitTriplets", self.
_name+
"HitQuadruplets", self.
_name+
"Seeds"])
1378 _set(building,
"_building", [self.
_name+
"TrackCandidates"])
1379 _set(fit,
"_fit", [self.
_name+
"Tracks"])
1380 _set(selection,
"_selection", [self.
_name])
1387 return self._clusterMasking+self._seeding+self._building+self._fit+self._selection+self.
_other 1390 return self._clusterMasking
1393 return self._seeding
1396 return self._building
1402 return self._selection
1411 (
"Fit", self.
fit()),
1413 (
"Other", self.
other())]
1418 seeding=[
"initialStepSeedLayersPreSplitting",
1419 "initialStepTrackingRegionsPreSplitting",
1420 "initialStepHitDoubletsPreSplitting",
1421 "initialStepHitTripletsPreSplitting",
1422 "initialStepHitQuadrupletsPreSplitting",
1423 "initialStepSeedsPreSplitting"],
1424 building=[
"initialStepTrackCandidatesPreSplitting"],
1425 fit=[
"initialStepTracksPreSplitting"],
1426 other=[
"firstStepPrimaryVerticesPreSplitting",
1427 "initialStepTrackRefsForJetsPreSplitting",
1428 "caloTowerForTrkPreSplitting",
1429 "ak4CaloJetsForTrkPreSplitting",
1430 "jetsForCoreTrackingPreSplitting",
1433 "MeasurementTrackerEvent",
1434 "siPixelClusterShapeCache"]),
1435 Iteration(
"initialStep", clusterMasking=[],
1436 selection=[
"initialStepClassifier1",
1437 "initialStepClassifier2",
1438 "initialStepClassifier3",
1440 "initialStepSelector"],
1441 other=[
"firstStepPrimaryVerticesUnsorted",
1442 "initialStepTrackRefsForJets",
1444 "ak4CaloJetsForTrk",
1445 "firstStepPrimaryVertices"]),
1447 selection=[
"highPtTripletStepClassifier1",
1448 "highPtTripletStepClassifier2",
1449 "highPtTripletStepClassifier3",
1450 "highPtTripletStep",
1451 "highPtTripletStepSelector"]),
1453 selection=[
"detachedQuadStepClassifier1",
1454 "detachedQuadStepClassifier2",
1456 "detachedQuadStepSelector"]),
1458 selection=[
"detachedTripletStepClassifier1",
1459 "detachedTripletStepClassifier2",
1460 "detachedTripletStep",
1461 "detachedTripletStepSelector"]),
1463 selection=[
"lowPtQuadStepClassifier1",
1464 "lowPtQuadStepClassifier2",
1466 "lowPtQuadStepSelector"]),
1468 selection=[
"lowPtTripletStepClassifier1",
1469 "lowPtTripletStepClassifier2",
1471 "lowPtTripletStepSelector"]),
1473 seeding=[
"pixelPairStepSeedLayers",
1474 "pixelPairStepSeedLayersB",
1475 "pixelPairStepSeedLayersC",
1476 "pixelPairStepTrackingRegions",
1477 "pixelPairStepTrackingRegionsB",
1478 "pixelPairStepTrackingRegionsC",
1479 "pixelPairStepTrackingRegionsSeedLayersB",
1480 "pixelPairStepHitDoublets",
1481 "pixelPairStepHitDoubletsB",
1482 "pixelPairStepHitDoubletsC",
1483 "pixelPairStepSeedsA",
1484 "pixelPairStepSeedsB",
1485 "pixelPairStepSeedsC",
1486 "pixelPairStepSeeds",],
1487 selection=[
"pixelPairStep",
1488 "pixelPairStepSelector"]),
1490 seeding=[
"mixedTripletStepSeedLayersA",
1491 "mixedTripletStepSeedLayersB",
1492 "mixedTripletStepTrackingRegionsA",
1493 "mixedTripletStepTrackingRegionsB",
1494 "mixedTripletStepHitDoubletsA",
1495 "mixedTripletStepHitDoubletsB",
1496 "mixedTripletStepHitTripletsA",
1497 "mixedTripletStepHitTripletsB",
1498 "mixedTripletStepSeedsA",
1499 "mixedTripletStepSeedsB",
1500 "mixedTripletStepSeeds"],
1501 selection=[
"mixedTripletStepClassifier1",
1502 "mixedTripletStepClassifier2",
1504 "mixedTripletStepSelector"]),
1506 selection=[
"pixelLessStepClassifier1",
1507 "pixelLessStepClassifier2",
1509 "pixelLessStepSelector"]),
1511 seeding=[
"tobTecStepSeedLayersTripl",
1512 "tobTecStepSeedLayersPair",
1513 "tobTecStepTrackingRegionsTripl",
1514 "tobTecStepTrackingRegionsPair",
1515 "tobTecStepHitDoubletsTripl",
1516 "tobTecStepHitDoubletsPair",
1517 "tobTecStepHitTripletsTripl",
1518 "tobTecStepSeedsTripl",
1519 "tobTecStepSeedsPair",
1521 selection=[
"tobTecStepClassifier1",
1522 "tobTecStepClassifier2",
1524 "tobTecStepSelector"]),
1527 other=[
"jetsForCoreTracking",
1528 "firstStepGoodPrimaryVertices",
1532 seeding=[
"muonSeededSeedsInOut",
1533 "muonSeededSeedsOutIn"],
1534 building=[
"muonSeededTrackCandidatesInOut",
1535 "muonSeededTrackCandidatesOutIn"],
1536 fit=[
"muonSeededTracksInOut",
1537 "muonSeededTracksOutIn"],
1538 selection=[
"muonSeededTracksInOutClassifier",
1539 "muonSeededTracksInOutSelector",
1540 "muonSeededTracksOutIntClassifier",
1541 "muonSeededTracksOutIntSelector"],
1545 clusterMasking=[], seeding=[],
1546 building=[
"duplicateTrackCandidates"],
1547 fit=[
"mergedDuplicateTracks"],
1548 selection=[
"duplicateTrackClassifier"]),
1550 clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1551 other=[
"preDuplicateMergingGeneralTracks",
1554 clusterMasking=[
"convClusters"],
1555 seeding=[
"convLayerPairs",
1556 "photonConvTrajSeedFromSingleLeg"],
1557 building=[
"convTrackCandidates"],
1558 fit=[
"convStepTracks"],
1559 selection=[
"convStepSelector"]),
1560 Iteration(
"Other", clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1561 other=[
"trackerClusterCheckPreSplitting",
1562 "trackerClusterCheck"]),
1566 iterations = _iterations
1567 if not includeConvStep:
1568 iterations = [i
for i
in iterations
if i.name() !=
"ConvStep"]
1570 iterations = [i
for i
in iterations
if i.name() ==
"ConvStep"]
1571 return collections.OrderedDict([(i.name(), i.all())
for i
in iterations])
1575 for i
in _iterations:
1576 if i.name() ==
"ConvStep":
1578 ret.extend(getattr(i, prop)())
1581 return collections.OrderedDict([
1582 (
"ClusterMask", getProp(
"clusterMasking")),
1583 (
"Seeding", getProp(
"seeding")),
1584 (
"Building", getProp(
"building")),
1585 (
"Fitting", getProp(
"fit")),
1586 (
"Selection", getProp(
"selection")),
1587 (
"Other", getProp(
"other"))
1606 if eventsTh1
is None:
1608 nevents = eventsTh1.GetEntries()
1612 ret = timeTh1.Clone(self.
_name)
1613 xaxis = ret.GetXaxis()
1614 for i
in xrange(1, ret.GetNbinsX()+1):
1615 ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1616 ret.SetBinError(i, ret.GetBinError(i)/nevents)
1617 xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).
replace(
" (unscheduled)",
""))
1621 path = tdirectory.GetPath()
1622 if path
not in self.
_cache:
1627 def __init__(self, name, timeHisto, selectedTracks=False):
1637 tdir = tfile.Get(dirName)
1649 tfile = tdirectory.GetFile()
1654 iterMap = copy.copy(_collLabelMapHp)
1655 del iterMap[
"generalTracks"]
1656 del iterMap[
"jetCoreRegionalStep"]
1658 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
True, byOriginalAlgo=
False, byAlgoMask=
True, ptCut=
False, seeds=
False)
1660 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
False, byOriginalAlgo=
False, byAlgoMask=
False, ptCut=
False, seeds=
False)
1661 recoAB =
AggregateBins(
"tmp",
"num_reco_coll", mapping=iterMap,ignoreMissingBins=
True, renameBin=renameBin)
1662 h_reco_per_iter = recoAB.create(trkDir)
1663 if h_reco_per_iter
is None:
1666 for i
in xrange(1, h_reco_per_iter.GetNbinsX()+1):
1667 values[h_reco_per_iter.GetXaxis().GetBinLabel(i)] = h_reco_per_iter.GetBinContent(i)
1671 for i
in xrange(1, timeTh1.GetNbinsX()+1):
1672 iterName = timeTh1.GetXaxis().GetBinLabel(i)
1673 if iterName
in values:
1674 ntrk = values[iterName]
1675 result.append( (iterName,
1676 timeTh1.GetBinContent(i)/ntrk
if ntrk > 0
else 0,
1677 timeTh1.GetBinError(i)/ntrk
if ntrk > 0
else 0) )
1679 if len(result) == 0:
1682 res = ROOT.TH1F(self.
_name, self.
_name, len(result), 0, len(result))
1683 for i, (label, value, error)
in enumerate(result):
1684 res.GetXaxis().SetBinLabel(i+1, label)
1685 res.SetBinContent(i+1, value)
1686 res.SetBinError(i+1, error)
1695 h = f.Get(_trackingIterationOrderHistogram)
1698 xaxis = h.GetXaxis()
1702 return s.replace(
"Tracks",
"").
replace(
"muonSeeded",
"muonSeededStep")
1703 return [_edit(xaxis.GetBinLabel(i))
for i
in xrange(1, h.GetNbinsX()+1)]
1706 ret = range(0, len(labels))
1707 f = tdirectory.GetFile()
1711 if not f.GetName()
in self.
_cache:
1715 self.
_cache[f.GetName()] = r
1716 order = self.
_cache[f.GetName()]
1722 orderIndices.append(labels.index(l))
1726 for i, l
in enumerate(labels):
1729 found = orderIndices.index(i)
1733 ret.append(orderIndices[0])
1735 ret.append(orderIndices[0])
1760 h = tdirectory.Get(histo)
1763 totalReco =
"%.1f" % h.Integral()
1766 h = creator.create(tdirectory)
1767 totalTracking =
None 1769 totalTracking =
"%.1f" % h.Integral()
1772 h = creator.create(tdirectory)
1773 totalConvStep =
None 1775 totalConvStep =
"%.1f" % h.Integral()
1784 cpuValues = self.
_getValues(tdirectory, _time_per_event_cpu)
1785 realValues = self.
_getValues(tdirectory, _time_per_event_real)
1787 return cpuValues + realValues
1791 "Average reco CPU time / event (ms)",
1792 "Average tracking (w/o convStep) CPU time / event (ms)",
1793 "Average convStep CPU time / event (ms)",
1794 "Average reco real time / event (ms)",
1795 "Average tracking (w/o convStep) real time / event (ms)",
1796 "Average convStep real time / event (ms)",
1801 "xbinlabelsize": 10,
1802 "xbinlabeloption":
"d" 1810 Plot(_time_per_iter_cpu,
1811 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", legendDx=-0.4, **_common),
1813 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1816 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", **_common),
1818 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1821 ytitle=
"Average CPU time / built track (ms)", title=
"Average CPU time / built track", **_common),
1823 ytitle=
"Average CPU time / selected track (ms)", title=
"Average CPU time / selected HP track by algoMask", **_common),
1827 Plot(_time_per_iter_real,
1828 ytitle=
"Average real time (ms)", title=
"Average real time / event", legendDx=-0.4, **_common),
1830 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1833 ytitle=
"Average real time (ms)", title=
"Average real time / event", **_common),
1835 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1838 ytitle=
"Average real time / built track (ms)", title=
"Average real time / built track", **_common),
1840 ytitle=
"Average real time / selected track (ms)", title=
"Average real time / selected HP track by algoMask", **_common),
1845 Plot(
AggregateBins(i.name(), _time_per_event_cpu, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1846 ytitle=
"Average CPU time (ms)", title=i.name(), **_common)
1847 for i
in _iterations
1849 ncols=4, legend=
False 1852 Plot(
AggregateBins(i.name(), _time_per_event_real, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1853 ytitle=
"Average real time (ms)", title=i.name(), **_common)
1854 for i
in _iterations
1856 ncols=4, legend=
False 1866 "DQMData/Run 1/DQM/Run summary/TimerService/process RECO paths/path prevalidation_step",
1869 timePlotter.append(
"timing", _timeFolders,
PlotFolder(
1871 _timing_iterationsCPU,
1872 _timing_summaryReal,
1873 _timing_iterationsReal,
1879 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist"}
1881 Plot(
"TPlip", xtitle=
"TP lip", **_common),
1882 Plot(
"TPtip", xtitle=
"TP tip", **_common),
1886 tpPlotter.append(
"tp", [
1887 "DQMData/Run 1/Tracking/Run summary/TrackingMCTruth/TrackingParticle",
1888 "DQMData/Tracking/TrackingMCTruth/TrackingParticle",
def iterSelectionName(self, plotFolderName, translatedDqmSubFolder)
def create(self, tdirectory)
def getSection(self, dqmSubFolder)
def _makeFakeDist(postfix)
def _makeFakeDupPileupPlots(postfix, quantity, unit="", xquantity="", xtitle=None, common={})
def __init__(self, name, timeHisto)
def _getOrCreateObject(tdirectory, nameOrCreator)
def _iterModuleMap(includeConvStep=True, onlyConvStep=False)
def replace(string, replacements)
def _getDirectory(self, tfile)
def _makeDistSimPlots(postfix, quantity, common={})
def getSection(self, dqmSubFolder)
def create(self, tdirectory)
def _summaryBinRename(binLabel, highPurity, byOriginalAlgo, byAlgoMask, ptCut, seeds)
def isAlgoIterative(self, algo)
def translateSubFolder(self, dqmSubFolderName)
def _mapCollectionToAlgoQuality(collName)
def __init__(self, section, collection=GeneralTracks)
def __init__(self, args, kwargs)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def create(self, tdirectoryNEvents, requireAllHistograms=False)
def _trackingSubFoldersFallbackConversion(subfolder)
def __call__(self, tdirectory, labels)
def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, onlyForElectron=False, onlyForConversion=False, onlyForBHadron=False, seeding=False, rawSummary=False, highPuritySummary=True)
def _trackingSubFoldersFallbackSLHC_Phase1PU140(subfolder)
def create(self, tdirectory)
def limitSubFolder(self, limitOnlyTo, translatedDqmSubFolder)
def __init__(self, name, timeHisto, selectedTracks=False)
def _makeMVAPlots(num, hp=False)
def _trackingRefFileFallbackSLHC_Phase1PU140(path)
def _th1RemoveEmptyBins(histos, xbinlabels)
def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, ptCut=False, seeds=False, midfix="")
def _trackingSubFoldersFallbackFromPV(subfolder)
def _makeDistPlots(postfix, quantity, common={})
def __init__(self, fileName, plots, titles, isRate, kwargs)
def _create(self, tdirectory)
def create(self, tdirectory)
def _trackingFolders(lastDirName="Track")
def __init__(self, name, clusterMasking=None, seeding=None, building=None, fit=None, selection=None, other=[])
def _makeEffFakeDupPlots(postfix, quantity, unit="", common={}, effopts={}, fakeopts={})
def _th1ToOrderedDict(th1, renameBin=None)
def draw(self, legendLabels, prefix=None, directory="", args, kwargs)
def _mergeBinLabelsX(histos)
def _th1IncludeOnlyBins(histos, xbinlabels)
def _getValues(self, tdirectory, histo)