Commit 7794571e authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'further_cleanup_photonSelector_config' into 'master'

Photon Selector tools , config cleanup

See merge request atlas/athena!47388
parents 6d81b516 60b41bd9
......@@ -10,15 +10,17 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import (
ElectronIsEMMap, electronPIDmenu)
# Import the needed stuff specific to the ElectronPhotonSelectorTools
AsgElectronIsEMSelector = CompFactory.AsgElectronIsEMSelector
def AsgElectronIsEMSelectorCfg(flags, name, quality, menu=electronPIDmenu.menuDC14):
def AsgElectronIsEMSelectorCfg(
flags,
name,
quality,
menu=electronPIDmenu.menuDC14):
mlog = logging.getLogger('AsgElectronIsEMSelector')
mlog.debug('Start configuration')
AsgElectronIsEMSelector = CompFactory.AsgElectronIsEMSelector
acc = ComponentAccumulator()
try:
ntuple = ElectronIsEMMap(quality, menu)
......
......@@ -9,17 +9,19 @@ from AthenaCommon.Logging import logging
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
# Import the needed stuff specific to the ElectronPhotonSelectorTools
AsgElectronLikelihoodTool = CompFactory.AsgElectronLikelihoodTool
def AsgElectronLikelihoodToolCfg(flag, name, quality, menu=electronLHmenu.offlineMC16):
acc = ComponentAccumulator()
def AsgElectronLikelihoodToolCfg(
flag,
name,
quality,
menu=electronLHmenu.offlineMC16):
mlog = logging.getLogger('AsgElectronLikelihoodTool')
mlog.debug('Start configuration')
AsgElectronLikelihoodTool = CompFactory.AsgElectronLikelihoodTool
acc = ComponentAccumulator()
try:
ntuple = ElectronLikelihoodMap(quality, menu)
mlog.debug('ntuple: %s', ntuple)
......
......@@ -9,16 +9,17 @@ from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from ElectronPhotonSelectorTools.ForwardElectronIsEMSelectorMapping import (
ForwardElectronIsEMMap, forwardelectronPIDmenu)
# Import the needed stuff specific to the ElectronPhotonSelectorTools
AsgForwardElectronIsEMSelector = CompFactory.AsgForwardElectronIsEMSelector
def AsgForwardElectronIsEMSelectorCfg(flags, name, quality, menu=forwardelectronPIDmenu.menuMC15):
acc = ComponentAccumulator()
def AsgForwardElectronIsEMSelectorCfg(flags,
name,
quality,
menu=forwardelectronPIDmenu.menuMC15):
mlog = logging.getLogger('AsgForwardElectronIsEMSelector')
mlog.debug('Start configuration')
acc = ComponentAccumulator()
AsgForwardElectronIsEMSelector = CompFactory.AsgForwardElectronIsEMSelector
try:
ntuple = ForwardElectronIsEMMap(quality, menu)
......
......@@ -9,16 +9,16 @@ from AthenaCommon.Logging import logging
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
# Import the needed stuff specific to the PhotonPhotonSelectorTools
AsgPhotonIsEMSelector = CompFactory.AsgPhotonIsEMSelector
def AsgPhotonIsEMSelectorCfg(flags, name, quality, menu=photonPIDmenu.menuCurrentCuts):
acc = ComponentAccumulator()
def AsgPhotonIsEMSelectorCfg(flags,
name,
quality,
menu=photonPIDmenu.menuCurrentCuts):
mlog = logging.getLogger('AsgPhotonIsEMSelector')
mlog.debug('Start configuration')
acc = ComponentAccumulator()
AsgPhotonIsEMSelector = CompFactory.AsgPhotonIsEMSelector
try:
ntuple = PhotonIsEMMap(quality, menu)
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# default configuration of the PhotonIsEMSelectorCutDefs
# This one is used for stadard Loose photons cuts menus
# Import a needed helper
from PATCore.HelperUtils import GetTool
# Define GeV
GeV = 1000.0
def PhotonIsEMLooseSelectorConfig(theTool) :
'''
These are the photon isEM definitions *DC14* Loose
'''
theTool = GetTool(theTool)
#
# PHOTON Loose cuts, with updated using *DC14*.
#
theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMLooseSelectorCutDefs.conf"
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# default configuration of the PhotonIsEMSelectorCutDefs
# This one is used for stadard photons cuts menus
# Import a needed helper
from PATCore.HelperUtils import GetTool
def PhotonIsEMMediumSelectorConfig(theTool) :
'''
These are the photon isEM definitions from *DC14*
'''
theTool = GetTool(theTool)
# MEDIUM (20/11/2013 -- Ludovica@cern.ch)
# Coming from Fer
#
theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMMediumSelectorCutDefs.conf"
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# default configuration of the PhotonIsEMSelectorCutDefs
# This one is used for stadard Tight photons cuts menus
# Import a needed helper
from PATCore.HelperUtils import GetTool
# Define GeV
GeV = 1000.0
#
def PhotonIsEMLooseSelectorConfig(theTool):
'''
These are the photon isEM definitions *DC14* Loose
'''
theTool = GetTool(theTool)
#
# PHOTON Loose cuts, with updated using *DC14*.
#
theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMLooseSelectorCutDefs.conf"
def PhotonIsEMMediumSelectorConfig(theTool):
'''
These are the photon isEM definitions from *DC14*
'''
theTool = GetTool(theTool)
# MEDIUM (20/11/2013 -- Ludovica@cern.ch)
# Coming from Fer
#
theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150712/PhotonIsEMMediumSelectorCutDefs.conf"
# Current cut-based tight menu. When updating tight, simply change the config-file below
# (and please add a meaningful description of the conf file)
# Note: keep this conf file up to date with the PhotonCutPointToConfFile map in Root/EGSelectorConfigurationMapping.h
#
def PhotonIsEMTightSelectorConfig(theTool) :
def PhotonIsEMTightSelectorConfig(theTool):
'''
These are the photon isEM definitions for Tight menu
'''
theTool = GetTool(theTool)
#
......@@ -28,18 +51,19 @@ def PhotonIsEMTightSelectorConfig(theTool) :
#
# Pt-inclusive tight ID menu, derived in January 2018.
# Needs to be kept around until the new menu is fully supported, but can be removed
# when it becomes obsolete.
# Needs to be kept around until the new menu is fully supported,
# but can be removed when it becomes obsolete.
#
def PhotonIsEMTightSelectorConfigPtInclJan2018(theTool) :
def PhotonIsEMTightSelectorConfigPtInclJan2018(theTool):
'''
These are the photon isEM definitions for Tight menu
'''
theTool = GetTool(theTool)
#
# PHOTON tight cuts, now with January 2018 re-optimization
#
theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/20180116/PhotonIsEMTightSelectorCutDefs.conf"
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# =============================================================================
## Name: PhotonIsEMSelectorMapping.py
# Name: PhotonIsEMSelectorMapping.py
##
# Author: Tulay Cuhadar Donszelmann, Jovan Mitrevski
# Created: Dec 2011
......@@ -10,9 +10,7 @@
# =============================================================================
#
import ElectronPhotonSelectorTools.PhotonIsEMLooseSelectorCutDefs as PhotonIsEMLooseSelectorCutDefs
import ElectronPhotonSelectorTools.PhotonIsEMTightSelectorCutDefs as PhotonIsEMTightSelectorCutDefs
import ElectronPhotonSelectorTools.PhotonIsEMMediumSelectorCutDefs as PhotonIsEMMediumSelectorCutDefs
import ElectronPhotonSelectorTools.PhotonIsEMMenuDefs as PhotonIsEMMenuDefs
from ElectronPhotonSelectorTools.EgammaPIDdefs import egammaPID
#
......@@ -37,32 +35,32 @@ class photonPIDmenu:
PhotonIsEMMapCurrent = {
egammaPID.PhotonIDLoose: (
egammaPID.PhotonLoose,
PhotonIsEMLooseSelectorCutDefs.PhotonIsEMLooseSelectorConfig),
PhotonIsEMMenuDefs.PhotonIsEMLooseSelectorConfig),
egammaPID.PhotonIDMedium: (
egammaPID.PhotonMedium,
PhotonIsEMMediumSelectorCutDefs.PhotonIsEMMediumSelectorConfig),
PhotonIsEMMenuDefs.PhotonIsEMMediumSelectorConfig),
egammaPID.PhotonIDTight: (
egammaPID.PhotonTight,
PhotonIsEMTightSelectorCutDefs.PhotonIsEMTightSelectorConfig),
PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfig),
egammaPID.PhotonIDLooseAR: (
egammaPID.PhotonLooseAR,
PhotonIsEMLooseSelectorCutDefs.PhotonIsEMLooseSelectorConfig),
PhotonIsEMMenuDefs.PhotonIsEMLooseSelectorConfig),
egammaPID.PhotonIDMediumAR: (
egammaPID.PhotonMediumAR,
PhotonIsEMMediumSelectorCutDefs.PhotonIsEMMediumSelectorConfig),
PhotonIsEMMenuDefs.PhotonIsEMMediumSelectorConfig),
egammaPID.PhotonIDTightAR: (
egammaPID.PhotonTightAR,
PhotonIsEMTightSelectorCutDefs.PhotonIsEMTightSelectorConfig),
PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfig),
egammaPID.NoIDCut: (
0,
PhotonIsEMLooseSelectorCutDefs.PhotonIsEMLooseSelectorConfig)
PhotonIsEMMenuDefs.PhotonIsEMLooseSelectorConfig)
}
PhotonIsEMMapPtInclJan2018 = {
egammaPID.PhotonIDTight: (
egammaPID.PhotonTight,
PhotonIsEMTightSelectorCutDefs.PhotonIsEMTightSelectorConfigPtInclJan2018),
PhotonIsEMMenuDefs.PhotonIsEMTightSelectorConfigPtInclJan2018),
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment