From d661f60198da8bc0211c2c7d2851ea32ae925168 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Wed, 17 Jun 2020 16:07:13 +0200
Subject: [PATCH 1/3] TrigEgammaEmulationTool: CMake cleanup and enable flake8

---
 .../TrigEgammaEmulationTool/CMakeLists.txt    | 57 ++-----------------
 .../python/TrigEgammaEmulationEFConfig.py     |  4 +-
 .../TrigEgammaEmulationIsolationConfig.py     | 13 +----
 .../python/TrigEgammaEmulationL2Config.py     |  5 +-
 .../TrigEgammaEmulationPidToolsConfig.py      | 42 +++++++++-----
 .../python/TrigEgammaEmulationToolConfig.py   | 11 +---
 6 files changed, 42 insertions(+), 90 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt
index 72cdd1712835..e1c5b631fdca 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/CMakeLists.txt
@@ -1,41 +1,8 @@
-################################################################################
-# Package: TrigEgammaEmulationTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigEgammaEmulationTool )
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainers
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODBase
-   Event/xAOD/xAODCaloEvent
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODPrimitives
-   Event/xAOD/xAODTracking
-   Event/xAOD/xAODTrigCalo
-   Event/xAOD/xAODTrigEgamma
-   Event/xAOD/xAODTrigRinger
-   Event/xAOD/xAODTrigger
-   PhysicsAnalysis/AnalysisCommon/PATCore
-   PhysicsAnalysis/Interfaces/EgammaAnalysisInterfaces
-   LumiBlock/LumiBlockComps
-   InnerDetector/InDetRecTools/InDetTrackSelectionTool
-   Reconstruction/RecoTools/RecoToolInterfaces
-   Tools/PathResolver
-   Trigger/TrigAnalysis/TrigDecisionTool
-   Trigger/TrigConfiguration/TrigConfHLTData
-   Trigger/TrigEvent/TrigSteeringEvent
-   Trigger/TrigHypothesis/TrigMultiVarHypo
-   Trigger/TrigAnalysis/TrigEgammaMatchingTool
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/StoreGate
-   GaudiKernel )
-
 # External dependencies:
 find_package( Boost )
 find_package( CLHEP )
