diff --git a/Reconstruction/MET/METReconstruction/CMakeLists.txt b/Reconstruction/MET/METReconstruction/CMakeLists.txt index 527a3287f84a5c0afef532e3e9fd096eaf9128d7..bc017c940cb126e97ce62d93a1666066b4ddf719 100644 --- a/Reconstruction/MET/METReconstruction/CMakeLists.txt +++ b/Reconstruction/MET/METReconstruction/CMakeLists.txt @@ -1,57 +1,19 @@ -################################################################################ -# Package: METReconstruction -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( METReconstruction ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthToolSupport/AsgTools - Event/xAOD/xAODCaloEvent - Event/xAOD/xAODEgamma - Event/xAOD/xAODJet - Event/xAOD/xAODMissingET - Event/xAOD/xAODMuon - Event/xAOD/xAODPFlow - Event/xAOD/xAODTracking - Event/xAOD/xAODTruth - GaudiKernel - Reconstruction/MET/METRecoInterface - PRIVATE - Calorimeter/CaloInterface - Calorimeter/CaloConditions - Event/FourMomUtils - InnerDetector/InDetRecTools/InDetTrackSelectionTool - InnerDetector/InDetRecTools/TrackVertexAssociationTool - Reconstruction/PFlow/PFlowUtils - Reconstruction/RecoTools/CaloClusterMatching - Reconstruction/RecoTools/RecoToolInterfaces - PhysicsAnalysis/AnalysisCommon/PATCore - Calorimeter/CaloEvent - Control/AthContainers - Control/AthenaBaseComps - Event/EventPrimitives - Event/xAOD/xAODTau - Generators/TruthUtils ) - # External dependencies: find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) include_directories(src) # Component(s) in the package: - atlas_add_component( METReconstruction Root/*.cxx src/*.cxx src/components/*.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils xAODCaloEvent xAODEgamma xAODJet xAODMissingET xAODMuon xAODPFlow xAODTracking xAODTruth GaudiKernel RecoToolInterfaces CaloEvent AthContainers AthenaBaseComps EventPrimitives xAODTau TruthUtils PATCoreLib METRecoInterface PFlowUtilsLib InDetTrackSelectionToolLib TrackVertexAssociationToolLib ) - -#atlas_add_dictionary( METReconstructionDict -# METReconstruction/selection-athena.xml -# INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} -# LINK_LIBRARIES ${ROOT_LIBRARIES} ) + LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils xAODCaloEvent xAODEgamma xAODJet xAODMissingET xAODMuon xAODPFlow xAODTracking xAODTruth GaudiKernel RecoToolInterfaces CaloEvent CaloConditions AthContainers AthenaBaseComps EventPrimitives xAODTau TruthUtils METRecoInterface PFlowUtilsLib StoreGateLib InDetTrackSelectionToolLib TrackVertexAssociationToolLib ) # Install files from the package: -atlas_install_python_modules( python/*.py python/LegacyRunII/*.py) +atlas_install_python_modules( python/*.py python/LegacyRunII/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) diff --git a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig.py b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig.py index 020317037f81b29a65488912cab32da3cb77d4c8..5dc91c5fb16a796938e7f6f73b0b7ab36287e247 100644 --- a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig.py +++ b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig.py @@ -47,7 +47,7 @@ def getAssociator(config,suffix,doPFlow=False, if doModClus: modLCClus = modClusColls['LC{0}Clusters'.format(modConstKey)] modEMClus = modClusColls['EM{0}Clusters'.format(modConstKey)] - from AthenaCommon.AppMgr import ToolSvc + # Construct tool and set defaults for case-specific configuration if config.objType == 'Ele': from ROOT import met @@ -107,7 +107,7 @@ def getAssociator(config,suffix,doPFlow=False, class METAssocConfig: def outputCollections(self): - if doTruth: return 'MET_Core_'+self.suffix + if self.doTruth: return 'MET_Core_'+self.suffix else: return 'MET_Core_'+self.suffix,'MET_Reference_'+self.suffix # def outputMap(self): @@ -160,7 +160,7 @@ class METAssocConfig: self.modConstKey=modConstKey_tmp self.modClusColls=modClusColls_tmp self.doTruth = doTruth - from AthenaCommon.AppMgr import ToolSvc + if trksel: self.trkseltool = trksel else: diff --git a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig_readAOD.py b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig_readAOD.py index 1b5c3c9ca08f446cd6fc3087de32692537ce3a83..0257b283e2ee31f1c069067be3046c8872dc3ca0 100644 --- a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig_readAOD.py +++ b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METAssocConfig_readAOD.py @@ -64,7 +64,7 @@ def getAssociator(config,suffix,doPFlow=False, import cppyy try: cppyy.load_library('libMETReconstructionDict') - except: pass + except Exception: pass from AthenaCommon.AppMgr import ToolSvc # Construct tool and set defaults for case-specific configuration @@ -130,7 +130,7 @@ def getAssociator(config,suffix,doPFlow=False, class METAssocConfig: def outputCollections(self): - if doTruth: return 'MET_Core_'+self.suffix + if self.doTruth: return 'MET_Core_'+self.suffix else: return 'MET_Core_'+self.suffix,'MET_Reference_'+self.suffix # def outputMap(self): @@ -230,7 +230,6 @@ def getMETAssocAlg(algName='METAssociation',configs={},tools=[]): assocTools.append(assoctool) metFlags.METAssocTools()[key] = assoctool - from AthenaCommon.AppMgr import ToolSvc for tool in assocTools: print (prefix, 'Added METAssocTool \''+tool.name()+'\' to alg '+algName) diff --git a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Calo.py b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Calo.py index b5be96d90cd5b18678a4eac603a9053ae41ce2c4..3db11fd1b2060b0d8332c102442a2a8f0f85ccee 100644 --- a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Calo.py +++ b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Calo.py @@ -1,7 +1,7 @@ -# 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 METReconstruction.METRecoFlags import metFlags -from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig +from METReconstruction.METRecoConfig import BuildConfig, METConfig ############################################################################ # EMTopo diff --git a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_PFlow.py b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_PFlow.py index 7cadd53cb3f6e8994a1d0e804de9fba6d55eb286..2cf9cb76332249f3042ef25bfa418c3d7932dfe6 100644 --- a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_PFlow.py +++ b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_PFlow.py @@ -1,7 +1,7 @@ # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration from METReconstruction.METRecoFlags import metFlags -from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig +from METReconstruction.METRecoConfig import BuildConfig, METConfig ############################################################################ # Simple PFlow diff --git a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Truth.py b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Truth.py index 8f8865be61da7d461c79e461024803467c8570b2..911b7acc5cd1056acf2b0c3f06105e2f69bdf8e3 100644 --- a/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Truth.py +++ b/Reconstruction/MET/METReconstruction/python/LegacyRunII/METConfig_Truth.py @@ -1,8 +1,8 @@ -# 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 METReconstruction.METRecoFlags import metFlags from METReconstruction.METRecoConfig import BuildConfig, METConfig -from METReconstruction.METAssocConfig import METAssocConfig, AssocConfig +#from METReconstruction.METAssocConfig import METAssocConfig, AssocConfig ## Simple truth terms