Skip to content
Snippets Groups Projects

Draft: NavConverterCfg: configurable chains + compression

Closed Jon Burr requested to merge jburr/athena:NavConverter into 23.0
2 unresolved threads
1 file
+ 10
5
Compare changes
  • Side-by-side
  • Inline
@@ -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']
Please register or sign in to reply
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
Loading