5 '''Function to configure LVL1 CpmSim algorithm in the monitoring system.'''
9 from AthenaConfiguration.AutoConfigFlags
import GetFileMD
10 from AthenaConfiguration.Enums
import Format
11 from AthenaConfiguration.ComponentFactory
import CompFactory
12 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
16 from AthenaMonitoring
import AthMonitorCfgHelper
17 helper = AthMonitorCfgHelper(inputFlags,
'CpmSimMonitoringCfg')
21 inputContainsRun3FormatConfigMetadata = (
"metadata_items" in md
and any((
'TriggerMenuJson' in key)
for key
in md[
"metadata_items"].
keys()))
22 if inputFlags.Input.Format
is Format.POOL
and not inputContainsRun3FormatConfigMetadata:
24 return helper.result()
27 CpmSimMonAlg = helper.addAlgorithm(CompFactory.CpmSimMonitorAlgorithm,
'CpmSimMonAlg')
30 if inputFlags.Trigger.Online.isPartition
or inputFlags.Input.Format
is Format.BS:
32 CpmSimMonAlg.TrigConfigSvc =
""
33 from TrigConfigSvc.TrigConfigSvcCfg
import L1ConfigSvcCfg
37 from TrigConfxAOD.TrigConfxAODConfig
import getxAODConfigSvc
39 CpmSimMonAlg.TrigConfigSvc = ca.getPrimary()
40 helper.result().
merge(ca)
43 CpmSimMonAlg.s_legacyCpHadInputsDisabled = inputFlags.Reco.EnableHI
46 groupName =
'CpmSimMonitor'
47 CpmSimMonAlg.PackageName = groupName
53 simPath = trigPath+
'/Errors/Transmission_Simulation/'
54 monCPMinPath = simPath +
'PPM2CPMTowers/'
55 monRoiPath = simPath +
'Towers2RoIs/'
56 simPathCmx = trigPath+
'_CMX/Errors/Transmission_Simulation/'
57 monCMXinPath = simPathCmx +
'RoIs2TOBs/'
58 monCMXsumsPath = simPathCmx +
'/TOBs2HitSums/'
59 monCMXTopoPath = simPathCmx +
'/TOBs2Topo'
60 monExpertPath = simPath
61 monShiftPath = simPath
62 monEvent1Path = simPath +
'/MismatchEventNumbers/'
63 monEvent2Path = simPathCmx +
'/MismatchEventNumbers/'
66 myGroup = helper.addGroup(CpmSimMonAlg, groupName , mainDir)
70 myGroup.defineHistogram(
'eta_em_PpmEqCor,phi_em_PpmEqCor;cpm_em_2d_etaPhi_tt_PpmEqCore',
71 title=
"EM Core CPM Tower/PPM Tower Non-zero Matches;;",type=
'TH2F',
72 cutmask=
'',path=monCPMinPath,
73 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
75 myGroup.defineHistogram(
'eta_em_PpmNeCor,phi_em_PpmNeCor;cpm_em_2d_etaPhi_tt_PpmNeCore',
76 title=
"EM Core CPM Tower/PPM Tower Non-zero Mismatches;;",type=
'TH2F',
77 cutmask=
'',path=monCPMinPath,
78 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
80 myGroup.defineHistogram(
'eta_em_PpmNoCor,phi_em_PpmNoCor;cpm_em_2d_etaPhi_tt_PpmNoCore',
81 title=
"EM PPM Towers but no Core CPM Towers;;",type=
'TH2F',
82 cutmask=
'',path=monCPMinPath,
83 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
85 myGroup.defineHistogram(
'eta_em_CoreNoPpm,phi_em_CoreNoPpm;cpm_em_2d_etaPhi_tt_CoreNoPpm',
86 title=
"EM Core CPM Towers but no PPM Towers;;",type=
'TH2F',
87 cutmask=
'',path=monCPMinPath,
88 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
90 myGroup.defineHistogram(
'eta_em_PpmEqOverlap,phi_em_PpmEqOverlap;cpm_em_2d_etaPhi_tt_PpmEqOverlap',
91 title=
"EM Overlap CPM Tower/PPM Tower Non-zero Matches;;",type=
'TH2F',
92 cutmask=
'',path=monCPMinPath,
93 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
95 myGroup.defineHistogram(
'eta_em_PpmNeOverlap,phi_em_PpmNeOverlap;cpm_em_2d_etaPhi_tt_PpmNeOverlap',
96 title=
"EM Overlap CPM Tower/PPM Tower Non-zero Mismatches;;",type=
'TH2F',
97 cutmask=
'',path=monCPMinPath,
98 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
100 myGroup.defineHistogram(
'eta_em_PpmNoOverlap,phi_em_PpmNoOverlap;cpm_em_2d_etaPhi_tt_PpmNoOverlap',
101 title=
"EM PPM Towers but no Overlap CPM Towers;;",type=
'TH2F',
102 cutmask=
'',path=monCPMinPath,
103 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
105 myGroup.defineHistogram(
'eta_em_OverlapeNoPpm,phi_em_OverlapeNoPpm;cpm_em_2d_etaPhi_tt_OverlapNoPpm',
106 title=
"EM Overlap CPM Towers but no PPM Towers;;",type=
'TH2F',
107 cutmask=
'',path=monCPMinPath,
108 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
112 myGroup.defineHistogram(
'eta_had_PpmEqCor,phi_had_PpmEqCor;cpm_had_2d_etaPhi_tt_PpmEqCore',
113 title=
"HAD Core CPM Tower/PPM Tower Non-zero Matches;;",type=
'TH2F',
114 cutmask=
'',path=monCPMinPath,
115 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
117 myGroup.defineHistogram(
'eta_had_PpmNeCor,phi_had_PpmNeCor;cpm_had_2d_etaPhi_tt_PpmNeCore',
118 title=
"HAD Core CPM Tower/PPM Tower Non-zero Mismatches;;",type=
'TH2F',
119 cutmask=
'',path=monCPMinPath,
120 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
122 myGroup.defineHistogram(
'eta_had_PpmNoCor,phi_had_PpmNoCor;cpm_had_2d_etaPhi_tt_PpmNoCore',
123 title=
"HAD PPM Towers but no Core CPM Towers;;",type=
'TH2F',
124 cutmask=
'',path=monCPMinPath,
125 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
127 myGroup.defineHistogram(
'eta_had_CoreNoPpm,phi_had_CoreNoPpm;cpm_had_2d_etaPhi_tt_CoreNoPpm',
128 title=
"HAD Core CPM Towers but no PPM Towers;;",type=
'TH2F',
129 cutmask=
'',path=monCPMinPath,
130 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
132 myGroup.defineHistogram(
'eta_had_PpmEqOverlap,phi_had_PpmEqOverlap;cpm_had_2d_etaPhi_tt_PpmEqOverlap',
133 title=
"HAD Overlap CPM Tower/PPM Tower Non-zero Matches;;",type=
'TH2F',
134 cutmask=
'',path=monCPMinPath,
135 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
137 myGroup.defineHistogram(
'eta_had_PpmNeOverlap,phi_had_PpmNeOverlap;cpm_had_2d_etaPhi_tt_PpmNeOverlap',
138 title=
"HAD Overlap CPM Tower/PPM Tower Non-zero Mismatches;;",type=
'TH2F',
139 cutmask=
'',path=monCPMinPath,
140 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
142 myGroup.defineHistogram(
'eta_had_PpmNoOverlap,phi_had_PpmNoOverlap;cpm_had_2d_etaPhi_tt_PpmNoOverlap',
143 title=
"HAD PPM Towers but no Overlap CPM Towers;;",type=
'TH2F',
144 cutmask=
'',path=monCPMinPath,
145 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
147 myGroup.defineHistogram(
'eta_had_OverlapeNoPpm,phi_had_OverlapeNoPpm;cpm_had_2d_etaPhi_tt_OverlapNoPpm',
148 title=
"HAD Overlap CPM Towers but no PPM Towers;;",type=
'TH2F',
149 cutmask=
'',path=monCPMinPath,
150 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
154 myGroup.defineHistogram(
'loc_PpmEqCpmFpga,loc_fpga_PpmEqCpmFpga;cpm_2d_tt_PpmEqCpmFpga',
155 title=
"CPM Tower/PPM Tower Non-zero Matches by FPGA;;",type=
'TH2F',
156 cutmask=
'',path=monCPMinPath,
157 xbins=56,xmin=0.0,xmax=56.0,ybins=20,ymin=0.,ymax=20.0)
159 myGroup.defineHistogram(
'loc_PpmNeCpmFpga,loc_fpga_PpmNeCpmFpga;cpm_2d_tt_PpmNeCpmFpga',
160 title=
"CPM Tower/PPM Tower Non-zero Mismatches by FPGA;;",type=
'TH2F',
161 cutmask=
'',path=monCPMinPath,
162 xbins=56,xmin=0.0,xmax=56.0,ybins=20,ymin=0.,ymax=20.0)
164 myGroup.defineHistogram(
'loc_PpmNoCpmFpga,loc_fpga_PpmNoCpmFpga;cpm_2d_tt_PpmNoCpmFpga',
165 title=
"PPM Towers but no CPM Towers by FPGA;;",type=
'TH2F',
166 cutmask=
'',path=monCPMinPath,
167 xbins=56,xmin=0.0,xmax=56.0,ybins=20,ymin=0.,ymax=20.0)
169 myGroup.defineHistogram(
'loc_CpmNoPpmFpga,loc_fpga_CpmNoPpmFpga;cpm_2d_tt_CpmNoPpmFpga',
170 title=
"CPM Towers but no PPM Towers by FPGA;;",type=
'TH2F',
171 cutmask=
'',path=monCPMinPath,
172 xbins=56,xmin=0.0,xmax=56.0,ybins=20,ymin=0.,ymax=20.0)
176 myGroup.defineHistogram(
'emEnerSimEqDataLocX,emEnerSimEqDataLocY;cpm_2d_roi_EmEnergySimEqData',
177 title=
"CPM RoI EM Energy Data/Simulation Non-zero Matches;;",type=
'TH2F',
178 cutmask=
'',path=monRoiPath,
179 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
181 myGroup.defineHistogram(
'emEnerSimNeDataLocX,emEnerSimNeDataLocY;cpm_2d_roi_EmEnergySimNeData',
182 title=
"CPM RoI EM Energy Data/Simulation Non-zero mismatches;;",type=
'TH2F',
183 cutmask=
'',path=monRoiPath,
184 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
186 myGroup.defineHistogram(
'emEnerSimNoDataLocX,emEnerSimNoDataLocY;cpm_2d_roi_EmEnergySimNoData',
187 title=
"CPM RoI EM Energy Simulation but no Data;;",type=
'TH2F',
188 cutmask=
'',path=monRoiPath,
189 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
191 myGroup.defineHistogram(
'emEnerDataNoSimLocX,emEnerDataNoSimLocY;cpm_2d_roi_EmEnergyDataNoSim',
192 title=
"CPM RoI EM Energy Data but no Simulation;;",type=
'TH2F',
193 cutmask=
'',path=monRoiPath,
194 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
196 myGroup.defineHistogram(
'tauEnerSimEqDataLocX,tauEnerSimEqDataLocY;cpm_2d_roi_TauEnergySimEqData',
197 title=
"CPM RoI Tau Energy Data/Simulation Non-zero Matches;;",type=
'TH2F',
198 cutmask=
'',path=monRoiPath,
199 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
201 myGroup.defineHistogram(
'tauEnerSimNeDataLocX,tauEnerSimNeDataLocY;cpm_2d_roi_TauEnergySimNeData',
202 title=
"CPM RoI Tau Energy Data/Simulation Non-zero mismatches;;",type=
'TH2F',
203 cutmask=
'',path=monRoiPath,
204 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
206 myGroup.defineHistogram(
'tauEnerSimNoDataLocX,tauEnerSimNoDataLocY;cpm_2d_roi_TauEnergySimNoData',
207 title=
"CPM RoI Tau Energy Simulation but no Data;;",type=
'TH2F',
208 cutmask=
'',path=monRoiPath,
209 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
211 myGroup.defineHistogram(
'tauEnerDataNoSimLocX,tauEnerDataNoSimLocY;cpm_2d_roi_TauEnergyDataNoSim',
212 title=
"CPM RoI Tau Energy Data but no Simulation;;",type=
'TH2F',
213 cutmask=
'',path=monRoiPath,
214 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
216 myGroup.defineHistogram(
'roiEtaSimEqData,roiPhiSimEqData;cpm_2d_etaPhi_roi_SimEqData',
217 title=
"CPM RoI Data/Simulation Non-zero Matches;;",type=
'TH2F',
218 cutmask=
'',path=monRoiPath,
219 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
221 myGroup.defineHistogram(
'roiEtaSimNeData,roiPhiSimNeData;cpm_2d_etaPhi_roi_SimNeData',
222 title=
"CPM RoI Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
223 cutmask=
'',path=monRoiPath,
224 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
226 myGroup.defineHistogram(
'roiEtaSimNoData,roiPhiSimNoData;cpm_2d_etaPhi_roi_SimNoData',
227 title=
"CPM RoI Simulation but no Data;;",type=
'TH2F',
228 cutmask=
'',path=monRoiPath,
229 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
231 myGroup.defineHistogram(
'roiEtaDataNoSim,roiPhiDataNoSim;cpm_2d_etaPhi_roi_DataNoSim',
232 title=
"CPM RoI Data but no Simulation;;",type=
'TH2F',
233 cutmask=
'',path=monRoiPath,
234 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
237 myGroup.defineHistogram(
'cmxLeftEnerSimEqDataLocX,cmxLeftEnerSimEqDataLocY;cmx_2d_tob_LeftEnergySimEqData',
238 title=
"CMX TOB Left Energy Data/Simulation Non-zero Matches;;",type=
'TH2F',
239 cutmask=
'',path=monCMXinPath,
240 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
242 myGroup.defineHistogram(
'cmxRightEnerSimEqDataLocX,cmxRightEnerSimEqDataLocY;cmx_2d_tob_RightEnergySimEqData',
243 title=
"CMX TOB Right Energy Data/Simulation Non-zero Matches;;",type=
'TH2F',
244 cutmask=
'',path=monCMXinPath,
245 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
247 myGroup.defineHistogram(
'cmxLeftEnerSimNeDataLocX,cmxLeftEnerSimNeDataLocY;cmx_2d_tob_LeftEnergySimNeData',
248 title=
"CMX TOB Left Energy Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
249 cutmask=
'',path=monCMXinPath,
250 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
252 myGroup.defineHistogram(
'cmxRightEnerSimNeDataLocX,cmxRightEnerSimNeDataLocY;cmx_2d_tob_RightEnergySimNeData',
253 title=
"CMX TOB Right Energy Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
254 cutmask=
'',path=monCMXinPath,
255 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
257 myGroup.defineHistogram(
'cmxLeftEnerSimNoDataLocX,cmxLeftEnerSimNoDataLocY;cmx_2d_tob_LeftEnergySimNoData',
258 title=
"CMX TOB Left Energy Simulation but no Data;;",type=
'TH2F',
259 cutmask=
'',path=monCMXinPath,
260 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
262 myGroup.defineHistogram(
'cmxRightEnerSimNoDataLocX,cmxRightEnerSimNoDataLocY;cmx_2d_tob_RightEnergySimNoData',
263 title=
"CMX TOB Right Energy Simulation but no Data;;",type=
'TH2F',
264 cutmask=
'',path=monCMXinPath,
265 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
267 myGroup.defineHistogram(
'cmxLeftEnerDataNoSimLocX,cmxLeftEnerDataNoSimLocY;cmx_2d_tob_LeftEnergyDataNoSim',
268 title=
"CMX TOB Left Energy Data but no Simulation;;",type=
'TH2F',
269 cutmask=
'',path=monCMXinPath,
270 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
272 myGroup.defineHistogram(
'cmxRightEnerDataNoSimLocX,cmxRightEnerDataNoSimLocY;cmx_2d_tob_RightEnergyDataNoSim',
273 title=
"CMX TOB Right Energy Data but no Simulation;;",type=
'TH2F',
274 cutmask=
'',path=monCMXinPath,
275 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
278 myGroup.defineHistogram(
'cmxLeftIsolSimEqDataLocX,cmxLeftIsolSimEqDataLocY;cmx_2d_tob_LeftIsolSimEqData',
279 title=
"CMX TOB Left Isolation Data/Simulation Non-zero Matches;;",type=
'TH2F',
280 cutmask=
'',path=monCMXinPath,
281 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
283 myGroup.defineHistogram(
'cmxRightIsolSimEqDataLocX,cmxRightIsolSimEqDataLocY;cmx_2d_tob_RightIsolSimEqData',
284 title=
"CMX TOB Right Isolation Data/Simulation Non-zero Matches;;",type=
'TH2F',
285 cutmask=
'',path=monCMXinPath,
286 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
288 myGroup.defineHistogram(
'cmxLeftIsolSimNeDataLocX,cmxLeftIsolSimNeDataLocY;cmx_2d_tob_LeftIsolSimNeData',
289 title=
"CMX TOB Left Isolation Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
290 cutmask=
'',path=monCMXinPath,
291 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
293 myGroup.defineHistogram(
'cmxRightIsolSimNeDataLocX,cmxRightIsolSimNeDataLocY;cmx_2d_tob_RightIsolSimNeData',
294 title=
"CMX TOB Right Isolation Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
295 cutmask=
'',path=monCMXinPath,
296 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
298 myGroup.defineHistogram(
'cmxLeftIsolSimNoDataLocX,cmxLeftIsolSimNoDataLocY;cmx_2d_tob_LeftIsolSimNoData',
299 title=
"CMX TOB Left Isolation Simulation but no Data;;",type=
'TH2F',
300 cutmask=
'',path=monCMXinPath,
301 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
303 myGroup.defineHistogram(
'cmxRightIsolSimNoDataLocX,cmxRightIsolSimNoDataLocY;cmx_2d_tob_RightIsolSimNoData',
304 title=
"CMX TOB Right Isolation Simulation but no Data;;",type=
'TH2F',
305 cutmask=
'',path=monCMXinPath,
306 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
308 myGroup.defineHistogram(
'cmxLeftIsolDataNoSimLocX,cmxLeftIsolDataNoSimLocY;cmx_2d_tob_LeftIsolDataNoSim',
309 title=
"CMX TOB Left Isolation Data but no Simulation;;",type=
'TH2F',
310 cutmask=
'',path=monCMXinPath,
311 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
313 myGroup.defineHistogram(
'cmxRightIsolDataNoSimLocX,cmxRightIsolDataNoSimLocY;cmx_2d_tob_RightIsolDataNoSim',
314 title=
"CMX TOB Right Isolation Data but no Simulation;;",type=
'TH2F',
315 cutmask=
'',path=monCMXinPath,
316 xbins=56,xmin=0.,xmax=56.0,ybins=64,ymin=0.,ymax=64.0)
319 myGroup.defineHistogram(
'cmxOverLocXSimEqData,cmxOverCmxSimEqData;cmx_2d_tob_OverflowSimEqData',
320 title=
"CMX TOB RoI Overflow Bit Data/Simulation Matches;;",type=
'TH2F',
321 cutmask=
'',path=monCMXinPath,
322 xbins=56,xmin=0.0,xmax=56.0,ybins=2,ymin=0.,ymax=2.0)
324 myGroup.defineHistogram(
'cmxOverLocXSimNeData,cmxOverCmxSimNeData;cmx_2d_tob_OverflowSimNeData',
325 title=
"CMX TOB RoI Overflow Bit Data/Simulation Mismatches;;",type=
'TH2F',
326 cutmask=
'',path=monCMXinPath,
327 xbins=56,xmin=0.0,xmax=56.0,ybins=2,ymin=0.,ymax=2.0)
330 myGroup.defineHistogram(
'cmxEtaSimEqData,cmxPhiSimEqData;cmx_2d_etaPhi_tob_SimEqData',
331 title=
"CMX TOB Data/Simulation Non-zero Matches;;",type=
'TH2F',
332 cutmask=
'',path=monCMXinPath,
333 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
335 myGroup.defineHistogram(
'cmxEtaSimNeData,cmxPhiSimNeData;cmx_2d_etaPhi_tob_SimNeData',
336 title=
"CMX TOB Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
337 cutmask=
'',path=monCMXinPath,
338 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
340 myGroup.defineHistogram(
'cmxEtaSimNoData,cmxPhiSimNoData;cmx_2d_etaPhi_tob_SimNoData',
341 title=
"CMX TOB Simulation but no Data;;",type=
'TH2F',
342 cutmask=
'',path=monCMXinPath,
343 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
345 myGroup.defineHistogram(
'cmxEtaDataNoSim,cmxPhiDataNoSim;cmx_2d_etaPhi_tob_DataNoSim',
346 title=
"CMX TOB Data but no Simulation;;",type=
'TH2F',
347 cutmask=
'',path=monCMXinPath,
348 xbins=66,xmin=-3.3,xmax=3.3,ybins=64,ymin=0.,ymax=64.0)
353 myGroup.defineHistogram(
'cmx_sum_loc_SimEqData;cmx_1d_thresh_SumsSimEqData',
354 title=
'CMX Hit Sums Data/Simulation Non-zero Matches',
355 cutmask=
'',path=monCMXsumsPath,xbins=16,xmin=0.0,xmax=16.0)
357 myGroup.defineHistogram(
'cmx_sum_loc_SimNeData;cmx_1d_thresh_SumsSimNeData',
358 title=
'CMX Hit Sums Data/Simulation Non-zero Mismatches',
359 cutmask=
'',path=monCMXsumsPath,xbins=16,xmin=0.0,xmax=16.0)
361 myGroup.defineHistogram(
'cmx_sum_loc_SimNoData;cmx_1d_thresh_SumsSimNoData',
362 title=
'CMX Hit Sums Simulation but no Data',
363 cutmask=
'',path=monCMXsumsPath,xbins=16,xmin=0.0,xmax=16.0)
365 myGroup.defineHistogram(
'cmx_sum_loc_DataNoSim;cmx_1d_thresh_SumsDataNoSim',
366 title=
'CMX Hit Sums Data but no Simulation',
367 cutmask=
'',path=monCMXsumsPath,xbins=16,xmin=0.0,xmax=16.0)
370 myGroup.defineHistogram(
'cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData;cmx_2d_thresh_LeftSumsSimEqData',
371 title=
'CMX Hit Sums Left Data/Simulation Threshold Non-zero Matches',type=
'TH2F',
372 cutmask=
'',path=monCMXsumsPath,xbins=8,xmin=0.0,xmax=8.0,ybins=16,ymin=0.0,ymax=16.0,
373 weight=
'cmx_w_leftsums_SimEqData')
375 myGroup.defineHistogram(
'cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData;cmx_2d_thresh_LeftSumsSimNeData',
376 title=
'CMX Hit Sums Left Data/Simulation Threshold Non-zero Mismatches',type=
'TH2F',
377 cutmask=
'',path=monCMXsumsPath,xbins=8,xmin=0.0,xmax=8.0,ybins=16,ymin=0.0,ymax=16.0,
378 weight=
'cmx_w_leftsums_SimNeData')
380 myGroup.defineHistogram(
'cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData;cmx_2d_thresh_RightSumsSimEqData',
381 title=
'CMX Hit Sums Right Data/Simulation Threshold Non-zero Matches',type=
'TH2F',
382 cutmask=
'',path=monCMXsumsPath,xbins=8,xmin=0.0,xmax=8.0,ybins=16,ymin=0.0,ymax=16.0,
383 weight=
'cmx_w_rightsums_SimEqData')
385 myGroup.defineHistogram(
'cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData;cmx_2d_thresh_RightSumsSimNeData',
386 title=
'CMX Hit Sums Right Data/Simulation Threshold Non-zero Mismatches',type=
'TH2F',
387 cutmask=
'',path=monCMXsumsPath,xbins=8,xmin=0.0,xmax=8.0,ybins=16,ymin=0.0,ymax=16.0,
388 weight=
'cmx_w_rightsums_SimNeData')
393 m_histTool->setMonGroup(&monCMXTopo);
395 m_h_cmx_2d_topo_SimNoData = m_histTool->book2F(
396 "cmx_2d_topo_SimNoData", "CMX Topo Output Simulation but no Data", 8, 0,
398 setLabelsTopo(m_h_cmx_2d_topo_SimNoData);
399 m_h_cmx_2d_topo_DataNoSim = m_histTool->book2F(
400 "cmx_2d_topo_DataNoSim", "CMX Topo Output Data but no Simulation", 8, 0,
402 setLabelsTopo(m_h_cmx_2d_topo_DataNoSim);
404 myGroup.defineHistogram(
'cmxTopoLocXSimNeData,cmxTopoLocYSimNeData;cmx_2d_topo_SimNeData',
405 title=
"CMX Topo Output Data/Simulation Non-zero Mismatches;;",type=
'TH2F',
406 cutmask=
'',path=monCMXTopoPath,
407 xbins=8,xmin=0.0,xmax=8.0,ybins=3,ymin=0.0,ymax=3.0)
409 myGroup.defineHistogram(
'cmxTopoLocXSimEqData,cmxTopoLocYSimEqData;cmx_2d_topo_SimEqData',
410 title=
"CMX Topo Output Data/Simulation Non-zero Matches;;",type=
'TH2F',
411 cutmask=
'',path=monCMXTopoPath,
412 xbins=8,xmin=0.0,xmax=8.0,ybins=3,ymin=0.0,ymax=3.0)
414 myGroup.defineHistogram(
'cmxTopoLocXSimNoData,cmxTopoLocYSimNoData;cmx_2d_topo_SimNoData',
415 title=
"CMX Topo Output Simulation but no Data;;",type=
'TH2F',
416 cutmask=
'',path=monCMXTopoPath,
417 xbins=8,xmin=0.0,xmax=8.0,ybins=3,ymin=0.0,ymax=3.0)
419 myGroup.defineHistogram(
'cmxTopoLocXDataNoSim,cmxTopoLocYDataNoSim;cmx_2d_topo_DataNoSim',
420 title=
"CMX Topo Output Data but no Simulation;;",type=
'TH2F',
421 cutmask=
'',path=monCMXTopoPath,
422 xbins=8,xmin=0.0,xmax=8.0,ybins=3,ymin=0.0,ymax=3.0)
426 NumberOfSummaryBins=10
427 summary_labels=[
"EM tt",
"Had tt",
"#color[2]{EM RoIs}",
"#color[2]{Tau RoIs}",
"#splitline{Left}{TOBs}",
428 "#splitline{Right}{TOBs}",
"#color[2]{#splitline{Local}{Sums}}",
"#splitline{Remote}{Sums}",
"#splitline{Total}{Sums}",
"#splitline{Topo}{Info}"]
430 myGroup.defineHistogram(
'cpmErrorLoc,cpmError;cpm_2d_SimEqDataOverview',
431 title=
"CP Transmission/Comparison with Simulation Overview - Events with Matches;;",
433 cutmask=
'',path=monExpertPath,
434 xbins=64,xmin=0.,xmax=64.0,
435 ybins=NumberOfSummaryBins,ymin=0.,ymax=NumberOfSummaryBins)
437 myGroup.defineHistogram(
'cpmErrorLoc_SimNeData,cpmError_SimNeData;cpm_2d_SimNeDataOverview',
438 title=
"CP Transmission/Comparison with Simulation Overview - Events with Mismatches;;",
440 cutmask=
'',path=monExpertPath,
441 xbins=64,xmin=0.,xmax=64.0,
442 ybins=NumberOfSummaryBins,ymin=0.,ymax=NumberOfSummaryBins)
445 myGroup.defineHistogram(
'cpmErrorSummary;cpm_1d_SimNeDataSummary',
446 title=
'CP Transmission/Comparison with Simulation Mismatch Summary;;Events',
447 cutmask=
'',path=monShiftPath,
448 xbins=NumberOfSummaryBins,xmin=0,xmax=NumberOfSummaryBins,xlabels=summary_labels)
454 myGroup.defineHistogram(
'em_tt_evtstr,em_tt_y;cpm_em_2d_tt_MismatchEvents',
455 title=
'CPM Towers EM Mismatch Event Numbers;Events with Error/Mismatch;',type=
'TH2I',
456 path=monEvent1Path,merge=
'merge',
457 xbins=1,ybins=56,ymin=0,ymax=56.0)
459 myGroup.defineHistogram(
'had_tt_evtstr,had_tt_y;cpm_had_2d_tt_MismatchEvents',
460 title=
'CPM Towers Had Mismatch Event Numbers;Events with Error/Mismatch;',type=
'TH2I',
461 path=monEvent1Path,merge=
'merge',
462 xbins=1,ybins=56,ymin=0,ymax=56.0)
464 myGroup.defineHistogram(
'em_roi_evtstr,em_roi_y;cpm_2d_roi_EmMismatchEvents',
465 title=
'CPM RoIs EM Mismatch Event Numbers;Events with Error/Mismatch;',type=
'TH2I',
466 path=monEvent1Path,merge=
'merge',
467 xbins=1,ybins=56,ymin=0,ymax=56.0)
469 myGroup.defineHistogram(
'tau_roi_evtstr,tau_roi_y;cpm_2d_roi_TauMismatchEvents',
470 title=
'CPM RoIs Tau Mismatch Event Numbers;Events with Error/Mismatch;',type=
'TH2I',
471 path=monEvent1Path,merge=
'merge',
472 xbins=1,ybins=56,ymin=0,ymax=56.0)
475 myGroup.defineHistogram(
'cmx_tob_left_evtstr,cmx_tob_left_y;cmx_2d_tob_LeftMismatchEvents',
476 title=
'CMX TOBs Left Mismatch Event Numbers;Events with Error/Mismatch;',type=
'TH2I',
477 path=monEvent2Path,merge=
'merge',
478 xbins=1,ybins=56,ymin=0,ymax=56.0)
480 myGroup.defineHistogram(
'cmx_tob_right_evstr,cmx_tob_right_y;cmx_2d_tob_RightMismatchEvents',
481 title=
'CMX TOBs Right Mismatch Event Numbers;Events with Error/Mismatch;',type=
'TH2I',
482 path=monEvent2Path,merge=
'merge',
483 xbins=1,ybins=56,ymin=0,ymax=56.0)
485 thresh_ylabels=[
"Local 0/0",
"",
"",
"",
"",
"",
"",
"",
486 "Remote 0/0",
"",
"",
"",
"",
"",
"Total 3/0",
"",
487 "Topo 0/0",
"",
"",
"",
"",
"",
"",
""]
488 myGroup.defineHistogram(
'cmx_thresh_evtstr,cmx_thresh_y;cmx_2d_thresh_SumsMismatchEvents',
489 title=
'CMX Hit Sums Mismatch Event Numbers;Events with Error/Mismatch;', type=
'TH2I',
490 path=monEvent2Path,merge=
'merge',
491 xbins=1,ybins=24,ymin=0,ymax=24.0,ylabels=thresh_ylabels)
494 acc = helper.result()
499 if __name__==
'__main__':
501 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
504 inputs = glob.glob(
'/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2020-04-06T2139/TrigP1Test/test_trigP1_v1PhysP1_T0Mon_build/ESD.pool.root')
507 flags.Input.Files = inputs
508 flags.Output.HISTFileName =
'ExampleMonitorOutput_LVL1.root'
513 from AthenaConfiguration.MainServicesConfig
import MainServicesSerialCfg
514 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
515 cfg = MainServicesSerialCfg()
519 cfg.merge(CpmSimMonitorCfg)
522 CpmSimMonitorCfg.getEventAlgo(
'CpmSimMonAlg').OutputLevel = 2
524 cfg.printConfig(withDetails=
False, summariseProps =
True)