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

◆ gFexByteStreamToolCfg()

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

Definition at line 148 of file L1CaloFEXByteStreamConfig.py.

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

◆ gFexInputByteStreamToolCfg()

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

Definition at line 309 of file L1CaloFEXByteStreamConfig.py.

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

◆ jFexInputByteStreamToolCfg()

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

Definition at line 266 of file L1CaloFEXByteStreamConfig.py.

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

◆ jFexRoiByteStreamToolCfg()

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

Definition at line 87 of file L1CaloFEXByteStreamConfig.py.

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