ATLAS Offline Software
Loading...
Searching...
No Matches
TrigDecisionToolHelpers.py
Go to the documentation of this file.
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3#
4
5# AccumulatorCache is not available in AnalysisBase so function without cache
6# created first for analysis configs
7
8from AthenaCommon.Logging import logging
9
10# List of all possible keys of the Run 3 navigation summary collection
11# in order of verbosity. Want to take the most verbose which is available.
12possible_keys = [
13 'HLTNav_Summary', # Produced initially online (only the final nodes, all other nodes spread out over many many collections created by trigger framework algs)
14 'HLTNav_Summary_OnlineSlimmed', # Produced online, all nodes in one container. Accessible during RAWtoALL, good for T0 monitoring.
15 'HLTNav_Summary_ESDSlimmed', # Produced offline in jobs writing ESD. Minimal slimming, good for T0-style monitoring. Equivalent to AOD at AODFULL level.
16 'HLTNav_Summary_AODSlimmed', # Produced offline in jobs writing AOD. Minimal slimming in AODFULL mode, good for T0-style monitoring. Slimming applied in AODSLIM mode, good for analysis use, final-features accessible.
17 'HLTNav_Summary_DAODSlimmed', # Chain level slimming and IParticle feature-compacting for DAOD. Good for analysis use, final-features four vectors accessible.
18 'HLTNav_R2ToR3Summary' # Output of Run 2 to Run 3 navigation conversion procedure. Somewhat equivalent to AODFULL level. Designed to be further reduced to DAODSlimmed level before analysis use.
19 ]
20
22 # What to return if we cannot look in the file
23 from AthenaConfiguration.Enums import LHCPeriod
24 if getattr(flags.Trigger, "doOnlineNavigationCompactification", True) is False:
25 default_key = 'HLTNav_Summary' # This can only be for Run 3(+), and is a very niche case of exporting un-compacted navigation collections for advanced debugging
26 elif getattr(flags.Trigger, "doEDMVersionConversion", False) is True and getattr(flags.GeoModel, "Run", LHCPeriod.Run3) <= LHCPeriod.Run2:
27 default_key = 'HLTNav_R2ToR3Summary' # This can only be for Run 2 navigation conversion.
28 else:
29 default_key = 'HLTNav_Summary_OnlineSlimmed' # This is the default expected key for the navigation container within the serialised HLT payload inside Run 3(+) RAW files.
30 to_return = default_key
31
32 for key in possible_keys:
33 if key in flags.Input.Collections:
34 to_return = key
35 break
36
37 msg = logging.getLogger('getRun3NavigationContainerFromInput')
38 msg.info('Returning %s as the Run 3 trigger navigation collection to read in this job.', to_return)
39
40 # Double check 'possible_keys' is kept up to date
41 if to_return not in possible_keys:
42 msg.error('Must add %s to the "possible_keys" array!', to_return)
43
44 return to_return