6 ROOT.gROOT.SetBatch(
True)
7 ROOT.PyConfig.IgnoreCommandLineOptions =
True 9 from plotting
import Subtract, FakeDuplicate, CutEfficiency, Transform, AggregateBins, ROC, Plot, PlotEmpty, PlotGroup, PlotOnSideGroup, PlotFolder, Plotter
10 from html
import PlotPurpose
21 _maxEff = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025, 1.2, 1.5, 2]
22 _maxFake = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]
25 _minMaxResol = [1e-5, 4e-5, 1e-4, 4e-4, 1e-3, 4e-3, 1e-2, 4e-2, 0.1, 0.4, 1]
26 _minMaxN = [5e-1, 5, 5e1, 5e2, 5e3, 5e4, 5e5, 5e6, 5e7, 5e8, 5e9]
29 _maxHits = [5, 10, 20, 40, 60, 80]
30 _minLayers = [0, 5, 10]
31 _maxLayers = [5, 10, 25]
33 _min3DLayers = [0, 5, 10]
34 _max3DLayers = [5, 10, 20]
35 _minZ = [-60, -40, -20, -10, -5]
36 _maxZ = [5, 10, 20, 40, 60]
37 _minPU = [0, 10, 20, 50, 100, 150]
38 _maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
39 _minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
40 _minMaxMVA = [-1.025, -0.5, 0, 0.5, 1.025]
43 return ([-x
for x
in ma], ma)
46 (_minResidualCotTheta, _maxResidualCotTheta) =
_minMaxResidual([1e-4, 2e-4])
48 (_minResidualDz, _maxResidualDz) = (_minResidualDxy, _maxResidualDxy)
53 _legendDy_2rows = -0.025
54 _legendDy_2rows_3cols = -0.17
55 _legendDy_4rows = 0.09
62 _trackingIterationOrderHistogram =
"DQMData/Run 1/Tracking/Run summary/TrackBuilding/num_reco_coll" 69 xq +=
" (" + unit +
")" 71 effargs =
dict(xtitle=
"TP "+xq , ytitle=
"efficiency vs "+q , ymax=_maxEff)
72 fakeargs =
dict(xtitle=
"track "+xq, ytitle=
"fake+duplicates rate vs "+q, ymax=_maxFake)
73 effargs.update(common)
74 fakeargs.update(common)
75 effargs.update(effopts)
76 fakeargs.update(fakeopts)
79 Plot(
"effic_vs_"+p, **effargs),
80 Plot(
FakeDuplicate(
"fakeduprate_vs_"+p, assoc=
"num_assoc(recoToSim)_"+p, dup=
"num_duplicate_"+p, reco=
"num_reco_"+p, title=
"fake+duplicates vs "+q), **fakeargs)
92 xq +=
" (" + unit +
")" 96 Plot(
"fakerate_vs_"+p , xtitle=xtitle, ytitle=
"fakerate vs "+q , ymax=_maxFake, **common),
97 Plot(
"duplicatesRate_"+p, xtitle=xtitle, ytitle=
"duplicates rate vs "+q, ymax=_maxFake, **common),
98 Plot(
"pileuprate_"+p , xtitle=xtitle, ytitle=
"pileup rate vs "+q , ymax=_maxFake, **common),
102 return Subtract(
"num_fake_"+postfix,
"num_reco_"+postfix,
"num_assoc(recoToSim)_"+postfix)
108 args =
dict(xtitle=
"track "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
112 Plot(
"num_reco_"+p , ytitle=
"tracks", **args),
113 Plot(
"num_assoc(recoToSim)_"+p, ytitle=
"true tracks", **args),
115 Plot(
"num_duplicate_"+p , ytitle=
"duplicate tracks", **args),
122 args =
dict(xtitle=
"TP "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
126 Plot(
"num_simul_"+p , ytitle=
"TrackingParticles", **args),
127 Plot(
"num_assoc(simToReco)_"+p, ytitle=
"Reconstructed TPs", **args),
131 pfix =
"_hp" if hp
else "" 132 pfix2 =
"Hp" if hp
else "" 134 xtitle =
"MVA%d output"%num
135 xtitlecut =
"Cut on MVA%d output"%num
136 args =
dict(xtitle=xtitle, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
139 xtitle=
"Efficiency (excl. trk eff)", ytitle=
"Fake rate",
140 xmax=_maxEff, ymax=_maxFake,
144 ztitle=
"Cut on MVA%d"%num,
145 xtitleoffset=5, ytitleoffset=6.5, ztitleoffset=4,
146 adjustMarginRight=0.12
148 argsroc2.update(argsroc)
149 argsroc2[
"drawStyle"] =
"pcolz" 151 argsprofile =
dict(ymin=_minMaxMVA, ymax=_minMaxMVA)
153 true_cuteff =
CutEfficiency(
"trueeff_vs_mva%dcut%s"%(num,pfix),
"num_assoc(recoToSim)_mva%dcut%s"%(num,pfix))
154 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)))
158 Plot(
"num_assoc(recoToSim)_mva%d%s"%(num,pfix), ytitle=
"true tracks", **args),
159 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),
160 Plot(
"effic_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
162 Plot(
"fakerate_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Fake rate", ymax=_maxFake),
163 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),
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), zaxis=
True), **argsroc2),
166 Plot(true_cuteff, xtitle=xtitlecut, ytitle=
"True track selection efficiency", ymax=_maxEff),
167 Plot(fake_cuteff, xtitle=xtitlecut, ytitle=
"Fake track selection efficiency", ymax=_maxEff),
168 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),
169 ], ncols=3, legendDy=_legendDy_1row),
171 Plot(
"mva_assoc(recoToSim)_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for true tracks", xlog=
True, **argsprofile),
172 Plot(
"mva_fake_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for fake tracks", xlog=
True, **argsprofile),
173 Plot(
"mva_assoc(recoToSim)_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for true tracks", **argsprofile),
174 Plot(
"mva_fake_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for fake tracks", **argsprofile),
175 ], legendDy=_legendDy_2rows)
179 Plot(
"efficPt", title=
"Efficiency vs p_{T}", xtitle=
"TP p_{T} (GeV)", ytitle=
"efficiency vs p_{T}", xlog=
True, ymax=_maxEff),
180 Plot(
FakeDuplicate(
"fakeduprate_vs_pT", assoc=
"num_assoc(recoToSim)_pT", dup=
"num_duplicate_pT", reco=
"num_reco_pT", title=
"fake+duplicates vs p_{T}"),
181 xtitle=
"track p_{T} (GeV)", ytitle=
"fake+duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
182 Plot(
"effic", xtitle=
"TP #eta", ytitle=
"efficiency vs #eta", title=
"", ymax=_maxEff),
183 Plot(
FakeDuplicate(
"fakeduprate_vs_eta", assoc=
"num_assoc(recoToSim)_eta", dup=
"num_duplicate_eta", reco=
"num_reco_eta", title=
""),
184 xtitle=
"track #eta", ytitle=
"fake+duplicates rate vs #eta", ymax=_maxFake),
192 legendDy=_legendDy_2rows
199 legendDy=_legendDy_4rows
201 _effandfakeHitsLayers =
PlotGroup(
"effandfakeHitsLayers",
206 legendDy=_legendDy_4rows
208 _common = {
"ymin": 0,
"ymax": _maxEff}
210 _makeEffFakeDupPlots(
"vertpos",
"vert r",
"cm", fakeopts=
dict(xtitle=
"track ref. point r (cm)", ytitle=
"fake+duplicates vs. r"), common=
dict(xlog=
True)) +
211 _makeEffFakeDupPlots(
"zpos" ,
"vert z",
"cm", fakeopts=
dict(xtitle=
"track ref. point z (cm)", ytitle=
"fake+duplicates vs. z")) +
217 legendDy=_legendDy_2rows
221 _algos_common =
dict(removeEmptyBins=
True, xbinlabelsize=10, xbinlabeloption=
"d")
222 _duplicateAlgo =
PlotOnSideGroup(
"duplicateAlgo",
Plot(
"duplicates_oriAlgo_vs_oriAlgo", drawStyle=
"COLZ", adjustMarginLeft=0.1, adjustMarginRight=0.1, **_algos_common))
225 Plot(
"fakeratePt", xtitle=
"track p_{T} (GeV)", ytitle=
"fakerate vs p_{T}", xlog=
True, ymax=_maxFake),
226 Plot(
"duplicatesRate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
227 Plot(
"pileuprate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"pileup rate vs p_{T}", ymax=_maxFake, xlog=
True),
228 Plot(
"fakerate", xtitle=
"track #eta", ytitle=
"fakerate vs #eta", title=
"", ymax=_maxFake),
229 Plot(
"duplicatesRate", xtitle=
"track #eta", ytitle=
"duplicates rate vs #eta", title=
"", ymax=_maxFake),
230 Plot(
"pileuprate", xtitle=
"track #eta", ytitle=
"pileup rate vs #eta", title=
"", ymax=_maxFake),
237 ncols=3, legendDy=_legendDy_2rows_3cols
244 ncols=3, legendDy=_legendDy_4rows
246 _dupandfakeHitsLayers =
PlotGroup(
"dupandfakeHitsLayers",
251 ncols=3, legendDy=_legendDy_4rows
262 ncols=3, legendDy=_legendDy_2rows_3cols
264 _seedingLayerSet_common =
dict(removeEmptyBins=
True, xbinlabelsize=8, xbinlabeloption=
"d", adjustMarginRight=0.1)
265 _dupandfakeSeedingPlots =
_makeFakeDupPileupPlots(
"seedingLayerSet",
"seeding layers", xtitle=
"", common=_seedingLayerSet_common)
266 _dupandfakeChi2Seeding =
PlotGroup(
"dupandfakeChi2Seeding",
268 _dupandfakeSeedingPlots,
269 ncols=3, legendDy=_legendDy_2rows_3cols
273 "ytitle":
"Fake+pileup rate",
278 _common2.update(_common)
279 _common2[
"drawStyle"] =
"pcolz" 280 _common2[
"ztitleoffset"] = 1.5
281 _common2[
"xtitleoffset"] = 7
282 _common2[
"ytitleoffset"] = 10
283 _common2[
"ztitleoffset"] = 6
285 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")),
286 xtitle=
"Efficiency vs. cut on dz(PV)", **_common),
287 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),
288 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)", **_common2),
290 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")),
291 xtitle=
"Efficiency vs. cut on dz(PV)/dzError", **_common),
292 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),
293 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)/dzError", **_common2),
295 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")),
296 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)", **_common),
297 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),
298 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)", **_common2),
300 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")),
301 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)/dzError", **_common),
302 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),
303 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)/dzError", **_common2),
304 ], onlyForPileup=
True,
305 legendDy=_legendDy_4rows
308 Plot(
"effic_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency vs. cut on dz(PV)", ymax=_maxEff),
309 Plot(
"effic_vs_dzpvcut2", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
310 Plot(
"fakerate_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate vs. cut on dz(PV)", ymax=_maxFake),
311 Plot(
"pileuprate_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate vs. cut on dz(PV)", ymax=_maxFake),
313 Plot(
"effic_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency vs. cut on dz(PV)/dzError", ymax=_maxEff),
314 Plot(
"effic_vs_dzpvsigcut2", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
315 Plot(
"fakerate_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
316 Plot(
"pileuprate_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
317 ], onlyForPileup=
True,
318 legendDy=_legendDy_4rows
321 Plot(
"effic_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
322 Plot(
"effic_vs_dzpvcut2_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
323 Plot(
"fakerate_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
324 Plot(
"pileuprate_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
326 Plot(
"effic_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
327 Plot(
"effic_vs_dzpvsigcut2_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
328 Plot(
"fakerate_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
329 Plot(
"pileuprate_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
330 ], onlyForPileup=
True,
331 legendDy=_legendDy_4rows
336 _common = {
"normalizeToUnitArea":
True,
"stat":
True,
"drawStyle":
"hist"}
338 Plot(
"h_dedx_estim1", xtitle=
"dE/dx, harm2", **_common),
339 Plot(
"h_dedx_estim2", xtitle=
"dE/dx, trunc40", **_common),
340 Plot(
"h_dedx_nom1", xtitle=
"dE/dx number of measurements", title=
"", **_common),
341 Plot(
"h_dedx_sat1", xtitle=
"dE/dx number of measurements with saturation", title=
"", **_common),
343 legendDy=_legendDy_2rows
347 Plot(
"chargeMisIdRate", xtitle=
"#eta", ytitle=
"charge mis-id rate vs #eta", ymax=0.05),
348 Plot(
"chargeMisIdRate_Pt", xtitle=
"p_{T}", ytitle=
"charge mis-id rate vs p_{T}", xmax=300, ymax=0.1, xlog=
True),
349 Plot(
"chargeMisIdRate_hit", xtitle=
"hits", ytitle=
"charge mis-id rate vs hits", title=
""),
350 Plot(
"chargeMisIdRate_phi", xtitle=
"#phi", ytitle=
"charge mis-id rate vs #phi", title=
"", ymax=0.01),
351 Plot(
"chargeMisIdRate_dxy", xtitle=
"dxy", ytitle=
"charge mis-id rate vs dxy", ymax=0.1),
352 Plot(
"chargeMisIdRate_dz", xtitle=
"dz", ytitle=
"charge mis-id rate vs dz", ymax=0.1)
354 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": 1e-6,
"drawStyle":
"hist"}
356 Plot(
"missing_inner_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
357 Plot(
"missing_outer_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
358 Plot(
"hits_eta", xtitle=
"track #eta", ytitle=
"<hits> vs #eta", ymin=_minHits, ymax=_maxHits, statyadjust=[0,0,-0.15],
359 fallback={
"name":
"nhits_vs_eta",
"profileX":
True}),
360 Plot(
"hits", stat=
True, xtitle=
"track hits", xmin=_minHits, xmax=_maxHits, ylog=
True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle=
"hist"),
361 Plot(
"num_simul_pT", xtitle=
"TP p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common),
362 Plot(
"num_reco_pT", xtitle=
"track p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common)
365 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),
366 Plot(
"chi2_prob", stat=
True, normalizeToUnitArea=
True, drawStyle=
"hist", xtitle=
"Prob(#chi^{2})"),
367 Plot(
"chi2mean", title=
"", xtitle=
"#eta", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5],
368 fallback={
"name":
"chi2_vs_eta",
"profileX":
True}),
369 Plot(
"ptres_vs_eta_Mean", scale=100, title=
"", xtitle=
"TP #eta (PCA to beamline)", ytitle=
"< #delta p_{T} / p_{T} > (%)", ymin=_minResidualPt, ymax=_maxResidualPt)
371 _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}
373 Plot(
"pullPt", **_common),
374 Plot(
"pullQoverp", **_common),
375 Plot(
"pullPhi", **_common),
376 Plot(
"pullTheta", **_common),
377 Plot(
"pullDxy", **_common),
378 Plot(
"pullDz", **_common),
380 legendDx=0.1, legendDw=-0.1, legendDh=-0.015
382 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"TP #eta (PCA to beamline)",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
384 Plot(
"phires_vs_eta_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
385 Plot(
"cotThetares_vs_eta_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
386 Plot(
"dxyres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
387 Plot(
"dzres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
388 Plot(
"ptres_vs_eta_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
390 _common = {
"title":
"",
"ylog":
True,
"xlog":
True,
"xtitle":
"TP p_{T} (PCA to beamline)",
"xmin": 0.1,
"xmax": 1000,
"ymin": _minMaxResol,
"ymax": _minMaxResol}
392 Plot(
"phires_vs_pt_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
393 Plot(
"cotThetares_vs_pt_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
394 Plot(
"dxyres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
395 Plot(
"dzres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
396 Plot(
"ptres_vs_pt_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
408 ncols=4, legendDy=_legendDy_2rows)
414 ncols=4, legendDy=_legendDy_4rows)
419 _makeDistPlots(
"3Dlayer" ,
"3D layers" , common=
dict(xmin=_min3DLayers, xmax=_max3DLayers)),
420 ncols=4, legendDy=_legendDy_4rows,
427 ncols=4, legendDy=_legendDy_4rows,
429 _extDistSeedingPlots =
_makeDistPlots(
"seedingLayerSet",
"seeding layers", common=
dict(xtitle=
"", **_seedingLayerSet_common))
432 _extDistSeedingPlots,
433 ncols=4, legendDy=_legendDy_2rows_3cols
435 _common =
dict(title=
"", xtitle=
"TP #eta (PCA to beamline)")
437 Plot(
"phires_vs_eta_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
438 Plot(
"cotThetares_vs_eta_Mean", ytitle=
"< #delta cot(#theta) >", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
439 Plot(
"dxyres_vs_eta_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
440 Plot(
"dzres_vs_eta_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
441 Plot(
"ptres_vs_eta_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
443 _common =
dict(title=
"", xlog=
True, xtitle=
"TP p_{T} (PCA to beamline)", xmin=0.1, xmax=1000)
445 Plot(
"phires_vs_pt_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
446 Plot(
"cotThetares_vs_pt_Mean", ytitle=
"< #delta cot(#theta > )", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
447 Plot(
"dxyres_vs_pt_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
448 Plot(
"dzres_vs_pt_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
449 Plot(
"ptres_vs_pt_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
451 _common =
dict(title=
"", ytitle=
"Selected tracks/TrackingParticles", ymax=_maxEff)
453 Plot(
"nrec_vs_nsim", title=
"", xtitle=
"TrackingParticles", ytitle=
"Tracks", profileX=
True, xmin=_minMaxTracks, xmax=_minMaxTracks, ymin=_minMaxTracks, ymax=_minMaxTracks),
454 Plot(
"nrecPerNsim_vs_pu", xtitle=
"Pileup", xmin=_minPU, xmax=_maxPU, **_common),
455 Plot(
"nrecPerNsimPt", xtitle=
"p_{T} (GeV)", xlog=
True, **_common),
456 Plot(
"nrecPerNsim", xtitle=
"#eta", **_common)
457 ], legendDy=_legendDy_2rows)
459 Plot(
"PXLhits_vs_eta", xtitle=
"#eta", ytitle=
"<pixel hits>"),
460 Plot(
"PXLlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<pixel layers>"),
461 Plot(
"STRIPhits_vs_eta", xtitle=
"#eta", ytitle=
"<strip hits>"),
462 Plot(
"STRIPlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<strip layers>"),
463 ], legendDy=_legendDy_2rows)
475 ncols=2, legendDy=_legendDy_2rows)
481 ncols=2, legendDy=_legendDy_4rows)
487 ncols=2, legendDy=_legendDy_4rows,
494 ncols=2, legendDy=_legendDy_4rows,
503 _possibleTrackingNonIterationColls = [
507 _possibleTrackingColls = [
508 'initialStepPreSplitting',
512 'detachedTripletStep',
526 'jetCoreRegionalStep',
527 'muonSeededStepInOut',
528 'muonSeededStepOutIn',
530 ] + _possibleTrackingNonIterationColls
531 _possibleTrackingCollsOld = {
545 ret = subfolder.replace(
"trackingParticleRecoAsssociation",
"AssociatorByHitsRecoDenom")
546 for (old, new)
in [(
"InitialStep",
"Zero"),
547 (
"HighPtTripletStep",
"First"),
548 (
"LowPtQuadStep",
"Second"),
549 (
"LowPtTripletStep",
"Third"),
550 (
"DetachedQuadStep",
"Fourth"),
551 (
"PixelPairStep",
"Fifth"),
552 (
"MuonSeededStepInOut",
"Ninth"),
553 (
"MuonSeededStepOutIn",
"Tenth")]:
554 ret = ret.replace(old, new)
559 for (old, new)
in [(
"initialStep",
"iter0"),
560 (
"highPtTripletStep",
"iter1"),
561 (
"lowPtQuadStep",
"iter2"),
562 (
"lowPtTripletStep",
"iter3"),
563 (
"detachedQuadStep",
"iter4"),
564 (
"pixelPairStep",
"iter5"),
565 (
"muonSeededStepInOut",
"iter9"),
566 (
"muonSeededStepOutIn",
"iter10")]:
567 path = path.replace(old, new)
571 return subfolder.replace(
"trackingParticleRecoAsssociation",
"trackingParticleRecoAsssociationSignal")
573 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsConversion")
577 _additionalTrackQualities = [
584 quality =
"highPurity" 587 collNameNoQuality = collName.replace(
"Hp",
"")
588 for qual
in _additionalTrackQualities:
591 collNameNoQuality = collNameNoQuality.replace(qual,
"")
593 collNameNoQuality = collNameNoQuality.replace(
"Tracks",
"", 1)
596 if collNameLow.find(
"seed") == 0:
597 collNameLow = collNameLow[4:]
598 if collNameLow ==
"initialstepseedspresplitting":
599 collNameLow =
"initialsteppresplittingseeds" 600 elif collNameLow ==
"muonseededseedsinout":
601 collNameLow =
"muonseededstepinoutseeds" 602 elif collNameLow ==
"muonseededseedsoutin":
603 collNameLow =
"muonseededstepoutinseeds" 605 i_seeds = collNameLow.index(
"seeds")
606 quality = collNameLow[i_seeds:]+quality
608 collNameLow = collNameLow[:i_seeds]
611 prefixes = [
"cutsreco",
"cutsrecofrompv",
"cutsrecofrompv2",
"cutsrecofrompvalltp"]
612 if collNameLow
in [
"general",
"generalfrompv"]+prefixes:
617 if coll == collNameLow.replace(pfx,
""):
621 for coll
in _possibleTrackingColls:
622 if testColl(coll.lower()):
627 for coll, name
in _possibleTrackingCollsOld.iteritems():
628 if testColl(coll.lower()):
634 algo = collNameNoQuality
637 if algo ==
"muonSeededInOut":
638 algo =
"muonSeededStepInOut" 639 if algo ==
"muonSeededOutIn":
640 algo =
"muonSeededStepOutIn" 642 return (algo, quality)
645 return (name, [name])
646 _collLabelMap = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+_possibleTrackingColls))
647 _collLabelMapHp = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+
filter(
lambda n:
"Step" in n, _possibleTrackingColls)))
651 algo =
"generalTracks" 655 if algo !=
"generalTracks" and "ByOriginalAlgo" not in quality:
657 quality = quality.replace(
"ByOriginalAlgo",
"")
659 if algo !=
"generalTracks" and "ByAlgoMask" not in quality:
661 quality = quality.replace(
"ByAlgoMask",
"")
663 if "Pt09" not in quality:
665 quality = quality.replace(
"Pt09",
"")
668 if quality ==
"highPurity":
671 i_seeds = quality.find(
"seeds")
674 seedSubColl = quality[i_seeds+5:]
675 if seedSubColl !=
"":
676 ret += seedSubColl[0].
upper() + seedSubColl[1:]
683 def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, ptCut=False, seeds=False, midfix=""):
684 _common = {
"drawStyle":
"EP",
"xbinlabelsize": 10,
"xbinlabeloption":
"d"}
685 _commonN =
dict(ylog=
True, ymin=_minMaxN, ymax=_minMaxN,
686 normalizeToNumberOfEvents=
True,
688 _commonN.update(_common)
689 _commonAB =
dict(mapping=mapping,
690 renameBin=
lambda bl:
_summaryBinRename(bl, highPurity, byOriginalAlgo, byAlgoMask, ptCut, seeds),
691 ignoreMissingBins=
True,
694 if byOriginalAlgo
or byAlgoMask:
695 _commonAB[
"minExistingBins"] = 2
696 prefix =
"summary"+midfix
698 h_eff =
"effic_vs_coll" 699 h_fakerate =
"fakerate_vs_coll" 700 h_duplicaterate =
"duplicatesRate_coll" 701 h_pileuprate =
"pileuprate_coll" 703 h_reco =
"num_reco_coll" 704 h_true =
"num_assoc(recoToSim)_coll" 705 h_fake =
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll")
706 h_duplicate =
"num_duplicate_coll" 707 h_pileup =
"num_pileup_coll" 708 if mapping
is not None:
710 h_fakerate =
AggregateBins(
"fakerate", h_fakerate, **_commonAB)
711 h_duplicaterate =
AggregateBins(
"duplicatesRate", h_duplicaterate, **_commonAB)
712 h_pileuprate =
AggregateBins(
"pileuprate", h_pileuprate, **_commonAB)
717 h_duplicate =
AggregateBins(
"num_duplicate_coll", h_duplicate, **_commonAB)
718 h_pileup =
AggregateBins(
"num_pileup_coll", h_pileup, **_commonAB)
721 Plot(h_eff, title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
722 Plot(h_fakerate, title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
724 Plot(h_duplicaterate, title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
725 Plot(h_pileuprate, title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
727 legendDy=_legendDy_2rows
729 summaryN =
PlotGroup(prefix+
"_ntracks", [
736 Plot(h_reco, ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
737 Plot(h_true, ytitle=
"True tracks", title=
"Number of true tracks vs collection", **_commonN),
738 Plot(h_fake, ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
739 Plot(h_duplicate, ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
740 Plot(h_pileup, ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
743 return (summary, summaryN)
748 (_summaryByOriginalAlgo, _summaryByOriginalAlgoN) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo")
749 (_summaryByOriginalAlgoHp, _summaryByOriginalAlgoNHp) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo", highPurity=
True)
750 (_summaryByAlgoMask, _summaryByAlgoMaskN) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask")
751 (_summaryByAlgoMaskHp, _summaryByAlgoMaskNHp) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask", highPurity=
True)
752 (_summaryPt09, _summaryPt09N) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09")
753 (_summaryPt09Hp, _summaryPt09NHp) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09", highPurity=
True)
762 _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]}
764 _commonStatus.update(_common)
765 _commonStatus.update({
"xbinlabelsize": 10,
"xbinlabeloption":
"d",
"drawStyle":
"hist",
"adjustMarginRight": 0.08})
766 _commonLabelSize = {}
767 _commonLabelSize.update(_common)
768 _commonLabelSize.update({
"xlabelsize": 17})
771 Plot(
"selectionFlow", xbinlabelsize=10, xbinlabeloption=
"d", adjustMarginRight=0.1, drawStyle=
"hist", ylog=
True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]),
772 Plot(
"diffCharge", xtitle=
"Charge", **_common),
773 Plot(
"diffIsHighPurity", xtitle=
"High purity status", **_common),
774 Plot(
"diffNdof", xtitle=
"ndof", **_common),
775 Plot(
"diffNormalizedChi2", xtitle=
"#chi^{2}/ndof", **_common),
778 _packedCandidateHitsHitPattern =
PlotGroup(
"hitsHitPattern", [
779 Plot(
"diffHitPatternNumberOfValidHits", xtitle=
"Valid hits (via HitPattern)", **_common),
780 Plot(
"diffHitPatternNumberOfValidPixelHits", xtitle=
"Valid pixel hits (via HitPattern)", **_common),
781 Plot(
"diffHitPatternHasValidHitInFirstPixelBarrel", xtitle=
"Has valid hit in BPix1 layer (via HitPattern)", **_common),
782 Plot(
"diffHitPatternNumberOfLostPixelHits", xtitle=
"Lost pixel hits (via HitPattern)", **_common),
784 legendDy=_legendDy_2rows
787 Plot(
"diffNumberOfHits", xtitle=
"Hits", **_common),
788 Plot(
"diffNumberOfPixelHits", xtitle=
"Pixel hits", **_common),
789 Plot(
"diffLostInnerHits", xtitle=
"Lost inner hits", **_common),
790 Plot(
"numberHitsOverMax", xtitle=
"Number of overflown hits", **_common),
791 Plot(
"numberPixelHitsOverMax", xtitle=
"Number of overflown pixel hits", **_common),
792 Plot(
"numberStripHitsOverMax", xtitle=
"Number of overflown strip hits", **_common),
794 ncols=3, legendDy=_legendDy_2rows_3cols
799 Plot(
"diffNumberOfPixelLayers", xtitle=
"Pixel layers", **_common),
800 Plot(
"diffNumberOfStripLayers", xtitle=
"Strip layers", **_common),
802 Plot(
"diffHitPatternTrackerLayersWithMeasurement", xtitle=
"Layers (via HitPattern)", **_common),
803 Plot(
"diffHitPatternPixelLayersWithMeasurement", xtitle=
"Pixel layers (via HitPattern)", **_common),
804 Plot(
"diffHitPatternStripLayersWithMeasurement", xtitle=
"Strip layers (via HitPattern)", **_common),
806 Plot(
"numberLayersOverMax", xtitle=
"Number of overflown layers", **_common),
807 Plot(
"numberPixelLayersOverMax", xtitle=
"Number of overflown pixel layers", **_common),
808 Plot(
"numberStripLayersOverMax", xtitle=
"Number of overflown strip layers", **_common),
814 _packedCandidateImpactParameter1 =
PlotGroup(
"impactParameter1", [
815 Plot(
"diffDxyAssocPV", xtitle=
"dxy(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
816 Plot(
"diffDxyAssocPVStatus", **_commonStatus),
817 Plot(
"diffDxyAssocPVUnderOverFlowSign", xtitle=
"dxy(assocPV)", **_common),
818 Plot(
"diffDzAssocPV", xtitle=
"dz(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
819 Plot(
"diffDzAssocPVStatus", **_commonStatus),
820 Plot(
"diffDzAssocPVUnderOverFlowSign", xtitle=
"dz(assocPV)", **_common),
821 Plot(
"diffDxyError", xtitle=
"dxyError()", adjustMarginRight=0.02, **_commonLabelSize),
822 Plot(
"diffDszError", xtitle=
"dszError()", adjustMarginRight=0.02, **_commonLabelSize),
823 Plot(
"diffDzError", xtitle=
"dzError()", adjustMarginRight=0.02, **_commonLabelSize),
829 _packedCandidateImpactParameter2 =
PlotGroup(
"impactParameter2", [
830 Plot(
"diffDxyPV", xtitle=
"dxy(PV) via PC", **_commonLabelSize),
831 Plot(
"diffDzPV", xtitle=
"dz(PV) via PC", **_commonLabelSize),
832 Plot(
"diffTrackDxyAssocPV", xtitle=
"dxy(PV) via PC::bestTrack()", **_commonLabelSize),
833 Plot(
"diffTrackDzAssocPV", xtitle=
"dz(PV) via PC::bestTrack()", **_commonLabelSize),
834 Plot(
"diffTrackDxyError", xtitle=
"dxyError() via PC::bestTrack()", adjustMarginRight=0.02, **_commonLabelSize),
835 Plot(
"diffTrackDzError", xtitle=
"dzError() via PC::bestTrack()", **_commonLabelSize),
838 _packedCandidateCovarianceMatrix1 =
PlotGroup(
"covarianceMatrix1", [
839 Plot(
"diffCovQoverpQoverp", xtitle=
"cov(qoverp, qoverp)", **_commonLabelSize),
840 Plot(
"diffCovQoverpQoverpStatus", **_commonStatus),
841 Plot(
"diffCovQoverpQoverpUnderOverFlowSign", xtitle=
"cov(qoverp, qoverp)", **_common),
842 Plot(
"diffCovLambdaLambda", xtitle=
"cov(lambda, lambda)", **_commonLabelSize),
843 Plot(
"diffCovLambdaLambdaStatus", **_commonStatus),
844 Plot(
"diffCovLambdaLambdaUnderOverFlowSign", xtitle=
"cov(lambda, lambda)", **_common),
845 Plot(
"diffCovLambdaDsz", xtitle=
"cov(lambda, dsz)", **_commonLabelSize),
846 Plot(
"diffCovLambdaDszStatus", **_commonStatus),
847 Plot(
"diffCovLambdaDszUnderOverFlowSign", xtitle=
"cov(lambda, dsz)", **_common),
848 Plot(
"diffCovPhiPhi", xtitle=
"cov(phi, phi)", **_commonLabelSize),
849 Plot(
"diffCovPhiPhiStatus", **_commonStatus),
850 Plot(
"diffCovPhiPhiUnderOverFlowSign", xtitle=
"cov(phi, phi)", **_common),
852 ncols=3, legendDy=_legendDy_4rows
854 _packedCandidateCovarianceMatrix2 =
PlotGroup(
"covarianceMatrix2", [
855 Plot(
"diffCovPhiDxy", xtitle=
"cov(phi, dxy)", **_commonLabelSize),
856 Plot(
"diffCovPhiDxyStatus", **_commonStatus),
857 Plot(
"diffCovPhiDxyUnderOverFlowSign", xtitle=
"cov(phi, dxy)", **_common),
858 Plot(
"diffCovDxyDxy", xtitle=
"cov(dxy, dxy)", adjustMarginRight=0.02, **_commonLabelSize),
859 Plot(
"diffCovDxyDxyStatus", **_commonStatus),
860 Plot(
"diffCovDxyDxyUnderOverFlowSign", xtitle=
"cov(dxy, dxy)", **_common),
861 Plot(
"diffCovDxyDsz", xtitle=
"cov(dxy, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
862 Plot(
"diffCovDxyDszStatus", **_commonStatus),
863 Plot(
"diffCovDxyDszUnderOverFlowSign", xtitle=
"cov(dxy, dsz)", **_common),
864 Plot(
"diffCovDszDsz", xtitle=
"cov(dsz, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
865 Plot(
"diffCovDszDszStatus", **_commonStatus),
866 Plot(
"diffCovDszDszUnderOverFlowSign", xtitle=
"cov(dsz, dsz)", **_common),
868 ncols=3, legendDy=_legendDy_4rows
871 _common[
"xlabelsize"] = 16
873 Plot(
"diffVx", xtitle=
"Reference point x", **_common),
874 Plot(
"diffVy", xtitle=
"Reference point y", **_common),
875 Plot(
"diffVz", xtitle=
"Reference point z", **_common),
877 legendDy=_legendDy_2rows
880 _common[
"adjustMarginRight"] = 0.05
882 Plot(
"diffPt", xtitle=
"p_{T}", **_common),
883 Plot(
"diffPtError", xtitle=
"p_{T} error", **_common),
884 Plot(
"diffEta", xtitle=
"#eta", **_common),
885 Plot(
"diffEtaError", xtitle=
"#eta error", **_common),
886 Plot(
"diffPhi", xtitle=
"#phi", **_common),
892 PlotFolder.__init__(self, *args, **kwargs)
895 spl = dqmSubFolderName.split(
"_")
902 (algoOrig, quality) = translatedDqmSubFolder
908 if plotFolderName !=
"":
909 ret +=
"_"+plotFolderName
912 if not (algo ==
"ootb" and quality !=
""):
917 """Return True if this subfolder should be processed 920 limitOnlyTo -- Function '(algo, quality) -> bool' 921 translatedDqmSubFolder -- Return value of translateSubFolder 923 (algo, quality) = translatedDqmSubFolder
924 return limitOnlyTo(algo, quality)
928 return algo
not in _possibleTrackingNonIterationColls
939 def __init__(self, section, collection=GeneralTracks):
955 def _getAlgoQuality(data, algo, quality):
956 for label, value
in data.iteritems():
958 if a == algo
and q == quality:
962 h = tdirectory.Get(hname)
967 return _getAlgoQuality(data,
"ootb",
"")
969 return _getAlgoQuality(data,
"ootb",
"Pt09")
971 return _getAlgoQuality(data,
"ootb",
"highPurity")
973 return _getAlgoQuality(data,
"ootb",
"highPurityPt09")
975 return _getAlgoQuality(data,
"btvLike",
"")
977 return _getAlgoQuality(data,
"ak4PFJets",
"")
979 return _getAlgoQuality(data,
"pixel",
"")
982 def _formatOrNone(num, func):
987 n_tps = _formatOrNone(_getN(
"num_simul_coll"), int)
988 n_m_tps = _formatOrNone(_getN(
"num_assoc(simToReco)_coll"), int)
990 n_tracks = _formatOrNone(_getN(
"num_reco_coll"), int)
991 n_true = _formatOrNone(_getN(
"num_assoc(recoToSim)_coll"), int)
992 if n_tracks
is not None and n_true
is not None:
993 n_fake = n_tracks-n_true
996 n_pileup = _formatOrNone(_getN(
"num_pileup_coll"), int)
997 n_duplicate = _formatOrNone(_getN(
"num_duplicate_coll"), int)
999 eff = _formatOrNone(_getN(
"effic_vs_coll"),
lambda n:
"%.4f" % n)
1000 eff_nopt = _formatOrNone(_getN(
"effic_vs_coll_allPt"),
lambda n:
"%.4f" % n)
1001 fake = _formatOrNone(_getN(
"fakerate_vs_coll"),
lambda n:
"%.4f" % n)
1002 duplicate = _formatOrNone(_getN(
"duplicatesRate_coll"),
lambda n:
"%.4f" % n)
1004 ret = [eff, n_tps, n_m_tps,
1005 eff_nopt, fake, duplicate,
1006 n_tracks, n_true, n_fake, n_pileup, n_duplicate]
1007 if ret.count(
None) == len(ret):
1014 "Number of TrackingParticles (after cuts)",
1015 "Number of matched TrackingParticles",
1016 "Efficiency (w/o pT cut)",
1020 "Number of true tracks",
1021 "Number of fake tracks",
1022 "Number of pileup tracks",
1023 "Number of duplicate tracks" 1028 def __init__(self, fileName, plots, titles, isRate, **kwargs):
1034 if len(plots) != len(titles):
1035 raise Exception(
"Number of plots (%d) has to be the same as number of titles (%d)" % (len(plots), len(titles)))
1037 def _set(attr, default):
1038 setattr(self,
"_"+attr, kwargs.get(attr, default))
1040 _set(
"onlyForPileup",
False)
1043 """Return True if the PlotGroup is intended only for pileup samples""" 1044 return self._onlyForPileup
1046 def create(self, tdirectoryNEvents, requireAllHistograms=False):
1049 plot.create(tdirectoryNEvents, requireAllHistograms)
1051 def draw(self, legendLabels, prefix=None, directory="", *args, **kwargs):
1053 onlyEmptyPlots =
True 1055 if not plot.isEmpty():
1056 onlyEmptyPlots =
False 1061 haveShortLabels =
False 1062 legendLabels = legendLabels[:]
1063 if max(
map(len, legendLabels)) > 20:
1064 haveShortLabels =
True 1065 labels_short = [
str(chr(ord(
'A')+i))
for i
in xrange(len(legendLabels))]
1066 for i, ls
in enumerate(labels_short):
1067 legendLabels[i] =
"%s: %s" % (ls, legendLabels[i])
1069 labels_short = legendLabels
1074 ' <table border="1">',
1085 for h, l
in zip(plot._histograms, labels_short):
1087 h_tmp.append(len(histos_linear))
1088 histos_linear.append(h)
1092 histos_index.append(h_tmp)
1093 labels.append(l_tmp)
1096 ' <td colspan="%d">%s</td>' % (len(h_tmp), title),
1099 if len(histos_linear) == 0:
1109 if len(histos_linear) == 0:
1113 if len(histos_linear_new) > 0
and len(histos_linear_new) != len(histos_linear):
1114 raise Exception(
"This should never happen. len(histos_linear_new) %d != len(histos_linear) %d" % (len(histos_linear_new), len(histos_linear)))
1115 histos_linear = histos_linear_new
1116 if len(histos_linear) == 0:
1119 data = [ [h.GetBinContent(i)
for i
in xrange(1, h.GetNbinsX()+1)]
for h
in histos_linear]
1120 table =
html.Table([
"dummy"]*len(histos_linear), xbinlabels, data,
None,
None,
None)
1121 data = table.tableAsRowColumn()
1124 content.append(
' <td></td>')
1125 content.extend([
' <td>%s</td>' % lab
for lab
in labs])
1130 for irow, row
in enumerate(data):
1133 ' <td>%s</td>' % table.rowHeaders()[irow]
1136 for hindices
in histos_index:
1137 for hindex
in hindices:
1139 formatted = self.
_format%item
if item
is not None else "" 1140 content.append(
' <td align="right">%s</td>' % formatted)
1141 content.append(
' <td></td>')
1143 content.append(
' </tr>')
1145 content.append(
' </table>')
1147 for lab
in legendLabels:
1148 content.append(
' %s<br/>' % lab)
1156 if prefix
is not None:
1159 name = os.path.join(directory, name)
1161 with open(name,
"w")
as f:
1162 for line
in content:
1168 [
"Fake rate",
"Duplicate rate",
"Pileup rate"], isRate=
True)
1170 [
"All tracks",
"True tracks",
"Fake tracks",
"Duplicate tracks"], isRate=
False)
1174 "DQMData/Run 1/Tracking/Run summary/"+lastDirName,
1175 "DQMData/Tracking/"+lastDirName,
1176 "DQMData/Run 1/RecoTrackV/Run summary/"+lastDirName,
1177 "DQMData/RecoTrackV/"+lastDirName,
1181 _effandfakePtEtaPhi,
1184 _effandfakeHitsLayers,
1186 _effandfakeDeltaRPU,
1190 _dupandfakePtEtaPhi,
1193 _dupandfakeHitsLayers,
1195 _dupandfakeDeltaRPU,
1196 _dupandfakeChi2Seeding,
1197 _dupandfakeSeedingTable,
1209 _seedingBuildingPlots = _simBasedPlots + [
1210 _dupandfakePtEtaPhi,
1213 _dupandfakeHitsLayers,
1215 _dupandfakeDeltaRPU,
1216 _dupandfakeChi2Seeding,
1217 _dupandfakeSeedingTable,
1231 _extDistChi2Seeding,
1232 _extDistSeedingTable,
1237 _extDistSimPtEtaPhi,
1240 _extDistSimHitsLayers,
1241 _extDistSimPosDeltaR,
1246 _summaryByOriginalAlgo,
1247 _summaryByOriginalAlgoN,
1249 _summaryByAlgoMaskN,
1256 _summaryByOriginalAlgoHp,
1257 _summaryByOriginalAlgoNHp,
1258 _summaryByAlgoMaskHp,
1259 _summaryByAlgoMaskNHp,
1263 _summaryPlotsSeeds = [
1267 _packedCandidatePlots = [
1268 _packedCandidateFlow,
1269 _packedCandidateKinematics,
1270 _packedCandidateVertex,
1271 _packedCandidateImpactParameter1,
1272 _packedCandidateImpactParameter2,
1273 _packedCandidateCovarianceMatrix1,
1274 _packedCandidateCovarianceMatrix2,
1275 _packedCandidateHits,
1276 _packedCandidateHitsHitPattern,
1277 _packedCandidateLayers,
1281 def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, onlyForElectron=False, onlyForConversion=False, onlyForBHadron=False, seeding=False, rawSummary=False, highPuritySummary=True):
1284 limiters =
dict(onlyForPileup=onlyForPileup, onlyForElectron=onlyForElectron, onlyForConversion=onlyForConversion, onlyForBHadron=onlyForBHadron)
1286 _trackingRefFileFallbackSLHC_Phase1PU140
1288 common =
dict(fallbackDqmSubFolders=[
1289 _trackingSubFoldersFallbackSLHC_Phase1PU140,
1290 _trackingSubFoldersFallbackFromPV, _trackingSubFoldersFallbackConversion])
1291 plotter.append(name, folders,
TrackingPlotFolder(*algoPlots, **commonForTPF), **common)
1292 plotterExt.append(name, folders,
TrackingPlotFolder(*_extendedPlots, **commonForTPF), **common)
1296 summaryName += name+
"_" 1297 summaryName +=
"summary" 1300 summaryPlots.extend([_summaryRaw, _summaryRawN])
1301 summaryPlots.extend(_summaryPlots)
1306 plotter.append(summaryName, folders,
1307 PlotFolder(*summaryPlots, section=name, **common))
1308 if highPuritySummary:
1309 plotter.append(summaryName+
"_highPurity", folders,
1310 PlotFolder(*_summaryPlotsHp, section=name+
"_highPurity" if name !=
"" else "highPurity", **common),
1311 fallbackNames=[summaryName])
1313 plotter.append(summaryName+
"_seeds", folders,
1314 PlotFolder(*_summaryPlotsSeeds, section=name+
"_seeds", **common))
1318 if highPuritySummary:
1319 sectionName = name+
"_highPurity" if name !=
"" else "highPurity" 1328 _appendTrackingPlots(
"TrackFromPV",
"fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1329 _appendTrackingPlots(
"TrackFromPVAllTP",
"fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1330 _appendTrackingPlots(
"TrackFromPVAllTP2",
"fromPVAllTP2", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1333 _appendTrackingPlots(
"TrackConversion",
"conversion", _simBasedPlots+_recoBasedPlots, onlyForConversion=
True, rawSummary=
True, highPuritySummary=
False)
1334 _appendTrackingPlots(
"TrackGsf",
"gsf", _simBasedPlots+_recoBasedPlots, onlyForElectron=
True, rawSummary=
True, highPuritySummary=
False)
1335 _appendTrackingPlots(
"TrackBHadron",
"bhadron", _simBasedPlots+_recoBasedPlots, onlyForBHadron=
True)
1346 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1348 plotter.append(
"packedCandidateLostTracks",
_trackingFolders(
"PackedCandidate/lostTracks"),
1349 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1354 "DQMData/Run 1/HLT/Run summary/Tracking/ValidationWRTtp",
1359 plotterHLT.append(
"hlt", _hltFolder,
TrackingPlotFolder(*(_simBasedPlots+_recoBasedPlots), **_common))
1360 plotterHLTExt.append(
"hlt", _hltFolder,
TrackingPlotFolder(*_extendedPlots, **_common))
1364 def __init__(self, name, clusterMasking=None, seeding=None, building=None, fit=None, selection=None, other=[]):
1367 def _set(param, name, modules):
1368 if param
is not None:
1369 setattr(self, name, param)
1371 setattr(self, name, modules)
1373 _set(clusterMasking,
"_clusterMasking", [self.
_name+
"Clusters"])
1376 _set(seeding,
"_seeding", [self.
_name+
"SeedingLayers", self.
_name+
"TrackingRegions", self.
_name+
"HitDoublets", self.
_name+
"HitTriplets", self.
_name+
"HitQuadruplets", self.
_name+
"Seeds"])
1377 _set(building,
"_building", [self.
_name+
"TrackCandidates"])
1378 _set(fit,
"_fit", [self.
_name+
"Tracks"])
1379 _set(selection,
"_selection", [self.
_name])
1386 return self._clusterMasking+self._seeding+self._building+self._fit+self._selection+self.
_other 1389 return self._clusterMasking
1392 return self._seeding
1395 return self._building
1401 return self._selection
1410 (
"Fit", self.
fit()),
1412 (
"Other", self.
other())]
1417 seeding=[
"initialStepSeedLayersPreSplitting",
1418 "initialStepTrackingRegionsPreSplitting",
1419 "initialStepHitDoubletsPreSplitting",
1420 "initialStepHitTripletsPreSplitting",
1421 "initialStepHitQuadrupletsPreSplitting",
1422 "initialStepSeedsPreSplitting"],
1423 building=[
"initialStepTrackCandidatesPreSplitting"],
1424 fit=[
"initialStepTracksPreSplitting"],
1425 other=[
"firstStepPrimaryVerticesPreSplitting",
1426 "initialStepTrackRefsForJetsPreSplitting",
1427 "caloTowerForTrkPreSplitting",
1428 "ak4CaloJetsForTrkPreSplitting",
1429 "jetsForCoreTrackingPreSplitting",
1432 "MeasurementTrackerEvent",
1433 "siPixelClusterShapeCache"]),
1434 Iteration(
"initialStep", clusterMasking=[],
1435 selection=[
"initialStepClassifier1",
1436 "initialStepClassifier2",
1437 "initialStepClassifier3",
1439 "initialStepSelector"],
1440 other=[
"firstStepPrimaryVerticesUnsorted",
1441 "initialStepTrackRefsForJets",
1443 "ak4CaloJetsForTrk",
1444 "firstStepPrimaryVertices"]),
1446 selection=[
"highPtTripletStepClassifier1",
1447 "highPtTripletStepClassifier2",
1448 "highPtTripletStepClassifier3",
1449 "highPtTripletStep",
1450 "highPtTripletStepSelector"]),
1452 selection=[
"detachedQuadStepClassifier1",
1453 "detachedQuadStepClassifier2",
1455 "detachedQuadStepSelector"]),
1457 selection=[
"detachedTripletStepClassifier1",
1458 "detachedTripletStepClassifier2",
1459 "detachedTripletStep",
1460 "detachedTripletStepSelector"]),
1462 selection=[
"lowPtQuadStepClassifier1",
1463 "lowPtQuadStepClassifier2",
1465 "lowPtQuadStepSelector"]),
1467 selection=[
"lowPtTripletStepClassifier1",
1468 "lowPtTripletStepClassifier2",
1470 "lowPtTripletStepSelector"]),
1472 seeding=[
"pixelPairStepSeedLayers",
1473 "pixelPairStepSeedLayersB",
1474 "pixelPairStepSeedLayersC",
1475 "pixelPairStepTrackingRegions",
1476 "pixelPairStepTrackingRegionsB",
1477 "pixelPairStepTrackingRegionsC",
1478 "pixelPairStepTrackingRegionsSeedLayersB",
1479 "pixelPairStepHitDoublets",
1480 "pixelPairStepHitDoubletsB",
1481 "pixelPairStepHitDoubletsC",
1482 "pixelPairStepSeedsA",
1483 "pixelPairStepSeedsB",
1484 "pixelPairStepSeedsC",
1485 "pixelPairStepSeeds",],
1486 selection=[
"pixelPairStep",
1487 "pixelPairStepSelector"]),
1489 seeding=[
"mixedTripletStepSeedLayersA",
1490 "mixedTripletStepSeedLayersB",
1491 "mixedTripletStepTrackingRegionsA",
1492 "mixedTripletStepTrackingRegionsB",
1493 "mixedTripletStepHitDoubletsA",
1494 "mixedTripletStepHitDoubletsB",
1495 "mixedTripletStepHitTripletsA",
1496 "mixedTripletStepHitTripletsB",
1497 "mixedTripletStepSeedsA",
1498 "mixedTripletStepSeedsB",
1499 "mixedTripletStepSeeds"],
1500 selection=[
"mixedTripletStepClassifier1",
1501 "mixedTripletStepClassifier2",
1503 "mixedTripletStepSelector"]),
1505 selection=[
"pixelLessStepClassifier1",
1506 "pixelLessStepClassifier2",
1508 "pixelLessStepSelector"]),
1510 seeding=[
"tobTecStepSeedLayersTripl",
1511 "tobTecStepSeedLayersPair",
1512 "tobTecStepTrackingRegionsTripl",
1513 "tobTecStepTrackingRegionsPair",
1514 "tobTecStepHitDoubletsTripl",
1515 "tobTecStepHitDoubletsPair",
1516 "tobTecStepHitTripletsTripl",
1517 "tobTecStepSeedsTripl",
1518 "tobTecStepSeedsPair",
1520 selection=[
"tobTecStepClassifier1",
1521 "tobTecStepClassifier2",
1523 "tobTecStepSelector"]),
1526 other=[
"jetsForCoreTracking",
1527 "firstStepGoodPrimaryVertices",
1531 seeding=[
"muonSeededSeedsInOut",
1532 "muonSeededSeedsOutIn"],
1533 building=[
"muonSeededTrackCandidatesInOut",
1534 "muonSeededTrackCandidatesOutIn"],
1535 fit=[
"muonSeededTracksInOut",
1536 "muonSeededTracksOutIn"],
1537 selection=[
"muonSeededTracksInOutClassifier",
1538 "muonSeededTracksInOutSelector",
1539 "muonSeededTracksOutIntClassifier",
1540 "muonSeededTracksOutIntSelector"],
1544 clusterMasking=[], seeding=[],
1545 building=[
"duplicateTrackCandidates"],
1546 fit=[
"mergedDuplicateTracks"],
1547 selection=[
"duplicateTrackClassifier"]),
1549 clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1550 other=[
"preDuplicateMergingGeneralTracks",
1553 clusterMasking=[
"convClusters"],
1554 seeding=[
"convLayerPairs",
1555 "photonConvTrajSeedFromSingleLeg"],
1556 building=[
"convTrackCandidates"],
1557 fit=[
"convStepTracks"],
1558 selection=[
"convStepSelector"]),
1559 Iteration(
"Other", clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1560 other=[
"trackerClusterCheckPreSplitting",
1561 "trackerClusterCheck"]),
1565 iterations = _iterations
1566 if not includeConvStep:
1567 iterations =
filter(
lambda i: i.name() !=
"ConvStep", iterations)
1569 iterations =
filter(
lambda i: i.name() ==
"ConvStep", iterations)
1570 return collections.OrderedDict([(i.name(), i.all())
for i
in iterations])
1574 for i
in _iterations:
1575 if i.name() ==
"ConvStep":
1577 ret.extend(getattr(i, prop)())
1580 return collections.OrderedDict([
1581 (
"ClusterMask", getProp(
"clusterMasking")),
1582 (
"Seeding", getProp(
"seeding")),
1583 (
"Building", getProp(
"building")),
1584 (
"Fitting", getProp(
"fit")),
1585 (
"Selection", getProp(
"selection")),
1586 (
"Other", getProp(
"other"))
1605 if eventsTh1
is None:
1607 nevents = eventsTh1.GetEntries()
1611 ret = timeTh1.Clone(self.
_name)
1612 xaxis = ret.GetXaxis()
1613 for i
in xrange(1, ret.GetNbinsX()+1):
1614 ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1615 ret.SetBinError(i, ret.GetBinError(i)/nevents)
1616 xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).
replace(
" (unscheduled)",
""))
1620 path = tdirectory.GetPath()
1621 if path
not in self.
_cache:
1626 def __init__(self, name, timeHisto, selectedTracks=False):
1636 tdir = tfile.Get(dirName)
1648 tfile = tdirectory.GetFile()
1653 iterMap = copy.copy(_collLabelMapHp)
1654 del iterMap[
"generalTracks"]
1655 del iterMap[
"jetCoreRegionalStep"]
1657 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
True, byOriginalAlgo=
False, byAlgoMask=
True, ptCut=
False, seeds=
False)
1659 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
False, byOriginalAlgo=
False, byAlgoMask=
False, ptCut=
False, seeds=
False)
1660 recoAB =
AggregateBins(
"tmp",
"num_reco_coll", mapping=iterMap,ignoreMissingBins=
True, renameBin=renameBin)
1661 h_reco_per_iter = recoAB.create(trkDir)
1662 if h_reco_per_iter
is None:
1665 for i
in xrange(1, h_reco_per_iter.GetNbinsX()+1):
1666 values[h_reco_per_iter.GetXaxis().GetBinLabel(i)] = h_reco_per_iter.GetBinContent(i)
1670 for i
in xrange(1, timeTh1.GetNbinsX()+1):
1671 iterName = timeTh1.GetXaxis().GetBinLabel(i)
1672 if iterName
in values:
1673 ntrk = values[iterName]
1674 result.append( (iterName,
1675 timeTh1.GetBinContent(i)/ntrk
if ntrk > 0
else 0,
1676 timeTh1.GetBinError(i)/ntrk
if ntrk > 0
else 0) )
1678 if len(result) == 0:
1681 res = ROOT.TH1F(self.
_name, self.
_name, len(result), 0, len(result))
1682 for i, (label, value, error)
in enumerate(result):
1683 res.GetXaxis().SetBinLabel(i+1, label)
1684 res.SetBinContent(i+1, value)
1685 res.SetBinError(i+1, error)
1694 h = f.Get(_trackingIterationOrderHistogram)
1697 xaxis = h.GetXaxis()
1701 return s.replace(
"Tracks",
"").
replace(
"muonSeeded",
"muonSeededStep")
1702 return [_edit(xaxis.GetBinLabel(i))
for i
in xrange(1, h.GetNbinsX()+1)]
1705 ret = range(0, len(labels))
1706 f = tdirectory.GetFile()
1710 if not f.GetName()
in self.
_cache:
1714 self.
_cache[f.GetName()] = r
1715 order = self.
_cache[f.GetName()]
1721 orderIndices.append(labels.index(l))
1725 for i, l
in enumerate(labels):
1728 found = orderIndices.index(i)
1732 ret.append(orderIndices[0])
1734 ret.append(orderIndices[0])
1759 h = tdirectory.Get(histo)
1762 totalReco =
"%.1f" % h.Integral()
1765 h = creator.create(tdirectory)
1766 totalTracking =
None 1768 totalTracking =
"%.1f" % h.Integral()
1771 h = creator.create(tdirectory)
1772 totalConvStep =
None 1774 totalConvStep =
"%.1f" % h.Integral()
1783 cpuValues = self.
_getValues(tdirectory, _time_per_event_cpu)
1784 realValues = self.
_getValues(tdirectory, _time_per_event_real)
1786 return cpuValues + realValues
1790 "Average reco CPU time / event (ms)",
1791 "Average tracking (w/o convStep) CPU time / event (ms)",
1792 "Average convStep CPU time / event (ms)",
1793 "Average reco real time / event (ms)",
1794 "Average tracking (w/o convStep) real time / event (ms)",
1795 "Average convStep real time / event (ms)",
1800 "xbinlabelsize": 10,
1801 "xbinlabeloption":
"d" 1809 Plot(_time_per_iter_cpu,
1810 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", legendDx=-0.4, **_common),
1812 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1815 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", **_common),
1817 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1820 ytitle=
"Average CPU time / built track (ms)", title=
"Average CPU time / built track", **_common),
1822 ytitle=
"Average CPU time / selected track (ms)", title=
"Average CPU time / selected HP track by algoMask", **_common),
1826 Plot(_time_per_iter_real,
1827 ytitle=
"Average real time (ms)", title=
"Average real time / event", legendDx=-0.4, **_common),
1829 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1832 ytitle=
"Average real time (ms)", title=
"Average real time / event", **_common),
1834 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1837 ytitle=
"Average real time / built track (ms)", title=
"Average real time / built track", **_common),
1839 ytitle=
"Average real time / selected track (ms)", title=
"Average real time / selected HP track by algoMask", **_common),
1844 Plot(
AggregateBins(i.name(), _time_per_event_cpu, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1845 ytitle=
"Average CPU time (ms)", title=i.name(), **_common)
1846 for i
in _iterations
1848 ncols=4, legend=
False 1851 Plot(
AggregateBins(i.name(), _time_per_event_real, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1852 ytitle=
"Average real time (ms)", title=i.name(), **_common)
1853 for i
in _iterations
1855 ncols=4, legend=
False 1865 "DQMData/Run 1/DQM/Run summary/TimerService/process RECO paths/path prevalidation_step",
1868 timePlotter.append(
"timing", _timeFolders,
PlotFolder(
1870 _timing_iterationsCPU,
1871 _timing_summaryReal,
1872 _timing_iterationsReal,
1878 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist"}
1880 Plot(
"TPlip", xtitle=
"TP lip", **_common),
1881 Plot(
"TPtip", xtitle=
"TP tip", **_common),
1885 tpPlotter.append(
"tp", [
1886 "DQMData/Run 1/Tracking/Run summary/TrackingMCTruth/TrackingParticle",
1887 "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)