ATLAS Offline Software
Loading...
Searching...
No Matches
TrigDecisionToolHelpers.py
Go to the documentation of this file.
2# Copyright (C) 2002-2024 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
11# List of all possible keys of the Run 3 navigation summary collection
12# in order of verbosity. Want to take the most verbose which is available.
13possible_keys = [
14 'HLTNav_Summary', # Produced initially online (only the final nodes, all other nodes spread out over many many collections created by trigger framework algs)
15 'HLTNav_Summary_OnlineSlimmed', # Produced online, all nodes in one container. Accessible during RAWtoALL, good for T0 monitoring.
16 'HLTNav_Summary_ESDSlimmed', # Produced offline in jobs writing ESD. Minimal slimming, good for T0-style monitoring. Equivalent to AOD at AODFULL level.
17 '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.
18 'HLTNav_Summary_DAODSlimmed', # Chain level slimming and IParticle feature-compacting for DAOD. Good for analysis use, final-features four vectors accessible.
19 '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.
20 ]
21
23 # What to return if we cannot look in the file
24 default_key = 'HLTNav_Summary_OnlineSlimmed' if getattr(flags.Trigger, "doOnlineNavigationCompactification", False) else 'HLTNav_Summary'
25 to_return = default_key
26
27 if getattr(flags.Trigger, "doEDMVersionConversion", False):
28 to_return = 'HLTNav_R2ToR3Summary'
29 else:
30 for key in possible_keys:
31 if key in flags.Input.Collections:
32 to_return = key
33 break
34
35 msg = logging.getLogger('getRun3NavigationContainerFromInput')
36 msg.info('Returning %s as the Run 3 trigger navigation colletion to read in this job.', to_return)
37
38 # Double check 'possible_keys' is kept up to date
39 if to_return not in possible_keys:
40 msg.error('Must add %s to the "possible_keys" array!', to_return)
41
42 return to_return