ATLAS Offline Software
Functions | Variables
python.TriggerRecoConfig Namespace Reference

Functions

def TriggerRecoCfg (flags)
 
def TriggerRecoCfgData (flags)
 
def TriggerRecoCfgMC (flags)
 
def TriggerMetadataWriterCfg (flags)
 
def TriggerEDMCfg (flags)
 
def Run2Run1NavigationSlimmingCfg (flags)
 
def Run1Run2BSExtractionCfg (flags)
 
def Run1xAODConversionCfg (flags)
 
def Run3TriggerBSUnpackingCfg (flags)
 

Variables

 log
 
 flags
 
 args
 
 Files
 
 MaxEvents
 
 AtlasVersion
 
 acc
 
 withDetails
 

Function Documentation

◆ Run1Run2BSExtractionCfg()

def python.TriggerRecoConfig.Run1Run2BSExtractionCfg (   flags)
Configures Trigger data from BS extraction 

Definition at line 248 of file TriggerRecoConfig.py.

248 def Run1Run2BSExtractionCfg( flags ):
249  """Configures Trigger data from BS extraction """
250  from SGComps.AddressRemappingConfig import InputRenameCfg
251 
252  acc = ComponentAccumulator()
253  extr = CompFactory.TrigBSExtraction()
254  robIDMap = {} # map of result keys and their ROB ID
255 
256  # Add fictional output to ensure data dependency in AthenaMT
257  extr.ExtraOutputs.add(("TrigBSExtractionOutput", "StoreGateSvc+TrigBSExtractionOutput"))
258 
259  if flags.Trigger.decodeHLT:
260  # Run-1: add xAOD conversion tool
261  if flags.Trigger.EDMVersion == 1 and flags.Trigger.doxAODConversion:
262  extr.BStoxAOD = acc.popToolsAndMerge( Run1xAODConversionCfg(flags) )
263 
264  serialiserTool = CompFactory.TrigTSerializer()
265  acc.addPublicTool(serialiserTool)
266  extr.NavigationForL2 = CompFactory.HLT.Navigation("NavigationForL2",
267  ClassesFromPayloadIgnore = ["TrigPassBits#passbits"]) # Ignore the L2 TrigPassBits to avoid clash with EF (ATR-23411)
268 
269  extr.Navigation = CompFactory.HLT.Navigation("Navigation")
270  from TrigEDMConfig.TriggerEDM import getEDMLibraries
271  extr.Navigation.Dlls = getEDMLibraries()
272  from TrigEDMConfig.TriggerEDM import getPreregistrationList
273  extr.Navigation.ClassesToPreregister = getPreregistrationList(flags.Trigger.EDMVersion, flags.Trigger.doxAODConversion)
274  from eformat import helper as efh
275 
276  if flags.Trigger.EDMVersion == 1: # Run-1 has L2 and EF result
277  acc.merge(InputRenameCfg("HLT::HLTResult", "HLTResult_L2", "HLTResult_L2_BS"))
278  acc.merge(InputRenameCfg("HLT::HLTResult", "HLTResult_EF", "HLTResult_EF_BS"))
279  robIDMap["HLTResult_L2_BS"] = efh.SourceIdentifier(efh.SubDetector.TDAQ_LVL2, 0).code()
280  robIDMap["HLTResult_EF_BS"] = efh.SourceIdentifier(efh.SubDetector.TDAQ_EVENT_FILTER, 0).code()
281  extr.L2ResultKeyIn = "HLTResult_L2_BS"
282  extr.L2ResultKeyOut = "HLTResult_L2"
283  extr.HLTResultKeyIn = "HLTResult_EF_BS"
284  extr.HLTResultKeyOut = "HLTResult_EF"
285  else:
286  acc.merge(InputRenameCfg("HLT::HLTResult", "HLTResult_HLT", "HLTResult_HLT_BS"))
287  robIDMap["HLTResult_HLT_BS"] = efh.SourceIdentifier(efh.SubDetector.TDAQ_HLT, 0).code()
288  extr.HLTResultKeyIn = "HLTResult_HLT_BS"
289  extr.HLTResultKeyOut = "HLTResult_HLT"
290 
291  # Configure Run-2 DataScouting
292  if flags.Trigger.EDMVersion == 2:
293  stream = flags.Input.TriggerStream
294  if stream.startswith('calibration_DataScouting_'):
295  ds_tag = '_'.join(stream.split('_')[1:3]) # e.g. DataScouting_05
296  ds_id = int(stream.split('_')[2]) # e.g. 05
297  acc.merge(InputRenameCfg("HLT::HLTResult", ds_tag, ds_tag+"_BS"))
298  robIDMap[ds_tag+"_BS"] = efh.SourceIdentifier(efh.SubDetector.TDAQ_HLT, ds_id).code()
299  extr.DSResultKeysIn += [ ds_tag+"_BS" ]
300  extr.DSResultKeysOut += [ ds_tag ]
301 
302  else:
303  log.info("Will not schedule real HLT bytestream extraction, instead EDM gap filling is running")
304  # if data doesn't have HLT info set HLTResult keys as empty strings to avoid warnings
305  # but the extraction algorithm must run
306  extr.HLTResultKeyIn = ""
307  extr.HLTResultKeyOut = ""
308 
309  HLTResults = [ f"HLT::HLTResult/{k}" for k in robIDMap.keys() ]
310  acc.addService( CompFactory.ByteStreamAddressProviderSvc( TypeNames = HLTResults) )
311 
312  from TrigEDMConfig.TriggerEDM import getTPList
313  acc.addPublicTool( CompFactory.TrigSerTPTool(TPMap = getTPList((flags.Trigger.EDMVersion))) )
314 
315  acc.addPublicTool( CompFactory.TrigSerializeConvHelper(doTP = True) )
316 
317  acc.addPublicTool( CompFactory.HLT.HLTResultByteStreamTool(HLTResultRobIdMap = robIDMap))
318 
319  acc.addEventAlgo(extr)
320 
321  return acc
322 

