diff --git a/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py b/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py index 04388b89f49cff839ba4f8c5745cb6df7224e60e..78c58e381a6cbb7ceb86aebd59a8cf1a63eb9726 100644 --- a/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py +++ b/Trigger/TrigEvent/TrigNavTools/python/NavConverterConfig.py @@ -5,11 +5,16 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from AthenaCommon.Logging import logging + +from typing import Optional + log = logging.getLogger("NavConverterConfig") -def NavConverterCfg(flags): +def NavConverterCfg(flags, *, chains: Optional[list[str]]=None, doCompression: bool=True): """Configures Run 1/2 to Run 3 navigation conversion algorithm for all triggers""" + if chains is None: + chains = ['HLT_e26_lhtight_nod0_e15_etcut_L1EM7_Zee', 'HLT_mu4'] acc = ComponentAccumulator() from TrigDecisionTool.TrigDecisionToolConfig import TrigDecisionToolCfg tdt = acc.getPrimaryAndMerge(TrigDecisionToolCfg(flags)) @@ -33,8 +38,8 @@ def NavConverterCfg(flags): log.info("Assuming these collections are relevant for trigger: %s", " ".join(types)) cnvAlg.Collections = types # example of chain collection: comment if all chains are to be processed - cnvAlg.Chains = ["HLT_mu4"] - cnvAlg.doCompression = True + cnvAlg.Chains = chains + cnvAlg.doCompression = doCompression acc.addEventAlgo(cnvAlg) checker = CompFactory.Trig.NavigationTesterAlg() @@ -42,12 +47,12 @@ def NavConverterCfg(flags): # in conversion job Run2 TDT is setup as default, we need to setup an alternative to access Run 3 format run3tdt = CompFactory.Trig.TrigDecisionTool("Run3TrigDecisionTool", - HLTSummary = "HLTNav_R2ToR3Summary", + HLTSummary = outputName, NavigationFormat = 'TrigComposite', AcceptMultipleInstance=True) acc.addPublicTool(run3tdt) checker.RetrievalToolRun3Nav = CompFactory.Trig.R3IParticleRetrievalTool(TrigDecisionTool = run3tdt) - checker.Chains=['HLT_e26_lhtight_nod0_e15_etcut_L1EM7_Zee', 'HLT_mu4'] #TODO automate this + checker.Chains=chains #TODO automate this acc.addEventAlgo(checker) return acc