21 monAlg = helper.addAlgorithm(algConfObj,
'DQTDetSynchMonAlg')
22 monAlg.run2Compat = run2Compat
27 bcidg = helper.addGroup(monAlg,
'bcid',
'GLOBAL/DQTSynch/BCID')
28 l1idg = helper.addGroup(monAlg,
'l1id',
'GLOBAL/DQTSynch/L1ID')
29 bfieldg = helper.addGroup(monAlg,
'bfield',
'GLOBAL/DQTSynch/Bfield')
31 bcidg.defineHistogram(
"diffx,diffy;m_BCID",
32 title=
"BCID subdetector summary",
34 xbins=7, xmin=-0.5, xmax=6.5,
35 ybins=7, ymin=-0.5, ymax=6.5,
36 xlabels = [
"CTP",
"SCT",
"TRT",
"LAr",
37 "Tile",
"RPC",
"Pixel"],
38 ylabels = [
"CTP",
"SCT",
"TRT",
"LAr",
39 "Tile",
"RPC",
"Pixel"]
41 bcidg.defineHistogram(
"bcidrates_idx,bcidrates;m_BCID_rate",
42 title=
"BCID subdetector rate summary",
44 xbins=6, xmin=0.5, xmax=6.5,
45 ybins=20, ymin=0.0, ymax=1.0,
46 xlabels = [
"SCT",
"TRT",
"LAr",
47 "Tile",
"RPC",
"Pixel"]
50 l1idg.defineHistogram(
"diffx,diffy;m_L1ID",
51 title=
"L1ID subdetector summary",
53 xbins=7, xmin=-0.5, xmax=6.5,
54 ybins=7, ymin=-0.5, ymax=6.5,
55 xlabels = [
"CTP",
"SCT",
"TRT",
"LAr",
56 "Tile",
"RPC",
"Pixel"],
57 ylabels = [
"CTP",
"SCT",
"TRT",
"LAr",
58 "Tile",
"RPC",
"Pixel"]
61 detlist = [
'CTP',
'SCT',
'TRT',
'LAR',
'Tile',
'RPC',
'Pixel']
63 bcidg.defineHistogram(
"%sbcid;m_%s_BCID" % (det.lower(), det),
64 title=((
"BCID of %s" % det) +
65 (
" detector" if det !=
'CTP' else '')),
67 xbins=4096, xmin=-0.5, xmax=4095.5)
68 l1idg.defineHistogram(
"%sl1id;m_%s_L1ID" % (det.lower(), det),
69 title=(
"L1ID of %s detector" % det),
71 xbins=(10000
if det ==
'CTP' else 1000),
72 xmin=-0.5, xmax=9999.5)
75 for i1, det1
in enumerate(detlist):
76 for i2, det2
in enumerate(detlist[i1+1:]):
77 didx1, didx2 = i1, i2+i1+1
78 if run2Compat
and det2 ==
'Pixel':
79 didx1, didx2 = didx2, didx1
80 det1, det2 = det2, det1
82 bcidg.defineHistogram(
'diff_%1d_%1d;m_diff_%s_%s_BCID' % (didx1, didx2, det1, det2),
83 title=
'BCID difference between %s and %s detectors' % (det1, det2),
85 opt=(
'kRebinAxes' if not run2Compat
and not isOnline
else ''), merge=
'merge',
86 xbins=51, xmin=-25.5, xmax=25.5)
89 l1idg.defineHistogram(
'diff_%1d_%1d;m_diff_%s_%s_L1ID' % (didx1, didx2, det1, det2),
90 title=
'L1ID difference between %s and %s detectors' % (det1, det2),
92 opt=(
'kRebinAxes' if not run2Compat
and not isOnline
else ''), merge=
'merge',
93 xbins=51, xmin=-25.5, xmax=25.5)
95 if run2Compat
and not isOnline:
97 bcidg.defineHistogram(
'diff_%1d_%1d;m_diff_%s_%s_BCID_Rebin' % (didx1, didx2, det1, det2),
98 title=
'BCID difference between %s and %s detectors. Full Range.' % (det1, det2),
100 opt=
'kRebinAxes', merge=
'merge',
101 xbins=51, xmin=-25.5, xmax=25.5)
104 l1idg.defineHistogram(
'diff_%1d_%1d;m_diff_%s_%s_L1ID_Rebin' % (didx1, didx2, det1, det2),
105 title=
'L1ID difference between %s and %s detectors. Full Range.' % (det1, det2),
107 opt=
'kRebinAxes', merge=
'merge',
108 xbins=51, xmin=-25.5, xmax=25.5)
111 or (det1 ==
'Pixel' and det2 ==
'CTP'))
113 if run2Compat
and det1 ==
'Pixel':
115 didx1, didx2, det1, det2 = didx2, didx1, det2, det1
116 bcidg.defineHistogram(
'LB,diff_%1d_%1d;m_diff_%s_%s_BCID_lumi' % (didx1, didx2, det1, det2),
117 title=
'BCID difference between %s and %s detectors as a function of the LumiBlock' % (det1, det2),
119 opt=
'kAddBinsDynamically', merge=
'merge',
120 xbins=30, xmin=0., xmax=30)
122 l1idg.defineHistogram(
'LB,diff_%1d_%1d;m_diff_%s_%s_L1ID_lumi' % (didx1, didx2, det1, det2),
123 title=
'L1ID difference between %s and %s detectors as a function of the LumiBlock' % (det1, det2),
125 opt=
'kAddBinsDynamically', merge=
'merge',
126 xbins=30, xmin=0., xmax=30)
128 bfieldg.defineHistogram(
"solenoid_bz;m_Bfield_solenoid",
129 title=
"Bz of Solenoid",
130 type=
'TH1I', xbins=50, xmin=-1, xmax=4)
131 bfieldg.defineHistogram(
"toroid_bx;m_Bfield_toroid",
132 title=
"Bx of Toroid",
133 type=
'TH1I', xbins=50, xmin=-1, xmax=4)
134 bfieldg.defineHistogram(
"LB,solenoid_bz;m_Bfield_solenoid_vsLB",
135 title=
"Bz of Solenoid vs LB",
136 opt=
'kAddBinsDynamically', merge=
'merge',
137 type=
'TProfile', xbins=1500, xmin=-0.5, xmax=1499.5)
138 bfieldg.defineHistogram(
"LB,toroid_bx;m_Bfield_toroid_vsLB",
139 title=
"Bx of Toroid vs LB",
140 opt=
'kAddBinsDynamically', merge=
'merge',
141 type=
'TProfile', xbins=1500, xmin=-0.5, xmax=1499.5)