@@ -46,25 +13,13 @@ atlas_add_library( TrigEgammaEmulationToolLib
    PUBLIC_HEADERS TrigEgammaEmulationTool 
    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthContainers AsgTools xAODBase
-   xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma
-   xAODTrigRinger xAODTrigger PATCoreLib EgammaAnalysisInterfacesLib
-   LumiBlockCompsLib InDetTrackSelectionToolLib RecoToolInterfaces
-   TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent TrigMultiVarHypoLib
-   TrigEgammaMatchingToolLib
-   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} )
+   LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools AthContainers EgammaAnalysisInterfacesLib InDetTrackSelectionToolLib LumiBlockCompsLib PATCoreLib RecoToolInterfaces TrigConfHLTData TrigDecisionToolLib TrigEgammaMatchingToolLib TrigMultiVarHypoLib xAODBase xAODCaloEvent xAODCaloRings xAODEgamma xAODPrimitives xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger
+   PRIVATE_LINK_LIBRARIES StoreGateLib TrigSteeringEvent )
 
 atlas_add_component( TrigEgammaEmulationTool
-    src/*.h src/*.cxx src/components/*.cxx
-    LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES}
-    AthContainers AsgTools xAODBase xAODCaloEvent xAODEgamma  xAODTracking
-    xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger PATCoreLib
-    ElectronPhotonSelectorToolsLib TrigDecisionToolLib TrigConfHLTData
-    TrigSteeringEvent TrigMultiVarHypoLib AthenaBaseComps StoreGateLib SGtests
-    GaudiKernel TrigEgammaMatchingToolLib LumiBlockCompsLib IsolationToolLib
-    TrigEgammaEmulationToolLib) 
-
+   src/*.cxx src/components/*.cxx
+   LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigEgammaEmulationToolLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/TrigEgamma*.py )
+atlas_install_python_modules( python/TrigEgamma*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/test*.py )
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py
index 32bad9c316e8..d6415bdd0b2a 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationEFConfig.py
@@ -1,12 +1,10 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon                                                 import CfgMgr
 from AthenaCommon.AppMgr                                          import ToolSvc
 from egammaRec.Factories                                          import ToolFactory
 #from TrigEgammaHypo.TrigEgammaPidTools                            import ElectronToolName
 #from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf  import AsgElectronIsEMSelector
 #from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping      import ElectronIsEMMap,electronPIDmenu
-from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig        import OutputLevel
 
 
 #***********************************************************************
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py
index 23961e8ee341..d1b7d61ec9f3 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationIsolationConfig.py
@@ -1,15 +1,12 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 def createIsoToolElectronSelector():
 
   from AthenaCommon.AppMgr import ToolSvc
-  from AthenaCommon import CfgMgr
-  from egammaRec.Factories                                          import ToolFactory
   from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaIsolationSelectorTool
   from TrigEgammaEmulationTool.TrigEgammaEmulationToolConfig        import OutputLevel
   
   from TrigEgammaHypo.TrigEFElectronHypoConfig import isolation_dict, caloisolation_dict
-  from TrigEgammaHypo.TrigEFPhotonHypoConfig   import TrigEFPhotonIsoCutDefs
 
   # Track isolation -- remember to add TrackIsolation as a property of the class
   from IsolationTool.IsolationToolConf import xAOD__TrackIsolationTool
@@ -37,7 +34,7 @@ def createIsoToolElectronSelector():
   for wp in isolations:
 
     caloiso = True if 'icalo' in wp else False
-    trkiso = True if not 'icalo' in wp else False
+    trkiso = True if 'icalo' not in wp else False
     
     tool = Trig__TrigEgammaIsolationSelectorTool( 'IsolationTool_'+wp,
                                           RelEtConeCut = caloisolation_dict[wp] if caloiso else [-1,-1,-1,-1,-1,-1],
@@ -52,10 +49,4 @@ def createIsoToolElectronSelector():
     ToolSvc += tool
     IsoToolSelectors.append( tool )
 
-    #Just to see WTF!
-    _toolname='IsolationTool_'+wp
-    RelEtConeCut = caloisolation_dict[wp] if caloiso else [-1,-1,-1,-1,-1,-1],
-    RelPtConeCut = isolation_dict[wp] if trkiso else [-1,-1,-1,-1,-1,-1],
-
   return IsoToolSelectors
-
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py
index 75e49f2fd786..0e04d23bd04f 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationL2Config.py
@@ -1,7 +1,6 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-
-from egammaRec.Factories  import ToolFactory,FcnWrapper,AlgFactory, getPropertyValue
+from egammaRec.Factories  import ToolFactory
 from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaL2CaloSelectorTool
 from TrigEgammaEmulationTool.TrigEgammaEmulationToolConf import Trig__TrigEgammaL2ElectronSelectorTool
 from AthenaCommon.SystemOfUnits                          import GeV
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py
index 2f8a02f37784..4f708648df04 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationPidToolsConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # TrigEgammaPidTools
 # Add all pid selectors to ToolSvc
@@ -11,18 +11,13 @@
 ###############################################################
 
 from AthenaCommon import CfgMgr
-from AthenaCommon.AppMgr import ToolSvc
 
 import PyUtils.RootUtils as ru
 ROOT = ru.import_root()
 import cppyy
 cppyy.loadDictionary('ElectronPhotonSelectorToolsDict')
-from ROOT import LikeEnum
-from ROOT import egammaPID
 
 from ElectronPhotonSelectorTools.TrigEGammaPIDdefs import SelectionDefElectron
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf import AsgElectronIsEMSelector
-from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping import ElectronIsEMMap,electronPIDmenu
 
 ###################################################################################################
 
@@ -44,7 +39,11 @@ def getEgammaIsEMSelectorCaloOnly( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_EFCalo_'+calibname)
     asg = CfgMgr.AsgElectronIsEMSelector(name)
-    asg.caloOnly=True; asg.isEMMask=mask[idx];  asg.ConfigFile=config; ToolSvc+=asg; asgTools.append(asg)
+    asg.caloOnly=True
+    asg.isEMMask=mask[idx]
+    asg.ConfigFile=config
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 
@@ -66,14 +65,17 @@ def getElectronIsEMSelector( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
     asg = CfgMgr.AsgElectronIsEMSelector(name)
-    asg.isEMMask=mask[idx];  asg.ConfigFile=config; ToolSvc+=asg; asgTools.append(asg)
+    asg.isEMMask=mask[idx]
+    asg.ConfigFile=config
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
 def getEgammaLikelihoodSelectorCaloOnly( calibPath ):
-  
+
   from AthenaCommon.AppMgr import ToolSvc
   calibname = calibPath.split('/')[-1]
   configList = [
@@ -86,14 +88,18 @@ def getEgammaLikelihoodSelectorCaloOnly( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_EFCalo_'+calibname)
     asg = CfgMgr.AsgElectronLikelihoodTool(name)
-    asg.usePVContainer = False;  asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
+    asg.usePVContainer = False
+    asg.ConfigFile=config
+    asg.caloOnly = True
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
 def getElectronLikelihoodSelector2015( calibPath ):
-  
+
   from AthenaCommon.AppMgr import ToolSvc
   calibname = calibPath.split('/')[-1]
   configList = [
@@ -106,14 +112,18 @@ def getElectronLikelihoodSelector2015( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
     asg = CfgMgr.AsgElectronLikelihoodTool(name)
-    asg.usePVContainer = False;  asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
+    asg.usePVContainer = False
+    asg.ConfigFile=config
+    asg.caloOnly = True
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170214/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217/
 # http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/GroupData/ElectronPhotonSelectorTools/trigger/rel21_20170217_mc16a/
 def getElectronLikelihoodSelectorNoD0( calibPath ):
-  
+
   from AthenaCommon.AppMgr import ToolSvc
   calibname = calibPath.split('/')[-1]
   configList = [
@@ -126,7 +136,11 @@ def getElectronLikelihoodSelectorNoD0( calibPath ):
   for idx, config in enumerate(configList):
     name = config.split('/')[-1].replace('.conf','_HLT_'+calibname)
     asg = CfgMgr.AsgElectronLikelihoodTool(name)
-    asg.usePVContainer = False;  asg.ConfigFile=config; asg.caloOnly = True; ToolSvc+=asg; asgTools.append(asg)
+    asg.usePVContainer = False
+    asg.ConfigFile=config
+    asg.caloOnly = True
+    ToolSvc+=asg
+    asgTools.append(asg)
   return asgTools
 
 #####################################################################################################
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py
index 9872f0545619..6e3ce5b1de4e 100644
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/python/TrigEgammaEmulationToolConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #********************************************************************************
 #
@@ -14,16 +14,11 @@ OutputLevel = 0
 from AthenaCommon.Logging import logging
 logger = logging.getLogger("TrigEgammaEmulationToolConfig")
 
-from AthenaCommon         import CfgMgr
 from AthenaCommon.AppMgr  import ToolSvc
-from egammaRec.Factories  import ToolFactory,FcnWrapper,AlgFactory, getPropertyValue
+from egammaRec.Factories  import ToolFactory
 import PyUtils.RootUtils as ru
 ROOT = ru.import_root()
-import cppyy
-
-# Following loads the online selectors
-from ElectronPhotonSelectorTools.ElectronPhotonSelectorToolsConf  import AsgElectronIsEMSelector
-from ElectronPhotonSelectorTools.ElectronIsEMSelectorMapping      import ElectronIsEMMap,electronPIDmenu
+import cppyy  # noqa: F401
 
 #*****************************************************************************
 #from TrigEgammaMatchingTool.TrigEgammaMatchingToolConf import Trig__TrigEgammaMatchingTool
-- 
GitLab


From f92822f01ef49900e1a731fe59f7080c951f8b1f Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Wed, 17 Jun 2020 16:32:10 +0200
Subject: [PATCH 2/3] TrigEgammaAnalysisTools: CMake cleanup

---
 .../TrigEgammaAnalysisTools/CMakeLists.txt    | 60 +++----------------
 1 file changed, 9 insertions(+), 51 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
index 03461a2f7523..3d6d3226ba7e 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/CMakeLists.txt
@@ -1,43 +1,8 @@
-################################################################################
-# Package: TrigEgammaAnalysisTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigEgammaAnalysisTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthToolSupport/AsgTools
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODEventInfo
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODPrimitives
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTrigCalo
-                          Event/xAOD/xAODTrigEgamma
-                          Event/xAOD/xAODTrigRinger
-                          Event/xAOD/xAODTrigger
-                          Event/xAOD/xAODTruth
-                          Event/xAOD/xAODMissingET
-                          Event/xAOD/xAODCaloRings
-                          LumiBlock/LumiBlockComps
-                          PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools
-                          Reconstruction/RecoTools/RecoToolInterfaces
-                          Reconstruction/egamma/egammaMVACalib
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigAnalysis/TrigEgammaMatchingTool
-                          Trigger/TrigAnalysis/TrigEgammaEmulationTool
-                          Trigger/TrigConfiguration/TrigConfHLTData
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigMonitoring/TrigHLTMonitoring
-                          PhysicsAnalysis/AnalysisCommon/PATCore
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaMonitoring
-                          Control/StoreGate
-                          GaudiKernel
-                          Trigger/TrigConfiguration/TrigConfxAOD )
 # External dependencies:
 find_package( Boost )
 find_package( ROOT COMPONENTS Core Hist Tree )
@@ -48,25 +13,18 @@ atlas_add_library( TrigEgammaAnalysisToolsLib
    PUBLIC_HEADERS TrigEgammaAnalysisTools
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma
-   xAODEventInfo xAODJet xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODMissingET
-   xAODTrigger xAODCaloRings xAODTruth LumiBlockCompsLib EgammaAnalysisInterfacesLib
-   RecoToolInterfaces egammaMVACalibAnalysisLib 
-   TrigEgammaMatchingToolLib TrigEgammaEmulationToolLib TrigConfHLTData
-   TrigSteeringEvent TrigHLTMonitoringLib PATCoreLib
-   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigConfxAODLib )
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools EgammaAnalysisInterfacesLib GaudiKernel LumiBlockCompsLib LumiBlockData PATCoreLib StoreGateLib TrigConfHLTData TrigDecisionToolLib TrigEgammaEmulationToolLib TrigEgammaMatchingToolLib TrigHLTMonitoringLib TrigNavigationLib xAODCaloEvent xAODCaloRings xAODEgamma xAODEventInfo xAODJet xAODMissingET xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigRinger xAODTrigger xAODTruth
+   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} AthenaMonitoringLib TrigConfxAODLib TrigSteeringEvent )
 
 atlas_add_component( TrigEgammaAnalysisTools
-                     src/*.h
-                     src/*.cxx
-                     src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ElectronPhotonSelectorToolsLib egammaMVACalibLib TrigDecisionToolLib AthenaBaseComps AthenaMonitoringLib StoreGateLib SGtests GaudiKernel TrigEgammaAnalysisToolsLib )
+   src/*.h
+   src/*.cxx
+   src/components/*.cxx
+   LINK_LIBRARIES AthenaBaseComps AthenaMonitoringLib TrigEgammaAnalysisToolsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/TrigEgamma*.py )
 atlas_install_joboptions( share/test*.py )
 atlas_install_generic( share/trigEgammaDQ.py share/get_trigEgammaDQ.sh 
-                        DESTINATION share
-                        EXECUTABLE )
-
+   DESTINATION share
+   EXECUTABLE )
-- 
GitLab


From 3063907e01e4242f9a25a2dc632cc12307fce0b0 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Wed, 17 Jun 2020 16:41:43 +0200
Subject: [PATCH 3/3] TrigEgammaMatchingTool: CMake cleanup

---
 .../TrigEgammaMatchingTool/CMakeLists.txt     | 45 +++----------------
 1 file changed, 6 insertions(+), 39 deletions(-)

diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt
index 79db3b49f8e7..ab41d94b4aaa 100644
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/CMakeLists.txt
@@ -1,52 +1,19 @@
-################################################################################
-# Package: TrigEgammaMatchingTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigEgammaMatchingTool )
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODEgamma
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTrigCalo
-                          Event/xAOD/xAODTrigEgamma
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODTau
-                          Event/xAOD/xAODTrigger
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          Trigger/TrigConfiguration/TrigConfHLTData
-                          Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigSteer/DecisionHandling
-                          PRIVATE
-                          Control/AthToolSupport/AsgTools
-                          Control/AthenaMonitoring
-                          Control/StoreGate
-                          Control/AthenaBaseComps
-                          GaudiKernel )
-
-
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( TrigEgammaMatchingToolLib
                    Root/*.cxx
                    PUBLIC_HEADERS TrigEgammaMatchingTool
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AsgTools xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma TrigConfHLTData 
-                   TrigSteeringEvent TrigDecisionToolLib DecisionHandlingLib AthenaMonitoringLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODMuon xAODTau xAODTrigger  )
-
+                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} TrigSteeringEvent xAODRootAccess
+                   LINK_LIBRARIES AsgTools DecisionHandlingLib GaudiKernel TrigConfHLTData TrigDecisionToolLib xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma xAODTrigger )
 
 atlas_add_component( TrigEgammaMatchingTool
                      src/*.h src/*.cxx src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma 
-                     TrigDecisionToolLib TrigConfHLTData TrigSteeringEvent AthenaBaseComps xAODMuon xAODTau xAODTrigger GaudiKernel 
-                     TrigEgammaMatchingToolLib AthenaMonitoringLib StoreGateLib)
-
-
+                     LINK_LIBRARIES AthenaBaseComps AthenaMonitoringLib GaudiKernel StoreGateLib TrigEgammaMatchingToolLib TriggerMatchingToolLib xAODMuon xAODTau )
-- 
GitLab