def ConfiguredAsgForwardElectronIsEMSelector(name, quality, menu=forwardelectronPIDmenu. menuMC15, **kw): """ Configure the AsgForwardElectronIsEMSelector with the quality cuts and allow for (re-)setting of all provided cuts. """ try: ntuple = ForwardElectronIsEMMap(quality, menu) except KeyError: sys.stderr.write(" Fwd Electron quality not found." " Please use an egammaIDQuality" " (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n" " This function only supports standard electron IDs," " and not photon or forward IDs\n") raise # Create and instance of the tool tool = CfgMgr.AsgForwardElectronIsEMSelector(name, **kw) # Configure it with the standard configuration ntuple[1](tool) tool.isEMMask = ntuple[0] # Get all provided properties and overwrite the default values with them SetToolProperties(tool, **kw) # print tool return tool
def ConfiguredAsgElectronLikelihoodTool(name, quality, menu=electronLHmenu.offlineMC16, **kw): """ Configure the AsgElectronIsEMSelector with the quality cuts and allow for (re-)setting of all provided cuts. """ try: ntuple = ElectronLikelihoodMap(quality, menu) except KeyError: sys.stderr.write("Electron quality not found." " Please use an egammaIDQuality" " (ElectronPhotonSelectorTools/egammaPIDdefs.h).\n" " This function only supports standard electron IDs," " and not photon or forward IDs\n") raise # Create an instance of the tool tool = CfgMgr.AsgElectronLikelihoodTool(name, **kw) ntuple[1](tool) # Get all provided properties and overwrite the default values with them SetToolProperties(tool, **kw) # print tool return tool
def ConfiguredJetCleaningTool_Tight(name, **kw): """ Configure the JetCleaningTool with the default Tight cuts and allow for (re-)setting of all provided cuts. """ # Set some default properties, but don't overwrite them if they already exist kw["CutLevel"] = kw.get("CutLevel", "TightBad") # Create and instance of the tool tool = CfgMgr.JetCleaningTool(name, **kw) # Configure it with the standard configuration JetCleaningToolConfig_Tight(tool) # Get all provided properties and overwrite the default values with them SetToolProperties(tool, **kw) return tool