◆ Run1xAODConversionCfg()

def python.TriggerRecoConfig.Run1xAODConversionCfg (   flags)
Convert Run 1 EDM collections to xAOD classes

Definition at line 323 of file TriggerRecoConfig.py.

323 def Run1xAODConversionCfg(flags):
324  """Convert Run 1 EDM collections to xAOD classes"""
325  acc = ComponentAccumulator()
326 
327  log.info("Will configure Run 1 trigger EDM to xAOD conversion")
328  from TrigEDMConfig.TriggerEDM import getEFRun1BSList,getEFRun2EquivalentList,getL2Run1BSList,getL2Run2EquivalentList
329 
330  from TrkConfig.TrkParticleCreatorConfig import TrackParticleCreatorToolCfg
331  partCreatorTool = acc.popToolsAndMerge(TrackParticleCreatorToolCfg(flags,
332  PixelToTPIDTool=None
333  )
334  )
335  acc.addPublicTool(partCreatorTool)
336 
337  from xAODTrackingCnv.xAODTrackingCnvConfig import TrackCollectionCnvToolCfg,RecTrackParticleContainerCnvToolCfg
338  trackCollCnvTool = acc.popToolsAndMerge(TrackCollectionCnvToolCfg(flags,
339  name="TrackCollectionCnvTool",
340  TrackParticleCreator= partCreatorTool
341  )
342  )
343 
344  recPartCnvTool = acc.popToolsAndMerge(RecTrackParticleContainerCnvToolCfg(flags,
345  name="RecParticleCnv",
346  TrackParticleCreator=partCreatorTool
347  )
348  )
349 
350  bstoxaodTool = CompFactory.TrigBStoxAODTool("BStoxAOD",
351  ContainersToConvert = getL2Run1BSList() + getEFRun1BSList(),
352  NewContainers = getL2Run2EquivalentList() + getEFRun2EquivalentList(),
353  TrackCollectionCnvTool = trackCollCnvTool,
354  TrackParticleContainerCnvTool = recPartCnvTool
355  )
356  acc.setPrivateTools(bstoxaodTool)
357 
358  # write the xAOD (Run-2) classes to the output
359  acc.merge(addToESD(flags, edmDictToList(getTriggerEDMList(flags, key=flags.Trigger.ESDEDMSet, runVersion=2))))
360  acc.merge(addToAOD(flags, edmDictToList(getTriggerEDMList(flags, key=flags.Trigger.AODEDMSet, runVersion=2))))
361 
362  return acc
363 

◆ Run2Run1NavigationSlimmingCfg()

def python.TriggerRecoConfig.Run2Run1NavigationSlimmingCfg (   flags)
Configures legacy Run1/2 navigation slimming

Definition at line 202 of file TriggerRecoConfig.py.

