ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloFEXByteStreamConfig Namespace Reference

Functions

 eFexByteStreamToolCfg (flags, name, *, writeBS=False, TOBs=True, xTOBs=False, multiSlice=False, decodeInputs=False)
 jFexRoiByteStreamToolCfg (flags, name, *, writeBS=False, xTOBs=False)
 gFexByteStreamToolCfg (flags, name, *, writeBS=False, multiSlice=False)
 jFexInputByteStreamToolCfg (flags, name, *, writeBS=False)
 gFexInputByteStreamToolCfg (flags, name, *, writeBS=False)

Function Documentation

◆ eFexByteStreamToolCfg()

L1CaloFEXByteStreamConfig.eFexByteStreamToolCfg ( flags,
name,
* ,
writeBS = False,
TOBs = True,
xTOBs = False,
multiSlice = False,
decodeInputs = False )

Definition at line 8 of file L1CaloFEXByteStreamConfig.py.

8def eFexByteStreamToolCfg(flags, name, *, writeBS=False, TOBs=True, xTOBs=False, multiSlice=False, decodeInputs=False):
9 acc = ComponentAccumulator()
10
11 tool = CompFactory.eFexByteStreamTool(name)
12
13 if writeBS:
14 # write BS == read xAOD
15 # Note: this is currently unsupported!!!
16 if TOBs:
17 tool.eEMContainerReadKeys += ["L1_eEMRoI"]
18 tool.eTAUContainerReadKeys += ["L1_eTauRoI"]
19 if xTOBs:
20 tool.eEMContainerReadKeys += ["L1_eEMxRoI"]
21 tool.eTAUContainerReadKeys += ["L1_eTauxRoI"]
22 tool.eEMContainerWriteKey = ""
23 tool.eTAUContainerWriteKey = ""
24 efex_roi_moduleids = [0x1000,0x1100]
25 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid)) for moduleid in efex_roi_moduleids]
26
27 else:
28 # read BS == write xAOD
29 if TOBs or xTOBs or multiSlice:
30 efex_roi_moduleids = [0x1000,0x1100]
31 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid)) for moduleid in efex_roi_moduleids]
32 if TOBs:
33 tool.eEMContainerWriteKey = "L1_eEMRoI"
34 tool.eTAUContainerWriteKey = "L1_eTauRoI"
35 if xTOBs:
36 tool.eEMxContainerWriteKey = "L1_eEMxRoI"
37 tool.eTAUxContainerWriteKey = "L1_eTauxRoI"
38 if multiSlice:
39 tool.eEMSliceContainerWriteKey = "L1_eEMxRoIOutOfTime"
40 tool.eTAUSliceContainerWriteKey = "L1_eTauxRoIOutOfTime"
41 if decodeInputs:
42 efex_raw_ids = []
43 inputId = int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, 0x1000))
44 for shelf in range(0,2):
45 for module in range(0,12):
46 efex_raw_ids += [inputId + shelf*0x100 + module*0x010 ]
47 tool.ROBIDs += efex_raw_ids
48 tool.eTowerContainerWriteKey = "L1_eFexDataTowers"
49
50 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
51 if flags.Trigger.doHLT:
52 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
53 monTool = GenericMonitoringTool(flags,'MonTool',HistPath = f'HLTFramework/L1BSConverters/{name}')
54 topDir = "EXPERT"
55 monTool.defineHistogram('efexDecoderErrorTitle,efexDecoderErrorLocation;errors', path=topDir, type='TH2I',
56 title='Decoder Errors;Title;Location',
57 xbins=1,xmin=0,xmax=1,
58 ybins=1,ymin=0,ymax=1,
59 opt=['kCanRebin'],merge="merge")
60 tool.MonTool = monTool
61 else:
62 # if used in offline reconstruction respect DQ convention (ATR-26371)
63 # use L1Calo's special MonitoringCfgHelper
64 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig import L1CaloMonitorCfgHelper
65 helper = L1CaloMonitorCfgHelper(flags,None,name)
66
67 # could consider getting rid of this first histogram, since all the info should be accessible in the second
68 # will make decision after gaining experience @ P1
69 helper.defineHistogram('efexDecoderErrorTitle,efexDecoderErrorLocation;h_efex_errors', type='TH2I',
70 path="Developer/ByteStreamDecoders",
71 fillGroup = f'{name}MonTool',
72 title='eFEX Decoder Errors;Title;Location',
73 xbins=1,xmin=0,xmax=1,
74 ybins=1,ymin=0,ymax=1,
75 opt=['kCanRebin','kAlwaysCreate'],merge="merge")
76 helper.defineHistogram('lbn,decoderError;h_efex_errors_vs_lbn', type='TH2I',
77 path="Expert/ByteStreamDecoders",
78 hanConfig={"algorithm":"Histogram_Empty","description":"Should be empty. Please report any errors to eFEX software experts."},
79 fillGroup = f'{name}MonTool',
80 title='eFEX Decoder Errors;LB;Error',
81 xbins=1,xmin=0,xmax=1,
82 ybins=1,ymin=0,ymax=1,
83 opt=['kAddBinsDynamically','kCanRebin','kAlwaysCreate'],merge="merge")
84 tool.MonTool = helper.fillGroups[f'{name}MonTool']
85 acc.merge(helper.result())
86
87
88 acc.setPrivateTools(tool)
89 return acc
90
91

