From 54757c3fb9078abef7377b0e005a1af1cb38367e Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Wed, 14 Oct 2020 17:44:29 +0200 Subject: [PATCH 1/5] egammaConditions: cmake cleanup, remove CLHEP dependency Cleanup cmake configuration and replace CLHEP "units" dependency with GaudiKernel. --- .../egamma/egammaConditions/CMakeLists.txt | 21 +++++-------------- .../src/EMClusterEtaErrorsMatrix.cxx | 5 ++--- .../src/EMClusterEtaPosErrorsMatrix.cxx | 6 ++---- .../src/EMClusterPhiErrorsMatrix.cxx | 5 ++--- 4 files changed, 11 insertions(+), 26 deletions(-) diff --git a/Reconstruction/egamma/egammaConditions/CMakeLists.txt b/Reconstruction/egamma/egammaConditions/CMakeLists.txt index 993fabd4c138..fc4a36eb5ca4 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 d33999fce88d..2bd9546ad279 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 314fa24bfb84..c35ea2ba0fce 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 3e2ebea20aa0..b8ea095b8041 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*/ -- GitLab From 1a9bb29224fca899966b93ab4178924584de8cb2 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Wed, 14 Oct 2020 17:51:50 +0200 Subject: [PATCH 2/5] egammaEvent: cmake cleanup --- .../egamma/egammaEvent/CMakeLists.txt | 50 ++++--------------- 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/Reconstruction/egamma/egammaEvent/CMakeLists.txt b/Reconstruction/egamma/egammaEvent/CMakeLists.txt index 20fce4fb7bd2..cba9ba659853 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 ) -- GitLab From 63a6e4fe3fcb3df21f677f6d5fc4ed9ead8789ab Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Wed, 14 Oct 2020 18:21:29 +0200 Subject: [PATCH 3/5] egammaMVACalib: cmake cleanup, enable flake8 --- .../egamma/egammaMVACalib/CMakeLists.txt | 31 ++++--------------- .../python/TrigEgammaMVACalibFactories.py | 4 +-- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt b/Reconstruction/egamma/egammaMVACalib/CMakeLists.txt index 44b718d49f1f..b072f20a3f31 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 5f6d8543555d..19598f2f59ce 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 -- GitLab From 43d94182712d451d5dc6be5c7246690f5c9de83a Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Wed, 14 Oct 2020 18:22:01 +0200 Subject: [PATCH 4/5] egammaPerformance: cmake cleanup, enable flake8 --- .../egamma/egammaPerformance/CMakeLists.txt | 22 +---- .../egammaPerformance/python/egammaMonTool.py | 79 +++++++---------- .../python/egammaMonToolBase.py | 88 ++++++++----------- 3 files changed, 75 insertions(+), 114 deletions(-) diff --git a/Reconstruction/egamma/egammaPerformance/CMakeLists.txt b/Reconstruction/egamma/egammaPerformance/CMakeLists.txt index c0fac89a050c..8c0058e612ee 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 93555f1a9b99..efb07feaa098 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 9869530d436a..994bfb71a88c 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 -- GitLab From 58796f29524bf40cd06628421c85275ebdd25456 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Wed, 14 Oct 2020 18:22:35 +0200 Subject: [PATCH 5/5] egamma: cmake cleanup --- .../EgammaPhysValMonitoring/CMakeLists.txt | 23 ++------------- .../egamma/egammaEventTPCnv/CMakeLists.txt | 29 ++++--------------- .../egammaLayerRecalibTool/CMakeLists.txt | 22 +++----------- .../egamma/egammaRecEvent/CMakeLists.txt | 16 +--------- .../egamma/egammaValidation/CMakeLists.txt | 25 ++-------------- 5 files changed, 15 insertions(+), 100 deletions(-) diff --git a/Reconstruction/egamma/EgammaPhysValMonitoring/CMakeLists.txt b/Reconstruction/egamma/EgammaPhysValMonitoring/CMakeLists.txt index 06d15e03acb4..4450bf72fe24 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/egammaEventTPCnv/CMakeLists.txt b/Reconstruction/egamma/egammaEventTPCnv/CMakeLists.txt index fed4ac8e41e3..e5682caa5849 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 59e3a0138d56..4b8df1bb0997 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/egammaRecEvent/CMakeLists.txt b/Reconstruction/egamma/egammaRecEvent/CMakeLists.txt index a3ade5b0941b..a859e062fb47 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 986fd16c7401..cb8720d005d0 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 ) -- GitLab