203  """Configures legacy Run1/2 navigation slimming"""
204  acc = ComponentAccumulator()
205 
206  if flags.Trigger.decodeHLT is False:
207  log.debug("Run2Run1NavigationSlimmingCfg: Nothing to do as Trigger.decodeHLT is False")
208  return acc
209 
210  if flags.Trigger.doNavigationSlimming is False:
211  log.debug("Run2Run1NavigationSlimmingCfg: Nothing to do as Trigger.doNavigationSlimming is False")
212  return acc
213 
214  if flags.Trigger.EDMVersion >= 3:
215  log.debug("Run2Run1NavigationSlimmingCfg: Nothing to do for EDMVersion >= 3.")
216  return acc
217 
218  if flags.Trigger.ExtraEDMList:
219  log.warning("Run2Run1NavigationSlimmingCfg: ExtraEDMList only works for Run 3 and beyond")
220 
221  def _flatten(edm):
222  return list(y.split('-')[0] for x in edm.values() for y in x)
223  from TrigNavTools.TrigNavToolsConfig import TrigNavigationThinningSvcCfg
224 
225  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
226 
227  if flags.Output.doWriteAOD:
228  _TriggerAODList = getTriggerEDMList(flags, key=flags.Trigger.AODEDMSet)
229  thinningSvc = acc.getPrimaryAndMerge(TrigNavigationThinningSvcCfg(flags,
230  {'name' : 'HLTNav_StreamAOD',
231  'mode' : 'cleanup_noreload',
232  'result' : 'HLTResult_HLT',
233  'features' : _flatten(_TriggerAODList)}))
234  acc.merge(OutputStreamCfg(flags, "AOD", trigNavThinningSvc = thinningSvc))
235 
236  if flags.Output.doWriteESD:
237  _TriggerESDList = getTriggerEDMList(flags, key=flags.Trigger.ESDEDMSet)
238  thinningSvc = acc.getPrimaryAndMerge(TrigNavigationThinningSvcCfg(flags,
239  {'name' : 'HLTNav_StreamESD',
240  'mode' : 'cleanup_noreload',
241  'result' : 'HLTResult_HLT',
242  'features' : _flatten(_TriggerESDList)}))
243  acc.merge(OutputStreamCfg(flags, "ESD", trigNavThinningSvc = thinningSvc))
244 
245  return acc
246 
247 

◆ Run3TriggerBSUnpackingCfg()

def python.TriggerRecoConfig.Run3TriggerBSUnpackingCfg (   flags)
Configures conversions BS -> HLTResultMT -> Collections 

Definition at line 364 of file TriggerRecoConfig.py.

364 def Run3TriggerBSUnpackingCfg(flags):
365  """Configures conversions BS -> HLTResultMT -> Collections """
366  acc = ComponentAccumulator()
367 
368  if flags.Trigger.decodeHLT is False:
369  log.debug("Run3TriggerBSUnpackingCfg: Nothing to do as Trigger.decodeHLT is False")
370  return acc
371 
372  from AthenaCommon.CFElements import seqAND
373  from TrigEDMConfig.DataScoutingInfo import (
374  getDataScoutingStreams, getDataScoutingTypeFromStream,
375  getFullHLTResultID, getDataScoutingResultID,
376  )
377  from TriggerJobOpts.TriggerConfig import triggerEDMGapFillerCfg
378  from TrigDecisionTool.TrigDecisionToolConfig import getRun3NavigationContainerFromInput
379  ids_to_decode = []
380 
381  # Map the trigger stream to the event building type
382  if flags.Input.TriggerStream in getDataScoutingStreams():
383  dstype = getDataScoutingTypeFromStream(flags.Input.TriggerStream)
384  # If writing a Data Scouting EDM format, only decode that ID
385  log.info(f'Configuring BS decoding/deserialisation of HLT result for \'{dstype}\' only')
386  ids_to_decode = [getDataScoutingResultID(dstype)]
387  id_to_deserialise = {dstype: getDataScoutingResultID(dstype)}
388  else:
389  # Set up to read the full HLT result ID
390  ids_to_decode = [getFullHLTResultID()]
391  id_to_deserialise = {'': getFullHLTResultID()}
392 
393  # In addition, decode any available IDs. We need to check which streams were active in the file.
394  log.debug('Configuring BS decoding of all HLT results and deserialisation of full HLT')
395  partialHLT_streams = [
396  stream for stream in getDataScoutingStreams() if stream.split('_')[1] in flags.Input.ProcessingTags
397  ]
398  partialHLT_dstypes = [
399  getDataScoutingTypeFromStream(stream) for stream in partialHLT_streams
400  ]
401  partialHLT_dsids = [
402  getDataScoutingResultID(dstype) for dstype in partialHLT_dstypes
403  ]
404  log.debug(f'Configuring BS decoding and deserialisation of all HLT results: full HLT + {partialHLT_dstypes}')
405 
406  ids_to_decode += partialHLT_dsids
407  # A bit ugly but avoid importing the actual dict to ensure we never modify it
408  id_to_deserialise.update({
409  dstype:dsid for dstype,dsid in zip(partialHLT_dstypes, partialHLT_dsids)
410  })
411 
412  decoder = CompFactory.HLTResultMTByteStreamDecoderAlg(ModuleIdsToDecode=ids_to_decode)
413  acc.addSequence(seqAND("HLTDecodingSeq"))
414  acc.addEventAlgo( decoder, "HLTDecodingSeq")
415  for dstype, id in id_to_deserialise.items():
416  deserialiser = CompFactory.TriggerEDMDeserialiserAlg(
417  f"TrigDeserialiser{dstype}",
418  ModuleID=id,
419  )
420  # Full HLT result also has slimmed navigation summary
421  if dstype == '':
422  deserialiser.ExtraOutputs.add(('xAOD::TrigCompositeContainer' , 'StoreGateSvc+DummyForGapFiller'))
423  else:
424  deserialiser.SkipDuplicateRecords = True
425  deserialiser.PermitMissingModule = True
426  acc.addEventAlgo( deserialiser, "HLTDecodingSeq")
427 
428  if dstype=='':
429  # Create empty EDM collections for types not created online
430  # Add output dependency on Navigation to enforce ordering
431  gapFiller = triggerEDMGapFillerCfg(
432  flags, edmSet=['BS'],
433  extraInputs=[('xAOD::TrigCompositeContainer' , 'StoreGateSvc+DummyForGapFiller')],
434  extraOutputs=[(
435  'xAOD::TrigCompositeContainer',
436  'StoreGateSvc+'+getRun3NavigationContainerFromInput(flags)
437  )])
438  else:
439  # Create empty EDM collections for types not created online
440  gapFiller = triggerEDMGapFillerCfg(flags, edmSet=[dstype])
441  acc.merge( gapFiller, "HLTDecodingSeq" )
442 
443  log.debug("Configured HLT result BS decoding sequence")
444  return acc
445 
446 

