diff --git a/Reconstruction/HeavyIonRec/HIJetRec/CMakeLists.txt b/Reconstruction/HeavyIonRec/HIJetRec/CMakeLists.txt
index 5cc125d1bad19068b0652c33738aabe4193bb941..0f6fbbb31b319bbab257654cd2f20e0a69c4d704 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/CMakeLists.txt
+++ b/Reconstruction/HeavyIonRec/HIJetRec/CMakeLists.txt
@@ -1,50 +1,23 @@
-# $Id: CMakeLists.txt 804522 2017-05-09 17:32:26Z angerami $
-################################################################################
-# Package: HIJetRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HIJetRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-  PUBLIC
-  Control/AthToolSupport/AsgTools
-  Event/FourMomUtils
-  Event/xAOD/xAODBase
-  Event/xAOD/xAODCaloEvent
-  Event/xAOD/xAODHIEvent
-  Event/xAOD/xAODJet
-  Event/xAOD/xAODEventInfo
-  PhysicsAnalysis/HeavyIonPhys/HIEventUtils
-  Reconstruction/Jet/JetInterface
-  Reconstruction/Jet/JetRec
-  PRIVATE
-  Control/CxxUtils
-  Event/xAOD/xAODCore
-  Tools/PathResolver
-  Control/Navigation
-  Control/AthenaBaseComps
-  Event/NavFourMom
-  Calorimeter/CaloEvent
-  Calorimeter/CaloInterface
-  Calorimeter/CaloRec
-  Calorimeter/CaloUtils
-  GaudiKernel )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core MathCore Hist Physics )
 
 # Component(s) in the package:
