diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt
index e8b2857f8bb11fecb6cca5421cdc75294f2cc4ca..aacb71eaac743229e5f8e4aca27fbb10c7398260 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/CMakeLists.txt
@@ -9,4 +9,4 @@ atlas_add_component( DerivationFrameworkCalo
                      LINK_LIBRARIES LINK_LIBRARIES AthenaBaseComps CaloClusterCorrectionLib CaloEvent CaloGeoHelpers CaloIdentifier CaloUtilsLib DerivationFrameworkInterfaces ExpressionEvaluationLib FourMomUtils GaudiKernel LArCablingLib StoreGateLib xAODBase xAODCaloEvent xAODEgamma xAODJet xAODMuon xAODTau )
 
 # 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/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/python/CaloCellDFGetter.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/python/CaloCellDFGetter.py
index 4f03e5e967c367712868318057f4483afbe84075..13e4b469736671e1283780005013c233ca74b0c8 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/python/CaloCellDFGetter.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/python/CaloCellDFGetter.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
 
 #==========================================================================================
 #This is basically based in the  Calorimeter/CaloRec/python/CaloCellAODGetter.py (used for ESD to AOD)
@@ -38,8 +38,6 @@
 # to write extra cell for e/gamma
 #==========================================================================================
 
-from AthenaCommon.Constants import *  
-from RecExConfig.Configured import Configured
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence=AlgSequence()
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt
index cd274a1e3c6524b2412345249a879dd59c8936f4..7f742b3ecd24355d228640d7e58561fe5a54d7f2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/CMakeLists.txt
@@ -9,6 +9,6 @@ atlas_add_component( DerivationFrameworkCore
                      LINK_LIBRARIES AsgAnalysisInterfaces AthAnalysisBaseCompsLib AthContainers AthLinks AthenaKernel DerivationFrameworkInterfaces GoodRunsListsLib PathResolver SGTools TrigDecisionToolLib TriggerMatchingToolLib xAODBase xAODEgamma xAODEventInfo xAODMuon )
 
 # 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_scripts( scripts/frozen_derivation_test.py )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py
index 898d991d6c06d8c734c4634425d71f742c7a0b03..6af0970e7b11e84fa044fd2f097aeae612a63011 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ContentHandler.py
@@ -21,7 +21,7 @@ class ContentHandler:
 		if containerName in theDictionary.keys():
 			line = theDictionary[containerName]+"#"+containerName
 		else:
-			msg.warning('Collection with name %s not found in input file or in definitions from user. No action will be taken for this collection.' % containerName)
+			msg.warning('Collection with name %s not found in input file or in definitions from user. No action will be taken for this collection.', containerName)
 		return line
 		
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py
index 90a0af470a936ad8e7baee65a2cc66da845dd320..2a364ea7a57b9a7a4b43f9113b5f80c716de47d2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py
@@ -7,17 +7,11 @@
 # Contains all basic includes for running the derivation framework
 #-------------------------------------------------------------
 
-from __future__ import print_function
-
-from AthenaCommon.AppMgr import ToolSvc
 from AthenaCommon.AppMgr import theApp
 # Derivation names and locations of job options
-from DerivationFrameworkCore.DerivationFrameworkProdFlags import derivationFlags
-# Multiple stream manager
-from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+from DerivationFrameworkCore.DerivationFrameworkProdFlags import derivationFlags  # noqa: F401
 # Athena common properties
-from AthenaCommon.JobProperties import jobproperties
-from AthenaCommon import CfgMgr 
+from AthenaCommon import CfgMgr
 from AthenaCommon.AlgSequence import AlgSequence 
 from JetRec.JetRecFlags import jetFlags 
 from AthenaCommon.GlobalFlags  import globalflags
@@ -26,7 +20,7 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
 import os
 if "AthAnalysisBase" not in os.environ.get("CMTEXTRATAGS",""):
-  from AODFix.AODFix import *
+  from AODFix.AODFix import *  # noqa: F401, F403
 
 # Trap for ROOT6 errors
 theApp.CreateSvc += ["AthROOTErrorHandlerSvc"]
@@ -60,11 +54,12 @@ if inputFileSummary is not None:
 # Set up the metadata tool:
 if not globalflags.InputFormat=="bytestream":
     # Extra config: make sure if we are using EVNT that we don't try to check sim/digi/reco metadata 
-    from RecExConfig.ObjKeyStore import objKeyStore
+#    from RecExConfig.ObjKeyStore import objKeyStore
 #    ToolSvc += CfgMgr.xAODMaker__FileMetaDataCreatorTool( "FileMetaDataCreatorTool",
 #                                  isEVNT = objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ),
 #                                  OutputLevel = 2 )
 #    svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.FileMetaDataCreatorTool ]
+     pass
 
 # Set up stream auditor
 if not hasattr(svcMgr, 'DecisionSvc'):
@@ -95,7 +90,7 @@ if globalflags.DataSource()=='geant4':
         # Make sure input file is not EVNT
         if not objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ):
             DerivationFrameworkSimBarcodeOffset = int(inputFileSummary['metadata']['/Simulation/Parameters']['SimBarcodeOffset'])
-    except:
+    except Exception:
         print ('Could not retrieve SimBarcodeOffset from /Simulation/Parameters, leaving at 200k')
 
 def buildFileName(derivationStream):
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkProdFlags.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkProdFlags.py
index 9ca72cb748a521400fdf4fcb27cd13a8b0e3fcd5..765154d5141db0e5140308b300302912a170892d 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkProdFlags.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkProdFlags.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
 
 from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
 from AthenaCommon.JobProperties import jobproperties
