3from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5from TriggerMenuMT.TriggerAPI.TriggerAPI
import TriggerAPI
6from TriggerMenuMT.TriggerAPI.TriggerEnums
import TriggerPeriod, TriggerType
7from AthenaConfiguration.AutoConfigFlags
import GetFileMD
8from DerivationFrameworkPhys.TriggerListsHelper
import read_trig_list_file
9from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import AddRun2TriggerMatchingToSlimmingHelper
10from DerivationFrameworkPhys.TriggerMatchingCommonConfig
import TriggerMatchingCommonRun2Cfg
15 def __init__(self, flags, existingTriggerHelper):
17 TriggerAPI.setConfigFlags(flags)
25 md = GetFileMD(self.
flags.Input.Files)
26 hlt_menu = md.get(
'TriggerMenu', {}).
get(
'HLTChains',
None)
28 if self.
flags.Trigger.EDMVersion <= 2:
31 allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
32 trig_bmu = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu_bphys, livefraction=0.8)
35 extra_file = read_trig_list_file(
"DerivationFrameworkMuons/run2ExtraMatchingTriggers.txt")
38 trigger_names_full = list(
set(trig_bmu+extra_file))
41 for chain_name
in hlt_menu:
42 if chain_name
in trigger_names_full:
52 acc = ComponentAccumulator()
53 acc.merge(TriggerMatchingCommonRun2Cfg(
56 OutputContainerPrefix =
"TrigMatch_",
62 OutputContainerPrefix = "TrigMatch_"):
63 AddRun2TriggerMatchingToSlimmingHelper(SlimmingHelper = SlimmingHelper,
64 OutputContainerPrefix = OutputContainerPrefix,
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)