+atlas_add_library( HIJetRecLib
+                   HIJetRec/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS HIJetRec
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools FourMomUtils HIEventUtilsLib xAODBase xAODCaloEvent xAODHIEvent xAODJet )
+
 atlas_add_component( HIJetRec
-  HIJetRec/*.h Root/*.cxx src/*.h src/*.cxx src/components/*.cxx
-  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-  LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloRecLib CaloUtilsLib
-  AsgTools AthenaBaseComps Navigation FourMomUtils NavFourMom xAODBase
-  xAODCaloEvent xAODHIEvent xAODJet GaudiKernel HIEventUtilsLib
-  JetInterface JetRecLib CxxUtils xAODCore PathResolver )
+                     Root/*.cxx src/*.h src/*.cxx src/components/*.cxx
+                     LINK_LIBRARIES AthenaBaseComps CaloEvent CaloInterfaceLib CaloRecLib CaloUtilsLib CxxUtils HIJetRecLib JetInterface JetRecLib NavFourMom Navigation PathResolver StoreGateLib xAODCore xAODEventInfo xAODTracking )
 
 # Install files from the package:
-atlas_install_headers( HIJetRec )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx
index 555e6036eff2215d5ccea43cc13bfcfa447ef053..6c3e4f1a3bf7138ff47257786131de027c226c90 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIEventShapeJetIteration.h"
+#include "HIEventShapeJetIteration.h"
 #include "xAODHIEvent/HIEventShape.h"
 #include "xAODHIEvent/HIEventShapeAuxContainer.h"
 #include "HIEventUtils/HIEventShapeMap.h"
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIEventShapeJetIteration.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIEventShapeJetIteration.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIEventShapeJetIteration.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterIndexAssociationTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterIndexAssociationTool.cxx
index bc57d1213fdcc339d0437e9e7aca878229131599..eaf5fd53452617ed4c434b3eba86b4269827ff06 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterIndexAssociationTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterIndexAssociationTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIJetClusterIndexAssociationTool.h"
+#include "HIJetClusterIndexAssociationTool.h"
 #include "HIEventUtils/HIEventDefs.h"
 #include <iomanip>
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterIndexAssociationTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterIndexAssociationTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterIndexAssociationTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterIndexAssociationTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx
index 8349780f227b04182dd990448a362ac1a3d491e1..bc4fae0c1f23b241e12bef5da1302372e487b217 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIJetClusterSubtractorTool.h"
+#include "HIJetClusterSubtractorTool.h"
 #include "xAODCaloEvent/CaloCluster.h"
 #include "xAODEventInfo/EventInfo.h"
 #include "HIEventUtils/HIEventShapeIndex.h"
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterSubtractorTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterSubtractorTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentModifierTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentModifierTool.cxx
index 7230177af05af31871d3a574b77ba357eab772ca..42848551542859073c24ff846a1821752edb52aa 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentModifierTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentModifierTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIJetConstituentModifierTool.h"
+#include "HIJetConstituentModifierTool.h"
 #include "HIJetRec/HIJetRecDefs.h"
 #include "xAODJet/JetConstituentVector.h"
 #include "xAODCaloEvent/CaloClusterContainer.h"
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentModifierTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentModifierTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentModifierTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentModifierTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx
index f8dc7966ce4030afcede4eb0934907909665d31e..98c4cf47c57a545a031b403b5de79cc3392e015b 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIJetConstituentSubtractionTool.h"
+#include "HIJetConstituentSubtractionTool.h"
 #include "HIJetRec/HIJetRecDefs.h"
 #include "xAODJet/JetConstituentVector.h"
 #include "xAODHIEvent/HIEventShapeContainer.h"
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentSubtractionTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentSubtractionTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetConstituentSubtractionTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDRAssociationTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDRAssociationTool.cxx
index b7474c71224c6229f436ad3557c5f52a7b952533..c3448243fb7fbe23d3e148dd442bcce400e0b707 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDRAssociationTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDRAssociationTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIJetDRAssociationTool.h"
+#include "HIJetDRAssociationTool.h"
 #include <iomanip>
 
 //**********************************************************************
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDRAssociationTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDRAssociationTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDRAssociationTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDRAssociationTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDiscriminatorTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDiscriminatorTool.cxx
index 5047bf2a50bdaedab81ec0b0a764d611b41d6191..65eeba287f088a272b22d33e45e72631cb947d8f 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDiscriminatorTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDiscriminatorTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIJetDiscriminatorTool.h"
+#include "HIJetDiscriminatorTool.h"
 
 namespace{
   struct  Discrim{
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDiscriminatorTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDiscriminatorTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDiscriminatorTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetDiscriminatorTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx
index 72cd911bc7a18d9e444a7ed15d08b372e1aa7981..c1cced1abc24f6136d2588a5c9d0ac4583cf8926 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.cxx
@@ -3,7 +3,7 @@
 */
 #include "StoreGate/WriteDecorHandle.h"
 
-#include "HIJetRec/HIJetMaxOverMeanTool.h"
+#include "HIJetMaxOverMeanTool.h"
 
 HIJetMaxOverMeanTool::HIJetMaxOverMeanTool(const std::string& t) : asg::AsgTool(t)
 {
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetMaxOverMeanTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetMaxOverMeanTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx
index 4195a81f156e7d89463b824c1efb8b0bf7c33012..f11df4e4f6c067cc1295b9afeb9097c2a908aee4 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.cxx
@@ -4,7 +4,7 @@
 
 #include "StoreGate/WriteDecorHandle.h"
 
-#include "HIJetRec/HIJetSignificanceTool.h"
+#include "HIJetSignificanceTool.h"
 #include "xAODCaloEvent/CaloCluster.h"
 
 HIJetSignificanceTool::HIJetSignificanceTool(const std::string& name)
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetSignificanceTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetSignificanceTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIUEModulatorTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIUEModulatorTool.cxx
index 9a7d3803c72d46bc47009d46ee8d418e0043a3c4..3033c69287ccb38c37e4f9d40397de9e31b18e15 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIUEModulatorTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIUEModulatorTool.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "HIJetRec/HIUEModulatorTool.h"
+#include "HIUEModulatorTool.h"
 #include "CxxUtils/sincos.h"
 #include "xAODHIEvent/HIEventShapeContainer.h"
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIUEModulatorTool.h b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIUEModulatorTool.h
similarity index 100%
rename from Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIUEModulatorTool.h
rename to Reconstruction/HeavyIonRec/HIJetRec/Root/HIUEModulatorTool.h
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecTools.py b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecTools.py
index 22597feaa019599645f09ab4c3afba0a91b2bb27..44b0b4b84ae279e55219076906de8637ec70266d 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecTools.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/python/HIJetRecTools.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 HIJetRec.HIJetRecFlags import HIJetFlags
 from JetRec.JetRecFlags import jetFlags
@@ -10,10 +10,7 @@ import AthenaCommon.SystemOfUnits as Units
 from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
 from JetRec.JetRecConf import PseudoJetAlgorithm
 from JetRecTools.JetRecToolsConf import JetTrackSelectionTool
-from JetRecTools.JetRecToolsConf import SimpleJetTrackSelectionTool
 from JetRecTools.JetRecToolsConf import TrackVertexAssociationTool
-from JetMomentTools.JetMomentToolsConf import JetCaloQualityTool
-from JetMomentTools.JetMomentToolsConf import JetCaloCellQualityTool
 
 #select the tracks
 #if jetFlags.Enabled() : HIJetFlags.UseHITracks.set_Value_and_Lock(False)
@@ -170,11 +167,11 @@ if HIJetFlags.ApplyEtaJESCalibration() :
     from JetCalibTools.JetCalibToolsConf import JetCalibrationTool
     for R in HIJetFlags.AntiKtRValues() :
         #non existing calibration for R=1.0 jets, R=0.4 jet calibration to be used (GetHIModifierList)
-        if int(10*R) is 10 : continue
+        if int(10*R) == 10 : continue
         calib_seq='EtaJES'
         JES_is_data=True
         if jetFlags.useTruth(): JES_is_data=False
-        elif R is 0.4 : calib_seq='EtaJES_Insitu' #only do in situ for R=0.4 jets in data
+        elif R == 0.4 : calib_seq='EtaJES_Insitu' #only do in situ for R=0.4 jets in data
         #elif R is 1.0 : R = 0.4
         calib_tool=JetCalibrationTool('HICalibToolR%d' % int(10*R),JetCollection='AntiKt%dHI' % int(10*R),
                                       ConfigFile='JES_MC15c_HI_Nov2016.config',CalibSequence=calib_seq,IsData=JES_is_data)
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py b/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py
index 4a85a2d8b85b5d57b92e98d44c056b4e7cd397d6..bf2e2d09812ee3d1aaf9d74681c6bb2a484ab378 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py
+++ b/Reconstruction/HeavyIonRec/HIJetRec/python/SubtractedCellGetter.py
@@ -1,10 +1,9 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # specifies Calo cell making
 # so far only handle the RawChannel->CaloCell step
 # not all possibility of CaloCellMaker_jobOptions.py integrated yet
 
-from AthenaCommon.Constants import *
 from RecExConfig.Configured import Configured
 
 class SubtractedCellGetter ( Configured )  :
@@ -43,7 +42,7 @@ class SubtractedCellGetter ( Configured )  :
         cellMaker.CaloCellMakerToolNames = [cellCopyTool,cellSubtrTool,cellFinalizerTool]
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        topSequence+=cellMaker;
+        topSequence+=cellMaker
         
         return True
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx b/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx
index e34a0313363b73fcf0f14d017830f3b1ec06fc5b..d5179ceab2dc78ba8ce5c378807122279dfe1449 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/src/components/HIJetRec_entries.cxx
@@ -5,15 +5,15 @@
 #include "../HISubtractedCellMakerTool.h"
 #endif
 
-#include "HIJetRec/HIEventShapeJetIteration.h"
-#include "HIJetRec/HIJetClusterSubtractorTool.h"
-#include "HIJetRec/HIJetConstituentSubtractionTool.h"
-#include "HIJetRec/HIJetConstituentModifierTool.h"
-#include "HIJetRec/HIJetDRAssociationTool.h"
-#include "HIJetRec/HIJetMaxOverMeanTool.h"
-#include "HIJetRec/HIJetDiscriminatorTool.h"
-#include "HIJetRec/HIJetSignificanceTool.h"
-#include "HIJetRec/HIUEModulatorTool.h"
+#include "../../Root/HIEventShapeJetIteration.h"
+#include "../../Root/HIJetClusterSubtractorTool.h"
+#include "../../Root/HIJetConstituentSubtractionTool.h"
+#include "../../Root/HIJetConstituentModifierTool.h"
+#include "../../Root/HIJetDRAssociationTool.h"
+#include "../../Root/HIJetMaxOverMeanTool.h"
+#include "../../Root/HIJetDiscriminatorTool.h"
+#include "../../Root/HIJetSignificanceTool.h"
+#include "../../Root/HIUEModulatorTool.h"
 
 #ifndef XAOD_ANALYSIS
 DECLARE_COMPONENT( HIClusterMaker )
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigHIRec/CMakeLists.txt
index df67c33e97f8c1d71ef396612fe02c42798bd308..5f6b0d2222a8fb3c6cd3181849dec9443e30144d 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigHIRec/CMakeLists.txt
@@ -1,41 +1,13 @@
-################################################################################
-# Package: TrigHIRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrigHIRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Trigger/TrigEvent/TrigCaloEvent
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloUtils
-                          Control/AthToolSupport/AsgTools
-                          Control/Navigation
-                          Control/StoreGate
-                          Event/NavFourMom
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODCore
-                          Event/xAOD/xAODHIEvent
-                          Event/xAOD/xAODJet
-                          PhysicsAnalysis/HeavyIonPhys/HIEventUtils
-                          Reconstruction/HeavyIonRec/HIGlobal
-                          Reconstruction/HeavyIonRec/HIJetRec
-                          Reconstruction/Jet/JetInterface
-                          Trigger/TrigSteer/TrigInterfaces )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_component( TrigHIRec
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel TrigCaloEvent CaloEvent CaloUtilsLib AsgTools Navigation StoreGateLib SGtests NavFourMom xAODCaloEvent xAODCore xAODHIEvent xAODJet HIEventUtilsLib JetInterface TrigInterfacesLib )
+                     LINK_LIBRARIES AsgTools CaloEvent CaloUtilsLib GaudiKernel HIEventUtilsLib HIGlobalLib HIJetRecLib JetInterface NavFourMom Navigation TrigInterfacesLib TrigParticle xAODCaloEvent xAODCore xAODHIEvent xAODJet )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-extensions=ATL900,ATL901 )
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHICaloRec.py b/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHICaloRec.py
index 4b8d457eebc4bb97b57f4f8a7c9108e0edf4d181..59670d3065665a5808d25751e869afc4e450cc0f 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHICaloRec.py
+++ b/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHICaloRec.py
@@ -1,13 +1,11 @@
-# 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.Constants import INFO,ERROR,FALSE,TRUE,DEBUG,VERBOSE
-from AthenaCommon.SystemOfUnits import GeV,MeV,deg
-from AthenaCommon.Logging import logging
+from AthenaCommon.SystemOfUnits import MeV
+from AthenaCommon.Constants import ERROR
 
 from TrigHIRec.TrigHIRecConf import TrigHIClusterMaker
 from TrigHIRec.TrigHIRecConf import TrigHIEventShapeMaker
 
