36 drawArgs[
"ratio"] =
False
38 drawArgs[
"separate"] =
True
40 drawArgs[
"saveFormat"] =
".png"
44 plotting.verbose =
True
46 filenames = [(f, f.replace(
".root",
""))
for f
in opts.files]
47 sample = SimpleSample(opts.subdirprefix[0], opts.html_sample, filenames)
49 val = SimpleValidation([sample], opts.outputDir[0])
51 val = SeparateValidation([sample], opts.outputDir[0])
52 htmlReport = val.createHtmlReport(validationName=opts.html_validation_name[0])
56 hgclayclus = [hgcalPlots.hgcalLayerClustersPlotter]
58 val.doPlots(hgclayclus, plotterDrawArgs=drawArgs)
62 hgcsimclus = [hgcalPlots.hgcalSimClustersPlotter]
63 for i_iter
in simClustersIters:
65 val.doPlots(hgcsimclus, plotterDrawArgs=drawArgs)
69 hgctrackster = [hgcalPlots.hgcalTrackstersPlotter]
70 for tracksterCollection
in trackstersIters :
72 val.doPlots(hgctrackster, plotterDrawArgs=drawArgs)
77 for tracksterCollection
in trackstersIters :
79 val.doPlots(hgctracksters, plotterDrawArgs=drawArgs)
83 particletypes = {
"pion-":
"-211",
"pion+":
"211",
"pion0":
"111",
84 "muon-":
"-13",
"muon+":
"13",
85 "electron-":
"-11",
"electron+":
"11",
"photon":
"22",
86 "kaon0L":
"310",
"kaon0S":
"130",
87 "kaon-":
"-321",
"kaon+":
"321"}
88 hgcaloPart = [hgcalPlots.hgcalCaloParticlesPlotter]
89 for i_part, i_partID
in particletypes.items() :
91 val.doPlots(hgcaloPart, plotterDrawArgs=drawArgs)
95 hgchit = [hgcalPlots.hgcalHitPlotter]
99 val.doPlots(hgchit, plotterDrawArgs=drawArgs)
103 hgchitcalib = [hgcalPlots.hgcalHitCalibPlotter]
104 val.doPlots(hgchitcalib, plotterDrawArgs=drawArgs)
107 plotDict = {hitCalLabel:[plot_hitCal], hitValLabel:[plot_hitVal], layerClustersLabel:[plot_LC], trackstersLabel:[plot_Tst], trackstersWithEdgesLabel:[plot_TstEdges], simLabel:[plot_SC, plot_CP]}
109 if (opts.collection != allLabel):
110 for task
in plotDict[opts.collection]:
113 for label
in plotDict:
114 if (label == trackstersLabel):
continue
115 for task
in plotDict[label]:
119 print(
"Plots created into directory '%s'." % opts.outputDir)
123 print(
"Plots and HTML report created into directory '%s'. You can just move it to some www area and access the pages via web browser" % (
','.
join(opts.outputDir)))