◆ TriggerEDMCfg()

def python.TriggerRecoConfig.TriggerEDMCfg (   flags)
Configures which trigger collections are recorded

Definition at line 143 of file TriggerRecoConfig.py.

143 def TriggerEDMCfg(flags):
144  """Configures which trigger collections are recorded"""
145  acc = ComponentAccumulator()
146 
147  # Check if we have anything to do
148  if flags.Output.doWriteESD is False and flags.Output.doWriteAOD is False:
149  log.debug("TriggerEDMCfg: Nothing to do as both Output.doWriteAOD and Output.doWriteESD are False")
150  return acc
151 
152  # standard collections & metadata
153  # TODO consider unifying with TriggerConfig.triggerPOOLOutputCfg - there the assumption is that Run3
154  # metadata
155  menuMetadata = ["xAOD::TriggerMenuJsonContainer#*", "xAOD::TriggerMenuJsonAuxContainer#*",]
156  if flags.Trigger.EDMVersion in [1,2]:
157  menuMetadata += ['xAOD::TriggerMenuAuxContainer#*', 'xAOD::TriggerMenuContainer#*',]
158  # Add LVL1 collections (for Run-3 they are part of the "regular" EDM lists)
159  from TrigEDMConfig.TriggerEDM import getLvl1ESDList, getLvl1AODList
160  acc.merge(addToESD(flags, edmDictToList(getLvl1ESDList())))
161  acc.merge(addToAOD(flags, edmDictToList(getLvl1AODList())))
162 
163  edmVersion = max(2, flags.Trigger.EDMVersion)
164  _TriggerESDList = getTriggerEDMList(flags, key=flags.Trigger.ESDEDMSet, runVersion=edmVersion)
165  _TriggerAODList = getTriggerEDMList(flags, key=flags.Trigger.AODEDMSet, runVersion=edmVersion)
166  log.debug("ESD EDM list: %s", _TriggerESDList)
167  log.debug("AOD EDM list: %s", _TriggerAODList)
168 
169  # Highlight what is in AOD list but not in ESD list, as this can cause
170  # the "different number of entries in branch" problem, when it is in the
171  # AOD list but the empty container per event is not created
172  # Just compares keys of dicts, which are the class names, not their string keys in StoreGate
173  not_in = [ element for element in _TriggerAODList if element not in _TriggerESDList ]
174  if (len(not_in)>0):
175  log.warning("In AOD list but not in ESD list: ")
176  log.warning(not_in)
177  else:
178  log.info("AOD list is subset of ESD list - good.")
179 
180  # there is internal gating in addTo* if AOD or ESD do not need to be written out
181  acc.merge(addToESD(flags, edmDictToList(_TriggerESDList), MetadataItemList = menuMetadata))
182  acc.merge(addToAOD(flags, edmDictToList(_TriggerAODList), MetadataItemList = menuMetadata))
183 
184  log.info("AOD content set according to the AODEDMSet flag: %s and EDM version %d", flags.Trigger.AODEDMSet, flags.Trigger.EDMVersion)
185  # navigation for Run 3
186  if flags.Trigger.EDMVersion == 3 and not flags.Trigger.doOnlineNavigationCompactification and not flags.Trigger.doNavigationSlimming:
187  nav = ['xAOD::TrigCompositeContainer#HLTNav*', 'xAOD::TrigCompositeAuxContainer#HLTNav*',]
188  acc.merge(addToAOD(flags, nav))
189  acc.merge(addToESD(flags, nav))
190  # extra jet keys
191  jetSpecials = ["JetKeyDescriptor#JetKeyMap", "JetMomentMap#TrigJetRecMomentMap",]
192  acc.merge(addToESD(flags, jetSpecials))
193  acc.merge(addToAOD(flags, jetSpecials))
194 
195  # RoIs
196  if flags.Output.doWriteAOD and flags.Trigger.EDMVersion == 2:
197  from TrigRoiConversion.TrigRoiConversionConfig import RoiWriterCfg
198  acc.merge(RoiWriterCfg(flags))
199 
200  return acc
201 

