diff --git a/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorDefs.py b/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorDefs.py index aa4e89f5dad1a6ca63f9c28c509c41400372dae1..f30d1d827df7ed62fb2338bf7bb910a01a0cc088 100644 --- a/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorDefs.py +++ b/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorDefs.py @@ -6,26 +6,17 @@ mlog = logging.getLogger( 'ElectronRingerSelectorDefs.py' ) from AthenaCommon.Configurable import Configurable # Import from Ringer utilities: -import cppyy - -try : - cppyy.loadDictionary('RingerSelectorToolsEnumsDict') -except RuntimeError as e: - mlog.error("Could not load RingerSelectorEnumsTools dictionary from cppyy.") - raise RuntimeError(e) - -from ROOT import Ringer +import ROOT +ROOT.gSystem.Load('libRingerSelectorToolsEnumsDict.so') from ROOT.Ringer import ElectronTAccept_v1 + from RingerSelectorTools.RingerSelectorToolsConf import Ringer__AsgElectronRingerSelector from CaloRingerAlgs.CaloRingerKeys import outputElectronRingSetsConfKey -# Import from CutID utilities: -try : - cppyy.loadDictionary('ElectronPhotonSelectorToolsDict') -except RuntimeError as e: - mlog.error("Could not load ElectronPhotonSelectorTools dictionary from cppyy.") - raise RuntimeError(e) +# Import egammaPID +ROOT.gSystem.Load('libElectronPhotonSelectorToolsDict.so') from ROOT import egammaPID + from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import electronPIDmenu from ElectronPhotonSelectorTools.ConfiguredAsgElectronIsEMSelectors \ import ConfiguredAsgElectronIsEMSelector diff --git a/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorMapping.py b/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorMapping.py index 020eb912ff5c72950034b5ccd1bf7016831d6c6b..f0b5a14595b5357aab664e868cb41963cd17d32c 100644 --- a/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorMapping.py +++ b/PhysicsAnalysis/RingerSelectorTools/python/ElectronRingerSelectorMapping.py @@ -9,19 +9,12 @@ ## Description: Retrieve selector from mask mapping ##============================================================================= -import cppyy - -try : - cppyy.loadDictionary('RingerSelectorToolsEnumsDict') -except RuntimeError as e: - from AthenaCommon.Logging import logging - mlog = logging.getLogger( 'ElectronRingerSelectorMapping.py' ) - mlog.error("Could not load RingerSelectorToolsEnums dictionary from cppyy.") - raise RuntimeError(e) from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import electronPIDmenu # Import from Ringer selector tools dictionary: +import ROOT +ROOT.gSystem.Load('libRingerSelectorToolsEnumsDict.so') from ROOT import Ringer from RingerSelectorTools.ElectronRingerSelectorDefs import * @@ -54,8 +47,8 @@ class electronRingerPIDmenu (electronPIDmenu): ##################################################################################################### ElectronRingerMap = { - (Ringer.Loose, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestLoose, - (Ringer.Medium, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestMedium, - (Ringer.Tight, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestTight, - (Ringer.NoCut, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestNoCut, + (Ringer.Requirement.Loose, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestLoose, + (Ringer.Requirement.Medium, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestMedium, + (Ringer.Requirement.Tight, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestTight, + (Ringer.Requirement.NoCut, electronRingerPIDmenu.testMenu): ElectronRingerSelectorTestNoCut, }