-from TrigCaloRec.TrigCaloRecConf import TrigCaloTowerMaker
 from TrigCaloRec.TrigCaloRecConfig  import TrigCaloTowerMakerBase
 
 class TrigCaloTowerMaker_hijet (TrigCaloTowerMakerBase):
@@ -18,7 +16,7 @@ class TrigCaloTowerMaker_hijet (TrigCaloTowerMakerBase):
         #input to  TileTowerBuilder:  cells in TILE
         try:
             from TileRecUtils.TileRecUtilsConf import TileTowerBuilderTool
-        except:
+        except Exception:
             #mlog.error("could not get handle to TileTowerBuilderTool Quit")
             #print traceback.format_exc()
             return False
@@ -26,13 +24,13 @@ class TrigCaloTowerMaker_hijet (TrigCaloTowerMakerBase):
         # input to LArTowerBuilder:  cells in LArEM and LARHEC 
         try:
             from LArRecUtils.LArRecUtilsConf import LArTowerBuilderTool,LArFCalTowerBuilderTool
-        except:
+        except Exception:
             #mlog.error("TrigCaloTowerMaker: could not get handle to LArTowerBuilderTool or/and LArFCalTowerBuilderTool. Quit")
             #print traceback.format_exc()
             return False
 
 
-        larcmbtwrbldr = LArTowerBuilderTool("LArCmbTwrBldr",
+        larcmbtwrbldr = LArTowerBuilderTool("LArCmbTwrBldr",   # noqa: ATL900  (assigning OutputLevel)
                                             CellContainerName = "AllCalo",
                                             IncludedCalos     = [ "LAREM", "LARHEC" ],
                                             OutputLevel=ERROR
@@ -42,7 +40,7 @@ class TrigCaloTowerMaker_hijet (TrigCaloTowerMakerBase):
         #larcmbtwrbldr.IncludedCalos     = [ "LAREM", "LARHEC" ]
         #larcmbtwrbldr.OutputLevel=ERROR
 
-        fcalcmbtwrbldr = LArFCalTowerBuilderTool("FCalCmbTwrBldr",
+        fcalcmbtwrbldr = LArFCalTowerBuilderTool("FCalCmbTwrBldr",   # noqa: ATL900  (assigning OutputLevel)
                                                  CellContainerName = "AllCalo",
                                                  MinimumEt         = 0.*MeV,
                                                  OutputLevel=ERROR
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py b/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py
index 41f793cac704ff2de0869a6a89bfa6898bdebb37..73381cc599006f2efaa9f3ba95208d305188f42c 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py
+++ b/Trigger/TrigAlgorithms/TrigHIRec/python/TrigHLTHIJetRecConfig.py
@@ -1,31 +1,9 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from __future__ import print_function
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.SystemOfUnits import GeV
-from AthenaCommon.SystemOfUnits import MeV
-
-from JetRec.JetRecConf import JetRecTool
-from JetRec.JetRecConf import (JetFromPseudojet,
-                               JetFinder)
-from JetRec.JetRecFlags import jetFlags
-from JetRec.JetRecStandard import jtm
-from JetRec.JetRecCalibrationFinder import jrcf
-
-
-from GaudiKernel.Constants import (DEBUG,
-                                   INFO,
-                                   ERROR)
 
 from HIJetRec.HIJetRecFlags import HIJetFlags
-#from HIJetRec.HIJetRecUtils import GetNullModulator
-from HIGlobal.HIGlobalFlags import jobproperties
-
-#from TrigHLTJetRec import TrigHLTJetRecConf
-#from TrigHLTJetRecConf import TrigHLTJetRecFromCluster
 from TrigHLTJetRec.TrigHLTJetRecConf import TrigHLTJetRecFromCluster
-from TrigHLTJetRec.TrigHLTJetRecConf import TriggerPseudoJetGetter
-
 
 #def _getTriggerHIPseudoJetGetter(hicluster_name):
 #    # Build a new list of jet inputs. original: mygetters = [jtm.lcget]
@@ -320,7 +298,6 @@ class TrigHLTHIJetRecFromHICluster(TrigHLTJetRecFromCluster):
           #self.inputTool = inputTool 
           #self.doInputs = False
           self.jetBuildTool = jetBuildTool 
-          print (jetBuildTool)
        else :
           from  TrigHLTJetRec.TrigHLTJetRecConfig import _getJetBuildTool
           self.jetBuildTool = _getJetBuildTool(