◆ TriggerMetadataWriterCfg()

def python.TriggerRecoConfig.TriggerMetadataWriterCfg (   flags)
Sets up access to HLT, L1, BGRP, Monitoring, HLT PS and L1 PS JSON files from 'FILE' or 'DB', writes JSON to metaStore and keys to eventStore

Definition at line 132 of file TriggerRecoConfig.py.

132 def TriggerMetadataWriterCfg(flags):
133  """Sets up access to HLT, L1, BGRP, Monitoring, HLT PS and L1 PS JSON files from 'FILE' or 'DB', writes JSON to metaStore and keys to eventStore"""
134  acc = ComponentAccumulator()
135  keyWriterOutput = ""
136  if flags.Trigger.triggerConfig != 'INFILE':
137  acc.merge( TrigConfigSvcCfg(flags) )
138  keyWriterTool = CompFactory.TrigConf.KeyWriterTool("KeyWriterToolOffline")
139  keyWriterOutput = str(keyWriterTool.ConfKeys)
140  acc.addEventAlgo( CompFactory.TrigConf.xAODMenuWriterMT("xAODMenuWriterMT", KeyWriterTool = keyWriterTool) )
141  return acc, keyWriterOutput
142 

◆ TriggerRecoCfg()

def python.TriggerRecoConfig.TriggerRecoCfg (   flags)

Definition at line 17 of file TriggerRecoConfig.py.

17 def TriggerRecoCfg(flags):
18  if flags.Input.isMC:
19  return TriggerRecoCfgMC(flags)
20  else:
21  return TriggerRecoCfgData(flags)
22 

◆ TriggerRecoCfgData()

def python.TriggerRecoConfig.TriggerRecoCfgData (   flags)
Configures trigger data decoding
Run 3 data:
HLTResultMTByteStreamDecoderAlg -> TriggerEDMDeserialiserAlg

Run 2 data:
TrigBSExtraction -> TrigDecisionMaker -> DecisionConv to xAOD -> NavigationConv to xAOD

Run 1 data:
as for Run 2 + Run 1 EDM to xAOD conversion

Definition at line 23 of file TriggerRecoConfig.py.