@@ -914,7 +914,7 @@ jobproperties.DerivationFrameworkProdFlags.add_JobProperty(WriteDAOD_STDM11Strea
 listAODtoDPD.append(WriteDAOD_STDM11Stream.StreamName)
 
 class WriteDAOD_STDM12Stream (JobProperty):
-    """Derivation for B\pm fragmentation, Photon + B\pm, J/psi and Upsilon fragmentation measurements"""
+    """Derivation for B+- fragmentation, Photon + B+-, J/psi and Upsilon fragmentation measurements"""
     statusOn = True
     allowedTypes = ['bool']
     StoredValue = False
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py
index 8e3f0e174e5c02a550be6760adddc1373cb7508c..f5e8c07f0745811f576ee6d1a4fa9503303a1426 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py
@@ -1,13 +1,11 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
 import operator
 import json 
 def addLHE3Weights(seq, pref = '', var_dict = {}):
   
   from AthenaCommon.AppMgr import ToolSvc
-  from ReweightUtils.ReweightUtilsConf import SumOfWeightsAlg
+  from ReweightUtils.ReweightUtilsConf import SumOfWeightsAlg, McEventWeight
 
   sumOfWeightsAlg = SumOfWeightsAlg(name = pref+"LHE3SumWeightsAlg")
 
@@ -24,7 +22,7 @@ def addLHE3Weights(seq, pref = '', var_dict = {}):
   seq += sumOfWeightsAlg
 
 
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 
 # skip this in datfrom AthenaCommon.GlobalFlags import globalflags
 from AthenaCommon.GlobalFlags import globalflags
@@ -33,8 +31,9 @@ if globalflags.DataSource() == 'geant4':
   mcweight_dict_orig = dict()
   mcweight_dict = dict()
   try:
+    from RecExConfig.InputFilePeeker import inputFileSummary
     mcweight_dict_orig = inputFileSummary['metadata']['/Generation/Parameters']['HepMCWeightNames']
-  except:
+  except Exception:
     print ('Could not retrieve HepMCWeightNames /Generation/Parameters metadata.')
   
   # Recent versions of MadGraph are writing the dictionary as a flat string
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
index a0dcba819a6a0b94812342885c931070aecccaec..0200eb94cca4b4350245088bade746db68df530c 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
@@ -34,17 +34,13 @@
 # may be unreadable.
 ####################################################################
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.CompulsoryContent import *
-from DerivationFrameworkCore.ContentHandler import *
+from DerivationFrameworkCore.CompulsoryContent import CompulsoryContent, CompulsoryTriggerNavigation
+from DerivationFrameworkCore.ContentHandler import ContentHandler
 from DerivationFrameworkCore.ContainersForExpansion import ContainersForExpansion
 from DerivationFrameworkCore.ContainersOnTheFly import ContainersOnTheFly
 from DerivationFrameworkCore.AllVariablesDisallowed import AllVariablesDisallowed
 from DerivationFrameworkCore.FullListOfSmartContainers import FullListOfSmartContainers
 from DerivationFrameworkCore.PreliminarySmartContainers import PreliminarySmartContainers
-from AthenaCommon.BeamFlags import jobproperties
-from AthenaCommon.GlobalFlags  import globalflags
 import PyUtils.Logging as L
 msg = L.logging.getLogger('DerivationFramework__SlimmingHelper')
 msg.setLevel(L.logging.INFO)
@@ -56,13 +52,13 @@ class lockable_list(list):
                 list.__init__(self,data)
                 self.__dict__["_locked"] = False
         def append(self,name):
-                if self._locked == True:
+                if self._locked is True:
                         msg.error("Attempting to Modify SlimmingHelper after AppendContentToStream has Been Called")
                         raise RuntimeError("Late Modification to SlimmingHelper do not modify after calling AppendContentToStream")
                 else:
                         return list.append(self, name)
         def __setattr__(self,name,value):
-                if self._locked==True:
+                if self._locked is True:
                         msg.error("Attempting to Modify SlimmingHelper after AppendContentToStream has Been Called")
                         raise RuntimeError("Late Modification to SlimmingHelper do not modify after calling AppendContentToStream")
                 else:
@@ -107,7 +103,7 @@ class SlimmingHelper:
 
         # This hack prevents any members from being modified after lock is set to true, this happens in AppendContentToStream
         def __setattr__(self,name,value):
-                if self._locked==True:
+                if self._locked is True:
                         msg.error("Attempting to Modify SlimmingHelper "+self.name+" After AppendContentToStream has Been Called")
                         raise RuntimeError("Late Modification to SlimmingHelper, do not modifiy after calling AppendContentToStream")
                 elif type(value)==list:
@@ -157,44 +153,44 @@ class SlimmingHelper:
                 # Trigger objects: add them by hand to the smart collection list (to keep the previous interface)
                 triggerContent = False
 
-                if (self.IncludeAdditionalTriggerContent == True):
+                if (self.IncludeAdditionalTriggerContent is True):
                         triggerContent = True
 
-                if (self.IncludeMuonTriggerContent == True):
+                if (self.IncludeMuonTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__MuonContainer_MuonEFInfo")
 
-                if (self.IncludeEGammaTriggerContent == True):
+                if (self.IncludeEGammaTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__PhotonContainer_egamma_Photons")
 
-                if (self.IncludeJetTriggerContent == True):
+                if (self.IncludeJetTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__JetContainer_a4tcemsubjesFS")
                         from DerivationFrameworkCore.JetTriggerFixContent import JetTriggerFixContent
                         for item in JetTriggerFixContent:
                                 Stream.AddItem(item)
 
-                if (self.IncludeEtMissTriggerContent == True):
+                if (self.IncludeEtMissTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__TrigMissingETContainer_TrigEFMissingET")
                         from DerivationFrameworkCore.EtMissTriggerFixContent import EtMissTriggerFixContent
                         for item in EtMissTriggerFixContent:
                                 Stream.AddItem(item)
 
-                if (self.IncludeTauTriggerContent == True):
+                if (self.IncludeTauTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__TauJetContainer_TrigTauRecMerged")
 
-                if (self.IncludeBJetTriggerContent == True):
+                if (self.IncludeBJetTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__BTaggingContainer_HLTBjetFex")
 
-                if (self.IncludeBPhysTriggerContent == True):
+                if (self.IncludeBPhysTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__TrigBphysContainer_EFBMuMuFex")
 
-                if (self.IncludeMinBiasTriggerContent == True):
+                if (self.IncludeMinBiasTriggerContent is True):
                         triggerContent = True
                         self.SmartCollections.append("HLT_xAOD__TrigVertexCountsContainer_vertexcounts")
 
@@ -270,13 +266,13 @@ class SlimmingHelper:
 
                 # Add trigger item (not covered by smart slimming so no expansion)
                 # Old, will be removed (kept just to not break some deriavtions)
-                if (self.IncludeJetTauEtMissTriggerContent == True):
+                if (self.IncludeJetTauEtMissTriggerContent is True):
                         from DerivationFrameworkCore.JetTauEtMissTriggerContent import JetTauEtMissTriggerContent
                         for item in JetTauEtMissTriggerContent:
                                 Stream.AddItem(item)
 
                 # non xAOD collections for MinBias
-                if (self.IncludeMinBiasTriggerContent == True):
+                if (self.IncludeMinBiasTriggerContent is True):
                         from DerivationFrameworkCore.MinBiasTrigger_nonxAOD_Content import MinBiasTrigger_nonxAOD_Content
                         for item in MinBiasTrigger_nonxAOD_Content:
                                 Stream.AddItem(item)
@@ -661,7 +657,7 @@ class SlimmingHelper:
                 elif collectionName=="PrimaryVertices":
                         from DerivationFrameworkInDet.PrimaryVerticesCPContent import PrimaryVerticesCPContent
                         items.extend(PrimaryVerticesCPContent)
-                elif self.IncludeAdditionalTriggerContent == True:
+                elif self.IncludeAdditionalTriggerContent is True:
                         from DerivationFrameworkCore.AdditionalTriggerContent import AdditionalTriggerContent
                         items.extend(AdditionalTriggerContent)
 
@@ -727,7 +723,6 @@ class SlimmingHelper:
                         return "WILDCARD"
                 # No xAOD containers
                 sep = item.split("#")
-                collection = sep[1]
                 if ("xAOD::" in item and sep[1] in self.NamesAndTypes.keys()):
                         return "XAOD"
                 return "OK"
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ThinningHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ThinningHelper.py
index d03049845f304e0cf907be95172661536c8ad97f..e16bbb25a846e4ece3618acf5567ac8ff86e7294 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ThinningHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ThinningHelper.py
@@ -12,9 +12,6 @@
 # (3) passes the thinning service back to the job options on request 
 ####################################################################
 
-# Needed import(s):
-import AthenaCommon.CfgMgr as CfgMgr
-
 ## Class helping to set up (navigation) thinning in derivation jobs
 #
 # In order to hide the complexity of using navigation thinning from the users,
@@ -34,7 +31,6 @@ class ThinningHelper:
     # @param helperName The instance name of this helper object
     #
     def __init__( self, helperName ):
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         self.helperName = helperName
         self.TriggerChains = ""
         from AthenaCommon.Logging import logging
@@ -54,11 +50,7 @@ class ThinningHelper:
     def AppendToStream( self, augmentedStream, extraTriggerContent = [] ):
         # Access the stream object:
         stream = augmentedStream.GetEventStream()
-        # Get the name of the "format":
-        formatName = stream.name().strip( "StreamDAOD_" )
-        # The necessary import(s):
-        from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-        
+
         if self.TriggerChains == "":
             # No trigger selection required.
             return
@@ -96,7 +88,7 @@ class ThinningHelper:
                 t.TrigNavigationThinningSvc = tSvc
                 break
         else:
-            log.error ("Can't find ThinningCacheTool for stream %s", stream)
+            self.log.error ("Can't find ThinningCacheTool for stream %s", stream)
 
         return
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py
index 59c5886b901846dc19039fd96a1a35dc035225ac..50ddd043db49b748283ff1d9c5d8184e31e62c28 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/WeightMetadata.py
@@ -1,6 +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 ReweightUtils.ReweightUtilsConf import * 
+from ReweightUtils.ReweightUtilsConf import McEventWeight, PDFWeight, SumOfWeightsAlg, WeightsAgregator
 
 
 def addWeights(seq, pdfMap = {'CT14nlo':20}, pref = ""):
@@ -89,7 +89,7 @@ def addWeightsHist(stream, seq, svcMgr, CfgMgr, ToolSvc, derivName, fileName, pd
       seq += CfgMgr.CP__PileupReweightingProvider(derivName+"_pdfProvWeight"+pdfName+"_"+str(i),Tool=provTools[i],ConfigOutputStream="METADATA/pdfWeight"+pdfName+"_"+str(i))
 
 
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 #addWeights(DerivationFrameworkJob, {'CT10nlo':52, 'MSTW2008nlo68cl': 40, 'NNPDF23_lo_as_0130_qed': 100, 'NNPDF30_nlo_as_0118': 100}, "")
 listPDF = {}
 #listPDF["CT14nlo"] = 56
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt
index ed2f1499363a833facfa5bb5c950ab3c00e8c685..12941799f08b9a420c2d1317a0938fb458112f5a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/CMakeLists.txt
@@ -13,6 +13,6 @@ atlas_add_component( DerivationFrameworkEGamma
                      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthContainers AthenaBaseComps CaloCalibHitRecLib DerivationFrameworkInterfaces EgammaAnalysisHelpersLib EgammaAnalysisInterfacesLib ExpressionEvaluationLib GaudiKernel MCTruthClassifierLib PATCoreLib xAODBase xAODCaloEvent xAODEgamma xAODMissingET xAODMuon xAODTracking xAODTruth )
 
 # 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 )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM1ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM1ExtraContent.py
index c9f84c6756f3b96fcdd09ff6b134a686170f3e8e..c55bdc9568425508a92b29b1b3934b58aebebfc0 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM1ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM1ExtraContent.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
 
 
 #Content included in addition to the Smart Slimming Content
@@ -40,8 +40,8 @@ ExtraMuonsTruth=[
     ]
 
 ExtraContentPhotons=[
-	]
-	
+    ]
+
 ExtraContentPrimaryVertices=["PrimaryVertices.x.y.sumPt2"]
 
 ExtraPhotonsTruth=[
@@ -51,18 +51,18 @@ ExtraPhotonsTruth=[
     ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 #ExtraContentHLTElectrons=[
 #        "HLT_xAOD__ElectronContainer_egamma_Electrons.e.pt.Rhad.Rhad1.e277.Reta.Rphi.weta2.f1.fracs1.wtots1.weta1.DeltaE.Eratio.caloClusterLinks"
@@ -84,10 +84,10 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles"
+                      "egammaTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
-		      ]
+                      ]
 
 ExtraContainersElectrons=["Electrons",
                           "GSFTrackParticles",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM2ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM2ExtraContent.py
index e248b0a25cb25bd3e53edc2e5ba0b26f78482d46..1f077a8f6480de97c9bb751c6905d65547f0cbb2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM2ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM2ExtraContent.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
 
 #Content included in addition to the Smart Slimming Content
 
@@ -28,7 +28,7 @@ ExtraMuonsTruth=[
     ]
 
 ExtraContentPhotons=[
-	]
+        ]
 
 ExtraContentElectrons=[]
 
@@ -41,34 +41,34 @@ ExtraPhotonsTruth=[
     ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 #cells = ("Cells5x5","Cells3x5","Cells3x7","Cells7x11")
-#layers_gains =  (	"_Lr0", "_Lr1", "_Lr2", "_Lr3",
-#					"_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG",
-#					"_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG",
-#					"_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" )
+#layers_gains =  (      "_Lr0", "_Lr1", "_Lr2", "_Lr3",
+#                                       "_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG",
+#                                       "_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG",
+#                                       "_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" )
 #
 #for cell in cells:
-#	ExtraContentPhotons.append("Photons."+cell)
-#	for layer in layers_gains:
-#		ExtraContentPhotons.append("Photons."+cell+layer)
+#       ExtraContentPhotons.append("Photons."+cell)
+#       for layer in layers_gains:
+#               ExtraContentPhotons.append("Photons."+cell+layer)
 #
 #for cell in cells:
-#	ExtraContentElectrons.append("Electrons."+cell)
-#	for layer in layers_gains:
-#		ExtraContentElectrons.append("Electrons."+cell+layer)
+#       ExtraContentElectrons.append("Electrons."+cell)
+#       for layer in layers_gains:
+#               ExtraContentElectrons.append("Electrons."+cell+layer)
 from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations
 GainDecoratorTool = GainDecorator()
 ExtraContentPhotons.extend( getGainDecorations(GainDecoratorTool) )
@@ -82,7 +82,7 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles"
+                      "egammaTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
                       ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM3ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM3ExtraContent.py
index 990c084d3c0fb1c978d9ae9dabd4c83d75d482e5..bd1d12d646c7fa69e278714aaef19807134d91fa 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM3ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM3ExtraContent.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
 
 #Content included in addition to the Smart Slimming Content
 
@@ -42,39 +42,39 @@ ExtraPhotonsTruth=[
 ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 ExtraContentHLTPhotons=[
-	"HLT_xAOD__PhotonContainer_egamma_Photons.e.pt.m.author.Rhad.Rhad1.e277.Reta.Rphi.weta2.f1.fracs1.wtots1.weta1.DeltaE.Eratio.caloClusterLinks",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex.calE.calEta.calPhi.calM.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME"
+        "HLT_xAOD__PhotonContainer_egamma_Photons.e.pt.m.author.Rhad.Rhad1.e277.Reta.Rphi.weta2.f1.fracs1.wtots1.weta1.DeltaE.Eratio.caloClusterLinks",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex.calE.calEta.calPhi.calM.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME"
 ]
 
 #cells = ("Cells5x5","Cells3x5","Cells3x7","Cells7x11")
-#layers_gains =  (	"_Lr0", "_Lr1", "_Lr2", "_Lr3",
-#					"_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG",
-#					"_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG",
-#					"_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" )
+#layers_gains =  (      "_Lr0", "_Lr1", "_Lr2", "_Lr3",
+#                                       "_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG",
+#                                       "_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG",
+#                                       "_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" )
 #
 #for cell in cells:
-#	ExtraContentPhotons.append("Photons."+cell)
-#	for layer in layers_gains:
-#		ExtraContentPhotons.append("Photons."+cell+layer)
+#       ExtraContentPhotons.append("Photons."+cell)
+#       for layer in layers_gains:
+#               ExtraContentPhotons.append("Photons."+cell+layer)
 #
 #for cell in cells:
-#	ExtraContentElectrons.append("Electrons."+cell)
-#	for layer in layers_gains:
-#		ExtraContentElectrons.append("Electrons."+cell+layer)
+#       ExtraContentElectrons.append("Electrons."+cell)
+#       for layer in layers_gains:
+#               ExtraContentElectrons.append("Electrons."+cell+layer)
 from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations
 GainDecoratorTool = GainDecorator()
 ExtraContentPhotons.extend( getGainDecorations(GainDecoratorTool) )
@@ -87,8 +87,8 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles",
-		      "MuonTruthParticles"
+                      "egammaTruthParticles",
+                      "MuonTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
                       ]
@@ -105,39 +105,39 @@ ExtraContainersPhotons=["Photons",
 
 # for trigger studies
 ExtraContainersTrigger=[
-	"HLT_xAOD__ElectronContainer_egamma_Electrons",
-	"HLT_xAOD__ElectronContainer_egamma_ElectronsAux.",
-	"HLT_xAOD__PhotonContainer_egamma_Photons",
-	"HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
+        "HLT_xAOD__ElectronContainer_egamma_Electrons",
+        "HLT_xAOD__ElectronContainer_egamma_ElectronsAux.",
+        "HLT_xAOD__PhotonContainer_egamma_Photons",
+        "HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
         "HLT_xAOD__PhotonContainer_egamma_Iso_Photons",
         "HLT_xAOD__PhotonContainer_egamma_Iso_PhotonsAux.",
-	"HLT_xAOD__TrigElectronContainer_L2ElectronFex",
-	"HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFID",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFIDAux.",
-	"LVL1EmTauRoIs",
-	"LVL1EmTauRoIsAux.",
-	"HLT_TrigPassBitsCollection_passbits",
-	"HLT_TrigPassBitsCollection_passbitsAux.",
-	"HLT_TrigPassFlagsCollection_passflags",
-	"HLT_TrigPassFlagsCollection_passflagsAux.",
-	"HLT_TrigRoiDescriptorCollection_initialRoI",
-	"HLT_TrigRoiDescriptorCollection_initialRoIAux."
-	]
+        "HLT_xAOD__TrigElectronContainer_L2ElectronFex",
+        "HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFID",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFIDAux.",
+        "LVL1EmTauRoIs",
+        "LVL1EmTauRoIsAux.",
+        "HLT_TrigPassBitsCollection_passbits",
+        "HLT_TrigPassBitsCollection_passbitsAux.",
+        "HLT_TrigPassFlagsCollection_passflags",
+        "HLT_TrigPassFlagsCollection_passflagsAux.",
+        "HLT_TrigRoiDescriptorCollection_initialRoI",
+        "HLT_TrigRoiDescriptorCollection_initialRoIAux."
+        ]
 
 ExtraContainersTriggerDataOnly=[
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker",
-	"HLT_xAOD__CaloClusterContainer_TrigCaloClusterMakerAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTF",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTFAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2ID",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2IDAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrig",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrigAux."
-	]
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker",
+        "HLT_xAOD__CaloClusterContainer_TrigCaloClusterMakerAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTF",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTFAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2ID",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2IDAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrig",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrigAux."
+        ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM4ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM4ExtraContent.py
index 27a494b113c2beb84d53433e74742388f00609ab..2fbf7a3688ec5999ab9ef46f531dafd49ea6d9fe 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM4ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM4ExtraContent.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #Content included in addition to the Smart Slimming Content
 
@@ -48,22 +48,22 @@ ExtraPhotonsTruth=[
 ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 ExtraContentHLTPhotons=[
         "HLT_xAOD__PhotonContainer_egamma_Photons.e.pt.m.author.Rhad.Rhad1.e277.Reta.Rphi.weta2.f1.fracs1.wtots1.weta1.DeltaE.Eratio.caloClusterLinks",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex.calE.calEta.calPhi.calM.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME"
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex.calE.calEta.calPhi.calM.e_sampl.eta_sampl.etaCalo.phiCalo.ETACALOFRAME.PHICALOFRAME"
 ]
 
 from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations
@@ -79,8 +79,8 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles",
-		      "MuonTruthParticles"
+                      "egammaTruthParticles",
+                      "MuonTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
                       ]
@@ -95,31 +95,31 @@ ExtraContainersPhotons=["Photons",
 
 # for trigger studies and for trigger matching
 ExtraContainersTrigger=[
-	"HLT_xAOD__MuonContainer_MuonEFInfo",
-	"HLT_xAOD__MuonContainer_MuonEFInfoAux.",
+        "HLT_xAOD__MuonContainer_MuonEFInfo",
+        "HLT_xAOD__MuonContainer_MuonEFInfoAux.",
         "HLT_xAOD__MuonContainer_MuonEFInfo_FullScan",
         "HLT_xAOD__MuonContainer_MuonEFInfo_FullScanAux.",
-	"HLT_xAOD__PhotonContainer_egamma_Photons",
-	"HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
+        "HLT_xAOD__PhotonContainer_egamma_Photons",
+        "HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
         "HLT_xAOD__PhotonContainer_egamma_Iso_Photons",
         "HLT_xAOD__PhotonContainer_egamma_Iso_PhotonsAux.",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
-	"LVL1EmTauRoIs",
-	"LVL1EmTauRoIsAux.",
-	"HLT_TrigPassBitsCollection_passbits",
-	"HLT_TrigPassBitsCollection_passbitsAux.",
-	"HLT_TrigPassFlagsCollection_passflags",
-	"HLT_TrigPassFlagsCollection_passflagsAux.",
-	"HLT_TrigRoiDescriptorCollection_initialRoI",
-	"HLT_TrigRoiDescriptorCollection_initialRoIAux."
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
+        "LVL1EmTauRoIs",
+        "LVL1EmTauRoIsAux.",
+        "HLT_TrigPassBitsCollection_passbits",
+        "HLT_TrigPassBitsCollection_passbitsAux.",
+        "HLT_TrigPassFlagsCollection_passflags",
+        "HLT_TrigPassFlagsCollection_passflagsAux.",
+        "HLT_TrigRoiDescriptorCollection_initialRoI",
+        "HLT_TrigRoiDescriptorCollection_initialRoIAux."
         ]
 
 ExtraContainersTriggerDataOnly=[
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker",
-	"HLT_xAOD__CaloClusterContainer_TrigCaloClusterMakerAux."
-	]
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker",
+        "HLT_xAOD__CaloClusterContainer_TrigCaloClusterMakerAux."
+        ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM5ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM5ExtraContent.py
index eca0e30a85720475ece329349965f899bc0f4bce..590f71a6a4467444c58ec0ebdeefd9e43a26bb4d 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM5ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM5ExtraContent.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
 
 #Content included in addition to the Smart Slimming Content
 
@@ -42,34 +42,34 @@ ExtraPhotonsTruth=[
 ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
 ]
 
 #cells = ("Cells5x5","Cells3x5","Cells3x7","Cells7x11")
-#layers_gains =  (	"_Lr0", "_Lr1", "_Lr2", "_Lr3",
-#					"_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG",
-#					"_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG",
-#					"_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" )
+#layers_gains =  (      "_Lr0", "_Lr1", "_Lr2", "_Lr3",
+#                                       "_Lr0_LwG", "_Lr1_LwG", "_Lr2_LwG", "_Lr3_LwG",
+#                                       "_Lr0_LwG", "_Lr1_MdG", "_Lr2_MdG", "_Lr3_MdG",
+#                                       "_Lr0_LwG", "_Lr1_HiG", "_Lr2_HiG", "_Lr3_HiG" )
 #
 #for cell in cells:
-#	ExtraContentPhotons.append("Photons."+cell)
-#	for layer in layers_gains:
-#		ExtraContentPhotons.append("Photons."+cell+layer)
+#       ExtraContentPhotons.append("Photons."+cell)
+#       for layer in layers_gains:
+#               ExtraContentPhotons.append("Photons."+cell+layer)
 #
 #for cell in cells:
-#	ExtraContentElectrons.append("Electrons."+cell)
-#	for layer in layers_gains:
-#		ExtraContentElectrons.append("Electrons."+cell+layer)
+#       ExtraContentElectrons.append("Electrons."+cell)
+#       for layer in layers_gains:
+#               ExtraContentElectrons.append("Electrons."+cell+layer)
 #
 from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations
 GainDecoratorTool = GainDecorator()
@@ -83,7 +83,7 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles"
+                      "egammaTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
                       ]
@@ -95,32 +95,32 @@ ExtraContainersElectrons=["Electrons",
 
 # for trigger studies
 ExtraContainersTrigger=[
-	"HLT_xAOD__ElectronContainer_egamma_Electrons",
-	"HLT_xAOD__ElectronContainer_egamma_ElectronsAux.",
-	"HLT_xAOD__PhotonContainer_egamma_Photons",
-	"HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
-	"HLT_xAOD__TrigElectronContainer_L2ElectronFex",
-	"HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFID",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFIDAux.",
-	"LVL1EmTauRoIs",
-	"LVL1EmTauRoIsAux.",
-	"HLT_TrigPassBitsCollection_passbits",
-	"HLT_TrigPassBitsCollection_passbitsAux.",
-	"HLT_TrigPassFlagsCollection_passflags",
-	"HLT_TrigPassFlagsCollection_passflagsAux.",
-	"HLT_TrigRoiDescriptorCollection_initialRoI",
-	"HLT_TrigRoiDescriptorCollection_initialRoIAux."
-	]
+        "HLT_xAOD__ElectronContainer_egamma_Electrons",
+        "HLT_xAOD__ElectronContainer_egamma_ElectronsAux.",
+        "HLT_xAOD__PhotonContainer_egamma_Photons",
+        "HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
+        "HLT_xAOD__TrigElectronContainer_L2ElectronFex",
+        "HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFID",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFIDAux.",
+        "LVL1EmTauRoIs",
+        "LVL1EmTauRoIsAux.",
+        "HLT_TrigPassBitsCollection_passbits",
+        "HLT_TrigPassBitsCollection_passbitsAux.",
+        "HLT_TrigPassFlagsCollection_passflags",
+        "HLT_TrigPassFlagsCollection_passflagsAux.",
+        "HLT_TrigRoiDescriptorCollection_initialRoI",
+        "HLT_TrigRoiDescriptorCollection_initialRoIAux."
+        ]
 
 ExtraContainersTriggerDataOnly=[
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux."
-	]
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux."
+        ]
 
 #should probably slim electron/fwdelectrons/cluster collections and keep only relevant subset of variables..
 # no ForwardElectrons, InDetTrackParticlesForward, ForwardElectronClusters, CaloCalTopoCluster
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM7ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM7ExtraContent.py
index 2088e310366dd84b952298f48ad02feeaf5be89d..183b85a3223f3dd9e396cf278b98f48f2dea4851 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM7ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM7ExtraContent.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
 
 
 #Content included in addition to the Smart Slimming Content
@@ -40,8 +40,8 @@ ExtraMuonsTruth=[
     ]
 
 ExtraContentPhotons=[
-	]
-	
+        ]
+
 ExtraContentPrimaryVertices=["PrimaryVertices.x.y.sumPt2"]
 
 ExtraPhotonsTruth=[
@@ -51,18 +51,18 @@ ExtraPhotonsTruth=[
     ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 #ExtraContentHLTElectrons=[
 #        "HLT_xAOD__ElectronContainer_egamma_Electrons.e.pt.Rhad.Rhad1.e277.Reta.Rphi.weta2.f1.fracs1.wtots1.weta1.DeltaE.Eratio.caloClusterLinks"
@@ -84,10 +84,10 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles"
+                      "egammaTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
-		      ]
+                      ]
 
 ExtraContainersElectrons=["Electrons",
                           "GSFTrackParticles",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM8ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM8ExtraContent.py
index b2b8645ca4251d4bd4e0ace83b67d891cf574728..12707ad40866bbdb990237bf5e908fe5d7ff8351 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM8ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM8ExtraContent.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
 
 
 #Content included in addition to the Smart Slimming Content
@@ -31,8 +31,8 @@ ExtraMuonsTruth=[
     ]
 
 ExtraContentPhotons=[
-	]
-	
+        ]
+
 ExtraContentPrimaryVertices=["PrimaryVertices.x.y.sumPt2"]
 
 ExtraPhotonsTruth=[
@@ -42,18 +42,18 @@ ExtraPhotonsTruth=[
     ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 from DerivationFrameworkCalo.DerivationFrameworkCaloFactories import GainDecorator, getGainDecorations
 GainDecoratorTool = GainDecorator()
@@ -67,10 +67,10 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles"
+                      "egammaTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
-		      ]
+                      ]
 
 ExtraContainersElectrons=["Electrons",
                           "ForwardElectrons",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM9ExtraContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM9ExtraContent.py
index 35c6d8b288ff654a72a9b3ae088299afbadb3429..41a619906c29c5b3bf026f4db0e0957f362f5852 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM9ExtraContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGAM9ExtraContent.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
 
 
 #Content included in addition to the Smart Slimming Content
@@ -32,8 +32,8 @@ ExtraMuonsTruth=[
 
 ExtraContentPhotons=[
     "Photons.DFCommonLoosePrime5",
-	]
-	
+        ]
+
 ExtraContentPrimaryVertices=["PrimaryVertices.x.y.sumPt2"]
 
 ExtraPhotonsTruth=[
@@ -43,18 +43,18 @@ ExtraPhotonsTruth=[
     ]
 
 ExtraContentGSFConversionVertices=[
-	"GSFConversionVertices.x",
-	"GSFConversionVertices.y",
-	"GSFConversionVertices.z",
-	"GSFConversionVertices.px",
-	"GSFConversionVertices.py",
-	"GSFConversionVertices.pz",
-	"GSFConversionVertices.pt1",
-	"GSFConversionVertices.pt2",
-	"GSFConversionVertices.etaAtCalo",
-	"GSFConversionVertices.phiAtCalo",
-	"GSFConversionVertices.trackParticleLinks"
-	]
+        "GSFConversionVertices.x",
+        "GSFConversionVertices.y",
+        "GSFConversionVertices.z",
+        "GSFConversionVertices.px",
+        "GSFConversionVertices.py",
+        "GSFConversionVertices.pz",
+        "GSFConversionVertices.pt1",
+        "GSFConversionVertices.pt2",
+        "GSFConversionVertices.etaAtCalo",
+        "GSFConversionVertices.phiAtCalo",
+        "GSFConversionVertices.trackParticleLinks"
+        ]
 
 #ExtraContentHLTElectrons=[
 #        "HLT_xAOD__ElectronContainer_egamma_Electrons.e.pt.Rhad.Rhad1.e277.Reta.Rphi.weta2.f1.fracs1.wtots1.weta1.DeltaE.Eratio.caloClusterLinks"
@@ -72,10 +72,10 @@ ExtraContainersTruth=["TruthEvents",
                       "TruthParticles",
                       "TruthVertices",
                       "AntiKt4TruthJets",
-		      "egammaTruthParticles"
+                      "egammaTruthParticles"
                       #,"BTagging_AntiKt4TruthWZ"
                       #,"AntiKt4TruthWZJets"
-		      ]
+                      ]
 
 ExtraContainersElectrons=["Electrons",
                           "GSFTrackParticles",
@@ -89,41 +89,41 @@ ExtraContainersPhotons=["Photons",
 
 # for trigger studies
 ExtraContainersTrigger=[
-	"HLT_xAOD__ElectronContainer_egamma_Electrons",
-	"HLT_xAOD__ElectronContainer_egamma_ElectronsAux.",
-	"HLT_xAOD__PhotonContainer_egamma_Photons",
-	"HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
+        "HLT_xAOD__ElectronContainer_egamma_Electrons",
+        "HLT_xAOD__ElectronContainer_egamma_ElectronsAux.",
+        "HLT_xAOD__PhotonContainer_egamma_Photons",
+        "HLT_xAOD__PhotonContainer_egamma_PhotonsAux.",
         "HLT_xAOD__PhotonContainer_egamma_Iso_Photons",
         "HLT_xAOD__PhotonContainer_egamma_Iso_PhotonsAux.",
-	"HLT_xAOD__TrigElectronContainer_L2ElectronFex",
-	"HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
-	"HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
-	"HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFID",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFIDAux.",
-	"LVL1EmTauRoIs",
-	"LVL1EmTauRoIsAux.",
-	"HLT_TrigPassBitsCollection_passbits",
-	"HLT_TrigPassBitsCollection_passbitsAux.",
-	"HLT_TrigPassFlagsCollection_passflags",
-	"HLT_TrigPassFlagsCollection_passflagsAux.",
-	"HLT_TrigRoiDescriptorCollection_initialRoI",
-	"HLT_TrigRoiDescriptorCollection_initialRoIAux."
-	]
+        "HLT_xAOD__TrigElectronContainer_L2ElectronFex",
+        "HLT_xAOD__TrigElectronContainer_L2ElectronFexAux.",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFex",
+        "HLT_xAOD__TrigPhotonContainer_L2PhotonFexAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFex",
+        "HLT_xAOD__CaloClusterContainer_TrigEFCaloCalibFexAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFID",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_EFIDAux.",
+        "LVL1EmTauRoIs",
+        "LVL1EmTauRoIsAux.",
+        "HLT_TrigPassBitsCollection_passbits",
+        "HLT_TrigPassBitsCollection_passbitsAux.",
+        "HLT_TrigPassFlagsCollection_passflags",
+        "HLT_TrigPassFlagsCollection_passflagsAux.",
+        "HLT_TrigRoiDescriptorCollection_initialRoI",
+        "HLT_TrigRoiDescriptorCollection_initialRoIAux."
+        ]
 
 ExtraContainersTriggerDataOnly=[
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
-	"HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux.",
-	"HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker",
-	"HLT_xAOD__CaloClusterContainer_TrigCaloClusterMakerAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTF",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTFAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2ID",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2IDAux.",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrig",
-	"HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrigAux."
-	]
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgamma",
+        "HLT_xAOD__TrigEMClusterContainer_TrigT2CaloEgammaAux.",
+        "HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker",
+        "HLT_xAOD__CaloClusterContainer_TrigCaloClusterMakerAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTF",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_FTFAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2ID",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_L2IDAux.",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrig",
+        "HLT_xAOD__TrackParticleContainer_InDetTrigTrackingxAODCnv_Electron_IDTrigAux."
+        ]
 
 #should slim electron/fwdelectrons/cluster collections and keep only relevant subset of variables..
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
index 1dbe056b965c47e9d8caee966c7f4951d507295d..711fa4faa8a6ba2be1e7d88f0bd24ed1b92676ba 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
@@ -1,13 +1,14 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
 #********************************************************************
 # EGammaCommon.py 
 # Schedules all tools needed for e-gamma object selection and writes
 # results into SG. These may then be accessed along the train   
 #********************************************************************
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob, DerivationFrameworkSimBarcodeOffset
+from AthenaCommon import CfgMgr
+from AthenaCommon.GlobalFlags import globalflags
+from AthenaCommon.AppMgr import ToolSvc, ServiceMgr as svcMgr
 
 #====================================================================
 # PHOTON ETA (=ETA2), ET (=E/COSH(ETA2))
@@ -178,7 +179,6 @@ ToolSvc += EGAMCOM_caloFillRect711
 #====================================================================
 # AUGMENTATION TOOLS
 #====================================================================
-from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
 from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__EGSelectionToolWrapper
 from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__EGElectronLikelihoodToolWrapper
 
@@ -188,7 +188,7 @@ ElectronPassLHVeryLoose = DerivationFramework__EGElectronLikelihoodToolWrapper(
                                                                           EGammaFudgeMCTool = "",
                                                                           CutType = "",
                                                                           StoreGateEntryName = "DFCommonElectronsLHVeryLoose",
-	                                                                  ContainerName = "Electrons",
+                                                                          ContainerName = "Electrons",
                                                                           StoreTResult = False)
 ToolSvc += ElectronPassLHVeryLoose
 print(ElectronPassLHVeryLoose)
@@ -247,7 +247,7 @@ ElectronPassECIDS = DerivationFramework__EGElectronLikelihoodToolWrapper( name =
                                                                           EGammaFudgeMCTool = "",
                                                                           CutType = "",
                                                                           StoreGateEntryName = "DFCommonElectronsECIDS",
-	                                                                  ContainerName = "Electrons",
+                                                                          ContainerName = "Electrons",
                                                                           StoreTResult = True)
 ToolSvc += ElectronPassECIDS
 print (ElectronPassECIDS)
@@ -455,7 +455,6 @@ if  rec.doTruth():
 # CREATE THE DERIVATION KERNEL ALGORITHM   
 #=======================================
 
-from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
 DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("EGammaCommonKernel",
                                                                          AugmentationTools = EGAugmentationTools
                                                                          )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt
index 3ce221e99d5e1ae37901f929145a3d81c0365a8a..370ec81968dc83e4fad2f59e62ca1e26dccbd337 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/CMakeLists.txt
@@ -13,7 +13,7 @@ atlas_add_component( DerivationFrameworkFlavourTag
                      LINK_LIBRARIES AthenaBaseComps FlavorTagDiscriminants GaudiKernel xAODJet xAODTracking xAODBTagging )
 
 # 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 )
 
 # add the test utility
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py
index 5358ebd53c9dd9b698120d68229fa781769e659c..9573d77ff44aeb271fb983ce07780cf5f2a499d4 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJetsCPContent.py
@@ -1,6 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from JetFlavorGhostLabels import getJetFlavorGhostLabels
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 AntiKtVR30Rmax4Rmin02TrackJetsCPContent = [
 "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201810",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py
index b5c8827888089e59e67dd99a2eabb932cb8f2fff..2cc0ec5a87eafd6c1e6cbe9c634eae5ade90c28b 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent.py
@@ -1,6 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-from JetFlavorGhostLabels import getJetFlavorGhostLabels
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903CPContent = [
 "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FlavourTagCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FlavourTagCommon.py
index e2f829a670c24fe4727afc4003afb66f21d1e0fa..45df4a5f969505c3f1ca01e694e0719d4f83aa00 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FlavourTagCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/FlavourTagCommon.py
@@ -1,7 +1,5 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
 #********************************************************************
 
 # FlavourTagCommon.py
@@ -16,10 +14,10 @@ import AthenaCommon.Constants as Lvl
 from AthenaCommon import Logging
 ftaglog = Logging.logging.getLogger('FlavourTagCommon')
 
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 from BTagging.BTaggingFlags import BTaggingFlags
 from AthenaCommon.GlobalFlags import globalflags
+from AthenaCommon import CfgMgr
 
 DoneJetCollections=set([])
 
@@ -57,8 +55,6 @@ def DontReduceInfo(Rel20=True):
     if globalflags.DataSource()=='data':
         augmentationTools = []
 
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
-
     global DerivationFrameworkJob
     DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("MyDFTSOS_KERN",
                                                                              AugmentationTools = augmentationTools,
@@ -220,8 +216,8 @@ def FlavorTagInit(DoReduceInfo = False,
     #doRetag      =True  ## perform retagging
     #adjust configurations
 
-    if DoRetag==False:
-        DoReduceInfo=True
+    #if DoRetag is False:
+    #    DoReduceInfo=True
 
 
     #if the user has defined a list of desired taggers use that one, otherwise use only the active taggers
@@ -282,7 +278,7 @@ def applyBTagging_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJo
       supportedJets = ['AntiKt4EMTopo_BTagging201810', 'AntiKt4EMPFlow_BTagging201810']
     else:
       supportedJets = ['AntiKt4EMTopo', 'AntiKt4EMPFlow']
-    if not jetalg in supportedJets:
+    if jetalg not in supportedJets:
         ftaglog.warning('B-tagging requested for unsupported jet collection {}!'.format(jetalg))
         return
     else:
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py
index d00ab7adeea213569360ea9fc468f028d8c6b086..31abe1dd32c870f5c08ea7fd80575ad9f23ef7a8 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/HbbCommon.py
@@ -1,8 +1,5 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-
 # import Common Algs
 from DerivationFrameworkJetEtMiss.JetCommon import DFJetAlgs
 
@@ -13,12 +10,13 @@ from DerivationFrameworkCore.DerivationFrameworkMaster import (
 from BTagging.BTaggingConfiguration import getConfiguration
 ConfInst=getConfiguration()
 
-from GaudiKernel.Configurable import WARNING, VERBOSE
+from AthenaCommon import CfgMgr
+from AthenaCommon import Logging
+from AthenaCommon.Constants import WARNING
 
-# Import star stuff (it was like that when I got here)
-from DerivationFrameworkJetEtMiss.JetCommon import *
-from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
+from DerivationFrameworkJetEtMiss.JetCommon import addTrimmedJets
 from JetRec.JetRecConf import JetAlgorithm
+from JetRec.JetRecFlags import jetFlags
 
 #===================================================================
 # ExKt/CoM Subjets
@@ -62,7 +60,6 @@ def buildExclusiveSubjets(ToolSvc, JetCollectionName, subjet_mode, nsubjet, doGh
     else:
         print (" building ExKtbbTagTool ", ExKtbbTagToolName)
 
-        from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import SubjetFinderTool
         from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import SubjetRecorderTool
 
         subjetrecorder = SubjetRecorderTool("subjetrecorder_%s%i%s_%s" % (subjet_mode, nsubjet, talabel, JetCollectionName))
@@ -215,7 +212,6 @@ def addExKtCoM(sequence, ToolSvc, JetCollectionExCoM, nSubjets, doTrackSubJet, d
 # AntiKt10LCTopoJets
 ##################################################################
 def addVRJets(sequence, largeRColls = None, do_ghost=False, logger=None, doFlipTagger=False, training='201810', *pos_opts, **opts):
-    from AthenaCommon import Logging
 
     if logger is None:
         logger = Logging.logging.getLogger('VRLogger')
@@ -289,8 +285,8 @@ def buildVRJets(sequence, do_ghost, logger = None, doFlipTagger=False, training=
     VRJetAlgName = "jfind_%s" % (VRJetRecToolName)
     VRJetBTagName = "BTagging_%s" % (VRJetName.replace('BTagging',''))
 
-    logger.info("VR Btag name: %s" % VRJetBTagName)
-    logger.info("VR jet name: %s" % VRJetRecToolName)
+    logger.info("VR Btag name: %s", VRJetBTagName)
+    logger.info("VR jet name: %s", VRJetRecToolName)
 
     from AthenaCommon.AppMgr import ToolSvc
 
@@ -329,20 +325,20 @@ def buildVRJets(sequence, do_ghost, logger = None, doFlipTagger=False, training=
         pseudoJetGetters.append(jtm["gtrackget"])
 
     if VRJetAlgName in DFJetAlgs:
-        logger.info("Algorithm %s already built before" % VRJetAlgName)
+        logger.info("Algorithm %s already built before", VRJetAlgName)
 
         if hasattr(sequence, VRJetAlgName):
-            logger.info("Sequence %s already has an instance of algorithm %s" % (sequence, VRJetAlgName))
+            logger.info("Sequence %s already has an instance of algorithm %s", sequence, VRJetAlgName)
         else:
-            logger.info("Add algorithm %s to sequence %s" % (VRJetAlgName, sequence))
+            logger.info("Add algorithm %s to sequence %s", VRJetAlgName, sequence)
             sequence += DFJetAlgs[VRJetAlgName]
     else:
-        logger.info("Create algorithm %s" % VRJetAlgName)
+        logger.info("Create algorithm %s", VRJetAlgName)
 
         if hasattr(jtm, VRJetRecToolName):
-            logger.info("JetRecTool %s is alredy in jtm.tools in sequence %s" % (VRJetRecToolName, sequence))
+            logger.info("JetRecTool %s is alredy in jtm.tools in sequence %s", VRJetRecToolName, sequence)
         else:
-            logger.info("Create JetRecTool %s" % VRJetRecToolName)
+            logger.info("Create JetRecTool %s", VRJetRecToolName)
             #can only run trackjetdrlabeler with truth labels, so MC only
 
             mods = [defaultTrackAssoc, defaultMuonAssoc, btag_vrjets]
@@ -372,9 +368,9 @@ def buildVRJets(sequence, do_ghost, logger = None, doFlipTagger=False, training=
     from DerivationFrameworkJetEtMiss.ExtendedJetCommon import nameJetsFromAlg
 
     if hasattr(jtm, pjgettername):
-        logger.info("Found %s in jtm in sequence %s" % (pjgettername, sequence))
+        logger.info("Found %s in jtm in sequence %s", pjgettername, sequence)
     else:
-        logger.info("Add %s to jtm in sequence %s" % (pjgettername, sequence))
+        logger.info("Add %s to jtm in sequence %s", pjgettername, sequence)
         
         inputContainerName = jetFlags.containerNamePrefix() + nameJetsFromAlg(VRJetName)
 
@@ -415,7 +411,7 @@ def getJetRecTool(collection, getParent=True):
   from JetRec.JetRecStandardToolManager import jtm
   try:
     jetRecTool = jtm[collection]
-  except KeyError as e:
+  except KeyError:
      raise KeyError("JetRecTool {0} not present in jtm".format(collection) )
   if getParent and hasattr(jetRecTool, "InputContainer") and jetRecTool.InputContainer:
     jetRecTool = getJetRecTool(jetRecTool.InputContainer, True)
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/SoftBtagCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/SoftBtagCommon.py
index 851ac74ec106b9fef716027fb460cbf1196523db..ebc8c0ec89874299497d3d7f68e6a55806109e3e 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/SoftBtagCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/python/SoftBtagCommon.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #********************************************************************
 
@@ -6,13 +6,9 @@
 
 #********************************************************************
 
-import AthenaCommon.Constants as Lvl
 from AthenaCommon import Logging
 ftaglog = Logging.logging.getLogger('SoftBtagCommon')
 
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from AthenaCommon.GlobalFlags import globalflags
-
 def applySoftBtagging(algname,sequence):
 
     from VrtSecInclusive.SoftBtagTrackSelector import SoftBtagTrackSelector
@@ -55,7 +51,7 @@ def applySoftBtagging(algname,sequence):
                                                   Extrapolator        = ToolSvc.AtlasExtrapolator,
                                                   IterationNumber     = 30
                                                   )
-    ToolSvc +=  InclusiveVxFitterTool;
+    ToolSvc +=  InclusiveVxFitterTool
 
     VrtSecInclusive_SoftB.VertexFitterTool=InclusiveVxFitterTool
     VrtSecInclusive_SoftB.Extrapolator = ToolSvc.AtlasExtrapolator
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt
index 150d015311fe703bad405729fc0796aaf9fd462e..8b7686551e098b9c9ecd0342d5c7a671fc895d03 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/CMakeLists.txt
@@ -14,6 +14,6 @@ atlas_add_component( DerivationFrameworkHiggs
                      LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps DerivationFrameworkInterfaces TrigDecisionToolLib xAODEgamma xAODEventInfo xAODJet xAODMuon xAODTracking )
 
 # 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 )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxAugmentation.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxAugmentation.py
index 795444b0c592b9e9a71cef5d005ea6e6ba71d9aa..d6500646bca855697741a4f6b37f73ff31e180ac 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxAugmentation.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxAugmentation.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
 
 #################################################
 # Common code used for the HIGG4 augmentation  	#
@@ -66,14 +66,14 @@ def setup(HIGG4DxName, ToolSvc):
         augmentationTools.append(HIGG4DxTauPVRefittingTool)
 
     if DFisMC:
-   	# Tau truth matching 
+        # Tau truth matching
         from TauAnalysisTools.TauAnalysisToolsConf import TauAnalysisTools__TauTruthMatchingTool
         HIGG4DxTauTruthMatchingTool = TauAnalysisTools__TauTruthMatchingTool(name="HIGG4DxTauTruthMatchingTool",
                                                                              WriteTruthTaus = True)
         
         ToolSvc += HIGG4DxTauTruthMatchingTool
 
-   	# Tau truth matching wrapper 
+        # Tau truth matching wrapper
         from DerivationFrameworkTau.DerivationFrameworkTauConf import DerivationFramework__TauTruthMatchingWrapper
         HIGG4DxTauTruthMatchingWrapper = DerivationFramework__TauTruthMatchingWrapper( name = "HIGG4DxTauTruthMatchingWrapper",
                                                                                 TauTruthMatchingTool = HIGG4DxTauTruthMatchingTool)
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxJets.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxJets.py
index 04d095c46fd8cebf6c3810d916f6bd9bd3c2e851..9c3800f900515168fe6577cbaf6cc8c8d1c334a1 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxJets.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxJets.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
 
 #################################################################
 # Common code used for the HIGG4 jet building and calibration   #
@@ -7,8 +7,8 @@
 # Nov 2015                                      		#
 #################################################################
 
-from DerivationFrameworkJetEtMiss.JetCommon import *
-from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
+from DerivationFrameworkJetEtMiss.JetCommon import OutputJets
+from DerivationFrameworkJetEtMiss.ExtendedJetCommon import addDefaultTrimmedJets
 
 def setup(HIGG4DxName, HIGG4DxSequence, HIGG4DxSlimmingHelper):
 
@@ -17,13 +17,13 @@ def setup(HIGG4DxName, HIGG4DxSequence, HIGG4DxSlimmingHelper):
         # add a small-R collection
 #        OutputJets[DAOD_StreamID+"Jets"] = ["AntiKt2PV0TrackJets"]
 
-    	# schedule reconstruction of AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets 
+        # schedule reconstruction of AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets
 #        addTrimmedJets("AntiKt", 1.0, "LCTopo", rclus=0.2, ptfrac=0.05, algseq=DerivationFrameworkJob)
 #        OutputJets[DAOD_StreamID+"Jets"].append("AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets")
 #        print "HELLO HERE", OutputJets[DAOD_StreamID+"Jets"]
     
     jet_collection = HIGG4DxName+"Jets"
-    if not jet_collection in OutputJets:
+    if jet_collection not in OutputJets:
         # AntiKt10*PtFrac5Rclus20 jets
         if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']:
             addDefaultTrimmedJets(HIGG4DxSequence, jet_collection, False)
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSkimming.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSkimming.py
index c2b41a1f0f3799705806d468400d3e492709beda..7ba2dc395c67bd2504f6ec0d2c9b07e433d6e8e0 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSkimming.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSkimming.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
 
 #################################################
 # Common code used for the HIGG4 skimming       #
@@ -42,7 +42,7 @@ def setup(HIGG4DxName, ToolSvc):
         tauReq1 = '(count( '+tauSubl+' && '+tauTrks+' && '+tauId+' ) >= 1)'
         tauReq2 = '(count( '+tauLead+' && '+tauTrks+' ) >= 1)'
         skim_expression = tauReq0 + '&&' + tauReq1 + '&&' + tauReq2
-	#skim_expression = tauReq0 + '&&' + tauReq2
+        #skim_expression = tauReq0 + '&&' + tauReq2
     elif HIGG4DxName == 'HIGG4D4':
         ditau = '(count(((TauJets.nTracks == 1) || (TauJets.nTracks == 3)) && (TauJets.pt > 45.0*GeV)) >= 2)'
         tau1 = '(count((TauJets.pt > 100.0*GeV)) >= 1)'
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSlimming.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSlimming.py
index 042fdeb9e95d2d754378067f8e176d152977b379..c8e1f53ed93bec7969bdb06121351f4f096a774d 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSlimming.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxSlimming.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
 
 #################################################
 # Common code used for the HIGG4 slimming       #
@@ -7,8 +7,7 @@
 # Nov 2015                                      #
 #################################################
 
-from DerivationFrameworkMCTruth.MCTruthCommon import *
-from DerivationFrameworkJetEtMiss.JetCommon import *
+from DerivationFrameworkJetEtMiss.JetCommon import addJetOutputs
 
 def setup(HIGG4DxName, HIGG4DxStream, HIGG4DxSlimmingHelper):
     from AthenaCommon.GlobalFlags import globalflags
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py
index 40001dd624e45cf46040a53174d82806977e2ef4..73877bf343ac0eba1bdf27c71985b9ed6576346f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkHiggs/python/HIGG4DxThinning.py
@@ -58,16 +58,16 @@ def setup(HIGG4DxName, streamName, ToolSvc):
         ToolSvc += HIGG4DxJetTrackThinningTool1
         thinningTools.append(HIGG4DxJetTrackThinningTool1)
 
-    if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']:
-        from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
-        HIGG4DxJetTrackThinningTool2 = DerivationFramework__JetTrackParticleThinning( name          	    = HIGG4DxName+"JetTrackThinningTool2",
-                                                                                      StreamName              = streamName,
-                                                                                      JetKey                 = "AntiKt2PV0TrackJets",
-                                                                                      SelectionString        = "AntiKt2PV0TrackJets.pt > 6*GeV",
-                                                                                      InDetTrackParticlesKey = "InDetTrackParticles",
-                                                                                      ApplyAnd               = True)
-        #ToolSvc += HIGG4DxJetTrackThinningTool2
-        #thinningTools.append(HIGG4DxJetTrackThinningTool2)
+    #if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']:
+    #    from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
+    #    HIGG4DxJetTrackThinningTool2 = DerivationFramework__JetTrackParticleThinning( name          	    = HIGG4DxName+"JetTrackThinningTool2",
+    #                                                                                  StreamName              = streamName,
+    #                                                                                  JetKey                 = "AntiKt2PV0TrackJets",
+    #                                                                                  SelectionString        = "AntiKt2PV0TrackJets.pt > 6*GeV",
+    #                                                                                  InDetTrackParticlesKey = "InDetTrackParticles",
+    #                                                                                  ApplyAnd               = True)
+    #    ToolSvc += HIGG4DxJetTrackThinningTool2
+    #    thinningTools.append(HIGG4DxJetTrackThinningTool2)
 
     # Tracks associated with Muons
     HIGG4DxMuonSelectionString = ""
@@ -120,9 +120,9 @@ def setup(HIGG4DxName, streamName, ToolSvc):
     # PreserveDescendants keeps all particles including those that come from Geant processes
 
     if DFisMC:
-    	#thin special containers
+        #thin special containers
         from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
-    	#thin taus
+        #thin taus
         HIGG4DxTruthTool_TAU = DerivationFramework__GenericTruthThinning(name                         = HIGG4DxName+"TruthTool_TAU",
                                                                          StreamName                   = streamName,
                                                                          ParticleSelectionString      = truth_cond_tau,
@@ -133,7 +133,7 @@ def setup(HIGG4DxName, streamName, ToolSvc):
         ToolSvc += HIGG4DxTruthTool_TAU
         thinningTools.append(HIGG4DxTruthTool_TAU)
 
-	#thin leptons and taus
+        #thin leptons and taus
         HIGG4DxTruthTool_COMB = DerivationFramework__GenericTruthThinning(name                         = HIGG4DxName+"TruthTool_COMB",
                                                                           StreamName                   = streamName,
                                                                           ParticleSelectionString      = truth_cond_comb,
@@ -145,7 +145,7 @@ def setup(HIGG4DxName, streamName, ToolSvc):
         ToolSvc += HIGG4DxTruthTool_COMB
         thinningTools.append(HIGG4DxTruthTool_COMB)
 
-    	#thin photons
+        #thin photons
         """HIGG4DxTruthTool_PHO = DerivationFramework__GenericTruthThinning(name                    = "HIGG4DxTruthTool_PHO",
                                                                      StreamName              = streamName,
                                                                      ParticlesKey            = "TruthPhotons",
@@ -154,9 +154,9 @@ def setup(HIGG4DxName, streamName, ToolSvc):
                                                                      ToolSvc += HIGG4DxTruthTool_PHO
                                                                      thinningTools.append(HIGG4DxTruthTool_PHO)"""
 
-    	#thinning the master truth collection
+        #thinning the master truth collection
         from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning
-        HIGG4DxTruthTool_MENU = DerivationFramework__MenuTruthThinning(  name 			    = HIGG4DxName+"TruthTool_MENU",
+        HIGG4DxTruthTool_MENU = DerivationFramework__MenuTruthThinning(  name                       = HIGG4DxName+"TruthTool_MENU",
                                                                          StreamName                 = streamName,
                                                                          WritePartons               = False,
                                                                          WriteHadrons               = False,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt
index 4f2b36a26847a20df976817f2c7ad3aadd4c2e47..f91659662caf7a921e9fdca66d574b5f0cb00926 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/CMakeLists.txt
@@ -13,5 +13,5 @@ atlas_add_component( DerivationFrameworkInDet
                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks AthenaBaseComps AthenaKernel AtlasDetDescr CommissionEvent DerivationFrameworkInterfaces ExpressionEvaluationLib FourMomUtils GaudiKernel InDetIdentifier InDetPrepRawData InDetRIO_OnTrack InDetReadoutGeometry InDetTrackSelectionToolLib LArRecEvent SCT_CablingLib SCT_ConditionsToolsLib StoreGateLib TRT_ConditionsServicesLib TRT_ElectronPidToolsLib TRT_ReadoutGeometry TrigDecisionToolLib TrkCompetingRIOsOnTrack TrkEventPrimitives TrkEventUtils TrkExInterfaces TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkToolInterfaces TrkTrack TrkVertexFitterInterfaces xAODBase xAODCore xAODEgamma xAODEventInfo xAODJet xAODMuon xAODTau xAODTracking )
 
 # 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 )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetCommon.py
index 4e0edd43f80f9858a37f5169de08d77d82b68c79..1c7bb13b23cacf6e6343da62c72489701f6d6fad 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetCommon.py
@@ -5,11 +5,13 @@
 # Schedules all tools needed for ID track object selection and writes
 # results into SG. These may then be accessed along the train   
 #********************************************************************
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 
 # Check file contains PrimaryVertices container (protect against non-collision data)
 # If running from RAW the eventdata_items are none or emtpy
 from RecExConfig.InputFilePeeker import inputFileSummary
+from AthenaCommon import CfgMgr
+from AthenaCommon.AppMgr import ToolSvc
 from AthenaCommon.BeamFlags import jobproperties
 from InDetRecExample.InDetJobProperties import InDetFlags
 
@@ -47,8 +49,7 @@ if have_PV_container :
 #=======================================
 # CREATE THE DERIVATION KERNEL ALGORITHM   
 #=======================================
-    
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
+
     DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("InDetCommonKernel",
                                                                              AugmentationTools = [DFCommonTrackSelection,DFCommonZ0AtPV]
                                                                              )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt
index a1044f0500ec8de4f91bf7bdcfd4b900d0b16330..f7b7f6f31067eda7f33fb11d51ff968eebc407fd 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/CMakeLists.txt
@@ -13,5 +13,5 @@ atlas_add_component( DerivationFrameworkJetEtMiss
                      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthLinks AthenaBaseComps DerivationFrameworkInterfaces FTagAnalysisInterfacesLib GaudiKernel InDetTrackSelectionToolLib JetAnalysisInterfacesLib JetInterface PFlowUtilsLib ParticleJetToolsLib PathResolver StoreGateLib TrackVertexAssociationToolLib TrigAnalysisInterfaces xAODCaloEvent xAODCore xAODEventInfo xAODJet xAODPFlow xAODTracking xAODTrigger xAODTruth )
 
 # 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 )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py
index 739e6b3bfa324ad820e6d6ab9fc5214100b03dc3..082f7414d39394a1a6ee8b05fb6729cf565f33f8 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/ExtendedJetCommon.py
@@ -5,11 +5,11 @@
 # Schedules special jet tools
 #********************************************************************
 
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from DerivationFrameworkJetEtMiss.JetCommon import *
-from JetRec.JetRecFlags import jetFlags
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob, DerivationFrameworkIsMonteCarlo
+from DerivationFrameworkJetEtMiss.JetCommon import addStandardJets, addSoftDropJets, addTrimmedJets
 from JetJvtEfficiency.JetJvtEfficiencyToolConfig import (getJvtEffTool, getJvtEffToolName)
 
+from AthenaCommon import CfgMgr
 from AthenaCommon import Logging
 extjetlog = Logging.logging.getLogger('ExtendedJetCommon')
 
@@ -44,6 +44,7 @@ def addTCCTrimmedJets(sequence,outputlist,dotruth=True,writeUngroomed=False):
                    algseq=sequence, outputGroup=outputlist, writeUngroomed=writeUngroomed)
 
 def addCSSKSoftDropJets(sequence, seq_name, logger=extjetlog):
+    from DerivationFrameworkFlavourTag.HbbCommon import addVRJets, buildVRJets
     vrJetName, vrGhostLabel = buildVRJets(
         sequence, do_ghost=True, logger=logger)
 
@@ -115,15 +116,17 @@ def addAntiKt4TruthDressedWZJets(sequence,outputlist):
         addStandardJets("AntiKt", 0.4, "TruthDressedWZ", ptmin=5000, mods="truth_ungroomed", algseq=sequence, outputGroup=outputlist)
 
 def addAntiKt10TruthJets(sequence,outputlist):
+    from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkHasTruth
     if DerivationFrameworkHasTruth:
         addStandardJets("AntiKt", 1.0, "Truth", ptmin=40000, mods="truth_ungroomed_larger", algseq=sequence, outputGroup=outputlist)
 
 def addAntiKt10TruthWZJets(sequence,outputlist):
+    from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkHasTruth
     if DerivationFrameworkHasTruth:
         addStandardJets("AntiKt", 1.0, "TruthWZ", ptmin=40000, mods="truth_ungroomed_larger", algseq=sequence, outputGroup=outputlist)
 
 def addAntiKt4EMPFlowJetsFE(sequence, outputlist):
-    addCHSPFlowObjectsFE()
+    addCHSPFlowObjectsFE()   # noqa: F821 (FIXME, does not exist)
     addStandardJets("AntiKt", 0.4, "EMPFlowFE", ptmin=10000, ptminFilter=15000, mods="pflow_ungroomed", algseq=sequence, outputGroup=outputlist)
 
 ##################################################################  
@@ -147,7 +150,7 @@ def replaceAODReducedJets(jetlist,sequence,outputlist):
     if "AntiKt10TruthWZJets" in jetlist:
         addAntiKt10TruthWZJets(sequence,outputlist)
     if "AntiKt2LCTopoJets" in jetlist:
-        addAntiKt2LCTopoJets(sequence,outputlist)
+        addAntiKt2LCTopoJets(sequence,outputlist)  # noqa: F821 (FIXME, does not exist)
     if "AntiKt10LCTopoJets" in jetlist:
         addAntiKt10LCTopoJets(sequence,outputlist)
 
@@ -187,7 +190,7 @@ def applyJetAugmentation(jetalg,algname,sequence,jetaugtool):
         jetaug = CfgMgr.DerivationFramework__CommonAugmentation(algname)
         sequence += jetaug
 
-    if not jetaugtool in jetaug.AugmentationTools:
+    if jetaugtool not in jetaug.AugmentationTools:
         jetaug.AugmentationTools.append(jetaugtool)
 
 def getJetAugmentationTool(jetalg, suffix=''):
@@ -253,7 +256,7 @@ def applyJetCalibration(jetalg,algname,sequence,largeRjetconfig = 'comb', suffix
         isdata=False
 
         #largeRconfig selects config file for AntiKt10LCTopoTrimmedPtFrac5SmallR20, default is JES_MC16recommendation_FatJet_JMS_comb_19Jan2018.config
-        if not largeRjetconfig in ['comb','calo','TA']:
+        if largeRjetconfig not in ['comb','calo','TA']:
             extjetlog.warning('*** Wrong value for fatjetconfig!  Only \'comb\' (default), \'calo\' or \'TA\' can be used. ***')
 
         #Warning: these are quite outdated ... leaving for validation purposes for now
@@ -280,6 +283,7 @@ def applyJetCalibration(jetalg,algname,sequence,largeRjetconfig = 'comb', suffix
         isMC = DerivationFrameworkIsMonteCarlo
         isAF2 = False
         if isMC:
+            from RecExConfig.InputFilePeeker import inputFileSummary
             isAF2 = 'ATLFASTII' in inputFileSummary['metadata']['/Simulation/Parameters']['SimulationFlavour'].upper()
         if isMC and isAF2:
             ## Warning: these are quite outdated ... leaving for validation purposes for now
@@ -312,7 +316,7 @@ def applyJetCalibration(jetalg,algname,sequence,largeRjetconfig = 'comb', suffix
 
 def applyJetCalibration_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     supportedJets = ['AntiKt4EMTopo','AntiKt4LCTopo','AntiKt4EMPFlow','AntiKt4EMTopo_BTagging201810','AntiKt4EMPFlow_BTagging201810']
-    if not jetalg in supportedJets:
+    if jetalg not in supportedJets:
         extjetlog.warning('*** Calibration requested for unsupported jet collection '+jetalg+'! ***')
         return
     else:
@@ -322,7 +326,7 @@ def applyJetCalibration_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrame
 
 def applyJetCalibration_CustomColl(jetalg='AntiKt10LCTopoTrimmedPtFrac5SmallR20',sequence=None):
     supportedJets = ['AntiKt10LCTopoTrimmedPtFrac5SmallR20','AntiKt2LCTopo']
-    if not jetalg in supportedJets:
+    if jetalg not in supportedJets:
         extjetlog.warning('*** Calibration requested for unsupported jet collection! ***')
         extjetlog.warning('Supported custom jets: '+supportedJets)
         return
@@ -335,7 +339,7 @@ def applyJetCalibration_CustomColl(jetalg='AntiKt10LCTopoTrimmedPtFrac5SmallR20'
 
 def updateJVT(jetalg,algname,sequence, suffix = '',customVxColl = 'PrimaryVertices'):
     jetaugtool = getJetAugmentationTool(jetalg, suffix)
-    if(jetaugtool==None or jetaugtool.JetCalibTool==''):
+    if(jetaugtool is None or jetaugtool.JetCalibTool==''):
         extjetlog.warning('*** JVT update called but corresponding augmentation tool does not exist! ***')
         extjetlog.warning('*** You must apply jet calibration before scheduling JVT! ***')
 
@@ -381,7 +385,7 @@ def updateJVT(jetalg,algname,sequence, suffix = '',customVxColl = 'PrimaryVertic
 
 def updateJVT_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     supportedJets = ['AntiKt4EMTopo','AntiKt4EMPFlow','AntiKt4EMTopo_BTagging201810','AntiKt4EMPFlow_BTagging201810']
-    if not jetalg in supportedJets:
+    if jetalg not in supportedJets:
         extjetlog.warning('*** JVT update requested for unsupported jet collection {}! ***'.format(jetalg))
         return
     else:
@@ -391,7 +395,7 @@ def updateJVT_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
 
 def addJetPtAssociation(jetalg, truthjetalg, sequence, algname):
     jetaugtool = getJetAugmentationTool(jetalg, '_PtAssoc')
-    if(jetaugtool==None):
+    if(jetaugtool is None):
         extjetlog.warning('*** addJetPtAssociation called but corresponding augmentation tool does not exist! ***')
 
     jetptassociationtoolname = 'DFJetPtAssociation_'+truthjetalg
@@ -413,10 +417,10 @@ def addJetTruthLabel(jetalg,algname,labelname,sequence):
     supportedTruthJets = ['AntiKt10Truth','AntiKt10TruthTrimmedPtFrac5SmallR20']
     supportedRecoJets = ['AntiKt10LCTopoTrimmedPtFrac5SmallR20','AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20','AntiKt10UFOCSSKTrimmedPtFrac5SmallR20','AntiKt10UFOCSSKSoftDropBeta100Zcut10','AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5','AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5Ninf','AntiKt10UFOCHSTrimmedPtFrac5SmallR20']
     supportedJets = supportedRecoJets + supportedTruthJets
-    if not jetalg in supportedJets:
+    if jetalg not in supportedJets:
         extjetlog.warning('*** JetTruthLabeling augmentation requested for unsupported jet collection {}! ***'.format(jetalg))
         return
-    elif not labelname in supportedLabelNames:
+    elif labelname not in supportedLabelNames:
         extjetlog.warning('*** JetTruthLabeling augmentation requested for unsupported label definition {}! ***'.format(labelname))
         return
     else:
@@ -426,7 +430,7 @@ def addJetTruthLabel(jetalg,algname,labelname,sequence):
 
         jetaugtool = getJetAugmentationTool(jetalg)
 
-        if(jetaugtool==None):
+        if(jetaugtool is None):
             extjetlog.warning('*** addJetTruthLabel called but corresponding augmentation tool does not exist! ***')
             return
 
@@ -451,7 +455,7 @@ def applyBTaggingAugmentation(jetalg,algname='default',sequence=DerivationFramew
       algname = 'JetCommonKernel_{0}'.format(jetalg)
     jetaugtool = getJetAugmentationTool(jetalg)
 
-    if(jetaugtool==None or jetaugtool.JetCalibTool=='' or jetaugtool.JetJvtTool==''):
+    if(jetaugtool is None or jetaugtool.JetCalibTool=='' or jetaugtool.JetJvtTool==''):
         extjetlog.warning('*** B-tagging called but corresponding augmentation tool does not exist! ***')
         extjetlog.warning('*** You must apply jet calibration and JVT! ***')
 
@@ -474,12 +478,12 @@ def applyBTaggingAugmentation(jetalg,algname='default',sequence=DerivationFramew
 #################################################################
 def addQGTaggerTool(jetalg, sequence, algname, truthjetalg=None ):
     jetaugtool = getJetAugmentationTool(jetalg,'_qgTag')
-    if(jetaugtool==None):
+    if(jetaugtool is None):
         extjetlog.warning('*** addQGTaggerTool called but corresponding augmentation tool does not exist! ***')
 
     from AthenaCommon.AppMgr import ToolSvc
 
-    if truthjetalg!=None:
+    if truthjetalg is not None:
         jetptassociationtoolname = 'DFJetPtAssociation_'+truthjetalg+'_'+jetalg
         if hasattr(ToolSvc,jetptassociationtoolname):
             jetaugtool.JetPtAssociationTool = getattr(ToolSvc,jetptassociationtoolname)
@@ -567,7 +571,6 @@ def getJetCleaningTool(cleaningLevel):
 def eventCleanLoose_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool
     from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg
-    jetcleaningtoolname = "EventCleaningTool_Loose"
     prefix = "DFCommonJets_"
     ecToolLoose = EventCleaningTool('EventCleaningTool_Loose',CleaningLevel='LooseBad')
     ecToolLoose.JetCleanPrefix = prefix
@@ -583,7 +586,6 @@ def eventCleanLoose_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFramework
 def eventCleanTight_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool
     from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg
-    jetcleaningtoolname = "EventCleaningTool_Tight"
     prefix = "DFCommonJets_"
     ecToolTight = EventCleaningTool('EventCleaningTool_Tight',CleaningLevel='TightBad')
     ecToolTight.JetCleanPrefix = prefix
@@ -601,7 +603,6 @@ def eventCleanTight_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFramework
 def eventCleanLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool
     from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg
-    jetcleaningtoolname = "EventCleaningTool_LooseLLP"
     prefix = "DFCommonJets_"
     ecToolLooseLLP = EventCleaningTool('EventCleaningTool_LooseLLP',CleaningLevel='LooseBadLLP')
     ecToolLooseLLP.JetCleanPrefix = prefix
@@ -619,7 +620,6 @@ def eventCleanLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFramew
 def eventCleanVeryLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool
     from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg
-    jetcleaningtoolname = "EventCleaningTool_VeryLooseLLP"
     prefix = "DFCommonJets_"
     #Do not save decorations, which are anyway not listed in AntiKt4EMTopoJetsCPContent.py
     ecToolVeryLooseLLP = EventCleaningTool('EventCleaningTool_VeryLooseLLP',CleaningLevel='VeryLooseBadLLP')
@@ -638,7 +638,6 @@ def eventCleanVeryLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFr
 def eventCleanSuperLooseLLP_xAODColl(jetalg='AntiKt4EMTopo',sequence=DerivationFrameworkJob):
     from JetSelectorTools.JetSelectorToolsConf import ECUtils__EventCleaningTool as EventCleaningTool
     from JetSelectorTools.JetSelectorToolsConf import EventCleaningTestAlg
-    jetcleaningtoolname = "EventCleaningTool_SuperLooseLLP"
     prefix = "DFCommonJets_"
     #Do not save decorations, which are anyway not listed in AntiKt4EMTopoJetsCPContent.py
     ecToolSuperLooseLLP = EventCleaningTool('EventCleaningTool_SuperLooseLLP',CleaningLevel='SuperLooseBadLLP')
@@ -744,13 +743,13 @@ def addOriginCorrectedClusters(slimhelper,writeLC=False,writeEM=False):
     slimhelper.ExtraVariables.append('CaloCalTopoClusters.calE.calEta.calPhi.calM')
 
     if writeLC:
-        if not slimhelper.AppendToDictionary.has_key("LCOriginTopoClusters"):
+        if "LCOriginTopoClusters" not in slimhelper.AppendToDictionary:
             slimhelper.AppendToDictionary["LCOriginTopoClusters"]='xAOD::CaloClusterContainer'
             slimhelper.AppendToDictionary["LCOriginTopoClustersAux"]='xAOD::ShallowAuxContainer'
             slimhelper.ExtraVariables.append('LCOriginTopoClusters.calEta.calPhi')
 
     if writeEM:
-        if not slimhelper.AppendToDictionary.has_key("EMOriginTopoClusters"):
+        if "EMOriginTopoClusters" not in slimhelper.AppendToDictionary:
             slimhelper.AppendToDictionary["EMOriginTopoClusters"]='xAOD::CaloClusterContainer'
             slimhelper.AppendToDictionary["EMOriginTopoClustersAux"]='xAOD::ShallowAuxContainer'
             slimhelper.ExtraVariables.append('EMOriginTopoClusters.calE.calEta.calPhi')
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/HiggsCustomMET.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/HiggsCustomMET.py
index c693ed07685548c8bac12194d9dc4304d91d78c3..279a827b7b3a595261db718c3c2c6d81f6c315cd 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/HiggsCustomMET.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/HiggsCustomMET.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 # Set up custom MET reconstruction algorithms
 from METReconstruction.METRecoFlags import metFlags
 from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig, getMETRecoAlg
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py
index cca3d4b75189fa213237e34e2e3e6bc14232c76e..1d104b57b25493eb1d59fde98db74b0062cbc360 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetCommon.py
@@ -6,11 +6,9 @@
 # results into SG. These may then be accessed along the train  
 #********************************************************************
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 from AthenaCommon.GlobalFlags  import globalflags
-
+from AthenaCommon import CfgMgr
 from AthenaCommon import Logging
 dfjetlog = Logging.logging.getLogger('JetCommon')
 
@@ -47,7 +45,7 @@ else:
         else:
             batmanaugtool = CfgMgr.DerivationFramework__BadBatmanAugmentationTool("BadBatmanAugmentationTool")
             ToolSvc += batmanaugtool
-        if not batmanaugtool in batmanaug.AugmentationTools:
+        if batmanaugtool not in batmanaug.AugmentationTools:
             batmanaug.AugmentationTools.append(batmanaugtool)
     else:
         if not objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ):
@@ -61,8 +59,6 @@ def defineEDAlg(R=0.4, inputtype="LCTopo"):
     from EventShapeTools.EventDensityConfig import configEventDensityTool, EventDensityAlg
     from AthenaCommon.AppMgr import ToolSvc
 
-    from JetRec.JetRecStandard import jtm
-
     t=configEventDensityTool("EDTool"+str(int(R*10))+inputtype,
                              inputlabel = inputtype,
                              radius = R)
@@ -85,7 +81,6 @@ def moveEDAlg(seq):
 def addGhostAssociation(DerivationFrameworkJob):
 
     from JetRec.JetRecStandard import jtm
-    from JetRec.JetRecConf import PseudoJetGetter
 
     flavorgetters1 = []
     for ptype in jetFlags.truthFlavorTags():
@@ -109,7 +104,6 @@ def reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale=-1.0, variab
     from JetRec.JetRecUtils import buildJetContName
     constmodstr = "".join(constmods)
     inputname = inputtype+constmodstr
-    label = inputtype + constmodstr
     jetContName = buildJetContName(jetalg, rsize, inputname, variableRMassScale, variableRMinRadius)
 
     # Set default for the arguments to be passd to addJetFinder
@@ -232,7 +226,6 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder,
     from JetRec.JetRecUtils import buildJetContName
     constmodstr = "".join(constmods)
     inputname = inputtype+constmodstr
-    label = inputtype + constmodstr
     ungroomedName = buildJetContName(jetalg, rsize, inputname, variableRMassScale, variableRMinRadius)
     ungroomedalgname = "jetalg"+ungroomedName[:-4] # Remove "Jets" from name
 
@@ -256,12 +249,13 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder,
         # this returns a list of the needed tools to do so.
         jetalgTools = reCreatePseudoJets(jetalg, rsize, inputtype, variableRMassScale, variableRMinRadius, algseq, constmods=constmods)
 
-        if includePreTools and jetFlags.useTracks() and not "Truth" in inputtype:
+        if includePreTools and jetFlags.useTracks() and "Truth" not in inputtype:
             # enable track ghost association and JVF
+            from JetRec.JetRecStandard import jtm
             jetalgTools =  [jtm.tracksel, jtm.tvassoc] + jetalgTools 
 
         finderalg = JetAlgorithm(ungroomedalgname, Tools = jetalgTools )
-        DFJetAlgs[ungroomedalgname] = finderalg;
+        DFJetAlgs[ungroomedalgname] = finderalg
         dfjetlog.info( "Added jet finder "+ungroomedalgname+" to sequence "+algseq.name() )
         algseq += finderalg
 
@@ -275,7 +269,7 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder,
     
     dfjetlog.info( "Added jet groomer "+algname+" to sequence "+algseq.name() )
     groomeralg = JetAlgorithm(algname, Tools = [fatjet_groom])
-    DFJetAlgs[algname] = groomeralg;
+    DFJetAlgs[algname] = groomeralg
     algseq += groomeralg
     return groomeralg
 
@@ -283,7 +277,6 @@ def buildGenericGroomAlg(jetalg, rsize, inputtype, groomedName, jetToolBuilder,
 def addTrimmedJets(jetalg, rsize, inputtype, rclus=0.3, ptfrac=0.05, mods="groomed",
                    includePreTools=False, algseq=None, outputGroup="Trimmed",
                    writeUngroomed=False, variableRMassScale=-1.0, variableRMinRadius=-1.0, constmods=[]):
-    from JetRec.JetRecUtils import buildJetContName
     from JetRec.JetRecUtils import buildJetAlgName
     inputname = inputtype + "".join(constmods)
     trimmedName = "{0}{1}TrimmedPtFrac{2}SmallR{3}Jets".format(buildJetAlgName(jetalg, rsize, variableRMassScale, variableRMinRadius),inputname,int(ptfrac*100),int(rclus*100))
@@ -437,7 +430,7 @@ def addStandardJets(jetalg, rsize, inputtype, ptmin=0., ptminFilter=0.,
         return DFJetAlgs[algname]
 
     from JetRec.JetRecStandard import jtm
-    if not jetname in jtm.tools:
+    if jetname not in jtm.tools:
         # no container exist. simply build a new one.
         # Set default for the arguments to be passd to addJetFinder
         defaultmods = {"EMTopo":"emtopo_ungroomed",
@@ -520,7 +513,7 @@ def addDistanceInTrain(sequence=DerivationFrameworkJob):
                 ToolSvc += BunchCrossingTool( "LHC" )
                 distanceintrainaugtool.BCTool = "Trig::LHCBunchCrossingTool/BunchCrossingTool"
             ToolSvc += distanceintrainaugtool
-        if not distanceintrainaugtool in distanceintrainaug.AugmentationTools:
+        if distanceintrainaugtool not in distanceintrainaug.AugmentationTools:
             distanceintrainaug.AugmentationTools.append(distanceintrainaugtool)
 
 ##################################################################
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMetCustomMET.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMetCustomMET.py
index e22122c4cc9b11ccd6fbf7519b0731f96712bfcd..77160cfe3ee42e8f5b2dd0c33d44865af12f23ac 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMetCustomMET.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMetCustomMET.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 # Set up custom MET reconstruction algorithms
 from METReconstruction.METRecoFlags import metFlags
 from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig, getMETRecoAlg
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMomentFix.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMomentFix.py
index eb775e1f712168548404dd769e85d4f37479a6f5..caefab41b99807604d09b6f4c0fd487570bdb6e8 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMomentFix.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/JetMomentFix.py
@@ -5,13 +5,11 @@
 # Schedules jet moment corrections
 #********************************************************************
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from DerivationFrameworkJetEtMiss.JetCommon import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 
 from JetRec.JetRecConf import JetAlgorithm
-from DerivationFrameworkJetEtMiss.DFJetMetFlags import *
+from JetRec.JetRecStandard import jtm
+from DerivationFrameworkJetEtMiss.DFJetMetFlags import dfjmFlags
 
 if dfjmFlags.doJetTrackMomentFix:
     print ("Scheduling jet track moment fix: ")
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METCommon.py
index dc7b3b4f924fa13f77594c0003a3615fa0a22255..f1225557349114474fa945d122817f8d8a8b62ab 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METCommon.py
@@ -5,9 +5,8 @@
 # Schedules default DF MET content building tools and writes the
 # results into SG. These may then be accessed along the train  
 #********************************************************************
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from AthenaCommon import CfgMgr
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 
 ##########################################################################################
 # MET
@@ -73,7 +72,7 @@ metalgs = {}
 def addMETTruthMap(jetcoll='AntiKt4EMTopo',configlist="CustomMET"):
     assocname = 'Truth_'+jetcoll
     customMETConfigs.setdefault(configlist,{})
-    if not assocname in customMETConfigs[configlist]:
+    if assocname not in customMETConfigs[configlist]:
         from METReconstruction.METAssocConfig import METAssocConfig,AssocConfig
         cfg_truthassoc = METAssocConfig(assocname,
                         [AssocConfig('Truth',jetcoll+'Jets')],
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METTriggerDerivationContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METTriggerDerivationContent.py
index 368277ad4a23c477c38e1a0ae77ec73dbd82329b..d4fb08f284d085b2047569907e2331188688d1c2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METTriggerDerivationContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/METTriggerDerivationContent.py
@@ -1,13 +1,11 @@
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from DerivationFrameworkJetEtMiss.JetCommon import *
-from DerivationFrameworkJetEtMiss.ExtendedJetCommon import *
-from DerivationFrameworkJetEtMiss.METCommon import *
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon import CfgMgr
 
 from DerivationFrameworkCore.ThinningHelper import ThinningHelper
 from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning, DerivationFramework__MuonTrackParticleThinning, DerivationFramework__EgammaTrackParticleThinning, DerivationFramework__TauTrackParticleThinning
 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
 from AthenaCommon.SystemOfUnits import GeV
-from AthenaCommon.AppMgr import ToolSvc
 from DerivationFrameworkJetEtMiss.PFlowCommon import applyPFOAugmentation
 
 class METTriggerDerivationContentManager(object):
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowCommon.py
index 2a0dff341119b21e95cbe8af473fd00e035ac592..0adbc619dc0773bb5baa836a89ed35b63ad7572a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowCommon.py
@@ -1,8 +1,7 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from AthenaCommon import CfgMgr
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 
 def applyPFOAugmentation(sequence=DerivationFrameworkJob):
 
@@ -26,7 +25,7 @@ def applyPFOAugmentation(sequence=DerivationFrameworkJob):
             pfoaugtool = CfgMgr.DerivationFramework__PFlowAugmentationTool("PFlowAugmentationTool",
                                                                            WeightPFOTool=weightpfotool)
             ToolSvc += pfoaugtool
-        if not pfoaugtool in pfaug.AugmentationTools:
+        if pfoaugtool not in pfaug.AugmentationTools:
             pfaug.AugmentationTools.append(pfoaugtool)        
 
 ##################################################################
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowJetCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowJetCommon.py
index d853948733e5f31944a236481f1688ae2985c77b..1e21d0fd4b5d2d39aa6c59e10a3d86af37816b17 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowJetCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/PFlowJetCommon.py
@@ -1,15 +1,13 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #********************************************************************
 # PFlowJetCommon.py
 # Schedules special jet tools
 #********************************************************************
 
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from DerivationFrameworkJetEtMiss.JetCommon import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
+from DerivationFrameworkJetEtMiss.JetCommon import addPFlowJets
 
-from JetRec.JetRecStandard import jtm
-from JetRec.JetRecConf import JetAlgorithm
 jetalg1 = addPFlowJets("EM", 0.4)
 jetalg2 = addPFlowJets("EMC", 0.4)
 DerivationFrameworkJob += jetalg1
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/SUSYCustomMET.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/SUSYCustomMET.py
index c3f99bfe905b5fb3ef003050710857c5ef28f758..b5e4faf21ef35dad13df995c5aa637edf7672add 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/SUSYCustomMET.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/SUSYCustomMET.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 # Set up custom MET reconstruction algorithms
 from METReconstruction.METRecoFlags import metFlags
 from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig, getMETRecoAlg
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/TopCustomMET.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/TopCustomMET.py
index 3e833445ed9b1f49dfa78cfc0d3575f1f6044dbc..bfe028791df65269f39d14a8882dfcfd4de7b6c6 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/TopCustomMET.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/python/TopCustomMET.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from __future__ import print_function
-
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 # Set up custom MET reconstruction algorithms
 from METReconstruction.METRecoFlags import metFlags
 from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig, getMETRecoAlg
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt
index 4d703be048a6917beb4a40bca3b01b13c439279d..c3e0c29fb35b887d0b978f89e82ab0f0aeb82c86 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/CMakeLists.txt
@@ -16,6 +16,6 @@ atlas_add_component( DerivationFrameworkMCTruth
                      LINK_LIBRARIES ${Boost_LIBRARIES} ${FASTJET_LIBRARIES} ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AtlasHepMCLib DerivationFrameworkInterfaces ExpressionEvaluationLib GaudiKernel GenInterfacesLib GeneratorObjects MCTruthClassifierLib StoreGateLib TauAnalysisToolsLib TruthUtils xAODBase xAODEgamma xAODEventInfo xAODEventShape xAODJet xAODMuon xAODTruth )
 
 # 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 )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/HFHadronsCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/HFHadronsCommon.py
index 56af6be1820f0fdea8a69ef9378750b3f4e02ca0..e2287b4056f33dfebbc4b4c3790ff335980072ff 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/HFHadronsCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/HFHadronsCommon.py
@@ -3,7 +3,10 @@
 #############################################
 # Heavy flavour from tt tools
 #############################################
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from AthenaCommon import CfgMgr
+from AthenaCommon.AppMgr import ToolSvc
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
+
 DSIDList=[
   410000,
   410001,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/MCTruthCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/MCTruthCommon.py
index b120796b22269b6da7f4cb750aa75d895f93d763..8ba6d1969e81d24a8be3d417e8bce4d6ec7c8773 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/MCTruthCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/MCTruthCommon.py
@@ -1,11 +1,12 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Add translator from EVGEN input to xAOD-like truth here
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 from RecExConfig.ObjKeyStore import objKeyStore
 from xAODTruthCnv.xAODTruthCnvConf import xAODMaker__xAODTruthCnvAlg
-from DerivationFrameworkMCTruth.TruthDerivationTools import *
+import DerivationFrameworkMCTruth.TruthDerivationTools as dfTruth
 
+from AthenaCommon import CfgMgr
 from AthenaCommon import Logging
 dfcommontruthlog = Logging.logging.getLogger('DFCommonTruth')
 
@@ -53,7 +54,6 @@ def addTruthJetsEVNT(kernel=None, decorationDressing=None):
         kernel = DerivationFrameworkJob
     # Add jet algorithms if they aren't there
     from JetRec.JetRecStandard import jtm
-    from JetRec.JetRecConf import JetAlgorithm
     truth_modifiers = [jtm.truthpartondr, jtm.partontruthlabel, jtm.jetdrlabeler, jtm.trackjetdrlabeler]
     if not objKeyStore.isInInput( "xAOD::JetContainer","AntiKt4TruthJets") and not hasattr(kernel,'jetalgAntiKt4Truth'):
         # Standard truth jets
@@ -77,7 +77,7 @@ def addTruthJetsEVNT(kernel=None, decorationDressing=None):
     if not objKeyStore.isInInput( "xAOD::JetContainer","AntiKt10TruthJets") and not hasattr(kernel,'jetalgAntiKt10Truth'):
         # AntiKt2 truth charged jets ghost association
         from JetRec.JetRecConf import PseudoJetGetter
-        if not 'gakt2truthchargedget' in jtm.tools:
+        if 'gakt2truthchargedget' not in jtm.tools:
             jtm += PseudoJetGetter("gakt2truthchargedget", # give a unique name
                                     InputContainer = "AntiKt2TruthChargedJets", # SG key
                                     Label = "GhostAntiKt2TruthChargedJets",   # this is the name you'll use to retrieve associated ghosts
@@ -104,9 +104,10 @@ def addTruthJetsEVNT(kernel=None, decorationDressing=None):
 
     if not objKeyStore.isInInput( "xAOD::JetContainer","AntiKt10TruthTrimmedPtFrac5SmallR20Jets") and not hasattr(kernel,'jetalgAntiKt10TruthTrimmedPtFrac5SmallR20'):
         #Large R jets
-        from DerivationFrameworkJetEtMiss.JetCommon import addTrimmedJets
+        #from DerivationFrameworkJetEtMiss.JetCommon import addTrimmedJets
         #addTrimmedJets('AntiKt', 1.0, 'Truth', rclus=0.2, ptfrac=0.05, mods="truth_groomed",
         #               algseq=kernel, outputGroup="Trimmed", writeUngroomed=False)
+        pass
 
 def addTruthJetsAOD(kernel=None, decorationDressing=None):
     # Ensure that we are adding it to something
@@ -122,9 +123,10 @@ def addTruthJetsAOD(kernel=None, decorationDressing=None):
     #    addAntiKt4TruthDressedWZJets(kernel,'TRUTH')
     if not objKeyStore.isInInput( "xAOD::JetContainer","AntiKt10TruthTrimmedPtFrac5SmallR20Jets"):
         #Large R jets
-        from DerivationFrameworkJetEtMiss.JetCommon import addTrimmedJets
+        #from DerivationFrameworkJetEtMiss.JetCommon import addTrimmedJets
         #addTrimmedJets('AntiKt', 1.0, 'Truth', rclus=0.2, ptfrac=0.05, mods="truth_groomed",
         #               algseq=kernel, outputGroup="Trimmed", writeUngroomed=False)
+        pass
     elif not objKeyStore.isInInput( "xAOD::JetContainer","AntiKt10TruthJets"):
         addAntiKt10TruthJets(kernel,"TRUTH")
 
@@ -143,7 +145,7 @@ def addTruthJets(kernel=None, decorationDressing=None):
             barCodeFromMetadata=0
         from JetRec.JetRecStandardToolManager import jtm
         from ParticleJetTools.ParticleJetToolsConf import CopyTruthJetParticles
-        if not 'truthpartdressedwz' in jtm.tools:
+        if 'truthpartdressedwz' not in jtm.tools:
             jtm += CopyTruthJetParticles("truthpartdressedwz", OutputName="JetInputTruthParticlesDressedWZ",
                                           MCTruthClassifier=jtm.JetMCTruthClassifier,
                                           #IncludePromptLeptons=False,#IncludePromptPhotons=False,
@@ -157,7 +159,7 @@ def addTruthJets(kernel=None, decorationDressing=None):
         kernel += JetAlgorithm("jetdressedwzalg")
         jetdressedwzalg = kernel.jetdressedwzalg
         jetdressedwzalg.Tools = [ jtm.jetdressedwzrun ]
-        if not 'truthdressedwzget' in jtm.tools:
+        if 'truthdressedwzget' not in jtm.tools:
             jtm += PseudoJetGetter("truthdressedwzget",
                                    Label = "TruthDressedWZ",
                                    InputContainer = jtm.truthpartdressedwz.OutputName,
@@ -175,10 +177,10 @@ def addTruthJets(kernel=None, decorationDressing=None):
         # make sure if we are using EVNT that we don't try to check sim metadata
         barCodeFromMetadata=2
         if objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ):
-            barCodeFromMetadata=0
+            barCodeFromMetadata=0   # noqa: F841 (kept for documentation purposes)
         from JetRec.JetRecStandardToolManager import jtm
         from ParticleJetTools.ParticleJetToolsConf import CopyTruthJetParticles
-        if not 'truthpartcharged' in jtm.tools:
+        if 'truthpartcharged' not in jtm.tools:
             jtm += CopyTruthJetParticles("truthpartcharged", OutputName="JetInputTruthParticlesCharged",
                                          MCTruthClassifier=jtm.JetMCTruthClassifier,
                                          #ChargedParticlesOnly=True,
@@ -191,7 +193,7 @@ def addTruthJets(kernel=None, decorationDressing=None):
         kernel += JetAlgorithm("jetchargedalg")
         jetchargedalg = kernel.jetchargedalg
         jetchargedalg.Tools = [ jtm.jetchargedrun ]
-        if not 'truthchargedget' in jtm.tools:
+        if 'truthchargedget' not in jtm.tools:
             jtm += PseudoJetGetter("truthchargedget",
                                    Label = "TruthCharged",
                                    InputContainer = jtm.truthpartcharged.OutputName,
@@ -216,7 +218,7 @@ def addTruthMET(kernel=None):
     # This should handle EVNT correctly without an explicit check
     from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
     if not objKeyStore.isInInput( "xAOD::MissingETContainer","MET_Truth") and not hasattr(DerivationFrameworkJob,"METReconstruction"):
-        import METReconstruction.METConfig_Truth
+        import METReconstruction.METConfig_Truth  # noqa: F401
         from METReconstruction.METRecoConfig import getMETRecoAlg
         metAlg = getMETRecoAlg('METReconstruction')
         kernel += metAlg
@@ -232,24 +234,24 @@ def schedulePreJetMCTruthAugmentations(kernel=None, decorationDressing=None):
     # These augmentations do *not* require truth jets at all
     # If requested, add a decoration to photons that were used in the dressing
     if decorationDressing is not None:
-        DFCommonTruthElectronDressingTool.decorationName = decorationDressing
-        DFCommonTruthMuonDressingTool.decorationName = decorationDressing
+        dfTruth.DFCommonTruthElectronDressingTool.decorationName = decorationDressing
+        dfTruth.DFCommonTruthMuonDressingTool.decorationName = decorationDressing
 
     # schedule the special truth building tools and add them to a common augmentation; note taus are handled separately below
-    augmentationToolsList = [ DFCommonTruthClassificationTool,
-                              DFCommonTruthMuonTool,DFCommonTruthElectronTool,
-                              DFCommonTruthPhotonToolSim,
-                              DFCommonTruthNeutrinoTool,
-                              DFCommonTruthBottomTool,
-                              DFCommonTruthTopTool,
-                              DFCommonTruthBosonTool,
-                              DFCommonTruthBSMTool,
-                              DFCommonTruthForwardProtonTool,
-                              DFCommonTruthElectronDressingTool, DFCommonTruthMuonDressingTool,
-                              DFCommonTruthElectronIsolationTool1, DFCommonTruthElectronIsolationTool2,
-                              DFCommonTruthMuonIsolationTool1, DFCommonTruthMuonIsolationTool2,
-                              DFCommonTruthPhotonIsolationTool1, DFCommonTruthPhotonIsolationTool2, DFCommonTruthPhotonIsolationTool3]
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
+    augmentationToolsList = [ dfTruth.DFCommonTruthClassificationTool,
+                              dfTruth.DFCommonTruthMuonTool,dfTruth.DFCommonTruthElectronTool,
+                              dfTruth.DFCommonTruthPhotonToolSim,
+                              dfTruth.DFCommonTruthNeutrinoTool,
+                              dfTruth.DFCommonTruthBottomTool,
+                              dfTruth.DFCommonTruthTopTool,
+                              dfTruth.DFCommonTruthBosonTool,
+                              dfTruth.DFCommonTruthBSMTool,
+                              dfTruth.DFCommonTruthForwardProtonTool,
+                              dfTruth.DFCommonTruthElectronDressingTool, dfTruth.DFCommonTruthMuonDressingTool,
+                              dfTruth.DFCommonTruthElectronIsolationTool1, dfTruth.DFCommonTruthElectronIsolationTool2,
+                              dfTruth.DFCommonTruthMuonIsolationTool1, dfTruth.DFCommonTruthMuonIsolationTool2,
+                              dfTruth.DFCommonTruthPhotonIsolationTool1, dfTruth.DFCommonTruthPhotonIsolationTool2, dfTruth.DFCommonTruthPhotonIsolationTool3]
+
     kernel += CfgMgr.DerivationFramework__CommonAugmentation("MCTruthCommonPreJetKernel",
                                                              AugmentationTools = augmentationToolsList
                                                              )
@@ -272,7 +274,7 @@ def schedulePostJetMCTruthAugmentations(kernel=None, decorationDressing=None):
     # truth tau matching needs truth jets, truth electrons and truth muons
     from DerivationFrameworkTau.TauTruthCommon import scheduleTauTruthTools
     scheduleTauTruthTools(kernel)
-    augmentationToolsList = [ DFCommonTruthTauDressingTool ]
+    augmentationToolsList = [ dfTruth.DFCommonTruthTauDressingTool ]
 
     #Save the post-shower HT and MET filter values that will make combining filtered samples easier (adds to the EventInfo)
     #from DerivationFrameworkMCTruth.GenFilterToolSetup import DFCommonTruthGenFilter
@@ -293,8 +295,7 @@ def schedulePostJetMCTruthAugmentations(kernel=None, decorationDressing=None):
     if IsSUSYSignal():
         from DerivationFrameworkSUSY.DecorateSUSYProcess import DecorateSUSYProcess
         augmentationToolsList += DecorateSUSYProcess('MCTruthCommon')
-        
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
+
     kernel += CfgMgr.DerivationFramework__CommonAugmentation("MCTruthCommonPostJetKernel",
                                                              AugmentationTools = augmentationToolsList
                                                              )
@@ -350,7 +351,7 @@ def addParentAndDownstreamParticles(kernel=None,
         # Already there!  Carry on...
         dfcommontruthlog.warning("Attempt to add a duplicate "+kernel_name+". Failing.")
         return
-    collection_name=collection_prefix+'WithDecay' if collection_prefix!=None else 'Truth'+prefix+'WithDecay'
+    collection_name=collection_prefix+'WithDecay' if collection_prefix is not None else 'Truth'+prefix+'WithDecay'
     # Set up a tool to keep the W/Z/H bosons and all downstream particles
     from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__TruthDecayCollectionMaker
     collection_maker = DerivationFramework__TruthDecayCollectionMaker( name='DFCommon'+prefix+'AndDecaysTool',
@@ -360,7 +361,6 @@ def addParentAndDownstreamParticles(kernel=None,
                                                                        RejectHadronChildren=rejectHadronChildren)
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += collection_maker
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation(kernel_name,
                                                              AugmentationTools = [collection_maker] )
 
@@ -431,7 +431,6 @@ def addHFAndDownstreamParticles(kernel=None, addB=True, addC=True, generations=-
                                                                               Generations=generations)
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += DFCommonHFAndDecaysTool
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation(prefix+"MCTruthCommonHFAndDecaysKernel",
                                                              AugmentationTools = [DFCommonHFAndDecaysTool] )
 
@@ -451,7 +450,6 @@ def addPVCollection(kernel=None):
                                                                       NewCollectionName="TruthPrimaryVertices")
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += DFCommonTruthPVCollTool
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation("MCTruthCommonTruthPVCollKernel",
                                                              AugmentationTools = [DFCommonTruthPVCollTool] )
 
@@ -472,7 +470,6 @@ def addHardScatterCollection(kernel=None, generations=1):
                                                                          Generations=generations)
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += DFCommonHSCollectionTool
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation("MCTruthCommonHSCollectionKernel",
                                                              AugmentationTools = [DFCommonHSCollectionTool] )
 
@@ -493,7 +490,6 @@ def addTruthCollectionNavigationDecorations(kernel=None,TruthCollections=[], pre
                                                                                       InputCollections=TruthCollections)
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += DFCommonTruthNavigationDecorator
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation(prefix+"MCTruthNavigationDecoratorKernel",
                                                              AugmentationTools = [DFCommonTruthNavigationDecorator] )
 
@@ -515,7 +511,6 @@ def addBSMAndDownstreamParticles(kernel=None, generations=-1):
                                                                          Generations=generations)
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += DFCommonBSMAndDecaysTool
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation("MCTruthCommonBSMAndDecaysKernel",
                                                              AugmentationTools = [DFCommonBSMAndDecaysTool] )
 
@@ -535,7 +530,6 @@ def addBornLeptonCollection(kernel=None):
                                                                          NewCollectionName="BornLeptons")
     from AthenaCommon.AppMgr import ToolSvc
     ToolSvc += DFCommonBornLeptonCollTool
-    from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
     kernel += CfgMgr.DerivationFramework__CommonAugmentation("MCTruthCommonBornLeptonsKernel",
                                                              AugmentationTools = [DFCommonBornLeptonCollTool] )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/TruthDerivationTools.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/TruthDerivationTools.py
index e1d8205d77b2b8b52d8fae04274c4370b3a6c621..c341e53339d2ec1936fb5948e89a70baa0e0728a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/TruthDerivationTools.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/python/TruthDerivationTools.py
@@ -2,10 +2,10 @@
 
 from AthenaCommon.AppMgr import ToolSvc
 
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkSimBarcodeOffset
 from MCTruthClassifier.MCTruthClassifierConf import MCTruthClassifier
 DFCommonTruthClassifier = MCTruthClassifier(name = "DFCommonTruthClassifier",
-                                    ParticleCaloExtensionTool = "") 
+                                            ParticleCaloExtensionTool = "")
 ToolSvc += DFCommonTruthClassifier
 
 #==============================================================================
@@ -75,7 +75,7 @@ DFCommonTruthBSMTool = DerivationFramework__TruthCollectionMaker(name
 ToolSvc += DFCommonTruthBSMTool
 
 # Set up a tool to keep forward protons for AFP
-# Note that we have inputFileSummary coming from derivation framework master
+from RecExConfig.InputFilePeeker import inputFileSummary
 if 'beam_energy' in inputFileSummary:
     beam_energy = inputFileSummary['beam_energy']
 elif '/TagInfo' in inputFileSummary and 'beam_energy' in inputFileSummary['/TagInfo']:
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt
index 759f5c066d8594bd1172f21af9ab36764498638b..a472a8332264e3f836a6d91592830b1eca7df5a9 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/CMakeLists.txt
@@ -4,6 +4,6 @@
 atlas_subdir( DerivationFrameworkPhys )
 
 # 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 )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_DataCompressionList.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_DataCompressionList.py
index d08346d71d90ed041d334846424cc196c45b229d..c61bcbf8155ecae54b75d7a2ecebd8f02cef646a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_DataCompressionList.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_DataCompressionList.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 PHYS_DataCompressionList=[ 
 "SoftBVrtClusterTool_Loose_VerticesAux.", "SoftBVrtClusterTool_Medium_VerticesAux.", "SoftBVrtClusterTool_Tight_VerticesAux.", "AntiKt10LCTopoJetsAux.", "AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.", "AntiKt2PV0TrackJetsAux.", "AntiKt4EMPFlowJetsAux.", "AntiKt4EMTopoJetsAux.", "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903Aux.", "AntiKt4EMPFlowJets_BTagging201810Aux.", "AntiKt4EMPFlowJets_BTagging201903Aux.", "AntiKt4EMTopoJets_BTagging201810Aux.", "xTrigDecisionAux.", "Kt4EMPFlowEventShapeAux.", "Kt4EMTopoOriginEventShapeAux.", "NeutralParticleFlowIsoCentralEventShapeAux.", "NeutralParticleFlowIsoForwardEventShapeAux.", "TopoClusterIsoCentralEventShapeAux.", "TopoClusterIsoForwardEventShapeAux.", "BTagging_AntiKt4EMPFlow_201810Aux.", "BTagging_AntiKt4EMPFlow_201903Aux.", "BTagging_AntiKt4EMTopo_201810Aux.", "BTagging_AntiKtVR30Rmax4Rmin02Track_201903Aux.", "CombinedMuonTrackParticlesAux.", "DiTauJetsAux.", "DiTauJetsLowPtAux.", "ElectronsAux.", "GSFConversionVerticesAux.", "GSFTrackParticlesAux.", "InDetForwardTrackParticlesAux.", "InDetTrackParticlesAux.", "MET_Core_AntiKt4EMPFlowAux.", "MET_Core_AntiKt4EMTopoAux.", "MET_TrackAux.", "MuonSpectrometerTrackParticlesAux.", "MuonsAux.", "PhotonsAux.", "PrimaryVerticesAux.", "TauJetsAux.", "TauTracksAux.", "TrigMatch_HLT_2e12_lhloose_nod0_mu10Aux.", "TrigMatch_HLT_2e17_lhvloose_nod0Aux.", "TrigMatch_HLT_2e17_lhvloose_nod0_L12EM15VHIAux.", "TrigMatch_HLT_2e24_lhvloose_nod0Aux.", "TrigMatch_HLT_2g20_tight_icalovloose_L12EM15VHIAux.", "TrigMatch_HLT_2g22_tightAux.", "TrigMatch_HLT_2g22_tight_L12EM15VHIAux.", "TrigMatch_HLT_2g22_tight_L1EM7_EMPTYAux.", "TrigMatch_HLT_2g22_tight_L1EM7_UNPAIRED_ISOAux.", "TrigMatch_HLT_2g22_tight_icalovlooseAux.", "TrigMatch_HLT_2g25_loose_g15_looseAux.", "TrigMatch_HLT_2g25_tight_L12EM20VHAux.", "TrigMatch_HLT_2g50_loose_L12EM20VHAux.", "TrigMatch_HLT_2mu14Aux.", "TrigMatch_HLT_2mu20_L12MU20_OVERLAYAux.", "TrigMatch_HLT_3g20_looseAux.", "TrigMatch_HLT_3mu3_mu3noL1_L13MU4Aux.", "TrigMatch_HLT_3mu4Aux.", "TrigMatch_HLT_3mu4_mu2noL1Aux.", "TrigMatch_HLT_3mu6Aux.", "TrigMatch_HLT_3mu6_msonlyAux.", "TrigMatch_HLT_3mu6_msonly_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_3mu6_msonly_L1MU6_EMPTYAux.", "TrigMatch_HLT_4mu4Aux.", "TrigMatch_HLT_e12_lhloose_nod0_2mu10Aux.", "TrigMatch_HLT_e140_lhloose_nod0Aux.", "TrigMatch_HLT_e140_lhloose_nod0_L1EM24VHIAux.", "TrigMatch_HLT_e140_lhvloose_nod0Aux.", "TrigMatch_HLT_e160_lhvloose_nod0Aux.", "TrigMatch_HLT_e17_lhloose_nod0_2e12_lhloose_nod0_L1EM15VH_3EM10VHAux.", "TrigMatch_HLT_e17_lhloose_nod0_mu14Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoEFAux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoEF_L1DR-EM15TAU12I-J25Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoEF_L1EM15VHI_2TAU12IM_4J12Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoMVA_L1DR-EM15TAU12I-J25Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoMVA_L1EM15VHI_2TAU12IM_4J12Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwo_L1DR-EM15TAU12I-J25Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwo_L1EM15VHI_2TAU12IM_4J12Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_mediumRNN_tracktwoMVAAux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_mediumRNN_tracktwoMVA_L1DR-EM15TAU12I-J25Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_mediumRNN_tracktwoMVA_L1EM15VHI_2TAU12IM_4J12Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_tau80_medium1_tracktwoAux.", "TrigMatch_HLT_e200_etcutAux.", "TrigMatch_HLT_e22_lhvloose_nod0_e12_lhvloose_nod0_e10_lhvloose_nod0_L1EM20VH_2EM10VH_3EM8VHAux.", "TrigMatch_HLT_e24_lhmedium_nod0_ivarloose_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_e24_lhmedium_nod0_ivarloose_tau35_medium1_tracktwoEFAux.", "TrigMatch_HLT_e24_lhmedium_nod0_ivarloose_tau35_medium1_tracktwoMVAAux.", "TrigMatch_HLT_e24_lhmedium_nod0_ivarloose_tau35_mediumRNN_tracktwoMVAAux.", "TrigMatch_HLT_e24_lhtight_nod0_ivarlooseAux.", "TrigMatch_HLT_e24_lhvloose_nod0_2e12_lhvloose_nod0_L1EM20VH_3EM10VHAux.", "TrigMatch_HLT_e26_lhloose_nod0Aux.", "TrigMatch_HLT_e26_lhmedium_nod0_mu8noL1Aux.", "TrigMatch_HLT_e26_lhtight_nod0Aux.", "TrigMatch_HLT_e26_lhtight_nod0_e15_etcut_L1EM7_ZeeAux.", "TrigMatch_HLT_e26_lhtight_nod0_ivarlooseAux.", "TrigMatch_HLT_e28_lhmedium_nod0_mu8noL1Aux.", "TrigMatch_HLT_e28_lhtight_nod0_L1EM22VHIAux.", "TrigMatch_HLT_e28_lhtight_nod0_e15_etcut_L1EM7_ZeeAux.", "TrigMatch_HLT_e28_lhtight_nod0_ivarlooseAux.", "TrigMatch_HLT_e28_lhtight_nod0_noringer_ivarlooseAux.", "TrigMatch_HLT_e300_etcutAux.", "TrigMatch_HLT_e60_lhmedium_nod0Aux.", "TrigMatch_HLT_e60_lhmedium_nod0_L1EM24VHIAux.", "TrigMatch_HLT_e7_lhmedium_nod0_mu24Aux.", "TrigMatch_HLT_e9_lhvloose_nod0_mu20_mu8noL1Aux.", "TrigMatch_HLT_e9_lhvloose_nod0_mu20_mu8noL1_L1EM7_MU20Aux.", "TrigMatch_HLT_g120_looseAux.", "TrigMatch_HLT_g140_looseAux.", "TrigMatch_HLT_g140_tightAux.", "TrigMatch_HLT_g200_etcutAux.", "TrigMatch_HLT_g200_looseAux.", "TrigMatch_HLT_g300_etcutAux.", "TrigMatch_HLT_g300_etcut_L1EM24VHIAux.", "TrigMatch_HLT_g35_loose_g25_looseAux.", "TrigMatch_HLT_g35_loose_g25_loose_L12EM20VHAux.", "TrigMatch_HLT_g35_medium_g25_medium_L12EM20VHAux.", "TrigMatch_HLT_g35_medium_g25_medium_L1EM7_EMPTYAux.", "TrigMatch_HLT_g35_medium_g25_medium_L1EM7_UNPAIRED_ISOAux.", "TrigMatch_HLT_id_cosmicid_L1MU11_EMPTYAux.", "TrigMatch_HLT_mu13_mu13_idperf_ZmumuAux.", "TrigMatch_HLT_mu14_ivarloose_L1MU11_tau35_medium1_tracktwoEF_L1MU11_TAU20IMAux.", "TrigMatch_HLT_mu14_ivarloose_L1MU11_tau35_medium1_tracktwoMVA_L1MU11_TAU20IMAux.", "TrigMatch_HLT_mu14_ivarloose_L1MU11_tau35_medium1_tracktwo_L1MU11_TAU20IMAux.", "TrigMatch_HLT_mu14_ivarloose_L1MU11_tau35_mediumRNN_tracktwoMVA_L1MU11_TAU20IMAux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoEFAux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoEF_L1DR-MU10TAU12I_TAU12I-J25Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoEF_L1MU10_TAU12IM_3J12Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoMVA_L1DR-MU10TAU12I_TAU12I-J25Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoMVA_L1MU10_TAU12IM_3J12Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwo_L1DR-MU10TAU12I_TAU12I-J25Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwo_L1MU10_TAU12IM_3J12Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVAAux.", "TrigMatch_HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_L1DR-MU10TAU12I_TAU12I-J25Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_mediumRNN_tracktwoMVA_L1MU10_TAU12IM_3J12Aux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwoEFAux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwoEF_L1MU10_TAU20IM_J25_2J20Aux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwoMVA_L1MU10_TAU20IM_J25_2J20Aux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwo_L1MU10_TAU20IM_J25_2J20Aux.", "TrigMatch_HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVAAux.", "TrigMatch_HLT_mu14_ivarloose_tau35_mediumRNN_tracktwoMVA_L1MU10_TAU20IM_J25_2J20Aux.", "TrigMatch_HLT_mu20_2mu2noL1_JpsimumuFSAux.", "TrigMatch_HLT_mu20_2mu4_JpsimumuL2Aux.", "TrigMatch_HLT_mu20_2mu4noL1Aux.", "TrigMatch_HLT_mu20_ivarmedium_mu8noL1Aux.", "TrigMatch_HLT_mu20_msonly_iloosems_mu6noL1_msonly_nscan05_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_mu20_msonly_iloosems_mu6noL1_msonly_nscan05_L1MU6_EMPTYAux.", "TrigMatch_HLT_mu20_msonly_mu15noL1_msonly_nscan05_noCombAux.", "TrigMatch_HLT_mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU6_EMPTYAux.", "TrigMatch_HLT_mu20_msonly_mu6noL1_msonly_nscan05Aux.", "TrigMatch_HLT_mu22_mu8noL1Aux.", "TrigMatch_HLT_mu22_mu8noL1_TagandProbeAux.", "TrigMatch_HLT_mu24_ivarmediumAux.", "TrigMatch_HLT_mu24_mu8noL1Aux.", "TrigMatch_HLT_mu26_ivarmediumAux.", "TrigMatch_HLT_mu50Aux.", "TrigMatch_HLT_mu60Aux.", "TrigMatch_HLT_mu60_0eta105_msonlyAux.", "TrigMatch_HLT_mu6_2mu4Aux.", "TrigMatch_HLT_mu6_dRl1_mu20_msonly_iloosems_mu6noL1_dRl1_msonlyAux.", "TrigMatch_HLT_mu6_nomucomb_2mu4_nomucomb_L1MU6_3MU4Aux.", "TrigMatch_HLT_mu80_msonly_3layersECAux.", "TrigMatch_HLT_tau125_medium1_tracktwoAux.", "TrigMatch_HLT_tau160_medium1_tracktwoAux.", "TrigMatch_HLT_tau160_medium1_tracktwoEF_L1TAU100Aux.", "TrigMatch_HLT_tau160_medium1_tracktwoMVA_L1TAU100Aux.", "TrigMatch_HLT_tau160_medium1_tracktwo_L1TAU100Aux.", "TrigMatch_HLT_tau160_mediumRNN_tracktwoMVA_L1TAU100Aux.", "TrigMatch_HLT_tau35_loose1_tracktwo_tau25_loose1_tracktwoAux.", "TrigMatch_HLT_tau35_medium1_tracktwoEF_tau25_medium1_tracktwoEF_03dR30_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwoEF_tau25_medium1_tracktwoEF_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwoEF_tau25_medium1_tracktwoEF_L1TAU20IM_2TAU12IM_4J12_0ETA23Aux.", "TrigMatch_HLT_tau35_medium1_tracktwoMVA_tau25_medium1_tracktwoMVA_03dR30_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwoMVA_tau25_medium1_tracktwoMVA_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwoMVA_tau25_medium1_tracktwoMVA_L1TAU20IM_2TAU12IM_4J12_0ETA23Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IMAux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM_4J12Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM_4J12_0ETA23Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_tautsf_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dR30_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_L1TAU20IM_2TAU12IM_4J12_0ETA23Aux.", "TrigMatch_HLT_tau40_medium1_tracktwoEF_tau35_medium1_tracktwoEFAux.", "TrigMatch_HLT_tau40_medium1_tracktwoMVA_tau35_medium1_tracktwoMVAAux.", "TrigMatch_HLT_tau40_medium1_tracktwo_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_tau40_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVAAux.", "TrigMatch_HLT_tau60_medium1_tracktwo_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_tau80_medium1_tracktwoEF_L1TAU60_tau35_medium1_tracktwoEF_L1TAU12IM_L1TAU60_DR-TAU20ITAU12IAux.", "TrigMatch_HLT_tau80_medium1_tracktwoEF_L1TAU60_tau60_medium1_tracktwoEF_L1TAU40Aux.", "TrigMatch_HLT_tau80_medium1_tracktwoMVA_L1TAU60_tau35_medium1_tracktwoMVA_L1TAU12IM_L1TAU60_DR-TAU20ITAU12IAux.", "TrigMatch_HLT_tau80_medium1_tracktwoMVA_L1TAU60_tau60_medium1_tracktwoMVA_L1TAU40Aux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60Aux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60_tau35_medium1_tracktwo_L1TAU12IM_L1TAU60_DR-TAU20ITAU12IAux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60_tau50_medium1_tracktwo_L1TAU12Aux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60_tau60_medium1_tracktwo_L1TAU40Aux.", "TrigMatch_HLT_tau80_mediumRNN_tracktwoMVA_L1TAU60_tau35_mediumRNN_tracktwoMVA_L1TAU12IM_L1TAU60_DR-TAU20ITAU12IAux.", "TrigMatch_HLT_tau80_mediumRNN_tracktwoMVA_L1TAU60_tau60_mediumRNN_tracktwoMVA_L1TAU40Aux.", "egammaClustersAux.", "METAssoc_AntiKt4EMPFlowAux.", "METAssoc_AntiKt4EMTopoAux.",
 ] 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_MCCompressionList.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_MCCompressionList.py
index fafd173090ff8da74e22bdaa833e26b3e7b3e48a..03ce7922fa175409fe83137a321f625cd69696ee 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_MCCompressionList.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/python/PHYS_MCCompressionList.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 PHYS_MCCompressionList=[ 
 "SoftBVrtClusterTool_Loose_VerticesAux.", "SoftBVrtClusterTool_Medium_VerticesAux.", "SoftBVrtClusterTool_Tight_VerticesAux.", "AntiKt10LCTopoJetsAux.", "AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux.", "AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux.", "AntiKt2PV0TrackJetsAux.", "AntiKt4EMPFlowJetsAux.", "AntiKt4EMTopoJetsAux.", "AntiKt4TruthDressedWZJetsAux.", "AntiKtVR30Rmax4Rmin02TrackJets_BTagging201903Aux.", "AntiKt4EMPFlowJets_BTagging201810Aux.", "AntiKt4EMPFlowJets_BTagging201903Aux.", "AntiKt4EMTopoJets_BTagging201810Aux.", "xTrigDecisionAux.", "Kt4EMPFlowEventShapeAux.", "Kt4EMTopoOriginEventShapeAux.", "NeutralParticleFlowIsoCentralEventShapeAux.", "NeutralParticleFlowIsoForwardEventShapeAux.", "TopoClusterIsoCentralEventShapeAux.", "TopoClusterIsoForwardEventShapeAux.", "BTagging_AntiKt4EMPFlow_201810Aux.", "BTagging_AntiKt4EMPFlow_201903Aux.", "BTagging_AntiKt4EMTopo_201810Aux.", "BTagging_AntiKtVR30Rmax4Rmin02Track_201903Aux.", "BornLeptonsAux.", "CombinedMuonTrackParticlesAux.", "DiTauJetsAux.", "DiTauJetsLowPtAux.", "ElectronsAux.", "GSFConversionVerticesAux.", "GSFTrackParticlesAux.", "HardScatterParticlesAux.", "HardScatterVerticesAux.", "InDetForwardTrackParticlesAux.", "InDetTrackParticlesAux.", "MET_Core_AntiKt4EMPFlowAux.", "MET_Core_AntiKt4EMTopoAux.", "MET_TrackAux.", "MET_TruthAux.", "MuonSpectrometerTrackParticlesAux.", "MuonsAux.", "PhotonsAux.", "PrimaryVerticesAux.", "TauJetsAux.", "TauTracksAux.", "TrigMatch_HLT_2e12_lhloose_nod0_mu10Aux.", "TrigMatch_HLT_2e12_lhloose_nodeta_L12EM10VHAux.", "TrigMatch_HLT_2e12_lhloose_nodphires_L12EM10VHAux.", "TrigMatch_HLT_2e17_lhvloose_nod0Aux.", "TrigMatch_HLT_2e17_lhvloose_nod0_L12EM15VHIAux.", "TrigMatch_HLT_2e17_lhvloose_nod0_ringerAux.", "TrigMatch_HLT_2e17_lhvloose_nod0_ringer_L12EM15VHIAux.", "TrigMatch_HLT_2e24_lhvloose_nod0Aux.", "TrigMatch_HLT_2g20_loose_g15_looseAux.", "TrigMatch_HLT_2g20_tightAux.", "TrigMatch_HLT_2g20_tight_icalovloose_L12EM15VHIAux.", "TrigMatch_HLT_2g22_tightAux.", "TrigMatch_HLT_2g22_tight_L12EM15VHIAux.", "TrigMatch_HLT_2g22_tight_L1EM7_EMPTYAux.", "TrigMatch_HLT_2g22_tight_L1EM7_UNPAIRED_ISOAux.", "TrigMatch_HLT_2g22_tight_icalovlooseAux.", "TrigMatch_HLT_2g25_loose_g15_looseAux.", "TrigMatch_HLT_2g25_tight_L12EM20VHAux.", "TrigMatch_HLT_2g50_loose_L12EM20VHAux.", "TrigMatch_HLT_2mu10Aux.", "TrigMatch_HLT_2mu10_nomucombAux.", "TrigMatch_HLT_2mu14Aux.", "TrigMatch_HLT_2mu14_nomucombAux.", "TrigMatch_HLT_2mu20_L12MU20_OVERLAYAux.", "TrigMatch_HLT_2mu4_mu3_mu2noL1_L13MU4Aux.", "TrigMatch_HLT_2mu4_mu3_mu2noL1_calotag_0eta010_L13MU4Aux.", "TrigMatch_HLT_2mu6_10invm30_pt2_z10Aux.", "TrigMatch_HLT_3g20_looseAux.", "TrigMatch_HLT_3mu3_mu3noL1_L13MU4Aux.", "TrigMatch_HLT_3mu3_mu3noL1_calotag_0eta010_L13MU4Aux.", "TrigMatch_HLT_3mu4Aux.", "TrigMatch_HLT_3mu4_mu2noL1Aux.", "TrigMatch_HLT_3mu4_mu2noL1_calotag_0eta010Aux.", "TrigMatch_HLT_3mu4_nomucombAux.", "TrigMatch_HLT_3mu4_nomucomb_mu2noL1Aux.", "TrigMatch_HLT_3mu6Aux.", "TrigMatch_HLT_3mu6_msonlyAux.", "TrigMatch_HLT_3mu6_msonly_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_3mu6_msonly_L1MU6_EMPTYAux.", "TrigMatch_HLT_4mu4Aux.", "TrigMatch_HLT_4mu4_nomucombAux.", "TrigMatch_HLT_e120_lhloose_nod0Aux.", "TrigMatch_HLT_e12_lhloose_nod0_2mu10Aux.", "TrigMatch_HLT_e140_lhloose_nod0Aux.", "TrigMatch_HLT_e140_lhloose_nod0_L1EM24VHIAux.", "TrigMatch_HLT_e140_lhloose_nod0_ringerAux.", "TrigMatch_HLT_e140_lhvloose_nod0Aux.", "TrigMatch_HLT_e160_lhvloose_nod0Aux.", "TrigMatch_HLT_e17_lhloose_nod0_2e12_lhloose_nod0_L1EM15VH_3EM10VHAux.", "TrigMatch_HLT_e17_lhloose_nod0_2e9_lhloose_nod0Aux.", "TrigMatch_HLT_e17_lhloose_nod0_mu14Aux.", "TrigMatch_HLT_e17_lhmedium_iloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_nod0_iloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwo_L1DR-EM15TAU12I-J25Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_ivarloose_tau25_medium1_tracktwo_L1EM15VHI_2TAU12IM_4J12Aux.", "TrigMatch_HLT_e17_lhmedium_nod0_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_nod0_tau80_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_e17_lhmedium_tau80_medium1_tracktwoAux.", "TrigMatch_HLT_e200_etcutAux.", "TrigMatch_HLT_e22_lhvloose_nod0_e12_lhvloose_nod0_e10_lhvloose_nod0_L1EM20VH_2EM10VH_3EM8VHAux.", "TrigMatch_HLT_e24_lhmedium_nod0_L1EM20VHI_mu8noL1Aux.", "TrigMatch_HLT_e24_lhmedium_nod0_ivarloose_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_e24_lhtight_nod0_ivarlooseAux.", "TrigMatch_HLT_e24_lhvloose_nod0_2e12_lhvloose_nod0_L1EM20VH_3EM10VHAux.", "TrigMatch_HLT_e26_lhloose_nod0Aux.", "TrigMatch_HLT_e26_lhloose_nod0_ringerAux.", "TrigMatch_HLT_e26_lhmedium_nod0_mu8noL1Aux.", "TrigMatch_HLT_e26_lhtight_cutd0dphideta_ivarlooseAux.", "TrigMatch_HLT_e26_lhtight_nod0Aux.", "TrigMatch_HLT_e26_lhtight_nod0_e15_etcut_L1EM7_ZeeAux.", "TrigMatch_HLT_e26_lhtight_nod0_ivarlooseAux.", "TrigMatch_HLT_e26_lhtight_nod0_ringer_ivarlooseAux.", "TrigMatch_HLT_e28_lhmedium_nod0_mu8noL1Aux.", "TrigMatch_HLT_e28_lhtight_nod0_L1EM22VHIAux.", "TrigMatch_HLT_e28_lhtight_nod0_e15_etcut_L1EM7_ZeeAux.", "TrigMatch_HLT_e28_lhtight_nod0_ivarlooseAux.", "TrigMatch_HLT_e28_lhtight_nod0_noringer_ivarlooseAux.", "TrigMatch_HLT_e28_lhtight_nod0_ringer_ivarlooseAux.", "TrigMatch_HLT_e300_etcutAux.", "TrigMatch_HLT_e60_lhmedium_nod0Aux.", "TrigMatch_HLT_e60_lhmedium_nod0_L1EM24VHIAux.", "TrigMatch_HLT_e60_lhmedium_nod0_ringerAux.", "TrigMatch_HLT_e60_mediumAux.", "TrigMatch_HLT_e7_lhmedium_nod0_mu24Aux.", "TrigMatch_HLT_g120_looseAux.", "TrigMatch_HLT_g140_looseAux.", "TrigMatch_HLT_g140_tightAux.", "TrigMatch_HLT_g200_etcutAux.", "TrigMatch_HLT_g200_looseAux.", "TrigMatch_HLT_g300_etcutAux.", "TrigMatch_HLT_g300_etcut_L1EM24VHIAux.", "TrigMatch_HLT_g35_loose_g25_looseAux.", "TrigMatch_HLT_g35_loose_g25_loose_L12EM20VHAux.", "TrigMatch_HLT_g35_medium_g25_medium_L12EM20VHAux.", "TrigMatch_HLT_g35_medium_g25_medium_L1EM7_EMPTYAux.", "TrigMatch_HLT_g35_medium_g25_medium_L1EM7_UNPAIRED_ISOAux.", "TrigMatch_HLT_id_cosmicid_L1MU11_EMPTYAux.", "TrigMatch_HLT_mu11_2mu4noL1_nscan03_L1MU11_2MU6Aux.", "TrigMatch_HLT_mu11_L1MU10_2mu4noL1_nscan03_L1MU10_2MU6Aux.", "TrigMatch_HLT_mu11_nomucomb_2mu4noL1_nscan03_L1MU11_2MU6Aux.", "TrigMatch_HLT_mu13_mu13_idperf_ZmumuAux.", "TrigMatch_HLT_mu14_iloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_iloose_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_ivarloose_L1MU11_tau35_medium1_tracktwo_L1MU11_TAU20IMAux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwo_L1DR-MU10TAU12I_TAU12I-J25Aux.", "TrigMatch_HLT_mu14_ivarloose_tau25_medium1_tracktwo_L1MU10_TAU12IM_3J12Aux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_ivarloose_tau35_medium1_tracktwo_L1MU10_TAU20IM_J25_2J20Aux.", "TrigMatch_HLT_mu14_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_mu14_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_mu20_2mu2noL1_JpsimumuFSAux.", "TrigMatch_HLT_mu20_2mu4_JpsimumuL2Aux.", "TrigMatch_HLT_mu20_2mu4noL1Aux.", "TrigMatch_HLT_mu20_ivarmedium_mu8noL1Aux.", "TrigMatch_HLT_mu20_msonly_iloosems_mu6noL1_msonly_nscan05_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_mu20_msonly_iloosems_mu6noL1_msonly_nscan05_L1MU6_EMPTYAux.", "TrigMatch_HLT_mu20_msonly_mu10noL1_msonly_nscan05_noCombAux.", "TrigMatch_HLT_mu20_msonly_mu10noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_mu20_msonly_mu10noL1_msonly_nscan05_noComb_L1MU6_EMPTYAux.", "TrigMatch_HLT_mu20_msonly_mu15noL1_msonly_nscan05_noCombAux.", "TrigMatch_HLT_mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU4_UNPAIRED_ISOAux.", "TrigMatch_HLT_mu20_msonly_mu15noL1_msonly_nscan05_noComb_L1MU6_EMPTYAux.", "TrigMatch_HLT_mu20_msonly_mu6noL1_msonly_nscan05Aux.", "TrigMatch_HLT_mu20_mu8noL1Aux.", "TrigMatch_HLT_mu20_mu8noL1_calotag_0eta010Aux.", "TrigMatch_HLT_mu20_mu8noL1_e9_lhvloose_nod0Aux.", "TrigMatch_HLT_mu20_mu8noL1_e9_lhvloose_nod0_L1EM7_MU20Aux.", "TrigMatch_HLT_mu20_nomucomb_mu6noL1_nscan03Aux.", "TrigMatch_HLT_mu22_mu8noL1Aux.", "TrigMatch_HLT_mu22_mu8noL1_calotag_0eta010Aux.", "TrigMatch_HLT_mu24_ilooseAux.", "TrigMatch_HLT_mu24_imediumAux.", "TrigMatch_HLT_mu24_ivarlooseAux.", "TrigMatch_HLT_mu24_ivarmediumAux.", "TrigMatch_HLT_mu24_mu8noL1Aux.", "TrigMatch_HLT_mu26_ivarmediumAux.", "TrigMatch_HLT_mu40Aux.", "TrigMatch_HLT_mu50Aux.", "TrigMatch_HLT_mu60Aux.", "TrigMatch_HLT_mu60_0eta105_msonlyAux.", "TrigMatch_HLT_mu6_2mu4Aux.", "TrigMatch_HLT_mu6_dRl1_mu20_msonly_iloosems_mu6noL1_dRl1_msonlyAux.", "TrigMatch_HLT_mu6_iloose_mu6_11invm24_noosAux.", "TrigMatch_HLT_mu6_nomucomb_2mu4_nomucomb_L1MU6_3MU4Aux.", "TrigMatch_HLT_tau125_medium1_trackAux.", "TrigMatch_HLT_tau125_medium1_tracktwoAux.", "TrigMatch_HLT_tau160_medium1_tracktwoAux.", "TrigMatch_HLT_tau160_medium1_tracktwo_L1TAU100Aux.", "TrigMatch_HLT_tau35_loose1_tracktwo_tau25_loose1_tracktwoAux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwoAux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_03dR30_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IMAux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_L1TAU20IM_2TAU12IM_4J12Aux.", "TrigMatch_HLT_tau35_medium1_tracktwo_tau25_medium1_tracktwo_tautsf_L1DR-TAU20ITAU12I-J25Aux.", "TrigMatch_HLT_tau40_medium1_tracktwo_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_tau60_medium1_tracktwo_tau35_medium1_tracktwoAux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60Aux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60_tau35_medium1_tracktwo_L1TAU12IM_L1TAU60_DR-TAU20ITAU12IAux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60_tau50_medium1_tracktwo_L1TAU12Aux.", "TrigMatch_HLT_tau80_medium1_tracktwo_L1TAU60_tau60_medium1_tracktwo_L1TAU40Aux.", "TruthBSMAux.", "TruthBSMWithDecayParticlesAux.", "TruthBSMWithDecayVerticesAux.", "TruthBosonAux.", "TruthBosonsWithDecayParticlesAux.", "TruthBosonsWithDecayVerticesAux.", "TruthBottomAux.", "TruthCharmAux.", "TruthElectronsAux.", "TruthEventsAux.", "TruthForwardProtonsAux.", "TruthHFWithDecayParticlesAux.", "TruthHFWithDecayVerticesAux.", "TruthMuonsAux.", "TruthNeutrinosAux.", "TruthPhotonsAux.", "TruthPrimaryVerticesAux.", "TruthTausAux.", "TruthTopAux.", "egammaClustersAux.", "METAssoc_AntiKt4EMPFlowAux.", "METAssoc_AntiKt4EMTopoAux.",
 ] 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt
index 7d6ef45df2edd8c1b78764105f4866b24bf68488..6130e7da2dc08b7a53a0ccee04b4282ba56dab8b 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/CMakeLists.txt
@@ -4,6 +4,6 @@
 atlas_subdir( DerivationFrameworkSM )
 
 # 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 )
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/python/STDMCommonTruthTools.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/python/STDMCommonTruthTools.py
index 5e297ab3634e447b797d4e674d2aa2bf03a8f7c0..3029bfb2429ec6fcdad3325f79b8d7a3ff27ffc1 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/python/STDMCommonTruthTools.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkSM/python/STDMCommonTruthTools.py
@@ -1,7 +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 AthenaCommon import CfgMgr
 from AthenaCommon.AppMgr import ToolSvc
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
 
 #==============================================================================
 # Set up the MCTruthClassifier
@@ -124,5 +125,4 @@ STDMAugmentationTools.append(STDMMuonDressingTool2)
 #==============================================================================
 # CREATE THE COMMON AUGMENTATION KERNEL ALGORITHM
 #==============================================================================
-from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
 DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("STDMAugmentationKernel", AugmentationTools = STDMAugmentationTools)
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt
index 85da10191b61be3601524c0a49b650b4424f18d2..41f22685aef49cd0444c4f83f93469d1742589d2 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/CMakeLists.txt
@@ -9,5 +9,5 @@ atlas_add_component( DerivationFrameworkTop
                      LINK_LIBRARIES AthenaBaseComps DerivationFrameworkInterfaces ExpressionEvaluationLib GaudiKernel StoreGateLib xAODBTagging xAODEventInfo xAODJet xAODTracking xAODTruth )
 
 # 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 )
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonJets.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonJets.py
index dc48423a9685daf416bd6fa57f7a84c9ed57eb56..733bedfdba6c62fb70d25f75073acf54679ff532 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonJets.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonJets.py
@@ -9,12 +9,10 @@
 #   DerivationFrameworkTop.TOPQCommonJets.TOPQupdateJVT("JetCollection")
 #===================================================================================
 
-from __future__ import print_function
-
 #========
 # IMPORTS
 #========
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+from AthenaCommon import CfgMgr
 from AthenaCommon.GlobalFlags import globalflags
 from RecExConfig.ObjKeyStore import cfgKeyStore
 
@@ -99,6 +97,7 @@ def addStandardJetsForTop(algseq, outputGroup):
 #==================
 # PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/trunk/python/ExtendedJetCommon.py
 def buildTOPQCA15jets(algseq):
+  from JetRec.JetRecStandard import jtm
   if not cfgKeyStore.isInInput("xAOD::JetContainer","CamKt15LCTopoJets"):
     from JetRec.JetRecConf import JetAlgorithm
     jtm.modifiersMap["lctopoCA15"] = list(jtm.modifiersMap["lctopo"])
@@ -123,7 +122,7 @@ def applyTOPQJetCalibration(jetcollection, algseq=None):
     applyJetCalibration_xAODColl, applyJetCalibration_CustomColl
 
   supportedJets = ['AntiKt4EMTopo', 'AntiKt10LCTopoTrimmedPtFrac5SmallR20']
-  if not jetcollection in supportedJets:
+  if jetcollection not in supportedJets:
     print ("TOPQCommonJets:",jetcollection, "is an unsupported collection for calibration!")
     return
   elif jetcollection == 'AntiKt4EMTopo':
@@ -140,7 +139,7 @@ def TOPQupdateJVT(jetcollection, algseq=None):
   from DerivationFrameworkJetEtMiss.ExtendedJetCommon import updateJVT_xAODColl
 
   supportedJets = ['AntiKt4EMTopo']
-  if not jetcollection in supportedJets:
+  if jetcollection not in supportedJets:
     print ("TOPQCommonJets:", jetcollection, "is an unsupported collection for JVT augmentation!")
     return
   else:
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSelection.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSelection.py
index 0cde41ad846e51aad891065594c3151bda5305ce..21e126a3c71a20209243daa141bdea6837fc098f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSelection.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSelection.py
@@ -8,8 +8,6 @@
 #   skimmingTools_jet = DerivationFrameworkTop.TOPQCommonSelection.setup_jet('TOPQ1', ToolSvc)
 #====================================================================
 
-from __future__ import print_function
-
 #================================
 # SKIMMING SELECTIONS
 #================================
@@ -43,7 +41,7 @@ from __future__ import print_function
 #================================
 # IMPORTS
 #================================
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
+import DerivationFrameworkCore.DerivationFrameworkMaster  # noqa: F401
 
 #================
 # ELECTRONS
@@ -105,9 +103,9 @@ def setup_lep(TOPQname, ToolSvc):
   elif TOPQname == 'TOPQ2':
     TOPQ2_LEP10 = "( (count("+EL10+") >= 2) || (count("+MU10+") >= 2) || (count("+EL10+")>= 1 && count("+MU10+") >= 1) )" 
     TOPQ2_LEP15 = "( (count("+EL15+") >= 2) || (count("+MU15+") >= 2) || (count("+EL15+")>= 1 && count("+MU15+") >= 1) )"
-    TOPQ2_LEP17 = "( (count("+EL17+") >= 2) || (count("+MU17+") >= 2) || (count("+EL17+")>= 1 && count("+MU17+") >= 1) )"  
+    TOPQ2_LEP17 = "( (count("+EL17+") >= 2) || (count("+MU17+") >= 2) || (count("+EL17+")>= 1 && count("+MU17+") >= 1) )"  # noqa: F841 (FIXME, not used)
     TOPQ2_LEP20 = "( (count("+EL20+") >= 1) || (count("+MU20+") >= 1) )"
-    TOPQ2_LEP22 = "( (count("+EL22+") >= 1) || (count("+MU22+") >= 1) )"
+    TOPQ2_LEP22 = "( (count("+EL22+") >= 1) || (count("+MU22+") >= 1) )"  # noqa: F841 (FIXME, not used)
     TOPQ_Selection_lep = "( ("+TOPQ2_LEP15+") || (("+TOPQ2_LEP10+") && ("+TOPQ2_LEP20+")) )"
   elif TOPQname == 'TOPQ3':
     TOPQ_Selection_lep = "( (count("+MU13+") >= 1) || (count("+EL13+") >= 1) )"
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSlimming.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSlimming.py
index f8a6f7a2534d478fdf4a435640cd0013edb24bed..23d3000091e435ee911398b1e2f0bec465e2d695 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSlimming.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonSlimming.py
@@ -7,16 +7,14 @@
 #     DerivationFrameworkTop.TOPQCommonSlimming.setup('TOPQX', TOPQStream)
 #====================================================================
 
-from __future__ import print_function
-
 #================================
 # IMPORTS
 #================================
 from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper
 from AthenaCommon.GlobalFlags import globalflags
-from DerivationFrameworkTop.TOPQCommonExtraContent import *
-from DerivationFrameworkJetEtMiss.METCommon import *
-from DerivationFrameworkJetEtMiss.JetCommon import *
+import DerivationFrameworkTop.TOPQCommonExtraContent as tec
+from DerivationFrameworkJetEtMiss.METCommon import addMETOutputs
+from DerivationFrameworkJetEtMiss.JetCommon import addJetOutputs
 
 import JetTagNonPromptLepton.JetTagNonPromptLeptonConfig as Config
 
@@ -34,7 +32,7 @@ def setup(TOPQname, stream):
   # SMART SLIMMING
   #================================
   TOPQSlimmingHelper.SmartCollections =  []
-  TOPQSlimmingHelper.SmartCollections += TOPQSmartSlimmingCollections
+  TOPQSlimmingHelper.SmartCollections += tec.TOPQSmartSlimmingCollections
 
   print ("TOPQSlimmingHelper.SmartCollections: " , TOPQSlimmingHelper.SmartCollections)
 
@@ -42,27 +40,27 @@ def setup(TOPQname, stream):
   # EXTRA VARIABLES FROM DerivationFrameworkTop.TOPQCommonExtraContent
   #=================================================================
   TOPQSlimmingHelper.ExtraVariables = []
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesAntiKt4EMTopoJets
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesAntiKt4EMPFlowJets
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesBTagging_AntiKt4EMPFlow
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesBTagging_AntiKt4EMTopo
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesPhotons
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesElectrons
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesMuons
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesTaus
-  TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesTrackJets
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesAntiKt4EMTopoJets
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesAntiKt4EMPFlowJets
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesBTagging_AntiKt4EMPFlow
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesBTagging_AntiKt4EMTopo
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesPhotons
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesElectrons
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesMuons
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesTaus
+  TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesTrackJets
   TOPQSlimmingHelper.ExtraVariables += Config.GetExtraPromptVariablesForDxAOD()
   #  TOPQSlimmingHelper.ExtraVariables += ["CaloCalTopoClusters.calE.calEta.calPhi.calM.rawM.rawE.rawEta.rawPhi.e_sampl.eta_sampl.etaCalo.phiCalo"]
   TOPQSlimmingHelper.ExtraVariables += ["CaloCalTopoClusters.calPt.calEta.calPhi.calM.calE.CENTER_MAG"]
 
   if DFisMC:
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesPhotonsTruth
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesElectronsTruth
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesMuonsTruth
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVariablesTausTruth
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVarsBTag_HLT_Container
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVarsJet_EF_Container
-    TOPQSlimmingHelper.ExtraVariables += TOPQExtraVarsJet_Split_Container
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesPhotonsTruth
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesElectronsTruth
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesMuonsTruth
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVariablesTausTruth
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVarsBTag_HLT_Container
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVarsJet_EF_Container
+    TOPQSlimmingHelper.ExtraVariables += tec.TOPQExtraVarsJet_Split_Container
 
   print ("TOPQSlimmingHelper.ExtraVariables: " , TOPQSlimmingHelper.ExtraVariables)
 
@@ -70,11 +68,11 @@ def setup(TOPQname, stream):
   # EXTRA COLLECTIONS - user added
   #================================
   TOPQSlimmingHelper.AllVariables = []
-  TOPQSlimmingHelper.AllVariables += TOPQExtraContainersStandard
-  TOPQSlimmingHelper.AllVariables += TOPQExtraContainersTrigger
+  TOPQSlimmingHelper.AllVariables += tec.TOPQExtraContainersStandard
+  TOPQSlimmingHelper.AllVariables += tec.TOPQExtraContainersTrigger
 
   if DFisMC:
-    TOPQSlimmingHelper.AllVariables += TOPQExtraContainersTruth
+    TOPQSlimmingHelper.AllVariables += tec.TOPQExtraContainersTruth
 
   print ("TOPQSlimmingHelper.AllVariables: " , TOPQSlimmingHelper.AllVariables)
 
@@ -82,10 +80,10 @@ def setup(TOPQname, stream):
   # CREATED ON-THE-FLY COLLECTIONS
   #================================
   TOPQSlimmingHelper.StaticContent = []
-  TOPQSlimmingHelper.StaticContent += TOPQStaticContent
+  TOPQSlimmingHelper.StaticContent += tec.TOPQStaticContent
 
   if DFisMC:
-    TOPQSlimmingHelper.StaticContent += TOPQStaticContentTruth
+    TOPQSlimmingHelper.StaticContent += tec.TOPQStaticContentTruth
 
   print ("TOPQSlimmingHelper.StaticContent: " , TOPQSlimmingHelper.StaticContent)
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py
index 2b09791d3fe420340aae462e756ca0b655a5c9c7..7e26d7944225b1dae9943e75c767a4e99dcf5081 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonThinning.py
@@ -19,8 +19,6 @@
 #   * GenericTruthThinning (fine-grained thinning)
 #====================================================================
 
-from __future__ import print_function
-
 #============================
 # Define trigger chain output
 #============================
@@ -54,13 +52,13 @@ def setup(TOPQname, streamName, ToolSvc):
   # Track Particle Thinning !!! BUGGY (yes, that's a technical term)...CURRENTLY NOT USING !!!
   #========================
   # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TrackParticleThinning.cxx
-  thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)"
-  from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
-  TOPQTPThinningTool = DerivationFramework__TrackParticleThinning(  
-                         name                    = TOPQname + "TPThinningTool",
-                         StreamName              = streamName,
-                         SelectionString         = thinning_expression,
-                         InDetTrackParticlesKey  = "InDetTrackParticles")
+  #thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)"
+  #from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
+  #TOPQTPThinningTool = DerivationFramework__TrackParticleThinning(
+  #                       name                    = TOPQname + "TPThinningTool",
+  #                       StreamName              = streamName,
+  #                       SelectionString         = thinning_expression,
+  #                       InDetTrackParticlesKey  = "InDetTrackParticles")
 
   #ToolSvc += TOPQTPThinningTool
   #thinningTools.append(TOPQTPThinningTool)
@@ -259,7 +257,6 @@ def setup(TOPQname, streamName, ToolSvc):
 
   # we remove photons below 9GeV
   from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning
-  pTPhotonVariableToCutOn = ".pt"
   photonColl = "Photons"
   TOPQPhotonThinning = DerivationFramework__GenericObjectThinning(
     name = TOPQname + photonColl + "Thinning_lowpTphotons",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonTruthTools.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonTruthTools.py
index e3fe9f5189a56a80bb75fc52f8501efd0a0286b0..6df910529db278a08c1b916779b4f0089e305bcf 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonTruthTools.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTop/python/TOPQCommonTruthTools.py
@@ -7,13 +7,14 @@
 #  TOPQXSequence += TOPQCommonTruthKernel
 #====================================================================
 
-from __future__ import print_function
-
 #================================
 # IMPORTS
 #================================
-from DerivationFrameworkCore.DerivationFrameworkMaster import *
-from DerivationFrameworkMCTruth.HFHadronsCommon import *
+from AthenaCommon import CfgMgr
+from AthenaCommon.AppMgr import ToolSvc
+
+from DerivationFrameworkMCTruth.HFHadronsCommon import DSIDList
+
 
 def setup(ToolSvc):
 
@@ -47,7 +48,6 @@ def setup(ToolSvc):
   #==============================================================================
   # PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/TruthCollectionMaker.cxx
   # PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/TruthCollectionMakerTau.cxx
-  from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__TruthCollectionMaker
   from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__TruthCollectionMakerTau
 
   #==========
@@ -174,7 +174,7 @@ TOPQCommonTruthKernel = CfgMgr.DerivationFramework__CommonAugmentation("TOPQComm
 #==============================================================================
 # Add SumOfWeights metadata for LHE3 multiweights: TOPQDERIV-21
 #==============================================================================
-import DerivationFrameworkCore.LHE3WeightMetadata
+import DerivationFrameworkCore.LHE3WeightMetadata  # noqa: F401
 
 #     #==============================================================================
 #     # HIGGS TEMPLATE XSECTION augmentation