◆ gFexByteStreamToolCfg()

L1CaloFEXByteStreamConfig.gFexByteStreamToolCfg ( flags,
name,
* ,
writeBS = False,
multiSlice = False )

Definition at line 153 of file L1CaloFEXByteStreamConfig.py.

153def gFexByteStreamToolCfg(flags, name, *, writeBS=False, multiSlice=False):
154 acc = ComponentAccumulator()
155 tool = CompFactory.gFexByteStreamTool(name)
156 gfex_roi_moduleids = [0x3000]
157 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid)) for moduleid in gfex_roi_moduleids]
158 if writeBS:
159 # write BS == read xAOD
160 tool.gFexRhoOutputContainerReadKey ="L1_gFexRhoRoI"
161 tool.gFexSRJetOutputContainerReadKey ="L1_gFexSRJetRoI"
162 tool.gFexLRJetOutputContainerReadKey ="L1_gFexLRJetRoI"
163 tool.gScalarEJwojOutputContainerReadKey ="L1_gScalarEJwoj"
164 tool.gEspressoOutputContainerReadKey ="L1_gEspresso"
165 tool.gMETComponentsJwojOutputContainerReadKey ="L1_gMETComponentsJwoj"
166 tool.gMHTComponentsJwojOutputContainerReadKey ="L1_gMHTComponentsJwoj"
167 tool.gMSTComponentsJwojOutputContainerReadKey ="L1_gMSTComponentsJwoj"
168 tool.gMETComponentsNoiseCutOutputContainerReadKey ="L1_gMETComponentsNoiseCut"
169 tool.gMETComponentsRmsOutputContainerReadKey ="L1_gMETComponentsRms"
170 tool.gScalarENoiseCutOutputContainerReadKey ="L1_gScalarENoiseCut"
171 tool.gScalarERmsOutputContainerReadKey ="L1_gScalarERms"
172
173
174 tool.gFexRhoOutputContainerWriteKey =""
175 tool.gFexSRJetOutputContainerWriteKey =""
176 tool.gFexLRJetOutputContainerWriteKey =""
177 tool.gScalarEJwojOutputContainerWriteKey =""
178 tool.gEspressoOutputContainerWriteKey =""
179 tool.gMETComponentsJwojOutputContainerWriteKey =""
180 tool.gMHTComponentsJwojOutputContainerWriteKey =""
181 tool.gMSTComponentsJwojOutputContainerWriteKey =""
182 tool.gMETComponentsNoiseCutOutputContainerWriteKey =""
183 tool.gMETComponentsRmsOutputContainerWriteKey =""
184 tool.gScalarENoiseCutOutputContainerWriteKey =""
185 tool.gScalarERmsOutputContainerWriteKey =""
186 else:
187 # read BS == write xAOD
188 tool.gFexRhoOutputContainerReadKey =""
189 tool.gFexSRJetOutputContainerReadKey =""
190 tool.gFexLRJetOutputContainerReadKey =""
191 tool.gScalarEJwojOutputContainerReadKey =""
192 tool.gEspressoOutputContainerReadKey =""
193 tool.gMETComponentsJwojOutputContainerReadKey =""
194 tool.gMHTComponentsJwojOutputContainerReadKey =""
195 tool.gMSTComponentsJwojOutputContainerReadKey =""
196 tool.gMETComponentsNoiseCutOutputContainerReadKey =""
197 tool.gMETComponentsRmsOutputContainerReadKey =""
198 tool.gScalarENoiseCutOutputContainerReadKey =""
199 tool.gScalarERmsOutputContainerReadKey =""
200
201
202 tool.gFexRhoOutputContainerWriteKey ="L1_gFexRhoRoI"
203 tool.gFexSRJetOutputContainerWriteKey ="L1_gFexSRJetRoI"
204 tool.gFexLRJetOutputContainerWriteKey ="L1_gFexLRJetRoI"
205 tool.gScalarEJwojOutputContainerWriteKey ="L1_gScalarEJwoj"
206 tool.gEspressoOutputContainerWriteKey ="L1_gEspresso"
207 tool.gMETComponentsJwojOutputContainerWriteKey ="L1_gMETComponentsJwoj"
208 tool.gMHTComponentsJwojOutputContainerWriteKey ="L1_gMHTComponentsJwoj"
209 tool.gMSTComponentsJwojOutputContainerWriteKey ="L1_gMSTComponentsJwoj"
210 tool.gMETComponentsNoiseCutOutputContainerWriteKey ="L1_gMETComponentsNoiseCut"
211 tool.gMETComponentsRmsOutputContainerWriteKey ="L1_gMETComponentsRms"
212 tool.gScalarENoiseCutOutputContainerWriteKey ="L1_gScalarENoiseCut"
213 tool.gScalarERmsOutputContainerWriteKey ="L1_gScalarERms"
214
215 # Multi-slice containers (out-of-time TOBs from slices 1,2)
216 if multiSlice:
217 # Jet TOBs
218 tool.gFexRhoSliceContainerWriteKey ="L1_gFexRhoRoIOutOfTime"
219 tool.gFexSRJetSliceContainerWriteKey ="L1_gFexSRJetRoIOutOfTime"
220 tool.gFexLRJetSliceContainerWriteKey ="L1_gFexLRJetRoIOutOfTime"
221 # Global TOBs - JwoJ
222 tool.gScalarEJwojSliceContainerWriteKey ="L1_gScalarEJwojOutOfTime"
223 tool.gMETComponentsJwojSliceContainerWriteKey ="L1_gMETComponentsJwojOutOfTime"
224 tool.gMHTComponentsJwojSliceContainerWriteKey ="L1_gMHTComponentsJwojOutOfTime"
225 tool.gMSTComponentsJwojSliceContainerWriteKey ="L1_gMSTComponentsJwojOutOfTime"
226 # Global TOBs - gEspresso
227 tool.gEspressoSliceContainerWriteKey ="L1_gEspressoOutOfTime"
228 # Global TOBs - NoiseCut
229 tool.gMETComponentsNoiseCutSliceContainerWriteKey="L1_gMETComponentsNoiseCutOutOfTime"
230 tool.gScalarENoiseCutSliceContainerWriteKey ="L1_gScalarENoiseCutOutOfTime"
231 # Global TOBs - Rms
232 tool.gMETComponentsRmsSliceContainerWriteKey ="L1_gMETComponentsRmsOutOfTime"
233 tool.gScalarERmsSliceContainerWriteKey ="L1_gScalarERmsOutOfTime"
234 # Note: Slice number decoration keys are automatically derived from the
235 # parent WriteHandleKeys above with decoration name "sliceNumber"
236
237
238 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
239 if flags.Trigger.doHLT:
240 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
241 monTool = GenericMonitoringTool(flags,'MonTool',HistPath = f'HLTFramework/L1BSConverters/{name}')
242 topDir = "EXPERT"
243 else:
244 # if used in offline reconstruction respect DQ convention (ATR-26371)
245 from AthenaMonitoring import AthMonitorCfgHelper
246 helper = AthMonitorCfgHelper(flags, 'HLTFramework')
247 monTool = helper.addGroup(None, f'{name}MonTool', f'/HLT/HLTFramework/L1BSConverters/{name}')
248 topDir = None
249 acc.merge(helper.result())
250
251 monTool.defineHistogram('gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type='TH2I',
252 title='gFEX TOB Decoder Errors;Type;Location',
253 xlabels=["UNKNOWN"],
254 ylabels=["UNKNOWN"],
255 opt=['kCanRebin'],merge="merge")
256 tool.MonTool = monTool
257
258
259 acc.setPrivateTools(tool)
260 return acc
261
262

