253 n = lArDQGlobals.Feedthrough_Slot_Nbins.get(partition, 1)
254 bins = lArDQGlobals.Feedthrough_Slot_range.get(partition, (0., 1.))
256 if partition.startswith(
'EMB'):
257 if len(lArDQGlobals.Feedthrough_Slot_labels_Barrel) == n:
258 labels = lArDQGlobals.Feedthrough_Slot_labels_Barrel
259 elif len(lArDQGlobals.Feedthrough_Slot_labels_Endcap) == n:
260 labels = lArDQGlobals.Feedthrough_Slot_labels_Endcap
266 'ybins': lArDQGlobals.FEB_N_channels,
268 'ymax': lArDQGlobals.FEB_N_channels - 0.5,
270 if _USE_LEGACY_BINNING_IN_ENDCAPS
and not partition.startswith(
'EMB'):
273 (14, 15), (29, 30), (48, 60), (74, 75), (89, 105), (119, 120),
274 (134, 135), (153, 165), (179, 180), (194, 195), (209, 210),
275 (224, 225), (243, 255), (269, 270), (284, 285), (299, 300),
276 (314, 315), (333, 345), (359, 360), (374, 375)
279 (1, 49), (56, 154), (161, 244), (251, 334), (341, 375)
281 'FCal': [(1, 90), (106, 375)],
284 for b
in merged_bins[partition[:-1]]:
285 bins += [x + 0.5
for x
in range(
int(bins[-1] + 0.5), b[0])]
286 bins.append(b[1] + 0.5)
287 axis_ranges[
'xbins'] = bins
289 if n > 1
and axis_ranges[
'xmax'] > axis_ranges[
'xmin']:
290 labels = [
''] * (len(bins) - 1)
291 coeff = n / (axis_ranges[
'xmax'] - axis_ranges[
'xmin'])
292 nslots = lArDQGlobals.FEB_Slot[partition][1]
293 for b, x
in enumerate(bins[:-1]):
294 i = (
int(coeff * (x - axis_ranges[
'xmin'])))
296 if bins[b+1] - x < 1.5
and 0 <= i < n:
297 txt = axis_ranges[
'xlabels'][i]
298 if txt
not in labels:
300 axis_ranges[
'xlabels'] = labels
302 axis_ranges.pop(
'xlabels')
303 axis_ranges.pop(
'xmin')
304 axis_ranges.pop(
'xmax')