3 from AthenaCommon.Logging
import logging
4 mlog = logging.getLogger(
'ElectronRingerSelectorDefs.py' )
8 ROOT.gSystem.Load(
'libRingerSelectorToolsEnumsDict.so')
9 from ROOT
import Ringer
11 from RingerSelectorTools.RingerSelectorToolsConf
import Ringer__AsgElectronRingerSelector
12 from CaloRingerAlgs.CaloRingerKeys
import outputElectronRingSetsConfKey
15 ROOT.gSystem.Load(
'libElectronPhotonSelectorToolsDict.so')
16 from ROOT
import egammaPID
18 from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping
import electronPIDmenu
19 from ElectronPhotonSelectorTools.ConfiguredAsgElectronIsEMSelectors \
20 import ConfiguredAsgElectronIsEMSelector
23 "Remove egammaPID Electron Calorimeter cuts from isEM"
24 CutIDIsEMMask = CutIDIsEMMask & (~egammaPID.CALO_ELECTRON)
28 "Overwrites AsgElectronRingerSelector default to new default value."
29 if attrName
not in kwargs:
30 setattr(self, attrName, default)
34 Set the AsgElectronRingerSelector CutIDSelector to default or to the configuration
35 available in the kwargs
38 if "cutIDConfDict" not in kwargs
and "CutIDSelector" not in kwargs:
40 if "CutIDSelector" not in kwargs:
41 CutIDSelectorTool = ConfiguredAsgElectronIsEMSelector(defaultName,
44 **kwargs.pop(
"cutIDConfDict",{}))
45 from AthenaCommon.AppMgr
import ToolSvc
46 ToolSvc += CutIDSelectorTool
54 Ringer__AsgElectronRingerSelector.__init__(self,name,**kwargs)
56 outputElectronRingSetsConfKey(),
63 def __init__(self, name = "ElectronRingerSelector_TestLoose", **kwargs):
64 BaseElectronSelectorConf.__init__(self,name,**kwargs)
66 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineDiscrLoose.root",
69 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineThresLoose.root",
73 kwargs.get(
"useCutIDTrack",
False)),
76 egammaPID.ElectronIDLoosePP, \
77 electronPIDmenu.menuDC14, **kwargs)
80 def __init__(self, name = "ElectronRingerSelector_TestMedium", **kwargs):
81 BaseElectronSelectorConf.__init__(self,name,**kwargs)
83 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineDiscrMedium.root",
86 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineThresMedium.root",
90 kwargs.get(
"useCutIDTrack",
False)),
93 egammaPID.ElectronIDMediumPP, \
94 electronPIDmenu.menuDC14, \
98 def __init__(self, name = "ElectronRingerSelector_TestTight", **kwargs):
99 BaseElectronSelectorConf.__init__(self,name,**kwargs)
101 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineDiscrTight.root",
104 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineThresTight.root",
108 kwargs.get(
"useCutIDTrack",
False)),
111 egammaPID.ElectronIDTightPP, \
112 electronPIDmenu.menuDC14, **kwargs)
115 def __init__(self, name = "ElectronRingerSelector_TestNoCut", **kwargs):
117 BaseElectronSelectorConf.__init__(self,name,**kwargs)
119 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineDiscrMedium.root",
122 "RingerSelectorTools/TestMenu_20150605_v1/ElectronRingerOfflineThresMedium.root",
126 kwargs.get(
"useCutIDTrack",
False)),
129 egammaPID.ElectronIDNoCut, \
130 electronPIDmenu.menuDC14, \