◆ gFexInputByteStreamToolCfg()

L1CaloFEXByteStreamConfig.gFexInputByteStreamToolCfg ( flags,
name,
* ,
writeBS = False )

Definition at line 306 of file L1CaloFEXByteStreamConfig.py.

306def gFexInputByteStreamToolCfg(flags, name, *, writeBS=False):
307 acc = ComponentAccumulator()
308 tool = CompFactory.gFexInputByteStreamTool(name)
309 gfex_roi_moduleids = [0x3000]
310 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid)) for moduleid in gfex_roi_moduleids]
311
312 if writeBS:
313 # write BS == read xAOD
314 tool.gTowersReadKey = "L1_gFexDataTowers"
315
316 tool.gTowersWriteKey =""
317 else:
318 # read BS == write xAOD
319 tool.gTowersReadKey =""
320
321 tool.gTowersWriteKey = "L1_gFexDataTowers"
322
323 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
324 if flags.Trigger.doHLT:
325 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
326 monTool = GenericMonitoringTool(flags,'MonTool',HistPath = f'HLTFramework/L1BSConverters/{name}')
327 topDir = "EXPERT"
328 else:
329 # if used in offline reconstruction respect DQ convention (ATR-26371)
330 from AthenaMonitoring import AthMonitorCfgHelper
331 helper = AthMonitorCfgHelper(flags, 'HLTFramework')
332 monTool = helper.addGroup(None, f'{name}MonTool', f'/HLT/HLTFramework/L1BSConverters/{name}')
333 topDir = None
334 acc.merge(helper.result())
335
336 monTool.defineHistogram('gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type='TH2I',
337 title='gFEX InputData Decoder Errors;Type;Location',
338 xlabels=["UNKNOWN"],
339 ylabels=["UNKNOWN"],
340 opt=['kCanRebin'],merge="merge")
341 tool.MonTool = monTool
342
343 acc.setPrivateTools(tool)
344 return acc

