diff --git a/Reconstruction/egamma/EgammaPhysValMonitoring/CMakeLists.txt b/Reconstruction/egamma/EgammaPhysValMonitoring/CMakeLists.txt
index 06d15e03acb43ac9e1cb44675cbb4e06f4b949e5..4450bf72fe2444f0c630ec01602ac1323de59183 100644
--- a/Reconstruction/egamma/EgammaPhysValMonitoring/CMakeLists.txt
+++ b/Reconstruction/egamma/EgammaPhysValMonitoring/CMakeLists.txt
@@ -1,31 +1,14 @@
-################################################################################
-# Package: EgammaPhysValMonitoring
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EgammaPhysValMonitoring )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaMonitoring
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODPrimitives
-                          Event/xAOD/xAODTruth
-                          PhysicsAnalysis/MCTruthClassifier
-                          Tracking/TrkValidation/TrkValHistUtils )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_component( EgammaPhysValMonitoring
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaMonitoringLib xAODEgamma xAODEventInfo xAODPrimitives xAODTruth MCTruthClassifierLib TrkValHistUtils )
-
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps AthenaMonitoringLib StoreGateLib xAODEgamma xAODEventInfo xAODPrimitives xAODTruth MCTruthClassifierLib TrkValHistUtils )
diff --git a/Reconstruction/egamma/egammaConditions/CMakeLists.txt b/Reconstruction/egamma/egammaConditions/CMakeLists.txt
index 993fabd4c1384ec24b72d1c049738f6b0bf0b2ec..fc4a36eb5ca4e41f830033dc81fd2ebbc8f5ded0 100644
--- a/Reconstruction/egamma/egammaConditions/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaConditions/CMakeLists.txt
@@ -1,30 +1,19 @@
-################################################################################
-# Package: egammaConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # External dependencies:
-find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core )
 
 # Component(s) in the package:
 atlas_add_library( egammaConditions
                    src/*.cxx
                    PUBLIC_HEADERS egammaConditions
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} )
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
 
 atlas_add_dictionary( egammaConditionsDict
                       egammaConditions/egammaConditionsDict.h
                       egammaConditions/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel egammaConditions )
-
+                      LINK_LIBRARIES egammaConditions )
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx
index d33999fce88d00305e0ea536586b97e45c064dbd..2bd9546ad2790c45473595222a20823ad5096c12 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaErrorsMatrix.cxx
@@ -3,11 +3,10 @@
 */
 
 #include "egammaConditions/EMClusterEtaErrorsMatrix.h"
-#include "CLHEP/Units/SystemOfUnits.h"
+#include "GaudiKernel/SystemOfUnits.h"
 #include <cmath>
 #include <utility>
 
-using CLHEP::GeV;
 
 // Constructors
 EMClusterEtaErrorsMatrix::EMClusterEtaErrorsMatrix() : 
@@ -47,7 +46,7 @@ double EMClusterEtaErrorsMatrix::getError(double eta, double clusterEnergy) cons
   if (clusterEnergy < 1.0) clusterEnergy = 1.0;
   if (fabs(eta) > 8.0) eta = 8.0;
   
-  const double clusterEnergyGeV = clusterEnergy*(1./GeV);  //GeV
+  const double clusterEnergyGeV = clusterEnergy*(1./Gaudi::Units::GeV);  //GeV
   
   /** Error on theta = C(eta) mrad/sqrt(Energy) */
   /** NOTE: Eta dependence of C  will be implemented later. C=70mrad based on EG6 note*/ 
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx
index 314fa24bfb845980af04250e9aabd0b12e79b3bb..c35ea2ba0fce7ce636a04d44c5b07d038a2b939c 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterEtaPosErrorsMatrix.cxx
@@ -3,12 +3,10 @@
 */
 
 #include "egammaConditions/EMClusterEtaPosErrorsMatrix.h"
-#include "CLHEP/Units/SystemOfUnits.h"
+#include "GaudiKernel/SystemOfUnits.h"
 #include <cmath>
 #include <utility>
 
-using CLHEP::GeV;
-
 // Constructors
 EMClusterEtaPosErrorsMatrix::EMClusterEtaPosErrorsMatrix() : 
   EMClusterErrorsMatrix()
@@ -47,7 +45,7 @@ double EMClusterEtaPosErrorsMatrix::getError(double eta, double clusterEnergy) c
   // for protection, to not divide by 0;
   if (clusterEnergy < 1.0) clusterEnergy = 1.0;
   
-  const double clusterEnergyGeV = clusterEnergy*(1./GeV);  //GeV
+  const double clusterEnergyGeV = clusterEnergy*(1./Gaudi::Units::GeV);  //GeV
   
   const double a = params->at(0); // "a" from DB
   const double b = params->at(1); // "b" from DB
diff --git a/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx b/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx
index 3e2ebea20aa08cc1cc87cc05c2c52a5f415fe672..b8ea095b8041f032157c6d08588d9d4809a67ed2 100644
--- a/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx
+++ b/Reconstruction/egamma/egammaConditions/src/EMClusterPhiErrorsMatrix.cxx
@@ -3,11 +3,10 @@
 */
 
 #include "egammaConditions/EMClusterPhiErrorsMatrix.h"
-#include "CLHEP/Units/SystemOfUnits.h"
+#include "GaudiKernel/SystemOfUnits.h"
 #include <cmath>
 #include <utility>
 
-using CLHEP::GeV;
 
 // Constructors
 EMClusterPhiErrorsMatrix::EMClusterPhiErrorsMatrix() : 
@@ -46,7 +45,7 @@ double EMClusterPhiErrorsMatrix::getError(double eta, double clusterEnergy) cons
   // for protection, to not divide by 0;
   if (clusterEnergy < 1.0) clusterEnergy = 1.0;
 
-  const double clusterEnergyGeV = clusterEnergy*(1./GeV);  //GeV
+  const double clusterEnergyGeV = clusterEnergy*(1./Gaudi::Units::GeV);  //GeV
   
   /** Error on phi = C(eta) mrad/sqrt(Energy) */
   /** NOTE : Eta dependence of C  will be implemented later. C=70mrad based on EG6 note*/
diff --git a/Reconstruction/egamma/egammaEvent/CMakeLists.txt b/Reconstruction/egamma/egammaEvent/CMakeLists.txt
index 20fce4fb7bd259f0d6e640eb7470839ec621bb1b..cba9ba65985369347febc5d93894d5e75185d9e6 100644
--- a/Reconstruction/egamma/egammaEvent/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaEvent/CMakeLists.txt
@@ -1,63 +1,31 @@
-################################################################################
-# Package: egammaEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/Navigation
-                          Event/EventKernel
-                          Event/FourMom
-                          Event/NavFourMom
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          Reconstruction/Jet/JetEvent
-                          Reconstruction/Particle
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/VxVertex
-                          PRIVATE
-                          GaudiKernel
-                          Reconstruction/egamma/egammaConditions
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkMaterialOnTrack
-                          Tracking/TrkEvent/TrkNeutralParameters
-                          Tracking/TrkEvent/TrkParametersBase
-                          Tracking/TrkEvent/TrkParticleBase
-                          Tracking/TrkEvent/TrkTrack )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core )
 
 # Component(s) in the package:
 atlas_add_library( egammaEvent
                    src/*.cxx
                    PUBLIC_HEADERS egammaEvent
-                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack )
+                   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParametersBase TrkParameters VxVertex
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParticleBase TrkTrack )
 
 atlas_add_dictionary( egammaEventDict
                       egammaEvent/egammaEventDict.h
                       egammaEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack egammaEvent
+                      LINK_LIBRARIES egammaEvent
                       NAVIGABLES egammaContainer ElectronContainer PhotonContainer EMShowerMinimalContainer
                       ELEMENT_LINKS egDetailContainer CaloRingsContainer )
 
 atlas_add_dictionary( egammaEnumsDict
                       egammaEvent/egammaEnumsDict.h
                       egammaEvent/selectionEnums.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloGeoHelpers CaloIdentifier AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom ParticleEvent JetEvent Particle TrkParameters VxVertex GaudiKernel egammaConditions TrkSurfaces TrkMaterialOnTrack TrkNeutralParameters TrkParametersBase TrkParticleBase TrkTrack egammaEvent )
-
+                      LINK_LIBRARIES egammaEvent )
diff --git a/Reconstruction/egamma/egammaEventTPCnv/CMakeLists.txt b/Reconstruction/egamma/egammaEventTPCnv/CMakeLists.txt
index fed4ac8e41e36f617bb78d1c5a45613bdf225026..e5682caa5849d404bdbd6a968bff5d36782d8f7a 100644
--- a/Reconstruction/egamma/egammaEventTPCnv/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaEventTPCnv/CMakeLists.txt
@@ -1,40 +1,21 @@
-################################################################################
-# Package: egammaEventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaEventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/DataModelAthenaPool
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Event/EventCommonTPCnv
-                          PhysicsAnalysis/AnalysisCommon/ParticleEventTPCnv
-                          Reconstruction/egamma/egammaEvent
-                          PRIVATE
-                          Control/AthenaKernel
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( egammaEventTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS egammaEventTPCnv
-                         PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv ParticleEventTPCnv egammaEvent AthenaKernel GaudiKernel )
+                         LINK_LIBRARIES DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv ParticleEventTPCnv egammaEvent
+                         PRIVATE_LINK_LIBRARIES AthenaKernel GaudiKernel )
 
 atlas_add_dictionary( egammaEventTPCnvDict
                       egammaEventTPCnv/egammaEventTPCnvDict.h
                       egammaEventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv ParticleEventTPCnv egammaEvent AthenaKernel GaudiKernel egammaEventTPCnv )
+                      LINK_LIBRARIES egammaEventTPCnv )
 
 atlas_add_dictionary( OLD_egammaEventTPCnvDict
                       egammaEventTPCnv/egammaEventTPCnvDict.h
                       egammaEventTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv ParticleEventTPCnv egammaEvent AthenaKernel GaudiKernel egammaEventTPCnv )
-
+                      LINK_LIBRARIES egammaEventTPCnv )
diff --git a/Reconstruction/egamma/egammaLayerRecalibTool/CMakeLists.txt b/Reconstruction/egamma/egammaLayerRecalibTool/CMakeLists.txt
index 59e3a0138d56fafc81912e2929888a04beb32d5f..4b8df1bb099764f922e75f1517aff08cf955e806 100644
--- a/Reconstruction/egamma/egammaLayerRecalibTool/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaLayerRecalibTool/CMakeLists.txt
@@ -1,22 +1,8 @@
-# $Id: CMakeLists.txt 776712 2016-10-05 16:37:44Z krasznaa $
-################################################################################
-# Package: egammaLayerRecalibTool
-###############################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaLayerRecalibTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   PhysicsAnalysis/AnalysisCommon/PATInterfaces
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODEgamma
-	Event/xAOD/xAODEventInfo
-   PRIVATE
-   Tools/PathResolver )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Hist Core RIO )
 
@@ -24,9 +10,9 @@ find_package( ROOT COMPONENTS Hist Core RIO )
 atlas_add_library( egammaLayerRecalibTool
    egammaLayerRecalibTool/*.h Root/*.cxx
    PUBLIC_HEADERS egammaLayerRecalibTool
-	PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES PATInterfaces AsgTools xAODCaloEvent xAODEgamma xAODEventInfo
-   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PathResolver )
+   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib PATInterfaces AsgTools xAODCaloEvent xAODEgamma xAODEventInfo
+   PRIVATE_LINK_LIBRARIES PathResolver )
 
 atlas_add_dictionary( egammaLayerRecalibToolDict
    egammaLayerRecalibTool/egammaLayerRecalibToolDict.h
diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt
index 44b718d49f1f6aaf44b88081fc11f2a368b7afe4..b072f20a3f31552677154f83f30b7c6151ea9e79 100644
--- a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt
@@ -1,35 +1,16 @@
-################################################################################
-# Package: egammaMVACalib
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaMVACalib )
 
 # Extra dependencies for Athena capable builds:
-set( extra_dep )
 set( extra_libs )
 if( XAOD_STANDALONE )
-   set( extra_dep Control/xAODRootAccess)
+   set( extra_libs xAODRootAccess)
 else()
-   set( extra_dep 
-	GaudiKernel 
-	Reconstruction/egamma/egammaInterfaces)
-   set( extra_libs egammaInterfacesLib )
+   set( extra_libs GaudiKernel egammaInterfacesLib )
 endif()
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODTracking
-   PRIVATE
-   Reconstruction/MVAUtils
-   Tools/PathResolver
-   ${extra_dep} )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Tree Core Hist)
 
@@ -38,14 +19,14 @@ atlas_add_library( egammaMVACalibLib
    egammaMVACalib/*.h Root/*.cxx
    PUBLIC_HEADERS egammaMVACalib
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma xAODTracking ${extra_libs} )
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib xAODCaloEvent xAODEgamma ${extra_libs} )
 
 if( NOT XAOD_STANDALONE )
 atlas_add_component( egammaMVACalib
 	src/*.cxx src/components/*.cxx
 	INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-	LINK_LIBRARIES ${ROOT_LIBRARIES} egammaMVACalibLib PathResolver MVAUtils GaudiKernel)
+	LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel MVAUtils PathResolver egammaInterfacesLib egammaMVACalibLib xAODCaloEvent xAODEgamma xAODTracking )
 endif()
 
 # 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/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py b/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py
index 5f6d8543555d9cb44aa7fdaa66adb877624c6f86..19598f2f59ce0f7fa63d451cde6d3a92070c838b 100644
--- a/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py
+++ b/Reconstruction/egamma/egammaMVACalib/python/TrigEgammaMVACalibFactories.py
@@ -11,8 +11,8 @@ mlog = logging.getLogger ('TrigEgammaMVACalibFactories')
 
 from egammaMVACalib import egammaMVACalibConf
 from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
-mlog.info("MVA version version %s"%EgammaSliceFlags.calibMVAVersion() )
-mlog.info("Cluster Correction version %s"%EgammaSliceFlags.clusterCorrectionVersion() )
+mlog.info("MVA version version %s", EgammaSliceFlags.calibMVAVersion() )
+mlog.info("Cluster Correction version %s", EgammaSliceFlags.clusterCorrectionVersion() )
 EgammaSliceFlags.calibMVAVersion.set_On()
 
 from xAODEgamma.xAODEgammaParameters import xAOD
diff --git a/Reconstruction/egamma/egammaPerformance/CMakeLists.txt b/Reconstruction/egamma/egammaPerformance/CMakeLists.txt
index c0fac89a050c734b6c0e0333190a264b252a9bfa..8c0058e612ee5080a5e682218db804ea091454b4 100644
--- a/Reconstruction/egamma/egammaPerformance/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaPerformance/CMakeLists.txt
@@ -1,33 +1,19 @@
-################################################################################
-# Package: egammaPerformance
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaPerformance )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaMonitoring
-                          Control/StoreGate
-                          Database/CoraCool
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigEvent/TrigParticle
-                          Trigger/TrigEvent/TrigSteeringEvent )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( ROOT COMPONENTS Core Hist )
 
 atlas_add_component( egammaPerformance
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib StoreGateLib SGtests xAODEgamma xAODEventInfo GaudiKernel TrigDecisionToolLib TrigParticle TrigSteeringEvent )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringKernelLib AthenaMonitoringLib StoreGateLib xAODEgamma xAODEventInfo GaudiKernel TrigDecisionToolLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/egammaPerformance_hist.C share/egammaPerformance_ID_hist.C share/egammaPerformanceHistsToPostScript.C share/egammaPerformanceRunMacros.C )
 
diff --git a/Reconstruction/egamma/egammaPerformance/python/egammaMonTool.py b/Reconstruction/egamma/egammaPerformance/python/egammaMonTool.py
index 93555f1a9b99a98bba180402e105b97096d45443..efb07feaa0985ed6e242659609562c8260b2b25a 100755
--- a/Reconstruction/egamma/egammaPerformance/python/egammaMonTool.py
+++ b/Reconstruction/egamma/egammaPerformance/python/egammaMonTool.py
@@ -1,59 +1,44 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # two implementation of the egammaMonTool base class
-from AthenaCommon.Logging import logging
-from AthenaCommon.SystemOfUnits import *
-from AthenaCommon.Constants import *
-import traceback
+from AthenaCommon.SystemOfUnits import GeV
 
 #import base class
 from egammaPerformance.egammaMonToolBase import egammaMonToolBase
 
 class egammaMonTool ( egammaMonToolBase ) :
-	def __init__(self) :
-		egammaMonToolBase.__init__(self)
-	pass
+        def __init__(self, name):
+                egammaMonToolBase.__init__(self,name)
 
-	def __init__(self, name):
-		egammaMonToolBase.__init__(self,name)
-		#mlog = logging.getLogger(name+'::__init__')
-		#mlog.info("entering")
+                # do the configuration
+                self.ElectronContainer          ="ElectronCollection"
+                self.PhotonContainer            ="PhotonCollection"
+                self.EMTrackMatchContainer      ="egDetailContainer"
+                self.EMShowerContainer          ="egDetailContainer"
+                self.EMConvertContainer         ="egDetailContainer"
+                self.TriggerDecisionTool = "TrigDec::TrigDecisionTool"
+                self.UseTrigger = True
+                self.Electron_Trigger_Items = ["EF_e105","EF_e10i","EF_e25_tight","EF_e10i","EF_2e15i"]
+                self.Photon_Trigger_Items = ["EF_g105","EF_g25i_L32","EF_g25_L32"]
 
-		# do the configuration
-		self.ElectronContainer		="ElectronCollection"
-		self.PhotonContainer		="PhotonCollection"
-		self.EMTrackMatchContainer	="egDetailContainer"
-		self.EMShowerContainer		="egDetailContainer"
-		self.EMConvertContainer		="egDetailContainer"
-		self.TriggerDecisionTool = "TrigDec::TrigDecisionTool"
-		self.UseTrigger = True
-		self.Electron_Trigger_Items = ["EF_e105","EF_e10i","EF_e25_tight","EF_e10i","EF_2e15i"]
-		self.Photon_Trigger_Items = ["EF_g105","EF_g25i_L32","EF_g25_L32"]
+                self.EtaCuts = [-2.5,-2.3,-1.9,-1.8,-1.52,-1.37,-1.1,-.8,-.6,
+                                0.,.6,.8,1.1,1.37,1.52,1.8,1.9,2.3,2.5]
+                self.PhiCuts = [-3.2,-2.88,-2.56,-2.24,-1.92,-1.6,-1.28,-0.96,
+                                -0.64,-0.32,0,0.32,0.64,0.96,1.28,1.6,1.92,
+                                2.24,2.56,2.88,3.2]
+                self.EtCut = 25 * GeV
 
-		self.EtaCuts = [-2.5,-2.3,-1.9,-1.8,-1.52,-1.37,-1.1,-.8,-.6,
-				0.,.6,.8,1.1,1.37,1.52,1.8,1.9,2.3,2.5]
-		self.PhiCuts = [-3.2,-2.88,-2.56,-2.24,-1.92,-1.6,-1.28,-0.96,
-				-0.64,-0.32,0,0.32,0.64,0.96,1.28,1.6,1.92,
-				2.24,2.56,2.88,3.2]
-		self.EtCut = 25 * GeV
-	    
 class egammaAODMonTool ( egammaMonToolBase ) :
-	def __init__(self) : 
-		egammaMonToolBase.__init__(self)
-	pass 
- 
-	def __init__(self, name):
-		egammaMonToolBase.__init__(self,name)
-		#mlog = logging.getLogger(name+'::__init__')
-		#mlog.info("entering")
+        def __init__(self, name):
+                egammaMonToolBase.__init__(self,name)
 
-		# do the configuration
-		self.ElectronContainer		="ElectronAODCollection"
-		self.PhotonContainer		="PhotonAODCollection"
-		self.EMTrackMatchContainer	="egDetailAOD"
-		self.EMShowerContainer		="egDetailAOD"
-		self.EMConvertContainer		="egDetailAOD"
-		self.TriggerDecisionTool = "TrigDec::TrigDecisionTool"
-		self.UseTrigger = True
-		self.Electron_Trigger_Items = ["EF_e105","EF_e10i","EF_e25_tight","EF_e10i","EF_2e15i"]
-		self.Photon_Trigger_Items = ["EF_g105","EF_g25i_L32","EF_g25_L32"]
+                # do the configuration
+                self.ElectronContainer          ="ElectronAODCollection"
+                self.PhotonContainer            ="PhotonAODCollection"
+                self.EMTrackMatchContainer      ="egDetailAOD"
+                self.EMShowerContainer          ="egDetailAOD"
+                self.EMConvertContainer         ="egDetailAOD"
+                self.TriggerDecisionTool = "TrigDec::TrigDecisionTool"
+                self.UseTrigger = True
+                self.Electron_Trigger_Items = ["EF_e105","EF_e10i","EF_e25_tight","EF_e10i","EF_2e15i"]
+                self.Photon_Trigger_Items = ["EF_g105","EF_g25i_L32","EF_g25_L32"]
diff --git a/Reconstruction/egamma/egammaPerformance/python/egammaMonToolBase.py b/Reconstruction/egamma/egammaPerformance/python/egammaMonToolBase.py
index 9869530d436a540e2b5099303e58fb56659be1c4..994bfb71a88c4dd0b41d299399fdb9c9502a7eff 100755
--- a/Reconstruction/egamma/egammaPerformance/python/egammaMonToolBase.py
+++ b/Reconstruction/egamma/egammaPerformance/python/egammaMonToolBase.py
@@ -1,60 +1,50 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # base configuration of the egammaMonTool
 from AthenaCommon.Logging import logging
-from AthenaCommon.SystemOfUnits import *
-from AthenaCommon.Constants import *
 import traceback
 
 #import base class
 from egammaPerformance.egammaPerformanceConf import egammaMonTool
 
 class egammaMonToolBase ( egammaMonTool ) :
-	_name = ""
-
-	def __init__(self) :
-        	egammaMonTool.__init__(self)
-	pass
-
-
-	def __init__(self, name):
-		mlog = logging.getLogger(name+'::__init__')
-		mlog.info("entering")
-			
-		egammaMonTool.__init__(self,name)
-		_name = name	
-
-		try:
-			## add an AthenaMonManager algorithm to the list of algorithms to be ran
-			from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-			monMan = AthenaMonManager( "MonManager_%s" % name )
-
-			monMan.AthenaMonTools += [ "egammaMonTool/'%s'" % name ]
-
-			# FileKey must match that given to THistSvc
-			monMan.FileKey = "'%s'" % name
-
-			# Set global monitoring parameters: see the AthenaMonManager class
-			# in the Control/AthenaMonitoring package
-			monMan.ManualDataTypeSetup = True
-			monMan.DataType            = "monteCarlo"
-			monMan.Environment         = "user"
-			monMan.ManualRunLBSetup    = True
-			monMan.Run                 = 1
-			monMan.LumiBlock           = 1
-
-		except Exception:
-			mlog.error("could not initialize egammaMonTool/%s" % name)
-			print(traceback.format_exc())
-			return False
-		
-		# get a handle on the top sequence of algorithms
-		from AthenaCommon.AlgSequence import AlgSequence
-		topSequence = AlgSequence()
-		topSequence += monMan
-			
-
-	def get_name(self) :
-		return self._name
 
+        def __init__(self, name):
+                mlog = logging.getLogger(name+'::__init__')
+                mlog.info("entering")
 
+                egammaMonTool.__init__(self,name)
+                self._name = name
+
+                try:
+                        ## add an AthenaMonManager algorithm to the list of algorithms to be ran
+                        from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
+                        monMan = AthenaMonManager( "MonManager_%s" % name )
+
+                        monMan.AthenaMonTools += [ "egammaMonTool/'%s'" % name ]
+
+                        # FileKey must match that given to THistSvc
+                        monMan.FileKey = "'%s'" % name
+
+                        # Set global monitoring parameters: see the AthenaMonManager class
+                        # in the Control/AthenaMonitoring package
+                        monMan.ManualDataTypeSetup = True
+                        monMan.DataType            = "monteCarlo"
+                        monMan.Environment         = "user"
+                        monMan.ManualRunLBSetup    = True
+                        monMan.Run                 = 1
+                        monMan.LumiBlock           = 1
+
+                except Exception:
+                        mlog.error("could not initialize egammaMonTool/%s", name)
+                        print(traceback.format_exc())
+                        return False
+
+                # get a handle on the top sequence of algorithms
+                from AthenaCommon.AlgSequence import AlgSequence
+                topSequence = AlgSequence()
+                topSequence += monMan
+
+
+        def get_name(self) :
+                return self._name
diff --git a/Reconstruction/egamma/egammaRecEvent/CMakeLists.txt b/Reconstruction/egamma/egammaRecEvent/CMakeLists.txt
index a3ade5b0941bf7d2cc57761ff54b9f6a95c90bcc..a859e062fb47237a040ea781735d39cd55c71e5f 100644
--- a/Reconstruction/egamma/egammaRecEvent/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaRecEvent/CMakeLists.txt
@@ -1,28 +1,14 @@
-# $Id: CMakeLists.txt 778348 2016-10-13 18:53:21Z krasznaa $
-################################################################################
-# Package: egammaRecEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaRecEvent )
 
 # Extra dependencies based on the environment:
-set( extra_deps )
 set( extra_libs )
 if( NOT XAOD_STANDALONE )
-   set( extra_deps Control/AthenaKernel )
    set( extra_libs AthenaKernel )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainers
-   Control/AthLinks
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODTracking
-   ${extra_deps} )
-
 # Component(s) in the package:
 atlas_add_library( egammaRecEvent
    egammaRecEvent/*.h Root/*.cxx
diff --git a/Reconstruction/egamma/egammaValidation/CMakeLists.txt b/Reconstruction/egamma/egammaValidation/CMakeLists.txt
index 986fd16c7401bcd1da72d1ab92742d30da7ee151..cb8720d005d0302c806bee02ab0000d22afdc39a 100644
--- a/Reconstruction/egamma/egammaValidation/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaValidation/CMakeLists.txt
@@ -1,34 +1,13 @@
-################################################################################
-# Package: egammaValidation
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( egammaValidation )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-	GaudiKernel
-	AsgExternal/Asg_MCUtils
-	Control/AthenaBaseComps
-	Control/AthToolSupport/AsgTools
-	Event/xAOD/xAODEgamma
-	Event/xAOD/xAODEventInfo
-        Event/xAOD/xAODBase 
-	Event/xAOD/xAODTracking
-        Event/xAOD/xAODTruth
-        PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
-        PhysicsAnalysis/AnalysisCommon/PATCore
-	PhysicsAnalysis/MCTruthClassifier
-	PhysicsAnalysis/IsolationSelection
-	Tracking/TrkValidation/TrkValHistUtils ) 
-
 # add the Module/component library :
 atlas_add_component ( egammmaValidation
 	src/*.cxx 
 	src/components/*.cxx 
-	INCLUDE_DIRS 
-	LINK_LIBRARIES GaudiKernel AthenaBaseComps AsgTools xAODEventInfo PATCoreLib
-	xAODEgamma xAODTracking TrkValHistUtils AsgAnalysisInterfaces xAODTruth xAODBase MCTruthClassifierLib)
+    LINK_LIBRARIES AsgTools AthenaBaseComps EgammaAnalysisInterfacesLib GaudiKernel IsolationSelectionLib MCTruthClassifierLib PATCoreAcceptLib xAODBase xAODEgamma xAODEventInfo xAODTracking xAODTruth )
 
 # Install JO files from the package:
 atlas_install_joboptions( share/*.py )