23 def TriggerRecoCfgData(flags):
24  """
25  Configures trigger data decoding
26  Run 3 data:
27  HLTResultMTByteStreamDecoderAlg -> TriggerEDMDeserialiserAlg
28 
29  Run 2 data:
30  TrigBSExtraction -> TrigDecisionMaker -> DecisionConv to xAOD -> NavigationConv to xAOD
31 
32  Run 1 data:
33  as for Run 2 + Run 1 EDM to xAOD conversion
34  """
35  log.debug("TriggerRecoCfgData: Preparing the trigger handling of reconstruction of data")
36  acc = ComponentAccumulator()
37  acc.merge( ByteStreamReadCfg(flags) )
38  if flags.Trigger.L1.doMuon or flags.Trigger.L1.doCalo or flags.Trigger.L1.doTopo or flags.Trigger.L1.doCTP:
39  acc.merge( L1TriggerByteStreamDecoderCfg(flags) )
40 
41  metadataAcc, _ = TriggerMetadataWriterCfg(flags)
42  acc.merge( metadataAcc )
43 
44  # Run 3+
45  if flags.Trigger.EDMVersion >= 3:
46  acc.merge(Run3TriggerBSUnpackingCfg(flags))
47 
48  from TrigDecisionMaker.TrigDecisionMakerConfig import Run3DecisionMakerCfg
49  acc.merge(Run3DecisionMakerCfg(flags))
50 
51  if flags.Trigger.doNavigationSlimming:
52  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import TrigNavSlimmingMTCfg
53  acc.merge(TrigNavSlimmingMTCfg(flags))
54 
55  # Run 1+2
56  elif flags.Trigger.EDMVersion in [1, 2]:
57  acc.merge( Run1Run2BSExtractionCfg(flags) )
58 
59  from TrigDecisionMaker.TrigDecisionMakerConfig import Run1Run2DecisionMakerCfg
60  acc.merge (Run1Run2DecisionMakerCfg(flags) )
61 
62  acc.merge(Run2Run1NavigationSlimmingCfg(flags))
63  else:
64  raise RuntimeError("Invalid EDMVersion=%s " % flags.Trigger.EDMVersion)
65 
66  # Legacy L1Calo, L1Topo reco
67  if flags.Trigger.enableL1CaloLegacy:
68  from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import RoIBResultToxAODCfg
69  xRoIBResultAcc, _ = RoIBResultToxAODCfg(flags)
70  acc.merge( xRoIBResultAcc )
71 
72  if flags.Input.Format is Format.BS and flags.Input.DataYear < 2024:
73  from L1TopoByteStream.L1TopoByteStreamConfig import L1TopoRawDataContainerBSCnvCfg
74  acc.merge( L1TopoRawDataContainerBSCnvCfg(flags) )
75  topoEDM = ['xAOD::L1TopoRawDataContainer#L1TopoRawData',
76  'xAOD::L1TopoRawDataAuxContainer#L1TopoRawDataAux.']
77  acc.merge(addToESD(flags, topoEDM))
78  acc.merge(addToAOD(flags, topoEDM))
79 
80  acc.merge(TriggerEDMCfg(flags))
81 
82  return acc
83 

◆ TriggerRecoCfgMC()

def python.TriggerRecoConfig.TriggerRecoCfgMC (   flags)
Configures trigger MC handing during reconstruction
Note that a lot of the T0 handling of the trigger output for data is bundled into
the RDO to RDO_TRIG sub-step for MC, hence there is much less to do here for MC.
Notably: the xAOD::TrigDecision and all metadata should already be in the RDO_TRIG.

Run 3 MC:
Propagation of Run 3 HLT collections from input RDO_TRIG to output POOL files.
Execution of Run-3 reconstruction-level trigger navigation slimming.

Run 2 MC:
Propagation of Run 2 HLT collections from input RDO_TRIG to output POOL files.
Execution of Run 2 style reconstruction-level trigger navigation slimming.
Optional conversion of Run 2 navigation to Run 3 navigation.
Optional execution of Run 3 reconstruction-level trigger navigation slimming on conversion output.
 
Run 1 MC:
No current workflows are able to run the Run 1 trigger MC simulation. Unsupported.
Work would be needed here to do the xAOD conversion (see Run1xAODConversionCfg for how this is done for data)

Definition at line 84 of file TriggerRecoConfig.py.

84 def TriggerRecoCfgMC(flags):
85  """
86  Configures trigger MC handing during reconstruction
87  Note that a lot of the T0 handling of the trigger output for data is bundled into
88  the RDO to RDO_TRIG sub-step for MC, hence there is much less to do here for MC.
89  Notably: the xAOD::TrigDecision and all metadata should already be in the RDO_TRIG.
90 
91  Run 3 MC:
92  Propagation of Run 3 HLT collections from input RDO_TRIG to output POOL files.
93  Execution of Run-3 reconstruction-level trigger navigation slimming.
94 
95  Run 2 MC:
96  Propagation of Run 2 HLT collections from input RDO_TRIG to output POOL files.
97  Execution of Run 2 style reconstruction-level trigger navigation slimming.
98  Optional conversion of Run 2 navigation to Run 3 navigation.
99  Optional execution of Run 3 reconstruction-level trigger navigation slimming on conversion output.
100 
101  Run 1 MC:
102  No current workflows are able to run the Run 1 trigger MC simulation. Unsupported.
103  Work would be needed here to do the xAOD conversion (see Run1xAODConversionCfg for how this is done for data)
104  """
105 
106  # Check for currently unsupported operational modes, these may be supported in the future if needed
107  if flags.Input.Format is Format.BS:
108  log.warning("TriggerRecoCfgMC does not currently support MC files encoded as bytestream. Switching off handling of trigger inputs.")
109  return ComponentAccumulator()
110  if flags.Trigger.EDMVersion == 1:
111  log.warning("TriggerRecoCfgMC does not currently support MC files with Run 1 trigger payload. Switching off handling of trigger inputs.")
112  return ComponentAccumulator()
113 
114  log.debug("TriggerRecoCfgMC: Preparing the trigger handling of reconstruction of MC")
115  acc = ComponentAccumulator()
116 
117  # This will kick into action for Run 2 (Run-1 gets blocked above)
118  acc.merge(Run2Run1NavigationSlimmingCfg(flags))
119 
120  # This may kick into action for Run 2, based on flags.Trigger.doEDMVersionConversion
121  from TrigNavTools.NavConverterConfig import NavConverterCfg
122  acc.merge(NavConverterCfg(flags))
123 
124  # This will kick into action for Run 3, and may for Run 2 if based on the navigation conversion above
125  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import TrigNavSlimmingMTCfg
126  acc.merge(TrigNavSlimmingMTCfg(flags))
127 
128  acc.merge(TriggerEDMCfg(flags))
129 
130  return acc
131 