◆ jFexInputByteStreamToolCfg()

L1CaloFEXByteStreamConfig.jFexInputByteStreamToolCfg ( flags,
name,
* ,
writeBS = False )

Definition at line 263 of file L1CaloFEXByteStreamConfig.py.

263def jFexInputByteStreamToolCfg(flags, name, *, writeBS=False):
264 acc = ComponentAccumulator()
265 tool = CompFactory.jFexInputByteStreamTool(name)
266 jfex_roi_moduleids = [0x2000,0x2010,0x2020,0x2030,0x2040,0x2050]
267 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid)) for moduleid in jfex_roi_moduleids]
268
269 #will be needed in the future for jTower container, still not coded
270 if writeBS:
271 # write BS == read xAOD
272 tool.jTowersReadKey = "L1_jFexDataTowers"
273
274 tool.jTowersWriteKey =""
275 else:
276 # read BS == write xAOD
277 tool.jTowersReadKey =""
278
279 tool.jTowersWriteKey = "L1_jFexDataTowers"
280
281 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
282 if flags.Trigger.doHLT:
283 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
284 monTool = GenericMonitoringTool(flags,'MonTool',HistPath = f'HLTFramework/L1BSConverters/{name}')
285 topDir = "EXPERT"
286 else:
287 # if used in offline reconstruction respect DQ convention (ATR-26371)
288 from AthenaMonitoring import AthMonitorCfgHelper
289 helper = AthMonitorCfgHelper(flags, 'HLTFramework')
290 monTool = helper.addGroup(None, f'{name}MonTool', f'/HLT/HLTFramework/L1BSConverters/{name}')
291 topDir = None
292 acc.merge(helper.result())
293
294 monTool.defineHistogram('jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type='TH2I',
295 title='jFEX InputData Decoder Errors;Type;Location',
296 xlabels=["UNKNOWN"],
297 ylabels=["UNKNOWN"],
298 opt=['kCanRebin'],merge="merge")
299 tool.MonTool = monTool
300
301
302 acc.setPrivateTools(tool)
303 return acc
304
305

