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 _minPU = [0, 10, 20, 50, 100, 150]
36 _maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
37 _minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
38 _minMaxMVA = [-1.025, -0.5, 0, 0.5, 1.025]
41 return ([-x
for x
in ma], ma)
44 (_minResidualCotTheta, _maxResidualCotTheta) =
_minMaxResidual([1e-4, 2e-4])
46 (_minResidualDz, _maxResidualDz) = (_minResidualDxy, _maxResidualDxy)
51 _legendDy_2rows = -0.025
52 _legendDy_2rows_3cols = -0.17
53 _legendDy_4rows = 0.09
60 _trackingIterationOrderHistogram =
"DQMData/Run 1/Tracking/Run summary/TrackBuilding/num_reco_coll" 67 xq +=
" (" + unit +
")" 69 effargs =
dict(xtitle=
"TP "+xq , ytitle=
"efficiency vs "+q , ymax=_maxEff)
70 fakeargs =
dict(xtitle=
"track "+xq, ytitle=
"fake+duplicates rate vs "+q, ymax=_maxFake)
71 effargs.update(common)
72 fakeargs.update(common)
73 effargs.update(effopts)
74 fakeargs.update(fakeopts)
77 Plot(
"effic_vs_"+p, **effargs),
78 Plot(
FakeDuplicate(
"fakeduprate_vs_"+p, assoc=
"num_assoc(recoToSim)_"+p, dup=
"num_duplicate_"+p, reco=
"num_reco_"+p, title=
"fake+duplicates vs "+q), **fakeargs)
90 xq +=
" (" + unit +
")" 94 Plot(
"fakerate_vs_"+p , xtitle=xtitle, ytitle=
"fakerate vs "+q , ymax=_maxFake, **common),
95 Plot(
"duplicatesRate_"+p, xtitle=xtitle, ytitle=
"duplicates rate vs "+q, ymax=_maxFake, **common),
96 Plot(
"pileuprate_"+p , xtitle=xtitle, ytitle=
"pileup rate vs "+q , ymax=_maxFake, **common),
100 return Subtract(
"num_fake_"+postfix,
"num_reco_"+postfix,
"num_assoc(recoToSim)_"+postfix)
106 args =
dict(xtitle=
"track "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
110 Plot(
"num_reco_"+p , ytitle=
"tracks", **args),
111 Plot(
"num_assoc(recoToSim)_"+p, ytitle=
"true tracks", **args),
113 Plot(
"num_duplicate_"+p , ytitle=
"duplicate tracks", **args),
120 args =
dict(xtitle=
"TP "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
124 Plot(
"num_simul_"+p , ytitle=
"TrackingParticles", **args),
125 Plot(
"num_assoc(simToReco)_"+p, ytitle=
"Reconstructed TPs", **args),
129 pfix =
"_hp" if hp
else "" 130 pfix2 =
"Hp" if hp
else "" 132 xtitle =
"MVA%d output"%num
133 xtitlecut =
"Cut on MVA%d output"%num
134 args =
dict(xtitle=xtitle, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
137 xtitle=
"Efficiency (excl. trk eff)", ytitle=
"Fake rate",
138 xmax=_maxEff, ymax=_maxFake,
142 ztitle=
"Cut on MVA%d"%num,
143 xtitleoffset=5, ytitleoffset=6.5, ztitleoffset=4,
144 adjustMarginRight=0.12
146 argsroc2.update(argsroc)
147 argsroc2[
"drawStyle"] =
"pcolz" 149 argsprofile =
dict(ymin=_minMaxMVA, ymax=_minMaxMVA)
151 true_cuteff =
CutEfficiency(
"trueeff_vs_mva%dcut%s"%(num,pfix),
"num_assoc(recoToSim)_mva%dcut%s"%(num,pfix))
152 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)))
156 Plot(
"num_assoc(recoToSim)_mva%d%s"%(num,pfix), ytitle=
"true tracks", **args),
157 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),
158 Plot(
"effic_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
160 Plot(
"fakerate_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Fake rate", ymax=_maxFake),
161 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),
162 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),
164 Plot(true_cuteff, xtitle=xtitlecut, ytitle=
"True track selection efficiency", ymax=_maxEff),
165 Plot(fake_cuteff, xtitle=xtitlecut, ytitle=
"Fake track selection efficiency", ymax=_maxEff),
166 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),
167 ], ncols=3, legendDy=_legendDy_1row),
169 Plot(
"mva_assoc(recoToSim)_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for true tracks", xlog=
True, **argsprofile),
170 Plot(
"mva_fake_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for fake tracks", xlog=
True, **argsprofile),
171 Plot(
"mva_assoc(recoToSim)_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for true tracks", **argsprofile),
172 Plot(
"mva_fake_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for fake tracks", **argsprofile),
173 ], legendDy=_legendDy_2rows)
177 Plot(
"efficPt", title=
"Efficiency vs p_{T}", xtitle=
"TP p_{T} (GeV)", ytitle=
"efficiency vs p_{T}", xlog=
True, ymax=_maxEff),
178 Plot(
FakeDuplicate(
"fakeduprate_vs_pT", assoc=
"num_assoc(recoToSim)_pT", dup=
"num_duplicate_pT", reco=
"num_reco_pT", title=
"fake+duplicates vs p_{T}"),
179 xtitle=
"track p_{T} (GeV)", ytitle=
"fake+duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
180 Plot(
"effic", xtitle=
"TP #eta", ytitle=
"efficiency vs #eta", title=
"", ymax=_maxEff),
181 Plot(
FakeDuplicate(
"fakeduprate_vs_eta", assoc=
"num_assoc(recoToSim)_eta", dup=
"num_duplicate_eta", reco=
"num_reco_eta", title=
""),
182 xtitle=
"track #eta", ytitle=
"fake+duplicates rate vs #eta", ymax=_maxFake),
190 legendDy=_legendDy_2rows
197 legendDy=_legendDy_4rows
199 _effandfakeHitsLayers =
PlotGroup(
"effandfakeHitsLayers",
204 legendDy=_legendDy_4rows
206 _common = {
"ymin": 0,
"ymax": _maxEff}
207 _effandfakePosDeltaRPU =
PlotGroup(
"effandfakePosDeltaRPU",
208 _makeEffFakeDupPlots(
"vertpos",
"vert r",
"cm", fakeopts=
dict(xtitle=
"track ref. point r (cm)", ytitle=
"fake+duplicates vs. r"), common=
dict(xlog=
True)) +
209 _makeEffFakeDupPlots(
"zpos" ,
"vert z",
"cm", fakeopts=
dict(xtitle=
"track ref. point z (cm)", ytitle=
"fake+duplicates vs. z")) +
212 legendDy=_legendDy_4rows
214 _algos_common =
dict(removeEmptyBins=
True, xbinlabelsize=10, xinlabeloption=
"d")
215 _duplicateAlgo =
PlotOnSideGroup(
"duplicateAlgo",
Plot(
"duplicates_oriAlgo_vs_oriAlgo", drawStyle=
"COLZ", adjustMarginLeft=0.1, adjustMarginRight=0.1, **_algos_common))
218 Plot(
"fakeratePt", xtitle=
"track p_{T} (GeV)", ytitle=
"fakerate vs p_{T}", xlog=
True, ymax=_maxFake),
219 Plot(
"duplicatesRate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
220 Plot(
"pileuprate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"pileup rate vs p_{T}", ymax=_maxFake, xlog=
True),
221 Plot(
"fakerate", xtitle=
"track #eta", ytitle=
"fakerate vs #eta", title=
"", ymax=_maxFake),
222 Plot(
"duplicatesRate", xtitle=
"track #eta", ytitle=
"duplicates rate vs #eta", title=
"", ymax=_maxFake),
223 Plot(
"pileuprate", xtitle=
"track #eta", ytitle=
"pileup rate vs #eta", title=
"", ymax=_maxFake),
230 ncols=3, legendDy=_legendDy_2rows_3cols
237 ncols=3, legendDy=_legendDy_4rows
239 _dupandfakeHitsLayers =
PlotGroup(
"dupandfakeHitsLayers",
244 ncols=3, legendDy=_legendDy_4rows
246 _dupandfakePosDeltaRPU =
PlotGroup(
"dupandfakePosDeltaRPU",
251 ncols=3, legendDy=_legendDy_4rows
253 _seedingLayerSet_common =
dict(removeEmptyBins=
True, xbinlabelsize=8, xinlabeloption=
"d", adjustMarginRight=0.1)
254 _dupandfakeSeedingPlots =
_makeFakeDupPileupPlots(
"seedingLayerSet",
"seeding layers", xtitle=
"", common=_seedingLayerSet_common)
255 _dupandfakeChi2Seeding =
PlotGroup(
"dupandfakeChi2Seeding",
257 _dupandfakeSeedingPlots,
258 ncols=3, legendDy=_legendDy_2rows_3cols
262 "ytitle":
"Fake+pileup rate",
267 _common2.update(_common)
268 _common2[
"drawStyle"] =
"pcolz" 269 _common2[
"ztitleoffset"] = 1.5
270 _common2[
"xtitleoffset"] = 7
271 _common2[
"ytitleoffset"] = 10
272 _common2[
"ztitleoffset"] = 6
274 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")),
275 xtitle=
"Efficiency vs. cut on dz(PV)", **_common),
276 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),
277 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)", **_common2),
279 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")),
280 xtitle=
"Efficiency vs. cut on dz(PV)/dzError", **_common),
281 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),
282 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)/dzError", **_common2),
284 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")),
285 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)", **_common),
286 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),
287 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)", **_common2),
289 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")),
290 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)/dzError", **_common),
291 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),
292 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)/dzError", **_common2),
293 ], onlyForPileup=
True,
294 legendDy=_legendDy_4rows
297 Plot(
"effic_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency vs. cut on dz(PV)", ymax=_maxEff),
298 Plot(
"effic_vs_dzpvcut2", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
299 Plot(
"fakerate_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate vs. cut on dz(PV)", ymax=_maxFake),
300 Plot(
"pileuprate_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate vs. cut on dz(PV)", ymax=_maxFake),
302 Plot(
"effic_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency vs. cut on dz(PV)/dzError", ymax=_maxEff),
303 Plot(
"effic_vs_dzpvsigcut2", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
304 Plot(
"fakerate_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
305 Plot(
"pileuprate_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
306 ], onlyForPileup=
True,
307 legendDy=_legendDy_4rows
310 Plot(
"effic_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
311 Plot(
"effic_vs_dzpvcut2_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
312 Plot(
"fakerate_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
313 Plot(
"pileuprate_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
315 Plot(
"effic_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
316 Plot(
"effic_vs_dzpvsigcut2_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
317 Plot(
"fakerate_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
318 Plot(
"pileuprate_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
319 ], onlyForPileup=
True,
320 legendDy=_legendDy_4rows
325 _common = {
"normalizeToUnitArea":
True,
"stat":
True,
"drawStyle":
"hist"}
327 Plot(
"h_dedx_estim1", xtitle=
"dE/dx, harm2", **_common),
328 Plot(
"h_dedx_estim2", xtitle=
"dE/dx, trunc40", **_common),
329 Plot(
"h_dedx_nom1", xtitle=
"dE/dx number of measurements", title=
"", **_common),
330 Plot(
"h_dedx_sat1", xtitle=
"dE/dx number of measurements with saturation", title=
"", **_common),
332 legendDy=_legendDy_2rows
336 Plot(
"chargeMisIdRate", xtitle=
"#eta", ytitle=
"charge mis-id rate vs #eta", ymax=0.05),
337 Plot(
"chargeMisIdRate_Pt", xtitle=
"p_{T}", ytitle=
"charge mis-id rate vs p_{T}", xmax=300, ymax=0.1, xlog=
True),
338 Plot(
"chargeMisIdRate_hit", xtitle=
"hits", ytitle=
"charge mis-id rate vs hits", title=
""),
339 Plot(
"chargeMisIdRate_phi", xtitle=
"#phi", ytitle=
"charge mis-id rate vs #phi", title=
"", ymax=0.01),
340 Plot(
"chargeMisIdRate_dxy", xtitle=
"dxy", ytitle=
"charge mis-id rate vs dxy", ymax=0.1),
341 Plot(
"chargeMisIdRate_dz", xtitle=
"dz", ytitle=
"charge mis-id rate vs dz", ymax=0.1)
343 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": 1e-6,
"drawStyle":
"hist"}
345 Plot(
"missing_inner_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
346 Plot(
"missing_outer_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
347 Plot(
"hits_eta", xtitle=
"track #eta", ytitle=
"<hits> vs #eta", ymin=_minHits, ymax=_maxHits, statyadjust=[0,0,-0.15],
348 fallback={
"name":
"nhits_vs_eta",
"profileX":
True}),
349 Plot(
"hits", stat=
True, xtitle=
"track hits", xmin=_minHits, xmax=_maxHits, ylog=
True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle=
"hist"),
350 Plot(
"num_simul_pT", xtitle=
"TP p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common),
351 Plot(
"num_reco_pT", xtitle=
"track p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common)
354 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),
355 Plot(
"chi2_prob", stat=
True, normalizeToUnitArea=
True, drawStyle=
"hist", xtitle=
"Prob(#chi^{2})"),
356 Plot(
"chi2mean", title=
"", xtitle=
"#eta", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5],
357 fallback={
"name":
"chi2_vs_eta",
"profileX":
True}),
358 Plot(
"ptres_vs_eta_Mean", scale=100, title=
"", xtitle=
"TP #eta (PCA to beamline)", ytitle=
"< #delta p_{T} / p_{T} > (%)", ymin=_minResidualPt, ymax=_maxResidualPt)
360 _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}
362 Plot(
"pullPt", **_common),
363 Plot(
"pullQoverp", **_common),
364 Plot(
"pullPhi", **_common),
365 Plot(
"pullTheta", **_common),
366 Plot(
"pullDxy", **_common),
367 Plot(
"pullDz", **_common),
369 legendDx=0.1, legendDw=-0.1, legendDh=-0.015
371 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"TP #eta (PCA to beamline)",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
373 Plot(
"phires_vs_eta_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
374 Plot(
"cotThetares_vs_eta_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
375 Plot(
"dxyres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
376 Plot(
"dzres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
377 Plot(
"ptres_vs_eta_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
379 _common = {
"title":
"",
"ylog":
True,
"xlog":
True,
"xtitle":
"TP p_{T} (PCA to beamline)",
"xmin": 0.1,
"xmax": 1000,
"ymin": _minMaxResol,
"ymax": _minMaxResol}
381 Plot(
"phires_vs_pt_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
382 Plot(
"cotThetares_vs_pt_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
383 Plot(
"dxyres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
384 Plot(
"dzres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
385 Plot(
"ptres_vs_pt_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
397 ncols=4, legendDy=_legendDy_2rows)
403 ncols=4, legendDy=_legendDy_4rows)
408 _makeDistPlots(
"3Dlayer" ,
"3D layers" , common=
dict(xmin=_min3DLayers, xmax=_max3DLayers)),
409 ncols=4, legendDy=_legendDy_4rows,
417 _extDistSeedingPlots =
_makeDistPlots(
"seedingLayerSet",
"seeding layers", common=
dict(xtitle=
"", **_seedingLayerSet_common))
420 _extDistSeedingPlots,
421 ncols=4, legendDy=_legendDy_2rows_3cols
423 _common =
dict(title=
"", xtitle=
"TP #eta (PCA to beamline)")
425 Plot(
"phires_vs_eta_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
426 Plot(
"cotThetares_vs_eta_Mean", ytitle=
"< #delta cot(#theta) >", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
427 Plot(
"dxyres_vs_eta_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
428 Plot(
"dzres_vs_eta_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
429 Plot(
"ptres_vs_eta_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
431 _common =
dict(title=
"", xlog=
True, xtitle=
"TP p_{T} (PCA to beamline)", xmin=0.1, xmax=1000)
433 Plot(
"phires_vs_pt_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
434 Plot(
"cotThetares_vs_pt_Mean", ytitle=
"< #delta cot(#theta > )", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
435 Plot(
"dxyres_vs_pt_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
436 Plot(
"dzres_vs_pt_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
437 Plot(
"ptres_vs_pt_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
439 _common =
dict(title=
"", ytitle=
"Selected tracks/TrackingParticles", ymax=_maxEff)
441 Plot(
"nrec_vs_nsim", title=
"", xtitle=
"TrackingParticles", ytitle=
"Tracks", profileX=
True, xmin=_minMaxTracks, xmax=_minMaxTracks, ymin=_minMaxTracks, ymax=_minMaxTracks),
442 Plot(
"nrecPerNsim_vs_pu", xtitle=
"Pileup", xmin=_minPU, xmax=_maxPU, **_common),
443 Plot(
"nrecPerNsimPt", xtitle=
"p_{T} (GeV)", xlog=
True, **_common),
444 Plot(
"nrecPerNsim", xtitle=
"#eta", **_common)
445 ], legendDy=_legendDy_2rows)
447 Plot(
"PXLhits_vs_eta", xtitle=
"#eta", ytitle=
"<pixel hits>"),
448 Plot(
"PXLlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<pixel layers>"),
449 Plot(
"STRIPhits_vs_eta", xtitle=
"#eta", ytitle=
"<strip hits>"),
450 Plot(
"STRIPlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<strip layers>"),
451 ], legendDy=_legendDy_2rows)
463 ncols=2, legendDy=_legendDy_2rows)
469 ncols=2, legendDy=_legendDy_4rows)
475 ncols=2, legendDy=_legendDy_4rows,
490 _possibleTrackingNonIterationColls = [
494 _possibleTrackingColls = [
495 'initialStepPreSplitting',
499 'detachedTripletStep',
513 'jetCoreRegionalStep',
514 'muonSeededStepInOut',
515 'muonSeededStepOutIn',
517 ] + _possibleTrackingNonIterationColls
518 _possibleTrackingCollsOld = {
532 ret = subfolder.replace(
"trackingParticleRecoAsssociation",
"AssociatorByHitsRecoDenom")
533 for (old, new)
in [(
"InitialStep",
"Zero"),
534 (
"HighPtTripletStep",
"First"),
535 (
"LowPtQuadStep",
"Second"),
536 (
"LowPtTripletStep",
"Third"),
537 (
"DetachedQuadStep",
"Fourth"),
538 (
"PixelPairStep",
"Fifth"),
539 (
"MuonSeededStepInOut",
"Ninth"),
540 (
"MuonSeededStepOutIn",
"Tenth")]:
541 ret = ret.replace(old, new)
546 for (old, new)
in [(
"initialStep",
"iter0"),
547 (
"highPtTripletStep",
"iter1"),
548 (
"lowPtQuadStep",
"iter2"),
549 (
"lowPtTripletStep",
"iter3"),
550 (
"detachedQuadStep",
"iter4"),
551 (
"pixelPairStep",
"iter5"),
552 (
"muonSeededStepInOut",
"iter9"),
553 (
"muonSeededStepOutIn",
"iter10")]:
554 path = path.replace(old, new)
558 return subfolder.replace(
"trackingParticleRecoAsssociation",
"trackingParticleRecoAsssociationSignal")
560 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsConversion")
564 _additionalTrackQualities = [
571 quality =
"highPurity" 574 collNameNoQuality = collName.replace(
"Hp",
"")
575 for qual
in _additionalTrackQualities:
578 collNameNoQuality = collNameNoQuality.replace(qual,
"")
580 collNameNoQuality = collNameNoQuality.replace(
"Tracks",
"", 1)
583 if collNameLow.find(
"seed") == 0:
584 collNameLow = collNameLow[4:]
585 if collNameLow ==
"initialstepseedspresplitting":
586 collNameLow =
"initialsteppresplittingseeds" 587 elif collNameLow ==
"muonseededseedsinout":
588 collNameLow =
"muonseededstepinoutseeds" 589 elif collNameLow ==
"muonseededseedsoutin":
590 collNameLow =
"muonseededstepoutinseeds" 592 i_seeds = collNameLow.index(
"seeds")
593 quality = collNameLow[i_seeds:]+quality
595 collNameLow = collNameLow[:i_seeds]
598 prefixes = [
"cutsreco",
"cutsrecofrompv",
"cutsrecofrompv2",
"cutsrecofrompvalltp"]
599 if collNameLow
in [
"general",
"generalfrompv"]+prefixes:
604 if coll == collNameLow.replace(pfx,
""):
608 for coll
in _possibleTrackingColls:
609 if testColl(coll.lower()):
614 for coll, name
in _possibleTrackingCollsOld.iteritems():
615 if testColl(coll.lower()):
621 algo = collNameNoQuality
624 if algo ==
"muonSeededInOut":
625 algo =
"muonSeededStepInOut" 626 if algo ==
"muonSeededOutIn":
627 algo =
"muonSeededStepOutIn" 629 return (algo, quality)
632 return (name, [name])
633 _collLabelMap = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+_possibleTrackingColls))
634 _collLabelMapHp = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+
filter(
lambda n:
"Step" in n, _possibleTrackingColls)))
638 algo =
"generalTracks" 642 if algo !=
"generalTracks" and "ByOriginalAlgo" not in quality:
644 quality = quality.replace(
"ByOriginalAlgo",
"")
646 if algo !=
"generalTracks" and "ByAlgoMask" not in quality:
648 quality = quality.replace(
"ByAlgoMask",
"")
650 if "Pt09" not in quality:
652 quality = quality.replace(
"Pt09",
"")
655 if quality ==
"highPurity":
658 i_seeds = quality.find(
"seeds")
661 seedSubColl = quality[i_seeds+5:]
662 if seedSubColl !=
"":
663 ret += seedSubColl[0].
upper() + seedSubColl[1:]
670 def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, ptCut=False, seeds=False, midfix=""):
671 _common = {
"drawStyle":
"EP",
"xbinlabelsize": 10,
"xbinlabeloption":
"d"}
672 _commonN =
dict(ylog=
True, ymin=_minMaxN, ymax=_minMaxN,
673 normalizeToNumberOfEvents=
True,
675 _commonN.update(_common)
676 _commonAB =
dict(mapping=mapping,
677 renameBin=
lambda bl:
_summaryBinRename(bl, highPurity, byOriginalAlgo, byAlgoMask, ptCut, seeds),
678 ignoreMissingBins=
True,
681 if byOriginalAlgo
or byAlgoMask:
682 _commonAB[
"minExistingBins"] = 2
683 prefix =
"summary"+midfix
685 h_eff =
"effic_vs_coll" 686 h_fakerate =
"fakerate_vs_coll" 687 h_duplicaterate =
"duplicatesRate_coll" 688 h_pileuprate =
"pileuprate_coll" 690 h_reco =
"num_reco_coll" 691 h_true =
"num_assoc(recoToSim)_coll" 692 h_fake =
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll")
693 h_duplicate =
"num_duplicate_coll" 694 h_pileup =
"num_pileup_coll" 695 if mapping
is not None:
697 h_fakerate =
AggregateBins(
"fakerate", h_fakerate, **_commonAB)
698 h_duplicaterate =
AggregateBins(
"duplicatesRate", h_duplicaterate, **_commonAB)
699 h_pileuprate =
AggregateBins(
"pileuprate", h_pileuprate, **_commonAB)
704 h_duplicate =
AggregateBins(
"num_duplicate_coll", h_duplicate, **_commonAB)
705 h_pileup =
AggregateBins(
"num_pileup_coll", h_pileup, **_commonAB)
708 Plot(h_eff, title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
709 Plot(h_fakerate, title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
711 Plot(h_duplicaterate, title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
712 Plot(h_pileuprate, title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
714 legendDy=_legendDy_2rows
716 summaryN =
PlotGroup(prefix+
"_ntracks", [
723 Plot(h_reco, ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
724 Plot(h_true, ytitle=
"True tracks", title=
"Number of true tracks vs collection", **_commonN),
725 Plot(h_fake, ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
726 Plot(h_duplicate, ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
727 Plot(h_pileup, ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
730 return (summary, summaryN)
735 (_summaryByOriginalAlgo, _summaryByOriginalAlgoN) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo")
736 (_summaryByOriginalAlgoHp, _summaryByOriginalAlgoNHp) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo", highPurity=
True)
737 (_summaryByAlgoMask, _summaryByAlgoMaskN) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask")
738 (_summaryByAlgoMaskHp, _summaryByAlgoMaskNHp) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask", highPurity=
True)
739 (_summaryPt09, _summaryPt09N) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09")
740 (_summaryPt09Hp, _summaryPt09NHp) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09", highPurity=
True)
749 _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]}
751 _commonStatus.update(_common)
752 _commonStatus.update({
"xbinlabelsize": 10,
"xbinlabeloption":
"d",
"drawStyle":
"hist",
"adjustMarginRight": 0.08})
753 _commonLabelSize = {}
754 _commonLabelSize.update(_common)
755 _commonLabelSize.update({
"xlabelsize": 17})
758 Plot(
"selectionFlow", xbinlabelsize=10, xbinlabeloption=
"d", adjustMarginRight=0.1, drawStyle=
"hist", ylog=
True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]),
759 Plot(
"diffCharge", xtitle=
"Charge", **_common),
760 Plot(
"diffIsHighPurity", xtitle=
"High purity status", **_common),
761 Plot(
"diffNdof", xtitle=
"ndof", **_common),
762 Plot(
"diffNormalizedChi2", xtitle=
"#chi^{2}/ndof", **_common),
765 _packedCandidateHitsHitPattern =
PlotGroup(
"hitsHitPattern", [
766 Plot(
"diffHitPatternNumberOfValidHits", xtitle=
"Valid hits (via HitPattern)", **_common),
767 Plot(
"diffHitPatternNumberOfValidPixelHits", xtitle=
"Valid pixel hits (via HitPattern)", **_common),
768 Plot(
"diffHitPatternHasValidHitInFirstPixelBarrel", xtitle=
"Has valid hit in BPix1 layer (via HitPattern)", **_common),
769 Plot(
"diffHitPatternNumberOfLostPixelHits", xtitle=
"Lost pixel hits (via HitPattern)", **_common),
771 legendDy=_legendDy_2rows
774 Plot(
"diffNumberOfHits", xtitle=
"Hits", **_common),
775 Plot(
"diffNumberOfPixelHits", xtitle=
"Pixel hits", **_common),
776 Plot(
"diffLostInnerHits", xtitle=
"Lost inner hits", **_common),
777 Plot(
"numberHitsOverMax", xtitle=
"Number of overflown hits", **_common),
778 Plot(
"numberPixelHitsOverMax", xtitle=
"Number of overflown pixel hits", **_common),
779 Plot(
"numberStripHitsOverMax", xtitle=
"Number of overflown strip hits", **_common),
781 ncols=3, legendDy=_legendDy_2rows_3cols
786 Plot(
"diffNumberOfPixelLayers", xtitle=
"Pixel layers", **_common),
787 Plot(
"diffNumberOfStripLayers", xtitle=
"Strip layers", **_common),
789 Plot(
"diffHitPatternTrackerLayersWithMeasurement", xtitle=
"Layers (via HitPattern)", **_common),
790 Plot(
"diffHitPatternPixelLayersWithMeasurement", xtitle=
"Pixel layers (via HitPattern)", **_common),
791 Plot(
"diffHitPatternStripLayersWithMeasurement", xtitle=
"Strip layers (via HitPattern)", **_common),
793 Plot(
"numberLayersOverMax", xtitle=
"Number of overflown layers", **_common),
794 Plot(
"numberPixelLayersOverMax", xtitle=
"Number of overflown pixel layers", **_common),
795 Plot(
"numberStripLayersOverMax", xtitle=
"Number of overflown strip layers", **_common),
801 _packedCandidateImpactParameter1 =
PlotGroup(
"impactParameter1", [
802 Plot(
"diffDxyAssocPV", xtitle=
"dxy(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
803 Plot(
"diffDxyAssocPVStatus", **_commonStatus),
804 Plot(
"diffDxyAssocPVUnderOverFlowSign", xtitle=
"dxy(assocPV)", **_common),
805 Plot(
"diffDzAssocPV", xtitle=
"dz(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
806 Plot(
"diffDzAssocPVStatus", **_commonStatus),
807 Plot(
"diffDzAssocPVUnderOverFlowSign", xtitle=
"dz(assocPV)", **_common),
808 Plot(
"diffDxyError", xtitle=
"dxyError()", adjustMarginRight=0.02, **_commonLabelSize),
809 Plot(
"diffDszError", xtitle=
"dszError()", adjustMarginRight=0.02, **_commonLabelSize),
810 Plot(
"diffDzError", xtitle=
"dzError()", adjustMarginRight=0.02, **_commonLabelSize),
816 _packedCandidateImpactParameter2 =
PlotGroup(
"impactParameter2", [
817 Plot(
"diffDxyPV", xtitle=
"dxy(PV) via PC", **_commonLabelSize),
818 Plot(
"diffDzPV", xtitle=
"dz(PV) via PC", **_commonLabelSize),
819 Plot(
"diffTrackDxyAssocPV", xtitle=
"dxy(PV) via PC::bestTrack()", **_commonLabelSize),
820 Plot(
"diffTrackDzAssocPV", xtitle=
"dz(PV) via PC::bestTrack()", **_commonLabelSize),
821 Plot(
"diffTrackDxyError", xtitle=
"dxyError() via PC::bestTrack()", adjustMarginRight=0.02, **_commonLabelSize),
822 Plot(
"diffTrackDzError", xtitle=
"dzError() via PC::bestTrack()", **_commonLabelSize),
825 _packedCandidateCovarianceMatrix1 =
PlotGroup(
"covarianceMatrix1", [
826 Plot(
"diffCovQoverpQoverp", xtitle=
"cov(qoverp, qoverp)", **_commonLabelSize),
827 Plot(
"diffCovQoverpQoverpStatus", **_commonStatus),
828 Plot(
"diffCovQoverpQoverpUnderOverFlowSign", xtitle=
"cov(qoverp, qoverp)", **_common),
829 Plot(
"diffCovLambdaLambda", xtitle=
"cov(lambda, lambda)", **_commonLabelSize),
830 Plot(
"diffCovLambdaLambdaStatus", **_commonStatus),
831 Plot(
"diffCovLambdaLambdaUnderOverFlowSign", xtitle=
"cov(lambda, lambda)", **_common),
832 Plot(
"diffCovLambdaDsz", xtitle=
"cov(lambda, dsz)", **_commonLabelSize),
833 Plot(
"diffCovLambdaDszStatus", **_commonStatus),
834 Plot(
"diffCovLambdaDszUnderOverFlowSign", xtitle=
"cov(lambda, dsz)", **_common),
835 Plot(
"diffCovPhiPhi", xtitle=
"cov(phi, phi)", **_commonLabelSize),
836 Plot(
"diffCovPhiPhiStatus", **_commonStatus),
837 Plot(
"diffCovPhiPhiUnderOverFlowSign", xtitle=
"cov(phi, phi)", **_common),
839 ncols=3, legendDy=_legendDy_4rows
841 _packedCandidateCovarianceMatrix2 =
PlotGroup(
"covarianceMatrix2", [
842 Plot(
"diffCovPhiDxy", xtitle=
"cov(phi, dxy)", **_commonLabelSize),
843 Plot(
"diffCovPhiDxyStatus", **_commonStatus),
844 Plot(
"diffCovPhiDxyUnderOverFlowSign", xtitle=
"cov(phi, dxy)", **_common),
845 Plot(
"diffCovDxyDxy", xtitle=
"cov(dxy, dxy)", adjustMarginRight=0.02, **_commonLabelSize),
846 Plot(
"diffCovDxyDxyStatus", **_commonStatus),
847 Plot(
"diffCovDxyDxyUnderOverFlowSign", xtitle=
"cov(dxy, dxy)", **_common),
848 Plot(
"diffCovDxyDsz", xtitle=
"cov(dxy, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
849 Plot(
"diffCovDxyDszStatus", **_commonStatus),
850 Plot(
"diffCovDxyDszUnderOverFlowSign", xtitle=
"cov(dxy, dsz)", **_common),
851 Plot(
"diffCovDszDsz", xtitle=
"cov(dsz, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
852 Plot(
"diffCovDszDszStatus", **_commonStatus),
853 Plot(
"diffCovDszDszUnderOverFlowSign", xtitle=
"cov(dsz, dsz)", **_common),
855 ncols=3, legendDy=_legendDy_4rows
858 _common[
"xlabelsize"] = 16
860 Plot(
"diffVx", xtitle=
"Reference point x", **_common),
861 Plot(
"diffVy", xtitle=
"Reference point y", **_common),
862 Plot(
"diffVz", xtitle=
"Reference point z", **_common),
864 legendDy=_legendDy_2rows
867 _common[
"adjustMarginRight"] = 0.05
869 Plot(
"diffPt", xtitle=
"p_{T}", **_common),
870 Plot(
"diffPtError", xtitle=
"p_{T} error", **_common),
871 Plot(
"diffEta", xtitle=
"#eta", **_common),
872 Plot(
"diffEtaError", xtitle=
"#eta error", **_common),
873 Plot(
"diffPhi", xtitle=
"#phi", **_common),
879 PlotFolder.__init__(self, *args, **kwargs)
882 spl = dqmSubFolderName.split(
"_")
889 (algoOrig, quality) = translatedDqmSubFolder
895 if plotFolderName !=
"":
896 ret +=
"_"+plotFolderName
899 if not (algo ==
"ootb" and quality !=
""):
904 """Return True if this subfolder should be processed 907 limitOnlyTo -- Function '(algo, quality) -> bool' 908 translatedDqmSubFolder -- Return value of translateSubFolder 910 (algo, quality) = translatedDqmSubFolder
911 return limitOnlyTo(algo, quality)
915 return algo
not in _possibleTrackingNonIterationColls
925 def __init__(self, section, collection=GeneralTracks):
941 def _getAlgoQuality(data, algo, quality):
942 for label, value
in data.iteritems():
944 if a == algo
and q == quality:
948 h = tdirectory.Get(hname)
953 return _getAlgoQuality(data,
"ootb",
"")
955 return _getAlgoQuality(data,
"ootb",
"Pt09")
957 return _getAlgoQuality(data,
"ootb",
"highPurity")
959 return _getAlgoQuality(data,
"ootb",
"highPurityPt09")
961 return _getAlgoQuality(data,
"btvLike",
"")
963 return _getAlgoQuality(data,
"ak4PFJets",
"")
966 def _formatOrNone(num, func):
971 n_tps = _formatOrNone(_getN(
"num_simul_coll"), int)
972 n_m_tps = _formatOrNone(_getN(
"num_assoc(simToReco)_coll"), int)
974 n_tracks = _formatOrNone(_getN(
"num_reco_coll"), int)
975 n_true = _formatOrNone(_getN(
"num_assoc(recoToSim)_coll"), int)
976 if n_tracks
is not None and n_true
is not None:
977 n_fake = n_tracks-n_true
980 n_pileup = _formatOrNone(_getN(
"num_pileup_coll"), int)
981 n_duplicate = _formatOrNone(_getN(
"num_duplicate_coll"), int)
983 eff = _formatOrNone(_getN(
"effic_vs_coll"),
lambda n:
"%.4f" % n)
984 eff_nopt = _formatOrNone(_getN(
"effic_vs_coll_allPt"),
lambda n:
"%.4f" % n)
985 fake = _formatOrNone(_getN(
"fakerate_vs_coll"),
lambda n:
"%.4f" % n)
986 duplicate = _formatOrNone(_getN(
"duplicatesRate_coll"),
lambda n:
"%.4f" % n)
988 ret = [eff, n_tps, n_m_tps,
989 eff_nopt, fake, duplicate,
990 n_tracks, n_true, n_fake, n_pileup, n_duplicate]
991 if ret.count(
None) == len(ret):
998 "Number of TrackingParticles (after cuts)",
999 "Number of matched TrackingParticles",
1000 "Efficiency (w/o pT cut)",
1004 "Number of true tracks",
1005 "Number of fake tracks",
1006 "Number of pileup tracks",
1007 "Number of duplicate tracks" 1012 def __init__(self, fileName, plots, titles, isRate, **kwargs):
1018 if len(plots) != len(titles):
1019 raise Exception(
"Number of plots (%d) has to be the same as number of titles (%d)" % (len(plots), len(titles)))
1021 def _set(attr, default):
1022 setattr(self,
"_"+attr, kwargs.get(attr, default))
1024 _set(
"onlyForPileup",
False)
1027 """Return True if the PlotGroup is intended only for pileup samples""" 1028 return self._onlyForPileup
1030 def create(self, tdirectoryNEvents, requireAllHistograms=False):
1033 plot.create(tdirectoryNEvents, requireAllHistograms)
1035 def draw(self, legendLabels, prefix=None, directory="", *args, **kwargs):
1037 onlyEmptyPlots =
True 1039 if not plot.isEmpty():
1040 onlyEmptyPlots =
False 1045 haveShortLabels =
False 1046 legendLabels = legendLabels[:]
1047 if max(
map(len, legendLabels)) > 20:
1048 haveShortLabels =
True 1049 labels_short = [
str(chr(ord(
'A')+i))
for i
in xrange(len(legendLabels))]
1050 for i, ls
in enumerate(labels_short):
1051 legendLabels[i] =
"%s: %s" % (ls, legendLabels[i])
1053 labels_short = legendLabels
1058 ' <table border="1">',
1069 for h, l
in zip(plot._histograms, labels_short):
1071 h_tmp.append(len(histos_linear))
1072 histos_linear.append(h)
1076 histos_index.append(h_tmp)
1077 labels.append(l_tmp)
1080 ' <td colspan="%d">%s</td>' % (len(h_tmp), title),
1083 if len(histos_linear) == 0:
1093 if len(histos_linear) == 0:
1097 if len(histos_linear_new) > 0
and len(histos_linear_new) != len(histos_linear):
1098 raise Exception(
"This should never happen. len(histos_linear_new) %d != len(histos_linear) %d" % (len(histos_linear_new), len(histos_linear)))
1099 histos_linear = histos_linear_new
1100 if len(histos_linear) == 0:
1103 data = [ [h.GetBinContent(i)
for i
in xrange(1, h.GetNbinsX()+1)]
for h
in histos_linear]
1104 table =
html.Table([
"dummy"]*len(histos_linear), xbinlabels, data,
None,
None,
None)
1105 data = table.tableAsRowColumn()
1108 content.append(
' <td></td>')
1109 content.extend([
' <td>%s</td>' % lab
for lab
in labs])
1114 for irow, row
in enumerate(data):
1117 ' <td>%s</td>' % table.rowHeaders()[irow]
1120 for hindices
in histos_index:
1121 for hindex
in hindices:
1123 formatted = self.
_format%item
if item
is not None else "" 1124 content.append(
' <td align="right">%s</td>' % formatted)
1125 content.append(
' <td></td>')
1127 content.append(
' </tr>')
1129 content.append(
' </table>')
1131 for lab
in legendLabels:
1132 content.append(
' %s<br/>' % lab)
1140 if prefix
is not None:
1143 name = os.path.join(directory, name)
1145 with open(name,
"w")
as f:
1146 for line
in content:
1152 [
"Fake rate",
"Duplicate rate",
"Pileup rate"], isRate=
True)
1154 [
"All tracks",
"True tracks",
"Fake tracks",
"Duplicate tracks"], isRate=
False)
1158 "DQMData/Run 1/Tracking/Run summary/"+lastDirName,
1159 "DQMData/Tracking/"+lastDirName,
1160 "DQMData/Run 1/RecoTrackV/Run summary/"+lastDirName,
1161 "DQMData/RecoTrackV/"+lastDirName,
1165 _effandfakePtEtaPhi,
1168 _effandfakeHitsLayers,
1169 _effandfakePosDeltaRPU,
1173 _dupandfakePtEtaPhi,
1176 _dupandfakeHitsLayers,
1177 _dupandfakePosDeltaRPU,
1178 _dupandfakeChi2Seeding,
1179 _dupandfakeSeedingTable,
1191 _seedingBuildingPlots = _simBasedPlots + [
1192 _dupandfakePtEtaPhi,
1195 _dupandfakeHitsLayers,
1196 _dupandfakePosDeltaRPU,
1197 _dupandfakeChi2Seeding,
1198 _dupandfakeSeedingTable,
1212 _extDistChi2Seeding,
1213 _extDistSeedingTable,
1218 _extDistSimPtEtaPhi,
1221 _extDistSimHitsLayers,
1222 _extDistSimPosDeltaR,
1227 _summaryByOriginalAlgo,
1228 _summaryByOriginalAlgoN,
1230 _summaryByAlgoMaskN,
1237 _summaryByOriginalAlgoHp,
1238 _summaryByOriginalAlgoNHp,
1239 _summaryByAlgoMaskHp,
1240 _summaryByAlgoMaskNHp,
1244 _summaryPlotsSeeds = [
1248 _packedCandidatePlots = [
1249 _packedCandidateFlow,
1250 _packedCandidateKinematics,
1251 _packedCandidateVertex,
1252 _packedCandidateImpactParameter1,
1253 _packedCandidateImpactParameter2,
1254 _packedCandidateCovarianceMatrix1,
1255 _packedCandidateCovarianceMatrix2,
1256 _packedCandidateHits,
1257 _packedCandidateHitsHitPattern,
1258 _packedCandidateLayers,
1262 def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, onlyForElectron=False, onlyForConversion=False, onlyForBHadron=False, seeding=False, rawSummary=False, highPuritySummary=True):
1265 limiters =
dict(onlyForPileup=onlyForPileup, onlyForElectron=onlyForElectron, onlyForConversion=onlyForConversion, onlyForBHadron=onlyForBHadron)
1267 _trackingRefFileFallbackSLHC_Phase1PU140
1269 common =
dict(fallbackDqmSubFolders=[
1270 _trackingSubFoldersFallbackSLHC_Phase1PU140,
1271 _trackingSubFoldersFallbackFromPV, _trackingSubFoldersFallbackConversion])
1272 plotter.append(name, folders,
TrackingPlotFolder(*algoPlots, **commonForTPF), **common)
1273 plotterExt.append(name, folders,
TrackingPlotFolder(*_extendedPlots, **commonForTPF), **common)
1277 summaryName += name+
"_" 1278 summaryName +=
"summary" 1281 summaryPlots.extend([_summaryRaw, _summaryRawN])
1282 summaryPlots.extend(_summaryPlots)
1287 plotter.append(summaryName, folders,
1288 PlotFolder(*summaryPlots, section=name, **common))
1289 if highPuritySummary:
1290 plotter.append(summaryName+
"_highPurity", folders,
1291 PlotFolder(*_summaryPlotsHp, section=name+
"_highPurity" if name !=
"" else "highPurity", **common),
1292 fallbackNames=[summaryName])
1294 plotter.append(summaryName+
"_seeds", folders,
1295 PlotFolder(*_summaryPlotsSeeds, section=name+
"_seeds", **common))
1299 if highPuritySummary:
1300 sectionName = name+
"_highPurity" if name !=
"" else "highPurity" 1309 _appendTrackingPlots(
"TrackFromPV",
"fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1310 _appendTrackingPlots(
"TrackFromPVAllTP",
"fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1311 _appendTrackingPlots(
"TrackFromPVAllTP2",
"fromPVAllTP2", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1314 _appendTrackingPlots(
"TrackConversion",
"conversion", _simBasedPlots+_recoBasedPlots, onlyForConversion=
True, rawSummary=
True, highPuritySummary=
False)
1315 _appendTrackingPlots(
"TrackGsf",
"gsf", _simBasedPlots+_recoBasedPlots, onlyForElectron=
True, rawSummary=
True, highPuritySummary=
False)
1316 _appendTrackingPlots(
"TrackBHadron",
"bhadron", _simBasedPlots+_recoBasedPlots, onlyForBHadron=
True)
1320 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1322 plotter.append(
"packedCandidateLostTracks",
_trackingFolders(
"PackedCandidate/lostTracks"),
1323 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1328 "DQMData/Run 1/HLT/Run summary/Tracking/ValidationWRTtp",
1333 plotterHLT.append(
"hlt", _hltFolder,
TrackingPlotFolder(*(_simBasedPlots+_recoBasedPlots), **_common))
1334 plotterHLTExt.append(
"hlt", _hltFolder,
TrackingPlotFolder(*_extendedPlots, **_common))
1338 def __init__(self, name, clusterMasking=None, seeding=None, building=None, fit=None, selection=None, other=[]):
1341 def _set(param, name, modules):
1342 if param
is not None:
1343 setattr(self, name, param)
1345 setattr(self, name, modules)
1347 _set(clusterMasking,
"_clusterMasking", [self.
_name+
"Clusters"])
1350 _set(seeding,
"_seeding", [self.
_name+
"SeedingLayers", self.
_name+
"TrackingRegions", self.
_name+
"HitDoublets", self.
_name+
"HitTriplets", self.
_name+
"HitQuadruplets", self.
_name+
"Seeds"])
1351 _set(building,
"_building", [self.
_name+
"TrackCandidates"])
1352 _set(fit,
"_fit", [self.
_name+
"Tracks"])
1353 _set(selection,
"_selection", [self.
_name])
1360 return self._clusterMasking+self._seeding+self._building+self._fit+self._selection+self.
_other 1363 return self._clusterMasking
1366 return self._seeding
1369 return self._building
1375 return self._selection
1384 (
"Fit", self.
fit()),
1386 (
"Other", self.
other())]
1391 seeding=[
"initialStepSeedLayersPreSplitting",
1392 "initialStepTrackingRegionsPreSplitting",
1393 "initialStepHitDoubletsPreSplitting",
1394 "initialStepHitTripletsPreSplitting",
1395 "initialStepHitQuadrupletsPreSplitting",
1396 "initialStepSeedsPreSplitting"],
1397 building=[
"initialStepTrackCandidatesPreSplitting"],
1398 fit=[
"initialStepTracksPreSplitting"],
1399 other=[
"firstStepPrimaryVerticesPreSplitting",
1400 "initialStepTrackRefsForJetsPreSplitting",
1401 "caloTowerForTrkPreSplitting",
1402 "ak4CaloJetsForTrkPreSplitting",
1403 "jetsForCoreTrackingPreSplitting",
1406 "MeasurementTrackerEvent",
1407 "siPixelClusterShapeCache"]),
1408 Iteration(
"initialStep", clusterMasking=[],
1409 selection=[
"initialStepClassifier1",
1410 "initialStepClassifier2",
1411 "initialStepClassifier3",
1413 "initialStepSelector"],
1414 other=[
"firstStepPrimaryVerticesUnsorted",
1415 "initialStepTrackRefsForJets",
1417 "ak4CaloJetsForTrk",
1418 "firstStepPrimaryVertices"]),
1420 selection=[
"highPtTripletStepClassifier1",
1421 "highPtTripletStepClassifier2",
1422 "highPtTripletStepClassifier3",
1423 "highPtTripletStep",
1424 "highPtTripletStepSelector"]),
1426 selection=[
"detachedQuadStepClassifier1",
1427 "detachedQuadStepClassifier2",
1429 "detachedQuadStepSelector"]),
1431 selection=[
"detachedTripletStepClassifier1",
1432 "detachedTripletStepClassifier2",
1433 "detachedTripletStep",
1434 "detachedTripletStepSelector"]),
1436 selection=[
"lowPtQuadStepClassifier1",
1437 "lowPtQuadStepClassifier2",
1439 "lowPtQuadStepSelector"]),
1441 selection=[
"lowPtTripletStepClassifier1",
1442 "lowPtTripletStepClassifier2",
1444 "lowPtTripletStepSelector"]),
1446 seeding=[
"pixelPairStepSeedLayers",
1447 "pixelPairStepSeedLayersB",
1448 "pixelPairStepSeedLayersC",
1449 "pixelPairStepTrackingRegions",
1450 "pixelPairStepTrackingRegionsB",
1451 "pixelPairStepTrackingRegionsC",
1452 "pixelPairStepHitDoublets",
1453 "pixelPairStepHitDoubletsB",
1454 "pixelPairStepHitDoubletsC",
1455 "pixelPairStepSeedsA",
1456 "pixelPairStepSeedsB",
1457 "pixelPairStepSeedsC",
1458 "pixelPairStepSeeds",],
1459 selection=[
"pixelPairStep",
1460 "pixelPairStepSelector"]),
1462 seeding=[
"mixedTripletStepSeedLayersA",
1463 "mixedTripletStepSeedLayersB",
1464 "mixedTripletStepTrackingRegionsA",
1465 "mixedTripletStepTrackingRegionsB",
1466 "mixedTripletStepHitDoubletsA",
1467 "mixedTripletStepHitDoubletsB",
1468 "mixedTripletStepHitTripletsA",
1469 "mixedTripletStepHitTripletsB",
1470 "mixedTripletStepSeedsA",
1471 "mixedTripletStepSeedsB",
1472 "mixedTripletStepSeeds"],
1473 selection=[
"mixedTripletStepClassifier1",
1474 "mixedTripletStepClassifier2",
1476 "mixedTripletStepSelector"]),
1478 selection=[
"pixelLessStepClassifier1",
1479 "pixelLessStepClassifier2",
1481 "pixelLessStepSelector"]),
1483 seeding=[
"tobTecStepSeedLayersTripl",
1484 "tobTecStepSeedLayersPair",
1485 "tobTecStepTrackingRegionsTripl",
1486 "tobTecStepTrackingRegionsPair",
1487 "tobTecStepHitDoubletsTripl",
1488 "tobTecStepHitDoubletsPair",
1489 "tobTecStepHitTripletsTripl",
1490 "tobTecStepSeedsTripl",
1491 "tobTecStepSeedsPair",
1493 selection=[
"tobTecStepClassifier1",
1494 "tobTecStepClassifier2",
1496 "tobTecStepSelector"]),
1499 other=[
"jetsForCoreTracking",
1500 "firstStepGoodPrimaryVertices",
1504 seeding=[
"muonSeededSeedsInOut",
1505 "muonSeededSeedsOutIn"],
1506 building=[
"muonSeededTrackCandidatesInOut",
1507 "muonSeededTrackCandidatesOutIn"],
1508 fit=[
"muonSeededTracksInOut",
1509 "muonSeededTracksOutIn"],
1510 selection=[
"muonSeededTracksInOutClassifier",
1511 "muonSeededTracksInOutSelector",
1512 "muonSeededTracksOutIntClassifier",
1513 "muonSeededTracksOutIntSelector"],
1517 clusterMasking=[], seeding=[],
1518 building=[
"duplicateTrackCandidates"],
1519 fit=[
"mergedDuplicateTracks"],
1520 selection=[
"duplicateTrackClassifier"]),
1522 clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1523 other=[
"preDuplicateMergingGeneralTracks",
1526 clusterMasking=[
"convClusters"],
1527 seeding=[
"convLayerPairs",
1528 "photonConvTrajSeedFromSingleLeg"],
1529 building=[
"convTrackCandidates"],
1530 fit=[
"convStepTracks"],
1531 selection=[
"convStepSelector"]),
1532 Iteration(
"Other", clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1533 other=[
"trackerClusterCheckPreSplitting",
1534 "trackerClusterCheck"]),
1538 iterations = _iterations
1539 if not includeConvStep:
1540 iterations =
filter(
lambda i: i.name() !=
"ConvStep", iterations)
1542 iterations =
filter(
lambda i: i.name() ==
"ConvStep", iterations)
1543 return collections.OrderedDict([(i.name(), i.all())
for i
in iterations])
1547 for i
in _iterations:
1548 if i.name() ==
"ConvStep":
1550 ret.extend(getattr(i, prop)())
1553 return collections.OrderedDict([
1554 (
"ClusterMask", getProp(
"clusterMasking")),
1555 (
"Seeding", getProp(
"seeding")),
1556 (
"Building", getProp(
"building")),
1557 (
"Fitting", getProp(
"fit")),
1558 (
"Selection", getProp(
"selection")),
1559 (
"Other", getProp(
"other"))
1578 if eventsTh1
is None:
1580 nevents = eventsTh1.GetEntries()
1584 ret = timeTh1.Clone(self.
_name)
1585 xaxis = ret.GetXaxis()
1586 for i
in xrange(1, ret.GetNbinsX()+1):
1587 ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1588 ret.SetBinError(i, ret.GetBinError(i)/nevents)
1589 xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).
replace(
" (unscheduled)",
""))
1593 path = tdirectory.GetPath()
1594 if path
not in self.
_cache:
1599 def __init__(self, name, timeHisto, selectedTracks=False):
1609 tdir = tfile.Get(dirName)
1621 tfile = tdirectory.GetFile()
1626 iterMap = copy.copy(_collLabelMapHp)
1627 del iterMap[
"generalTracks"]
1628 del iterMap[
"jetCoreRegionalStep"]
1630 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
True, byOriginalAlgo=
False, byAlgoMask=
True, ptCut=
False, seeds=
False)
1632 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
False, byOriginalAlgo=
False, byAlgoMask=
False, ptCut=
False, seeds=
False)
1633 recoAB =
AggregateBins(
"tmp",
"num_reco_coll", mapping=iterMap,ignoreMissingBins=
True, renameBin=renameBin)
1634 h_reco_per_iter = recoAB.create(trkDir)
1635 if h_reco_per_iter
is None:
1638 for i
in xrange(1, h_reco_per_iter.GetNbinsX()+1):
1639 values[h_reco_per_iter.GetXaxis().GetBinLabel(i)] = h_reco_per_iter.GetBinContent(i)
1643 for i
in xrange(1, timeTh1.GetNbinsX()+1):
1644 iterName = timeTh1.GetXaxis().GetBinLabel(i)
1645 if iterName
in values:
1646 ntrk = values[iterName]
1647 result.append( (iterName,
1648 timeTh1.GetBinContent(i)/ntrk
if ntrk > 0
else 0,
1649 timeTh1.GetBinError(i)/ntrk
if ntrk > 0
else 0) )
1651 if len(result) == 0:
1654 res = ROOT.TH1F(self.
_name, self.
_name, len(result), 0, len(result))
1655 for i, (label, value, error)
in enumerate(result):
1656 res.GetXaxis().SetBinLabel(i+1, label)
1657 res.SetBinContent(i+1, value)
1658 res.SetBinError(i+1, error)
1667 h = f.Get(_trackingIterationOrderHistogram)
1670 xaxis = h.GetXaxis()
1674 return s.replace(
"Tracks",
"").
replace(
"muonSeeded",
"muonSeededStep")
1675 return [_edit(xaxis.GetBinLabel(i))
for i
in xrange(1, h.GetNbinsX()+1)]
1678 ret = range(0, len(labels))
1679 f = tdirectory.GetFile()
1683 if not f.GetName()
in self.
_cache:
1687 self.
_cache[f.GetName()] = r
1688 order = self.
_cache[f.GetName()]
1694 orderIndices.append(labels.index(l))
1698 for i, l
in enumerate(labels):
1701 found = orderIndices.index(i)
1705 ret.append(orderIndices[0])
1707 ret.append(orderIndices[0])
1732 h = tdirectory.Get(histo)
1735 totalReco =
"%.1f" % h.Integral()
1738 h = creator.create(tdirectory)
1739 totalTracking =
None 1741 totalTracking =
"%.1f" % h.Integral()
1744 h = creator.create(tdirectory)
1745 totalConvStep =
None 1747 totalConvStep =
"%.1f" % h.Integral()
1756 cpuValues = self.
_getValues(tdirectory, _time_per_event_cpu)
1757 realValues = self.
_getValues(tdirectory, _time_per_event_real)
1759 return cpuValues + realValues
1763 "Average reco CPU time / event (ms)",
1764 "Average tracking (w/o convStep) CPU time / event (ms)",
1765 "Average convStep CPU time / event (ms)",
1766 "Average reco real time / event (ms)",
1767 "Average tracking (w/o convStep) real time / event (ms)",
1768 "Average convStep real time / event (ms)",
1773 "xbinlabelsize": 10,
1774 "xbinlabeloption":
"d" 1782 Plot(_time_per_iter_cpu,
1783 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", legendDx=-0.4, **_common),
1785 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1788 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", **_common),
1790 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1793 ytitle=
"Average CPU time / built track (ms)", title=
"Average CPU time / built track", **_common),
1795 ytitle=
"Average CPU time / selected track (ms)", title=
"Average CPU time / selected HP track by algoMask", **_common),
1799 Plot(_time_per_iter_real,
1800 ytitle=
"Average real time (ms)", title=
"Average real time / event", legendDx=-0.4, **_common),
1802 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1805 ytitle=
"Average real time (ms)", title=
"Average real time / event", **_common),
1807 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1810 ytitle=
"Average real time / built track (ms)", title=
"Average real time / built track", **_common),
1812 ytitle=
"Average real time / selected track (ms)", title=
"Average real time / selected HP track by algoMask", **_common),
1817 Plot(
AggregateBins(i.name(), _time_per_event_cpu, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1818 ytitle=
"Average CPU time (ms)", title=i.name(), **_common)
1819 for i
in _iterations
1821 ncols=4, legend=
False 1824 Plot(
AggregateBins(i.name(), _time_per_event_real, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1825 ytitle=
"Average real time (ms)", title=i.name(), **_common)
1826 for i
in _iterations
1828 ncols=4, legend=
False 1838 "DQMData/Run 1/DQM/Run summary/TimerService/process RECO paths/path prevalidation_step",
1841 timePlotter.append(
"timing", _timeFolders,
PlotFolder(
1843 _timing_iterationsCPU,
1844 _timing_summaryReal,
1845 _timing_iterationsReal,
1851 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist"}
1853 Plot(
"TPlip", xtitle=
"TP lip", **_common),
1854 Plot(
"TPtip", xtitle=
"TP tip", **_common),
1858 tpPlotter.append(
"tp", [
1859 "DQMData/Run 1/Tracking/Run summary/TrackingMCTruth/TrackingParticle",
1860 "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)