Variable Documentation

◆ acc

python.TriggerRecoConfig.acc

Definition at line 471 of file TriggerRecoConfig.py.

◆ args

python.TriggerRecoConfig.args

Definition at line 452 of file TriggerRecoConfig.py.

◆ AtlasVersion

python.TriggerRecoConfig.AtlasVersion

Definition at line 467 of file TriggerRecoConfig.py.

◆ Files

python.TriggerRecoConfig.Files

Definition at line 456 of file TriggerRecoConfig.py.

◆ flags

python.TriggerRecoConfig.flags

Definition at line 451 of file TriggerRecoConfig.py.

◆ log

python.TriggerRecoConfig.log

Definition at line 14 of file TriggerRecoConfig.py.

◆ MaxEvents

python.TriggerRecoConfig.MaxEvents

Definition at line 457 of file TriggerRecoConfig.py.

◆ withDetails

python.TriggerRecoConfig.withDetails

Definition at line 474 of file TriggerRecoConfig.py.

python.TrigConfigSvcCfg.TrigConfigSvcCfg
def TrigConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:263
max
#define max(a, b)
Definition: cfImp.cxx:41
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TrigDecisionMakerConfig.Run3DecisionMakerCfg
def Run3DecisionMakerCfg(flags)
Definition: TrigDecisionMakerConfig.py:71
python.TriggerEDM.getL2Run1BSList
def getL2Run1BSList()
Definition: TriggerEDM.py:681
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.TriggerRecoConfig.TriggerRecoCfgMC
def TriggerRecoCfgMC(flags)
Definition: TriggerRecoConfig.py:84
python.TrkParticleCreatorConfig.TrackParticleCreatorToolCfg
def TrackParticleCreatorToolCfg(flags, name="InDetxAODParticleCreatorTool", **kwargs)
InDet/ITk #####.
Definition: TrkParticleCreatorConfig.py:14
python.TriggerConfig.triggerEDMGapFillerCfg
def triggerEDMGapFillerCfg(flags, edmSet, decObj=[], decObjHypoOut=[], extraInputs=[], extraOutputs=[])
Definition: TriggerConfig.py:553
TrigRoiConversionConfig.RoiWriterCfg
def RoiWriterCfg(flags)
Definition: TrigRoiConversionConfig.py:7
python.TriggerRecoConfig.Run3TriggerBSUnpackingCfg
def Run3TriggerBSUnpackingCfg(flags)
Definition: TriggerRecoConfig.py:364
python.Utils.edmDictToList
def edmDictToList(edmDict)
Definition: Trigger/TriggerCommon/TrigEDMConfig/python/Utils.py:68
python.TriggerRecoConfig.TriggerRecoCfgData
def TriggerRecoCfgData(flags)
Definition: TriggerRecoConfig.py:23
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
AnalysisTriggerAlgsConfig.RoIBResultToxAODCfg
def RoIBResultToxAODCfg(flags)
Definition: AnalysisTriggerAlgsConfig.py:9
python.DataScoutingInfo.getFullHLTResultID
def getFullHLTResultID()
Definition: DataScoutingInfo.py:73
python.DataScoutingInfo.getDataScoutingResultID
def getDataScoutingResultID(name)
Definition: DataScoutingInfo.py:51
python.TriggerEDM.getTriggerEDMList
def getTriggerEDMList(flags, key, runVersion=-1)
Definition: TriggerEDM.py:149
python.TriggerEDM.getEDMLibraries
def getEDMLibraries()
Definition: TriggerEDM.py:639
python.TrigNavToolsConfig.TrigNavigationThinningSvcCfg
def TrigNavigationThinningSvcCfg(flags, thinningConfig)
Definition: TrigNavToolsConfig.py:33
python.general._flatten
def _flatten(l, fn, val=[])
Definition: general.py:134
xAODTrackingCnvConfig.TrackCollectionCnvToolCfg
def TrackCollectionCnvToolCfg(flags, name="TrackCollectionCnvTool", **kwargs)
TrackCollectionCnvTool.
Definition: xAODTrackingCnvConfig.py:46
python.TriggerEDM.getEFRun1BSList
def getEFRun1BSList()
Definition: TriggerEDM.py:659
python.TriggerEDM.getTPList
def getTPList(version=2)
Definition: TriggerEDM.py:617
histSizes.code
code
Definition: histSizes.py:129
python.TrigDecisionToolConfig.getRun3NavigationContainerFromInput
def getRun3NavigationContainerFromInput(flags)
Definition: TrigDecisionToolConfig.py:63
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
python.DataScoutingInfo.getDataScoutingTypeFromStream
def getDataScoutingTypeFromStream(streamname)
Definition: DataScoutingInfo.py:62
L1TopoByteStreamConfig.L1TopoRawDataContainerBSCnvCfg
def L1TopoRawDataContainerBSCnvCfg(flags)
Definition: L1TopoByteStreamConfig.py:34
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.DataScoutingInfo.getDataScoutingStreams
def getDataScoutingStreams()
Definition: DataScoutingInfo.py:58
python.TriggerRecoConfig.TriggerMetadataWriterCfg
def TriggerMetadataWriterCfg(flags)
Definition: TriggerRecoConfig.py:132
python.TriggerRecoConfig.Run2Run1NavigationSlimmingCfg
def Run2Run1NavigationSlimmingCfg(flags)
Definition: TriggerRecoConfig.py:202
python.OutputStreamConfig.addToESD
def addToESD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:127
python.TriggerRecoConfig.TriggerEDMCfg
def TriggerEDMCfg(flags)
Definition: TriggerRecoConfig.py:143
python.TriggerEDM.getL2Run2EquivalentList
def getL2Run2EquivalentList()
Definition: TriggerEDM.py:692
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
xAODTrackingCnvConfig.RecTrackParticleContainerCnvToolCfg
def RecTrackParticleContainerCnvToolCfg(flags, name="RecTrackParticleContainerCnvTool", **kwargs)
RecTrackParticleContainerCnvTool.
Definition: xAODTrackingCnvConfig.py:12
python.TriggerEDM.getEFRun2EquivalentList
def getEFRun2EquivalentList()
Definition: TriggerEDM.py:670
python.TriggerEDM.getPreregistrationList
def getPreregistrationList(version=2, doxAODConversion=True)
Definition: TriggerEDM.py:561
python.TriggerEDM.getLvl1ESDList
def getLvl1ESDList()
Definition: TriggerEDM.py:507
TrigNavSlimmingMTConfig.TrigNavSlimmingMTCfg
def TrigNavSlimmingMTCfg(flags)
Definition: TrigNavSlimmingMTConfig.py:134
python.TrigDecisionMakerConfig.Run1Run2DecisionMakerCfg
def Run1Run2DecisionMakerCfg(flags)
Definition: TrigDecisionMakerConfig.py:8
python.TriggerRecoConfig.TriggerRecoCfg
def TriggerRecoCfg(flags)
Definition: TriggerRecoConfig.py:17
python.OutputStreamConfig.addToAOD
def addToAOD(flags, itemOrList, **kwargs)
Definition: OutputStreamConfig.py:142
python.TriggerEDM.getLvl1AODList
def getLvl1AODList()
Definition: TriggerEDM.py:513
python.TriggerRecoConfig.Run1Run2BSExtractionCfg
def Run1Run2BSExtractionCfg(flags)
Definition: TriggerRecoConfig.py:248
str
Definition: BTagTrackIpAccessor.cxx:11
TrigT1ResultByteStreamConfig.L1TriggerByteStreamDecoderCfg
def L1TriggerByteStreamDecoderCfg(flags, returnEDM=False)
Definition: TrigT1ResultByteStreamConfig.py:132
python.TriggerRecoConfig.Run1xAODConversionCfg
def Run1xAODConversionCfg(flags)
Definition: TriggerRecoConfig.py:323
python.NavConverterConfig.NavConverterCfg
def NavConverterCfg(flags, chainsList=[], runTheChecker=False)
Definition: NavConverterConfig.py:12
AddressRemappingConfig.InputRenameCfg
def InputRenameCfg(type, from_name, to_name)
Definition: AddressRemappingConfig.py:28