CMS 3D CMS Logo

hgcalPlots.py
Go to the documentation of this file.
1 from __future__ import print_function
2 import os
3 import sys
4 import copy
5 import collections
6 
7 import six
8 import ROOT
9 from ROOT import TFile
10 from ROOT import gDirectory
11 ROOT.gROOT.SetBatch(True)
12 ROOT.PyConfig.IgnoreCommandLineOptions = True
13 
14 from Validation.RecoTrack.plotting.plotting import Plot, PlotGroup, PlotFolder, Plotter, PlotOnSideGroup
15 from Validation.RecoTrack.plotting.html import PlotPurpose
16 import Validation.RecoTrack.plotting.plotting as plotting
17 import Validation.RecoTrack.plotting.validation as validation
18 import Validation.RecoTrack.plotting.html as html
19 
20 #To be able to spot any issues both in -z and +z a layer id was introduced
21 #that spans from 0 to 103 for hgcal_v9 geometry. The mapping for hgcal_v9 is:
22 #-z: 0->51
23 #+z: 52->103
24 #while for V10 is:
25 #-z: 0->49
26 #+z: 50->99
27 '''
28 layerscheme = { 'lastLayerEEzm': 0, 'lastLayerFHzm': 0, 'maxlayerzm': 0, 'lastLayerEEzp': 0, 'lastLayerFHzp': 0, 'maxlayerzp': 0 }
29 
30 #Let's take the relevant values of layerscheme from the dqm file.
31 theDQMfile = "DQM_V0001_R000000001__Global__CMSSW_X_Y_Z__RECO.root"
32 if not os.path.isfile(theDQMfile):
33  print("Error: file", theDQMfile, "not found, exit")
34  sys.exit(0)
35 
36 
37 #Take general info from the first file is sufficient.
38 thefile = TFile( theDQMfile )
39 GeneralInfoDirectory = 'DQMData/Run 1/HGCAL/Run summary/HGCalValidator/GeneralInfo'
40 
41 if not gDirectory.GetDirectory( GeneralInfoDirectory ):
42  print("Error: GeneralInfo directory not found in DQM file, exit")
43  sys.exit(0)
44 
45 keys = gDirectory.GetDirectory( GeneralInfoDirectory ).GetListOfKeys()
46 key = keys[0]
47 layvalue = 0
48 while key:
49  obj = key.ReadObj()
50  for laykey in layerscheme.keys():
51  if laykey in obj.GetName():
52  layvalue = obj.GetName()[len("<"+laykey+">i="):-len("</"+laykey+">")]
53  layerscheme[laykey] = layvalue
54  #print(layvalue)
55  key = keys.After(key)
56 
57 thefile.Close()
58 
59 print(layerscheme)
60 #TODO: Anticipating the fine/coarse layer information in CMSSW we overwrite values from DQM file
61 #For now values returned for
62 # 'lastLayerFHzp': '104', 'lastLayerFHzm': '52'
63 #are not the one expected. Will come back to this when there will be info in CMSSW to put in DQM file.
64 #For V9:
65 #layerscheme = { 'lastLayerEEzm': 28, 'lastLayerFHzm': 40, 'maxlayerzm': 52, 'lastLayerEEzp': 80, 'lastLayerFHzp': 92, 'maxlayerzp': 104 }
66 #For V10:
67 '''
68 layerscheme = { 'lastLayerEEzm': 28, 'lastLayerFHzm': 40, 'maxlayerzm': 50, 'lastLayerEEzp': 78, 'lastLayerFHzp': 90, 'maxlayerzp': 100 }
69 #print(layerscheme)
70 
71 lastLayerEEzm = layerscheme['lastLayerEEzm'] # last layer of EE -z
72 lastLayerFHzm = layerscheme['lastLayerFHzm'] # last layer of FH -z
73 maxlayerzm = layerscheme['maxlayerzm'] # last layer of BH -z
74 lastLayerEEzp = layerscheme['lastLayerEEzp'] # last layer of EE +z
75 lastLayerFHzp = layerscheme['lastLayerFHzp'] # last layer of FH +z
76 maxlayerzp = layerscheme['maxlayerzp'] # last layer of BH +z
77 
78 hitlayerscheme = { 'EE_min': 1,'EE_max': 28, 'HESilicon_min': 1, 'HESilicon_max': 22, 'HEScintillator_min': 9 , 'HEScintillator_max': 22 }
79 #print(hitlayerscheme)
80 
81 EE_min = hitlayerscheme['EE_min']
82 EE_max = hitlayerscheme['EE_max']
83 HESilicon_min = hitlayerscheme['HESilicon_min']
84 HESilicon_max = hitlayerscheme['HESilicon_max']
85 HEScintillator_min = hitlayerscheme['HEScintillator_min']
86 HEScintillator_max = hitlayerscheme['HEScintillator_max']
87 
88 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
89 _legend_common = {"legendDx": -0.3,
90  "legendDy": -0.05,
91  "legendDw": 0.1}
92 
93 _SelectedCaloParticles = PlotGroup("SelectedCaloParticles", [
94  Plot("num_caloparticle_eta", xtitle="", **_common),
95  Plot("caloparticle_energy", xtitle="", **_common),
96  Plot("caloparticle_pt", xtitle="", **_common),
97  Plot("caloparticle_phi", xtitle="", **_common),
98  Plot("Eta vs Zorigin", xtitle="", **_common),
99  ])
100 
101 #Need to adjust the statbox to see better the plot
102 _common = {"stat": True, "drawStyle": "hist", "statx": 0.38, "staty": 0.68 }
103 _num_reco_cluster_eta = PlotGroup("num_reco_cluster_eta", [
104  Plot("num_reco_cluster_eta", xtitle="", **_common),
105 ],ncols=1)
106 #Back to normal
107 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
108 
109 _mixedhitsclusters = PlotGroup("mixedhitsclusters", [
110  Plot("mixedhitscluster_zminus", xtitle="", **_common),
111  Plot("mixedhitscluster_zplus", xtitle="", **_common),
112 ],ncols=2)
113 
114 #Just to prevent the stabox covering the plot
115 _common = {"stat": True, "drawStyle": "hist", "statx": 0.45, "staty": 0.65 }
116 
117 _energyclustered = PlotGroup("energyclustered", [
118  Plot("energyclustered_zminus", xtitle="", **_common),
119  Plot("energyclustered_zplus", xtitle="", **_common),
120 ],ncols=2)
121 
122 #Coming back to the usual box definition
123 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
124 
125 _longdepthbarycentre = PlotGroup("longdepthbarycentre", [
126  Plot("longdepthbarycentre_zminus", xtitle="", **_common),
127  Plot("longdepthbarycentre_zplus", xtitle="", **_common),
128 ],ncols=2)
129 
130 _common_layerperthickness = {}
131 _common_layerperthickness.update(_common)
132 _common_layerperthickness['xmin'] = 0.
133 _common_layerperthickness['xmax'] = 100
134 
135 _totclusternum_thick = PlotGroup("totclusternum_thick", [
136  Plot("totclusternum_thick_120", xtitle="", **_common_layerperthickness),
137  Plot("totclusternum_thick_200", xtitle="", **_common_layerperthickness),
138  Plot("totclusternum_thick_300", xtitle="", **_common_layerperthickness),
139  Plot("totclusternum_thick_-1", xtitle="", **_common_layerperthickness),
140  Plot("mixedhitscluster", xtitle="", **_common_layerperthickness),
141 ])
142 
143 #We will plot the density in logy scale.
144 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65, "ylog": True}
145 
146 _cellsenedens_thick = PlotGroup("cellsenedens_thick", [
147  Plot("cellsenedens_thick_120", xtitle="", **_common),
148  Plot("cellsenedens_thick_200", xtitle="", **_common),
149  Plot("cellsenedens_thick_300", xtitle="", **_common),
150  Plot("cellsenedens_thick_-1", xtitle="", **_common),
151 ])
152 
153 #Coming back to the usual box definition
154 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
155 
156 
157 #--------------------------------------------------------------------------------------------
158 # z-
159 #--------------------------------------------------------------------------------------------
160 _totclusternum_layer_EE_zminus = PlotGroup("totclusternum_layer_EE", [
161  Plot("totclusternum_layer_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
162 ], ncols=7)
163 
164 _totclusternum_layer_FH_zminus = PlotGroup("totclusternum_layer_FH", [
165  Plot("totclusternum_layer_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
166 ], ncols=7)
167 
168 _totclusternum_layer_BH_zminus = PlotGroup("totclusternum_layer_BH", [
169  Plot("totclusternum_layer_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
170 ], ncols=7)
171 
172 _energyclustered_perlayer_EE_zminus = PlotGroup("energyclustered_perlayer_EE", [
173  Plot("energyclustered_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
174 ], ncols=7)
175 
176 _energyclustered_perlayer_FH_zminus = PlotGroup("energyclustered_perlayer_FH", [
177  Plot("energyclustered_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
178 ], ncols=7)
179 
180 _energyclustered_perlayer_BH_zminus = PlotGroup("energyclustered_perlayer_BH", [
181  Plot("energyclustered_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
182 ], ncols=7)
183 
184 #----------------------------------------------------------------------------------------------------------------
185 #120 um
186 _common_cells = {}
187 _common_cells.update(_common)
188 _common_cells["xmin"] = 0
189 _common_cells["xmax"] = 50
190 _common_cells["ymin"] = 0.1
191 _common_cells["ymax"] = 10000
192 _common_cells["ylog"] = True
193 _cellsnum_perthick_perlayer_120_EE_zminus = PlotGroup("cellsnum_perthick_perlayer_120_EE", [
194  Plot("cellsnum_perthick_perlayer_120_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm)
195 ], ncols=7)
196 
197 _cellsnum_perthick_perlayer_120_FH_zminus = PlotGroup("cellsnum_perthick_perlayer_120_FH", [
198  Plot("cellsnum_perthick_perlayer_120_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm,lastLayerFHzm)
199 ], ncols=7)
200 
201 _cellsnum_perthick_perlayer_120_BH_zminus = PlotGroup("cellsnum_perthick_perlayer_120_BH", [
202  Plot("cellsnum_perthick_perlayer_120_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzm,maxlayerzm)
203 ], ncols=7)
204 
205 #200 um
206 _cellsnum_perthick_perlayer_200_EE_zminus = PlotGroup("cellsnum_perthick_perlayer_200_EE", [
207  Plot("cellsnum_perthick_perlayer_200_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm)
208 ], ncols=7)
209 
210 _cellsnum_perthick_perlayer_200_FH_zminus = PlotGroup("cellsnum_perthick_perlayer_200_FH", [
211  Plot("cellsnum_perthick_perlayer_200_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm,lastLayerFHzm)
212 ], ncols=7)
213 
214 _cellsnum_perthick_perlayer_200_BH_zminus = PlotGroup("cellsnum_perthick_perlayer_200_BH", [
215  Plot("cellsnum_perthick_perlayer_200_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzm,maxlayerzm)
216 ], ncols=7)
217 
218 #300 um
219 _cellsnum_perthick_perlayer_300_EE_zminus = PlotGroup("cellsnum_perthick_perlayer_300_EE", [
220  Plot("cellsnum_perthick_perlayer_300_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm)
221 ], ncols=7)
222 
223 _cellsnum_perthick_perlayer_300_FH_zminus = PlotGroup("cellsnum_perthick_perlayer_300_FH", [
224  Plot("cellsnum_perthick_perlayer_300_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm,lastLayerFHzm)
225 ], ncols=7)
226 
227 _cellsnum_perthick_perlayer_300_BH_zminus = PlotGroup("cellsnum_perthick_perlayer_300_BH", [
228  Plot("cellsnum_perthick_perlayer_300_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzm,maxlayerzm)
229 ], ncols=7)
230 
231 #scint um
232 _cellsnum_perthick_perlayer_scint_EE_zminus = PlotGroup("cellsnum_perthick_perlayer_Sci_EE", [
233  Plot("cellsnum_perthick_perlayer_-1_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm)
234 ], ncols=7)
235 
236 _cellsnum_perthick_perlayer_scint_FH_zminus = PlotGroup("cellsnum_perthick_perlayer_Sci_FH", [
237  Plot("cellsnum_perthick_perlayer_-1_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzm,lastLayerFHzm)
238 ], ncols=7)
239 
240 _cellsnum_perthick_perlayer_scint_BH_zminus = PlotGroup("cellsnum_perthick_perlayer_Sci_BH", [
241  Plot("cellsnum_perthick_perlayer_-1_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzm,maxlayerzm)
242 ], ncols=7)
243 
244 #----------------------------------------------------------------------------------------------------------------
245 #120 um
246 _common_distance = {}
247 _common_distance.update(_common)
248 _common_distance.update(_legend_common)
249 _common_distance["xmax"] = 150
250 _common_distance["stat"] = False
251 _common_distance["ymin"] = 1e-3
252 _common_distance["ymax"] = 10000
253 _common_distance["ylog"] = True
254 
255 _distancetomaxcell_perthickperlayer_120_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_120_EE", [
256  Plot("distancetomaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
257 ], ncols=7)
258 
259 _distancetomaxcell_perthickperlayer_120_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_120_FH", [
260  Plot("distancetomaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
261 ], ncols=7)
262 
263 _distancetomaxcell_perthickperlayer_120_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_120_BH", [
264  Plot("distancetomaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
265 ], ncols=7)
266 
267 #200 um
268 _distancetomaxcell_perthickperlayer_200_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_200_EE", [
269  Plot("distancetomaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
270 ], ncols=7)
271 
272 _distancetomaxcell_perthickperlayer_200_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_200_FH", [
273  Plot("distancetomaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
274 ], ncols=7)
275 
276 _distancetomaxcell_perthickperlayer_200_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_200_BH", [
277  Plot("distancetomaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
278 ], ncols=7)
279 
280 #300 um
281 _distancetomaxcell_perthickperlayer_300_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_300_EE", [
282  Plot("distancetomaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
283 ], ncols=7)
284 
285 _distancetomaxcell_perthickperlayer_300_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_300_FH", [
286  Plot("distancetomaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
287 ], ncols=7)
288 
289 _distancetomaxcell_perthickperlayer_300_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_300_BH", [
290  Plot("distancetomaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
291 ], ncols=7)
292 
293 #scint um
294 _distancetomaxcell_perthickperlayer_scint_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_Sci_EE", [
295  Plot("distancetomaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
296 ], ncols=7)
297 
298 _distancetomaxcell_perthickperlayer_scint_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_Sci_FH", [
299  Plot("distancetomaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
300 ], ncols=7)
301 
302 _distancetomaxcell_perthickperlayer_scint_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_Sci_BH", [
303  Plot("distancetomaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
304 ], ncols=7)
305 
306 #----------------------------------------------------------------------------------------------------------------
307 #120 um
308 _distancebetseedandmaxcell_perthickperlayer_120_EE_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_120_EE", [
309  Plot("distancebetseedandmaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
310 ], ncols=7)
311 
312 _distancebetseedandmaxcell_perthickperlayer_120_FH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_120_FH", [
313  Plot("distancebetseedandmaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
314 ], ncols=7)
315 
316 _distancebetseedandmaxcell_perthickperlayer_120_BH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_120_BH", [
317  Plot("distancebetseedandmaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
318 ], ncols=7)
319 
320 #200 um
321 _distancebetseedandmaxcell_perthickperlayer_200_EE_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_200_EE", [
322  Plot("distancebetseedandmaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
323 ], ncols=7)
324 
325 _distancebetseedandmaxcell_perthickperlayer_200_FH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_200_FH", [
326  Plot("distancebetseedandmaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
327 ], ncols=7)
328 
329 _distancebetseedandmaxcell_perthickperlayer_200_BH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_200_BH", [
330  Plot("distancebetseedandmaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
331 ], ncols=7)
332 
333 #300 um
334 _distancebetseedandmaxcell_perthickperlayer_300_EE_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_300_EE", [
335  Plot("distancebetseedandmaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
336 ], ncols=7)
337 
338 _distancebetseedandmaxcell_perthickperlayer_300_FH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_300_FH", [
339  Plot("distancebetseedandmaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
340 ], ncols=7)
341 
342 _distancebetseedandmaxcell_perthickperlayer_300_BH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_300_BH", [
343  Plot("distancebetseedandmaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
344 ], ncols=7)
345 
346 #scint um
347 _distancebetseedandmaxcell_perthickperlayer_scint_EE_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_Sci_EE", [
348  Plot("distancebetseedandmaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
349 ], ncols=7)
350 
351 _distancebetseedandmaxcell_perthickperlayer_scint_FH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_Sci_FH", [
352  Plot("distancebetseedandmaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
353 ], ncols=7)
354 
355 _distancebetseedandmaxcell_perthickperlayer_scint_BH_zminus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_Sci_BH", [
356  Plot("distancebetseedandmaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
357 ], ncols=7)
358 
359 #----------------------------------------------------------------------------------------------------------------
360 #120 um
361 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_EE_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_EE", [
362  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
363 ], ncols=7)
364 
365 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_FH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_FH", [
366  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
367 ], ncols=7)
368 
369 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_BH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_BH", [
370  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
371 ], ncols=7)
372 
373 #200 um
374 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_EE_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_EE", [
375  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
376 ], ncols=7)
377 
378 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_FH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_FH", [
379  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
380 ], ncols=7)
381 
382 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_BH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_BH", [
383  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
384 ], ncols=7)
385 
386 #300 um
387 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_EE_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_EE", [
388  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
389 ], ncols=7)
390 
391 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_FH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_FH", [
392  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
393 ], ncols=7)
394 
395 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_BH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_BH", [
396  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
397 ], ncols=7)
398 
399 #scint um
400 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_EE_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_Sci_EE", [
401  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
402 ], ncols=7)
403 
404 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_FH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_Sci_FH", [
405  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
406 ], ncols=7)
407 
408 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_BH_zminus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_Sci_BH", [
409  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
410 ], ncols=7)
411 
412 #----------------------------------------------------------------------------------------------------------------
413 #120 um
414 _distancetoseedcell_perthickperlayer_120_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_120_EE", [
415  Plot("distancetoseedcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
416 ], ncols=7)
417 
418 _distancetoseedcell_perthickperlayer_120_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_120_FH", [
419  Plot("distancetoseedcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
420 ], ncols=7)
421 
422 _distancetoseedcell_perthickperlayer_120_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_120_BH", [
423  Plot("distancetoseedcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
424 ], ncols=7)
425 
426 #200 um
427 _distancetoseedcell_perthickperlayer_200_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_200_EE", [
428  Plot("distancetoseedcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
429 ], ncols=7)
430 
431 _distancetoseedcell_perthickperlayer_200_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_200_FH", [
432  Plot("distancetoseedcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
433 ], ncols=7)
434 
435 _distancetoseedcell_perthickperlayer_200_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_200_BH", [
436  Plot("distancetoseedcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
437 ], ncols=7)
438 
439 #300 um
440 _distancetoseedcell_perthickperlayer_300_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_300_EE", [
441  Plot("distancetoseedcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
442 ], ncols=7)
443 
444 _distancetoseedcell_perthickperlayer_300_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_300_FH", [
445  Plot("distancetoseedcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
446 ], ncols=7)
447 
448 _distancetoseedcell_perthickperlayer_300_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_300_BH", [
449  Plot("distancetoseedcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
450 ], ncols=7)
451 
452 #scint um
453 _distancetoseedcell_perthickperlayer_scint_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_Sci_EE", [
454  Plot("distancetoseedcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
455 ], ncols=7)
456 
457 _distancetoseedcell_perthickperlayer_scint_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_Sci_FH", [
458  Plot("distancetoseedcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
459 ], ncols=7)
460 
461 _distancetoseedcell_perthickperlayer_scint_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_Sci_BH", [
462  Plot("distancetoseedcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
463 ], ncols=7)
464 
465 #=====================================================================================================================
466 #----------------------------------------------------------------------------------------------------------------
467 #We need points for the weighted plots
468 _common = {"stat": True, "drawStyle": "EP", "staty": 0.65 }
469 #120 um
470 _distancetomaxcell_perthickperlayer_eneweighted_120_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_120_EE", [
471  Plot("distancetomaxcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
472 ], ncols=7)
473 
474 _distancetomaxcell_perthickperlayer_eneweighted_120_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_120_FH", [
475  Plot("distancetomaxcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
476 ], ncols=7)
477 
478 _distancetomaxcell_perthickperlayer_eneweighted_120_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_120_BH", [
479  Plot("distancetomaxcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
480 ], ncols=7)
481 
482 #200 um
483 _distancetomaxcell_perthickperlayer_eneweighted_200_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_200_EE", [
484  Plot("distancetomaxcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
485 ], ncols=7)
486 
487 _distancetomaxcell_perthickperlayer_eneweighted_200_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_200_FH", [
488  Plot("distancetomaxcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
489 ], ncols=7)
490 
491 _distancetomaxcell_perthickperlayer_eneweighted_200_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_200_BH", [
492  Plot("distancetomaxcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
493 ], ncols=7)
494 
495 #300 um
496 _distancetomaxcell_perthickperlayer_eneweighted_300_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_300_EE", [
497  Plot("distancetomaxcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
498 ], ncols=7)
499 
500 _distancetomaxcell_perthickperlayer_eneweighted_300_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_300_FH", [
501  Plot("distancetomaxcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
502 ], ncols=7)
503 
504 _distancetomaxcell_perthickperlayer_eneweighted_300_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_300_BH", [
505  Plot("distancetomaxcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
506 ], ncols=7)
507 #scint um
508 _distancetomaxcell_perthickperlayer_eneweighted_scint_EE_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_Sci_EE", [
509  Plot("distancetomaxcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
510 ], ncols=7)
511 
512 _distancetomaxcell_perthickperlayer_eneweighted_scint_FH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_Sci_FH", [
513  Plot("distancetomaxcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
514 ], ncols=7)
515 
516 _distancetomaxcell_perthickperlayer_eneweighted_scint_BH_zminus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_Sci_BH", [
517  Plot("distancetomaxcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
518 ], ncols=7)
519 
520 
521 #----------------------------------------------------------------------------------------------------------------
522 #120 um
523 _distancetoseedcell_perthickperlayer_eneweighted_120_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_120_EE", [
524  Plot("distancetoseedcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
525 ], ncols=7)
526 
527 _distancetoseedcell_perthickperlayer_eneweighted_120_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_120_FH", [
528  Plot("distancetoseedcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
529 ], ncols=7)
530 
531 _distancetoseedcell_perthickperlayer_eneweighted_120_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_120_BH", [
532  Plot("distancetoseedcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
533 ], ncols=7)
534 
535 #200 um
536 _distancetoseedcell_perthickperlayer_eneweighted_200_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_200_EE", [
537  Plot("distancetoseedcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
538 ], ncols=7)
539 
540 _distancetoseedcell_perthickperlayer_eneweighted_200_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_200_FH", [
541  Plot("distancetoseedcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
542 ], ncols=7)
543 
544 _distancetoseedcell_perthickperlayer_eneweighted_200_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_200_BH", [
545  Plot("distancetoseedcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
546 ], ncols=7)
547 
548 #300 um
549 _distancetoseedcell_perthickperlayer_eneweighted_300_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_300_EE", [
550  Plot("distancetoseedcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
551 ], ncols=7)
552 
553 _distancetoseedcell_perthickperlayer_eneweighted_300_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_300_FH", [
554  Plot("distancetoseedcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
555 ], ncols=7)
556 
557 _distancetoseedcell_perthickperlayer_eneweighted_300_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_300_BH", [
558  Plot("distancetoseedcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
559 ], ncols=7)
560 
561 #scint um
562 _distancetoseedcell_perthickperlayer_eneweighted_scint_EE_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_Sci_EE", [
563  Plot("distancetoseedcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
564 ], ncols=7)
565 
566 _distancetoseedcell_perthickperlayer_eneweighted_scint_FH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_Sci_FH", [
567  Plot("distancetoseedcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
568 ], ncols=7)
569 
570 _distancetoseedcell_perthickperlayer_eneweighted_scint_BH_zminus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_Sci_BH", [
571  Plot("distancetoseedcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
572 ], ncols=7)
573 
574 #Coming back to the usual definition
575 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
576 
577 #--------------------------------------------------------------------------------------------
578 # z+
579 #--------------------------------------------------------------------------------------------
580 _totclusternum_layer_EE_zplus = PlotGroup("totclusternum_layer_EE", [
581  Plot("totclusternum_layer_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
582 ], ncols=7)
583 
584 _totclusternum_layer_FH_zplus = PlotGroup("totclusternum_layer_FH", [
585  Plot("totclusternum_layer_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
586 ], ncols=7)
587 
588 _totclusternum_layer_BH_zplus = PlotGroup("totclusternum_layer_BH", [
589  Plot("totclusternum_layer_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
590 ], ncols=7)
591 
592 _energyclustered_perlayer_EE_zplus = PlotGroup("energyclustered_perlayer_EE", [
593  Plot("energyclustered_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
594 ], ncols=7)
595 
596 _energyclustered_perlayer_FH_zplus = PlotGroup("energyclustered_perlayer_FH", [
597  Plot("energyclustered_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
598 ], ncols=7)
599 
600 _energyclustered_perlayer_BH_zplus = PlotGroup("energyclustered_perlayer_BH", [
601  Plot("energyclustered_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
602 ], ncols=7)
603 
604 #----------------------------------------------------------------------------------------------------------------
605 #120 um
606 _cellsnum_perthick_perlayer_120_EE_zplus = PlotGroup("cellsnum_perthick_perlayer_120_EE", [
607  Plot("cellsnum_perthick_perlayer_120_{:02d}".format(i), xtitle="", **_common_cells) for i in range(maxlayerzm,lastLayerEEzp)
608 ], ncols=7)
609 
610 _cellsnum_perthick_perlayer_120_FH_zplus = PlotGroup("cellsnum_perthick_perlayer_120_FH", [
611  Plot("cellsnum_perthick_perlayer_120_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzp,lastLayerFHzp)
612 ], ncols=7)
613 _cellsnum_perthick_perlayer_120_BH_zplus = PlotGroup("cellsnum_perthick_perlayer_120_BH", [
614  Plot("cellsnum_perthick_perlayer_120_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzp,maxlayerzp)
615 ], ncols=7)
616 
617 #200 um
618 _cellsnum_perthick_perlayer_200_EE_zplus = PlotGroup("cellsnum_perthick_perlayer_200_EE", [
619  Plot("cellsnum_perthick_perlayer_200_{:02d}".format(i), xtitle="", **_common_cells) for i in range(maxlayerzm,lastLayerEEzp)
620 ], ncols=7)
621 
622 _cellsnum_perthick_perlayer_200_FH_zplus = PlotGroup("cellsnum_perthick_perlayer_200_FH", [
623  Plot("cellsnum_perthick_perlayer_200_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzp,lastLayerFHzp)
624 ], ncols=7)
625 
626 _cellsnum_perthick_perlayer_200_BH_zplus = PlotGroup("cellsnum_perthick_perlayer_200_BH", [
627  Plot("cellsnum_perthick_perlayer_200_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzp,maxlayerzp)
628 ], ncols=7)
629 #300 um
630 _cellsnum_perthick_perlayer_300_EE_zplus = PlotGroup("cellsnum_perthick_perlayer_300_EE", [
631  Plot("cellsnum_perthick_perlayer_300_{:02d}".format(i), xtitle="", **_common_cells) for i in range(maxlayerzm,lastLayerEEzp)
632 ], ncols=7)
633 
634 _cellsnum_perthick_perlayer_300_FH_zplus = PlotGroup("cellsnum_perthick_perlayer_300_FH", [
635  Plot("cellsnum_perthick_perlayer_300_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzp,lastLayerFHzp)
636 ], ncols=7)
637 _cellsnum_perthick_perlayer_300_BH_zplus = PlotGroup("cellsnum_perthick_perlayer_300_BH", [
638  Plot("cellsnum_perthick_perlayer_300_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzp,maxlayerzp)
639 ], ncols=7)
640 
641 #scint um
642 _cellsnum_perthick_perlayer_scint_EE_zplus = PlotGroup("cellsnum_perthick_perlayer_Sci_EE", [
643  Plot("cellsnum_perthick_perlayer_-1_{:02d}".format(i), xtitle="", **_common_cells) for i in range(maxlayerzm,lastLayerEEzp)
644 ], ncols=7)
645 
646 _cellsnum_perthick_perlayer_scint_FH_zplus = PlotGroup("cellsnum_perthick_perlayer_Sci_FH", [
647  Plot("cellsnum_perthick_perlayer_-1_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerEEzp,lastLayerFHzp)
648 ], ncols=7)
649 
650 _cellsnum_perthick_perlayer_scint_BH_zplus = PlotGroup("cellsnum_perthick_perlayer_Sci_BH", [
651  Plot("cellsnum_perthick_perlayer_-1_{:02d}".format(i), xtitle="", **_common_cells) for i in range(lastLayerFHzp,maxlayerzp)
652 ], ncols=7)
653 
654 #----------------------------------------------------------------------------------------------------------------
655 #120 um
656 _common_distance = {}
657 _common_distance.update(_common)
658 _common_distance.update(_legend_common)
659 _common_distance["xmax"] = 150
660 _common_distance["stat"] = False
661 _common_distance["ymin"] = 1e-3
662 _common_distance["ymax"] = 10000
663 _common_distance["ylog"] = True
664 
665 _distancetomaxcell_perthickperlayer_120_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_120_EE", [
666  Plot("distancetomaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
667 ], ncols=7)
668 
669 _distancetomaxcell_perthickperlayer_120_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_120_FH", [
670  Plot("distancetomaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
671 ], ncols=7)
672 
673 _distancetomaxcell_perthickperlayer_120_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_120_BH", [
674  Plot("distancetomaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
675 ], ncols=7)
676 
677 #200 um
678 _distancetomaxcell_perthickperlayer_200_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_200_EE", [
679  Plot("distancetomaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
680 ], ncols=7)
681 
682 _distancetomaxcell_perthickperlayer_200_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_200_FH", [
683  Plot("distancetomaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
684 ], ncols=7)
685 
686 _distancetomaxcell_perthickperlayer_200_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_200_BH", [
687  Plot("distancetomaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
688 ], ncols=7)
689 
690 #300 um
691 _distancetomaxcell_perthickperlayer_300_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_300_EE", [
692  Plot("distancetomaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
693 ], ncols=7)
694 
695 _distancetomaxcell_perthickperlayer_300_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_300_FH", [
696  Plot("distancetomaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
697 ], ncols=7)
698 
699 _distancetomaxcell_perthickperlayer_300_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_300_BH", [
700  Plot("distancetomaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
701 ], ncols=7)
702 
703 #scint um
704 _distancetomaxcell_perthickperlayer_scint_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_Sci_EE", [
705  Plot("distancetomaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
706 ], ncols=7)
707 
708 _distancetomaxcell_perthickperlayer_scint_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_Sci_FH", [
709  Plot("distancetomaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
710 ], ncols=7)
711 
712 _distancetomaxcell_perthickperlayer_scint_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_Sci_BH", [
713  Plot("distancetomaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
714 ], ncols=7)
715 
716 #----------------------------------------------------------------------------------------------------------------
717 #120 um
718 _distancebetseedandmaxcell_perthickperlayer_120_EE_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_120_EE", [
719  Plot("distancebetseedandmaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
720 ], ncols=7)
721 
722 _distancebetseedandmaxcell_perthickperlayer_120_FH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_120_FH", [
723  Plot("distancebetseedandmaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
724 ], ncols=7)
725 
726 _distancebetseedandmaxcell_perthickperlayer_120_BH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_120_BH", [
727  Plot("distancebetseedandmaxcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
728 ], ncols=7)
729 
730 #200 um
731 _distancebetseedandmaxcell_perthickperlayer_200_EE_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_200_EE", [
732  Plot("distancebetseedandmaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
733 ], ncols=7)
734 
735 _distancebetseedandmaxcell_perthickperlayer_200_FH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_200_FH", [
736  Plot("distancebetseedandmaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
737 ], ncols=7)
738 
739 _distancebetseedandmaxcell_perthickperlayer_200_BH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_200_BH", [
740  Plot("distancebetseedandmaxcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
741 ], ncols=7)
742 
743 #300 um
744 _distancebetseedandmaxcell_perthickperlayer_300_EE_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_300_EE", [
745  Plot("distancebetseedandmaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
746 ], ncols=7)
747 
748 _distancebetseedandmaxcell_perthickperlayer_300_FH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_300_FH", [
749  Plot("distancebetseedandmaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
750 ], ncols=7)
751 
752 _distancebetseedandmaxcell_perthickperlayer_300_BH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_300_BH", [
753  Plot("distancebetseedandmaxcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
754 ], ncols=7)
755 
756 #scint um
757 _distancebetseedandmaxcell_perthickperlayer_scint_EE_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_Sci_EE", [
758  Plot("distancebetseedandmaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
759 ], ncols=7)
760 
761 _distancebetseedandmaxcell_perthickperlayer_scint_FH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_Sci_FH", [
762  Plot("distancebetseedandmaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
763 ], ncols=7)
764 
765 _distancebetseedandmaxcell_perthickperlayer_scint_BH_zplus = PlotGroup("distancebetseedandmaxcell_perthickperlayer_Sci_BH", [
766  Plot("distancebetseedandmaxcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
767 ], ncols=7)
768 
769 #----------------------------------------------------------------------------------------------------------------
770 #120 um
771 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_EE_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_EE", [
772  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
773 ], ncols=7)
774 
775 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_FH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_FH", [
776  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
777 ], ncols=7)
778 
779 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_BH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_BH", [
780  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
781 ], ncols=7)
782 
783 #200 um
784 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_EE_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_EE", [
785  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
786 ], ncols=7)
787 
788 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_FH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_FH", [
789  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
790 ], ncols=7)
791 
792 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_BH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_BH", [
793  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
794 ], ncols=7)
795 
796 #300 um
797 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_EE_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_EE", [
798  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
799 ], ncols=7)
800 
801 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_FH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_FH", [
802  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
803 ], ncols=7)
804 
805 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_BH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_BH", [
806  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
807 ], ncols=7)
808 
809 #scint um
810 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_EE_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_Sci_EE", [
811  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
812 ], ncols=7)
813 
814 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_FH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_Sci_FH", [
815  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
816 ], ncols=7)
817 
818 _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_BH_zplus = PlotGroup("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_Sci_BH", [
819  Plot("distancebetseedandmaxcellvsclusterenergy_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
820 ], ncols=7)
821 
822 
823 #----------------------------------------------------------------------------------------------------------------
824 #120 um
825 _distancetoseedcell_perthickperlayer_120_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_120_EE", [
826  Plot("distancetoseedcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
827 ], ncols=7)
828 
829 _distancetoseedcell_perthickperlayer_120_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_120_FH", [
830  Plot("distancetoseedcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
831 ], ncols=7)
832 
833 _distancetoseedcell_perthickperlayer_120_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_120_BH", [
834  Plot("distancetoseedcell_perthickperlayer_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
835 ], ncols=7)
836 
837 #200 um
838 _distancetoseedcell_perthickperlayer_200_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_200_EE", [
839  Plot("distancetoseedcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
840 ], ncols=7)
841 
842 _distancetoseedcell_perthickperlayer_200_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_200_FH", [
843  Plot("distancetoseedcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
844 ], ncols=7)
845 
846 _distancetoseedcell_perthickperlayer_200_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_200_BH", [
847  Plot("distancetoseedcell_perthickperlayer_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
848 ], ncols=7)
849 
850 #300 um
851 _distancetoseedcell_perthickperlayer_300_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_300_EE", [
852  Plot("distancetoseedcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
853 ], ncols=7)
854 
855 _distancetoseedcell_perthickperlayer_300_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_300_FH", [
856  Plot("distancetoseedcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
857 ], ncols=7)
858 
859 _distancetoseedcell_perthickperlayer_300_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_300_BH", [
860  Plot("distancetoseedcell_perthickperlayer_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
861 ], ncols=7)
862 
863 #scint um
864 _distancetoseedcell_perthickperlayer_scint_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_Sci_EE", [
865  Plot("distancetoseedcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
866 ], ncols=7)
867 
868 _distancetoseedcell_perthickperlayer_scint_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_Sci_FH", [
869  Plot("distancetoseedcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
870 ], ncols=7)
871 
872 _distancetoseedcell_perthickperlayer_scint_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_Sci_BH", [
873  Plot("distancetoseedcell_perthickperlayer_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
874 ], ncols=7)
875 
876 #=====================================================================================================================
877 #----------------------------------------------------------------------------------------------------------------
878 #We need points for the weighted plots
879 _common = {"stat": True, "drawStyle": "EP", "staty": 0.65 }
880 
881 #120 um
882 _distancetomaxcell_perthickperlayer_eneweighted_120_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_120_EE", [
883  Plot("distancetomaxcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
884 ], ncols=7)
885 
886 _distancetomaxcell_perthickperlayer_eneweighted_120_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_120_FH", [
887  Plot("distancetomaxcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
888 ], ncols=7)
889 
890 _distancetomaxcell_perthickperlayer_eneweighted_120_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_120_BH", [
891  Plot("distancetomaxcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
892 ], ncols=7)
893 
894 #200 um
895 _distancetomaxcell_perthickperlayer_eneweighted_200_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_200_EE", [
896  Plot("distancetomaxcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
897 ], ncols=7)
898 _distancetomaxcell_perthickperlayer_eneweighted_200_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_200_FH", [
899  Plot("distancetomaxcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
900 ], ncols=7)
901 
902 _distancetomaxcell_perthickperlayer_eneweighted_200_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_200_BH", [
903  Plot("distancetomaxcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
904 ], ncols=7)
905 
906 #300 um
907 _distancetomaxcell_perthickperlayer_eneweighted_300_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_300_EE", [
908  Plot("distancetomaxcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
909 ], ncols=7)
910 
911 _distancetomaxcell_perthickperlayer_eneweighted_300_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_300_FH", [
912  Plot("distancetomaxcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
913 ], ncols=7)
914 
915 _distancetomaxcell_perthickperlayer_eneweighted_300_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_300_BH", [
916  Plot("distancetomaxcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
917 ], ncols=7)
918 
919 #scint um
920 _distancetomaxcell_perthickperlayer_eneweighted_scint_EE_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_Sci_EE", [
921  Plot("distancetomaxcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
922 ], ncols=7)
923 
924 _distancetomaxcell_perthickperlayer_eneweighted_scint_FH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_Sci_FH", [
925  Plot("distancetomaxcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
926 ], ncols=7)
927 
928 _distancetomaxcell_perthickperlayer_eneweighted_scint_BH_zplus = PlotGroup("distancetomaxcell_perthickperlayer_eneweighted_Sci_BH", [
929  Plot("distancetomaxcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
930 ], ncols=7)
931 
932 #----------------------------------------------------------------------------------------------------------------
933 #120 um
934 _distancetoseedcell_perthickperlayer_eneweighted_120_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_120_EE", [
935  Plot("distancetoseedcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
936 ], ncols=7)
937 
938 _distancetoseedcell_perthickperlayer_eneweighted_120_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_120_FH", [
939  Plot("distancetoseedcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
940 ], ncols=7)
941 
942 _distancetoseedcell_perthickperlayer_eneweighted_120_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_120_BH", [
943  Plot("distancetoseedcell_perthickperlayer_eneweighted_120_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
944 ], ncols=7)
945 
946 #200 um
947 _distancetoseedcell_perthickperlayer_eneweighted_200_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_200_EE", [
948  Plot("distancetoseedcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
949 ], ncols=7)
950 
951 _distancetoseedcell_perthickperlayer_eneweighted_200_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_200_FH", [
952  Plot("distancetoseedcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
953 ], ncols=7)
954 
955 _distancetoseedcell_perthickperlayer_eneweighted_200_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_200_BH", [
956  Plot("distancetoseedcell_perthickperlayer_eneweighted_200_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
957 ], ncols=7)
958 
959 #300 um
960 _distancetoseedcell_perthickperlayer_eneweighted_300_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_300_EE", [
961  Plot("distancetoseedcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
962 ], ncols=7)
963 
964 _distancetoseedcell_perthickperlayer_eneweighted_300_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_300_FH", [
965  Plot("distancetoseedcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
966 ], ncols=7)
967 
968 _distancetoseedcell_perthickperlayer_eneweighted_300_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_300_BH", [
969  Plot("distancetoseedcell_perthickperlayer_eneweighted_300_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
970 ], ncols=7)
971 
972 #scint um
973 _distancetoseedcell_perthickperlayer_eneweighted_scint_EE_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_Sci_EE", [
974  Plot("distancetoseedcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
975 ], ncols=7)
976 
977 _distancetoseedcell_perthickperlayer_eneweighted_scint_FH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_Sci_FH", [
978  Plot("distancetoseedcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
979 ], ncols=7)
980 
981 _distancetoseedcell_perthickperlayer_eneweighted_scint_BH_zplus = PlotGroup("distancetoseedcell_perthickperlayer_eneweighted_Sci_BH", [
982  Plot("distancetoseedcell_perthickperlayer_eneweighted_-1_{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
983 ], ncols=7)
984 #Just in case we add some plots below to be on the safe side.
985 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
986 
987 #--------------------------------------------------------------------------------------------
988 # z-
989 #--------------------------------------------------------------------------------------------
990 
991 _common_score = {"title": "Score CaloParticle to LayerClusters in z-",
992  "stat": False,
993  "ymin": 0.1,
994  "ymax": 1000,
995  "xmin": 0,
996  "xmax": 1,
997  "drawStyle": "hist",
998  "lineWidth": 1,
999  "ylog": True
1000  }
1001 _common_score.update(_legend_common)
1002 _score_caloparticle_to_layerclusters_zminus = PlotGroup("score_caloparticle_to_layercluster", [
1003  Plot("Score_caloparticle2layercl_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_score) for i in range(0,maxlayerzm)
1004  ], ncols=10 )
1005 
1006 _common_score = {"title": "Score LayerCluster to CaloParticles in z-",
1007  "stat": False,
1008  "ymin": 0.1,
1009  "ymax": 1000,
1010  "xmin": 0,
1011  "xmax": 1,
1012  "drawStyle": "hist",
1013  "lineWidth": 1,
1014  "ylog": True
1015  }
1016 _common_score.update(_legend_common)
1017 _score_layercluster_to_caloparticles_zminus = PlotGroup("score_layercluster_to_caloparticle", [
1018  Plot("Score_layercl2caloparticle_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_score) for i in range(0,maxlayerzm)
1019  ], ncols=8 )
1020 
1021 _common_shared= {"title": "Shared Energy CaloParticle To Layer Cluster in z-",
1022  "stat": False,
1023  "legend": False,
1024  }
1025 _common_shared.update(_legend_common)
1026 _shared_plots_zminus = [Plot("SharedEnergy_caloparticle2layercl_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(0,maxlayerzm)]
1027 _shared_plots_zminus.extend([Plot("SharedEnergy_caloparticle2layercl_vs_eta_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(0,maxlayerzm)])
1028 _shared_plots_zminus.extend([Plot("SharedEnergy_caloparticle2layercl_vs_phi_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(0,maxlayerzm)])
1029 _sharedEnergy_caloparticle_to_layercluster_zminus = PlotGroup("sharedEnergy_caloparticle_to_layercluster", _shared_plots_zminus, ncols=8)
1030 
1031 _common_shared= {"title": "Shared Energy Layer Cluster To CaloParticle in z-",
1032  "stat": False,
1033  "legend": False,
1034  }
1035 _common_shared.update(_legend_common)
1036 _shared_plots2_zminus = [Plot("SharedEnergy_layercluster2caloparticle_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(0,maxlayerzm)]
1037 _common_shared= {"title": "Shared Energy Layer Cluster To Best CaloParticle in z-",
1038  "stat": False,
1039  "legend": False,
1040  "ymin": 0,
1041  "ymax": 1
1042  }
1043 _common_shared.update(_legend_common)
1044 _shared_plots2_zminus.extend([Plot("SharedEnergy_layercl2caloparticle_vs_eta_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(0,maxlayerzm)])
1045 _shared_plots2_zminus.extend([Plot("SharedEnergy_layercl2caloparticle_vs_phi_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(0,maxlayerzm)])
1046 _sharedEnergy_layercluster_to_caloparticle_zminus = PlotGroup("sharedEnergy_layercluster_to_caloparticle", _shared_plots2_zminus, ncols=8)
1047 
1048 
1049 _common_assoc = {#"title": "Cell Association Table in z-",
1050  "stat": False,
1051  "legend": False,
1052  "xbinlabels": ["", "TN(pur)", "FN(ineff.)", "FP(fake)", "TP(eff)"],
1053  "xbinlabeloption": "h",
1054  "drawStyle": "hist",
1055  "ymin": 0.1,
1056  "ymax": 10000,
1057  "ylog": True}
1058 _common_assoc.update(_legend_common)
1059 _cell_association_table_zminus = PlotGroup("cellAssociation_table", [
1060  Plot("cellAssociation_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_assoc) for i in range(0,maxlayerzm)
1061  ], ncols=8 )
1062 
1063 _bin_count = 0
1064 _xbinlabels = [ "L{:02d}".format(i+1) for i in range(0,maxlayerzm) ]
1065 _common_eff = {"stat": False, "legend": False, "ymin": 0.0, "ymax": 1.1}
1066 _effplots_zminus_eta = [Plot("effic_eta_layer{:02d}".format(i), xtitle="", **_common_eff) for i in range(0,maxlayerzm)]
1067 _effplots_zminus_phi = [Plot("effic_phi_layer{:02d}".format(i), xtitle="", **_common_eff) for i in range(0,maxlayerzm)]
1068 _common_eff = {"stat": False, "legend": False, "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "v", "ymin": 0.0, "ymax": 1.1}
1069 _common_eff["xmin"] = _bin_count
1070 _common_eff["xmax"] = maxlayerzm
1071 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1072 _effplots_zminus = [Plot("globalEfficiencies", xtitle="Global Efficiencies in z-", **_common_eff)]
1073 _efficiencies_zminus_eta = PlotGroup("Efficiencies_vs_eta", _effplots_zminus_eta, ncols=10)
1074 _efficiencies_zminus_phi = PlotGroup("Efficiencies_vs_phi", _effplots_zminus_phi, ncols=10)
1075 _efficiencies_zminus = PlotGroup("Efficiencies_global", _effplots_zminus, ncols=1)
1076 
1077 _common_dup = {"stat": False, "legend": False, "ymin":0.0, "ymax":1.1}
1078 _dupplots_zminus_eta = [Plot("duplicate_eta_layer{:02d}".format(i), xtitle="", **_common_dup) for i in range(0,maxlayerzm)]
1079 _dupplots_zminus_phi = [Plot("duplicate_phi_layer{:02d}".format(i), xtitle="", **_common_dup) for i in range(0,maxlayerzm)]
1080 _common_dup = {"stat": False, "legend": False, "title": "Global Duplicates in z-", "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "v", "ymin": 0.0, "ymax": 1.1}
1081 _common_dup["xmin"] = _bin_count
1082 _common_dup["xmax"] = _common_dup["xmin"] + maxlayerzm
1083 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1084 _dupplots_zminus = [Plot("globalEfficiencies", xtitle="Global Duplicates in z-", **_common_dup)]
1085 _duplicates_zminus_eta = PlotGroup("Duplicates_vs_eta", _dupplots_zminus_eta, ncols=10)
1086 _duplicates_zminus_phi = PlotGroup("Duplicates_vs_phi", _dupplots_zminus_phi, ncols=10)
1087 _duplicates_zminus = PlotGroup("Duplicates_global", _dupplots_zminus, ncols=1)
1088 
1089 _common_fake = {"stat": False, "legend": False, "ymin":0.0, "ymax":1.1}
1090 _fakeplots_zminus_eta = [Plot("fake_eta_layer{:02d}".format(i), xtitle="", **_common_fake) for i in range(0,maxlayerzm)]
1091 _fakeplots_zminus_phi = [Plot("fake_phi_layer{:02d}".format(i), xtitle="", **_common_fake) for i in range(0,maxlayerzm)]
1092 _common_fake = {"stat": False, "legend": False, "title": "Global Fake Rates in z-", "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "v", "ymin": 0.0, "ymax": 1.1}
1093 _common_fake["xmin"] = _bin_count
1094 _common_fake["xmax"] = _common_fake["xmin"] + maxlayerzm
1095 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1096 _common_fake["xbinlabels"] = [ "L{:02d}".format(i+1) for i in range(0,maxlayerzm) ]
1097 _common_fake["xbinlabelsize"] = 10.
1098 _fakeplots_zminus = [Plot("globalEfficiencies", xtitle="Global Fake Rate in z-", **_common_fake)]
1099 _fakes_zminus_eta = PlotGroup("FakeRate_vs_eta", _fakeplots_zminus_eta, ncols=10)
1100 _fakes_zminus_phi = PlotGroup("FakeRate_vs_phi", _fakeplots_zminus_phi, ncols=10)
1101 _fakes_zminus = PlotGroup("FakeRate_global", _fakeplots_zminus, ncols=1)
1102 
1103 _common_merge = {"stat": False, "legend": False, "ymin":0.0, "ymax":1.1}
1104 _mergeplots_zminus_eta = [Plot("merge_eta_layer{:02d}".format(i), xtitle="", **_common_merge) for i in range(0,maxlayerzm)]
1105 _mergeplots_zminus_phi = [Plot("merge_phi_layer{:02d}".format(i), xtitle="", **_common_merge) for i in range(0,maxlayerzm)]
1106 _common_merge = {"stat": False, "legend": False, "title": "Global Merge Rates in z-", "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "v", "ymin": 0.0, "ymax": 1.1}
1107 _common_merge["xmin"] = _bin_count
1108 _common_merge["xmax"] = _common_merge["xmin"] + maxlayerzm
1109 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1110 _common_merge["xbinlabels"] = [ "L{:02d}".format(i+1) for i in range(0,maxlayerzm) ]
1111 _common_merge["xbinlabelsize"] = 10.
1112 _mergeplots_zminus = [Plot("globalEfficiencies", xtitle="Global merge Rate in z-", **_common_merge)]
1113 _merges_zminus_eta = PlotGroup("MergeRate_vs_eta", _mergeplots_zminus_eta, ncols=10)
1114 _merges_zminus_phi = PlotGroup("MergeRate_vs_phi", _mergeplots_zminus_phi, ncols=10)
1115 _merges_zminus = PlotGroup("MergeRate_global", _mergeplots_zminus, ncols=1)
1116 
1117 
1118 _common_energy_score = dict(removeEmptyBins=False, xbinlabelsize=10,
1119  stat=True,
1120  xbinlabeloption="d",
1121  ncols=1,
1122  ylog=True,
1123  xlog=True,
1124  xmin=0.001,
1125  xmax=1.,
1126  ymin=0.01,
1127  ymax=1.)
1128 _energyscore_cp2lc_zminus = PlotGroup("Energy_vs_Score_CP2LC", [Plot("Energy_vs_Score_caloparticle2layer_perlayer{:02d}".format(i), title="Energy_vs_Score_CP2LC",
1129  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_energy_score) for i in range(0, maxlayerzm)
1130  ], ncols=10)
1131 
1132 _energyscore_cp2lc_zplus = PlotGroup("Energy_vs_Score_CP2LC", [Plot("Energy_vs_Score_caloparticle2layer_perlayer{:02d}".format(i), title="Energy_vs_Score_CP2LC",
1133  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_energy_score) for i in range(maxlayerzm,maxlayerzp)
1134  ], ncols=10)
1135 _common_energy_score["xlog"]=False
1136 _common_energy_score["ylog"]=False
1137 _common_energy_score["xmin"]=-0.1
1138 _energyscore_lc2cp_zminus = PlotGroup("Energy_vs_Score_LC2CP", [Plot("Energy_vs_Score_layer2caloparticle_perlayer{:02d}".format(i), title="Energy_vs_Score_LC2CP",
1139  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_energy_score) for i in range(0, maxlayerzm)
1140  ], ncols=10)
1141 _energyscore_lc2cp_zplus = PlotGroup("Energy_vs_Score_LC2CP", [Plot("Energy_vs_Score_layer2caloparticle_perlayer{:02d}".format(i), title="Energy_vs_Score_LC2CP",
1142  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_energy_score) for i in range(maxlayerzm,maxlayerzp)
1143  ], ncols=10)
1144 
1145 #--------------------------------------------------------------------------------------------
1146 # z+
1147 #--------------------------------------------------------------------------------------------
1148 _common_score = {"title": "Score CaloParticle to LayerClusters in z+",
1149  "stat": False,
1150  "ymin": 0.1,
1151  "ymax": 1000,
1152  "xmin": 0,
1153  "xmax": 1,
1154  "drawStyle": "hist",
1155  "lineWidth": 1,
1156  "ylog": True
1157  }
1158 _common_score.update(_legend_common)
1159 _score_caloparticle_to_layerclusters_zplus = PlotGroup("score_caloparticle_to_layercluster", [
1160  Plot("Score_caloparticle2layercl_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_score) for i in range(maxlayerzm,maxlayerzp)
1161  ], ncols=10 )
1162 
1163 _common_score = {"title": "Score LayerCluster to CaloParticles in z+",
1164  "stat": False,
1165  "ymin": 0.1,
1166  "ymax": 1000,
1167  "xmin": 0,
1168  "xmax": 1,
1169  "drawStyle": "hist",
1170  "lineWidth": 1,
1171  "ylog": True
1172  }
1173 _common_score.update(_legend_common)
1174 _score_layercluster_to_caloparticles_zplus = PlotGroup("score_layercluster_to_caloparticle", [
1175  Plot("Score_layercl2caloparticle_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_score) for i in range(maxlayerzm,maxlayerzp)
1176  ], ncols=8 )
1177 
1178 _common_shared= {"title": "Shared Energy CaloParticle To Layer Cluster in z+",
1179  "stat": False,
1180  "legend": False,
1181  }
1182 _common_shared.update(_legend_common)
1183 _shared_plots_zplus = [Plot("SharedEnergy_caloparticle2layercl_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(maxlayerzm,maxlayerzp)]
1184 _shared_plots_zplus.extend([Plot("SharedEnergy_caloparticle2layercl_vs_eta_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(maxlayerzm,maxlayerzp)])
1185 _shared_plots_zplus.extend([Plot("SharedEnergy_caloparticle2layercl_vs_phi_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(maxlayerzm,maxlayerzp)])
1186 _sharedEnergy_caloparticle_to_layercluster_zplus = PlotGroup("sharedEnergy_caloparticle_to_layercluster", _shared_plots_zplus, ncols=8)
1187 
1188 _common_shared= {"title": "Shared Energy Layer Cluster To CaloParticle in z+",
1189  "stat": False,
1190  "legend": False,
1191  }
1192 _common_shared.update(_legend_common)
1193 _shared_plots2_zplus = [Plot("SharedEnergy_layercluster2caloparticle_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(maxlayerzm,maxlayerzp)]
1194 _common_shared= {"title": "Shared Energy Layer Cluster To Best CaloParticle in z+",
1195  "stat": False,
1196  "legend": False,
1197  "ymin": 0,
1198  "ymax": 1,
1199  }
1200 _common_shared.update(_legend_common)
1201 _shared_plots2_zplus.extend([Plot("SharedEnergy_layercl2caloparticle_vs_eta_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(maxlayerzm,maxlayerzp)])
1202 _shared_plots2_zplus.extend([Plot("SharedEnergy_layercl2caloparticle_vs_phi_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_shared) for i in range(maxlayerzm,maxlayerzp)])
1203 _sharedEnergy_layercluster_to_caloparticle_zplus = PlotGroup("sharedEnergy_layercluster_to_caloparticle", _shared_plots2_zplus, ncols=8)
1204 
1205 
1206 _common_assoc = {#"title": "Cell Association Table in z+",
1207  "stat": False,
1208  "legend": False,
1209  "xbinlabels": ["", "TN(pur)", "FN(ineff.)", "FP(fake)", "TP(eff)"],
1210  "xbinlabeloption": "h",
1211  "drawStyle": "hist",
1212  "ymin": 0.1,
1213  "ymax": 10000,
1214  "ylog": True}
1215 _common_assoc.update(_legend_common)
1216 _cell_association_table_zplus = PlotGroup("cellAssociation_table", [
1217  Plot("cellAssociation_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_assoc) for i in range(maxlayerzm,maxlayerzp)
1218  ], ncols=8 )
1219 
1220 
1221 _bin_count = 50
1222 _common_eff = {"stat": False, "legend": False, "ymin":0.0, "ymax":1.1}
1223 _effplots_zplus_eta = [Plot("effic_eta_layer{:02d}".format(i), xtitle="", **_common_eff) for i in range(maxlayerzm,maxlayerzp)]
1224 _effplots_zplus_phi = [Plot("effic_phi_layer{:02d}".format(i), xtitle="", **_common_eff) for i in range(maxlayerzm,maxlayerzp)]
1225 _common_eff = {"stat": False, "legend": False, "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "d", "ymin": 0.0, "ymax": 1.1}
1226 _common_eff["xmin"] = _bin_count
1227 _common_eff["xmax"] = _common_eff["xmin"] + maxlayerzm
1228 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1229 _effplots_zplus = [Plot("globalEfficiencies", xtitle="Global Efficiencies in z+", **_common_eff)]
1230 _efficiencies_zplus_eta = PlotGroup("Efficiencies_vs_eta", _effplots_zplus_eta, ncols=10)
1231 _efficiencies_zplus_phi = PlotGroup("Efficiencies_vs_phi", _effplots_zplus_phi, ncols=10)
1232 _efficiencies_zplus = PlotGroup("Efficiencies_global", _effplots_zplus, ncols=1)
1233 
1234 _common_dup = {"stat": False, "legend": False, "ymin": 0.0, "ymax": 1.1}
1235 _dupplots_zplus_eta = [Plot("duplicate_eta_layer{:02d}".format(i), xtitle="", **_common_dup) for i in range(maxlayerzm,maxlayerzp)]
1236 _dupplots_zplus_phi = [Plot("duplicate_phi_layer{:02d}".format(i), xtitle="", **_common_dup) for i in range(maxlayerzm,maxlayerzp)]
1237 _common_dup = {"stat": False, "legend": False, "title": "Global Duplicates in z+", "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "d", "ymin": 0.0, "ymax": 1.1}
1238 _common_dup["xmin"] = _bin_count
1239 _common_dup["xmax"] = _common_dup["xmin"] + maxlayerzm
1240 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1241 _dupplots_zplus = [Plot("globalEfficiencies", xtitle="Global Duplicates in z+", **_common_dup)]
1242 _duplicates_zplus_eta = PlotGroup("Duplicates_vs_eta", _dupplots_zplus_eta, ncols=10)
1243 _duplicates_zplus_phi = PlotGroup("Duplicates_vs_phi", _dupplots_zplus_phi, ncols=10)
1244 _duplicates_zplus = PlotGroup("Duplicates_global", _dupplots_zplus, ncols=1)
1245 
1246 _common_fake = {"stat": False, "legend": False, "ymin": 0.0, "ymax": 1.1}
1247 _fakeplots_zplus_eta = [Plot("fake_eta_layer{:02d}".format(i), xtitle="", **_common_fake) for i in range(maxlayerzm,maxlayerzp)]
1248 _fakeplots_zplus_phi = [Plot("fake_phi_layer{:02d}".format(i), xtitle="", **_common_fake) for i in range(maxlayerzm,maxlayerzp)]
1249 _common_fake = {"stat": False, "legend": False, "title": "Global Fake Rates in z+", "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "d", "ymin": 0.0, "ymax": 1.1}
1250 _common_fake["xmin"] = _bin_count
1251 _common_fake["xmax"] = _common_fake["xmin"] + maxlayerzm
1252 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1253 _fakeplots_zplus = [Plot("globalEfficiencies", xtitle="Global Fake Rate in z+", **_common_fake)]
1254 _fakes_zplus_eta = PlotGroup("FakeRate_vs_eta", _fakeplots_zplus_eta, ncols=10)
1255 _fakes_zplus_phi = PlotGroup("FakeRate_vs_phi", _fakeplots_zplus_phi, ncols=10)
1256 _fakes_zplus = PlotGroup("FakeRate_global", _fakeplots_zplus, ncols=1)
1257 
1258 _common_merge = {"stat": False, "legend": False, "ymin": 0.0, "ymax": 1.1}
1259 _mergeplots_zplus_eta = [Plot("merge_eta_layer{:02d}".format(i), xtitle="", **_common_merge) for i in range(maxlayerzm,maxlayerzp)]
1260 _mergeplots_zplus_phi = [Plot("merge_phi_layer{:02d}".format(i), xtitle="", **_common_merge) for i in range(maxlayerzm,maxlayerzp)]
1261 _common_merge = {"stat": False, "legend": False, "title": "Global Merge Rates in z+", "xbinlabels": _xbinlabels, "xbinlabelsize": 12, "xbinlabeloptions": "d", "ymin": 0.0, "ymax": 1.1}
1262 _common_merge["xmin"] = _bin_count
1263 _common_merge["xmax"] = _common_merge["xmin"] + maxlayerzm
1264 _bin_count += 4*maxlayerzm # 2 for the eta{-,+} and 2 for phi{+,-}
1265 _mergeplots_zplus = [Plot("globalEfficiencies", xtitle="Global merge Rate in z+", **_common_merge)]
1266 _merges_zplus_eta = PlotGroup("MergeRate_vs_eta", _mergeplots_zplus_eta, ncols=10)
1267 _merges_zplus_phi = PlotGroup("MergeRate_vs_phi", _mergeplots_zplus_phi, ncols=10)
1268 _merges_zplus = PlotGroup("MergeRate_global", _mergeplots_zplus, ncols=1)
1269 
1270 
1271 #--------------------------------------------------------------------------------------------
1272 # MULTICLUSTERS
1273 #--------------------------------------------------------------------------------------------
1274 _common_score = {#"title": "Score CaloParticle to MultiClusters",
1275  "stat": False,
1276  "ymin": 0.1,
1277  "ymax": 100000,
1278  "xmin": 0,
1279  "xmax": 1.0,
1280  "drawStyle": "hist",
1281  "lineWidth": 1,
1282  "ylog": True
1283  }
1284 _common_score.update(_legend_common)
1285 _score_caloparticle_to_multiclusters = PlotGroup("ScoreCaloParticlesToMultiClusters", [
1286  Plot("Score_caloparticle2multicl", **_common_score)
1287  ], ncols=1)
1288 
1289 _common_score = {#"title": "Score MultiCluster to CaloParticles",
1290  "stat": False,
1291  "ymin": 0.1,
1292  "ymax": 100000,
1293  "xmin": 0,
1294  "xmax": 1.0,
1295  "drawStyle": "hist",
1296  "lineWidth": 1,
1297  "ylog": True
1298  }
1299 _common_score.update(_legend_common)
1300 _score_multicluster_to_caloparticles = PlotGroup("ScoreMultiClustersToCaloParticles", [
1301  Plot("Score_multicl2caloparticle", **_common_score)
1302  ], ncols=1)
1303 
1304 _common_shared= {"title": "Shared Energy CaloParticle To Multi Cluster ",
1305  "stat": False,
1306  "legend": True,
1307  "xmin": 0,
1308  "xmax": 2.0,
1309  }
1310 _common_shared.update(_legend_common)
1311 _shared_plots = [ Plot("SharedEnergy_caloparticle2multicl", **_common_shared) ]
1312 _common_shared["xmin"] = -4.0
1313 _common_shared["xmax"] = 4.0
1314 _shared_plots.extend([Plot("SharedEnergy_caloparticle2multicl_vs_eta", **_common_shared)])
1315 _shared_plots.extend([Plot("SharedEnergy_caloparticle2multicl_vs_phi", **_common_shared)])
1316 _sharedEnergy_caloparticle_to_multicluster = PlotGroup("SharedEnergy_CaloParticleToMultiCluster", _shared_plots, ncols=3)
1317 
1318 _common_shared= {"title": "Shared Energy Multi Cluster To CaloParticle ",
1319  "stat": False,
1320  "legend": True,
1321  "xmin": 0,
1322  "xmax": 2.0,
1323  }
1324 _common_shared.update(_legend_common)
1325 _shared_plots2 = [Plot("SharedEnergy_multicluster2caloparticle", **_common_shared)]
1326 _common_shared["xmin"] = -4.0
1327 _common_shared["xmax"] = 4.0
1328 _shared_plots2.extend([Plot("SharedEnergy_multicl2caloparticle_vs_eta", **_common_shared)])
1329 _shared_plots2.extend([Plot("SharedEnergy_multicl2caloparticle_vs_phi", **_common_shared)])
1330 _sharedEnergy_multicluster_to_caloparticle = PlotGroup("SharedEnergy_MultiClusterToCaloParticle", _shared_plots2, ncols=3)
1331 
1332 
1333 _common_assoc = {#"title": "Cell Association Table",
1334  "stat": False,
1335  "legend": False,
1336  "xbinlabels": ["", "TN(pur)", "FN(ineff.)", "FP(fake)", "TP(eff)"],
1337  "xbinlabeloption": "h",
1338  "drawStyle": "hist",
1339  "ymin": 0.1,
1340  "ymax": 10000000,
1341  "ylog": True}
1342 _common_assoc.update(_legend_common)
1343 _cell_association_table = PlotGroup("cellAssociation_table", [
1344  Plot("cellAssociation_perlayer{:02d}".format(i), xtitle="Layer {:02d} in z-".format(i%maxlayerzm+1) if (i<maxlayerzm) else "Layer {:02d} in z+".format(i%maxlayerzm+1), **_common_assoc) for i in range(0,maxlayerzm)
1345  ], ncols=8 )
1346 
1347 _common_eff = {"stat": False, "legend": False, "xbinlabelsize": 14, "xbinlabeloption": "d", "ymin": 0.0, "ymax": 1.1}
1348 _effplots = [Plot("effic_eta", xtitle="", **_common_eff)]
1349 _effplots.extend([Plot("effic_phi", xtitle="", **_common_eff)])
1350 _effplots.extend([Plot("globalEfficiencies", xtitle="", **_common_eff)])
1351 _efficiencies = PlotGroup("Efficiencies", _effplots, ncols=3)
1352 
1353 
1354 _common_dup = {"stat": False, "legend": False, "xbinlabelsize": 14, "xbinlabeloption": "d", "ymin": 0.0, "ymax": 1.1}
1355 _dupplots = [Plot("duplicate_eta", xtitle="", **_common_dup)]
1356 _dupplots.extend([Plot("duplicate_phi", xtitle="", **_common_dup)])
1357 _dupplots.extend([Plot("globalEfficiencies", xtitle="", **_common_dup)])
1358 _duplicates = PlotGroup("Duplicates", _dupplots, ncols=3)
1359 
1360 _common_fake = {"stat": False, "legend": False, "xbinlabelsize": 14, "xbinlabeloption": "d", "ymin": 0.0, "ymax": 1.1}
1361 _fakeplots = [Plot("fake_eta", xtitle="", **_common_fake)]
1362 _fakeplots.extend([Plot("fake_phi", xtitle="", **_common_fake)])
1363 _fakeplots.extend([Plot("globalEfficiencies", xtitle="", **_common_fake)])
1364 _fakes = PlotGroup("FakeRate", _fakeplots, ncols=3)
1365 
1366 _common_merge = {"stat": False, "legend": False, "xbinlabelsize": 14, "xbinlabeloption": "d", "ymin": 0.0, "ymax": 1.1}
1367 _mergeplots = [Plot("merge_eta", xtitle="", **_common_merge)]
1368 _mergeplots.extend([Plot("merge_phi", xtitle="", **_common_merge)])
1369 _mergeplots.extend([Plot("globalEfficiencies", xtitle="", **_common_merge)])
1370 _merges = PlotGroup("MergeRate", _mergeplots, ncols=3)
1371 
1372 _common_energy_score = dict(removeEmptyBins=True, xbinlabelsize=10, xbinlabeloption="d")
1373 _common_energy_score["ymax"] = 1.
1374 _common_energy_score["xmax"] = 1.0
1375 _energyscore_cp2mcl = PlotOnSideGroup("Energy_vs_Score_CaloParticlesToMultiClusters", Plot("Energy_vs_Score_caloparticle2multi", drawStyle="COLZ", adjustMarginRight=0.1, **_common_energy_score), ncols=1)
1376 _common_energy_score["ymax"] = 1.
1377 _common_energy_score["xmax"] = 1.0
1378 _energyscore_mcl2cp = PlotOnSideGroup("Energy_vs_Score_MultiClustersToCaloParticles", Plot("Energy_vs_Score_multi2caloparticle", drawStyle="COLZ", adjustMarginRight=0.1, **_common_energy_score), ncols=1)
1379 
1380 #Coming back to the usual box definition
1381 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
1382 
1383 _totmulticlusternum = PlotGroup("TotalNumberofMultiClusters", [
1384  Plot("totmulticlusternum", xtitle="", **_common)
1385 ],ncols=1)
1386 
1387 _multicluster_layernum_plots = [Plot("multicluster_firstlayer", xtitle="MultiCluster First Layer", **_common)]
1388 _multicluster_layernum_plots.extend([Plot("multicluster_lastlayer", xtitle="MultiCluster Last Layer", **_common)])
1389 _multicluster_layernum_plots.extend([Plot("multicluster_layersnum", xtitle="MultiCluster Number of Layers", **_common)])
1390 _multicluster_layernum = PlotGroup("LayerNumbersOfMultiCluster", _multicluster_layernum_plots, ncols=3)
1391 
1392 _common["xmax"] = 50
1393 _clusternum_in_multicluster = PlotGroup("NumberofLayerClustersinMultiCluster",[
1394  Plot("clusternum_in_multicluster", xtitle="", **_common)
1395 ],ncols=1)
1396 
1397 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65}
1398 _common = {"stat": True, "drawStyle": "pcolz", "staty": 0.65}
1399 
1400 _clusternum_in_multicluster_vs_layer = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer",[
1401  Plot("clusternum_in_multicluster_vs_layer", xtitle="Layer number", ytitle = "<2d Layer Clusters in Multicluster>", **_common)
1402 ],ncols=1)
1403 
1404 _common["scale"] = 100.
1405 #, ztitle = "% of clusters" normalizeToUnitArea=True
1406 _multiplicity_numberOfEventsHistogram = "DQMData/Run 1/HGCAL/Run summary/HGCalValidator/ticlMultiClustersFromTrackstersEM/multiplicity_numberOfEventsHistogram"
1407 _multiplicity_zminus_numberOfEventsHistogram = "DQMData/Run 1/HGCAL/Run summary/HGCalValidator/ticlMultiClustersFromTrackstersEM/multiplicity_zminus_numberOfEventsHistogram"
1408 _multiplicity_zplus_numberOfEventsHistogram = "DQMData/Run 1/HGCAL/Run summary/HGCalValidator/ticlMultiClustersFromTrackstersEM/multiplicity_zplus_numberOfEventsHistogram"
1409 
1410 _multiplicityOfLCinMCL_plots = [Plot("multiplicityOfLCinMCL", xtitle="Layer Cluster multiplicity in Multiclusters", ytitle = "Cluster size (n_{hit})",
1411  drawCommand = "colz text45", normalizeToNumberOfEvents = True, **_common)]
1412 _multiplicityOfLCinMCL_plots.extend([Plot("multiplicityOfLCinMCL_vs_layerclusterenergy", xtitle="Layer Cluster multiplicity in Multiclusters", ytitle = "Cluster Energy (GeV)",
1413  drawCommand = "colz text45", normalizeToNumberOfEvents = True, **_common)])
1414 _multiplicityOfLCinMCL_plots.extend([Plot("multiplicityOfLCinMCL_vs_layercluster_zplus", xtitle="Layer Cluster multiplicity in Multiclusters", ytitle = "Layer Number",
1415  drawCommand = "colz text45", normalizeToNumberOfEvents = True, **_common)])
1416 _multiplicityOfLCinMCL_plots.extend([Plot("multiplicityOfLCinMCL_vs_layercluster_zminus", xtitle="Layer Cluster multiplicity in Multiclusters", ytitle = "Layer Number",
1417  drawCommand = "colz text45", normalizeToNumberOfEvents = True, **_common)])
1418 _multiplicityOfLCinMCL = PlotGroup("MultiplcityofLCinMLC", _multiplicityOfLCinMCL_plots, ncols=2)
1419 
1420 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65}
1421 #--------------------------------------------------------------------------------------------
1422 # z-
1423 #--------------------------------------------------------------------------------------------
1424 _clusternum_in_multicluster_perlayer_zminus_EE = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer_zminus_EE", [
1425  Plot("clusternum_in_multicluster_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm)
1426 ], ncols=7)
1427 
1428 _clusternum_in_multicluster_perlayer_zminus_FH = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer_zminus_FH", [
1429  Plot("clusternum_in_multicluster_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzm,lastLayerFHzm)
1430 ], ncols=7)
1431 
1432 _clusternum_in_multicluster_perlayer_zminus_BH = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer_zminus_BH", [
1433  Plot("clusternum_in_multicluster_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzm,maxlayerzm)
1434 ], ncols=7)
1435 
1436 #--------------------------------------------------------------------------------------------
1437 # z+
1438 #--------------------------------------------------------------------------------------------
1439 _clusternum_in_multicluster_perlayer_zplus_EE = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer_zplus_EE", [
1440  Plot("clusternum_in_multicluster_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(maxlayerzm,lastLayerEEzp)
1441 ], ncols=7)
1442 
1443 _clusternum_in_multicluster_perlayer_zplus_FH = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer_zplus_FH", [
1444  Plot("clusternum_in_multicluster_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerEEzp,lastLayerFHzp)
1445 ], ncols=7)
1446 
1447 _clusternum_in_multicluster_perlayer_zplus_BH = PlotGroup("NumberofLayerClustersinMultiClusterPerLayer_zplus_BH", [
1448  Plot("clusternum_in_multicluster_perlayer{:02d}".format(i), xtitle="", **_common) for i in range(lastLayerFHzp,maxlayerzp)
1449 ], ncols=7)
1450 
1451 #Coming back to the usual box definition
1452 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65 }
1453 
1454 #Some multiclusters quantities
1455 _multicluster_eppe_plots = [Plot("multicluster_eta", xtitle="MultiCluster #eta", **_common)]
1456 _multicluster_eppe_plots.extend([Plot("multicluster_phi", xtitle="MultiCluster #phi", **_common)])
1457 _multicluster_eppe_plots.extend([Plot("multicluster_pt", xtitle="MultiCluster p_{T}", **_common)])
1458 _multicluster_eppe_plots.extend([Plot("multicluster_energy", xtitle="MultiCluster Energy", **_common)])
1459 _multicluster_eppe = PlotGroup("EtaPhiPtEnergy", _multicluster_eppe_plots, ncols=2)
1460 
1461 _multicluster_xyz_plots = [Plot("multicluster_x", xtitle="MultiCluster x", **_common)]
1462 _multicluster_xyz_plots.extend([Plot("multicluster_y", xtitle="MultiCluster y", **_common)])
1463 _multicluster_xyz_plots.extend([Plot("multicluster_z", xtitle="MultiCluster z", **_common)])
1464 _multicluster_xyz = PlotGroup("XYZ", _multicluster_xyz_plots, ncols=3)
1465 
1466 #--------------------------------------------------------------------------------------------
1467 # SIMHITS, DIGIS, RECHITS
1468 #--------------------------------------------------------------------------------------------
1469 
1470 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65, "ymin": 0.1, "ylog": True}
1471 
1472 _HitValidation = PlotGroup("HitValidation", [
1473  Plot("heeEnSim", title="SimHits_EE_Energy", **_common),
1474  Plot("hebEnSim", title="SimHits_HE_Silicon_Energy", **_common),
1475  Plot("hefEnSim", title="SimHits_HE_Scintillator_Energy", **_common),
1476  ])
1477 
1478 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65}
1479 
1480 _Occupancy_EE_zplus = PlotGroup("Occupancy_EE_zplus", [Plot("HitOccupancy_Plus_layer_{:02d}".format(i), title="Occupancy_EE_zplus",
1481  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1482  ], ncols=7)
1483 
1484 _Occupancy_HE_Silicon_zplus = PlotGroup("Occupancy_HE_Silicon_zplus", [Plot("HitOccupancy_Plus_layer_{:02d}".format(i), title="Occupancy_HE_zplus",
1485  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1486  ], ncols=7)
1487 
1488 _Occupancy_HE_Scintillator_zplus = PlotGroup("Occupancy_HE_Scintillator_zplus", [Plot("HitOccupancy_Plus_layer_{:02d}".format(i), title="Occupancy_HE_Scintillator_zplus",
1489  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1490  ], ncols=7)
1491 
1492 _Occupancy_EE_zminus = PlotGroup("Occupancy_EE_zminus", [Plot("HitOccupancy_Minus_layer_{:02d}".format(i), title="Occupancy_EE_zminus",
1493  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1494  ], ncols=7)
1495 
1496 _Occupancy_HE_Silicon_zminus = PlotGroup("Occupancy_HE_Silicon_zminus", [Plot("HitOccupancy_Minus_layer_{:02d}".format(i), title="Occupancy_HE_Silicon_zminus",
1497  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1498  ], ncols=7)
1499 
1500 _Occupancy_HE_Scintillator_zminus = PlotGroup("Occupancy_HE_Scintillator_zminus", [Plot("HitOccupancy_Minus_layer_{:02d}".format(i), title="Occupancy_HE_Scintillator_zminus",
1501  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1502  ], ncols=7)
1503 
1504 _common_etaphi = dict(removeEmptyBins=False, xbinlabelsize=10, xbinlabeloption="d", ymin=None)
1505 
1506 _EtaPhi_EE_zplus = PlotGroup("EtaPhi_EE_zplus", [Plot("EtaPhi_Plus_layer_{:02d}".format(i), title="EtaPhi_EE_zplus",
1507  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_etaphi) for i in range(EE_min,EE_max+1)
1508  ], ncols=7)
1509 
1510 _EtaPhi_HE_Silicon_zplus = PlotGroup("EtaPhi_HE_Silicon_zplus", [Plot("EtaPhi_Plus_layer_{:02d}".format(i), title="EtaPhi_HE_Silicon_zplus",
1511  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_etaphi) for i in range(HESilicon_min,HESilicon_max+1)
1512  ], ncols=7)
1513 
1514 _EtaPhi_HE_Scintillator_zplus = PlotGroup("EtaPhi_HE_Scintillator_zplus", [Plot("EtaPhi_Plus_layer_{:02d}".format(i), title="EtaPhi_HE_Scintillator_zplus",
1515  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_etaphi) for i in range(HEScintillator_min,HEScintillator_max+1)
1516  ], ncols=7)
1517 
1518 _EtaPhi_EE_zminus = PlotGroup("EtaPhi_EE_zminus", [Plot("EtaPhi_Minus_layer_{:02d}".format(i), title="EtaPhi_EE_zminus",
1519  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_etaphi) for i in range(EE_min,EE_max+1)
1520  ], ncols=7)
1521 
1522 _EtaPhi_HE_Silicon_zminus = PlotGroup("EtaPhi_HE_Silicon_zminus", [Plot("EtaPhi_Minus_layer_{:02d}".format(i), title="EtaPhi_HE_Silicon_zminus",
1523  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_etaphi) for i in range(HESilicon_min,HESilicon_max+1)
1524  ], ncols=7)
1525 
1526 _EtaPhi_HE_Scintillator_zminus = PlotGroup("EtaPhi_HE_Scintillator_zminus", [Plot("EtaPhi_Minus_layer_{:02d}".format(i), title="EtaPhi_HE_Scintillator_zminus",
1527  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_etaphi) for i in range(HEScintillator_min,HEScintillator_max+1)
1528  ], ncols=7)
1529 
1530 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65, "ymin": 0.1, "ylog": True}
1531 
1532 _Energy_EE_0 = PlotGroup("Energy_Time_0_EE", [Plot("energy_time_0_layer_{:02d}".format(i), title="Energy_Time_0_EE",
1533  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1534  ], ncols=7)
1535 
1536 _Energy_HE_Silicon_0 = PlotGroup("Energy_Time_0_HE_Silicon", [Plot("energy_time_0_layer_{:02d}".format(i), title="Energy_Time_0_HE_Silicon",
1537  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1538  ], ncols=7)
1539 
1540 _Energy_HE_Scintillator_0 = PlotGroup("Energy_Time_0_HE_Scintillator", [Plot("energy_time_0_layer_{:02d}".format(i), title="Energy_Time_0_HE_Scintillator",
1541  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1542  ], ncols=7)
1543 
1544 _Energy_EE_1 = PlotGroup("Energy_Time_1_EE", [Plot("energy_time_1_layer_{:02d}".format(i), title="Energy_Time_1_EE",
1545  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1546  ], ncols=7)
1547 
1548 _Energy_HE_Silicon_1 = PlotGroup("Energy_Time_1_HE_Silicon", [Plot("energy_time_1_layer_{:02d}".format(i), title="Energy_Time_1_HE_Silicon",
1549  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1550  ], ncols=7)
1551 
1552 _Energy_HE_Scintillator_1 = PlotGroup("Energy_Time_1_HE_Scintillator", [Plot("energy_time_1_layer_{:02d}".format(i), title="Energy_Time_1_HE_Scintillator",
1553  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1554  ], ncols=7)
1555 
1556 _Energy_EE = PlotGroup("Energy_EE", [Plot("energy_layer_{:02d}".format(i), title="Energy_EE",
1557  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1558  ], ncols=7)
1559 
1560 _Energy_HE_Silicon = PlotGroup("Energy_HE_Silicon", [Plot("energy_layer_{:02d}".format(i), title="Energy_HE_Silicon",
1561  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1562  ], ncols=7)
1563 
1564 _Energy_HE_Scintillator = PlotGroup("Energy_HE_Scintillator", [Plot("energy_layer_{:02d}".format(i), title="Energy_HE_Scintillator",
1565  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1566  ], ncols=7)
1567 
1568 _DigiHits_ADC_EE = PlotGroup("ADC_EE", [Plot("ADC_layer_{:02d}".format(i), title="DigiHits_ADC_EE",
1569  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1570  ], ncols=7)
1571 
1572 _DigiHits_ADC_HE_Silicon = PlotGroup("ADC_HE_Silicon", [Plot("ADC_layer_{:02d}".format(i), title="DigiHits_ADC_HE_Silicon",
1573  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1574  ], ncols=7)
1575 
1576 _DigiHits_ADC_HE_Scintillator = PlotGroup("ADC_HE_Scintillator", [Plot("ADC_layer_{:02d}".format(i), title="DigiHits_ADC_HE_Scintillator",
1577  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1578  ], ncols=7)
1579 
1580 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65}
1581 
1582 _DigiHits_Occupancy_EE_zplus = PlotGroup("Occupancy_EE_zplus", [Plot("DigiOccupancy_Plus_layer_{:02d}".format(i), title="DigiHits_Occupancy_EE_zplus",
1583  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1584  ], ncols=7)
1585 
1586 _DigiHits_Occupancy_HE_Silicon_zplus = PlotGroup("Occupancy_HE_Silicon_zplus", [Plot("DigiOccupancy_Plus_layer_{:02d}".format(i), title="DigiHits_Occupancy_HE_Silicon_zplus",
1587  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1588  ], ncols=7)
1589 
1590 _DigiHits_Occupancy_HE_Scintillator_zplus = PlotGroup("Occupancy_HE_Scintillator_zplus", [Plot("DigiOccupancy_Plus_layer_{:02d}".format(i), title="DigiHits_Occupancy_HE_Scintillator_zplus",
1591  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1592  ], ncols=7)
1593 
1594 _DigiHits_Occupancy_EE_zminus = PlotGroup("Occupancy_EE_zminus", [Plot("DigiOccupancy_Minus_layer_{:02d}".format(i), title="DigiHits_Occupancy_EE_zminus",
1595  xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1596  ], ncols=7)
1597 
1598 _DigiHits_Occupancy_HE_Silicon_zminus = PlotGroup("Occupancy_HE_Silicon_zminus", [Plot("DigiOccupancy_Minus_layer_{:02d}".format(i), title="DigiHits_Occupancy_HE_Silicon_zminus",
1599  xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1600  ], ncols=7)
1601 
1602 _DigiHits_Occupancy_HE_Scintillator_zminus = PlotGroup("Occupancy_HE_Scintillator_zminus", [Plot("DigiOccupancy_Minus_layer_{:02d}".format(i), title="DigiHits_Occupancy_HE_Scintillator_zminus",
1603  xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1604  ], ncols=7)
1605 
1606 _common_XY = dict(removeEmptyBins=True, xbinlabelsize=10, xbinlabeloption="d", ymin=None)
1607 
1608 _DigiHits_Occupancy_XY_EE = PlotGroup("Occupancy_XY_EE", [Plot("DigiOccupancy_XY_layer_{:02d}".format(i), title="DigiHits_Occupancy_XY_EE",
1609  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_XY) for i in range(EE_min,EE_max+1)
1610  ], ncols=7)
1611 
1612 _DigiHits_Occupancy_XY_HE_Silicon = PlotGroup("Occupancy_XY_HE_Silicon", [Plot("DigiOccupancy_XY_layer_{:02d}".format(i), title="DigiHits_Occupancy_XY_HE_Silicon",
1613  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_XY) for i in range(HESilicon_min,HESilicon_max+1)
1614  ], ncols=7)
1615 
1616 _DigiHits_Occupancy_XY_HE_Scintillator = PlotGroup("Occupancy_XY_HE_Scintillator", [Plot("DigiOccupancy_XY_layer_{:02d}".format(i), title="DigiHits_Occupancy_XY_HE_Scintillator",
1617  xtitle="Layer {}".format(i), drawStyle="COLZ", adjustMarginRight=0.1, **_common_XY) for i in range(HEScintillator_min,HEScintillator_max+1)
1618  ], ncols=7)
1619 
1620 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65, "ymin": 0.1, "ylog": True}
1621 
1622 _DigiHits_TOA_EE = PlotGroup("TOA_EE", [
1623  Plot("TOA_layer_{:02d}".format(i), title="TOA_EE", xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1624  ], ncols=7)
1625 
1626 _DigiHits_TOA_HE_Silicon = PlotGroup("TOA_HE_Silicon", [
1627  Plot("TOA_layer_{:02d}".format(i), title="TOA_HE_Silicon", xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1628  ], ncols=7)
1629 
1630 _DigiHits_TOA_HE_Scintillator = PlotGroup("TOA_HE_Scintillator", [
1631  Plot("TOA_layer_{:02d}".format(i), title="TOA_HE_Scintillator", xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1632  ], ncols=7)
1633 
1634 _DigiHits_TOT_EE = PlotGroup("TOT_EE", [
1635  Plot("TOT_layer_{:02d}".format(i), title="TOT_EE", xtitle="Layer {}".format(i), **_common) for i in range(EE_min,EE_max+1)
1636  ], ncols=7)
1637 
1638 _DigiHits_TOT_HE_Silicon = PlotGroup("TOT_HE_Silicon", [
1639  Plot("TOT_layer_{:02d}".format(i), title="TOT_HE_Silicon", xtitle="Layer {}".format(i), **_common) for i in range(HESilicon_min,HESilicon_max+1)
1640  ], ncols=7)
1641 
1642 _DigiHits_TOT_HE_Scintillator = PlotGroup("TOT_HE_Scintillator", [
1643  Plot("TOT_layer_{:02d}".format(i), title="TOT_HE_Scintillator", xtitle="Layer {}".format(i), **_common) for i in range(HEScintillator_min,HEScintillator_max+1)
1644  ], ncols=7)
1645 
1646 #===================================================================================================================
1647 #Plot definition for HitCalibration
1648 _common = {"stat": True, "drawStyle": "hist", "staty": 0.65, "ymin": 0.1, "ylog": False}
1649 
1650 _LayerOccupancy = PlotGroup("LayerOccupancy", [
1651  Plot("LayerOccupancy", title="LayerOccupancy", **_common)], ncols=1)
1652 
1653 _ReconstructableEnergyOverCPenergy = PlotGroup("ReconstructableEnergyOverCPenergy", [
1654  Plot("h_EoP_CPene_100_calib_fraction", title="EoP_CPene_100_calib_fraction", **_common),
1655  Plot("h_EoP_CPene_200_calib_fraction", title="EoP_CPene_200_calib_fraction", **_common),
1656  Plot("h_EoP_CPene_300_calib_fraction", title="EoP_CPene_300_calib_fraction", **_common),
1657  Plot("h_EoP_CPene_scint_calib_fraction", title="EoP_CPene_scint_calib_fraction", **_common),
1658 ])
1659 
1660 _ParticleFlowClusterHGCalFromMultiCl_Closest_EoverCPenergy = PlotGroup("ParticleFlowClusterHGCalFromMultiCl", [
1661  Plot("hgcal_EoP_CPene_100_calib_fraction", title="hgcal_EoP_CPene_100_calib_fraction", **_common),
1662  Plot("hgcal_EoP_CPene_200_calib_fraction", title="hgcal_EoP_CPene_200_calib_fraction", **_common),
1663  Plot("hgcal_EoP_CPene_300_calib_fraction", title="hgcal_EoP_CPene_300_calib_fraction", **_common),
1664  Plot("hgcal_EoP_CPene_scint_calib_fraction", title="hgcal_EoP_CPene_scint_calib_fraction", **_common),
1665 ])
1666 
1667 _EcalDrivenGsfElectronsFromMultiCl_Closest_EoverCPenergy = PlotGroup("EcalDrivenGsfElectronsFromMultiCl", [
1668  Plot("hgcal_ele_EoP_CPene_100_calib_fraction", title="hgcal_ele_EoP_CPene_100_calib_fraction", **_common),
1669  Plot("hgcal_ele_EoP_CPene_200_calib_fraction", title="hgcal_ele_EoP_CPene_200_calib_fraction", **_common),
1670  Plot("hgcal_ele_EoP_CPene_300_calib_fraction", title="hgcal_ele_EoP_CPene_300_calib_fraction", **_common),
1671  Plot("hgcal_ele_EoP_CPene_scint_calib_fraction", title="hgcal_ele_EoP_CPene_scint_calib_fraction", **_common),
1672 ])
1673 
1674 _PhotonsFromMultiCl_Closest_EoverCPenergy = PlotGroup("PhotonsFromMultiCl", [
1675  Plot("hgcal_photon_EoP_CPene_100_calib_fraction", title="hgcal_photon_EoP_CPene_100_calib_fraction", **_common),
1676  Plot("hgcal_photon_EoP_CPene_200_calib_fraction", title="hgcal_photon_EoP_CPene_200_calib_fraction", **_common),
1677  Plot("hgcal_photon_EoP_CPene_300_calib_fraction", title="hgcal_photon_EoP_CPene_300_calib_fraction", **_common),
1678  Plot("hgcal_photon_EoP_CPene_scint_calib_fraction", title="hgcal_photon_EoP_CPene_scint_calib_fraction", **_common),
1679 ])
1680 
1681 #=================================================================================================
1682 hgcalLayerClustersPlotter = Plotter()
1683 layerClustersLabel = 'Layer Clusters'
1684 
1685 lc_general = [
1686  # [A] calculated "energy density" for cells in a) 120um, b) 200um, c) 300um, d) scint
1687  # (one entry per rechit, in the appropriate histo)
1688  _cellsenedens_thick,
1689  # [B] number of layer clusters per event in a) 120um, b) 200um, c) 300um, d) scint
1690  # (one entry per event in each of the four histos)
1691  _totclusternum_thick,
1692  # [G] Miscellaneous plots:
1693  # longdepthbarycentre: The longitudinal depth barycentre. One entry per event.
1694  # mixedhitscluster: Number of clusters per event with hits in different thicknesses.
1695  # num_reco_cluster_eta: Number of reco clusters vs eta
1696  _num_reco_cluster_eta,
1697  _energyclustered,
1698  _mixedhitsclusters,
1699  _longdepthbarycentre,
1700  # [H] SelectedCaloParticles plots
1701  _SelectedCaloParticles,
1702 ]
1703 lc_zminus = [
1704  # [C] number of layer clusters per layer (one entry per event in each histo)
1705  _totclusternum_layer_EE_zminus,
1706  _totclusternum_layer_FH_zminus,
1707  _totclusternum_layer_BH_zminus,
1708  # [D] For each layer cluster:
1709  # number of cells in layer cluster, by layer - separate histos in each layer for 120um Si, 200/300um Si, Scint
1710  # NB: not all combinations exist; e.g. no 120um Si in layers with scint.
1711  # (One entry in the appropriate histo per layer cluster).
1712  _cellsnum_perthick_perlayer_120_EE_zminus,
1713  _cellsnum_perthick_perlayer_120_FH_zminus,
1714  _cellsnum_perthick_perlayer_120_BH_zminus,
1715  _cellsnum_perthick_perlayer_200_EE_zminus,
1716  _cellsnum_perthick_perlayer_200_FH_zminus,
1717  _cellsnum_perthick_perlayer_200_BH_zminus,
1718  _cellsnum_perthick_perlayer_300_EE_zminus,
1719  _cellsnum_perthick_perlayer_300_FH_zminus,
1720  _cellsnum_perthick_perlayer_300_BH_zminus,
1721  _cellsnum_perthick_perlayer_scint_EE_zminus,
1722  _cellsnum_perthick_perlayer_scint_FH_zminus,
1723  _cellsnum_perthick_perlayer_scint_BH_zminus,
1724  # [E] For each layer cluster:
1725  # distance of cells from a) seed cell, b) max cell; and c), d): same with entries weighted by cell energy
1726  # separate histos in each layer for 120um Si, 200/300um Si, Scint
1727  # NB: not all combinations exist; e.g. no 120um Si in layers with scint.
1728  # (One entry in each of the four appropriate histos per cell in a layer cluster)
1729  _distancetomaxcell_perthickperlayer_120_EE_zminus,
1730  _distancetomaxcell_perthickperlayer_120_FH_zminus,
1731  _distancetomaxcell_perthickperlayer_120_BH_zminus,
1732  _distancetomaxcell_perthickperlayer_200_EE_zminus,
1733  _distancetomaxcell_perthickperlayer_200_FH_zminus,
1734  _distancetomaxcell_perthickperlayer_200_BH_zminus,
1735  _distancetomaxcell_perthickperlayer_300_EE_zminus,
1736  _distancetomaxcell_perthickperlayer_300_FH_zminus,
1737  _distancetomaxcell_perthickperlayer_300_BH_zminus,
1738  _distancetomaxcell_perthickperlayer_scint_EE_zminus,
1739  _distancetomaxcell_perthickperlayer_scint_FH_zminus,
1740  _distancetomaxcell_perthickperlayer_scint_BH_zminus,
1741  _distancetoseedcell_perthickperlayer_120_EE_zminus,
1742  _distancetoseedcell_perthickperlayer_120_FH_zminus,
1743  _distancetoseedcell_perthickperlayer_120_BH_zminus,
1744  _distancetoseedcell_perthickperlayer_200_EE_zminus,
1745  _distancetoseedcell_perthickperlayer_200_FH_zminus,
1746  _distancetoseedcell_perthickperlayer_200_BH_zminus,
1747  _distancetoseedcell_perthickperlayer_300_EE_zminus,
1748  _distancetoseedcell_perthickperlayer_300_FH_zminus,
1749  _distancetoseedcell_perthickperlayer_300_BH_zminus,
1750  _distancetoseedcell_perthickperlayer_scint_EE_zminus,
1751  _distancetoseedcell_perthickperlayer_scint_FH_zminus,
1752  _distancetoseedcell_perthickperlayer_scint_BH_zminus,
1753  _distancetomaxcell_perthickperlayer_eneweighted_120_EE_zminus,
1754  _distancetomaxcell_perthickperlayer_eneweighted_120_FH_zminus,
1755  _distancetomaxcell_perthickperlayer_eneweighted_120_BH_zminus,
1756  _distancetomaxcell_perthickperlayer_eneweighted_200_EE_zminus,
1757  _distancetomaxcell_perthickperlayer_eneweighted_200_FH_zminus,
1758  _distancetomaxcell_perthickperlayer_eneweighted_200_BH_zminus,
1759  _distancetomaxcell_perthickperlayer_eneweighted_300_EE_zminus,
1760  _distancetomaxcell_perthickperlayer_eneweighted_300_FH_zminus,
1761  _distancetomaxcell_perthickperlayer_eneweighted_300_BH_zminus,
1762  _distancetomaxcell_perthickperlayer_eneweighted_scint_EE_zminus,
1763  _distancetomaxcell_perthickperlayer_eneweighted_scint_FH_zminus,
1764  _distancetomaxcell_perthickperlayer_eneweighted_scint_BH_zminus,
1765  _distancetoseedcell_perthickperlayer_eneweighted_120_EE_zminus,
1766  _distancetoseedcell_perthickperlayer_eneweighted_120_FH_zminus,
1767  _distancetoseedcell_perthickperlayer_eneweighted_120_BH_zminus,
1768  _distancetoseedcell_perthickperlayer_eneweighted_200_EE_zminus,
1769  _distancetoseedcell_perthickperlayer_eneweighted_200_FH_zminus,
1770  _distancetoseedcell_perthickperlayer_eneweighted_200_BH_zminus,
1771  _distancetoseedcell_perthickperlayer_eneweighted_300_EE_zminus,
1772  _distancetoseedcell_perthickperlayer_eneweighted_300_FH_zminus,
1773  _distancetoseedcell_perthickperlayer_eneweighted_300_BH_zminus,
1774  _distancetoseedcell_perthickperlayer_eneweighted_scint_EE_zminus,
1775  _distancetoseedcell_perthickperlayer_eneweighted_scint_FH_zminus,
1776  _distancetoseedcell_perthickperlayer_eneweighted_scint_BH_zminus,
1777  _distancebetseedandmaxcell_perthickperlayer_120_EE_zminus,
1778  _distancebetseedandmaxcell_perthickperlayer_120_FH_zminus,
1779  _distancebetseedandmaxcell_perthickperlayer_120_BH_zminus,
1780  _distancebetseedandmaxcell_perthickperlayer_200_EE_zminus,
1781  _distancebetseedandmaxcell_perthickperlayer_200_FH_zminus,
1782  _distancebetseedandmaxcell_perthickperlayer_200_BH_zminus,
1783  _distancebetseedandmaxcell_perthickperlayer_300_EE_zminus,
1784  _distancebetseedandmaxcell_perthickperlayer_300_FH_zminus,
1785  _distancebetseedandmaxcell_perthickperlayer_300_BH_zminus,
1786  _distancebetseedandmaxcell_perthickperlayer_scint_EE_zminus,
1787  _distancebetseedandmaxcell_perthickperlayer_scint_FH_zminus,
1788  _distancebetseedandmaxcell_perthickperlayer_scint_BH_zminus,
1789  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_EE_zminus,
1790  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_FH_zminus,
1791  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_BH_zminus,
1792  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_EE_zminus,
1793  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_FH_zminus,
1794  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_BH_zminus,
1795  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_EE_zminus,
1796  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_FH_zminus,
1797  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_BH_zminus,
1798  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_EE_zminus,
1799  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_FH_zminus,
1800  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_BH_zminus,
1801  # [F] Looking at the fraction of true energy that has been clustered; by layer and overall
1802  _energyclustered_perlayer_EE_zminus,
1803  _energyclustered_perlayer_FH_zminus,
1804  _energyclustered_perlayer_BH_zminus,
1805  # [I] Score of CaloParticles wrt Layer Clusters
1806  _score_caloparticle_to_layerclusters_zminus,
1807  # [J] Score of LayerClusters wrt CaloParticles
1808  _score_layercluster_to_caloparticles_zminus,
1809  # [K] Shared Energy between CaloParticle and LayerClusters
1810  _sharedEnergy_caloparticle_to_layercluster_zminus,
1811  # [K2] Shared Energy between LayerClusters and CaloParticle
1812  _sharedEnergy_layercluster_to_caloparticle_zminus,
1813  # [L] Cell Association per Layer
1814  _cell_association_table_zminus,
1815  # [M] Efficiency Plots
1816  _efficiencies_zminus,
1817  _efficiencies_zminus_eta,
1818  _efficiencies_zminus_phi,
1819  # [L] Duplicate Plots
1820  _duplicates_zminus,
1821  _duplicates_zminus_eta,
1822  _duplicates_zminus_phi,
1823  # [M] Fake Rate Plots
1824  _fakes_zminus,
1825  _fakes_zminus_eta,
1826  _fakes_zminus_phi,
1827  # [N] Merge Rate Plots
1828  _merges_zminus,
1829  _merges_zminus_eta,
1830  _merges_zminus_phi,
1831  # [O] Energy vs Score 2D plots CP to LC
1832  _energyscore_cp2lc_zminus,
1833  # [P] Energy vs Score 2D plots LC to CP
1834  _energyscore_lc2cp_zminus
1835 ]
1836 lc_zplus = [
1837  # number of layer clusters per layer (one entry per event in each histo)
1838  _totclusternum_layer_EE_zplus,
1839  _totclusternum_layer_FH_zplus,
1840  _totclusternum_layer_BH_zplus,
1841  # number of cells in layer cluster, by layer - separate histos in each layer for 120um Si, 200/300um Si, Scint
1842  _cellsnum_perthick_perlayer_120_EE_zplus,
1843  _cellsnum_perthick_perlayer_120_FH_zplus,
1844  _cellsnum_perthick_perlayer_120_BH_zplus,
1845  _cellsnum_perthick_perlayer_200_EE_zplus,
1846  _cellsnum_perthick_perlayer_200_FH_zplus,
1847  _cellsnum_perthick_perlayer_200_BH_zplus,
1848  _cellsnum_perthick_perlayer_300_EE_zplus,
1849  _cellsnum_perthick_perlayer_300_FH_zplus,
1850  _cellsnum_perthick_perlayer_300_BH_zplus,
1851  _cellsnum_perthick_perlayer_scint_EE_zplus,
1852  _cellsnum_perthick_perlayer_scint_FH_zplus,
1853  _cellsnum_perthick_perlayer_scint_BH_zplus,
1854  # distance of cells from a) seed cell, b) max cell; and c), d): same with entries weighted by cell energy
1855  _distancetomaxcell_perthickperlayer_120_EE_zplus,
1856  _distancetomaxcell_perthickperlayer_120_FH_zplus,
1857  _distancetomaxcell_perthickperlayer_120_BH_zplus,
1858  _distancetomaxcell_perthickperlayer_200_EE_zplus,
1859  _distancetomaxcell_perthickperlayer_200_FH_zplus,
1860  _distancetomaxcell_perthickperlayer_200_BH_zplus,
1861  _distancetomaxcell_perthickperlayer_300_EE_zplus,
1862  _distancetomaxcell_perthickperlayer_300_FH_zplus,
1863  _distancetomaxcell_perthickperlayer_300_BH_zplus,
1864  _distancetomaxcell_perthickperlayer_scint_EE_zplus,
1865  _distancetomaxcell_perthickperlayer_scint_FH_zplus,
1866  _distancetomaxcell_perthickperlayer_scint_BH_zplus,
1867  _distancetoseedcell_perthickperlayer_120_EE_zplus,
1868  _distancetoseedcell_perthickperlayer_120_FH_zplus,
1869  _distancetoseedcell_perthickperlayer_120_BH_zplus,
1870  _distancetoseedcell_perthickperlayer_200_EE_zplus,
1871  _distancetoseedcell_perthickperlayer_200_FH_zplus,
1872  _distancetoseedcell_perthickperlayer_200_BH_zplus,
1873  _distancetoseedcell_perthickperlayer_300_EE_zplus,
1874  _distancetoseedcell_perthickperlayer_300_FH_zplus,
1875  _distancetoseedcell_perthickperlayer_300_BH_zplus,
1876  _distancetoseedcell_perthickperlayer_scint_EE_zplus,
1877  _distancetoseedcell_perthickperlayer_scint_FH_zplus,
1878  _distancetoseedcell_perthickperlayer_scint_BH_zplus,
1879  _distancetomaxcell_perthickperlayer_eneweighted_120_EE_zplus,
1880  _distancetomaxcell_perthickperlayer_eneweighted_120_FH_zplus,
1881  _distancetomaxcell_perthickperlayer_eneweighted_120_BH_zplus,
1882  _distancetomaxcell_perthickperlayer_eneweighted_200_EE_zplus,
1883  _distancetomaxcell_perthickperlayer_eneweighted_200_FH_zplus,
1884  _distancetomaxcell_perthickperlayer_eneweighted_200_BH_zplus,
1885  _distancetomaxcell_perthickperlayer_eneweighted_300_EE_zplus,
1886  _distancetomaxcell_perthickperlayer_eneweighted_300_FH_zplus,
1887  _distancetomaxcell_perthickperlayer_eneweighted_300_BH_zplus,
1888  _distancetomaxcell_perthickperlayer_eneweighted_scint_EE_zplus,
1889  _distancetomaxcell_perthickperlayer_eneweighted_scint_FH_zplus,
1890  _distancetomaxcell_perthickperlayer_eneweighted_scint_BH_zplus,
1891  _distancetoseedcell_perthickperlayer_eneweighted_120_EE_zplus,
1892  _distancetoseedcell_perthickperlayer_eneweighted_120_FH_zplus,
1893  _distancetoseedcell_perthickperlayer_eneweighted_120_BH_zplus,
1894  _distancetoseedcell_perthickperlayer_eneweighted_200_EE_zplus,
1895  _distancetoseedcell_perthickperlayer_eneweighted_200_FH_zplus,
1896  _distancetoseedcell_perthickperlayer_eneweighted_200_BH_zplus,
1897  _distancetoseedcell_perthickperlayer_eneweighted_300_EE_zplus,
1898  _distancetoseedcell_perthickperlayer_eneweighted_300_FH_zplus,
1899  _distancetoseedcell_perthickperlayer_eneweighted_300_BH_zplus,
1900  _distancetoseedcell_perthickperlayer_eneweighted_scint_EE_zplus,
1901  _distancetoseedcell_perthickperlayer_eneweighted_scint_FH_zplus,
1902  _distancetoseedcell_perthickperlayer_eneweighted_scint_BH_zplus,
1903  _distancebetseedandmaxcell_perthickperlayer_120_EE_zplus,
1904  _distancebetseedandmaxcell_perthickperlayer_120_FH_zplus,
1905  _distancebetseedandmaxcell_perthickperlayer_120_BH_zplus,
1906  _distancebetseedandmaxcell_perthickperlayer_200_EE_zplus,
1907  _distancebetseedandmaxcell_perthickperlayer_200_FH_zplus,
1908  _distancebetseedandmaxcell_perthickperlayer_200_BH_zplus,
1909  _distancebetseedandmaxcell_perthickperlayer_300_EE_zplus,
1910  _distancebetseedandmaxcell_perthickperlayer_300_FH_zplus,
1911  _distancebetseedandmaxcell_perthickperlayer_300_BH_zplus,
1912  _distancebetseedandmaxcell_perthickperlayer_scint_EE_zplus,
1913  _distancebetseedandmaxcell_perthickperlayer_scint_FH_zplus,
1914  _distancebetseedandmaxcell_perthickperlayer_scint_BH_zplus,
1915  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_EE_zplus,
1916  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_FH_zplus,
1917  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_120_BH_zplus,
1918  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_EE_zplus,
1919  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_FH_zplus,
1920  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_200_BH_zplus,
1921  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_EE_zplus,
1922  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_FH_zplus,
1923  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_300_BH_zplus,
1924  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_EE_zplus,
1925  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_FH_zplus,
1926  _distancebetseedandmaxcellvsclusterenergy_perthickperlayer_scint_BH_zplus,
1927  # Looking at the fraction of true energy that has been clustered; by layer and overall
1928  _energyclustered_perlayer_EE_zplus,
1929  _energyclustered_perlayer_FH_zplus,
1930  _energyclustered_perlayer_BH_zplus,
1931  # Score of CaloParticles wrt Layer Clusters
1932  _score_caloparticle_to_layerclusters_zplus,
1933  # Score of LayerClusters wrt CaloParticles
1934  _score_layercluster_to_caloparticles_zplus,
1935  # Shared Energy between CaloParticle and LayerClusters
1936  _sharedEnergy_caloparticle_to_layercluster_zplus,
1937  # Shared Energy between LayerClusters and CaloParticle
1938  _sharedEnergy_layercluster_to_caloparticle_zplus,
1939  # Cell Association per Layer
1940  _cell_association_table_zplus,
1941  # Efficiency Plots
1942  _efficiencies_zplus,
1943  _efficiencies_zplus_eta,
1944  _efficiencies_zplus_phi,
1945  # Duplicate Plots
1946  _duplicates_zplus,
1947  _duplicates_zplus_eta,
1948  _duplicates_zplus_phi,
1949  # Fake Rate Plots
1950  _fakes_zplus,
1951  _fakes_zplus_eta,
1952  _fakes_zplus_phi,
1953  # Merge Rate Plots
1954  _merges_zplus,
1955  _merges_zplus_eta,
1956  _merges_zplus_phi,
1957  _energyscore_cp2lc_zplus,
1958  _energyscore_lc2cp_zplus
1959 ]
1960 
1961 def append_hgcalLayerClustersPlots(collection = "hgcalLayerClusters", name_collection = layerClustersLabel):
1962  regions = ["General", "zminus", "zplus"]
1963  setPlots = [lc_general, lc_zminus, lc_zplus]
1964  for reg, setPlot in zip(regions, setPlots):
1965  print(_hgcalFolders(collection))
1966  hgcalLayerClustersPlotter.append(collection+"_"+reg, [
1967  _hgcalFolders(collection)
1968  ], PlotFolder(
1969  *setPlot,
1970  loopSubFolders=False,
1971  purpose=PlotPurpose.Timing, page=layerClustersLabel, section=reg))
1972 
1973 #=================================================================================================
1974 def _hgcalFolders(lastDirName="hgcalLayerClusters"):
1975  return "DQMData/Run 1/HGCAL/Run summary/HGCalValidator/"+lastDirName
1976 
1977 _multiclustersAllPlots = [
1978  _efficiencies,
1979  _duplicates,
1980  _fakes,
1981  _merges,
1982  _multicluster_eppe,
1983  _multicluster_xyz,
1984  _totmulticlusternum,
1985  _score_caloparticle_to_multiclusters,
1986  _score_multicluster_to_caloparticles,
1987  _sharedEnergy_caloparticle_to_multicluster,
1988  _sharedEnergy_multicluster_to_caloparticle,
1989  #_energyscore_cp2mcl_mcl2cp,
1990  _energyscore_cp2mcl,
1991  _energyscore_mcl2cp,
1992  _clusternum_in_multicluster,
1993  _clusternum_in_multicluster_vs_layer,
1994  _clusternum_in_multicluster_perlayer_zminus_EE,
1995  _clusternum_in_multicluster_perlayer_zminus_FH,
1996  _clusternum_in_multicluster_perlayer_zminus_BH,
1997  _clusternum_in_multicluster_perlayer_zplus_EE,
1998  _clusternum_in_multicluster_perlayer_zplus_FH,
1999  _clusternum_in_multicluster_perlayer_zplus_BH,
2000  _multicluster_layernum,
2001  _multiplicityOfLCinMCL,
2002 ]
2003 
2004 hgcalMultiClustersPlotter = Plotter()
2005 def append_hgcalMultiClustersPlots(collection = 'ticlMultiClustersFromTrackstersMerge', name_collection = "MultiClustersMerge"):
2006  # Appending all plots for MCs
2007  hgcalMultiClustersPlotter.append(collection, [
2008  _hgcalFolders(collection)
2009  ], PlotFolder(
2010  *_multiclustersAllPlots,
2011  loopSubFolders=False,
2012  purpose=PlotPurpose.Timing, page="MultiClusters", section=name_collection))
2013 
2014  #We append here two PlotFolder because we want the text to be in percent
2015  #and the number of events are different in zplus and zminus
2016  #hgcalMultiClustersPlotter.append("Multiplicity", [
2017  # dqmfolder
2018  # ], PlotFolder(
2019  # _multiplicityOfLCinMCL_vs_layercluster_zminus,
2020  # loopSubFolders=False,
2021  # purpose=PlotPurpose.Timing, page=collection,
2022  # numberOfEventsHistogram=_multiplicity_zminus_numberOfEventsHistogram
2023  # ))
2024  #
2025  #hgcalMultiClustersPlotter.append("Multiplicity", [
2026  # dqmfolder
2027  # ], PlotFolder(
2028  # _multiplicityOfLCinMCL_vs_layercluster_zplus,
2029  # loopSubFolders=False,
2030  # purpose=PlotPurpose.Timing, page=collection,
2031  # numberOfEventsHistogram=_multiplicity_zplus_numberOfEventsHistogram
2032  # ))
2033 
2034 
2035 #=================================================================================================
2036 # hitValidation
2037 def _hgcalHitFolders(dirName="HGCalSimHitsV/HGCalEESensitive"):
2038  return "DQMData/Run 1/HGCAL/Run summary/"+dirName
2039 
2040 hgcalHitPlotter = Plotter()
2041 hitsLabel = 'Hits'
2042 simHitsLabel = 'Simulated Hits'
2043 
2044 hgcalHitPlotter.append("SimHits_Validation", [
2045  "DQMData/Run 1/HGCAL/Run summary/HGCalSimHitsV/HitValidation",
2046  ], PlotFolder(
2047  _HitValidation,
2048  loopSubFolders=False,
2049  purpose=PlotPurpose.Timing, page=hitsLabel, section=simHitsLabel
2050  ))
2051 
2052 def append_hgcalHitsPlots(collection = "HGCalSimHitsV", name_collection = "Simulated Hits"):
2053  _hitsCommonPlots_EE = [
2054  _Occupancy_EE_zplus,
2055  _Occupancy_EE_zminus,
2056  _EtaPhi_EE_zminus,
2057  _EtaPhi_EE_zplus
2058  ]
2059  _hitsCommonPlots_HE_Sil = [
2060  _Occupancy_HE_Silicon_zplus,
2061  _Occupancy_HE_Silicon_zminus,
2062  _EtaPhi_HE_Silicon_zminus,
2063  _EtaPhi_HE_Silicon_zplus
2064  ]
2065  _hitsCommonPlots_HE_Sci = [
2066  _Occupancy_HE_Scintillator_zplus,
2067  _Occupancy_HE_Scintillator_zminus,
2068  _EtaPhi_HE_Scintillator_zminus,
2069  _EtaPhi_HE_Scintillator_zplus
2070  ]
2071 
2072  regions = ["HGCalEESensitive", "HGCalHESiliconSensitive", "HGCalHEScintillatorSensitive"]
2073  setPlots = [_hitsCommonPlots_EE, _hitsCommonPlots_HE_Sil, _hitsCommonPlots_HE_Sci]
2074  if "SimHits" in collection :
2075  _hitsCommonPlots_EE.append(_Energy_EE_0)
2076  _hitsCommonPlots_EE.append(_Energy_EE_1)
2077  _hitsCommonPlots_HE_Sil.append(_Energy_HE_Silicon_0)
2078  _hitsCommonPlots_HE_Sil.append( _Energy_HE_Silicon_1)
2079  _hitsCommonPlots_HE_Sil.append(_Energy_HE_Scintillator_0)
2080  _hitsCommonPlots_HE_Sil.append(_Energy_HE_Scintillator_1)
2081  if "RecHits" in collection :
2082  _hitsCommonPlots_EE.append(_Energy_EE)
2083  _hitsCommonPlots_HE_Sil.append(_Energy_HE_Silicon)
2084  _hitsCommonPlots_HE_Sil.append(_Energy_HE_Scintillator)
2085 
2086  for reg, setPlot in zip(regions, setPlots):
2087  dirName = collection+"/"+reg
2088  print(dirName)
2089  hgcalHitPlotter.append(collection, [
2090  _hgcalHitFolders(dirName)
2091  ], PlotFolder(
2092  *setPlot,
2093  loopSubFolders=False,
2094  purpose=PlotPurpose.Timing, page=hitsLabel, section=name_collection))
2095 
2096 _digisCommonPlots_EE = [
2097  _DigiHits_Occupancy_EE_zplus,
2098  _DigiHits_Occupancy_EE_zminus,
2099  _DigiHits_Occupancy_XY_EE,
2100  _DigiHits_ADC_EE,
2101  _DigiHits_TOA_EE,
2102  _DigiHits_TOT_EE,
2103 ]
2104 _digisCommonPlots_HE_Sil = [
2105  _DigiHits_Occupancy_HE_Silicon_zplus,
2106  _DigiHits_Occupancy_HE_Silicon_zminus,
2107  _DigiHits_Occupancy_XY_HE_Silicon,
2108  _DigiHits_ADC_HE_Silicon,
2109  _DigiHits_TOA_HE_Silicon,
2110  _DigiHits_TOT_HE_Silicon,
2111 ]
2112 _digisCommonPlots_HE_Sci = [
2113  _DigiHits_Occupancy_HE_Scintillator_zplus,
2114  _DigiHits_Occupancy_HE_Scintillator_zminus,
2115  _DigiHits_Occupancy_XY_HE_Scintillator,
2116  _DigiHits_ADC_HE_Scintillator,
2117  _DigiHits_TOA_HE_Scintillator,
2118  _DigiHits_TOT_HE_Scintillator,
2119 ]
2120 
2121 def append_hgcalDigisPlots(collection = "HGCalDigisV", name_collection = "Digis"):
2122  regions = ["HGCalEESensitive", "HGCalHESiliconSensitive", "HGCalHEScintillatorSensitive"]
2123  setPlots = [_digisCommonPlots_EE, _digisCommonPlots_HE_Sil, _digisCommonPlots_HE_Sci]
2124  for reg, setPlot in zip(regions, setPlots):
2125  dirName = collection+"/"+reg
2126  print(dirName)
2127  hgcalHitPlotter.append(name_collection, [
2128  _hgcalHitFolders(dirName)
2129  ], PlotFolder(
2130  *setPlot,
2131  loopSubFolders=False,
2132  purpose=PlotPurpose.Timing, page=hitsLabel, section=name_collection))
2133 
2134 #=================================================================================================
2135 # hitCalibration
2136 hgcalHitCalibPlotter = Plotter()
2137 hitCalibrationLabel = 'Calibrated RecHits'
2138 
2139 hgcalHitCalibPlotter.append("Layer_Occupancy", [
2140  "DQMData/Run 1/HGCalHitCalibration/Run summary",
2141  ], PlotFolder(
2142  _LayerOccupancy,
2143  loopSubFolders=False,
2144  purpose=PlotPurpose.Timing, page=hitCalibrationLabel, section=hitCalibrationLabel
2145  ))
2146 hgcalHitCalibPlotter.append("ReconstructableEnergyOverCPenergy", [
2147  "DQMData/Run 1/HGCalHitCalibration/Run summary",
2148  ], PlotFolder(
2149  _ReconstructableEnergyOverCPenergy,
2150  loopSubFolders=False,
2151  purpose=PlotPurpose.Timing, page=hitCalibrationLabel, section=hitCalibrationLabel
2152  ))
2153 
2154 hgcalHitCalibPlotter.append("ParticleFlowClusterHGCalFromMultiCl_Closest_EoverCPenergy", [
2155  "DQMData/Run 1/HGCalHitCalibration/Run summary",
2156  ], PlotFolder(
2157  _ParticleFlowClusterHGCalFromMultiCl_Closest_EoverCPenergy,
2158  loopSubFolders=False,
2159  purpose=PlotPurpose.Timing, page=hitCalibrationLabel, section=hitCalibrationLabel
2160  ))
2161 
2162 hgcalHitCalibPlotter.append("PhotonsFromMultiCl_Closest_EoverCPenergy", [
2163  "DQMData/Run 1/HGCalHitCalibration/Run summary",
2164  ], PlotFolder(
2165  _PhotonsFromMultiCl_Closest_EoverCPenergy,
2166  loopSubFolders=False,
2167  purpose=PlotPurpose.Timing, page=hitCalibrationLabel, section=hitCalibrationLabel
2168  ))
2169 
2170 hgcalHitCalibPlotter.append("EcalDrivenGsfElectronsFromMultiCl_Closest_EoverCPenergy", [
2171  "DQMData/Run 1/HGCalHitCalibration/Run summary",
2172  ], PlotFolder(
2173  _EcalDrivenGsfElectronsFromMultiCl_Closest_EoverCPenergy,
2174  loopSubFolders=False,
2175  purpose=PlotPurpose.Timing, page=hitCalibrationLabel, section=hitCalibrationLabel
2176  ))
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
hgcalPlots.append_hgcalDigisPlots
def append_hgcalDigisPlots(collection="HGCalDigisV", name_collection="Digis")
Definition: hgcalPlots.py:2121
hgcalPlots.append_hgcalMultiClustersPlots
def append_hgcalMultiClustersPlots(collection='ticlMultiClustersFromTrackstersMerge', name_collection="MultiClustersMerge")
Definition: hgcalPlots.py:2005
hgcalPlots._hgcalHitFolders
def _hgcalHitFolders(dirName="HGCalSimHitsV/HGCalEESensitive")
Definition: hgcalPlots.py:2037
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
hgcalPlots.append_hgcalHitsPlots
def append_hgcalHitsPlots(collection="HGCalSimHitsV", name_collection="Simulated Hits")
Definition: hgcalPlots.py:2052
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition: L1TStage2CaloLayer1.h:41
hgcalPlots._hgcalFolders
def _hgcalFolders(lastDirName="hgcalLayerClusters")
Definition: hgcalPlots.py:1974
format
hgcalPlots.append_hgcalLayerClustersPlots
def append_hgcalLayerClustersPlots(collection="hgcalLayerClusters", name_collection=layerClustersLabel)
Definition: hgcalPlots.py:1961