◆ jFexRoiByteStreamToolCfg()

L1CaloFEXByteStreamConfig.jFexRoiByteStreamToolCfg ( flags,
name,
* ,
writeBS = False,
xTOBs = False )

Definition at line 92 of file L1CaloFEXByteStreamConfig.py.

92def jFexRoiByteStreamToolCfg(flags, name, *, writeBS=False, xTOBs=False):
93 acc = ComponentAccumulator()
94 tool = CompFactory.jFexRoiByteStreamTool(name)
95 tool.ConvertExtendedTOBs = xTOBs
96 jfex_roi_moduleids = [0x2000]
97 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid)) for moduleid in jfex_roi_moduleids]
98 if writeBS:
99 # write BS == read xAOD
100 tool.jJRoIContainerReadKey = "L1_jFexSRJetxRoI" if xTOBs else "L1_jFexSRJetRoI"
101 tool.jLJRoIContainerReadKey = "L1_jFexLRJetxRoI" if xTOBs else "L1_jFexLRJetRoI"
102 tool.jTauRoIContainerReadKey = "L1_jFexTauxRoI" if xTOBs else "L1_jFexTauRoI"
103 tool.jEMRoIContainerReadKey = "L1_jFexFwdElxRoI" if xTOBs else "L1_jFexFwdElRoI"
104 tool.jTERoIContainerReadKey = "L1_jFexSumETxRoI" if xTOBs else "L1_jFexSumETRoI"
105 tool.jXERoIContainerReadKey = "L1_jFexMETxRoI" if xTOBs else "L1_jFexMETRoI"
106
107 tool.jJRoIContainerWriteKey =""
108 tool.jLJRoIContainerWriteKey =""
109 tool.jTauRoIContainerWriteKey=""
110 tool.jEMRoIContainerWriteKey =""
111 tool.jTERoIContainerWriteKey =""
112 tool.jXERoIContainerWriteKey =""
113 else:
114 # read BS == write xAOD
115 tool.jJRoIContainerReadKey =""
116 tool.jLJRoIContainerReadKey =""
117 tool.jTauRoIContainerReadKey =""
118 tool.jEMRoIContainerReadKey =""
119 tool.jTERoIContainerReadKey =""
120 tool.jXERoIContainerReadKey =""
121
122 tool.jJRoIContainerWriteKey = "L1_jFexSRJetxRoI" if xTOBs else "L1_jFexSRJetRoI"
123 tool.jLJRoIContainerWriteKey = "L1_jFexLRJetxRoI" if xTOBs else "L1_jFexLRJetRoI"
124 tool.jTauRoIContainerWriteKey= "L1_jFexTauxRoI" if xTOBs else "L1_jFexTauRoI"
125 tool.jEMRoIContainerWriteKey = "L1_jFexFwdElxRoI" if xTOBs else "L1_jFexFwdElRoI"
126 tool.jTERoIContainerWriteKey = "L1_jFexSumETxRoI" if xTOBs else "L1_jFexSumETRoI"
127 tool.jXERoIContainerWriteKey = "L1_jFexMETxRoI" if xTOBs else "L1_jFexMETRoI"
128
129 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
130 if flags.Trigger.doHLT:
131 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
132 monTool = GenericMonitoringTool(flags,'MonTool',HistPath = f'HLTFramework/L1BSConverters/{name}')
133 topDir = "EXPERT"
134 else:
135 # if used in offline reconstruction respect DQ convention (ATR-26371)
136 from AthenaMonitoring import AthMonitorCfgHelper
137 helper = AthMonitorCfgHelper(flags, 'HLTFramework')
138 monTool = helper.addGroup(None, f'{name}MonTool', f'/HLT/HLTFramework/L1BSConverters/{name}')
139 topDir = None
140 acc.merge(helper.result())
141
142 monTool.defineHistogram('jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type='TH2I',
143 title='jFEX TOB Decoder Errors;Type;Location',
144 xlabels=["UNKNOWN"],
145 ylabels=["UNKNOWN"],
146 opt=['kCanRebin'],merge="merge")
147 tool.MonTool = monTool
148
149 acc.setPrivateTools(tool)
150 return acc
151
152