1 from __future__
import absolute_import
2 from builtins
import range
9 ROOT.gROOT.SetBatch(
True)
10 ROOT.PyConfig.IgnoreCommandLineOptions =
True 12 from .plotting
import Subtract, FakeDuplicate, CutEfficiency, Transform, AggregateBins, ROC, Plot, PlotEmpty, PlotGroup, PlotOnSideGroup, PlotFolder, Plotter
13 from .html
import PlotPurpose
14 from .
import plotting
15 from .
import validation
24 _maxEff = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025, 1.2, 1.5, 2]
25 _maxFake = [0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 0.8, 1.025]
28 _minMaxResol = [1e-5, 4e-5, 1e-4, 4e-4, 1e-3, 4e-3, 1e-2, 4e-2, 0.1, 0.4, 1]
29 _minMaxN = [5e-1, 5, 5e1, 5e2, 5e3, 5e4, 5e5, 5e6, 5e7, 5e8, 5e9]
32 _maxHits = [5, 10, 20, 40, 60, 80]
33 _minLayers = [0, 5, 10]
34 _maxLayers = [5, 10, 25]
36 _min3DLayers = [0, 5, 10]
37 _max3DLayers = [5, 10, 20]
38 _minZ = [-60, -40, -20, -10, -5]
39 _maxZ = [5, 10, 20, 40, 60]
40 _minPU = [0, 10, 20, 50, 100, 150]
41 _maxPU = [20, 50, 65, 80, 100, 150, 200, 250]
42 _minMaxTracks = [0, 200, 500, 1000, 1500, 2000]
43 _minMaxMVA = [-1.025, -0.5, 0, 0.5, 1.025]
46 return ([-x
for x
in ma], ma)
49 (_minResidualCotTheta, _maxResidualCotTheta) =
_minMaxResidual([1e-4, 2e-4])
51 (_minResidualDz, _maxResidualDz) = (_minResidualDxy, _maxResidualDxy)
56 _legendDy_2rows = -0.025
57 _legendDy_2rows_3cols = -0.17
58 _legendDy_4rows = 0.09
65 _trackingIterationOrderHistogram =
"DQMData/Run 1/Tracking/Run summary/TrackBuilding/num_reco_coll" 72 xq +=
" (" + unit +
")" 74 effargs =
dict(xtitle=
"TP "+xq , ytitle=
"efficiency vs "+q , ymax=_maxEff)
75 fakeargs =
dict(xtitle=
"track "+xq, ytitle=
"fake+duplicates rate vs "+q, ymax=_maxFake)
76 effargs.update(common)
77 fakeargs.update(common)
78 effargs.update(effopts)
79 fakeargs.update(fakeopts)
82 Plot(
"effic_vs_"+p, **effargs),
83 Plot(
FakeDuplicate(
"fakeduprate_vs_"+p, assoc=
"num_assoc(recoToSim)_"+p, dup=
"num_duplicate_"+p, reco=
"num_reco_"+p, title=
"fake+duplicates vs "+q), **fakeargs)
95 xq +=
" (" + unit +
")" 99 Plot(
"fakerate_vs_"+p , xtitle=xtitle, ytitle=
"fakerate vs "+q , ymax=_maxFake, **common),
100 Plot(
"duplicatesRate_"+p, xtitle=xtitle, ytitle=
"duplicates rate vs "+q, ymax=_maxFake, **common),
101 Plot(
"pileuprate_"+p , xtitle=xtitle, ytitle=
"pileup rate vs "+q , ymax=_maxFake, **common),
105 return Subtract(
"num_fake_"+postfix,
"num_reco_"+postfix,
"num_assoc(recoToSim)_"+postfix)
111 args =
dict(xtitle=
"track "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
115 Plot(
"num_reco_"+p , ytitle=
"tracks", **args),
116 Plot(
"num_assoc(recoToSim)_"+p, ytitle=
"true tracks", **args),
118 Plot(
"num_duplicate_"+p , ytitle=
"duplicate tracks", **args),
125 args =
dict(xtitle=
"TP "+q, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
129 Plot(
"num_simul_"+p , ytitle=
"TrackingParticles", **args),
130 Plot(
"num_assoc(simToReco)_"+p, ytitle=
"Reconstructed TPs", **args),
134 pfix =
"_hp" if hp
else "" 135 pfix2 =
"Hp" if hp
else "" 137 xtitle =
"MVA%d output"%num
138 xtitlecut =
"Cut on MVA%d output"%num
139 args =
dict(xtitle=xtitle, ylog=
True, ymin=_minMaxN, ymax=_minMaxN)
142 xtitle=
"Efficiency (excl. trk eff)", ytitle=
"Fake rate",
143 xmax=_maxEff, ymax=_maxFake,
147 ztitle=
"Cut on MVA%d"%num,
148 xtitleoffset=5, ytitleoffset=6.5, ztitleoffset=4,
149 adjustMarginRight=0.12
151 argsroc2.update(argsroc)
152 argsroc2[
"drawStyle"] =
"pcolz" 154 argsprofile =
dict(ymin=_minMaxMVA, ymax=_minMaxMVA)
156 true_cuteff =
CutEfficiency(
"trueeff_vs_mva%dcut%s"%(num,pfix),
"num_assoc(recoToSim)_mva%dcut%s"%(num,pfix))
157 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)))
161 Plot(
"num_assoc(recoToSim)_mva%d%s"%(num,pfix), ytitle=
"true tracks", **args),
162 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),
163 Plot(
"effic_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
165 Plot(
"fakerate_vs_mva%dcut%s"%(num,pfix), xtitle=xtitlecut, ytitle=
"Fake rate", ymax=_maxFake),
166 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),
167 Plot(
ROC(
"effic_vs_fake_mva%d%s"%(num,pfix),
"effic_vs_mva%dcut%s"%(num,pfix),
"fakerate_vs_mva%dcut%s"%(num,pfix), zaxis=
True), **argsroc2),
169 Plot(true_cuteff, xtitle=xtitlecut, ytitle=
"True track selection efficiency", ymax=_maxEff),
170 Plot(fake_cuteff, xtitle=xtitlecut, ytitle=
"Fake track selection efficiency", ymax=_maxEff),
171 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),
172 ], ncols=3, legendDy=_legendDy_1row),
174 Plot(
"mva_assoc(recoToSim)_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for true tracks", xlog=
True, **argsprofile),
175 Plot(
"mva_fake_mva%d%s_pT"%(num,pfix), xtitle=
"Track p_{T} (GeV)", ytitle=xtitle+
" for fake tracks", xlog=
True, **argsprofile),
176 Plot(
"mva_assoc(recoToSim)_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for true tracks", **argsprofile),
177 Plot(
"mva_fake_mva%d%s_eta"%(num,pfix), xtitle=
"Track #eta", ytitle=xtitle+
" for fake tracks", **argsprofile),
178 ], legendDy=_legendDy_2rows)
182 Plot(
"efficPt", title=
"Efficiency vs p_{T}", xtitle=
"TP p_{T} (GeV)", ytitle=
"efficiency vs p_{T}", xlog=
True, ymax=_maxEff),
183 Plot(
FakeDuplicate(
"fakeduprate_vs_pT", assoc=
"num_assoc(recoToSim)_pT", dup=
"num_duplicate_pT", reco=
"num_reco_pT", title=
"fake+duplicates vs p_{T}"),
184 xtitle=
"track p_{T} (GeV)", ytitle=
"fake+duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
185 Plot(
"effic", xtitle=
"TP #eta", ytitle=
"efficiency vs #eta", title=
"", ymax=_maxEff),
186 Plot(
FakeDuplicate(
"fakeduprate_vs_eta", assoc=
"num_assoc(recoToSim)_eta", dup=
"num_duplicate_eta", reco=
"num_reco_eta", title=
""),
187 xtitle=
"track #eta", ytitle=
"fake+duplicates rate vs #eta", ymax=_maxFake),
195 legendDy=_legendDy_2rows
202 legendDy=_legendDy_4rows
204 _effandfakeHitsLayers =
PlotGroup(
"effandfakeHitsLayers",
209 legendDy=_legendDy_4rows
211 _common = {
"ymin": 0,
"ymax": _maxEff}
213 _makeEffFakeDupPlots(
"vertpos",
"vert r",
"cm", fakeopts=
dict(xtitle=
"track ref. point r (cm)", ytitle=
"fake+duplicates vs. r"), common=
dict(xlog=
True)) +
214 _makeEffFakeDupPlots(
"zpos" ,
"vert z",
"cm", fakeopts=
dict(xtitle=
"track ref. point z (cm)", ytitle=
"fake+duplicates vs. z")) +
219 _makeEffFakeDupPlots(
"drj" ,
"#DeltaR(track, jet)", effopts=
dict(xtitle=
"#DeltaR(TP, jet)", ytitle=
"efficiency vs #DeltaR(TP, jet"), fakeopts=
dict(xtitle=
"#DeltaR(track, jet)"), common=
dict(xlog=
True))+
221 legendDy=_legendDy_4rows
225 _algos_common =
dict(removeEmptyBins=
True, xbinlabelsize=10, xbinlabeloption=
"d")
226 _duplicateAlgo =
PlotOnSideGroup(
"duplicateAlgo",
Plot(
"duplicates_oriAlgo_vs_oriAlgo", drawStyle=
"COLZ", adjustMarginLeft=0.1, adjustMarginRight=0.1, **_algos_common))
229 Plot(
"fakeratePt", xtitle=
"track p_{T} (GeV)", ytitle=
"fakerate vs p_{T}", xlog=
True, ymax=_maxFake),
230 Plot(
"duplicatesRate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"duplicates rate vs p_{T}", ymax=_maxFake, xlog=
True),
231 Plot(
"pileuprate_Pt", xtitle=
"track p_{T} (GeV)", ytitle=
"pileup rate vs p_{T}", ymax=_maxFake, xlog=
True),
232 Plot(
"fakerate", xtitle=
"track #eta", ytitle=
"fakerate vs #eta", title=
"", ymax=_maxFake),
233 Plot(
"duplicatesRate", xtitle=
"track #eta", ytitle=
"duplicates rate vs #eta", title=
"", ymax=_maxFake),
234 Plot(
"pileuprate", xtitle=
"track #eta", ytitle=
"pileup rate vs #eta", title=
"", ymax=_maxFake),
241 ncols=3, legendDy=_legendDy_2rows_3cols
248 ncols=3, legendDy=_legendDy_4rows
250 _dupandfakeHitsLayers =
PlotGroup(
"dupandfakeHitsLayers",
255 ncols=3, legendDy=_legendDy_4rows
269 _seedingLayerSet_common =
dict(removeEmptyBins=
True, xbinlabelsize=8, xbinlabeloption=
"d", adjustMarginRight=0.1)
270 _dupandfakeSeedingPlots =
_makeFakeDupPileupPlots(
"seedingLayerSet",
"seeding layers", xtitle=
"", common=_seedingLayerSet_common)
271 _dupandfakeChi2Seeding =
PlotGroup(
"dupandfakeChi2Seeding",
273 _dupandfakeSeedingPlots,
274 ncols=3, legendDy=_legendDy_2rows_3cols
278 "ytitle":
"Fake+pileup rate",
283 _common2.update(_common)
284 _common2[
"drawStyle"] =
"pcolz" 285 _common2[
"ztitleoffset"] = 1.5
286 _common2[
"xtitleoffset"] = 7
287 _common2[
"ytitleoffset"] = 10
288 _common2[
"ztitleoffset"] = 6
290 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")),
291 xtitle=
"Efficiency vs. cut on dz(PV)", **_common),
292 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),
293 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)", **_common2),
295 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")),
296 xtitle=
"Efficiency vs. cut on dz(PV)/dzError", **_common),
297 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),
298 xtitle=
"Efficiency", ztitle=
"Cut on dz(PV)/dzError", **_common2),
300 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")),
301 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)", **_common),
302 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),
303 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)", **_common2),
305 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")),
306 xtitle=
"Efficiency (p_{T} weighted) vs. cut on dz(PV)/dzError", **_common),
307 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),
308 xtitle=
"Efficiency (p_{T} weighted)", ztitle=
"Cut on dz(PV)/dzError", **_common2),
309 ], onlyForPileup=
True,
310 legendDy=_legendDy_4rows
313 Plot(
"effic_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency vs. cut on dz(PV)", ymax=_maxEff),
314 Plot(
"effic_vs_dzpvcut2", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
315 Plot(
"fakerate_vs_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate vs. cut on dz(PV)", ymax=_maxFake),
316 Plot(
"pileuprate_dzpvcut", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate vs. cut on dz(PV)", ymax=_maxFake),
318 Plot(
"effic_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency vs. cut on dz(PV)/dzError", ymax=_maxEff),
319 Plot(
"effic_vs_dzpvsigcut2", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (excl. trk eff)", ymax=_maxEff),
320 Plot(
"fakerate_vs_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
321 Plot(
"pileuprate_dzpvsigcut", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate vs. cut on dz(PV)/dzError", ymax=_maxFake),
322 ], onlyForPileup=
True,
323 legendDy=_legendDy_4rows
326 Plot(
"effic_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
327 Plot(
"effic_vs_dzpvcut2_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
328 Plot(
"fakerate_vs_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
329 Plot(
"pileuprate_dzpvcut_pt", xtitle=
"Cut on dz(PV) (cm)", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
331 Plot(
"effic_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted)", ymax=_maxEff),
332 Plot(
"effic_vs_dzpvsigcut2_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Efficiency (p_{T} weighted, excl. trk eff)", ymax=_maxEff),
333 Plot(
"fakerate_vs_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Fake rate (p_{T} weighted)", ymax=_maxFake),
334 Plot(
"pileuprate_dzpvsigcut_pt", xtitle=
"Cut on dz(PV)/dzError", ytitle=
"Pileup rate (p_{T} weighted)", ymax=_maxFake),
335 ], onlyForPileup=
True,
336 legendDy=_legendDy_4rows
341 _common = {
"normalizeToUnitArea":
True,
"stat":
True,
"drawStyle":
"hist"}
343 Plot(
"h_dedx_estim1", xtitle=
"dE/dx, harm2", **_common),
344 Plot(
"h_dedx_estim2", xtitle=
"dE/dx, trunc40", **_common),
345 Plot(
"h_dedx_nom1", xtitle=
"dE/dx number of measurements", title=
"", **_common),
346 Plot(
"h_dedx_sat1", xtitle=
"dE/dx number of measurements with saturation", title=
"", **_common),
348 legendDy=_legendDy_2rows
352 Plot(
"chargeMisIdRate", xtitle=
"#eta", ytitle=
"charge mis-id rate vs #eta", ymax=0.05),
353 Plot(
"chargeMisIdRate_Pt", xtitle=
"p_{T}", ytitle=
"charge mis-id rate vs p_{T}", xmax=300, ymax=0.1, xlog=
True),
354 Plot(
"chargeMisIdRate_hit", xtitle=
"hits", ytitle=
"charge mis-id rate vs hits", title=
""),
355 Plot(
"chargeMisIdRate_phi", xtitle=
"#phi", ytitle=
"charge mis-id rate vs #phi", title=
"", ymax=0.01),
356 Plot(
"chargeMisIdRate_dxy", xtitle=
"dxy", ytitle=
"charge mis-id rate vs dxy", ymax=0.1),
357 Plot(
"chargeMisIdRate_dz", xtitle=
"dz", ytitle=
"charge mis-id rate vs dz", ymax=0.1)
359 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"ylog":
True,
"ymin": 1e-6,
"drawStyle":
"hist"}
361 Plot(
"missing_inner_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
362 Plot(
"missing_outer_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common),
363 Plot(
"hits_eta", xtitle=
"track #eta", ytitle=
"<hits> vs #eta", ymin=_minHits, ymax=_maxHits, statyadjust=[0,0,-0.15],
364 fallback={
"name":
"nhits_vs_eta",
"profileX":
True}),
365 Plot(
"hits", stat=
True, xtitle=
"track hits", xmin=_minHits, xmax=_maxHits, ylog=
True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle=
"hist"),
366 Plot(
"num_simul_pT", xtitle=
"TP p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common),
367 Plot(
"num_reco_pT", xtitle=
"track p_{T}", xlog=
True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common)
370 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),
371 Plot(
"chi2_prob", stat=
True, normalizeToUnitArea=
True, drawStyle=
"hist", xtitle=
"Prob(#chi^{2})"),
372 Plot(
"chi2mean", title=
"", xtitle=
"#eta", ytitle=
"< #chi^{2} / ndf >", ymin=[0, 0.5], ymax=[2, 2.5, 3, 5],
373 fallback={
"name":
"chi2_vs_eta",
"profileX":
True}),
374 Plot(
"ptres_vs_eta_Mean", scale=100, title=
"", xtitle=
"TP #eta (PCA to beamline)", ytitle=
"< #delta p_{T} / p_{T} > (%)", ymin=_minResidualPt, ymax=_maxResidualPt)
376 _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}
378 Plot(
"pullPt", **_common),
379 Plot(
"pullQoverp", **_common),
380 Plot(
"pullPhi", **_common),
381 Plot(
"pullTheta", **_common),
382 Plot(
"pullDxy", **_common),
383 Plot(
"pullDz", **_common),
385 legendDx=0.1, legendDw=-0.1, legendDh=-0.015
387 _common = {
"title":
"",
"ylog":
True,
"xtitle":
"TP #eta (PCA to beamline)",
"ymin": _minMaxResol,
"ymax": _minMaxResol}
389 Plot(
"phires_vs_eta_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
390 Plot(
"cotThetares_vs_eta_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
391 Plot(
"dxyres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
392 Plot(
"dzres_vs_eta_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
393 Plot(
"ptres_vs_eta_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
395 _common = {
"title":
"",
"ylog":
True,
"xlog":
True,
"xtitle":
"TP p_{T} (PCA to beamline)",
"xmin": 0.1,
"xmax": 1000,
"ymin": _minMaxResol,
"ymax": _minMaxResol}
397 Plot(
"phires_vs_pt_Sigma", ytitle=
"#sigma(#delta #phi) (rad)", **_common),
398 Plot(
"cotThetares_vs_pt_Sigma", ytitle=
"#sigma(#delta cot(#theta))", **_common),
399 Plot(
"dxyres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{xy}) (cm)", **_common),
400 Plot(
"dzres_vs_pt_Sigma", ytitle=
"#sigma(#delta d_{z}) (cm)", **_common),
401 Plot(
"ptres_vs_pt_Sigma", ytitle=
"#sigma(#delta p_{T}/p_{T})", **_common),
413 ncols=4, legendDy=_legendDy_2rows)
419 ncols=4, legendDy=_legendDy_4rows)
424 _makeDistPlots(
"3Dlayer" ,
"3D layers" , common=
dict(xmin=_min3DLayers, xmax=_max3DLayers)),
425 ncols=4, legendDy=_legendDy_4rows,
436 ncols=2, legendDy=_legendDy_2rows,
438 _extDistSeedingPlots =
_makeDistPlots(
"seedingLayerSet",
"seeding layers", common=
dict(xtitle=
"", **_seedingLayerSet_common))
441 _extDistSeedingPlots,
442 ncols=4, legendDy=_legendDy_2rows_3cols
444 _common =
dict(title=
"", xtitle=
"TP #eta (PCA to beamline)")
446 Plot(
"phires_vs_eta_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
447 Plot(
"cotThetares_vs_eta_Mean", ytitle=
"< #delta cot(#theta) >", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
448 Plot(
"dxyres_vs_eta_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
449 Plot(
"dzres_vs_eta_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
450 Plot(
"ptres_vs_eta_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
452 _common =
dict(title=
"", xlog=
True, xtitle=
"TP p_{T} (PCA to beamline)", xmin=0.1, xmax=1000)
454 Plot(
"phires_vs_pt_Mean", ytitle=
"< #delta #phi > (rad)", ymin=_minResidualPhi, ymax=_maxResidualPhi, **_common),
455 Plot(
"cotThetares_vs_pt_Mean", ytitle=
"< #delta cot(#theta > )", ymin=_minResidualCotTheta, ymax=_maxResidualCotTheta, **_common),
456 Plot(
"dxyres_vs_pt_Mean", ytitle=
"< #delta d_{xy} > (#mum)", scale=10000, ymin=_minResidualDxy, ymax=_maxResidualDxy, **_common),
457 Plot(
"dzres_vs_pt_Mean", ytitle=
"< #delta d_{z} > (#mum)", scale=10000, ymin=_minResidualDz, ymax=_maxResidualDz, **_common),
458 Plot(
"ptres_vs_pt_Mean", ytitle=
"< #delta p_{T}/p_{T} > (%)", scale=100, ymin=_minResidualPt, ymax=_maxResidualPt, **_common),
460 _common =
dict(title=
"", ytitle=
"Selected tracks/TrackingParticles", ymax=_maxEff)
462 Plot(
"nrec_vs_nsim", title=
"", xtitle=
"TrackingParticles", ytitle=
"Tracks", profileX=
True, xmin=_minMaxTracks, xmax=_minMaxTracks, ymin=_minMaxTracks, ymax=_minMaxTracks),
463 Plot(
"nrecPerNsim_vs_pu", xtitle=
"Pileup", xmin=_minPU, xmax=_maxPU, **_common),
464 Plot(
"nrecPerNsimPt", xtitle=
"p_{T} (GeV)", xlog=
True, **_common),
465 Plot(
"nrecPerNsim", xtitle=
"#eta", **_common)
466 ], legendDy=_legendDy_2rows)
468 Plot(
"PXLhits_vs_eta", xtitle=
"#eta", ytitle=
"<pixel hits>"),
469 Plot(
"PXLlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<pixel layers>"),
470 Plot(
"STRIPhits_vs_eta", xtitle=
"#eta", ytitle=
"<strip hits>"),
471 Plot(
"STRIPlayersWithMeas_vs_eta", xtitle=
"#eta", ytitle=
"<strip layers>"),
472 ], legendDy=_legendDy_2rows)
484 ncols=2, legendDy=_legendDy_2rows)
490 ncols=2, legendDy=_legendDy_4rows)
496 ncols=2, legendDy=_legendDy_4rows,
507 ncols=2, legendDy=_legendDy_2rows,
516 _possibleTrackingNonIterationColls = [
520 _possibleTrackingColls = [
521 'initialStepPreSplitting',
525 'detachedTripletStep',
539 'jetCoreRegionalStep',
540 'muonSeededStepInOut',
541 'muonSeededStepOutIn',
543 ] + _possibleTrackingNonIterationColls
544 _possibleTrackingCollsOld = {
558 ret = subfolder.replace(
"trackingParticleRecoAsssociation",
"AssociatorByHitsRecoDenom")
559 for (old, new)
in [(
"InitialStep",
"Zero"),
560 (
"HighPtTripletStep",
"First"),
561 (
"LowPtQuadStep",
"Second"),
562 (
"LowPtTripletStep",
"Third"),
563 (
"DetachedQuadStep",
"Fourth"),
564 (
"PixelPairStep",
"Fifth"),
565 (
"MuonSeededStepInOut",
"Ninth"),
566 (
"MuonSeededStepOutIn",
"Tenth")]:
567 ret = ret.replace(old, new)
572 for (old, new)
in [(
"initialStep",
"iter0"),
573 (
"highPtTripletStep",
"iter1"),
574 (
"lowPtQuadStep",
"iter2"),
575 (
"lowPtTripletStep",
"iter3"),
576 (
"detachedQuadStep",
"iter4"),
577 (
"pixelPairStep",
"iter5"),
578 (
"muonSeededStepInOut",
"iter9"),
579 (
"muonSeededStepOutIn",
"iter10")]:
580 path = path.replace(old, new)
584 return subfolder.replace(
"trackingParticleRecoAsssociation",
"trackingParticleRecoAsssociationSignal")
586 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsConversion")
588 return subfolder.replace(
"quickAssociatorByHits",
"quickAssociatorByHitsPreSplitting")
592 _additionalTrackQualities = [
599 quality =
"highPurity" 602 collNameNoQuality = collName.replace(
"Hp",
"")
603 for qual
in _additionalTrackQualities:
606 collNameNoQuality = collNameNoQuality.replace(qual,
"")
608 collNameNoQuality = collNameNoQuality.replace(
"Tracks",
"", 1)
611 if collNameLow.find(
"seed") == 0:
612 collNameLow = collNameLow[4:]
613 if collNameLow ==
"initialstepseedspresplitting":
614 collNameLow =
"initialsteppresplittingseeds" 615 elif collNameLow ==
"muonseededseedsinout":
616 collNameLow =
"muonseededstepinoutseeds" 617 elif collNameLow ==
"muonseededseedsoutin":
618 collNameLow =
"muonseededstepoutinseeds" 620 i_seeds = collNameLow.index(
"seeds")
621 quality = collNameLow[i_seeds:]+quality
623 collNameLow = collNameLow[:i_seeds]
626 prefixes = [
"cutsreco",
"cutsrecofrompv",
"cutsrecofrompv2",
"cutsrecofrompvalltp"]
627 if collNameLow
in [
"general",
"generalfrompv"]+prefixes:
632 if coll == collNameLow.replace(pfx,
""):
636 for coll
in _possibleTrackingColls:
637 if testColl(coll.lower()):
642 for coll, name
in six.iteritems(_possibleTrackingCollsOld):
643 if testColl(coll.lower()):
649 algo = collNameNoQuality
652 if algo ==
"muonSeededInOut":
653 algo =
"muonSeededStepInOut" 654 if algo ==
"muonSeededOutIn":
655 algo =
"muonSeededStepOutIn" 657 return (algo, quality)
660 return (name, [name])
661 _collLabelMap = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+_possibleTrackingColls))
662 _collLabelMapHp = collections.OrderedDict(
map(_collhelper, [
"generalTracks"]+[n
for n
in _possibleTrackingColls
if "Step" in n]))
666 algo =
"generalTracks" 670 if algo !=
"generalTracks" and "ByOriginalAlgo" not in quality:
672 quality = quality.replace(
"ByOriginalAlgo",
"")
674 if algo !=
"generalTracks" and "ByAlgoMask" not in quality:
676 quality = quality.replace(
"ByAlgoMask",
"")
678 if "Pt09" not in quality:
680 quality = quality.replace(
"Pt09",
"")
683 if quality ==
"highPurity":
686 i_seeds = quality.find(
"seeds")
689 seedSubColl = quality[i_seeds+5:]
690 if seedSubColl !=
"":
691 ret += seedSubColl[0].
upper() + seedSubColl[1:]
698 def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, ptCut=False, seeds=False, midfix=""):
699 _common = {
"drawStyle":
"EP",
"xbinlabelsize": 10,
"xbinlabeloption":
"d"}
700 _commonN =
dict(ylog=
True, ymin=_minMaxN, ymax=_minMaxN,
701 normalizeToNumberOfEvents=
True,
703 _commonN.update(_common)
704 _commonAB =
dict(mapping=mapping,
705 renameBin=
lambda bl:
_summaryBinRename(bl, highPurity, byOriginalAlgo, byAlgoMask, ptCut, seeds),
706 ignoreMissingBins=
True,
709 if byOriginalAlgo
or byAlgoMask:
710 _commonAB[
"minExistingBins"] = 2
711 prefix =
"summary"+midfix
713 h_eff =
"effic_vs_coll" 714 h_fakerate =
"fakerate_vs_coll" 715 h_duplicaterate =
"duplicatesRate_coll" 716 h_pileuprate =
"pileuprate_coll" 718 h_reco =
"num_reco_coll" 719 h_true =
"num_assoc(recoToSim)_coll" 720 h_fake =
Subtract(
"num_fake_coll_orig",
"num_reco_coll",
"num_assoc(recoToSim)_coll")
721 h_duplicate =
"num_duplicate_coll" 722 h_pileup =
"num_pileup_coll" 723 if mapping
is not None:
725 h_fakerate =
AggregateBins(
"fakerate", h_fakerate, **_commonAB)
726 h_duplicaterate =
AggregateBins(
"duplicatesRate", h_duplicaterate, **_commonAB)
727 h_pileuprate =
AggregateBins(
"pileuprate", h_pileuprate, **_commonAB)
732 h_duplicate =
AggregateBins(
"num_duplicate_coll", h_duplicate, **_commonAB)
733 h_pileup =
AggregateBins(
"num_pileup_coll", h_pileup, **_commonAB)
736 Plot(h_eff, title=
"Efficiency vs collection", ytitle=
"Efficiency", ymin=1e-3, ymax=1, ylog=
True, **_common),
737 Plot(h_fakerate, title=
"Fakerate vs collection", ytitle=
"Fake rate", ymax=_maxFake, **_common),
739 Plot(h_duplicaterate, title=
"Duplicates rate vs collection", ytitle=
"Duplicates rate", ymax=_maxFake, **_common),
740 Plot(h_pileuprate, title=
"Pileup rate vs collection", ytitle=
"Pileup rate", ymax=_maxFake, **_common),
742 legendDy=_legendDy_2rows
744 summaryN =
PlotGroup(prefix+
"_ntracks", [
751 Plot(h_reco, ytitle=
"Tracks", title=
"Number of tracks vs collection", **_commonN),
752 Plot(h_true, ytitle=
"True tracks", title=
"Number of true tracks vs collection", **_commonN),
753 Plot(h_fake, ytitle=
"Fake tracks", title=
"Number of fake tracks vs collection", **_commonN),
754 Plot(h_duplicate, ytitle=
"Duplicate tracks", title=
"Number of duplicate tracks vs collection", **_commonN),
755 Plot(h_pileup, ytitle=
"Pileup tracks", title=
"Number of pileup tracks vs collection", **_commonN),
758 return (summary, summaryN)
763 (_summaryByOriginalAlgo, _summaryByOriginalAlgoN) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo")
764 (_summaryByOriginalAlgoHp, _summaryByOriginalAlgoNHp) =
_constructSummary(_collLabelMapHp, byOriginalAlgo=
True, midfix=
"ByOriginalAlgo", highPurity=
True)
765 (_summaryByAlgoMask, _summaryByAlgoMaskN) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask")
766 (_summaryByAlgoMaskHp, _summaryByAlgoMaskNHp) =
_constructSummary(_collLabelMapHp, byAlgoMask=
True, midfix=
"ByAlgoMask", highPurity=
True)
767 (_summaryPt09, _summaryPt09N) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09")
768 (_summaryPt09Hp, _summaryPt09NHp) =
_constructSummary(_collLabelMap, ptCut=
True, midfix=
"Pt09", highPurity=
True)
777 _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]}
779 _commonStatus.update(_common)
780 _commonStatus.update({
"xbinlabelsize": 10,
"xbinlabeloption":
"d",
"drawStyle":
"hist",
"adjustMarginRight": 0.08})
781 _commonLabelSize = {}
782 _commonLabelSize.update(_common)
783 _commonLabelSize.update({
"xlabelsize": 17})
786 Plot(
"selectionFlow", xbinlabelsize=10, xbinlabeloption=
"d", adjustMarginRight=0.1, drawStyle=
"hist", ylog=
True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]),
787 Plot(
"diffCharge", xtitle=
"Charge", **_common),
788 Plot(
"diffIsHighPurity", xtitle=
"High purity status", **_common),
789 Plot(
"diffNdof", xtitle=
"ndof", **_common),
790 Plot(
"diffNormalizedChi2", xtitle=
"#chi^{2}/ndof", **_common),
793 _packedCandidateHitsHitPattern =
PlotGroup(
"hitsHitPattern", [
794 Plot(
"diffHitPatternNumberOfValidHits", xtitle=
"Valid hits (via HitPattern)", **_common),
795 Plot(
"diffHitPatternNumberOfValidPixelHits", xtitle=
"Valid pixel hits (via HitPattern)", **_common),
796 Plot(
"diffHitPatternHasValidHitInFirstPixelBarrel", xtitle=
"Has valid hit in BPix1 layer (via HitPattern)", **_common),
797 Plot(
"diffHitPatternNumberOfLostPixelHits", xtitle=
"Lost pixel hits (via HitPattern)", **_common),
799 legendDy=_legendDy_2rows
802 Plot(
"diffNumberOfHits", xtitle=
"Hits", **_common),
803 Plot(
"diffNumberOfPixelHits", xtitle=
"Pixel hits", **_common),
804 Plot(
"diffLostInnerHits", xtitle=
"Lost inner hits", **_common),
805 Plot(
"numberHitsOverMax", xtitle=
"Number of overflown hits", **_common),
806 Plot(
"numberPixelHitsOverMax", xtitle=
"Number of overflown pixel hits", **_common),
807 Plot(
"numberStripHitsOverMax", xtitle=
"Number of overflown strip hits", **_common),
809 ncols=3, legendDy=_legendDy_2rows_3cols
814 Plot(
"diffNumberOfPixelLayers", xtitle=
"Pixel layers", **_common),
815 Plot(
"diffNumberOfStripLayers", xtitle=
"Strip layers", **_common),
817 Plot(
"diffHitPatternTrackerLayersWithMeasurement", xtitle=
"Layers (via HitPattern)", **_common),
818 Plot(
"diffHitPatternPixelLayersWithMeasurement", xtitle=
"Pixel layers (via HitPattern)", **_common),
819 Plot(
"diffHitPatternStripLayersWithMeasurement", xtitle=
"Strip layers (via HitPattern)", **_common),
821 Plot(
"numberLayersOverMax", xtitle=
"Number of overflown layers", **_common),
822 Plot(
"numberPixelLayersOverMax", xtitle=
"Number of overflown pixel layers", **_common),
823 Plot(
"numberStripLayersOverMax", xtitle=
"Number of overflown strip layers", **_common),
829 _packedCandidateImpactParameter1 =
PlotGroup(
"impactParameter1", [
830 Plot(
"diffDxyAssocPV", xtitle=
"dxy(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
831 Plot(
"diffDxyAssocPVStatus", **_commonStatus),
832 Plot(
"diffDxyAssocPVUnderOverFlowSign", xtitle=
"dxy(assocPV)", **_common),
833 Plot(
"diffDzAssocPV", xtitle=
"dz(assocPV)", adjustMarginRight=0.02, **_commonLabelSize),
834 Plot(
"diffDzAssocPVStatus", **_commonStatus),
835 Plot(
"diffDzAssocPVUnderOverFlowSign", xtitle=
"dz(assocPV)", **_common),
836 Plot(
"diffDxyError", xtitle=
"dxyError()", adjustMarginRight=0.02, **_commonLabelSize),
837 Plot(
"diffDszError", xtitle=
"dszError()", adjustMarginRight=0.02, **_commonLabelSize),
838 Plot(
"diffDzError", xtitle=
"dzError()", adjustMarginRight=0.02, **_commonLabelSize),
844 _packedCandidateImpactParameter2 =
PlotGroup(
"impactParameter2", [
845 Plot(
"diffDxyPV", xtitle=
"dxy(PV) via PC", **_commonLabelSize),
846 Plot(
"diffDzPV", xtitle=
"dz(PV) via PC", **_commonLabelSize),
847 Plot(
"diffTrackDxyAssocPV", xtitle=
"dxy(PV) via PC::bestTrack()", **_commonLabelSize),
848 Plot(
"diffTrackDzAssocPV", xtitle=
"dz(PV) via PC::bestTrack()", **_commonLabelSize),
849 Plot(
"diffTrackDxyError", xtitle=
"dxyError() via PC::bestTrack()", adjustMarginRight=0.02, **_commonLabelSize),
850 Plot(
"diffTrackDzError", xtitle=
"dzError() via PC::bestTrack()", **_commonLabelSize),
853 _packedCandidateCovarianceMatrix1 =
PlotGroup(
"covarianceMatrix1", [
854 Plot(
"diffCovQoverpQoverp", xtitle=
"cov(qoverp, qoverp)", **_commonLabelSize),
855 Plot(
"diffCovQoverpQoverpStatus", **_commonStatus),
856 Plot(
"diffCovQoverpQoverpUnderOverFlowSign", xtitle=
"cov(qoverp, qoverp)", **_common),
857 Plot(
"diffCovLambdaLambda", xtitle=
"cov(lambda, lambda)", **_commonLabelSize),
858 Plot(
"diffCovLambdaLambdaStatus", **_commonStatus),
859 Plot(
"diffCovLambdaLambdaUnderOverFlowSign", xtitle=
"cov(lambda, lambda)", **_common),
860 Plot(
"diffCovLambdaDsz", xtitle=
"cov(lambda, dsz)", **_commonLabelSize),
861 Plot(
"diffCovLambdaDszStatus", **_commonStatus),
862 Plot(
"diffCovLambdaDszUnderOverFlowSign", xtitle=
"cov(lambda, dsz)", **_common),
863 Plot(
"diffCovPhiPhi", xtitle=
"cov(phi, phi)", **_commonLabelSize),
864 Plot(
"diffCovPhiPhiStatus", **_commonStatus),
865 Plot(
"diffCovPhiPhiUnderOverFlowSign", xtitle=
"cov(phi, phi)", **_common),
867 ncols=3, legendDy=_legendDy_4rows
869 _packedCandidateCovarianceMatrix2 =
PlotGroup(
"covarianceMatrix2", [
870 Plot(
"diffCovPhiDxy", xtitle=
"cov(phi, dxy)", **_commonLabelSize),
871 Plot(
"diffCovPhiDxyStatus", **_commonStatus),
872 Plot(
"diffCovPhiDxyUnderOverFlowSign", xtitle=
"cov(phi, dxy)", **_common),
873 Plot(
"diffCovDxyDxy", xtitle=
"cov(dxy, dxy)", adjustMarginRight=0.02, **_commonLabelSize),
874 Plot(
"diffCovDxyDxyStatus", **_commonStatus),
875 Plot(
"diffCovDxyDxyUnderOverFlowSign", xtitle=
"cov(dxy, dxy)", **_common),
876 Plot(
"diffCovDxyDsz", xtitle=
"cov(dxy, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
877 Plot(
"diffCovDxyDszStatus", **_commonStatus),
878 Plot(
"diffCovDxyDszUnderOverFlowSign", xtitle=
"cov(dxy, dsz)", **_common),
879 Plot(
"diffCovDszDsz", xtitle=
"cov(dsz, dsz)", adjustMarginRight=0.02, **_commonLabelSize),
880 Plot(
"diffCovDszDszStatus", **_commonStatus),
881 Plot(
"diffCovDszDszUnderOverFlowSign", xtitle=
"cov(dsz, dsz)", **_common),
883 ncols=3, legendDy=_legendDy_4rows
886 _common[
"xlabelsize"] = 16
888 Plot(
"diffVx", xtitle=
"Reference point x", **_common),
889 Plot(
"diffVy", xtitle=
"Reference point y", **_common),
890 Plot(
"diffVz", xtitle=
"Reference point z", **_common),
892 legendDy=_legendDy_2rows
895 _common[
"adjustMarginRight"] = 0.05
897 Plot(
"diffPt", xtitle=
"p_{T}", **_common),
898 Plot(
"diffPtError", xtitle=
"p_{T} error", **_common),
899 Plot(
"diffEta", xtitle=
"#eta", **_common),
900 Plot(
"diffEtaError", xtitle=
"#eta error", **_common),
901 Plot(
"diffPhi", xtitle=
"#phi", **_common),
907 PlotFolder.__init__(self, *args, **kwargs)
910 spl = dqmSubFolderName.split(
"_")
917 (algoOrig, quality) = translatedDqmSubFolder
923 if plotFolderName !=
"":
924 ret +=
"_"+plotFolderName
927 if not (algo ==
"ootb" and quality !=
""):
932 """Return True if this subfolder should be processed 935 limitOnlyTo -- Function '(algo, quality) -> bool' 936 translatedDqmSubFolder -- Return value of translateSubFolder 938 (algo, quality) = translatedDqmSubFolder
939 return limitOnlyTo(algo, quality)
943 return algo
not in _possibleTrackingNonIterationColls
954 def __init__(self, section, collection=GeneralTracks):
970 def _getAlgoQuality(data, algo, quality):
971 for label, value
in six.iteritems(data):
973 if a == algo
and q == quality:
977 h = tdirectory.Get(hname)
982 return _getAlgoQuality(data,
"ootb",
"")
984 return _getAlgoQuality(data,
"ootb",
"Pt09")
986 return _getAlgoQuality(data,
"ootb",
"highPurity")
988 return _getAlgoQuality(data,
"ootb",
"highPurityPt09")
990 return _getAlgoQuality(data,
"btvLike",
"")
992 return _getAlgoQuality(data,
"ak4PFJets",
"")
994 return _getAlgoQuality(data,
"pixel",
"")
997 def _formatOrNone(num, func):
1002 n_tps = _formatOrNone(_getN(
"num_simul_coll"), int)
1003 n_m_tps = _formatOrNone(_getN(
"num_assoc(simToReco)_coll"), int)
1005 n_tracks = _formatOrNone(_getN(
"num_reco_coll"), int)
1006 n_true = _formatOrNone(_getN(
"num_assoc(recoToSim)_coll"), int)
1007 if n_tracks
is not None and n_true
is not None:
1008 n_fake = n_tracks-n_true
1011 n_pileup = _formatOrNone(_getN(
"num_pileup_coll"), int)
1012 n_duplicate = _formatOrNone(_getN(
"num_duplicate_coll"), int)
1014 eff = _formatOrNone(_getN(
"effic_vs_coll"),
lambda n:
"%.4f" % n)
1015 eff_nopt = _formatOrNone(_getN(
"effic_vs_coll_allPt"),
lambda n:
"%.4f" % n)
1016 fake = _formatOrNone(_getN(
"fakerate_vs_coll"),
lambda n:
"%.4f" % n)
1017 duplicate = _formatOrNone(_getN(
"duplicatesRate_coll"),
lambda n:
"%.4f" % n)
1019 ret = [eff, n_tps, n_m_tps,
1020 eff_nopt, fake, duplicate,
1021 n_tracks, n_true, n_fake, n_pileup, n_duplicate]
1022 if ret.count(
None) == len(ret):
1029 "Number of TrackingParticles (after cuts)",
1030 "Number of matched TrackingParticles",
1031 "Efficiency (w/o pT cut)",
1035 "Number of true tracks",
1036 "Number of fake tracks",
1037 "Number of pileup tracks",
1038 "Number of duplicate tracks" 1043 def __init__(self, fileName, plots, titles, isRate, **kwargs):
1049 if len(plots) != len(titles):
1050 raise Exception(
"Number of plots (%d) has to be the same as number of titles (%d)" % (len(plots), len(titles)))
1052 def _set(attr, default):
1053 setattr(self,
"_"+attr, kwargs.get(attr, default))
1055 _set(
"onlyForPileup",
False)
1058 """Return True if the PlotGroup is intended only for pileup samples""" 1059 return self._onlyForPileup
1061 def create(self, tdirectoryNEvents, requireAllHistograms=False):
1064 plot.create(tdirectoryNEvents, requireAllHistograms)
1066 def draw(self, legendLabels, prefix=None, directory="", *args, **kwargs):
1068 onlyEmptyPlots =
True 1070 if not plot.isEmpty():
1071 onlyEmptyPlots =
False 1076 haveShortLabels =
False 1077 legendLabels = legendLabels[:]
1078 if max(
map(len, legendLabels)) > 20:
1079 haveShortLabels =
True 1080 labels_short = [
str(chr(ord(
'A')+i))
for i
in range(len(legendLabels))]
1081 for i, ls
in enumerate(labels_short):
1082 legendLabels[i] =
"%s: %s" % (ls, legendLabels[i])
1084 labels_short = legendLabels
1089 ' <table border="1">',
1100 for h, l
in zip(plot._histograms, labels_short):
1102 h_tmp.append(len(histos_linear))
1103 histos_linear.append(h)
1107 histos_index.append(h_tmp)
1108 labels.append(l_tmp)
1111 ' <td colspan="%d">%s</td>' % (len(h_tmp), title),
1114 if len(histos_linear) == 0:
1124 if len(histos_linear) == 0:
1128 if len(histos_linear_new) > 0
and len(histos_linear_new) != len(histos_linear):
1129 raise Exception(
"This should never happen. len(histos_linear_new) %d != len(histos_linear) %d" % (len(histos_linear_new), len(histos_linear)))
1130 histos_linear = histos_linear_new
1131 if len(histos_linear) == 0:
1134 data = [ [h.GetBinContent(i)
for i
in range(1, h.GetNbinsX()+1)]
for h
in histos_linear]
1135 table =
html.Table([
"dummy"]*len(histos_linear), xbinlabels, data,
None,
None,
None)
1136 data = table.tableAsRowColumn()
1139 content.append(
' <td></td>')
1140 content.extend([
' <td>%s</td>' % lab
for lab
in labs])
1145 for irow, row
in enumerate(data):
1148 ' <td>%s</td>' % table.rowHeaders()[irow]
1151 for hindices
in histos_index:
1152 for hindex
in hindices:
1154 formatted = self.
_format%item
if item
is not None else "" 1155 content.append(
' <td align="right">%s</td>' % formatted)
1156 content.append(
' <td></td>')
1158 content.append(
' </tr>')
1160 content.append(
' </table>')
1162 for lab
in legendLabels:
1163 content.append(
' %s<br/>' % lab)
1171 if prefix
is not None:
1174 name = os.path.join(directory, name)
1176 with open(name,
"w")
as f:
1177 for line
in content:
1183 [
"Fake rate",
"Duplicate rate",
"Pileup rate"], isRate=
True)
1185 [
"All tracks",
"True tracks",
"Fake tracks",
"Duplicate tracks"], isRate=
False)
1189 "DQMData/Run 1/Tracking/Run summary/"+lastDirName,
1190 "DQMData/Tracking/"+lastDirName,
1191 "DQMData/Run 1/RecoTrackV/Run summary/"+lastDirName,
1192 "DQMData/RecoTrackV/"+lastDirName,
1196 _effandfakePtEtaPhi,
1199 _effandfakeHitsLayers,
1201 _effandfakeDeltaRPU,
1205 _dupandfakePtEtaPhi,
1208 _dupandfakeHitsLayers,
1210 _dupandfakeDeltaRPU,
1211 _dupandfakeChi2Seeding,
1212 _dupandfakeSeedingTable,
1224 _seedingBuildingPlots = _simBasedPlots + [
1225 _dupandfakePtEtaPhi,
1228 _dupandfakeHitsLayers,
1230 _dupandfakeDeltaRPU,
1231 _dupandfakeChi2Seeding,
1232 _dupandfakeSeedingTable,
1240 _buildingExtendedPlots = [
1253 _extDistChi2Seeding,
1254 _extDistSeedingTable,
1259 _extDistSimPtEtaPhi,
1262 _extDistSimHitsLayers,
1269 _summaryByOriginalAlgo,
1270 _summaryByOriginalAlgoN,
1272 _summaryByAlgoMaskN,
1279 _summaryByOriginalAlgoHp,
1280 _summaryByOriginalAlgoNHp,
1281 _summaryByAlgoMaskHp,
1282 _summaryByAlgoMaskNHp,
1286 _summaryPlotsSeeds = [
1290 _packedCandidatePlots = [
1291 _packedCandidateFlow,
1292 _packedCandidateKinematics,
1293 _packedCandidateVertex,
1294 _packedCandidateImpactParameter1,
1295 _packedCandidateImpactParameter2,
1296 _packedCandidateCovarianceMatrix1,
1297 _packedCandidateCovarianceMatrix2,
1298 _packedCandidateHits,
1299 _packedCandidateHitsHitPattern,
1300 _packedCandidateLayers,
1304 def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, onlyForElectron=False, onlyForConversion=False, onlyForBHadron=False, seeding=False, building=False, rawSummary=False, highPuritySummary=True):
1307 limiters =
dict(onlyForPileup=onlyForPileup, onlyForElectron=onlyForElectron, onlyForConversion=onlyForConversion, onlyForBHadron=onlyForBHadron)
1309 _trackingRefFileFallbackSLHC_Phase1PU140
1311 common =
dict(fallbackDqmSubFolders=[
1312 _trackingSubFoldersFallbackSLHC_Phase1PU140,
1313 _trackingSubFoldersFallbackFromPV, _trackingSubFoldersFallbackConversion,
1314 _trackingSubFoldersFallbackPreSplitting])
1315 plotter.append(name, folders,
TrackingPlotFolder(*algoPlots, **commonForTPF), **common)
1318 extendedPlots.extend(_buildingExtendedPlots)
1319 extendedPlots.extend(_extendedPlots)
1320 plotterExt.append(name, folders,
TrackingPlotFolder(*extendedPlots, **commonForTPF), **common)
1324 summaryName += name+
"_" 1325 summaryName +=
"summary" 1328 summaryPlots.extend([_summaryRaw, _summaryRawN])
1329 summaryPlots.extend(_summaryPlots)
1334 plotter.append(summaryName, folders,
1335 PlotFolder(*summaryPlots, section=name, **common))
1336 if highPuritySummary:
1337 plotter.append(summaryName+
"_highPurity", folders,
1338 PlotFolder(*_summaryPlotsHp, section=name+
"_highPurity" if name !=
"" else "highPurity", **common),
1339 fallbackNames=[summaryName])
1341 plotter.append(summaryName+
"_seeds", folders,
1342 PlotFolder(*_summaryPlotsSeeds, section=name+
"_seeds", **common))
1346 if highPuritySummary:
1347 sectionName = name+
"_highPurity" if name !=
"" else "highPurity" 1356 _appendTrackingPlots(
"TrackFromPV",
"fromPV", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1357 _appendTrackingPlots(
"TrackFromPVAllTP",
"fromPVAllTP", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1358 _appendTrackingPlots(
"TrackFromPVAllTP2",
"fromPVAllTP2", _simBasedPlots+_recoBasedPlots, onlyForPileup=
True)
1361 _appendTrackingPlots(
"TrackConversion",
"conversion", _simBasedPlots+_recoBasedPlots, onlyForConversion=
True, rawSummary=
True, highPuritySummary=
False)
1362 _appendTrackingPlots(
"TrackGsf",
"gsf", _simBasedPlots+_recoBasedPlots, onlyForElectron=
True, rawSummary=
True, highPuritySummary=
False)
1363 _appendTrackingPlots(
"TrackBHadron",
"bhadron", _simBasedPlots+_recoBasedPlots, onlyForBHadron=
True)
1374 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1376 plotter.append(
"packedCandidateLostTracks",
_trackingFolders(
"PackedCandidate/lostTracks"),
1377 PlotFolder(*_packedCandidatePlots, loopSubFolders=
False,
1382 "DQMData/Run 1/HLT/Run summary/Tracking/ValidationWRTtp",
1387 plotterHLT.append(
"hlt", _hltFolder,
TrackingPlotFolder(*(_simBasedPlots+_recoBasedPlots), **_common))
1388 plotterHLTExt.append(
"hlt", _hltFolder,
TrackingPlotFolder(*_extendedPlots, **_common))
1392 def __init__(self, name, clusterMasking=None, seeding=None, building=None, fit=None, selection=None, other=[]):
1395 def _set(param, name, modules):
1396 if param
is not None:
1397 setattr(self, name, param)
1399 setattr(self, name, modules)
1401 _set(clusterMasking,
"_clusterMasking", [self.
_name+
"Clusters"])
1404 _set(seeding,
"_seeding", [self.
_name+
"SeedingLayers", self.
_name+
"TrackingRegions", self.
_name+
"HitDoublets", self.
_name+
"HitTriplets", self.
_name+
"HitQuadruplets", self.
_name+
"Seeds"])
1405 _set(building,
"_building", [self.
_name+
"TrackCandidates"])
1406 _set(fit,
"_fit", [self.
_name+
"Tracks"])
1407 _set(selection,
"_selection", [self.
_name])
1414 return self._clusterMasking+self._seeding+self._building+self._fit+self._selection+self.
_other 1417 return self._clusterMasking
1420 return self._seeding
1423 return self._building
1429 return self._selection
1438 (
"Fit", self.
fit()),
1440 (
"Other", self.
other())]
1445 seeding=[
"initialStepSeedLayersPreSplitting",
1446 "initialStepTrackingRegionsPreSplitting",
1447 "initialStepHitDoubletsPreSplitting",
1448 "initialStepHitTripletsPreSplitting",
1449 "initialStepHitQuadrupletsPreSplitting",
1450 "initialStepSeedsPreSplitting"],
1451 building=[
"initialStepTrackCandidatesPreSplitting"],
1452 fit=[
"initialStepTracksPreSplitting"],
1453 other=[
"firstStepPrimaryVerticesPreSplitting",
1454 "initialStepTrackRefsForJetsPreSplitting",
1455 "caloTowerForTrkPreSplitting",
1456 "ak4CaloJetsForTrkPreSplitting",
1457 "jetsForCoreTrackingPreSplitting",
1460 "MeasurementTrackerEvent",
1461 "siPixelClusterShapeCache"]),
1462 Iteration(
"initialStep", clusterMasking=[],
1463 selection=[
"initialStepClassifier1",
1464 "initialStepClassifier2",
1465 "initialStepClassifier3",
1467 "initialStepSelector"],
1468 other=[
"firstStepPrimaryVerticesUnsorted",
1469 "initialStepTrackRefsForJets",
1471 "ak4CaloJetsForTrk",
1472 "firstStepPrimaryVertices"]),
1474 selection=[
"highPtTripletStepClassifier1",
1475 "highPtTripletStepClassifier2",
1476 "highPtTripletStepClassifier3",
1477 "highPtTripletStep",
1478 "highPtTripletStepSelector"]),
1480 selection=[
"detachedQuadStepClassifier1",
1481 "detachedQuadStepClassifier2",
1483 "detachedQuadStepSelector"]),
1485 selection=[
"detachedTripletStepClassifier1",
1486 "detachedTripletStepClassifier2",
1487 "detachedTripletStep",
1488 "detachedTripletStepSelector"]),
1490 selection=[
"lowPtQuadStepClassifier1",
1491 "lowPtQuadStepClassifier2",
1493 "lowPtQuadStepSelector"]),
1495 selection=[
"lowPtTripletStepClassifier1",
1496 "lowPtTripletStepClassifier2",
1498 "lowPtTripletStepSelector"]),
1500 seeding=[
"pixelPairStepSeedLayers",
1501 "pixelPairStepSeedLayersB",
1502 "pixelPairStepSeedLayersC",
1503 "pixelPairStepTrackingRegions",
1504 "pixelPairStepTrackingRegionsB",
1505 "pixelPairStepTrackingRegionsC",
1506 "pixelPairStepTrackingRegionsSeedLayersB",
1507 "pixelPairStepHitDoublets",
1508 "pixelPairStepHitDoubletsB",
1509 "pixelPairStepHitDoubletsC",
1510 "pixelPairStepSeedsA",
1511 "pixelPairStepSeedsB",
1512 "pixelPairStepSeedsC",
1513 "pixelPairStepSeeds",],
1514 selection=[
"pixelPairStep",
1515 "pixelPairStepSelector"]),
1517 seeding=[
"mixedTripletStepSeedLayersA",
1518 "mixedTripletStepSeedLayersB",
1519 "mixedTripletStepTrackingRegionsA",
1520 "mixedTripletStepTrackingRegionsB",
1521 "mixedTripletStepHitDoubletsA",
1522 "mixedTripletStepHitDoubletsB",
1523 "mixedTripletStepHitTripletsA",
1524 "mixedTripletStepHitTripletsB",
1525 "mixedTripletStepSeedsA",
1526 "mixedTripletStepSeedsB",
1527 "mixedTripletStepSeeds"],
1528 selection=[
"mixedTripletStepClassifier1",
1529 "mixedTripletStepClassifier2",
1531 "mixedTripletStepSelector"]),
1533 selection=[
"pixelLessStepClassifier1",
1534 "pixelLessStepClassifier2",
1536 "pixelLessStepSelector"]),
1538 seeding=[
"tobTecStepSeedLayersTripl",
1539 "tobTecStepSeedLayersPair",
1540 "tobTecStepTrackingRegionsTripl",
1541 "tobTecStepTrackingRegionsPair",
1542 "tobTecStepHitDoubletsTripl",
1543 "tobTecStepHitDoubletsPair",
1544 "tobTecStepHitTripletsTripl",
1545 "tobTecStepSeedsTripl",
1546 "tobTecStepSeedsPair",
1548 selection=[
"tobTecStepClassifier1",
1549 "tobTecStepClassifier2",
1551 "tobTecStepSelector"]),
1554 other=[
"jetsForCoreTracking",
1555 "firstStepGoodPrimaryVertices",
1559 seeding=[
"muonSeededSeedsInOut",
1560 "muonSeededSeedsOutIn"],
1561 building=[
"muonSeededTrackCandidatesInOut",
1562 "muonSeededTrackCandidatesOutIn"],
1563 fit=[
"muonSeededTracksInOut",
1564 "muonSeededTracksOutIn"],
1565 selection=[
"muonSeededTracksInOutClassifier",
1566 "muonSeededTracksInOutSelector",
1567 "muonSeededTracksOutIntClassifier",
1568 "muonSeededTracksOutIntSelector"],
1572 clusterMasking=[], seeding=[],
1573 building=[
"duplicateTrackCandidates"],
1574 fit=[
"mergedDuplicateTracks"],
1575 selection=[
"duplicateTrackClassifier"]),
1577 clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1578 other=[
"preDuplicateMergingGeneralTracks",
1581 clusterMasking=[
"convClusters"],
1582 seeding=[
"convLayerPairs",
1583 "photonConvTrajSeedFromSingleLeg"],
1584 building=[
"convTrackCandidates"],
1585 fit=[
"convStepTracks"],
1586 selection=[
"convStepSelector"]),
1587 Iteration(
"Other", clusterMasking=[], seeding=[], building=[], fit=[], selection=[],
1588 other=[
"trackerClusterCheckPreSplitting",
1589 "trackerClusterCheck"]),
1593 iterations = _iterations
1594 if not includeConvStep:
1595 iterations = [i
for i
in iterations
if i.name() !=
"ConvStep"]
1597 iterations = [i
for i
in iterations
if i.name() ==
"ConvStep"]
1598 return collections.OrderedDict([(i.name(), i.all())
for i
in iterations])
1602 for i
in _iterations:
1603 if i.name() ==
"ConvStep":
1605 ret.extend(getattr(i, prop)())
1608 return collections.OrderedDict([
1609 (
"ClusterMask", getProp(
"clusterMasking")),
1610 (
"Seeding", getProp(
"seeding")),
1611 (
"Building", getProp(
"building")),
1612 (
"Fitting", getProp(
"fit")),
1613 (
"Selection", getProp(
"selection")),
1614 (
"Other", getProp(
"other"))
1633 if eventsTh1
is None:
1635 nevents = eventsTh1.GetEntries()
1639 ret = timeTh1.Clone(self.
_name)
1640 xaxis = ret.GetXaxis()
1641 for i
in range(1, ret.GetNbinsX()+1):
1642 ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1643 ret.SetBinError(i, ret.GetBinError(i)/nevents)
1644 xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).
replace(
" (unscheduled)",
""))
1648 path = tdirectory.GetPath()
1649 if path
not in self.
_cache:
1654 def __init__(self, name, timeHisto, selectedTracks=False):
1664 tdir = tfile.Get(dirName)
1676 tfile = tdirectory.GetFile()
1681 iterMap = copy.copy(_collLabelMapHp)
1682 del iterMap[
"generalTracks"]
1683 del iterMap[
"jetCoreRegionalStep"]
1685 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
True, byOriginalAlgo=
False, byAlgoMask=
True, ptCut=
False, seeds=
False)
1687 renameBin =
lambda bl:
_summaryBinRename(bl, highPurity=
False, byOriginalAlgo=
False, byAlgoMask=
False, ptCut=
False, seeds=
False)
1688 recoAB =
AggregateBins(
"tmp",
"num_reco_coll", mapping=iterMap,ignoreMissingBins=
True, renameBin=renameBin)
1689 h_reco_per_iter = recoAB.create(trkDir)
1690 if h_reco_per_iter
is None:
1693 for i
in range(1, h_reco_per_iter.GetNbinsX()+1):
1694 values[h_reco_per_iter.GetXaxis().GetBinLabel(i)] = h_reco_per_iter.GetBinContent(i)
1698 for i
in range(1, timeTh1.GetNbinsX()+1):
1699 iterName = timeTh1.GetXaxis().GetBinLabel(i)
1700 if iterName
in values:
1701 ntrk = values[iterName]
1702 result.append( (iterName,
1703 timeTh1.GetBinContent(i)/ntrk
if ntrk > 0
else 0,
1704 timeTh1.GetBinError(i)/ntrk
if ntrk > 0
else 0) )
1706 if len(result) == 0:
1709 res = ROOT.TH1F(self.
_name, self.
_name, len(result), 0, len(result))
1710 for i, (label, value, error)
in enumerate(result):
1711 res.GetXaxis().SetBinLabel(i+1, label)
1712 res.SetBinContent(i+1, value)
1713 res.SetBinError(i+1, error)
1722 h = f.Get(_trackingIterationOrderHistogram)
1725 xaxis = h.GetXaxis()
1729 return s.replace(
"Tracks",
"").
replace(
"muonSeeded",
"muonSeededStep")
1730 return [_edit(xaxis.GetBinLabel(i))
for i
in range(1, h.GetNbinsX()+1)]
1733 ret =
list(range(0, len(labels)))
1734 f = tdirectory.GetFile()
1738 if not f.GetName()
in self.
_cache:
1742 self.
_cache[f.GetName()] = r
1743 order = self.
_cache[f.GetName()]
1749 orderIndices.append(labels.index(l))
1753 for i, l
in enumerate(labels):
1756 found = orderIndices.index(i)
1760 ret.append(orderIndices[0])
1762 ret.append(orderIndices[0])
1787 h = tdirectory.Get(histo)
1790 totalReco =
"%.1f" % h.Integral()
1793 h = creator.create(tdirectory)
1794 totalTracking =
None 1796 totalTracking =
"%.1f" % h.Integral()
1799 h = creator.create(tdirectory)
1800 totalConvStep =
None 1802 totalConvStep =
"%.1f" % h.Integral()
1811 cpuValues = self.
_getValues(tdirectory, _time_per_event_cpu)
1812 realValues = self.
_getValues(tdirectory, _time_per_event_real)
1814 return cpuValues + realValues
1818 "Average reco CPU time / event (ms)",
1819 "Average tracking (w/o convStep) CPU time / event (ms)",
1820 "Average convStep CPU time / event (ms)",
1821 "Average reco real time / event (ms)",
1822 "Average tracking (w/o convStep) real time / event (ms)",
1823 "Average convStep real time / event (ms)",
1828 "xbinlabelsize": 10,
1829 "xbinlabeloption":
"d" 1837 Plot(_time_per_iter_cpu,
1838 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", legendDx=-0.4, **_common),
1840 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1843 ytitle=
"Average CPU time (ms)", title=
"Average CPU time / event", **_common),
1845 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1848 ytitle=
"Average CPU time / built track (ms)", title=
"Average CPU time / built track", **_common),
1850 ytitle=
"Average CPU time / selected track (ms)", title=
"Average CPU time / selected HP track by algoMask", **_common),
1854 Plot(_time_per_iter_real,
1855 ytitle=
"Average real time (ms)", title=
"Average real time / event", legendDx=-0.4, **_common),
1857 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1860 ytitle=
"Average real time (ms)", title=
"Average real time / event", **_common),
1862 ytitle=
"Fraction", title=
"", normalizeToUnitArea=
True, **_common),
1865 ytitle=
"Average real time / built track (ms)", title=
"Average real time / built track", **_common),
1867 ytitle=
"Average real time / selected track (ms)", title=
"Average real time / selected HP track by algoMask", **_common),
1872 Plot(
AggregateBins(i.name(), _time_per_event_cpu, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1873 ytitle=
"Average CPU time (ms)", title=i.name(), **_common)
1874 for i
in _iterations
1876 ncols=4, legend=
False 1879 Plot(
AggregateBins(i.name(), _time_per_event_real, collections.OrderedDict(i.modules()), ignoreMissingBins=
True),
1880 ytitle=
"Average real time (ms)", title=i.name(), **_common)
1881 for i
in _iterations
1883 ncols=4, legend=
False 1893 "DQMData/Run 1/DQM/Run summary/TimerService/process RECO paths/path prevalidation_step",
1896 timePlotter.append(
"timing", _timeFolders,
PlotFolder(
1898 _timing_iterationsCPU,
1899 _timing_summaryReal,
1900 _timing_iterationsReal,
1906 _common = {
"stat":
True,
"normalizeToUnitArea":
True,
"drawStyle":
"hist"}
1908 Plot(
"TPlip", xtitle=
"TP lip", **_common),
1909 Plot(
"TPtip", xtitle=
"TP tip", **_common),
1913 tpPlotter.append(
"tp", [
1914 "DQMData/Run 1/Tracking/Run summary/TrackingMCTruth/TrackingParticle",
1915 "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 _trackingSubFoldersFallbackPreSplitting(subfolder)
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, building=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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def _th1IncludeOnlyBins(histos, xbinlabels)
def _getValues(self, tdirectory, histo)