11 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from AthenaConfiguration.ComponentFactory
import CompFactory
13 from PathResolver
import PathResolver
16 """Read a text file containing a list of triggers
18 Returns the list of triggers held in the file
24 if line ==
"" or line.startswith(
"#"):
31 """Adds the trigger matching info to the slimming helper"""
33 slimmingHelper = kwargs[
'SlimmingHelper']
34 triggerList = kwargs[
'TriggerList']
35 containerPrefix = kwargs[
'OutputContainerPrefix']
39 for chain
in triggerList
42 slimmingHelper.AllVariables += outputContainers
43 for cont
in outputContainers:
44 slimmingHelper.AppendToDictionary.update(
46 cont:
"xAOD::TrigCompositeContainer",
47 cont +
"Aux":
"AOD::AuxContainerBase!",
53 """Configure the common trigger matching for run 2 DAODs using the run 2 analysis formalism (matching happens during derivation)"""
58 from DerivationFrameworkTrigger.TriggerMatchingToolConfig
import TriggerMatchingToolCfg
59 PhysCommonTriggerMatchingTool = acc.getPrimaryAndMerge(
TriggerMatchingToolCfg(ConfigFlags, name=name, **kwargs))
60 CommonAugmentation = CompFactory.DerivationFramework.CommonAugmentation
61 outputContainerPrefix = kwargs[
'OutputContainerPrefix']
62 acc.addEventAlgo(CommonAugmentation(f
"{outputContainerPrefix}TriggerMatchingKernel",
63 AugmentationTools=[PhysCommonTriggerMatchingTool]))
68 """Covert run 2 trigger navigation data these data into the run 3 formalism (matching happens from DAOD)"""
72 if not ConfigFlags.Trigger.doEDMVersionConversion:
75 from AthenaCommon.Logging
import logging
76 msg = logging.getLogger(
'TriggerMatchingCommonRun2ToRun3Cfg')
77 msg.info(
'doEDMVersionConversion is True, now scheduling conversion of Run 2 trigger navigation to Run 3')
79 from TrigNavTools.NavConverterConfig
import NavConverterCfg
82 triggerList = kwargs[
'TriggerList']
84 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import TrigNavSlimmingMTDerivationCfg
91 """Configure the common trigger matching for run 3 DAODs using the run 3 formalism (matching happens from DAOD)"""
93 if ConfigFlags.Trigger.EDMVersion != 3:
94 raise ValueError(
'This configuration can only be used for Run 3 trigger navigation')
96 triggerList = kwargs[
'TriggerList']
101 from TrigNavSlimmingMT.TrigNavSlimmingMTConfig
import TrigNavSlimmingMTDerivationCfg