diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py index 1c9d859d6da6d03358615d76046d522a13d8ca3e..d92e83fbad7cffeb7fb901f64942373661c535d8 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaFastCaloHypoTool.py @@ -1,8 +1,8 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import GeV -from TriggerMenuMT.HLT.Egamma.TrigEgammaSliceFlags import TrigEgammaSliceFlags +from AthenaConfiguration.AllConfigFlags import ConfigFlags from AthenaCommon.Configurable import Configurable from AthenaConfiguration.ComponentFactory import CompFactory @@ -358,7 +358,7 @@ def createTrigEgammaFastCaloSelectors(ConfigFilePath=None): import collections if not ConfigFilePath: - ConfigFilePath = 'RingerSelectorTools/'+TrigEgammaSliceFlags.ringerVersion() + ConfigFilePath = ConfigFlags.Trigger.egamma.ringerVersion SelectorNames = collections.OrderedDict({ diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py index e09eaa092d32701fe28eee663025668ff958ea2f..7162e389b50421498fcf10ff1c14b09972c51502 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py @@ -1,12 +1,11 @@ # -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # -from __future__ import print_function from AthenaCommon.SystemOfUnits import GeV from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -#from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable, appendCAtoAthena -from TriggerMenuMT.HLT.Egamma.TrigEgammaSliceFlags import TrigEgammaSliceFlags +from AthenaConfiguration.AllConfigFlags import ConfigFlags + from ROOT import egammaPID def same( val , tool): @@ -289,7 +288,7 @@ def TrigEgammaPrecisionElectronDNNSelectorCfg(name='TrigEgammaPrecisionElectronD acc = ComponentAccumulator() # We should include the DNN here if not ConfigFilePath: - ConfigFilePath = 'ElectronPhotonSelectorTools/trigger/'+TrigEgammaSliceFlags.dnnVersion() + ConfigFilePath = ConfigFlags.Trigger.egamma.dnnVersion import collections SelectorNames = collections.OrderedDict({ @@ -320,7 +319,7 @@ def TrigEgammaPrecisionElectronLHSelectorCfg( name='TrigEgammaPrecisionElectronL # Configure the LH selectors acc = ComponentAccumulator() if not ConfigFilePath: - ConfigFilePath = 'ElectronPhotonSelectorTools/trigger/'+TrigEgammaSliceFlags.pidVersion() + ConfigFilePath = ConfigFlags.Trigger.egamma.pidVersion import collections SelectorNames = collections.OrderedDict({ @@ -382,7 +381,7 @@ def TrigEgammaPrecisionElectronCBSelectorCfg(name='TrigEgammaPrecisionElectronCB ) if not ConfigFilePath: - ConfigFilePath = 'ElectronPhotonSelectorTools/trigger/'+TrigEgammaSliceFlags.pidVersion() + ConfigFilePath = ConfigFlags.Trigger.egamma.pidVersion from collections import OrderedDict SelectorNames = OrderedDict({ diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py index 7c2e2e2730898997a7682283e871ec44ddad6165..cac01c9936c48921f22253f02c7b73bbbd1c2a43 100644 --- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py +++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionPhotonHypoTool.py @@ -1,7 +1,7 @@ -# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration from AthenaCommon.SystemOfUnits import GeV -from TriggerMenuMT.HLT.Egamma.TrigEgammaSliceFlags import TrigEgammaSliceFlags +from AthenaConfiguration.AllConfigFlags import ConfigFlags from ROOT import egammaPID # @@ -179,7 +179,7 @@ def createTrigEgammaPrecisionPhotonSelectors(ConfigFilePath=None): from ElectronPhotonSelectorTools.ConfiguredAsgPhotonIsEMSelectors import ConfiguredAsgPhotonIsEMSelector if not ConfigFilePath: - ConfigFilePath = 'ElectronPhotonSelectorTools/trigger/'+TrigEgammaSliceFlags.pidVersion() + ConfigFilePath = ConfigFlags.Trigger.egamma.pidVersion import collections # Configure the IsEM selectors @@ -212,4 +212,4 @@ def createTrigEgammaPrecisionPhotonSelectors(ConfigFilePath=None): SelectorTool.isEMMask = PhotonIsEMBits[sel] selectors.append(SelectorTool) - return selectors \ No newline at end of file + return selectors diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py index 474ee4eabd6dfe758552a3a0796646cbf218cb58..936990b2fa4e824f670a1d24b04e38d5b4293c6a 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfigFlags.py @@ -218,7 +218,9 @@ def createTriggerFlags(): flags.addFlag('Trigger.calo.doOffsetCorrection', True ) # Particle ID tune - flags.addFlag('Trigger.egamma.pidVersion', 'ElectronPhotonSelectorTools/trigger/rel21_20170214/') + flags.addFlag('Trigger.egamma.pidVersion', 'ElectronPhotonSelectorTools/trigger/rel22_20210611/') + flags.addFlag('Trigger.egamma.dnnVersion', 'ElectronPhotonSelectorTools/trigger/rel21_20210928/') + flags.addFlag('Trigger.egamma.ringerVersion', 'RingerSelectorTools/TrigL2_20210702_r4/') # cluster correction version, allowed value is: None or v12phiflip_noecorrnogap flags.addFlag('Trigger.egamma.clusterCorrectionVersion', 'v12phiflip_noecorrnogap') diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaFactories.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaFactories.py index 759c67ebf73cf3aa273cade06d4ad5551755fc26..33a08779a2a389b8cad1e2ff618278b75b8d6956 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaFactories.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaFactories.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration __doc__ = "ToolFactories to configure common TrigEgamma Tools" @@ -13,8 +13,8 @@ Offline configurations are available here: # athena imports from AthenaCommon.BeamFlags import jobproperties -# slice flags -from TriggerMenuMT.HLT.Egamma.TrigEgammaSliceFlags import TrigEgammaSliceFlags +# flags +from AthenaConfiguration.AllConfigFlags import ConfigFlags from TriggerMenuMT.HLT.Egamma.TrigEgammaKeys import getTrigEgammaKeys # Calo tools imports @@ -73,7 +73,7 @@ def TrigEgammaMVASvcCfg( ConfigFilePath ): return trigEgammaMVASvc """ Configuring trigger precision MVA Svc """ -TrigEgammaMVASvc = TrigEgammaMVASvcCfg( TrigEgammaSliceFlags.calibMVAVersion() ) +TrigEgammaMVASvc = TrigEgammaMVASvcCfg( ConfigFlags.Trigger.egamma.calibMVAVersion ) """Configuring egammaRecBuilder """ diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaSliceFlags.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaSliceFlags.py deleted file mode 100644 index 1df1c8581ebe44402f91de775273f8fdc123a96a..0000000000000000000000000000000000000000 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/Egamma/TrigEgammaSliceFlags.py +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration - -""" Egamma slice specific flags """ - -from AthenaCommon.Logging import logging -from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer - -__author__ = 'Joao Victor Pinto' -__version__="$$" -__doc__="Egamma slice specific flags " - -log = logging.getLogger( __name__ ) -_flags = [] - - -class ringerVersion(JobProperty): - """ """ - statusOn=True - allowedTypes=['str'] - StoredValue='TrigL2_20210702_r4' - -_flags.append(ringerVersion) - -class pidVersion(JobProperty): - """ """ - statusOn=True - allowedTypes=['str'] - StoredValue='rel22_20210611' - -_flags.append(pidVersion) - -class dnnVersion(JobProperty): - """ """ - statusOn=True - allowedTypes=['str'] - StoredValue='rel21_20210928' - -_flags.append(dnnVersion) - -class calibMVAVersion(JobProperty): - """ """ - statusOn=True - allowedTypes=['str'] - StoredValue='egammaMVACalib/online/v6' - -_flags.append(calibMVAVersion) - - - -# create container -class TrigEgammaSlice(JobPropertyContainer): - """ Egamma Slice Flags """ - -from TriggerJobOpts.TriggerFlags import TriggerFlags -TriggerFlags.add_Container(TrigEgammaSlice) - - -for flag in _flags: - TriggerFlags.TrigEgammaSlice.add_JobProperty(flag) - -# make an alias -TrigEgammaSliceFlags = TriggerFlags.TrigEgammaSlice - -def run3ConfigAction(run3Flag): - if run3Flag=='2021': - log.info('TrigEgammaSliceFlags set for %s',run3Flag) - TrigEgammaSliceFlags.ringerVersion = 'TrigL2_20210702_r4' - TrigEgammaSliceFlags.dnnVersion = 'rel21_20210928' - TrigEgammaSliceFlags.pidVersion = 'rel22_20210611' - TrigEgammaSliceFlags.calibMVAVersion = 'egammaMVACalib/online/v6' - else: - log.info('TrigEgammaSliceFlags not set use defaults',run3Flag) - - -run3ConfigAction('2021')