6 '''Function to configure LVL1 BSMonitoring algorithm in the monitoring system.'''
9 local_logger = logging.getLogger(
'AthenaMonitoringCfg')
10 info = local_logger.info
11 from AthenaConfiguration.ComponentFactory
import CompFactory
12 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
16 from AthenaMonitoring
import AthMonitorCfgHelper
17 helper = AthMonitorCfgHelper(inputFlags,
'BSMonitoringCfg')
20 BSMonAlg = helper.addAlgorithm(CompFactory.TrigT1CTMonitoring.BSMonitoringAlgorithm,
'BSMonAlg')
23 ProcessRoIBResult =
True
24 InclusiveTriggerThresholds =
True
25 ProcessMuctpiData =
True
26 ProcessMuctpiDataRIO =
True
30 isSimulation = inputFlags.Input.isMC
32 info(
'In BSMonitoringConfig SIM or not?: %s', isSimulation)
34 if inputFlags.Common.isOnline:
36 ProcessRoIBResult =
True
37 InclusiveTriggerThresholds =
True
38 ProcessMuctpiData =
True
39 ProcessMuctpiDataRIO =
False
68 if not inputFlags.Reco.EnableCombinedMuon:
70 info(
'In BSMonitoringConfig: rec.doMuon=True & SIM')
71 ProcessRoIBResult =
False
72 InclusiveTriggerThresholds =
False
73 ProcessMuctpiData =
False
74 ProcessMuctpiDataRIO =
False
77 info(
'In BSMonitoringConfig: rec.doMuon=True & DATA')
78 ProcessRoIBResult =
False
79 InclusiveTriggerThresholds =
False
80 ProcessMuctpiData =
False
81 ProcessMuctpiDataRIO =
False
86 info(
'In BSMonitoringConfig: rec.doMuon=False & SIM')
87 ProcessRoIBResult =
True
88 ProcessMuctpiData =
False
89 ProcessMuctpiDataRIO =
False
93 info(
'In BSMonitoringConfig: rec.doMuon=False & DATA')
94 ProcessRoIBResult =
True
95 ProcessMuctpiData =
True
96 ProcessMuctpiDataRIO =
False
101 from AthenaConfiguration.AutoConfigFlags
import GetFileMD
102 metadata =
GetFileMD(inputFlags.Input.Files)
103 if len(inputFlags.Input.Files)!=1:
print(
"INFO: more than one file. DetMask check may fail")
106 if 'detectorMask' in metadata:
108 detmask_unformatted=metadata[
'detectorMask'][0]
109 detmask=f
'{detmask_unformatted:032x}'
110 x = eformat.helper.DetectorMask(detmask)
111 if not x.is_set(eformat.helper.SubDetector.TDAQ_MUON_CTP_INTERFACE):
112 ProcessMuctpiData=
False
113 print(
"INFO: MUCTPI is not in det mask; skipping muctpi algos")
116 from AthenaConfiguration.Enums
import LHCPeriod
117 isRun3 = inputFlags.GeoModel.Run
is LHCPeriod.Run3
118 BSMonAlg.isRun3 = isRun3
120 BSMonAlg.ProcessMuctpiData =
False
121 BSMonAlg.ProcessMuctpiDataRIO =
False
123 BSMonAlg.isSimulation = isSimulation
124 BSMonAlg.ProcessRoIBResult = ProcessRoIBResult
125 BSMonAlg.InclusiveTriggerThresholds = InclusiveTriggerThresholds
126 BSMonAlg.ProcessMuctpiData = ProcessMuctpiData
127 BSMonAlg.ProcessMuctpiDataRIO = ProcessMuctpiDataRIO
128 BSMonAlg.RunOnESD = RunOnESD
129 BSMonAlg.CompareRerun = CompareRerun
130 BSMonAlg.ProcessCTPData = ProcessCTPData
131 DefaultBcIntervalInNs = 24.9507401
132 BSMonAlg.DefaultBcIntervalInNs = DefaultBcIntervalInNs
133 BSMonAlg.BCsPerTurn = 3564
134 LumiBlockTimeCoolFolderName =
'/TRIGGER/LUMI/LBLB"'
135 BSMonAlg.LumiBlockTimeCoolFolderName = LumiBlockTimeCoolFolderName
139 DataTakingModeCoolFolderName =
'/TDAQ/RunCtrl/DataTakingMode'
140 BSMonAlg.DataTakingModeCoolFolderName = DataTakingModeCoolFolderName
141 IgnorePatterns = [
"L1_TRT",
"L1_ZB",
"_AFP",
"L1_BPTX",
"L1_BCM",
"L1_LUCID"]
142 BSMonAlg.IgnorePatterns = IgnorePatterns
145 groupName =
'CTPMonitor'
146 BSMonAlg.PackageName = groupName
148 myGroup = helper.addGroup(BSMonAlg, groupName , mainDir)
150 if isRun3
and ProcessMuctpiData:
152 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import MuCTPIPhase1ByteStreamAlgoCfg
158 errorSummaryBinLabels = [
159 "CTP/ROD BCID Offset",
161 "CTP/MuCTPI BCID Offset",
162 "Wrong Cand Word Number",
163 "Wrong Pt in Mult Word",
166 "Cand BC Out of Range",
167 "Invalid Lumi Block",
173 "Incomplete fragment",
174 "Missing orbit pulse",
175 "MuCTPI/noRPC candidate mismatch",
176 "MuCTPI/noTGC candidate mismatch",
177 "RPC/noMuCTPI candidate mismatch",
178 "GC/noMuCTPI candidate mismatch"
180 incompleteFragmentTypeBinLabels = [
193 myGroup.defineHistogram(
'errorSummaryX,errorSummaryY;errorSummary',title=
'CTP and MuCTPI errors; ; Error ratio',
194 type=
'TProfile', path=
"", xbins=20, xmin=0.5, xmax=20.5, ymin=-1., ymax=2., xlabels=errorSummaryBinLabels, opt=
'kAlwaysCreate')
197 myGroup.defineHistogram(
'errorSummaryPerLumiBlockX,errorSummaryPerLumiBlockY;errorSummaryPerLumiBlock',title=
'Errors per lumi block; LB number; Errors',
198 type=
'TH2F',path=
'',xbins=2000,xmin=0.5,xmax=2000.5,ybins=20,ymin=0.5,ymax=20.5,ylabels=errorSummaryBinLabels, opt=
'kAlwaysCreate')
201 myGroup.defineHistogram(
'errorPerLumiBlockX;errorPerLumiBlock', title=
'Number of errors per lumi block; LB number; Errors',
202 path=
'',xbins=2001,xmin=-0.5,xmax=2000.5,opt=
'kAlwaysCreate')
204 myGroup.defineHistogram(
'incompleteFragmentTypeX;incompleteFragmentType', title=
'Number of missing fragments per type; Fragment type; Number of incomplete fragments ',
205 path=
'',xbins=7,xmin=-0.5,xmax=7.5, xlabels=incompleteFragmentTypeBinLabels, opt=
'kAlwaysCreate')
209 myGroup.defineHistogram(
'deltaBcidX;deltaBcid', title=
'CTP Data BCID - ROD Header BCID; #DeltaBCID; Entries',
210 path=monCTPPath,xbins=401,xmin=-200.5,xmax=200.5,opt=
'kAlwaysCreate')
212 myGroup.defineHistogram(
'triggerTypeX;triggerType', title=
'Trigger Type; Trigger Type; Entries',
213 path=monCTPPath,xbins=256,xmin=-0.5,xmax=255.5,opt=
'kAlwaysCreate')
215 myGroup.defineHistogram(
'timeSinceLBStartX;timeSinceLBStart', title=
'Time Since LB Start; Time After New LB (ms); Entries',
216 path=monCTPPath,xbins=1000,xmin=-500,xmax=1500,opt=
'kAlwaysCreate')
218 myGroup.defineHistogram(
'timeUntilLBEndX;timeUntilLBEnd', title=
'Time Until LB End; Time Until Next LB (ms); Entries',
219 path=monCTPPath,xbins=1000,xmin=-500,xmax=1500,opt=
'kAlwaysCreate')
221 myGroup.defineHistogram(
'timeSinceL1AX;timeSinceL1A', title=
'Time since last L1A; Time since last L1A (ms); Entries',
222 path=monCTPPath,xbins=2000,xmin=-1,xmax=30,opt=
'kAlwaysCreate')
224 myGroup.defineHistogram(
'turnCounterTimeErrorX;turnCounterTimeError', title=
'Error of time based on turn counter and BCID; t_{TC+BCID}-t_{GPS} [#mus]; Entries',
225 path=monCTPPath,xbins=2000,xmin=-1000.,xmax=1000.,opt=
'kAlwaysCreate')
228 myGroup.defineHistogram(
'turnCounterTimeErrorVsLbX,turnCounterTimeErrorVsLbY,turnCounterTimeErrorVsLbZ;turnCounterTimeErrorVsLb',
229 title=
'Error of (TC+BCID)-based time vs. LB; LB; t_{TC+BCID}-t_{GPS} [#mus]',
230 type=
'TProfile2D', path=monCTPPath, xbins=2001, ybins=2001, xmin=-0.5, xmax=2000.5, ymin=-1000., ymax=1000, opt=
'kAlwaysCreate')
232 myGroup.defineHistogram(
'pitBCX,pitBCY;pitBC',title=
'CTP BC vs. PIT; PIT; BC',
233 type=
'TH2F',path=monCTPPath, xbins=320,xmin=-0.5,xmax=319.5,ybins=127,ymin=-63.5,ymax=63.5,opt=
'kAlwaysCreate')
235 myGroup.defineHistogram(
'pitFirstBCX,pitFirstBCY;pitFirstBC',title=
'First CTP BC vs. PIT; PIT; BC',
236 type=
'TH2F',path=monCTPPath, xbins=320,xmin=-0.5,xmax=319.5,ybins=127,ymin=-63.5,ymax=63.5,opt=
'kAlwaysCreate')
238 myGroup.defineHistogram(
'tavX;tav', title=
'Trigger Items After Veto; CTP TAV; Entries',
239 path=monCTPPath,xbins=512,xmin=-0.5,xmax=511.5,opt=
'kAlwaysCreate')
241 myGroup.defineHistogram(
'ctpStatus1X;ctpStatus1', title=
'CTP Status Word 1; Bit; Number of times ON',
242 path=monCTPPath,xbins=24,xmin=-0.5,xmax=23.5,opt=
'kAlwaysCreate')
244 myGroup.defineHistogram(
'ctpStatus2X;ctpStatus2', title=
'CTP Status Word 2; Bit; Number of times ON',
245 path=monCTPPath,xbins=24,xmin=-0.5,xmax=23.5,opt=
'kAlwaysCreate')
247 myGroup.defineHistogram(
'l1ItemsBPSimMismatchX;l1ItemsBPSimMismatch', title=
'Sim mismatch L1 Items before prescale',
248 path=monCTPPath,xbins=512,xmin=0,xmax=512,opt=
'kAlwaysCreate')
250 myGroup.defineHistogram(
'l1ItemsBPSimMismatchItemsX;l1ItemsBPSimMismatchItems', title=
'Sim mismatch L1 Items before prescale, mismatched ones only',
251 path=monCTPPath,xbins=512,xmin=0,xmax=512,opt=
'kAlwaysCreate')
256 monMUCTPIPath=
"/MUCTPI/"
258 myGroup.defineHistogram(
'nCandidatesX;nCandidates', title=
'Number of MuCTPI candidates from mult word; Multiplicity; Entries',
259 path=monMUCTPIPath,xbins=11,xmin=-0.5,xmax=10.5,opt=
'kAlwaysCreate')
261 myGroup.defineHistogram(
'nCandidatesDataWordX;nCandidatesDataWord', title=
'Number of MuCTPI candidates from data word; Multiplicity; Entries',
262 path=monMUCTPIPath,xbins=100,xmin=-0.5,xmax=99.5,opt=
'kAlwaysCreate')
264 myGroup.defineHistogram(
'ptX;pt', title=
'Candidate p_{T} distribution from mult word; p_{T} threshold; Entries',
265 path=monMUCTPIPath,xbins=6,xmin=0.5,xmax=6.5,opt=
'kAlwaysCreate')
267 myGroup.defineHistogram(
'nCandidatesPtX,nCandidatesPtY;nCandidatesPt', title=
'Number of MuCTPI candidates from mult word vs p_{T}; p_{T} threshold; MuCTPI candidates',
268 type=
'TH2F',path=monMUCTPIPath,xbins=6,xmin=0.5,xmax=6.5,ybins=8,ymin=-0.5,ymax=7.5,opt=
'kAlwaysCreate')
270 myGroup.defineHistogram(
'nCandidatesDataWordPtX,nCandidatesDataWordPtY;nCandidatesDataWordPt', title=
'Number of MuCTPI candidates from data word vs p_{T}; p_{T} threshold; MuCTPI candidates',
271 type=
'TH2F',path=monMUCTPIPath,xbins=6,xmin=0.5,xmax=6.5,ybins=8,ymin=-0.5,ymax=7.5,opt=
'kAlwaysCreate')
273 myGroup.defineHistogram(
'nCandidatesMictpMioctX;nCandidatesMictpMioct', title=
'Diff between MICTP and MIOCT candidates (same BC); MICTP - MIOCT; Entries',
274 path=monMUCTPIPath,xbins=21,xmin=-10.5,xmax=12.5,opt=
'kAlwaysCreate')
276 myGroup.defineHistogram(
'bcidMictpMioctX;bcidMictpMioct', title=
'BCID diff between MICTP and all MIOCT candidate words; MIOCT - MICTP; Entries',
277 path=monMUCTPIPath,xbins=8,xmin=-3.5,xmax=4.5,opt=
'kAlwaysCreate')
290 myGroup.defineHistogram(
'barrelRoiSectorIDX,barrelRoiSectorIDY;barrelRoiSectorID', title=
'MIOCT RoI Number vs Barrel Sector ID (Trigger BC); Sector ID; RoI Number',
291 type=
'TH2F',path=monMUCTPIPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
293 myGroup.defineHistogram(
'endcapRoiSectorIDX,endcapRoiSectorIDY;endcapRoiSectorID', title=
'MIOCT RoI Number vs Endcap Sector ID (Trigger BC); Sector ID; RoI Number',
294 type=
'TH2F',path=monMUCTPIPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
296 myGroup.defineHistogram(
'forwardRoiSectorIDX,forwardRoiSectorIDY;forwardRoiSectorID', title=
'MIOCT RoI Number vs Forward Sector ID (Trigger BC); Sector ID; RoI Number',
297 type=
'TH2F',path=monMUCTPIPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
299 myGroup.defineHistogram(
'barrelRoiSectorIDAllX,barrelRoiSectorIDAllY;barrelRoiSectorIDAll', title=
'MIOCT RoI Number vs Barrel Sector ID (All BC); Sector ID; RoI Number',
300 type=
'TH2F',path=monMUCTPIPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
302 myGroup.defineHistogram(
'endcapRoiSectorIDAllX,endcapRoiSectorIDAllY;endcapRoiSectorIDAll', title=
'MIOCT RoI Number vs Endcap Sector ID (All BC); Sector ID; RoI Number',
303 type=
'TH2F',path=monMUCTPIPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
305 myGroup.defineHistogram(
'forwardRoiSectorIDAllX,forwardRoiSectorIDAllY;forwardRoiSectorIDAll', title=
'MIOCT RoI Number vs Forward Sector ID (All BC); Sector ID; RoI Number',
306 type=
'TH2F',path=monMUCTPIPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
310 myGroup.defineHistogram(
'barrelNCandSectorIDX,barrelNCandSectorIDY;barrelNCandSectorID', title=
'MIOCT Candidate mult vs Sector ID (barrel); Sector ID; Candidates',
311 type=
'TH2F',path=monMUCTPIPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=8,ymin=-0.5,ymax=7.5,opt=
'kAlwaysCreate')
313 myGroup.defineHistogram(
'endcapNCandSectorIDX,endcapNCandSectorIDY;endcapNCandSectorID', title=
'MIOCT Candidate mult vs Sector ID (endcap); Sector ID; Candidates',
314 type=
'TH2F',path=monMUCTPIPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=8,ymin=-0.5,ymax=7.5,opt=
'kAlwaysCreate')
316 myGroup.defineHistogram(
'forwardNCandSectorIDX,forwardNCandSectorIDY;forwardNCandSectorID', title=
'MIOCT Candidate mult vs Sector ID (forward); Sector ID; Candidates',
317 type=
'TH2F',path=monMUCTPIPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=8,ymin=-0.5,ymax=7.5,opt=
'kAlwaysCreate')
321 myGroup.defineHistogram(
'barrelSectorIDOverlapBitsX,barrelSectorIDOverlapBitsY;barrelSectorIDOverlapBits', title=
'Barrel Sector ID vs overlap bits; Sector ID; Overlap bits',
322 type=
'TH2F',path=monMUCTPIPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=3,ymin=0.5,ymax=3.5,opt=
'kAlwaysCreate')
324 myGroup.defineHistogram(
'endcapSectorIDOverlapBitX;endcapSectorIDOverlapBit', title=
'Endcap Sector ID vs number of candidates with overlap; Sector ID; Candidates',
325 path=monMUCTPIPath,xbins=48,xmin=-0.5,xmax=47.5,opt=
'kAlwaysCreate')
329 myGroup.defineHistogram(
'barrelSectorIDX;barrelSectorID', title=
'Barrel Sector ID (Trigger BC); Sector ID; Candidates',
330 path=monMUCTPIPath,xbins=64,xmin=-0.5,xmax=63.5,opt=
'kAlwaysCreate')
332 myGroup.defineHistogram(
'endcapSectorIDX;endcapSectorID', title=
'Endcap Sector ID (Trigger BC); Sector ID; Candidates',
333 path=monMUCTPIPath,xbins=96,xmin=-0.5,xmax=95.5,opt=
'kAlwaysCreate')
335 myGroup.defineHistogram(
'forwardSectorIDX;forwardSectorID', title=
'Forward Sector ID (Trigger BC); Sector ID; Candidates',
336 path=monMUCTPIPath,xbins=48,xmin=-0.5,xmax=47.5,opt=
'kAlwaysCreate')
338 myGroup.defineHistogram(
'barrelSectorIDAllX;barrelSectorIDAll', title=
'Barrel Sector ID (All BC); Sector ID; Candidates',
339 path=monMUCTPIPath,xbins=64,xmin=-0.5,xmax=63.5,opt=
'kAlwaysCreate')
341 myGroup.defineHistogram(
'endcapSectorIDAllX;endcapSectorIDAll', title=
'Endcap Sector ID (All BC); Sector ID; Candidates',
342 path=monMUCTPIPath,xbins=96,xmin=-0.5,xmax=95.5,opt=
'kAlwaysCreate')
344 myGroup.defineHistogram(
'forwardSectorIDAllX;forwardSectorIDAll', title=
'Forward Sector ID (All BC); Sector ID; Candidates',
345 path=monMUCTPIPath,xbins=48,xmin=-0.5,xmax=47.5,opt=
'kAlwaysCreate')
349 myGroup.defineHistogram(
'barrelPtX;barrelPt', title=
'Barrel candidate p_{T} (all candidates); p_{T} threshold; Candidates',
350 path=monMUCTPIPath,xbins=6,xmin=0.5,xmax=6.5,opt=
'kAlwaysCreate')
352 myGroup.defineHistogram(
'endcapPtX;endcapPt', title=
'Endcap candidate p_{T} (all candidates); p_{T} threshold; Candidates',
353 path=monMUCTPIPath,xbins=6,xmin=0.5,xmax=6.5,opt=
'kAlwaysCreate')
355 myGroup.defineHistogram(
'forwardPtX;forwardPt', title=
'Forward candidate p_{T} (all candidates); p_{T} threshold; Candidates',
356 path=monMUCTPIPath,xbins=6,xmin=0.5,xmax=6.5,opt=
'kAlwaysCreate')
357 nCandidates_secLocBinabels = [
364 myGroup.defineHistogram(
'nCandidates_secLocX;nCandidates_secLoc', title=
'"All candidates by sector location; Sector location; Candidates',
365 path=monMUCTPIPath,xbins=3,xmin=-0.5,xmax=2.5,xlabels=nCandidates_secLocBinabels,opt=
'kAlwaysCreate')
369 myGroup.defineHistogram(
'muctpiNoRPCCandfoundX,muctpiNoRPCCandfoundY;muctpiNoRPCCandfound', title=
'MuCTPI BA candidate with no equivalent candidate in RPC SL r/o, Sector ID vs. RoI number',
370 type=
'TH2F',path=monMUCTPIPath,xbins=30,xmin=-0.5,xmax=29.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
372 myGroup.defineHistogram(
'rpcNoMuCTPICandfoundX,rpcNoMuCTPICandfoundY;rpcNoMuCTPICandfound', title=
'RPC SL r/o candidate with no equivalent candidate in MuCTPI r/o, Sector ID vs. RoI number',
373 type=
'TH2F',path=monMUCTPIPath,xbins=30,xmin=-0.5,xmax=29.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
376 myGroup.defineHistogram(
'muctpiNoTGCecCandfoundX,muctpiNoTGCecCandfoundY;muctpiNoTGCecCandfound', title=
'MuCTPI EC candidate with no equivalent candidate in TGC SL r/o, Sector ID vs. RoI number',
377 type=
'TH2F',path=monMUCTPIPath,xbins=150,xmin=-0.5,xmax=149.5,ybins=100,ymin=-0.5,ymax=99.5,opt=
'kAlwaysCreate')
379 myGroup.defineHistogram(
'tgcecNoMuCTPICandfoundX,tgcecNoMuCTPICandfoundY;tgcecNoMuCTPICandfound', title=
'TGC EC SL r/o candidate with no equivalent candidate in MuCTPI r/o, Sector ID vs. RoI number',
380 type=
'TH2F',path=monMUCTPIPath,xbins=150,xmin=-0.5,xmax=149.5,ybins=100,ymin=-0.5,ymax=99.5,opt=
'kAlwaysCreate')
382 myGroup.defineHistogram(
'muctpiNoTGCfwCandfoundX,muctpiNoTGCfwCandfoundY;muctpiNoTGCfwCandfound', title=
'MuCTPI FW candidate with no equivalent candidate in TGC SL r/o, Sector ID vs. RoI number',
383 type=
'TH2F',path=monMUCTPIPath,xbins=150,xmin=-0.5,xmax=149.5,ybins=100,ymin=-0.5,ymax=99.5,opt=
'kAlwaysCreate')
385 myGroup.defineHistogram(
'tgcfwNoMuCTPICandfoundX,tgcfwNoMuCTPICandfoundY;tgcfwNoMuCTPICandfound', title=
'TGC FW SL r/o candidate with no equivalent candidate in MuCTPI r/o, Sector ID vs. RoI number',
386 type=
'TH2F',path=monMUCTPIPath,xbins=150,xmin=-0.5,xmax=149.5,ybins=100,ymin=-0.5,ymax=99.5,opt=
'kAlwaysCreate')
388 monCTPMUCTPIPath=
"/CTPMUCTPI/"
390 myGroup.defineHistogram(
'headerL1IdDifferenceX;headerL1IdDifference', title=
'ROD header LVL1 ID CTP - MuCTPI; #DeltaL1ID; Entries',
391 path=monCTPMUCTPIPath,xbins=101,xmin=-50.5,xmax=50.5,opt=
'kAlwaysCreate')
393 myGroup.defineHistogram(
'headerBCIDDifferenceX;headerBCIDDifference', title=
'ROD header BCID CTP - MuCTPI; #DeltaBCID; Entries',
394 path=monCTPMUCTPIPath,xbins=401,xmin=-200.5,xmax=200.5,opt=
'kAlwaysCreate')
396 myGroup.defineHistogram(
'bcidDifferenceX;bcidDifference', title=
'BCID CTP - MICTP; #DeltaBCID; Entries',
397 path=monCTPMUCTPIPath,xbins=15,xmin=-7.5,xmax=7.5,opt=
'kAlwaysCreate')
414 myGroup.defineHistogram(
'barrelSectorIDRoiX,barrelSectorIDRoiY;barrelSectorIDRoi', title=
'Sector ID vs. RoI for barrel muons (matched cand only); Sector ID; RoI',
415 type=
'TH2F',path=monROIPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
417 myGroup.defineHistogram(
'endcapSectorIDRoiX,endcapSectorIDRoiY;endcapSectorIDRoi', title=
'Sector ID vs. RoI for endcap muons (matched cand only); Sector ID; RoI',
418 type=
'TH2F',path=monROIPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
420 myGroup.defineHistogram(
'forwardSectorIDRoiX,forwardSectorIDRoiY;forwardSectorIDRoi', title=
'Sector ID vs. RoI for forward muons (matched cand only); Sector ID; RoI',
421 type=
'TH2F',path=monROIPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
427 myGroup.defineHistogram(
'barrelSectorIDRoiEtaX;barrelSectorIDRoiEta', title=
'Sector ID for barrel muons (matched cand only); Sector ID',
428 path=monROIPath,xbins=64,xmin=-0.5,xmax=63.5,opt=
'kAlwaysCreate')
432 myGroup.defineHistogram(
'endcapSectorIDRoiEtaX;endcapSectorIDRoiEta', title=
'Sector ID for endcap muons (matched cand only); Sector ID',
433 path=monROIPath,xbins=96,xmin=-0.5,xmax=95.5,opt=
'kAlwaysCreate')
437 myGroup.defineHistogram(
'forwardSectorIDRoiEtaX;forwardSectorIDRoiEta', title=
'Sector IDfor forward muons (matched cand only); Sector ID',
438 path=monROIPath,xbins=48,xmin=-0.5,xmax=47.5,opt=
'kAlwaysCreate')
444 myGroup.defineHistogram(
'barrelSectorIDRoiPhiX;barrelSectorIDRoiPhi', title=
'Sector ID for barrel (matched cand only); Sector ID',
445 type=
'TH2F',path=monROIPath,xbins=64,xmin=-0.5,xmax=63.5,opt=
'kAlwaysCreate')
449 myGroup.defineHistogram(
'endcapSectorIDRoiPhiX;endcapSectorIDRoiPhi', title=
'Sector ID for endcap (matched cand only); Sector ID',
450 path=monROIPath,xbins=96,xmin=-0.5,xmax=95.5,opt=
'kAlwaysCreate')
454 myGroup.defineHistogram(
'forwardSectorIDRoiPhiX;forwardSectorIDRoiPhi', title=
'Sector ID for forward (matched cand only); Sector ID',
455 path=monROIPath,xbins=48,xmin=-0.5,xmax=47.5,opt=
'kAlwaysCreate')
459 errorSummaryCTPBinLabels = [
460 "CTP/ROD BCID Offset",
462 "Invalid Lumi Block",
468 "Incomplete fragment",
469 "Missing orbit pulse"
471 incompleteFragmentTypeBinLabels = [
485 myGroup.defineHistogram(
'errorPerLumiBlockCTPX;errorPerLumiBlock', title=
'Number of errors per lumi block; LB number; Errors',
486 path=
'',xbins=2001,xmin=-0.5,xmax=2000.5,opt=
'kAlwaysCreate')
491 myGroup.defineHistogram(
'errorSummaryCTPX,errorSummaryCTPY;errorSummaryCTP',title=
'CTP errors; ; Error ratio', type=
'TProfile', path=monPath, xbins=len(errorSummaryCTPBinLabels), xmin=0.5, xmax=len(errorSummaryCTPBinLabels)+0.5, ymin=-1., ymax=2., xlabels=errorSummaryCTPBinLabels, opt=
'kAlwaysCreate')
492 myGroup.defineHistogram(
'errorSummaryPerLumiBlockCTPX,errorSummaryPerLumiBlockCTPY;errorSummaryPerLumiBlockCTP',title=
'Errors per lumi block; LB number; Errors', type=
'TH2F', path=monPath, xbins=2000, xmin=0.5, xmax=2000.5, ybins=len(errorSummaryCTPBinLabels), ymin=0.5, ymax=len(errorSummaryCTPBinLabels)+0.5, ylabels=errorSummaryCTPBinLabels, opt=
'kAlwaysCreate')
493 myGroup.defineHistogram(
'incompleteFragmentTypeX;incompleteFragmentType', title=
'Number of missing fragments per type; Fragment type; Number of incomplete fragments ', path=monPath, xbins=7, xmin=-0.5, xmax=7.5, xlabels=incompleteFragmentTypeBinLabels, opt=
'kAlwaysCreate')
494 myGroup.defineHistogram(
'deltaBcidX;deltaBcid', title=
'CTP Data BCID - ROD Header BCID; #DeltaBCID; Entries',
495 path=monPath,xbins=401,xmin=-200.5,xmax=200.5,opt=
'kAlwaysCreate')
496 myGroup.defineHistogram(
'triggerTypeX;triggerType', title=
'Trigger Type; Trigger Type; Entries',
497 path=monPath,xbins=256,xmin=-0.5,xmax=255.5,opt=
'kAlwaysCreate')
498 myGroup.defineHistogram(
'timeSinceLBStartX;timeSinceLBStart', title=
'Time Since LB Start; Time After New LB (ms); Entries',
499 path=monPath,xbins=1000,xmin=-500,xmax=1500,opt=
'kAlwaysCreate')
500 myGroup.defineHistogram(
'timeUntilLBEndX;timeUntilLBEnd', title=
'Time Until LB End; Time Until Next LB (ms); Entries',
501 path=monPath,xbins=1000,xmin=-500,xmax=1500,opt=
'kAlwaysCreate')
502 myGroup.defineHistogram(
'timeSinceL1AX;timeSinceL1A', title=
'Time since last L1A; Time since last L1A (ms); Entries',
503 path=monPath,xbins=2000,xmin=-1,xmax=30,opt=
'kAlwaysCreate')
504 myGroup.defineHistogram(
'turnCounterTimeErrorX;turnCounterTimeError', title=
'Error of time based on turn counter and BCID; t_{TC+BCID}-t_{GPS} [#mus]; Entries',
505 path=monPath,xbins=2000,xmin=-1000.,xmax=1000.,opt=
'kAlwaysCreate')
507 myGroup.defineHistogram(
'turnCounterTimeErrorVsLbX,turnCounterTimeErrorVsLbY,turnCounterTimeErrorVsLbZ;turnCounterTimeErrorVsLb',
508 title=
'Error of (TC+BCID)-based time vs. LB; LB; t_{TC+BCID}-t_{GPS} [#mus]',
509 type=
'TProfile2D', path=monPath, xbins=2001, ybins=2001, xmin=-0.5, xmax=2000.5, ymin=-1000., ymax=1000, opt=
'kAlwaysCreate')
510 myGroup.defineHistogram(
'pitBCX,pitBCY;pitBC',title=
'CTP BC vs. PIT; PIT; BC',
511 type=
'TH2F',path=monPath, xbins=320,xmin=-0.5,xmax=319.5,ybins=127,ymin=-63.5,ymax=63.5,opt=
'kAlwaysCreate')
512 myGroup.defineHistogram(
'pitFirstBCX,pitFirstBCY;pitFirstBC',title=
'First CTP BC vs. PIT; PIT; BC',
513 type=
'TH2F',path=monPath, xbins=320,xmin=-0.5,xmax=319.5,ybins=127,ymin=-63.5,ymax=63.5,opt=
'kAlwaysCreate')
514 myGroup.defineHistogram(
'tavX;tav', title=
'Trigger Items After Veto; CTP TAV; Entries',
515 path=monPath,xbins=512,xmin=-0.5,xmax=511.5,opt=
'kAlwaysCreate')
516 myGroup.defineHistogram(
'ctpStatus1X;ctpStatus1', title=
'CTP Status Word 1; Bit; Number of times ON',
517 path=monPath,xbins=24,xmin=-0.5,xmax=23.5,opt=
'kAlwaysCreate')
518 myGroup.defineHistogram(
'ctpStatus2X;ctpStatus2', title=
'CTP Status Word 2; Bit; Number of times ON',
519 path=monPath,xbins=24,xmin=-0.5,xmax=23.5,opt=
'kAlwaysCreate')
520 myGroup.defineHistogram(
'l1ItemsBPSimMismatchX;l1ItemsBPSimMismatch', title=
'Sim mismatch L1 Items before prescale',
521 path=monPath,xbins=512,xmin=0,xmax=512,opt=
'kAlwaysCreate')
522 myGroup.defineHistogram(
'l1ItemsBPSimMismatchItemsX;l1ItemsBPSimMismatchItems', title=
'Sim mismatch L1 Items before prescale, mismatched ones only', path=monPath,xbins=512,xmin=0,xmax=512,opt=
'kAlwaysCreate')
524 errorSummaryMUCTPIBinLabels = [
525 "Event - MuCTPI BCID Mismatch",
526 "Wrong Cand Word Number",
527 "Wrong TOB Word Number",
528 "Unequal Cand - TOB Number",
529 "Mismatch (Eta,Phi) Cand - TOB",
530 "Incomplete fragment",
531 "MuCTPI/noRPC candidate mismatch",
532 "MuCTPI/noTGC candidate mismatch",
533 "RPC/noMuCTPI candidate mismatch",
534 "TGC/noMuCTPI candidate mismatch"
537 statusDataWordMUCTPIBinLabels = [
538 "Event# mismatch (MSPA vs TRP) (central)",
539 "Event# mismatch (MSPC vs TRP) (central)",
540 "Event# mismatch (MSPA vs MSPC)" ,
541 "BCID mismatch (TRP vs MSPA) (central)" ,
542 "BCID mismatch (TRP vs MSPC) (central)" ,
543 "BCID mismatch (MSPA vs MSPC)" ,
544 "MSPA multiplicity LVDS link CRC error" ,
545 "MSPC multiplicity LVDS link CRC error" ,
546 "SL error flag on any MSPA sector" ,
547 "SL error flag on any MSPC sector" ,
548 "Error flag in muon cand after ZS" ,
549 "CRC error on MSPA DAQ link" ,
550 "CRC error on MSPC DAQ link" ,
551 "TriggerType reception timeout error" ,
552 "MSPA DAQ link input FIFO full flag" ,
553 "MSPC DAQ link input FIFO full flag"
557 from TrigT1CTMonitoring.BSMonDefinitions
import barrelEtaLowBinEdges
558 from TrigT1CTMonitoring.BSMonDefinitions
import barrelPhiLowBinEdges
559 from TrigT1CTMonitoring.BSMonDefinitions
import endcapEtaLowBinEdges
560 from TrigT1CTMonitoring.BSMonDefinitions
import endcapPhiLowBinEdges
561 from TrigT1CTMonitoring.BSMonDefinitions
import forwardEtaLowBinEdges
562 from TrigT1CTMonitoring.BSMonDefinitions
import forwardPhiLowBinEdges
563 from TrigT1CTMonitoring.BSMonDefinitions
import candidateWordsPerTimeslice
564 from TrigT1CTMonitoring.BSMonDefinitions
import tobWordsPerTimeslice
569 myGroup.defineHistogram(
'errorSummaryMUCTPI',title=
'MUCTPI errors;', type=
'TH1I', path=monPath, xbins=len(errorSummaryMUCTPIBinLabels), xmin=0.5, xmax=0.5+len(errorSummaryMUCTPIBinLabels), xlabels=errorSummaryMUCTPIBinLabels, opt=
'kAlwaysCreate')
570 myGroup.defineHistogram(
'errorSummaryPerLumiBlockMUCTPIX,errorSummaryPerLumiBlockMUCTPIY;errorSummaryPerLumiBlockMUCTPI',title=
'Errors per lumi block; LB number; Errors', type=
'TH2F', path=monPath, xbins=2000, xmin=0.5, xmax=2000.5, ybins=len(errorSummaryMUCTPIBinLabels), ymin=0.5, ymax=len(errorSummaryMUCTPIBinLabels)+0.5, ylabels=errorSummaryMUCTPIBinLabels, opt=
'kAlwaysCreate')
572 myGroup.defineHistogram(
'statusDataWordMUCTPI',title=
'Status word bits;', type=
'TH1I', path=monPath, xbins=len(statusDataWordMUCTPIBinLabels), xmin=0.5, xmax=0.5+len(statusDataWordMUCTPIBinLabels), xlabels=statusDataWordMUCTPIBinLabels, opt=
'kAlwaysCreate')
573 myGroup.defineHistogram(
'statusDataWordPerLumiBlockMUCTPIX,statusDataWordPerLumiBlockMUCTPIY;statusDataWordPerLumiBlockMUCTPI',title=
'Status word bits per lumi block; LB number; Errors', type=
'TH2F', path=monPath, xbins=2000, xmin=0.5, xmax=2000.5, ybins=len(statusDataWordMUCTPIBinLabels), ymin=0.5, ymax=len(statusDataWordMUCTPIBinLabels)+0.5, ylabels=statusDataWordMUCTPIBinLabels, opt=
'kAlwaysCreate')
576 monPath=
"/MUCTPI/Mult"
577 myGroup.defineHistogram(
'multThrX;multThr',title=
'MLT thresholds total count;',type=
'TH1I',path=monPath,xbins=32,xmin=-0.5,xmax=31.5,opt=
'kAlwaysCreate')
578 myGroup.defineHistogram(
'multThrVsLBX,multThrVsLBY;multThrVsLB', title=
'MLT thresholds total count - per LB', type=
'TH2F',path=monPath,xbins=2000,xmin=0,xmax=2000,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
580 myGroup.defineHistogram(
'multBitsX;multBits', title=
'MLT bits total count', path=monPath,xbins=64,xmin=-0.5,xmax=63.5,opt=
'kAlwaysCreate')
581 myGroup.defineHistogram(
'multBitsVsLBX,multBitsVsLBY;multBitsVsLB', title=
'MLT bits total count - per LB', type=
'TH2F',path=monPath,xbins=2000,xmin=0,xmax=2000,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
584 monPath=
"/MUCTPI/Cand"
585 myGroup.defineHistogram(
'candPtBAX;candPtBA', title=
'BA cand pT;pT index;candidates', path=monPath,xbins=6, xmin=0.5, xmax=6.5, opt=
'kAlwaysCreate')
586 myGroup.defineHistogram(
'candPtECX;candPtEC', title=
'EC cand pT;pT index;candidates', path=monPath,xbins=15,xmin=0.5,xmax=15.5,opt=
'kAlwaysCreate')
587 myGroup.defineHistogram(
'candPtFWX;candPtFW', title=
'FW cand pT;pT index;candidates', path=monPath,xbins=15,xmin=0.5,xmax=15.5,opt=
'kAlwaysCreate')
588 myGroup.defineHistogram(
'candCount',title=
'Candidates distrib. per event (central slice);candidates',type=
'TH1I',path=monPath,xbins=candidateWordsPerTimeslice,duration=
'' if inputFlags.Common.isOnline
else 'lb',opt=
'kAlwaysCreate')
589 myGroup.defineHistogram(
'candCountVsLBX,candCountVsLBY;candCountVsLB',title=
'Candidates distrib. per event (central slice) vs LB;LB;candidates',type=
'TH2I',path=monPath,xmin=0.5,xmax=2000.5,xbins=2000,ybins=candidateWordsPerTimeslice,opt=
'kAlwaysCreate')
591 monPath=
"/MUCTPI/Cand/Expert"
592 myGroup.defineHistogram(
'candSLVsLBBAX,candSLVsLBBAY;candSLVsLBBA', title=
'BA cand SL vs LB;LB;BA sect. number', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5, ybins=64,ymin=-0.5,ymax=63.5 ,opt=
'kAlwaysCreate')
593 myGroup.defineHistogram(
'candSLVsLBECX,candSLVsLBECY;candSLVsLBEC', title=
'EC cand SL vs LB;LB;EC sect. number', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5, ybins=96,ymin=-0.5,ymax=95.5 ,opt=
'kAlwaysCreate')
594 myGroup.defineHistogram(
'candSLVsLBFWX,candSLVsLBFWY;candSLVsLBFW', title=
'FW cand SL vs LB;LB;FW sect. number', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5, ybins=48,ymin=-0.5,ymax=47.5 ,opt=
'kAlwaysCreate')
595 myGroup.defineHistogram(
'candVetoFlag_RoiVsSLBAX,candVetoFlag_RoiVsSLBAY;candVetoFlag_RoiVsSLBA', title=
'BA cand VetoFlag | RoI vs SL;BA sect. number;RoI', type=
'TH2F', path=monPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
596 myGroup.defineHistogram(
'candVetoFlag_RoiVsSLECX,candVetoFlag_RoiVsSLECY;candVetoFlag_RoiVsSLEC', title=
'EC cand VetoFlag | RoI vs SL;EC sect. number;RoI', type=
'TH2F', path=monPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=148,ymin=-0.5,ymax=147.5,opt=
'kAlwaysCreate')
597 myGroup.defineHistogram(
'candVetoFlag_RoiVsSLFWX,candVetoFlag_RoiVsSLFWY;candVetoFlag_RoiVsSLFW', title=
'FW cand VetoFlag | RoI vs SL;FW sect. number;RoI', type=
'TH2F', path=monPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
598 myGroup.defineHistogram(
'candVetoFlag_EtaPhiBAX,candVetoFlag_EtaPhiBAY;candVetoFlag_EtaPhiBA', title=
'BA cand Overlap Veto Flag;Eta;Phi', type=
'TH2F', path=monPath, xbins=barrelEtaLowBinEdges, ybins=barrelPhiLowBinEdges, opt=
'kAlwaysCreate')
599 myGroup.defineHistogram(
'candVetoFlag_EtaPhiECX,candVetoFlag_EtaPhiECY;candVetoFlag_EtaPhiEC', title=
'EC cand Overlap Veto Flag;Eta;Phi', type=
'TH2F', path=monPath, xbins=endcapEtaLowBinEdges, ybins=endcapPhiLowBinEdges, opt=
'kAlwaysCreate')
600 myGroup.defineHistogram(
'candVetoFlag_EtaPhiFWX,candVetoFlag_EtaPhiFWY;candVetoFlag_EtaPhiFW', title=
'FW cand Overlap Veto Flag;Eta;Phi', type=
'TH2F', path=monPath, xbins=forwardEtaLowBinEdges, ybins=forwardPhiLowBinEdges, opt=
'kAlwaysCreate')
601 myGroup.defineHistogram(
'candRoiVsSLBACentralSliceX,candRoiVsSLBACentralSliceY;candRoiVsSLBACentralSlice', title=
'BA cand RoI vs SL (central slice);BA sect. number;RoI', type=
'TH2F', path=monPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=32,ymin=-0.5,ymax=31.5,opt=
'kAlwaysCreate')
602 myGroup.defineHistogram(
'candRoiVsSLECCentralSliceX,candRoiVsSLECCentralSliceY;candRoiVsSLECCentralSlice', title=
'EC cand RoI vs SL (central slice);EC sect. number;RoI', type=
'TH2F', path=monPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=148,ymin=-0.5,ymax=147.5,opt=
'kAlwaysCreate')
603 myGroup.defineHistogram(
'candRoiVsSLFWCentralSliceX,candRoiVsSLFWCentralSliceY;candRoiVsSLFWCentralSlice', title=
'FW cand RoI vs SL (central slice);FW sect. number;RoI', type=
'TH2F', path=monPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
604 myGroup.defineHistogram(
'candRoiVsSLBAOtherSliceX,candRoiVsSLBAOtherSliceY;candRoiVsSLBAOtherSlice', title=
'BA cand RoI vs SL (other slice);BA sect. number;RoI', type=
'TH2F', path=monPath,xbins=64,xmin=-0.5,xmax=63.5,ybins=32,ymin=-0.5,ymax=29.5,opt=
'kAlwaysCreate')
605 myGroup.defineHistogram(
'candRoiVsSLECOtherSliceX,candRoiVsSLECOtherSliceY;candRoiVsSLECOtherSlice', title=
'EC cand RoI vs SL (other slice);EC sect. number;RoI', type=
'TH2F', path=monPath,xbins=96,xmin=-0.5,xmax=95.5,ybins=148,ymin=-0.5,ymax=147.5,opt=
'kAlwaysCreate')
606 myGroup.defineHistogram(
'candRoiVsSLFWOtherSliceX,candRoiVsSLFWOtherSliceY;candRoiVsSLFWOtherSlice', title=
'FW cand RoI vs SL (other slice);FW sect. number;RoI', type=
'TH2F', path=monPath,xbins=48,xmin=-0.5,xmax=47.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
607 myGroup.defineHistogram(
'candEtaPhi_PhiOverlapX_BA,candEtaPhi_PhiOverlapY_BA;candEtaPhi_PhiOverlap_BA',title=
'BA cand phi overlap;Eta;Phi', type=
'TH2F', path=monPath, xbins=barrelEtaLowBinEdges, ybins=barrelPhiLowBinEdges, opt=
'kAlwaysCreate')
608 myGroup.defineHistogram(
'candEtaPhi_Gt1CandRoiX_BA,candEtaPhi_Gt1CandRoiY_BA;candEtaPhi_Gt1CandRoi_BA',title=
'BA cand >1 in Roi;Eta;Phi', type=
'TH2F', path=monPath, xbins=barrelEtaLowBinEdges, ybins=barrelPhiLowBinEdges, opt=
'kAlwaysCreate')
609 myGroup.defineHistogram(
'candEtaPhi_SectorFlagGtNX_BA,candEtaPhi_SectorFlagGtNY_BA;candEtaPhi_SectorFlagGtN_BA',title=
">2 cand in sector;Eta;Phi", type=
'TH2F',path=monPath, xbins=barrelEtaLowBinEdges, ybins=barrelPhiLowBinEdges, opt=
'kAlwaysCreate')
610 myGroup.defineHistogram(
'candEtaPhi_NSWMonFlagX_EC,candEtaPhi_NSWMonFlagY_EC;candEtaPhi_NSWMonFlag_EC',title=
'NSW monitoring flag EC;Eta;Phi',type=
'TH2F',path=monPath,xbins=endcapEtaLowBinEdges,ybins=endcapPhiLowBinEdges,opt=
'kAlwaysCreate')
611 myGroup.defineHistogram(
'candEtaPhi_NSWMonFlagX_FW,candEtaPhi_NSWMonFlagY_FW;candEtaPhi_NSWMonFlag_FW',title=
'NSW monitoring flag FW;Eta;Phi',type=
'TH2F',path=monPath,xbins=forwardEtaLowBinEdges,ybins=forwardPhiLowBinEdges,opt=
'kAlwaysCreate')
612 myGroup.defineHistogram(
'candEtaPhi_SectorFlagGtNX_EC,candEtaPhi_SectorFlagGtNY_EC;candEtaPhi_SectorFlagGtN_EC',title=
'>4 cand in EC sector;Eta;Phi',type=
'TH2F',path=monPath,xbins=endcapEtaLowBinEdges,ybins=endcapPhiLowBinEdges,opt=
'kAlwaysCreate')
613 myGroup.defineHistogram(
'candEtaPhi_SectorFlagGtNX_FW,candEtaPhi_SectorFlagGtNY_FW;candEtaPhi_SectorFlagGtN_FW',title=
'>4 cand in FW sector;Eta;Phi',type=
'TH2F',path=monPath,xbins=forwardEtaLowBinEdges,ybins=forwardPhiLowBinEdges,opt=
'kAlwaysCreate')
615 candFlagsMUCTPIBinLabels_BA = [
616 "> 1 cand. in the RoI" ,
619 candFlagsMUCTPIBinLabels_ECFW = [
625 myGroup.defineHistogram(
'candCandFlagsVsSLBACentralSliceX,candCandFlagsVsSLBACentralSliceY;candCandFlagsVsSLBACentralSlice', title=
'BA cand CandFlags vs SL (central slice);BA sect. number', type=
'TH2F', path=monPath, xbins=64, xmin=-0.5,xmax=63.5, ybins=2, ymin=-0.5,ymax=1.5,ylabels=candFlagsMUCTPIBinLabels_BA,opt=
'kAlwaysCreate')
626 myGroup.defineHistogram(
'candCandFlagsVsSLECCentralSliceX,candCandFlagsVsSLECCentralSliceY;candCandFlagsVsSLECCentralSlice', title=
'EC cand CandFlags vs SL (central slice);EC sect. number', type=
'TH2F', path=monPath, xbins=96, xmin=-0.5,xmax=95.5, ybins=4, ymin=-0.5,ymax=3.5,ylabels=candFlagsMUCTPIBinLabels_ECFW,opt=
'kAlwaysCreate')
627 myGroup.defineHistogram(
'candCandFlagsVsSLFWCentralSliceX,candCandFlagsVsSLFWCentralSliceY;candCandFlagsVsSLFWCentralSlice', title=
'FW cand CandFlags vs SL (central slice);FW sect. number', type=
'TH2F', path=monPath, xbins=48,xmin=-0.5,xmax=47.5, ybins=4, ymin=-0.5,ymax=3.5,ylabels=candFlagsMUCTPIBinLabels_ECFW,opt=
'kAlwaysCreate')
630 myGroup.defineHistogram(
'candErrorflagVsSLBACentralSlicePerLBX,candErrorflagVsSLBACentralSlicePerLBY;candErrorflagVsSLBACentralSlicePerLB', title=
'SL (BA) cand ErrorFlag vs LB (central slice)', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
631 myGroup.defineHistogram(
'candErrorflagVsSLECCentralSlicePerLBX,candErrorflagVsSLECentralSlicePerLBY;candErrorflagVsSLECCentralSlicePerLB', title=
'SL (EC) cand ErrorFlag vs LB (central slice)', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5,ybins=96,ymin=-0.5,ymax=95.5,opt=
'kAlwaysCreate')
632 myGroup.defineHistogram(
'candErrorflagVsSLFWCentralSlicePerLBX,candErrorflagVsSLFWCentralSlicePerLBY;candErrorflagVsSLFWCentralSlicePerLB', title=
'SL (FW) cand ErrorFlag vs LB (central slice)', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5,ybins=48,ymin=-0.5,ymax=47.5,opt=
'kAlwaysCreate')
634 myGroup.defineHistogram(
'candErrorflagVsSLBAOtherSlicePerLBX,candErrorflagVsSLBAOtherSlicePerLBY;candErrorflagVsSLBAOtherSlicePerLB', title=
'SL (BA) cand ErrorFlag vs LB (other slice)', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5,ybins=64,ymin=-0.5,ymax=63.5,opt=
'kAlwaysCreate')
635 myGroup.defineHistogram(
'candErrorflagVsSLECOtherSlicePerLBX,candErrorflagVsSLECOtherSlicePerLBY;candErrorflagVsSLECOtherSlicePerLB', title=
'SL (EC) cand ErrorFlag vs LB (other slice)', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5,ybins=96,ymin=-0.5,ymax=95.5,opt=
'kAlwaysCreate')
636 myGroup.defineHistogram(
'candErrorflagVsSLFWOtherSlicePerLBX,candErrorflagVsSLFWOtherSlicePerLBY;candErrorflagVsSLFWOtherSlicePerLB', title=
'SL (FW) cand ErrorFlag vs LB (other slice)', type=
'TH2F', path=monPath,xbins=2000,xmin=0.5,xmax=2000.5,ybins=48,ymin=-0.5,ymax=47.5,opt=
'kAlwaysCreate')
638 monPath=
"/MUCTPI/TOB/Expert"
646 myGroup.defineHistogram(
'tobEtaPhiAX,tobEtaPhiAY;tobEtaPhiA',title=
'TOB hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
647 myGroup.defineHistogram(
'tobEtaPhiA_GoodMFX,tobEtaPhiA_GoodMFY;tobEtaPhiA_GoodMF',title=
'TOB GoodMF flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
648 myGroup.defineHistogram(
'tobEtaPhiA_InnerCoinX,tobEtaPhiA_InnerCoinY;tobEtaPhiA_InnerCoin',title=
'TOB InnerCoin flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
649 myGroup.defineHistogram(
'tobEtaPhiA_BW23X,tobEtaPhiA_BW23Y;tobEtaPhiA_BW23',title=
'TOB BW23 flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
650 myGroup.defineHistogram(
'tobEtaPhiA_ChargeX,tobEtaPhiA_ChargeY;tobEtaPhiA_Charge',title=
'TOB Charge flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
651 myGroup.defineHistogram(
'tobEtaPhiCX,tobEtaPhiCY;tobEtaPhiC',title=
'TOB hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
652 myGroup.defineHistogram(
'tobEtaPhiC_GoodMFX,tobEtaPhiC_GoodMFY;tobEtaPhiC_GoodMF',title=
'TOB GoodMF flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
653 myGroup.defineHistogram(
'tobEtaPhiC_InnerCoinX,tobEtaPhiC_InnerCoinY;tobEtaPhiC_InnerCoin',title=
'TOB InnerCoin flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
654 myGroup.defineHistogram(
'tobEtaPhiC_BW23X,tobEtaPhiC_BW23Y;tobEtaPhiC_BW23',title=
'TOB BW23 flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
655 myGroup.defineHistogram(
'tobEtaPhiC_ChargeX,tobEtaPhiC_ChargeY;tobEtaPhiC_Charge',title=
'TOB Charge flag hitmap (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=etaBins, ymin=etaMin, ymax=etaMax, opt=
'kAlwaysCreate')
657 myGroup.defineHistogram(
'tobPtVsEtaAX,tobPtVsEtaAY;tobPtVsEtaA',title=
'TOB pT VS eta (A);Eta;pT index', type=
'TH2F', path=monPath, xbins=etaBins, xmin=etaMin, xmax=etaMax, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
658 myGroup.defineHistogram(
'tobPtVsPhiAX,tobPtVsPhiAY;tobPtVsPhiA',title=
'TOB pT VS phi (A);Phi;pT index', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
659 myGroup.defineHistogram(
'tobPtVsEtaCX,tobPtVsEtaCY;tobPtVsEtaC',title=
'TOB pT VS eta (C);Eta;pT index', type=
'TH2F', path=monPath, xbins=etaBins, xmin=etaMin, xmax=etaMax, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
660 myGroup.defineHistogram(
'tobPtVsPhiCX,tobPtVsPhiCY;tobPtVsPhiC',title=
'TOB pT VS phi (C);Phi;pT index', type=
'TH2F', path=monPath, xbins=phiBins, xmin=phiMin, xmax=phiMax, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
664 monPath=
"/MUCTPI/TOB"
665 myGroup.defineHistogram(
'tobEtaPhiXdecoded_BA,tobEtaPhiYdecoded_BA;tobEtaPhi_BA',title=
'TOB hitmap BA (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=barrelEtaLowBinEdges, ybins=barrelPhiLowBinEdges, opt=
'kAlwaysCreate')
666 myGroup.defineHistogram(
'tobEtaPhiXdecoded_EC,tobEtaPhiYdecoded_EC;tobEtaPhi_EC',title=
'TOB hitmap EC (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=endcapEtaLowBinEdges, ybins=endcapPhiLowBinEdges, opt=
'kAlwaysCreate')
667 myGroup.defineHistogram(
'tobEtaPhiXdecoded_FW,tobEtaPhiYdecoded_FW;tobEtaPhi_FW',title=
'TOB hitmap FW (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=forwardEtaLowBinEdges, ybins=forwardPhiLowBinEdges, opt=
'kAlwaysCreate')
669 myGroup.defineHistogram(
'tobEtaPhi_GoodMFXdecoded_EC,tobEtaPhi_GoodMFYdecoded_EC;tobEtaPhi_GoodMF_EC',title=
'TOB GoodMF flag hitmap EC (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=endcapEtaLowBinEdges, ybins=endcapPhiLowBinEdges, opt=
'kAlwaysCreate')
670 myGroup.defineHistogram(
'tobEtaPhi_GoodMFXdecoded_FW,tobEtaPhi_GoodMFYdecoded_FW;tobEtaPhi_GoodMF_FW',title=
'TOB GoodMF flag hitmap FW (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=forwardEtaLowBinEdges, ybins=forwardPhiLowBinEdges, opt=
'kAlwaysCreate')
672 myGroup.defineHistogram(
'tobEtaPhi_InnerCoinXdecoded_EC,tobEtaPhi_InnerCoinYdecoded_EC;tobEtaPhi_InnerCoin_EC',title=
'TOB InnerCoin flag hitmap EC (eta,phi);Eta;Phi', type=
'TH2F', path=monPath,xbins=endcapEtaLowBinEdges, ybins=endcapPhiLowBinEdges, opt=
'kAlwaysCreate')
673 myGroup.defineHistogram(
'tobEtaPhi_InnerCoinXdecoded_FW,tobEtaPhi_InnerCoinYdecoded_FW;tobEtaPhi_InnerCoin_FW',title=
'TOB InnerCoin flag hitmap FW (eta,phi);Eta;Phi', type=
'TH2F', path=monPath,xbins=forwardEtaLowBinEdges, ybins=forwardPhiLowBinEdges, opt=
'kAlwaysCreate')
675 myGroup.defineHistogram(
'tobEtaPhi_BW23Xdecoded_EC,tobEtaPhi_BW23Ydecoded_EC;tobEtaPhi_BW23_EC',title=
'TOB BW23 flag hitmap EC (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=endcapEtaLowBinEdges, ybins=endcapPhiLowBinEdges, opt=
'kAlwaysCreate')
676 myGroup.defineHistogram(
'tobEtaPhi_BW23Xdecoded_FW,tobEtaPhi_BW23Ydecoded_FW;tobEtaPhi_BW23_FW',title=
'TOB BW23 flag hitmap FW (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=forwardEtaLowBinEdges, ybins=forwardPhiLowBinEdges, opt=
'kAlwaysCreate')
678 myGroup.defineHistogram(
'tobEtaPhi_ChargeXdecoded_EC,tobEtaPhi_ChargeYdecoded_EC;tobEtaPhi_Charge_EC',title=
'TOB Charge flag hitmap EC (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=endcapEtaLowBinEdges, ybins=endcapPhiLowBinEdges, opt=
'kAlwaysCreate')
679 myGroup.defineHistogram(
'tobEtaPhi_ChargeXdecoded_FW,tobEtaPhi_ChargeYdecoded_FW;tobEtaPhi_Charge_FW',title=
'TOB Charge flag hitmap FW (eta,phi);Eta;Phi', type=
'TH2F', path=monPath, xbins=forwardEtaLowBinEdges, ybins=forwardPhiLowBinEdges, opt=
'kAlwaysCreate')
682 myGroup.defineHistogram(
'tobPtVsEtaXdecoded_BA,tobPtVsEtaYdecoded_BA;tobPtVsEta_BA',title=
'TOB pT VS eta BA;Eta;pT index', type=
'TH2F', path=monPath, xbins=barrelEtaLowBinEdges, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
683 myGroup.defineHistogram(
'tobPtVsEtaXdecoded_EC,tobPtVsEtaYdecoded_EC;tobPtVsEta_EC',title=
'TOB pT VS eta EC;Eta;pT index', type=
'TH2F', path=monPath, xbins=endcapEtaLowBinEdges, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
684 myGroup.defineHistogram(
'tobPtVsEtaXdecoded_FW,tobPtVsEtaYdecoded_FW;tobPtVsEta_FW',title=
'TOB pT VS eta FW;Eta;pT index', type=
'TH2F', path=monPath, xbins=forwardEtaLowBinEdges, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
686 myGroup.defineHistogram(
'tobPtVsPhiXdecoded_BA,tobPtVsPhiYdecoded_BA;tobPtVsPhi_BA',title=
'TOB pT VS phi BA;Phi;pT index', type=
'TH2F', path=monPath, xbins=barrelPhiLowBinEdges, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
687 myGroup.defineHistogram(
'tobPtVsPhiXdecoded_EC,tobPtVsPhiYdecoded_EC;tobPtVsPhi_EC',title=
'TOB pT VS phi EC;Phi;pT index', type=
'TH2F', path=monPath, xbins=endcapPhiLowBinEdges, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
688 myGroup.defineHistogram(
'tobPtVsPhiXdecoded_FW,tobPtVsPhiYdecoded_FW;tobPtVsPhi_FW',title=
'TOB pT VS phi FW;Phi;pT index', type=
'TH2F', path=monPath, xbins=forwardPhiLowBinEdges, ybins=15, ymin=0.5, ymax=15.5, opt=
'kAlwaysCreate')
690 myGroup.defineHistogram(
'tobCount',title=
'TOBs distrib. per event (central slice);TOBs',type=
'TH1I',xbins=tobWordsPerTimeslice,path=monPath,opt=
'kAlwaysCreate')
692 monPath=
"/MUCTPI/Timing"
693 candSliceVsSLMUCTPIBinLabels = [
702 myGroup.defineHistogram(
'candSliceVsSLBAX,candSliceVsSLBAY;candSliceVsSLBA',title=
'SL (BA) slice vs SL', type=
'TH2F', path=monPath, xbins=64, xmin=-0.5, xmax=63.5, ybins=len(candSliceVsSLMUCTPIBinLabels), ymin=0., ymax=7., ylabels=candSliceVsSLMUCTPIBinLabels, opt=
'kAlwaysCreate')
703 myGroup.defineHistogram(
'candSliceVsSLECX,candSliceVsSLECY;candSliceVsSLEC',title=
'SL (EC) slice vs SL', type=
'TH2F', path=monPath, xbins=96, xmin=-0.5, xmax=95.5, ybins=len(candSliceVsSLMUCTPIBinLabels), ymin=0., ymax=7., ylabels=candSliceVsSLMUCTPIBinLabels, opt=
'kAlwaysCreate')
704 myGroup.defineHistogram(
'candSliceVsSLFWX,candSliceVsSLFWY;candSliceVsSLFW',title=
'SL (FW) slice vs SL', type=
'TH2F', path=monPath, xbins=48, xmin=-0.5, xmax=47.5, ybins=len(candSliceVsSLMUCTPIBinLabels), ymin=0., ymax=7., ylabels=candSliceVsSLMUCTPIBinLabels, opt=
'kAlwaysCreate')
706 myGroup.defineHistogram(
'candSliceVsSLBAFirstInTrainX,candSliceVsSLBAFirstInTrainY;candSliceVsSLBAFirstInTrain',title=
'SL (BA) slice vs SL (BG=FirstInTrain)', type=
'TH2F', path=monPath, xbins=64, xmin=-0.5, xmax=63.5, ybins=len(candSliceVsSLMUCTPIBinLabels), ymin=0., ymax=7., ylabels=candSliceVsSLMUCTPIBinLabels, opt=
'kAlwaysCreate')
707 myGroup.defineHistogram(
'candSliceVsSLECFirstInTrainX,candSliceVsSLECFirstInTrainY;candSliceVsSLECFirstInTrain',title=
'SL (EC) slice vs SL (BG=FirstInTrain)', type=
'TH2F', path=monPath, xbins=96, xmin=-0.5, xmax=95.5, ybins=len(candSliceVsSLMUCTPIBinLabels), ymin=0., ymax=7., ylabels=candSliceVsSLMUCTPIBinLabels, opt=
'kAlwaysCreate')
708 myGroup.defineHistogram(
'candSliceVsSLFWFirstInTrainX,candSliceVsSLFWFirstInTrainY;candSliceVsSLFWFirstInTrain',title=
'SL (FW) slice vs SL (BG=FirstInTrain)', type=
'TH2F', path=monPath, xbins=48, xmin=-0.5, xmax=47.5, ybins=len(candSliceVsSLMUCTPIBinLabels), ymin=0., ymax=7., ylabels=candSliceVsSLMUCTPIBinLabels, opt=
'kAlwaysCreate')
713 acc = helper.result()
718 if __name__==
'__main__':
721 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
723 inputs = glob.glob(
'/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/00354311/data18_13TeV.00354311.physics_Main.recon.ESD.f1129/data18_13TeV.00354311.physics_Main.recon.ESD.f1129._lb0013._SFO-8._0001.1')
726 flags.Input.Files = inputs
727 flags.Output.HISTFileName =
'ExampleMonitorOutput_CTPMonitoring.root'
731 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
732 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
737 cfg.merge(BSMonitorCfg)
739 BSMonitorCfg.getEventAlgo(
'BSMonAlg').OutputLevel = 1
741 cfg.printConfig(withDetails=
False, summariseProps =
True)