diff --git a/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt b/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt index 893fcf0eedc02a7dfbe8c77971d6ad28be6b848e..017d06e259b651d258ada0d774b0c1dba0d6a395 100644 --- a/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt +++ b/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt @@ -1,28 +1,8 @@ -################################################################################ -# Package: CaloRingerTools -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( CaloRingerTools ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthLinks - Event/xAOD/xAODBase - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODCaloRings - GaudiKernel - PRIVATE - Calorimeter/CaloEvent - Calorimeter/CaloGeoHelpers - Calorimeter/CaloUtils - Control/AthenaBaseComps - Control/AthenaKernel - Control/CxxUtils - Event/xAOD/xAODEgamma - PhysicsAnalysis/AnalysisCommon/PATCore - PhysicsAnalysis/RingerSelectorTools ) - atlas_add_library( CaloRingerToolsLib CaloRingerTools/*.h INTERFACE @@ -33,8 +13,7 @@ atlas_add_library( CaloRingerToolsLib atlas_add_component( CaloRingerTools src/*.cxx src/components/*.cxx - LINK_LIBRARIES CaloRingerToolsLib xAODCaloRings CaloEvent CaloGeoHelpers CaloUtilsLib AthenaBaseComps AthenaKernel CxxUtils xAODEgamma PATCoreLib RingerSelectorToolsLib ) + LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel CaloEvent CaloGeoHelpers CaloRingerToolsLib CaloUtilsLib GaudiKernel PATCoreAcceptLib RingerSelectorToolsEnumsLib StoreGateLib xAODBase xAODCaloEvent xAODCaloRings xAODEgamma ) # Install files from the package: -atlas_install_python_modules( python/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerBuilderFactories.py b/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerBuilderFactories.py index 43e60ccda6ff6194c6f51f101a8b145b38f7e2f2..7b263c07e928cbc47861c2465386761ac13154e1 100644 --- a/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerBuilderFactories.py +++ b/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerBuilderFactories.py @@ -74,7 +74,7 @@ class AsymRings( object ): self.doPhiAxesDivision = doPhiAxesDivision def resizeNRingsAsymRings(self, obj): - if ((obj.doEtaAxesDivision == True) and (obj.doPhiAxesDivision == True)): + if ((obj.doEtaAxesDivision is True) and (obj.doPhiAxesDivision is True)): obj.NRings = [(rings-1)*4+1 for rings in obj.NRings] else: obj.NRings = [(rings-1)*2+1 for rings in obj.NRings] diff --git a/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerInputReaderFactories.py b/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerInputReaderFactories.py index fc8322a0d39785a3c9e6f1415444f57b43a61124..0da538d5b23dc56dd6b1c2f560b94c91d9d4761f 100644 --- a/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerInputReaderFactories.py +++ b/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerInputReaderFactories.py @@ -60,7 +60,6 @@ CaloRingerElectronsReaderTool = PublicToolFactory(CaloRingerToolsConf.Ringer__Ca ) from CaloRingerAlgs.CaloRingerAlgorithmBuilder import checkBuildPhotonCaloRings -from CaloRingerAlgs.CaloRingerAlgorithmBuilder import checkDoPhotonIdentification CaloRingerPhotonsReaderTool = PublicToolFactory(CaloRingerToolsConf.Ringer__CaloRingerPhotonsReader, name = "CaloRingerPhotonsReaderTool", inputKey = CaloRingerKeys.inputPhotonKey(), diff --git a/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerSelectorsBuilders.py b/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerSelectorsBuilders.py index 686e6fc7fcd8203a31ab64fc0c9597b025261aff..d0a9b71e471181ec5ca204fb2ca34e0bbe15b756 100644 --- a/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerSelectorsBuilders.py +++ b/Reconstruction/RecoTools/CaloRingerTools/python/CaloRingerSelectorsBuilders.py @@ -70,7 +70,7 @@ class CaloRingerElectronSelectorsBuilder ( Configured ): if not isinstance(customElectronSelectors,(list)): customElectronSelectors = list(customElectronSelectors) for selector in customElectronSelectors: - if not selector.getType() is "Ringer::AsgElectronRingerSelector": + if selector.getType() != "Ringer::AsgElectronRingerSelector": raise ValueError(("Selector must be of type Ringer::AsgElectronRingerSelector" "and is of type %s"),selector.getType()) self._customSelectors.extend( customElectronSelectors )