From a87c89311d2b171696254181eaff21ee9f9c69eb Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Thu, 9 Jul 2020 10:44:16 +0200 Subject: [PATCH] TrigL2LongLivedParticles: Package cleanup - remove ROOT and CLHEP dependency - delete obsolete job options - cleanup cmake configuration - enable flake8 --- .../TrigL2LongLivedParticles/CMakeLists.txt | 38 ++----------------- .../python/TrigL2LongLivedParticlesConfig.py | 5 +-- .../share/MuClusterJobOption.py | 14 ------- .../share/jobOfragment_TrigMuCluster.py | 13 ------- .../src/MuonCluster.cxx | 4 +- .../src/MuonClusterIsolation.cxx | 6 +-- 6 files changed, 7 insertions(+), 73 deletions(-) delete mode 100644 Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py delete mode 100644 Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt index cfb045f36ab7..467995895baa 100644 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/CMakeLists.txt @@ -1,45 +1,13 @@ -################################################################################ -# Package: TrigL2LongLivedParticles -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TrigL2LongLivedParticles ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Event/xAOD/xAODTrigger - Trigger/TrigEvent/TrigMuonEvent - Trigger/TrigSteer/TrigInterfaces - Trigger/TrigT1/TrigT1Interfaces - Trigger/TrigTools/TrigTimeAlgs - PRIVATE - Calorimeter/CaloEvent - Control/AthContainers - Control/CxxUtils - Event/FourMomUtils - Event/xAOD/xAODJet - Event/xAOD/xAODTracking - GaudiKernel - Reconstruction/Jet/JetEvent - Tools/PathResolver - Trigger/TrigEvent/TrigCaloEvent - Trigger/TrigEvent/TrigNavigation - Trigger/TrigEvent/TrigParticle - Trigger/TrigEvent/TrigSteeringEvent ) - -# External dependencies: -find_package( CLHEP ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint ) - # Component(s) in the package: atlas_add_component( TrigL2LongLivedParticles src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} xAODTrigger TrigMuonEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib CaloEvent AthContainers CxxUtils FourMomUtils xAODJet xAODTracking GaudiKernel JetEvent PathResolver TrigCaloEvent TrigNavigationLib TrigParticle TrigSteeringEvent ) + LINK_LIBRARIES AthContainers CaloEvent CxxUtils FourMomUtils GaudiKernel JetEvent PathResolver TrigInterfacesLib TrigNavigationLib TrigParticle TrigSteeringEvent TrigT1Interfaces TrigTimeAlgsLib xAODJet xAODTracking xAODTrigger ) # Install files from the package: -atlas_install_headers( TrigL2LongLivedParticles ) -atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) - +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 ) diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py index 46f59b7efee1..af66f7f55363 100755 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.py +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/python/TrigL2LongLivedParticlesConfig.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 from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import MuonCluster from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import MuonClusterIsolation @@ -6,9 +6,6 @@ from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import TrigMuonJetFex from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import TrigJetSplitter from TrigL2LongLivedParticles.TrigL2LongLivedParticlesConf import TrigBHremoval -from AthenaCommon.GlobalFlags import globalflags -from AthenaCommon.AppMgr import ServiceMgr - def getJetSplitterInstance( instance, logratio, pufixlogratio ): diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py deleted file mode 100644 index e7eb759de9bb..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/MuClusterJobOption.py +++ /dev/null @@ -1,14 +0,0 @@ -#---------------------------------------------------- -# MuCluster options -#---------------------------------------------------- -# Timing service libs. -theApp.Dlls += [ "TrigTimeAlgs" ] -theApp.ExtSvc += [ "TrigTimeSvc" ] - -# Algorithm -theApp.Dlls += [ "TrigMuCluster" ] - - -# Timer service conf. -TrigTimerSvc = Service ( "TrigTimerSvc" ) -TrigTimerSvc.OutputLevel = 3 diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py deleted file mode 100644 index 54aee5fa6386..000000000000 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/share/jobOfragment_TrigMuCluster.py +++ /dev/null @@ -1,13 +0,0 @@ -#---------------------------------------------------- -# MuCluster options -#---------------------------------------------------- -# Timing service libs. -theApp.Dlls += [ "TrigTimeAlgs" ] -theApp.ExtSvc += [ "TrigTimeSvc" ] - -# Algorithm -theApp.Dlls += [ "TrigiMuCluster" ] - -# Timer service conf. -TrigTimerSvc = Service ( "TrigTimerSvc" ) -TrigTimerSvc.OutputLevel = 3 diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx index 1c7a2cf2ab78..3e6056566817 100644 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonCluster.cxx @@ -1,16 +1,14 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* MuonCluster.cxx Muon cluster finding, creates an RoI cluster for track finding */ -#include "TMath.h" #include <cmath> #include <algorithm> #include <sstream> -#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/ITHistSvc.h" #include "PathResolver/PathResolver.h" #include "TrigInterfaces/FexAlgo.h" diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx index d8d08fc90254..f8c9b7455403 100644 --- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx +++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/src/MuonClusterIsolation.cxx @@ -1,15 +1,13 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /* MuonClusterIsolation.cxx */ -#include "TMath.h" #include <cmath> #include <algorithm> #include <sstream> -#include "CLHEP/Units/SystemOfUnits.h" #include "GaudiKernel/ITHistSvc.h" #include "PathResolver/PathResolver.h" #include "TrigInterfaces/FexAlgo.h" @@ -308,7 +306,7 @@ HLT::ErrorCode MuonClusterIsolation::hltExecute(std::vector<std::vector<HLT::Tri for(; track !=lasttrack; track++ ) { - float pT = fabs(TMath::Sin((*track)->theta())/(*track)->qOverP()); + float pT = fabs(std::sin((*track)->theta())/(*track)->qOverP()); if ( pT <= m_PtMinID) continue; double eta = (*track)->eta(); -- GitLab