diff --git a/Calorimeter/CaloClusterCorrection/CMakeLists.txt b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
index c25ec3234ed0c210110e573d5d757c5802a77c67..24c0a64431e4320d459b405aa0b4786ef5fc50be 100644
--- a/Calorimeter/CaloClusterCorrection/CMakeLists.txt
+++ b/Calorimeter/CaloClusterCorrection/CMakeLists.txt
@@ -14,8 +14,8 @@ atlas_add_library( CaloClusterCorrectionLib
                    PUBLIC_HEADERS CaloClusterCorrection
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloInterfaceLib CaloRecLib CaloUtilsLib CxxUtils GaudiKernel StoreGateLib TileConditionsLib xAODCaloEvent
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps CaloDetDescrLib CaloGeoHelpers CaloIdentifier LArRecConditions PathResolver )
+                   LINK_LIBRARIES AthenaKernel CaloConditions CaloEvent CaloInterfaceLib CaloRecLib CaloUtilsLib CxxUtils GaudiKernel LArRecConditions StoreGateLib TileConditionsLib xAODCaloEvent
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthenaBaseComps CaloDetDescrLib CaloGeoHelpers CaloIdentifier PathResolver )
 
 atlas_add_component( CaloClusterCorrection
                      src/components/*.cxx
diff --git a/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h b/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h
index ba5023b3c087c6ed4da59a00349f37bf132c123d..d58d79b057cb86e2492aa9ea8c39b6ad5840018b 100644
--- a/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h
+++ b/Calorimeter/CaloInterface/CaloInterface/IToolWithConstants.h
@@ -15,7 +15,7 @@
 
 
 #include "CaloConditions/ToolConstants.h"
-#include "GaudiKernel/IInterface.h"
+#include "GaudiKernel/IAlgTool.h"
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/EventContext.h"
 #include <string>
@@ -27,7 +27,7 @@
  * Defines operations needed by CaloClusterCorrDBWriter.
  */
 class IToolWithConstants
-  : virtual public IInterface
+  : virtual public IAlgTool
 {
 public:
   DeclareInterfaceID (IToolWithConstants, 1, 0);
diff --git a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
index 28f5b2c4b1d7821acef68addc41f0de772eab0da..1ea957fb5ec0bfd4ab2ff815f275c9dc198a72c3 100644
--- a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
+++ b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
@@ -9,76 +9,23 @@
 
 
 #include "CaloClusterCorrDBWriter.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/ListItem.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 
 #include "CaloRec/ToolWithConstantsMixin.h"
 #include "CaloConditions/ToolConstants.h"
 #include "AthenaKernel/errorcheck.h"
 
-//#include "ToolConstants2Blob.h"
-
 
 using namespace CaloRec;
 
-//#############################################################################
-CaloClusterCorrDBWriter::CaloClusterCorrDBWriter(const std::string& name, 
-						 ISvcLocator* pSvcLocator) 
-  : AthAlgorithm(name, pSvcLocator),
-    m_blobTool("Blob2ToolConstants")
-{
-  // Name(s) of Cluster Correction Tools
-  declareProperty("ClusterCorrectionTools", m_correctionToolNames);
-  declareProperty("key",m_key="");
-  declareProperty("COOLInlineFolder",m_inlineFolder);
-}
-
-//#############################################################################
-
-CaloClusterCorrDBWriter::~CaloClusterCorrDBWriter()
-{ }
-
 //#############################################################################
 
 StatusCode CaloClusterCorrDBWriter::initialize()
 {
-  //Get ToolSvc  
-  IToolSvc*     p_toolSvc;
-  CHECK( service("ToolSvc", p_toolSvc) );
-
-  CHECK( m_blobTool.retrieve());
-
-  
-  // allocate tools derived from ToolsWithConstants
-  std::vector<std::string>::const_iterator firstTool=m_correctionToolNames.begin();
-  std::vector<std::string>::const_iterator lastTool =m_correctionToolNames.end();
-  for ( ; firstTool != lastTool; ++firstTool ) {
-    IAlgTool* algToolPtr;
-    ListItem  clusAlgoTool(*firstTool);
-    StatusCode scTool = p_toolSvc->retrieveTool(clusAlgoTool.type(),
-						clusAlgoTool.name(),
-						algToolPtr,
-						this);
-    if ( scTool.isFailure() ) {
-      REPORT_MESSAGE(MSG::ERROR) << "Cannot find tool for " << *firstTool;
-    }
-    else {
-      REPORT_MESSAGE(MSG::INFO) << m_key << ": "
-                                << "Found tool for " << *firstTool;
-      
-      // check for tool type
-      CaloRec::ToolWithConstantsMixin* theTool = 
-	dynamic_cast<CaloRec::ToolWithConstantsMixin*>(algToolPtr);
-      if ( theTool != nullptr ) { 
-	m_correctionTools.push_back(theTool);
-      }
-    }
-  }
+  ATH_CHECK( m_blobTool.retrieve());
+  ATH_CHECK( m_tools.retrieve());
   REPORT_MESSAGE(MSG::INFO) << m_key << ": "
-                            << "Found " << m_correctionTools.size() <<
+                            << "Found " << m_tools.size() <<
     " tools.";
   return StatusCode::SUCCESS;
 }
@@ -87,6 +34,7 @@ StatusCode CaloClusterCorrDBWriter::initialize()
 
 StatusCode CaloClusterCorrDBWriter::finalize()
 {
+  const EventContext& ctx = Gaudi::Hive::currentContext();
   if (!m_inlineFolder.empty()) {
     CaloRec::ToolConstants tc;
     std::string toolnames;
@@ -100,15 +48,15 @@ StatusCode CaloClusterCorrDBWriter::finalize()
       CHECK(detStore()->record(attrColl,m_inlineFolder));
     }
 
-    for (size_t i = 0; i < m_correctionTools.size(); i++) {
-      CHECK( m_correctionTools[i]->mergeConstants (tc) );
-      toolnames += m_correctionTools[i]->name() + " ";	
+    for (size_t i = 0; i < m_tools.size(); i++) {
+      CHECK( m_tools[i]->mergeConstants (tc, ctx) );
+      toolnames += m_tools[i]->name() + " ";	
     }
     coral::AttributeList* attrList=m_blobTool->ToolConstantsToAttrList(&tc);
     if (!attrList)
       return StatusCode::FAILURE;
     
-    const std::string& tName=m_key;//m_correctionTools[i]->name();
+    const std::string& tName=m_key;
     attrColl->add(coolChannelNbr,tName);
     attrColl->add(coolChannelNbr,*attrList);
     
@@ -121,9 +69,9 @@ StatusCode CaloClusterCorrDBWriter::finalize()
   else {
     auto tc = std::make_unique<CaloRec::ToolConstants>();
     std::string toolnames;
-    for (size_t i = 0; i < m_correctionTools.size(); i++) {
-      CHECK( m_correctionTools[i]->mergeConstants (*tc) );
-      toolnames += m_correctionTools[i]->name() + " ";
+    for (size_t i = 0; i < m_tools.size(); i++) {
+      CHECK( m_tools[i]->mergeConstants (*tc, ctx) );
+      toolnames += m_tools[i]->name() + " ";
     }
 
     CHECK( detStore()->record (std::move(tc), m_key) );
@@ -142,7 +90,7 @@ StatusCode CaloClusterCorrDBWriter::finalize()
 
 //#############################################################################
 
-StatusCode CaloClusterCorrDBWriter::execute()
+StatusCode CaloClusterCorrDBWriter::execute (const EventContext& /*ctx*/) const
 {
   return StatusCode::SUCCESS;
 }
diff --git a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h
index 4955af8e4c5e92081d54df8ffcfc216f292f90fb..319da945ca39b74640ca397dfd69ba40977b94f7 100644
--- a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h
+++ b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CALOREC_CALOCLUSTERCORRDBWRITER
@@ -20,42 +20,40 @@
 
 
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "CaloRec/ToolWithConstantsMixin.h"
+#include "CaloInterface/IToolWithConstants.h"
 #include "CaloRec/Blob2ToolConstants.h"
 #include <vector>
 #include <string>
 
 
-class CaloClusterCorrDBWriter : public AthAlgorithm
+class CaloClusterCorrDBWriter : public AthReentrantAlgorithm
 {
 
  public:
+  using AthReentrantAlgorithm::AthReentrantAlgorithm;
 
-  CaloClusterCorrDBWriter(const std::string& name, ISvcLocator* pSvcLocator);
-  virtual ~CaloClusterCorrDBWriter();
-  virtual StatusCode initialize();
-  virtual StatusCode execute();
-  virtual StatusCode finalize();
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute(const EventContext& ctx) const override;
+  virtual StatusCode finalize() override;
   
  private:
-
-  /** @brief The list of tool names (jobOptions)*/
-  std::vector<std::string> m_correctionToolNames;
+  /** @brief The list of tools */
+  ToolHandleArray<IToolWithConstants> m_tools
+  { this, "ClusterCorrectionTools", {}, "Cluster correction tools" };
 
   /** @brief Key for the DetectorStore (jobOptions) 
    * The ToolConstants will be recorded with this key.
    */
-  std::string m_key;
-
-  std::string m_inlineFolder;
+  StringProperty m_key
+  { this, "key", "" };
 
-  /** @brief the actual list of tools corresponding to above names */
-  std::vector<CaloRec::ToolWithConstantsMixin*>  m_correctionTools; 
+  StringProperty m_inlineFolder
+  { this, "COOLInlineFolder", "" };
 
-  ToolHandle<Blob2ToolConstants> m_blobTool;
-  
+  ToolHandle<Blob2ToolConstants> m_blobTool
+  { this, "Blob2ToolConstants", "Blob2ToolConstants" };
 };
 
 #endif // CALOREC_CALOCLUSTERCORRDBWRITER
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h
deleted file mode 100644
index ce75755be268141dfd7d65ae46fc0900c5bb85d6..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellESelector.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLESELECTOR_H
-#define CALOUTILS_CALOCELLESELECTOR_H
-
-#include "CaloInterface/ICaloCellSelector.h"
-
-class CaloCell;
-
-class CaloCellESelector : public ICaloCellSelector
-{
- public:
-
-  CaloCellESelector();
-  CaloCellESelector(double minE, double maxE=-1.);
-
-  virtual ~CaloCellESelector();
-
-  virtual bool accept(const CaloCell* aCell) const;
-
- private:
-
-  double m_minE, m_maxE;
-};
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h
deleted file mode 100644
index 0a367a1d7e638f1ba5790bab449dd32a2d336c66..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellESort.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOCELLESORT_H
-#define CALOCELLESORT_H
-//-----------------------------------------------------------------------
-// File and Version Information:
-// $Id: CaloCellESort.h,v 1.1 2005-06-14 20:33:49 menke Exp $
-//
-// Description: E sorting for CaloCell 
-//   
-// Environment:
-//      Software developed for the ATLAS Detector at the CERN LHC
-//
-// Author List:
-//      Sven Menke
-//
-//-----------------------------------------------------------------------
-
-#include "CaloEvent/CaloCell.h"
-
-namespace CaloCellESort{
-// comparison,  order Cell by E
-class compare
- {
-
-  public:
-  inline   compare() {} ;
-  inline   bool operator () (const CaloCell* c1, 
-			     const CaloCell* c2)
-  {
-    return c1->e() > c2->e() ;
-  }  
-  
- };
-}
-
-#endif // CALOCELLESORT_H
-
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h
deleted file mode 100644
index 33f7c82aff4dd617eb8ee5bda2607f3fc1a69cb2..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellEtSelector.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLETSELECTOR_H
-#define CALOUTILS_CALOCELLETSELECTOR_H
-
-#include "CaloInterface/ICaloCellSelector.h"
-
-class CaloCell;
-
-class CaloCellEtSelector : public ICaloCellSelector
-{
- public:
-
-  CaloCellEtSelector();
-  CaloCellEtSelector(double minEt, double maxEt=-1.);
-
-  virtual ~CaloCellEtSelector();
-
-  virtual bool accept(const CaloCell* aCell) const;
-
- private:
-
-  double m_minEt, m_maxEt;
-};
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h
deleted file mode 100644
index 36a9ea5711c1f88467601464f96f60aff8d49b92..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingAcceptor.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLSAMPLINGACCEPTOR_H
-#define CALOUTILS_CALOCELLSAMPLINGACCEPTOR_H
-
-#include "CaloUtils/CaloCellSamplingSelectorBase.h"
-
-template<typename LIST>
-class CaloCellSamplingAcceptor 
-  : public CaloCellSamplingSelectorBase<LIST>
-{
-
-public:
-
-  CaloCellSamplingAcceptor();
-  CaloCellSamplingAcceptor(const LIST& samplings);
-  virtual ~CaloCellSamplingAcceptor() { };
-
-protected:
-
-  virtual bool checkSampling(const CaloSampling::CaloSample& aSampling) const;
-
-};
-
-template<typename LIST>
-CaloCellSamplingAcceptor<LIST>::CaloCellSamplingAcceptor()
-  : CaloCellSamplingSelectorBase<LIST>()
-{ }
-
-template<typename LIST>
-CaloCellSamplingAcceptor<LIST>::CaloCellSamplingAcceptor(const LIST&
-							 samplings)
-  : CaloCellSamplingSelectorBase<LIST>(samplings)
-{ }
-
-
-template<typename LIST>
-bool 
-CaloCellSamplingAcceptor<LIST>::checkSampling(const CaloSampling::CaloSample&
-					      aSampling) const
-{
-  return 
-    std::find(this->m_listOfSamplings.begin(),this->m_listOfSamplings.end(),aSampling) 
-    != this->m_listOfSamplings.end();
-}
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h
deleted file mode 100644
index b78ec6708a60128a48712992ad56a7ae75a45221..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingRejector.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLSAMPLINGREJECTOR_H
-#define CALOUTILS_CALOCELLSAMPLINGREJECTOR_H
-
-#include "CaloUtils/CaloCellSamplingSelectorBase.h"
-
-template<typename LIST>
-class CaloCellSamplingRejector 
-  : public CaloCellSamplingSelectorBase<LIST>
-{
-
-public:
-
-  CaloCellSamplingRejector();
-  CaloCellSamplingRejector(const LIST& samplings);
-  virtual ~CaloCellSamplingRejector() { };
-
-protected:
-
-  virtual bool checkSampling(const CaloSampling::CaloSample& aSampling) const;
-};
-
-template<typename LIST>
-CaloCellSamplingRejector<LIST>::CaloCellSamplingRejector()
-  : CaloCellSamplingSelectorBase<LIST>()
-{ }
-
-template<typename LIST>
-CaloCellSamplingRejector<LIST>::CaloCellSamplingRejector(const LIST&
-							 samplings)
-  : CaloCellSamplingSelectorBase<LIST>(samplings)
-{ }
-
-
-template<typename LIST>
-bool 
-CaloCellSamplingRejector<LIST>::checkSampling(const CaloSampling::CaloSample&
-					      aSampling) const
-{
-  return 
-    std::find(this->m_listOfSamplings.begin(),this->m_listOfSamplings.end(),aSampling)
-    == this->m_listOfSamplings.end();
-}
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h b/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h
deleted file mode 100644
index d03f3001c67a9f2ff5e12ef855a2398631ab148d..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloCellSamplingSelectorBase.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOCELLSAMPLINGSELECTORBASE_H
-#define CALOUTILS_CALOCELLSAMPLINGSELECTORBASE_H
-
-#include "CaloInterface/ICaloCellSelector.h"
-
-#include "CaloGeoHelpers/CaloSampling.h"
-
-#include <algorithm>
-#include <iterator>
-
-class CaloCell;
-
-template<typename LIST>
-class CaloCellSamplingSelectorBase : virtual public ICaloCellSelector
-{
-public:
-
-  CaloCellSamplingSelectorBase();
-  CaloCellSamplingSelectorBase(const LIST& samplings);
-
-  virtual ~CaloCellSamplingSelectorBase();
-
-  virtual bool accept(const CaloCell* pCell) const;
-
-protected:
-
-  LIST m_listOfSamplings;
-
-  virtual bool 
-  checkSampling(const CaloSampling::CaloSample& aSampling) const = 0;
-
-};
-
-template<typename LIST>
-CaloCellSamplingSelectorBase<LIST>::CaloCellSamplingSelectorBase()
-{ }
-
-template<typename LIST>
-CaloCellSamplingSelectorBase<LIST>::
-CaloCellSamplingSelectorBase(const LIST& samplings)
-{
-  std::copy(samplings.begin(),samplings.end(),
-	    std::back_insert_iterator<LIST>(m_listOfSamplings));
-}
-
-template<typename LIST>
-CaloCellSamplingSelectorBase<LIST>::~CaloCellSamplingSelectorBase()
-{ }
-
-template<typename LIST>
-bool
-CaloCellSamplingSelectorBase<LIST>::accept(const CaloCell* pCell) const
-{
-  CaloSampling::CaloSample theSampling = pCell->caloDDE()->getSampling();
-  return theSampling != CaloSampling::Unknown 
-    ? this->checkSampling(theSampling)
-    : false;
-}
-#endif
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h b/Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h
deleted file mode 100644
index 5c5abf2f15870ef382a2fb21c7554c8f8f083cce..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/CaloUtils/CaloSampleEnergies.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef CALOUTILS_CALOSAMPLEENERGIRES_H
-#define CALOUTILS_CALOSAMPLEENERGIRES_H
-
-/*   Purpose:	Given a CaloTower, CaloCluster, or iterator pair of
-	        CaloCells, return a vector of energy in each sampling 
-*/
-
-#include "CaloEvent/CaloCell.h" 
-#include "CaloGeoHelpers/CaloSampling.h" 
-
-class CaloTower;
-class CaloCluster; 
-
-#include <vector>
-#include <math.h>
-
-class CaloSampleEnergies
-{
-
- public:
-
-  typedef  std::vector<double>                  E_VECTOR ; 
-  typedef  E_VECTOR::const_iterator             E_ITERATOR;
-
-  CaloSampleEnergies( );
-  ~CaloSampleEnergies();
-
-  /** Return energy in each Sampling for CaloTower
-  */ 
-  const E_VECTOR& getEnergies(const CaloTower*) ; 
-  /** Return energy in each Sampling for CaloCluster
-  */ 
-  const E_VECTOR& getEnergies(const CaloCluster*) ; 
-
-  /** Return energy in each Sampling for a pair of interators
-  */ 
-  template <class ITER > 
-  const E_VECTOR& getEnergies( ITER t1, ITER t2); 
-
- private: 
-  E_VECTOR m_vec ; 
-
-};
-
-template <class ITER> 
-const CaloSampleEnergies::E_VECTOR& CaloSampleEnergies::getEnergies(ITER it1, 
-							ITER it2)
-{
-
- int nEntry = CaloSampling::Unknown ; 
-
- for(int i=0; i<nEntry; ++i) m_vec[i]=0; 
-
- for(; it1!=it2;++it1) 
- {
-  const CaloCell* cell   = *it1; 
-  int sam = cell->caloDDE()->getSampling();
-  m_vec[sam] += cell->energy(); 
- }
-
- return m_vec;
-
-} 
-
-#endif
-
-
-
-
-
-
-
diff --git a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h
index 6bf04b0609a884c966cf0584252185f6e4bfb262..82b8f718e4bc247a9cb0075d924ab5d8cbaffa79 100644
--- a/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h
+++ b/Calorimeter/CaloUtils/CaloUtils/CaloTopoTowerBuilderToolBase.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CALOREC_CALOTOPOTOWERBUILDERTOOLBASE_H
@@ -20,7 +20,6 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "CaloInterface/ICaloTopoTowerBuilderToolBase.h"
 #include "CaloEvent/CaloTowerSeg.h"
-#include "StoreGate/StoreGate.h"
 #include <string>
 
 class CaloTowerContainer;
diff --git a/Calorimeter/CaloUtils/src/CaloCellESelector.cxx b/Calorimeter/CaloUtils/src/CaloCellESelector.cxx
deleted file mode 100644
index 803a9ca9ac799e57a78ea7c7b892d20dbdbc3197..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/src/CaloCellESelector.cxx
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include "CaloEvent/CaloCell.h"
-
-#include "CaloUtils/CaloCellESelector.h"
-
-CaloCellESelector::CaloCellESelector(double minE,double maxE)
-  : ICaloCellSelector()
-  , m_minE(minE), m_maxE(maxE)
-{ }
-
-CaloCellESelector::~CaloCellESelector()
-{ }
-
-bool CaloCellESelector::accept(const CaloCell* aCell) const
-{
-  if (!aCell) return false;
-  return m_maxE > m_minE
-    ? aCell->e() >= m_minE && aCell->e() <= m_maxE
-    : aCell->e() >= m_minE;
-}
diff --git a/Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx b/Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx
deleted file mode 100644
index 88641f7a994cda8b758253cf02a0eb108980a10e..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/src/CaloCellEtSelector.cxx
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include "CaloEvent/CaloCell.h"
-
-#include "CaloUtils/CaloCellEtSelector.h"
-
-CaloCellEtSelector::CaloCellEtSelector(double minEt,double maxEt)
-  : ICaloCellSelector()
-  , m_minEt(minEt), m_maxEt(maxEt)
-{ }
-
-CaloCellEtSelector::~CaloCellEtSelector()
-{ }
-
-bool CaloCellEtSelector::accept(const CaloCell* aCell) const
-{
-  if (!aCell) return false;
-  return m_maxEt > m_minEt && aCell != nullptr 
-    ? aCell->et() >= m_minEt && aCell->et() <= m_maxEt
-    : aCell->et() >= m_minEt;
-}
diff --git a/Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx b/Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx
deleted file mode 100644
index 17d261744d6f405721b0bb9fe2c973ede9f40e6d..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloUtils/src/CaloSampleEnergies.cxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "CaloUtils/CaloSampleEnergies.h" 
-#include "CaloEvent/CaloTower.h"
-#include "CaloEvent/CaloCluster.h"
-
-// constructor
-CaloSampleEnergies::CaloSampleEnergies() : m_vec((int)(CaloSampling::Unknown))
-{  }
-
-// destructor 
-CaloSampleEnergies::~CaloSampleEnergies() { }  
-
-
-// CaloTower
-const CaloSampleEnergies::E_VECTOR& 
-   CaloSampleEnergies::getEnergies( const CaloTower*  obj ) 
-{
-   return getEnergies(obj->cell_begin(),obj->cell_end() ); 
-} 
-
-// CaloCluster
-const CaloSampleEnergies::E_VECTOR& 
-   CaloSampleEnergies::getEnergies( const CaloCluster* obj ) 
-{
-   return getEnergies(obj->cell_begin(),obj->cell_end() ); 
-} 
diff --git a/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx b/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
index c5f9809daaef14895f273043a702bfc95805c972..7b0e31f4cb7cc709ea392114a51d8d0f65f176e2 100644
--- a/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
+++ b/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
@@ -37,7 +37,6 @@ ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
 #include "CaloIdentifier/TileID.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "IdDictParser/IdDictParser.h"
-#include "StoreGate/StoreGate.h"
 #include "TestTools/initGaudi.h"
 #include "GaudiKernel/Bootstrap.h"
 #include "CLHEP/Units/SystemOfUnits.h"
diff --git a/Control/AthenaCommon/share/athena3.py b/Control/AthenaCommon/share/athena3.py
deleted file mode 100755
index c563db0e1ce48c3e9bb6170e78b21d0dcc213758..0000000000000000000000000000000000000000
--- a/Control/AthenaCommon/share/athena3.py
+++ /dev/null
@@ -1,214 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-#
-# athena.py is born as shell script to preload some optional libraries
-#
-"""date"
-
-# defaults
-export USETCMALLOC=0
-export USEIMF=0
-
-# but use tcmalloc by default if TCMALLOCDIR is defined
-if [ -n "$TCMALLOCDIR" ]; then
-    export USETCMALLOC=1
-fi
-
-# parse command line arguments
-for a in ${@}
-do
-    case "$a" in
-	--leak-check*)   USETCMALLOC=0;;
-	--delete-check*) USETCMALLOC=0;;
-	--stdcmalloc)    USETCMALLOC=0;;
-	--tcmalloc)      USETCMALLOC=1;;
-	--stdcmath)      USEIMF=0;;
-	--imf)           USEIMF=1;;
-	--preloadlib*)     export ATHENA_ADD_PRELOAD=${a#*=};;
-	--drop-and-reload) export ATHENA_DROP_RELOAD=1;;
-    esac
-done
-
-# Do the actual preloading via LD_PRELOAD
-source `which athena_preload.sh `
-
-# Now resurrect ourselves as python script
-python_path=`which python3`
-"exec" "$python_path" "-tt" "$0" "$@";
-
-"""
-
-
-# File: athena.py
-# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
-# "
-# This script allows you to run Athena from python. It is developed against
-# the cppyy based GaudiPython and python 2.6/7.x.
-#
-# Debugging is supported with the '-d' option (hook debugger after running
-# all user scripts, and just before calling initialize) and the --debug
-# option (requires "conf", "init", or "exec" and will hook just before that
-# stage). The hook will give you the gdb prompt, from where you can set
-# break points, load additional shared libraries, or drop into interactive
-# athena mode (if -i specified on the cli). Alternatively, you can start
-# with gdb, like so:
-#
-#  $ gdb python
-#  (gdb) run `which athena.py` [options] [<file1>.py [<file2>.py ...
-#
-# Usage of valgrind is supported, but it requires full paths and explicit
-# arguments in its run, like so:
-#
-#  $ valgrind `which python` `which athena.py` [options] [<file1>.py ...
-#
-# or, alternatively (valgrind 3.2.0 and up):
-#
-#  $ valgrind --trace-children=yes `which athena.py` [options] [<file1>.py ...
-#
-# Note that any error messages/leaks that valgrind reports on python can be
-# ignored, as valgrind is wrong (see the file Misc/README.valgrind in the
-# python installation).
-#
-# Additional details on debugging are available on the Wiki:
-#
-#   https://uimon.cern.ch/twiki/bin/view/Atlas/StartingDebuggerWithAthenaPy
-#
-
-__version__ = '3.3.0'
-__author__  = 'Wim Lavrijsen (WLavrijsen@lbl.gov)'
-__doc__     = 'For details about athena.py, run "less `which athena.py`"'
-
-import sys, os
-import getopt
-
-ldpreload = os.getenv( 'LD_PRELOAD' ) or ''
-
-### parse the command line arguments -----------------------------------------
-import AthenaCommon.AthOptionsParser as aop
-opts = aop.parse()
-_help_and_exit = aop._help_and_exit
-
-### remove preload hack for proper execution of child-processes --------------
-if ldpreload:
-   if 'TCMALLOCDIR' in os.environ:
-       tcmlib = os.getenv( 'TCMALLOCDIR' ) +  "/libtcmalloc.so"
-       ldpreload = ldpreload.replace(tcmlib, '' )
-       tcmlib = os.getenv( 'TCMALLOCDIR' ) +  "/libtcmalloc_minimal.so"
-       ldpreload = ldpreload.replace(tcmlib, '' )
-       del tcmlib
-   if os.getenv( 'ATHENA_ADD_PRELOAD' ):
-      ldpreload = ldpreload.replace(os.getenv( 'ATHENA_ADD_PRELOAD' ), '' )
-      os.unsetenv( 'ATHENA_ADD_PRELOAD' )
-   ldpreload = ldpreload.replace( '::', ':')
-   ldpreload = ldpreload.strip(':')
-
-   if not ldpreload:
-      del os.environ[ 'LD_PRELOAD' ]
-   else:
-      os.environ[ 'LD_PRELOAD' ] = ldpreload
-del ldpreload
-
-### start profiler, if requested
-if opts.profile_python:
-   import cProfile
- # profiler is created and controlled programmatically b/c a CLI profiling of
- # athena.py doesn't work (globals are lost from include() execfile() calls),
- # and because this allows easy excluding of the (all C++) Gaudi run
-   cProfile._athena_python_profiler = cProfile.Profile()
-   cProfile._athena_python_profiler.enable()
-
-### debugging setup
-from AthenaCommon.Debugging import DbgStage
-DbgStage.value = opts.dbg_stage
-
-### python interpreter configuration -----------------------------------------
-if not os.getcwd() in sys.path:
-   sys.path = [ os.getcwd() ] + sys.path
-
-if not '' in sys.path:
-   sys.path = [ '' ] + sys.path
-
-
-## rename ourselfs to athena, both the prompt and the process (for top & ps)
-sys.ps1 = 'athena> '
-sys.ps2 = '.   ... '
-
-try:
-   import ctypes
-   from ctypes.util import find_library as ctypes_find_library
-   libc = ctypes.cdll.LoadLibrary( ctypes_find_library('c') )
-   libc.prctl( 15, 'athena.py', 0, 0, 0 )
-except Exception:
-   pass            # don't worry about it failing ...
-
-## user session history (deleted in Preparation.py)
-fhistory = os.path.expanduser( '~/.athena.history' )
-
-
-## interface setup as appropriate
-if opts.run_batch and not opts.dbg_stage:
- # in batch there is no need for stdin
-   if sys.stdin and os.isatty( sys.stdin.fileno() ):
-      os.close( sys.stdin.fileno() )
-else:
-   # Make sure ROOT gets initialized early, so that it shuts down last.
-   # Otherwise, ROOT can get shut down before Gaudi, leading to crashes
-   # when Athena components dereference ROOT objects that have been deleted.
-   import ROOT
-
- # readline support
-   import rlcompleter, readline
-
-   readline.parse_and_bind( 'tab: complete' )
-   readline.parse_and_bind( 'set show-all-if-ambiguous On' )
-
- # history support
-   if os.path.exists( fhistory ):
-      readline.read_history_file( fhistory )
-   readline.set_history_length( 1024 )
-
-   del readline, rlcompleter
-
-## use of shell escapes in interactive mode
-if not opts.run_batch:
-   import AthenaCommon.ShellEscapes as ShellEscapes
-   sys.excepthook = ShellEscapes.ShellEscapes()
-   del ShellEscapes
-
-
-### logging and messages -----------------------------------------------------
-from AthenaCommon.Logging import *
-_msg = log # from above import...
-
-## test and set log level
-try:
-   _msg.setLevel (getattr(logging, opts.msg_lvl))
-except:
-   _help_and_exit()
-
-
-### default file name for ease of use ----------------------------------------
-if not opts.scripts and os.path.exists(opts.default_jobopt):
-   _msg.info("using default file %s", opts.default_jobopt)
-   opts.scripts.append(opts.default_jobopt)
-
-if not (opts.scripts or opts.fromdb) and opts.run_batch:
-   _msg.error( "batch mode requires at least one script" )
-   from AthenaCommon.ExitCodes import INCLUDE_ERROR
-   _help_and_exit( INCLUDE_ERROR )
-del _help_and_exit
-
-
-### file inclusion and tracing -----------------------------------------------
-from AthenaCommon.Include import IncludeError, include
-include.setShowIncludes(opts.showincludes)
-include.setClean(opts.drop_cfg)
-
-
-### pre-execution step -------------------------------------------------------
-include( "AthenaCommon/Preparation.py" )
-
-
-### execution of user script and drop into batch or interactive mode ---------
-include( "AthenaCommon/Execution.py" )
diff --git a/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx b/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx
index a903b29b873ec83d955f3ffa07d720f2c95f6407..6b65d29c9868b9d7f0f2d0bd1c31bfc84aba7a0a 100644
--- a/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx
+++ b/Control/AthenaMPTools/src/SharedEvtQueueConsumer.cxx
@@ -384,11 +384,12 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedEvtQueueConsumer::boots
   }
 
   if(m_useSharedWriter && m_dataShare) {
-    if(!m_dataShare->makeClient(m_rankId + 1).isSuccess()) {
-      ATH_MSG_ERROR("Failed to make the conversion service a share client");
+    IProperty* propertyServer = dynamic_cast<IProperty*>(m_dataShare);
+    if (propertyServer==0 || propertyServer->setProperty("MakeStreamingToolClient", m_rankId + 1).isFailure()) {
+      ATH_MSG_ERROR("Could not change AthenaPoolCnvSvc MakeClient Property");
       return outwork;
     } else {
-    ATH_MSG_DEBUG("Successfully made the conversion service a share client");
+      ATH_MSG_DEBUG("Successfully made the conversion service a share client");
     }
   }
 
diff --git a/Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY b/Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..a9f156d201be6188e8036b8693686988bb74faa6
--- /dev/null
+++ b/Database/APR/FileCatalog/FileCatalog/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Database/APR/FileCatalog
diff --git a/Database/APR/FileCatalog/test/URIParser_test.cxx b/Database/APR/FileCatalog/test/URIParser_test.cxx
index 8de9abb457e30248d923a8e53053fb88de508ad7..cdca6bb025c6dc00ac6d11e16e7e17e0482b533d 100755
--- a/Database/APR/FileCatalog/test/URIParser_test.cxx
+++ b/Database/APR/FileCatalog/test/URIParser_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //$Id: URIParser_test.cxx 457829 2011-09-08 13:13:25Z mnowak $
@@ -36,7 +36,7 @@ int main(){
     p.parse();p.dump(); 
   }catch(const pool::Exception& er){
     std::cerr <<er.what()<< std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCaddReplica.cpp b/Database/APR/FileCatalog/utilities/FCaddReplica.cpp
index 4370ad9f0c8338d9b563e73c983ca7f8e44d4b34..a409808db3317b15a0b15cb50cddb9c7c96e19a7 100755
--- a/Database/APR/FileCatalog/utilities/FCaddReplica.cpp
+++ b/Database/APR/FileCatalog/utilities/FCaddReplica.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FCaddReplica.cpp -- FileCatalog command line tool to add replica pfn 
@@ -20,8 +20,6 @@ void printUsage(){
   std::cout<<"usage: FCaddReplica -r replica [-p pfname -g guid -u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"r","p","g","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -33,6 +31,7 @@ int main(int argc, char** argv)
   FileCatalog::FileID myguid;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"r","p","g","u","h",0};
     commands.CheckOptions(opts);
     
     if( commands.Exists("u") ){
@@ -51,22 +50,22 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(-1);
+    return -1;
   }
   
   if( myrpf.empty() ){
     printUsage();
     std::cerr<<"Error: must specify replica name using -r"<<std::endl;
-    exit(0);
+    return 0;
   }
   if( mypfn.empty()&& myguid.empty() ){
     printUsage();
     std::cerr<<"Error: must specify PFN using -p or guid using -g"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -88,10 +87,10 @@ int main(int argc, char** argv)
     }
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp b/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp
index 0cdd294897ec8b33ddc392e670443e8827203246..0752d444c863bc56a09bd1b0b1e3a3ba941bd196 100755
--- a/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp
+++ b/Database/APR/FileCatalog/utilities/FCdeleteEntry.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FCdeleteEntry.cpp -- FileCatalog command line tool to delete all entries associated with given file.
@@ -19,8 +19,6 @@ void printUsage(){
   std::cout<<"usage: FCdeleteEntry [-q query -l lfname -p pfname -u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"q","l","p","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -32,6 +30,7 @@ int main(int argc, char** argv)
   std::string  myquery;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"q","l","p","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -51,23 +50,23 @@ int main(int argc, char** argv)
     
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mylfn.empty() && mypfn.empty() && myquery.empty() ){
     printUsage();
     std::cerr<<"Error: must specify lfname using -l , pfname using -p, query using -q"<<std::endl;
-    exit(0);
+    return 0;
   }
 
   if( !mylfn.empty() && !mypfn.empty() ){
     printUsage();
     std::cerr<<"Error: can only delete either PFN or LFN"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{  
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -79,7 +78,7 @@ int main(int argc, char** argv)
     mycatalog->start();
     if( !myquery.empty() ){
        std::cerr << "Query option not supported" << std::endl;
-       exit(2); 
+       return 2;
     }else if( !mylfn.empty() ){
        mycatalog->deleteFID( mycatalog->lookupLFN( mylfn ) );
     }else if( !mypfn.empty() ) {
@@ -89,10 +88,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp b/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp
index a3b500fe5d15ae3a927d3a8ab4a3b78fc9cd1a9a..ded3e4dde787b93ee760983aaa22d5bed12276b4 100755
--- a/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCdeletePFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /** FCdeletePFN.cpp -- FileCatalog command line tool to delete the selected PFN 
@@ -19,8 +19,6 @@ void printUsage(){
   std::cout<<"usage: FCdeletePFN [-q query -p pfname -u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"p","q","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -31,6 +29,7 @@ int main(int argc, char** argv)
   std::string  myquery;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","q","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -46,17 +45,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<< "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mypfn.empty() && myquery.empty() ){
     printUsage();
     std::cerr<<"Error: must specify pfname using -p, query using -q"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -67,7 +66,7 @@ int main(int argc, char** argv)
     mycatalog->start();
     if( !myquery.empty() ){
       std::cerr << "Query option not supported" << std::endl;
-      exit(2); 
+      return 2;
     }else if( !mypfn.empty() ) {
       mycatalog->deletePFN(mypfn);
     }
@@ -75,10 +74,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FClistGUID.cpp b/Database/APR/FileCatalog/utilities/FClistGUID.cpp
index f1aa7fa971b4104c178329738bcb452101c7dadc..5e224bd8eacb241b5b3a6a6d10fadbf6988dd393 100644
--- a/Database/APR/FileCatalog/utilities/FClistGUID.cpp
+++ b/Database/APR/FileCatalog/utilities/FClistGUID.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FClistGUID.cpp -- FileCatalog command line tool to list guid
@@ -22,8 +22,6 @@ void printUsage(){
   std::cout<<"usage: FClistGUID [-p pfname -l lfname -q query -u contactstring -h]" <<std::endl; 
 }
 
-static const char* opts[] = {"p","l","q","u","h",0};
-
 class contactParser{
 public:
   contactParser(const std::string& contact):m_contact(contact){}
@@ -62,6 +60,7 @@ int main(int argc, char** argv)
   std::string  query;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","l","q","u","h",0};
     commands.CheckOptions(opts);
     
     if( commands.Exists("u") ){
@@ -80,11 +79,11 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<< "Error: command parsing error "<<strError<<std::endl;
-    exit(1);
+    return 1;
   }
 
   if(!query.empty()&&!mypfn.empty()){
@@ -110,7 +109,7 @@ int main(int argc, char** argv)
     pool::IFileCatalog::Strings fids;
     if( !query.empty() ){
        std::cerr << "Query option not supported" << std::endl;
-       exit(2); 
+       return 2;
     } else if( !mypfn.empty() ){
        fids.push_back( mycatalog->lookupPFN( mypfn ) );
     } else if( !mylfn.empty() ){
@@ -125,10 +124,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FClistLFN.cpp b/Database/APR/FileCatalog/utilities/FClistLFN.cpp
index b3f42119184b73b181b685844904684f2d0d8ded..cddad5128a24873c0de21c9dad69ad21e0b4b07a 100755
--- a/Database/APR/FileCatalog/utilities/FClistLFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FClistLFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FClistLFN.cpp -- FileCatalog command line tool to list all the LFN entries from the catalog.
@@ -21,8 +21,6 @@ void printUsage(){
   std::cout<<"usage: FClistLFN [-p pfname] [-u contactstring] [-h]" <<std::endl; 
 }
 
-static const char* opts[] = {"p","u","h",0};
-
 
 class contactParser{
 public:
@@ -58,6 +56,7 @@ int main(int argc, char** argv)
   std::string  mypfn;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","u","h",0};
     commands.CheckOptions(opts);
     
     if( commands.Exists("u") ){
@@ -70,11 +69,11 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<< "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
 
   if( !mypfn.empty() ) {
@@ -116,10 +115,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FClistPFN.cpp b/Database/APR/FileCatalog/utilities/FClistPFN.cpp
index 25d1980aef50f2485dea3705720511ba18ebb0a0..8a2ef5d5a27b07640c9b828e67c3fc8e8ad74149 100755
--- a/Database/APR/FileCatalog/utilities/FClistPFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FClistPFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FClistPFN.cpp -- FileCatalog command line tool to list the PFN entries from the catalog
@@ -23,8 +23,6 @@ void printUsage(){
   std::cout<<"usage: FClistPFN [-l lfname] [-u contactstring] [-t -h]" <<std::endl; 
 }
 
-static const char* opts[] = {"t","l","u","f","h",0};
-
 
 class contactParser{
 public:
@@ -61,6 +59,7 @@ int main(int argc, char** argv)
   bool printall=false;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"t","l","u","f","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -79,11 +78,11 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
 
   try{
@@ -129,10 +128,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp b/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp
index 2d1ad5a62d327b1ae228006ac65b342c2665331c..92692b48f8c05ce0eecc786b3101604f7dae7e6e 100755
--- a/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCregisterLFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FCregisterLFN.cpp -- FileCatalog command line tool to register a LFN
@@ -20,8 +20,6 @@ void printUsage(){
   std::cout<<"usage: FCregisterLFN -l lfname -p pfname [-u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"p","l","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -32,6 +30,7 @@ int main(int argc, char** argv)
   std::string  mylfn;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","l","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -47,17 +46,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mypfn.empty() || mylfn.empty() ){
     printUsage();
     std::cerr<<"Error: must specify pfname using -p, lfname using -l"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -71,10 +70,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp b/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp
index e42d0e404997888306ed3b612dd34f9af2c551a7..d0820dc49790919aa5af51e700b763a25e985733 100755
--- a/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCregisterPFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -20,8 +20,6 @@ void printUsage(){
   std::cout<< "usage: registerPFN -p pfname [ -u contactstring -t filetype -g guid -h ]" <<std::endl;
 }
 
-static const char* opts[] = {"p","t","g","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -33,6 +31,7 @@ int main(int argc, char** argv)
   std::string myguid;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","t","g","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -51,17 +50,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr<<"Error: command parsing error "<<strError<<std::endl;
-    exit(0);
+    return 0;
   }
   
   if( mypfn.empty() ){
     printUsage();
     std::cerr<<"Error: must specify pfname using -p"<<std::endl;
-    exit(0);
+    return 0;
   }
   try{  
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -76,10 +75,10 @@ int main(int argc, char** argv)
     std::cout<<myguid<<std::endl;
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp b/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp
index 61b6ce2c47fe2025906e2d8ab9061717512a917c..8d911bd514d74a7206adcd3007e10ddbeec06876 100755
--- a/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp
+++ b/Database/APR/FileCatalog/utilities/FCrenamePFN.cpp
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**FCrenamePFN.cpp -- FileCatalog command line tool to rename PFN. Used in the case the file has been moved.
@@ -18,8 +18,6 @@ void printUsage(){
   std::cout<<"usage: FCrenamePFN -p pfname -n newpfname [-u contactstring -h]" <<std::endl;
 }
 
-static const char* opts[] = {"p","n","u","h",0};
-
 
 int main(int argc, char** argv)
 {
@@ -30,6 +28,7 @@ int main(int argc, char** argv)
   std::string  mynewpfn;
   try{
     CommandLine commands(argc,argv);
+    const char* opts[] = {"p","n","u","h",0};
     commands.CheckOptions(opts);
 
     if( commands.Exists("u") ){
@@ -43,17 +42,17 @@ int main(int argc, char** argv)
     }
     if( commands.Exists("h") ){
       printUsage();
-      exit(0);
+      return 0;
     }
   }catch(std::string& strError){
     std::cerr << "error "<<strError<<std::endl;
-    exit(1);
+    return 1;
   }
   
   if( mypfn.empty() || mynewpfn.empty() ){
     printUsage();
     std::cerr<<"must specify pfname using -p, newpfname using -n "<<std::endl;
-    exit(0);
+    return 0;
   }
   try{
     std::unique_ptr<IFileCatalog> mycatalog(new IFileCatalog);
@@ -67,10 +66,10 @@ int main(int argc, char** argv)
     mycatalog->disconnect();
   }catch (const pool::Exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }catch (const std::exception& er){
     std::cerr<<er.what()<<std::endl;
-    exit(1);
+    return 1;
   }
 }
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index bca157b86f9d3c9ff9cc1fec71e906e56f01e405..c8f47d3dbd7cf4bf679077fe0601742ab912ff86 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -9,12 +9,12 @@
 
 #include "AthenaPoolCnvSvc.h"
 
+#include "GaudiKernel/AttribStringParser.h"
 #include "GaudiKernel/ClassID.h"
 #include "GaudiKernel/FileIncident.h"
-
-#include "GaudiKernel/IOpaqueAddress.h"
 #include "GaudiKernel/IIncidentSvc.h"
-#include "GaudiKernel/AttribStringParser.h"
+#include "GaudiKernel/IIoComponentMgr.h"
+#include "GaudiKernel/IOpaqueAddress.h"
 
 #include "AthenaKernel/IAthenaSerializeSvc.h"
 #include "AthenaKernel/IAthenaOutputStreamTool.h"
@@ -24,7 +24,6 @@
 #include "PersistentDataModel/TokenAddress.h"
 #include "PersistentDataModel/DataHeader.h"
 
-
 #include "StorageSvc/DbReflex.h"
 
 #include "AuxDiscoverySvc.h"
@@ -62,6 +61,13 @@ StatusCode AthenaPoolCnvSvc::initialize() {
          ATH_CHECK(arswsvc.retrieve());
       }
    }
+   // Register this service for 'I/O' events
+   ServiceHandle<IIoComponentMgr> iomgr("IoComponentMgr", name());
+   ATH_CHECK(iomgr.retrieve());
+   if (!iomgr->io_register(this).isSuccess()) {
+      ATH_MSG_FATAL("Could not register myself with the IoComponentMgr !");
+      return(StatusCode::FAILURE);
+   }
    // Extracting MaxFileSizes for global default and map by Database name.
    for (std::vector<std::string>::const_iterator iter = m_maxFileSizes.value().begin(),
 	   last = m_maxFileSizes.value().end(); iter != last; ++iter) {
@@ -101,6 +107,12 @@ StatusCode AthenaPoolCnvSvc::initialize() {
    return(StatusCode::SUCCESS);
 }
 //______________________________________________________________________________
+StatusCode AthenaPoolCnvSvc::io_reinit() {
+   ATH_MSG_DEBUG("I/O reinitialization...");
+   m_contextAttr.clear();
+   return(StatusCode::SUCCESS);
+}
+//______________________________________________________________________________
 StatusCode AthenaPoolCnvSvc::finalize() {
    // Release AthenaSerializeSvc
    if (!m_serializeSvc.empty()) {
@@ -137,6 +149,11 @@ StatusCode AthenaPoolCnvSvc::finalize() {
    m_cnvs.shrink_to_fit();
    return(StatusCode::SUCCESS);
 }
+//______________________________________________________________________________
+StatusCode AthenaPoolCnvSvc::io_finalize() {
+   ATH_MSG_DEBUG("I/O finalization...");
+   return(StatusCode::SUCCESS);
+}
 //_______________________________________________________________________
 StatusCode AthenaPoolCnvSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
    if (IAthenaPoolCnvSvc::interfaceID().versionMatch(riid)) {
@@ -266,7 +283,10 @@ StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSp
       return(StatusCode::FAILURE);
    }
    if (m_makeStreamingToolClient.value() > 0 && !m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isServer() && !m_outputStreamingTool[0]->isClient()) {
-      m_outputStreamingTool[0]->makeClient(m_makeStreamingToolClient.value()).ignore();
+      if (!makeClient(m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+         return(StatusCode::FAILURE);
+      }
    }
    if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()
 	   && (!m_streamMetaDataOnly || outputConnectionSpec.find("[PoolContainerPrefix=" + m_metadataContainerProp.value() + "]") != std::string::npos)) {
@@ -670,7 +690,10 @@ Token* AthenaPoolCnvSvc::registerForWrite(Placement* placement, const void* obj,
       m_chronoStatSvc->chronoStart("cRepR_ALL");
    }
    if (m_makeStreamingToolClient.value() > 0 && !m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isServer() && !m_outputStreamingTool[0]->isClient()) {
-      m_outputStreamingTool[0]->makeClient(m_makeStreamingToolClient.value()).ignore();
+      if (!makeClient(m_makeStreamingToolClient.value()).isSuccess()) {
+         ATH_MSG_ERROR("Could not make AthenaPoolCnvSvc a Share Client");
+         return(nullptr);
+      }
    }
    Token* token = nullptr;
    if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
index 8212f1a69e1e1b5d7ce48c002695cb3100b501e8..7c0841165284aada22a9ee42fdcfe3a0b43a5ad1 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
@@ -12,15 +12,17 @@
 
 #include "AthenaPoolCnvSvc/IAthenaPoolCnvSvc.h"
 
+#include "GaudiKernel/IChronoStatSvc.h"
 #include "GaudiKernel/IIncidentListener.h"
+#include "GaudiKernel/IIoComponent.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
+
 #include "StorageSvc/DbType.h"
 #include "AthenaBaseComps/AthCnvSvc.h"
 #include "AthenaKernel/IAthenaIPCTool.h"
-#include "GaudiKernel/IChronoStatSvc.h"
-#include "PoolSvc/IPoolSvc.h"
 #include "AthenaKernel/IClassIDSvc.h"
+#include "PoolSvc/IPoolSvc.h"
 
 #include <vector>
 #include <map>
@@ -37,7 +39,8 @@ template <class TYPE> class SvcFactory;
  **/
 class ATLAS_CHECK_THREAD_SAFETY AthenaPoolCnvSvc : public ::AthCnvSvc,
 		public virtual IAthenaPoolCnvSvc,
-		public virtual IIncidentListener {
+		public virtual IIncidentListener,
+		public virtual IIoComponent {
    // Allow the factory class access to the constructor
    friend class SvcFactory<AthenaPoolCnvSvc>;
 
@@ -45,8 +48,10 @@ public:
 
    /// Required of all Gaudi Services
    StatusCode initialize();
+   StatusCode io_reinit();
    /// Required of all Gaudi Services
    StatusCode finalize();
+   StatusCode io_finalize();
    /// Required of all Gaudi services:  see Gaudi documentation for details
    StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
 
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h b/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h
index 58c6b29333b58ead4f55e6999a803366d4a38afb..1e00121c625dfea93a5ea8e427530fea756f0057 100755
--- a/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h
+++ b/DetectorDescription/DetDescrCond/DetDescrCondTools/src/CoolStrFileSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef DETDESCRCONDTOOLS_COOLSTRFILESVC_H
@@ -10,7 +10,7 @@
 #include "DetDescrCondTools/ICoolStrFileSvc.h"
 #include "AthenaBaseComps/AthService.h"
 
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 class CoolStrFileSvc : public virtual ICoolStrFileSvc, public virtual AthService
 {
   template <class TYPE> class SvcFactory;
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
index 78c92b83a5f9fcc09de090a9eb824e3199968c31..83bd068fcfbbc1d7100dcb7937a9c3489c4c311e 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
+++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
@@ -10,7 +10,6 @@
 #include "GeoModelKernel/GeoElement.h"
 #include "GeoModelKernel/Units.h"
 
-#include "StoreGate/StoreGate.h"
 #include "StoreGate/DataHandle.h"
 
 #include "RDBAccessSvc/IRDBAccessSvc.h"
diff --git a/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx b/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
index 3478bbe27512ab7030bb2d36f8305ae213e6b52b..b2b6cedbe943300fce0078a86aea070d28842a93 100755
--- a/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
+++ b/DetectorDescription/IdDictDetDescrCnv/src/AtlasIDDetDescrCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -17,8 +17,8 @@
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h" 
 #include "AthenaKernel/StorableConversions.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "IdDictDetDescr/IdDictManager.h"
 #include "AtlasDetDescr/AtlasDetectorID.h"
@@ -122,7 +122,7 @@ AtlasIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
     } else {}
  
     // Get the dictionary manager from the detector store
-    const DataHandle<IdDictManager> idDictMgr;
+    const IdDictManager* idDictMgr;
     status = detStore->retrieve(idDictMgr, "IdDict");
     if (status.isFailure()) {
 	log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
diff --git a/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx b/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
index 74a87ea9b43620fb67c00a2dedc423b48b4a3381..2ad3d0bb4a21bcda303604487574cfda81167d4b 100755
--- a/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
+++ b/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -26,7 +26,6 @@
  
 #include "GaudiKernel/MsgStream.h"
 
-#include "StoreGate/StoreGate.h" 
 #include "AthenaKernel/StorableConversions.h"
 
 
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx
index c3182d8eeb70865350c39ef83b78ef3d0a169ddc..fc5836a7b3904dcc2ab60a12bc27b57cb2650a7b 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "ByteStreamCnvSvc/ByteStreamCnvSvc.h"
@@ -7,7 +7,6 @@
 #include "ByteStreamCnvSvcBase/FullEventAssembler.h"
 #include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
 
-#include "StoreGate/StoreGate.h"
 #include "xAODEventInfo/EventInfo.h"
 #include "xAODTrigger/TrigDecision.h"
 
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
index 8148846ca32e7789aee19c833bebc5f2b59aa756..506706b4da22bbc88cf972f3e324b2fb9fd77e15 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.cxx
@@ -5,8 +5,6 @@
 #include "ByteStreamMergeOutputSvc.h"
 #include "ByteStreamData/ByteStream.h"
 
-#include "StoreGate/StoreGate.h"
-
 #include "GaudiKernel/GenericAddress.h"
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
index 413376e18750ecd976ea1f266709ee57a3047a43..8ecff3c9a53f9860fa21a8c9c69b9ef96dc0339c 100644
--- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
+++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx
@@ -16,7 +16,6 @@
 
 #include "AthenaKernel/IAthenaIPCTool.h"
 #include "EventInfo/EventInfo.h"
-#include "StoreGate/StoreGate.h"
 
 // EventInfoAttributeList includes
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
diff --git a/Event/EventBookkeeperTools/src/FillEBCFromFlat.h b/Event/EventBookkeeperTools/src/FillEBCFromFlat.h
index b8c5a275e5084498d6f3e497c2ba5866c4f8b354..468a67c6379823bb6b0251df898eff43bc75c357 100644
--- a/Event/EventBookkeeperTools/src/FillEBCFromFlat.h
+++ b/Event/EventBookkeeperTools/src/FillEBCFromFlat.h
@@ -1,12 +1,12 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef FILL_EBC_FROM_FLAT_H
 #define FILL_EBC_FROM_FLAT_H
 
 #include "GaudiKernel/ServiceHandle.h"
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "SGTools/StlVectorClids.h"
 #include "SGTools/BuiltinsClids.h"
diff --git a/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt b/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt
index d8e535d0bca7f20b79e5a95923020b2754f7b98a..5c66be090653edf996705ed849f42c431355bb39 100644
--- a/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODAssociationsAthenaPool/CMakeLists.txt
@@ -1,29 +1,12 @@
-################################################################################
-# Package: xAODAssociationsAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODAssociationsAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODAssociations
-                          Event/xAOD/xAODCaloEvent
-                          Event/xAOD/xAODTracking )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODAssociationsAthenaPoolPoolCnv
                            src/*.cxx
                            FILES xAODAssociations/TrackParticleClusterAssociationContainer.h xAODAssociations/TrackParticleClusterAssociationAuxContainer.h
                            TYPES_WITH_NAMESPACE xAOD::TrackParticleClusterAssociationContainer xAOD::TrackParticleClusterAssociationAuxContainer
                            CNV_PFX xAOD
-                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthenaKernel AthenaPoolCnvSvcLib AthenaPoolUtilities xAODAssociations xAODCaloEvent xAODTracking )
-
+                           LINK_LIBRARIES AthenaPoolCnvSvcLib xAODAssociations )
diff --git a/Event/xAOD/xAODBPhys/CMakeLists.txt b/Event/xAOD/xAODBPhys/CMakeLists.txt
index 22379b569ea3ec3408a0c4086f2e09e796832010..127e26aa78a503f002a02d850d2f125b03e546ca 100644
--- a/Event/xAOD/xAODBPhys/CMakeLists.txt
+++ b/Event/xAOD/xAODBPhys/CMakeLists.txt
@@ -1,37 +1,15 @@
-#
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-#
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id: CMakeLists.txt 805745 2017-05-31 17:23:48Z wwalko $
-#
-# Build configuration for the package.
-#
-#********************************************
-# The name of the package:
+# Declare the package name:
 atlas_subdir( xAODBPhys )
 
-# Package dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Event/xAOD/xAODTracking
-   Event/xAOD/xAODMuon
-   Event/xAOD/xAODMetaData
-   Event/xAOD/xAODEgamma
-   PRIVATE
-   )
-
 # Used external(s):
 find_package( ROOT COMPONENTS Core Physics Matrix )
 
 # Build the main library of the package: 
 atlas_add_library( xAODBPhysLib
-		   xAODBPhys/*.h Root/*.cxx src/*.cxx
-		   PUBLIC_HEADERS xAODBPhys
-		   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-		   LINK_LIBRARIES ${ROOT_LIBRARIES} 
-		   xAODTracking
-		   xAODMuon
-                   xAODEgamma
-		   xAODMetaData
-		   )
-
+		           xAODBPhys/*.h Root/*.cxx src/*.cxx
+		           PUBLIC_HEADERS xAODBPhys
+		           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+		           LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEgamma xAODMetaData xAODMuon xAODTracking
+                   PRIVATE_LINK_LIBRARIES AthContainers )
diff --git a/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt b/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt
index 0b0a965c15201f0723f6ab56ffa17fcd8a784c68..25eb186e01d8adeee6b4d3514b8b996cabc8b971 100644
--- a/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODBTaggingCnv/CMakeLists.txt
@@ -1,29 +1,16 @@
-################################################################################
-# Package: xAODBTaggingCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODBTaggingCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODBTagging
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Trigger/TrigEvent/TrigParticle )
-
 atlas_add_library( xAODBTaggingCnvLib
                    xAODBTaggingCnv/*.h
                    INTERFACE
                    PUBLIC_HEADERS xAODBTaggingCnv
                    LINK_LIBRARIES GaudiKernel xAODBTagging )
 
-
 # Component(s) in the package:
 atlas_add_component( xAODBTaggingCnv
                      src/*.cxx
                      src/components/*.cxx
                      LINK_LIBRARIES xAODBTaggingCnvLib xAODBTagging AthenaBaseComps AthenaKernel GaudiKernel TrigParticle )
-
diff --git a/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt b/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt
index f9e353c36dac77d64b04beccbb68244212029089..11d631f92f478b3b6d93489673de2e094f2d486b 100644
--- a/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODCaloEventCnv/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: xAODCaloEventCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCaloEventCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODCaloEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloEvent
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/EventKernel
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
-
 # Component(s) in the package:
 atlas_add_library( xAODCaloEventCnvLib
                    xAODCaloEventCnv/*.h
@@ -31,8 +14,7 @@ atlas_add_library( xAODCaloEventCnvLib
 atlas_add_component( xAODCaloEventCnv
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCaloEventCnvLib xAODCaloEvent CaloEvent AthenaBaseComps AthenaKernel EventKernel GaudiKernel )
+                     LINK_LIBRARIES xAODCaloEventCnvLib xAODCaloEvent CaloEvent AthenaBaseComps AthenaKernel GaudiKernel )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt b/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt
index 8564104a202655bbec4de021c829b20730fa9b80..72863cae61b802301ef777aba3b6cf1035be1bf0 100644
--- a/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt
+++ b/Event/xAOD/xAODCnvInterfaces/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: xAODCnvInterfaces
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCnvInterfaces )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( xAODCnvInterfaces
                    PUBLIC_HEADERS xAODCnvInterfaces
diff --git a/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt b/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt
index 3b84a08b33f6313d4ae72c233bf73b40b3d59ff4..400a9823e47b37012c1c82eb6b63891b0f11d30c 100644
--- a/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODCoreAthenaPool/CMakeLists.txt
@@ -1,20 +1,8 @@
-# $Id: CMakeLists.txt 769660 2016-08-23 15:51:19Z krasznaa $
-################################################################################
-# Package: xAODCoreAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCoreAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthContainers
-   Control/AthenaKernel
-   Database/AthenaPOOL/AthenaPoolCnvSvc
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Event/xAOD/xAODCore )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODCoreAthenaPoolPoolCnv
    src/*.cxx
@@ -23,5 +11,4 @@ atlas_add_poolcnv_library( xAODCoreAthenaPoolPoolCnv
    TYPES_WITH_NAMESPACE xAOD::AuxInfoBase xAOD::AuxContainerBase
    xAOD::ShallowAuxContainer xAOD::ShallowAuxInfo
    CNV_PFX xAOD
-   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib
-   AthenaPoolUtilities xAODCore )
+   LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib xAODCore )
diff --git a/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt b/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt
index db6958fcbcf42493b6b47924d092e817b1312398..d9c7076aca6d2a18c5b2e5e68cc34434b9af9e09 100644
--- a/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODCutFlowAthenaPool/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: xAODCutFlowAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODCutFlowAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODCutFlow )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODCutFlowAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODEgammaCnv/CMakeLists.txt b/Event/xAOD/xAODEgammaCnv/CMakeLists.txt
index b49dc176ad89883a7f8e018a5aed3d986cffb3d5..4f240116163a5f96c6001e8f7fb386db744e1360 100644
--- a/Event/xAOD/xAODEgammaCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEgammaCnv/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: xAODEgammaCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODEgammaCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Event/xAOD/xAODEgamma
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/FourMom
-                          Event/xAOD/xAODTracking
-                          Event/xAOD/xAODTruth
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          Reconstruction/Particle
-                          Reconstruction/egamma/egammaEvent )
-
 # Component(s) in the package:
 atlas_add_library( xAODEgammaCnvLib
                    xAODEgammaCnv/*.h
diff --git a/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt b/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt
index 6f4931291178213799c2f7c53108edaef9fbf3c5..37216a7264b70234f26de547cc4f8e98c27c5161 100644
--- a/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODEventFormatAthenaPool/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: xAODEventFormatAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODEventFormatAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventFormat )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODEventFormatAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt b/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
index b488fbda41a57d2a3b031d51d638142078b91e9f..c24bb3a933b705edf077e0657323800a86ba8f61 100644
--- a/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
@@ -34,7 +34,6 @@ atlas_add_library( xAODEventFormatCnvTestLib
     xAODEventFormat
   PRIVATE_LINK_LIBRARIES AthenaBaseComps StoreGateLib )
 
-
 atlas_add_poolcnv_library( xAODEventFormatCnvTestAthenaPoolCnv
   src/test/cnv/*.h src/test/cnv/*.cxx
   FILES
@@ -65,14 +64,9 @@ atlas_add_xaod_smart_pointer_dicts(
   OUTPUT _selectionFile
   CONTAINERS "xAODMakerTest::AVec_v1" )
 
-
 # Install files from the package.
 atlas_install_joboptions( share/*.py )
 
-atlas_depends_on_subdirs(
-  PUBLIC
-  PRIVATE AtlasTest/TestTools )
-
 # Test(s) in the package.
 atlas_add_test( Write
   SCRIPT athena.py --threads=8 xAODEventFormatCnv/EventFormatWriteTestJobOptions.py )
diff --git a/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt b/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
index 911634a1081a57d632bd5f33fbc4be5681114231..8f4bb12e817738d734c8e5dec45e5100472fb528 100644
--- a/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODForwardAthenaPool/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: xAODForwardAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODForwardAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Control/AthContainers
-   Control/AthenaKernel
-   Database/AthenaPOOL/AthenaPoolCnvSvc
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Event/xAOD/xAODForward )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODForwardAthenaPoolPoolCnv
    src/*.h src/*.cxx
diff --git a/Event/xAOD/xAODForwardCnv/CMakeLists.txt b/Event/xAOD/xAODForwardCnv/CMakeLists.txt
index 15e2400edb81b5c24489f9ba1c17a4365cd4f28a..1fe8dff71a3adb85f4ce985fd778546cbf0aad78 100644
--- a/Event/xAOD/xAODForwardCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODForwardCnv/CMakeLists.txt
@@ -1,28 +1,21 @@
-################################################################################
-# Package: xAODForwardCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODForwardCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODForward
-                          GaudiKernel
-                          TileCalorimeter/TileEvent
-                          TileCalorimeter/TileIdentifier
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 # Component(s) in the package:
+atlas_add_library( xAODForwardCnvLib
+                   xAODForwardCnv/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS xAODForwardCnv
+                   LINK_LIBRARIES GaudiKernel TileEvent xAODForward )
+
 atlas_add_component( xAODForwardCnv
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES xAODForward GaudiKernel TileEvent TileIdentifier AthenaBaseComps AthenaKernel )
+                     LINK_LIBRARIES xAODForward GaudiKernel TileEvent TileIdentifier AthenaBaseComps AthenaKernel xAODForwardCnvLib )
 
 # Install files from the package:
-atlas_install_headers( xAODForwardCnv )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
diff --git a/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt b/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt
index 0da0001ff3c47366ac49f2e95d03919bb7d07c1c..d1b086f02d6393db7156990688ce8fc06b0a97fb 100644
--- a/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODHIEventAthenaPool/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: xAODHIEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODHIEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODHIEvent )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODHIEventAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODJetCnv/CMakeLists.txt b/Event/xAOD/xAODJetCnv/CMakeLists.txt
index ebe42202f99268948a68dd4a93b6caea76a25e7c..f03c03e7cb032bc17be34cf68f77f1ea264a74a5 100644
--- a/Event/xAOD/xAODJetCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODJetCnv/CMakeLists.txt
@@ -1,29 +1,14 @@
-################################################################################
-# Package: xAODJetCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODJetCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthLinks
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODJet
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Reconstruction/Jet/JetEvent )
-
 atlas_add_library( xAODJetCnvLib
                    xAODJetCnv/*.h
                    INTERFACE
                    PUBLIC_HEADERS xAODJetCnv
                    LINK_LIBRARIES GaudiKernel xAODJet xAODBase AthLinks )
 
-
 # Component(s) in the package:
 atlas_add_component( xAODJetCnv
                      src/*.cxx
diff --git a/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt b/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt
index 87319204976a6f9bc502dd76446a7026db6a4528..5e5ddd8633cb03fc4a079846326fe736e2ba3c32 100644
--- a/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODLuminosityAthenaPool/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: xAODLuminosityAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODLuminosityAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODLuminosity )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODLuminosityAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt b/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt
index 909a743fe509f141905057029675371be200f20a..399ee39794c1ec5422576883a8c2972b11847a28 100644
--- a/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODMetaDataAthenaPool/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: xAODMetaDataAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODMetaDataAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODMetaData )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODMetaDataAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt b/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
index 480b16fc6a00810e009fc78a6b7453b530c16dc3..101270ff9e4d0529a4e38a003a1cb2f1257a9251 100644
--- a/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODMetaDataCnv/CMakeLists.txt
@@ -1,31 +1,8 @@
-# $Id: CMakeLists.txt 744578 2016-05-03 16:26:20Z krasznaa $
-################################################################################
-# Package: xAODMetaDataCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODMetaDataCnv )
 
-# Extra dependencies, based on the environment that we're in:
-if( NOT XAOD_STANDALONE )
-  set(
-    extra_deps
-    GaudiKernel
-    PRIVATE
-    Control/AthenaKernel
-    Database/AthenaPOOL/AthenaPoolUtilities
-    Event/EventInfo
-  )
-endif()
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-  PUBLIC
-  Control/AthToolSupport/AsgTools
-  Event/xAOD/xAODMetaData
-  ${extra_deps}
-)
-
 # Build the package differently in standalone and Athena modes:
 if( XAOD_STANDALONE )
 
diff --git a/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt b/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt
index fe3fdf7cc08a89595ab5a6804ac87d9a5dc1fd95..06da5811a3e6fbf9d31ab15fd741d998e25407d7 100644
--- a/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODMissingETAthenaPool/CMakeLists.txt
@@ -3,15 +3,6 @@
 # Declare the package name:
 atlas_subdir( xAODMissingETAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthContainers
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODMissingET
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODMissingETAthenaPoolPoolCnv
    src/*.h src/*.cxx
diff --git a/Event/xAOD/xAODMissingETCnv/CMakeLists.txt b/Event/xAOD/xAODMissingETCnv/CMakeLists.txt
index 25061b5122e926d913e32bc3cbb1ccfaa45fc857..11aa6b3fefc831b24f8e9b988677cc565af945b2 100644
--- a/Event/xAOD/xAODMissingETCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODMissingETCnv/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: xAODMissingETCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODMissingETCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODMissingET
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Reconstruction/MissingETEvent )
-
 # Component(s) in the package:
 atlas_add_component( xAODMissingETCnv
                      src/*.cxx
diff --git a/Event/xAOD/xAODTauCnv/CMakeLists.txt b/Event/xAOD/xAODTauCnv/CMakeLists.txt
index bd43c731e295bcda4f8035a8d0f6f5dd7ae4505c..370af6d8d802f48af3e99b5a539dc6ec8ff00c9e 100644
--- a/Event/xAOD/xAODTauCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODTauCnv/CMakeLists.txt
@@ -1,28 +1,14 @@
-################################################################################
-# Package: xAODTauCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODTauCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Event/xAOD/xAODTau
-                          Reconstruction/tauEvent
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-				 )
-
 atlas_add_library( xAODTauCnvLib
                    xAODTauCnv/*.h
                    INTERFACE
                    PUBLIC_HEADERS xAODTauCnv
                    LINK_LIBRARIES GaudiKernel AthContainers xAODTau tauEvent )
 
-
 # Component(s) in the package:
 atlas_add_component( xAODTauCnv
                      src/*.cxx
diff --git a/Event/xAOD/xAODTrackingCnv/CMakeLists.txt b/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
index df9daef57bca7a4d9fc79189be3360217dcffd59..d48e57d6c758d15465cab18ea560221a7686d01b 100644
--- a/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODTrackingCnv/CMakeLists.txt
@@ -1,33 +1,8 @@
-# $Id: CMakeLists.txt 789457 2016-12-13 12:00:43Z krasznaa $
-################################################################################
-# Package: xAODTrackingCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( xAODTrackingCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   Event/xAOD/xAODTracking
-   Tracking/TrkEvent/TrkTrack
-   PRIVATE
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Event/EventPrimitives
-   Event/xAOD/xAODCore
-   Generators/GeneratorObjects
-   PhysicsAnalysis/MCTruthClassifier
-   Reconstruction/Particle
-   Reconstruction/ParticleTruth
-   Tracking/TrkEvent/TrkLinks
-   Tracking/TrkEvent/TrkParticleBase
-   Tracking/TrkEvent/TrkTrackLink
-   Tracking/TrkEvent/TrkTruthData
-   Tracking/TrkEvent/VxVertex
-   Tracking/TrkTools/TrkToolInterfaces )
-
 # Component(s) in the package:
 atlas_add_library( xAODTrackingCnvLib
    xAODTrackingCnv/*.h
diff --git a/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx b/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
index 090c74254638dd4af42279dafca4eca2a93682c3..721e66a00593c49063eb91ef4e29e7fa04fc73d0 100644
--- a/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
+++ b/ForwardDetectors/ForwardIdCnv/src/ZdcIDDetDescrCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /***************************************************************************
@@ -16,8 +16,8 @@
 
 #include "DetDescrCnvSvc/DetDescrConverter.h"
 #include "DetDescrCnvSvc/DetDescrAddress.h"
+#include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h" 
 
 #include "IdDictDetDescr/IdDictManager.h"
 #include "ZdcIdentifier/ZdcID.h"
@@ -120,7 +120,7 @@ ZdcIDDetDescrCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj)
     } else {}
  
     // Get the dictionary manager from the detector store
-    const DataHandle<IdDictManager> idDictMgr;
+    const IdDictManager* idDictMgr = nullptr;
     status = detStore->retrieve(idDictMgr, "IdDict");
     if (status.isFailure()) {
 	log << MSG::FATAL << "Could not get IdDictManager !" << endmsg;
diff --git a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h
index a5c0e56a9ec316482ba8bcace6b8514c23c325a8..dddd207648154522562a4f9688b4b53a2557567c 100644
--- a/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h
+++ b/ForwardDetectors/LUCID/LUCID_Cnv/LUCID_RawDataByteStreamCnv/LUCID_RawDataByteStreamCnv/LUCID_DigitByteStreamCnv.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // *************************************************************************
@@ -31,7 +31,7 @@
 #include "GaudiKernel/IRegistry.h"
 #include "GaudiKernel/IToolSvc.h"
 
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include "AthenaKernel/MsgStreamMember.h"
 
diff --git a/Generators/BeamHaloGenerator/CMakeLists.txt b/Generators/BeamHaloGenerator/CMakeLists.txt
index cb681358ce726d5789a9776bd0c5934c57ccf5a8..64fc8046e17ef14fe385053ab8da098d029c6bf0 100644
--- a/Generators/BeamHaloGenerator/CMakeLists.txt
+++ b/Generators/BeamHaloGenerator/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: BeamHaloGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( BeamHaloGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -31,8 +20,7 @@ atlas_add_library( BeamHaloGeneratorLib
 
 atlas_add_component( BeamHaloGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel GeneratorModulesLib AthenaKernel BeamHaloGeneratorLib )
+                     LINK_LIBRARIES BeamHaloGeneratorLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/BoostAfterburner/CMakeLists.txt b/Generators/BoostAfterburner/CMakeLists.txt
index 7a75e5c1477305980d2cea2dc7744a69ae619000..d16355432a07e04d1e6b9cef5392d451dfc123db 100644
--- a/Generators/BoostAfterburner/CMakeLists.txt
+++ b/Generators/BoostAfterburner/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: BoostAfterburner
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( BoostAfterburner )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 
@@ -22,12 +13,11 @@ atlas_add_library( BoostAfterburnerLib
                    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES AthenaBaseComps
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GaudiKernel GeneratorObjects )
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjects )
 
 atlas_add_component( BoostAfterburner
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel GeneratorObjects BoostAfterburnerLib )
+                     LINK_LIBRARIES BoostAfterburnerLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/CavernBkgGenerator/CMakeLists.txt b/Generators/CavernBkgGenerator/CMakeLists.txt
index 9e03eb960fa5d1c98f7437617e8e614821f7ecc6..045aea85dbb30d45fc764032c6657a5d64ade2f6 100644
--- a/Generators/CavernBkgGenerator/CMakeLists.txt
+++ b/Generators/CavernBkgGenerator/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: CavernBkgGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CavernBkgGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorModules )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -35,8 +26,7 @@ atlas_add_library( CavernBkgGeneratorLib
 
 atlas_add_component( CavernBkgGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GaudiKernel GeneratorModulesLib CavernBkgGeneratorLib )
+                     LINK_LIBRARIES CavernBkgGeneratorLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/Charybdis_i/CMakeLists.txt b/Generators/Charybdis_i/CMakeLists.txt
index fc93de5edb0ffd0e0a7cb3ab3183e98c9c8a08fb..37ff118e17c963bca50a3d466ed989ab2c5fec7a 100644
--- a/Generators/Charybdis_i/CMakeLists.txt
+++ b/Generators/Charybdis_i/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: Charybdis_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Charybdis_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PRIVATE
-   Generators/GeneratorFortranCommon )
-
 # External dependencies:
 find_package( Herwig )
 find_package( Lhapdf )
diff --git a/Generators/CosmicGenerator/CMakeLists.txt b/Generators/CosmicGenerator/CMakeLists.txt
index c3a3ed4d42fef0f6eba4c1f6ee134ee8a13af152..498f329297b88c03152abe8c61abaace439fc489 100644
--- a/Generators/CosmicGenerator/CMakeLists.txt
+++ b/Generators/CosmicGenerator/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: CosmicGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CosmicGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
 
@@ -30,8 +19,7 @@ atlas_add_library( CosmicGeneratorLib
 
 atlas_add_component( CosmicGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GaudiKernel CosmicGeneratorLib )
+                     LINK_LIBRARIES CosmicGeneratorLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Generators/Epos_i/CMakeLists.txt b/Generators/Epos_i/CMakeLists.txt
index 922105d3edaae19fe12c71721d31c12b0c4f325f..46318ba51bb38e1b3756422c7b376d108d7dc33e 100644
--- a/Generators/Epos_i/CMakeLists.txt
+++ b/Generators/Epos_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: Epos_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Epos_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Crmc COMPONENTS Epos )
@@ -36,8 +25,7 @@ atlas_add_library( Epos_iLib
 
 atlas_add_component( Epos_i
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CRMC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CRMC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib GeneratorModulesLib AthenaKernel GaudiKernel TruthUtils Epos_iLib )
+                     LINK_LIBRARIES Epos_iLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/EvgenJobTransforms/CMakeLists.txt b/Generators/EvgenJobTransforms/CMakeLists.txt
index 53e08f83fde6f8d63fc90562545376edee54f13f..c449d97a4d61268e96dcb0c98cbcda2425353c6d 100644
--- a/Generators/EvgenJobTransforms/CMakeLists.txt
+++ b/Generators/EvgenJobTransforms/CMakeLists.txt
@@ -1,15 +1,8 @@
-
-################################################################################
-# Package: EvgenJobTransforms
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EvgenJobTransforms )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Tools/PyJobTransforms )
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt
index 9fc1f78f57cb2e8a1ab7f3fd54fe05f609f6e2f0..c2a3600b0573e8b6fc5a2b5916e2866cd4f06c78 100644
--- a/Generators/EvgenProdTools/CMakeLists.txt
+++ b/Generators/EvgenProdTools/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: EvgenProdTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EvgenProdTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Generators/GenAnalysisTools/TruthHelper
-                          Generators/GenInterfaces
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          Event/EventInfo
-                          GaudiKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -31,8 +16,7 @@ atlas_add_library( EvgenProdToolsLib
 
 atlas_add_component( EvgenProdTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps TruthHelper GeneratorModulesLib AthenaKernel EventInfo GaudiKernel TruthUtils EvgenProdToolsLib )
+                     LINK_LIBRARIES EvgenProdToolsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Generators/EvtGen_i/CMakeLists.txt b/Generators/EvtGen_i/CMakeLists.txt
index 5b34b7b6f48cf79cdad6000922b592da48bdde7a..d4ef9a781c24c61afacaac4e07e94cb3cc4d8b06 100644
--- a/Generators/EvtGen_i/CMakeLists.txt
+++ b/Generators/EvtGen_i/CMakeLists.txt
@@ -1,26 +1,12 @@
-################################################################################
-# Package: EvtGen_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EvtGen_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel )
-
 #set( PHOTOSPP_VERSION 3.61 )
 #set( PHOTOSPP_ROOT
 #   /cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/photos++/${PHOTOSPP_VERSION}/${LCG_PLATFORM} )
 
-
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
@@ -58,8 +44,7 @@ atlas_add_library( EvtGen_iLib
 
 atlas_add_component( EvtGen_i
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS} ${PHOTOSPP_INCLUDE_DIRS} ${TAUOLAPP_INCLUDE_DIRS}  ${EVTGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${PYTHIA8_LIBRARIES} ${PHOTOSPP_LIBRARIES} ${TAUOLAPP_LIBRARIES} AtlasHepMCLib ${EVTGEN_LIBRARIES} StoreGateLib SGtests GaudiKernel GeneratorModulesLib GeneratorObjects AthenaKernel EvtGen_iLib )
+                     LINK_LIBRARIES EvtGen_iLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/common/*.py )
diff --git a/Generators/FlowAfterburner/CMakeLists.txt b/Generators/FlowAfterburner/CMakeLists.txt
index 0185f2a587c7d75ff6707c639024cf300a289bf5..bbeab93b32a051f8b7cd388b4b5ceb7c784a1774 100644
--- a/Generators/FlowAfterburner/CMakeLists.txt
+++ b/Generators/FlowAfterburner/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: FlowAfterburner
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( FlowAfterburner )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/GenAnalysisTools/TruthHelper
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( GSL )
@@ -29,13 +15,12 @@ atlas_add_library( FlowAfterburnerLib
                    INCLUDE_DIRS ${GSL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS 
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TruthHelper GeneratorObjects StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES AtlasHepMCLib AtlasHepMCsearchLib TruthUtils )
+                   LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AtlasHepMCLib GaudiKernel TruthHelper GeneratorObjects
+                   PRIVATE_LINK_LIBRARIES StoreGateLib TruthUtils )
 
 atlas_add_component( FlowAfterburner
                      src/components/*.cxx
-                     INCLUDE_DIRS ${GSL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}  ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GSL_LIBRARIES} ${ROOT_LIBRARIES} AtlasHepMCLib  AtlasHepMCsearchLib ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel TruthHelper GeneratorObjects StoreGateLib SGtests TruthUtils FlowAfterburnerLib )
+                     LINK_LIBRARIES FlowAfterburnerLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt b/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt
index 414cee5c5cf79d2a95903926f391ffa1f3f04c18..631db80656d43c2cfde84d8e3e40ad172bf8ad5f 100644
--- a/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/EventBoost/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: EventBoost
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EventBoost )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                           )
-
 # External dependencies:
 find_package( CLHEP )
 
diff --git a/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt b/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
index 82ba5b5dab6bfcfd9d29514f90bfb2718c8a185b..03cccdc76371c10aea959b58fada1b29f4770550 100644
--- a/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: ReweightTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ReweightTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GenInterfaces
-                          PRIVATE
-                          Control/AthContainers
-                          Control/StoreGate
-                          Generators/AtlasHepMC  
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( Lhapdf )
 
@@ -25,13 +11,12 @@ atlas_add_library( ReweightToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS ReweightTools
                    INCLUDE_DIRS ${LHAPDF_INCLUDE_DIRS} 
-                   LINK_LIBRARIES ${LHAPDF_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel StoreGateLib SGtests
+                   LINK_LIBRARIES ${LHAPDF_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel GenInterfacesLib
                    PRIVATE_LINK_LIBRARIES AthContainers GeneratorObjects )
 
 atlas_add_component( ReweightTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${LHAPDF_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${LHAPDF_LIBRARIES} AtlasHepMCLib AthenaBaseComps GaudiKernel AthContainers StoreGateLib SGtests GeneratorObjects ReweightToolsLib )
+                     LINK_LIBRARIES ReweightToolsLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt b/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt
index 572d21a40444c209d20d27d6d7fbb115ce79567a..caa3ad086d79b5f057b8d344c2ff1a23c78eb5e3 100644
--- a/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/TruthHelper/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: TruthHelper
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthHelper )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                          PRIVATE
-                          Control/AthenaKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( HepPDT )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
diff --git a/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt b/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
index 155e8c5703ffa920d8f3e8b9355a4755e5c1be84..d057f73b57ed1c890ddd37c4700b9648cb209dab 100644
--- a/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: TruthTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Generators/GenInterfaces
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( HepPDT )
 
diff --git a/Generators/GenInterfaces/CMakeLists.txt b/Generators/GenInterfaces/CMakeLists.txt
index 01a1961f64cd36466aed0aadb52180326fff2a89..a1d2be08a0a1a3c711cfb891f7b53b4a890d4889 100644
--- a/Generators/GenInterfaces/CMakeLists.txt
+++ b/Generators/GenInterfaces/CMakeLists.txt
@@ -1,14 +1,8 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # The name of the package:
 atlas_subdir( GenInterfaces )
 
-# The dependencies of the package:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/AtlasHepMC
-   GaudiKernel )
-
-# External dependencies:
-
 # Component(s) in the package:
 atlas_add_library( GenInterfacesLib
    GenInterfaces/*.h
@@ -19,5 +13,4 @@ atlas_add_library( GenInterfacesLib
 atlas_add_dictionary( GenInterfacesDict
    GenInterfaces/GenInterfacesDict.h
    GenInterfaces/selection.xml
-   LINK_LIBRARIES AtlasHepMCLib GenInterfacesLib )
-
+   LINK_LIBRARIES GenInterfacesLib )
diff --git a/Generators/GeneratorFilters/CMakeLists.txt b/Generators/GeneratorFilters/CMakeLists.txt
index 533134312a582b689dd58a3d5fe54b5ff2b9a4c9..cf026c88f2a8d57fc2e3c638ec881808b5b9a1f2 100644
--- a/Generators/GeneratorFilters/CMakeLists.txt
+++ b/Generators/GeneratorFilters/CMakeLists.txt
@@ -1,26 +1,8 @@
-################################################################################
-# Package: GeneratorFilters
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorFilters )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          Event/EventInfo
-                          Event/xAOD/xAODJet
-                          Event/xAOD/xAODTruth
-                          Generators/TruthUtils
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          PhysicsAnalysis/TruthParticleID/McParticleEvent )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -33,15 +15,13 @@ atlas_add_library( GeneratorFiltersLib
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                    PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel StoreGateLib SGtests GeneratorModulesLib
-                   PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent )
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel StoreGateLib GeneratorModulesLib xAODJet
+                   PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} AthenaKernel CxxUtils EventInfo xAODTruth TruthUtils ParticleEvent McParticleEvent )
 
 atlas_add_component( GeneratorFilters
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib StoreGateLib SGtests GaudiKernel GeneratorModulesLib AthenaKernel CxxUtils EventInfo xAODJet xAODTruth TruthUtils ParticleEvent McParticleEvent GeneratorFiltersLib )
+                     LINK_LIBRARIES GeneratorFiltersLib )
 
 # Install job option fragments from the package:
 atlas_install_joboptions( share/common/*.py )
 
-
diff --git a/Generators/GeneratorFortranCommon/CMakeLists.txt b/Generators/GeneratorFortranCommon/CMakeLists.txt
index 2f1a30a601defdb421085ab9eacb315ab969653d..b1dd5d9fc9da2df645832bd95472eeb4113ff91a 100644
--- a/Generators/GeneratorFortranCommon/CMakeLists.txt
+++ b/Generators/GeneratorFortranCommon/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: GeneratorFortranCommon
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorFortranCommon )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaKernel
-   GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( GeneratorFortranCommonLib
    src/inituser.F src/useuser.F src/getaddr.cxx
diff --git a/Generators/GeneratorModules/CMakeLists.txt b/Generators/GeneratorModules/CMakeLists.txt
index c5a14a50ebecfc969773805e2de19af3918974c0..1239ed294e3a612ad2b4fdb62fc8e543544ddc29 100644
--- a/Generators/GeneratorModules/CMakeLists.txt
+++ b/Generators/GeneratorModules/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: GeneratorModules
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorModules )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -25,12 +14,11 @@ atlas_add_library( GeneratorModulesLib
                    PUBLIC_HEADERS GeneratorModules
                    INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel GaudiKernel GeneratorObjects StoreGateLib SGtests )
+                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel GaudiKernel GeneratorObjects StoreGateLib )
 
 atlas_add_component( GeneratorModules
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel GeneratorObjects GeneratorModulesLib )
+                     LINK_LIBRARIES GeneratorModulesLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Generators/GeneratorObjects/CMakeLists.txt b/Generators/GeneratorObjects/CMakeLists.txt
index af7edc9db03691a1c7450e2b1b89ad85c0eb9b08..3c5a77aadb10889f9c58ea0071db0b0659c86983 100644
--- a/Generators/GeneratorObjects/CMakeLists.txt
+++ b/Generators/GeneratorObjects/CMakeLists.txt
@@ -1,28 +1,10 @@
-################################################################################
-# Package: GeneratorObjects
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorObjects )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/SGTools
-                          Control/AthenaKernel
-                          Event/xAOD/xAODTruth
-                          GaudiKernel
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/CxxUtils
-                          Control/RootUtils
-                          Control/StoreGate )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( GTest )
 
 # Component(s) in the package:
@@ -31,16 +13,14 @@ atlas_add_library( GeneratorObjects
                    src/McEventCollection.cxx
                    src/HijingEventParams.cxx
                    PUBLIC_HEADERS GeneratorObjects
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES  AtlasHepMCLib AthContainers AthLinks SGTools xAODTruth GaudiKernel RootUtilsPyROOT StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TestTools AthenaKernel RootUtils )
+                   LINK_LIBRARIES AthenaKernel AtlasHepMCLib AthContainers AthLinks SGTools xAODTruth GaudiKernel RootUtils StoreGateLib )
 
 atlas_add_dictionary( GeneratorObjectsDict
                       GeneratorObjects/McEventDict.h
                       GeneratorObjects/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES}  AtlasHepMCLib AthContainers AthLinks SGTools xAODTruth GaudiKernel TestTools AthenaKernel RootUtils RootUtilsPyROOT StoreGateLib SGtests GeneratorObjects )
+                      LINK_LIBRARIES GeneratorObjects RootUtils )
 
 # Install a dummy rootmap file to suppress loading the rootmap from hepmc3,
 # which defines dictionary entries for HepMC types that clash with
@@ -52,11 +32,9 @@ atlas_install_generic ( share/libHepMC3rootIO.rootmap
 
 atlas_add_test( HepMcParticleLink_test
                 SOURCES test/HepMcParticleLink_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${GTEST_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthContainers CxxUtils AthLinks SGTools xAODTruth GaudiKernel TestTools AthenaKernel RootUtils RootUtilsPyROOT StoreGateLib SGtests GeneratorObjects ${GTEST_LIBRARIES} )
-
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GTEST_LIBRARIES} CxxUtils GeneratorObjects TestTools )
 
 atlas_add_test( CachedParticlePtr_test
                 SOURCES test/CachedParticlePtr_test.cxx
-                LINK_LIBRARIES GeneratorObjects AtlasHepMCLib)
-
+                LINK_LIBRARIES GeneratorObjects )
diff --git a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
index 8a92a7829e84fa799de9f0152f07bb2333fbd91e..be4e96ac8016353de23aff647852556661c29620 100644
--- a/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
+++ b/Generators/GeneratorObjects/src/HepMcParticleLink.cxx
@@ -9,7 +9,6 @@
 
 #include "GeneratorObjects/HepMcParticleLink.h"
 #include "GeneratorObjects/McEventCollection.h"
-#include "StoreGate/StoreGate.h"
 #include "AtlasHepMC/GenParticle.h"
 #include "AtlasHepMC/GenEvent.h"
 #include "AthenaKernel/getMessageSvc.h"
diff --git a/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt b/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt
index 2e2c7eb39ecedea766a343873ce40d405bd4db16..5ed59bbaf5002fb031caac35b90f6d35c4e4033d 100644
--- a/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt
+++ b/Generators/GeneratorObjectsAthenaPool/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: GeneratorObjectsAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorObjectsAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AtlasSealCLHEP
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Generators/GeneratorObjects
-                          Generators/GeneratorObjectsTPCnv )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( GeneratorObjectsAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/Generators/GeneratorObjectsTPCnv/CMakeLists.txt b/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
index aa5d5b632f0b2fd84e293b226572c7a7974210a7..5dc8a3771c5d5a600b809aae7b352a9c12774d37 100644
--- a/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
+++ b/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
@@ -1,65 +1,49 @@
-################################################################################
-# Package: GeneratorObjectsTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorObjectsTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          GaudiKernel
-                          Generators/GeneratorObjects
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/AthAllocators
-                          Control/AthenaKernel
-                          Generators/AtlasHepMC
-                          Generators/GenInterfaces )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_tpcnv_library( GeneratorObjectsTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS GeneratorObjectsTPCnv
-                         PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GenInterfacesLib TestTools )
+                         PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib AtlasHepMCLib GaudiKernel GeneratorObjects
+                         PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaKernel GenInterfacesLib StoreGateLib TestTools)
 
 atlas_add_dictionary( GeneratorObjectsTPCnvDict
                       GeneratorObjectsTPCnv/GeneratorObjectsTPCnvDict.h
                       GeneratorObjectsTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GeneratorObjectsTPCnv TestTools )
+                      LINK_LIBRARIES GeneratorObjectsTPCnv )
 
 atlas_add_dictionary( OLD_GeneratorObjectsTPCnvDict
                       GeneratorObjectsTPCnv/GeneratorObjectsTPCnvDict.h
                       GeneratorObjectsTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects AthAllocators AthenaKernel GeneratorObjectsTPCnv TestTools )
+                      LINK_LIBRARIES GeneratorObjectsTPCnv )
 
 atlas_add_test( McEventCollectionCnv_p4_test
                 SOURCES
                 test/McEventCollectionCnv_p4_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv )
 
 atlas_add_test( McEventCollectionCnv_p5_test
                 SOURCES
                 test/McEventCollectionCnv_p5_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv )
 
 atlas_add_test( HepMcParticleLinkCnv_p1_test
                 SOURCES
                 test/HepMcParticleLinkCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv StoreGateLib TestTools )
 
 atlas_add_test( HepMcParticleLinkCnv_p2_test
                 SOURCES
                 test/HepMcParticleLinkCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaPoolCnvSvcLib GaudiKernel GeneratorObjects TestTools StoreGateLib SGtests GeneratorObjectsTPCnv )
+                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                LINK_LIBRARIES ${CLHEP_LIBRARIES} GeneratorObjectsTPCnv StoreGateLib TestTools )
diff --git a/Generators/GeneratorUtils/CMakeLists.txt b/Generators/GeneratorUtils/CMakeLists.txt
index d4c81c159f56196a69b565a6f6c3193b418bdd90..6719593cc8fc839710677300647a6f3c49b59661 100644
--- a/Generators/GeneratorUtils/CMakeLists.txt
+++ b/Generators/GeneratorUtils/CMakeLists.txt
@@ -1,25 +1,21 @@
-################################################################################
-# Package: GeneratorUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GeneratorUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          AtlasTest/TestTools )
-
-# External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-
 # Component(s) in the package:
+atlas_add_library( GeneratorUtilsLib
+                   GeneratorUtils/*.h
+                   INTERFACE
+                   PUBLIC_HEADERS GeneratorUtils
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${Boost_LIBRARIES} )
+
+# Test(s) in the package:
 atlas_add_test( StringParse_test
                 SOURCES
                 test/StringParse_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} TestTools )
+                LINK_LIBRARIES GeneratorUtilsLib )
 
 # Install files from the package:
-atlas_install_headers( GeneratorUtils )
 atlas_install_joboptions( share/*.py )
-
diff --git a/Generators/GenzModuleEvent/CMakeLists.txt b/Generators/GenzModuleEvent/CMakeLists.txt
index c8063a30fdccd63cbe4687201a66d499aaf66e65..04169fddffd559436123bf0b223d087bc2dc75a8 100644
--- a/Generators/GenzModuleEvent/CMakeLists.txt
+++ b/Generators/GenzModuleEvent/CMakeLists.txt
@@ -1,14 +1,9 @@
-################################################################################
-# Package: GenzModuleEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GenzModuleEvent )
 
 # The dependencies of the package:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/AtlasHepMC)
 
 # Component(s) in the package:
 atlas_add_library( GenzModuleEvent
diff --git a/Generators/HepMCAnalysis_i/CMakeLists.txt b/Generators/HepMCAnalysis_i/CMakeLists.txt
index b970fb62fa61f15ca3f7071dcca54d926576f9cd..832b31e70c13b677845b594d48b4ef67bb1e2c22 100644
--- a/Generators/HepMCAnalysis_i/CMakeLists.txt
+++ b/Generators/HepMCAnalysis_i/CMakeLists.txt
@@ -1,22 +1,8 @@
-################################################################################
-# Package: HepMCAnalysis_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HepMCAnalysis_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   GaudiKernel
-   Generators/AtlasHepMC
-   PRIVATE
-   Control/StoreGate
-   Event/EventInfo
-   Generators/GeneratorObjects
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HEPUtils )
@@ -30,8 +16,6 @@ else()
 set( HEPMC_HepMCAnalysis_INTERFACE_DIR  )
 endif()
 
-
-
 # Component(s) in the package:
 atlas_add_component( HepMCAnalysis_i
    HepMCAnalysis_i/*.h src/*.cxx src/components/*.cxx
diff --git a/Generators/HepMCWeightSvc/CMakeLists.txt b/Generators/HepMCWeightSvc/CMakeLists.txt
index 67bf86e764affdff4c46502be35babd4383d25b0..c8fe7876d0c97104262a29ca47fead2bbeee74d9 100644
--- a/Generators/HepMCWeightSvc/CMakeLists.txt
+++ b/Generators/HepMCWeightSvc/CMakeLists.txt
@@ -1,29 +1,15 @@
-################################################################################
-# Package: HepMCWeightSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HepMCWeightSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   GaudiKernel
-   PRIVATE
-   Control/AthenaBaseComps
-   Database/AthenaPOOL/AthenaPoolUtilities
-   Database/IOVDbDataModel
-   Database/IOVDbMetaDataTools
-   Event/EventInfo
-   Generators/GenInterfaces )
-
+# External dependencies:
 find_package( Boost )
 find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_component( HepMCWeightSvc
    src/*.cxx src/components/*.cxx
-   NO_PUBLIC_HEADERS
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
    LINK_LIBRARIES ${CORAL_LIBRARIES} GaudiKernel AthenaBaseComps
    AthenaPoolUtilities IOVDbDataModel EventInfo GenInterfacesLib IOVDbMetaDataToolsLib )
diff --git a/Generators/Herwig7_i/CMakeLists.txt b/Generators/Herwig7_i/CMakeLists.txt
index c58fcf1986d03c02b38d55affeecdfbf77ee0df9..0c4b498f6801e290ebba0c7556ed9e8dcae15e7c 100644
--- a/Generators/Herwig7_i/CMakeLists.txt
+++ b/Generators/Herwig7_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: Herwig7_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Herwig7_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   PRIVATE
-   Event/EventInfo
-   GaudiKernel
-   Tools/PathResolver )
-
 # External dependencies:
 find_package( Boost )
 find_package( Herwig3 COMPONENTS HerwigAPI )
diff --git a/Generators/HforTool/CMakeLists.txt b/Generators/HforTool/CMakeLists.txt
index 79cd889ad38f14debc31c94b19f11b4673730936..56ff1587cb23572fa3f3567b55feff74afccafa0 100644
--- a/Generators/HforTool/CMakeLists.txt
+++ b/Generators/HforTool/CMakeLists.txt
@@ -1,33 +1,10 @@
-################################################################################
-# Package: HforTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( HforTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Event/EventInfo
-                          GaudiKernel
-                          Reconstruction/Jet/JetEvent
-                          PRIVATE
-                          Control/StoreGate
-                          Generators/TruthUtils
-                          Generators/GeneratorObjects
-                          Generators/AtlasHepMC
-                          Generators/GenInterfaces )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_component( HforTool
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib AthenaBaseComps EventInfo GaudiKernel JetEvent StoreGateLib SGtests GeneratorObjects TruthUtils GenInterfacesLib )
-
-# Install files from the package:
-atlas_install_headers( HforTool )
-
+                     LINK_LIBRARIES AtlasHepMCLib AthenaBaseComps EventInfo JetEvent GeneratorObjects TruthUtils GenInterfacesLib )
diff --git a/Generators/Hijing_i/CMakeLists.txt b/Generators/Hijing_i/CMakeLists.txt
index 9eb1adf6f6d33e26d310734f48378abeb66dc98b..ff26151c56c5234402a15dfd30ae14d7d4c8ef2e 100644
--- a/Generators/Hijing_i/CMakeLists.txt
+++ b/Generators/Hijing_i/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: Hijing_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Hijing_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorFortranCommon
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   Control/CxxUtils
-   PRIVATE
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Generators/GeneratorObjects
-   Generators/GeneratorUtils
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Hijing )
@@ -38,7 +21,7 @@ atlas_add_library( Hijing_iLib
    LINK_LIBRARIES ${HIJING_LIBRARIES} ${CLHEP_LIBRARIES}
    GeneratorFortranCommonLib GeneratorModulesLib StoreGateLib
    PRIVATE_LINK_LIBRARIES AtlasHepMCLib AthenaKernel GaudiKernel
-   GeneratorObjects TruthUtils )
+   GeneratorObjects GeneratorUtilsLib TruthUtils )
 
 atlas_add_component( Hijing_i
    src/components/*.cxx
diff --git a/Generators/Hydjet_i/CMakeLists.txt b/Generators/Hydjet_i/CMakeLists.txt
index 8fa501fba7b1e96eeab5e137fb749ca109ab1409..98b4cfd896956e5da80355712083a3961de16cbf 100644
--- a/Generators/Hydjet_i/CMakeLists.txt
+++ b/Generators/Hydjet_i/CMakeLists.txt
@@ -1,25 +1,8 @@
-################################################################################
-# Package: Hydjet_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Hydjet_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorFortranCommon
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   Control/CxxUtils
-   PRIVATE
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Generators/GeneratorObjects
-   Generators/GeneratorUtils
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Hijing )
@@ -39,10 +22,10 @@ atlas_add_library( Hydjet_iLib
    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
    LINK_LIBRARIES ${PYQUEN_LIBRARIES} ${PYTHIA6_LIBRARIES}
-   ${HYDJET_LIBRARIES} ${HIJING_LIBRARIES} GeneratorFortranCommonLib
-   GeneratorModulesLib StoreGateLib
+   ${HYDJET_LIBRARIES} ${HIJING_LIBRARIES} CxxUtils GeneratorFortranCommonLib
+   GeneratorModulesLib
    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib
-   AthenaKernel GaudiKernel GeneratorObjects TruthUtils )
+   AthenaKernel GaudiKernel GeneratorObjects GeneratorUtilsLib StoreGateLib TruthUtils )
 
 atlas_add_component( Hydjet_i
    src/components/*.cxx
diff --git a/Generators/Lhef_i/CMakeLists.txt b/Generators/Lhef_i/CMakeLists.txt
index 2657351f8f3698c0317d7941bc896b8968ca0982..11a14dfc1e9a0cf041714f4df821786173841609 100644
--- a/Generators/Lhef_i/CMakeLists.txt
+++ b/Generators/Lhef_i/CMakeLists.txt
@@ -1,14 +1,8 @@
-################################################################################
-# Package: Lhef_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Lhef_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Generators/GeneratorFortranCommon )
-
 # External dependencies:
 find_package( Pythia6 )
 
diff --git a/Generators/MCTester_i/CMakeLists.txt b/Generators/MCTester_i/CMakeLists.txt
index 4df0bcb72e4b37ef208a3c96a7f0ca60f7e30303..d649ac1fe69c12f597af6a3d7ec57257e8249bf7 100644
--- a/Generators/MCTester_i/CMakeLists.txt
+++ b/Generators/MCTester_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: MCTester_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MCTester_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          Event/EventInfo
-                          Generators/AtlasHepMC
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( MCTester )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
diff --git a/Generators/McAsciiEventSelector/CMakeLists.txt b/Generators/McAsciiEventSelector/CMakeLists.txt
index cf73dca20a3fd7b118a7f66cb85d40dc174a987e..c5786b5f21da5481418708e087e1a6429c2272a7 100644
--- a/Generators/McAsciiEventSelector/CMakeLists.txt
+++ b/Generators/McAsciiEventSelector/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: McAsciiEventSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( McAsciiEventSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Event/EventInfo
-                          PhysicsAnalysis/TruthParticleID/McParticleKernel )
-
 # Component(s) in the package:
 atlas_add_component( McAsciiEventSelector
                      src/*.cxx
@@ -21,6 +10,6 @@ atlas_add_component( McAsciiEventSelector
                      LINK_LIBRARIES GaudiKernel AthenaBaseComps AthenaKernel EventInfo McParticleKernel )
 
 # 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/Generators/McAsciiEventSelector/python/ReadMcAscii.py b/Generators/McAsciiEventSelector/python/ReadMcAscii.py
index a0bcb8fc0ec2c9ea2135de720e576399e96ce2be..ee38f1505cef8ef3113e6ccf99f3953d115705bf 100644
--- a/Generators/McAsciiEventSelector/python/ReadMcAscii.py
+++ b/Generators/McAsciiEventSelector/python/ReadMcAscii.py
@@ -1,10 +1,10 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ## @file McAsciiEventSelector/python/ReadMcAscii.py
 ## @brief: install the McAsciiEventSelector
 
 def _loadReadMcAscii():
-    import AthenaCommon.AtlasUnixStandardJob
+    import AthenaCommon.AtlasUnixStandardJob  # noqa: F401
     from AthenaCommon.AppMgr import theApp
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
diff --git a/Generators/McEventSelector/CMakeLists.txt b/Generators/McEventSelector/CMakeLists.txt
index b4209f351eed980d9186fb7da7bbfe0a1679a1fd..582e4fd5356e4bb4a80c5253170de83ba9885729 100644
--- a/Generators/McEventSelector/CMakeLists.txt
+++ b/Generators/McEventSelector/CMakeLists.txt
@@ -1,18 +1,8 @@
-################################################################################
-# Package: McEventSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( McEventSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          PRIVATE
-                          Event/EventInfo )
-
 # Component(s) in the package:
 atlas_add_component( McEventSelector
                      src/McAddress.cxx
@@ -23,5 +13,4 @@ atlas_add_component( McEventSelector
                      LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel EventInfo )
 
 # Install files from the package:
-atlas_install_headers( McEventSelector )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Generators/ParticleDecayer/CMakeLists.txt b/Generators/ParticleDecayer/CMakeLists.txt
index 9eced30bb549be2eb499c5efe153ae51c8160049..df2c6b6c9460e3672763cc80b79dcc605d627766 100644
--- a/Generators/ParticleDecayer/CMakeLists.txt
+++ b/Generators/ParticleDecayer/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: ParticleDecayer
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleDecayer )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( HepPDT )
@@ -26,9 +15,8 @@ atlas_add_component( ParticleDecayer
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GaudiKernel GeneratorObjects )
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GeneratorObjects )
 
 # Install files from the package:
-atlas_install_headers( ParticleDecayer )
 atlas_install_joboptions( share/*.py )
 
diff --git a/Generators/Photospp_i/CMakeLists.txt b/Generators/Photospp_i/CMakeLists.txt
index cca200250bddeac1eff9a370e63d1e1c544df9b4..4cb57036fb67febc654d38996498fdac77b69f31 100644
--- a/Generators/Photospp_i/CMakeLists.txt
+++ b/Generators/Photospp_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: Photospp_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Photospp_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthenaBaseComps
-   PRIVATE
-   Control/AthenaKernel
-   GaudiKernel
-   Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( CLHEP )
 if (HEPMC3_USE)
diff --git a/Generators/ProtosLHEF_i/CMakeLists.txt b/Generators/ProtosLHEF_i/CMakeLists.txt
index dfb3990ddc468b8eb027af5eab34a07fae461027..b24a7613d6c76667d11583ee37437b7305823a37 100644
--- a/Generators/ProtosLHEF_i/CMakeLists.txt
+++ b/Generators/ProtosLHEF_i/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: ProtosLHEF_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ProtosLHEF_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorFortranCommon )
-
 # Component(s) in the package:
 atlas_add_component( ProtosLHEF_i
                      src/*.cxx
diff --git a/Generators/Pythia8B_i/CMakeLists.txt b/Generators/Pythia8B_i/CMakeLists.txt
index fa41256e694b457f022ef713e085140d503adcf1..d55fb351f1f758f360cc2c241b0aa48fb2e26475 100644
--- a/Generators/Pythia8B_i/CMakeLists.txt
+++ b/Generators/Pythia8B_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: Pythia8B_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Pythia8B_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Generators/Pythia8_i
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
diff --git a/Generators/Pythia8_i/CMakeLists.txt b/Generators/Pythia8_i/CMakeLists.txt
index 2edc52abdaaf9401e419f822df7cf7631ef2f44e..ebcd213390fd32ad2578a793795f972a79d80144 100644
--- a/Generators/Pythia8_i/CMakeLists.txt
+++ b/Generators/Pythia8_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: Pythia8_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Pythia8_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel
-                          Generators/GeneratorObjects
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
diff --git a/Generators/QGSJet_i/CMakeLists.txt b/Generators/QGSJet_i/CMakeLists.txt
index 2a134271151517da9bd1c6ac73944ea3c7db3a92..0f71dd037f340d1e4c28f96cebd3dcf4cd8b8773 100644
--- a/Generators/QGSJet_i/CMakeLists.txt
+++ b/Generators/QGSJet_i/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: QGSJet_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( QGSJet_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/AthenaKernel
-                          GaudiKernel
-                          Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Crmc COMPONENTS QgsjetII04 )
diff --git a/Generators/Sherpa_i/CMakeLists.txt b/Generators/Sherpa_i/CMakeLists.txt
index fde33ef972995b1ea38df45c8ea95a9d3cca5c99..375632d6381da1ea97782a53fe2a44e5403c1206 100644
--- a/Generators/Sherpa_i/CMakeLists.txt
+++ b/Generators/Sherpa_i/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: Sherpa_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( Sherpa_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          Generators/TruthUtils
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel )
-
 # Set the version of Sherpa to use:
 #set( SHERPA_VERSION 2.2.2 )
 #set( SHERPA_ROOT
diff --git a/Generators/Starlight_i/CMakeLists.txt b/Generators/Starlight_i/CMakeLists.txt
index 04abb290de4e318dd4868074f7fc4328c86ef936..8dfb8fbf4e65aecb9dd092a6cf2c7f108640d4ab 100644
--- a/Generators/Starlight_i/CMakeLists.txt
+++ b/Generators/Starlight_i/CMakeLists.txt
@@ -1,23 +1,9 @@
-# $Id: CMakeLists.txt 762209 2016-07-15 14:15:34Z krasznaa $
-################################################################################
-# Package: Starlight_i
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 
 # Declare the package name:
 atlas_subdir( Starlight_i )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/GeneratorModules
-   Generators/AtlasHepMC
-   PRIVATE
-   Control/AthenaKernel
-   Control/StoreGate
-   GaudiKernel
-   Generators/GeneratorUtils
-   Generators/TruthUtils )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Starlight )
@@ -32,9 +18,9 @@ atlas_add_library( Starlight_iLib
    INCLUDE_DIRS ${STARLIGHT_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-   LINK_LIBRARIES ${STARLIGHT_LIBRARIES} GeneratorModulesLib StoreGateLib
+   LINK_LIBRARIES ${STARLIGHT_LIBRARIES} GeneratorModulesLib
    PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel
-   GaudiKernel TruthUtils )
+   GaudiKernel GeneratorUtilsLib TruthUtils StoreGateLib )
 
 atlas_add_component( Starlight_i
    src/components/*.cxx
diff --git a/Generators/TrackRecordGenerator/CMakeLists.txt b/Generators/TrackRecordGenerator/CMakeLists.txt
index b6721397072653eb184d4d947fe64149f30fcbae..6eb7d4c93b3ea78ab08c56586ded1918a9b14ee3 100644
--- a/Generators/TrackRecordGenerator/CMakeLists.txt
+++ b/Generators/TrackRecordGenerator/CMakeLists.txt
@@ -1,35 +1,18 @@
-################################################################################
-# Package: TrackRecordGenerator
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrackRecordGenerator )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          GaudiKernel
-                          Simulation/G4Sim/TrackRecord )
-
 # External dependencies:
 find_package( CLHEP )
 
 # Component(s) in the package:
-atlas_add_library( TrackRecordGeneratorLib
-                   src/TrackRecordGenerator.cxx
-                   PUBLIC_HEADERS TrackRecordGenerator
-                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                   DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorModulesLib
-                   PRIVATE_LINK_LIBRARIES GaudiKernel TrackRecordLib )
-
 atlas_add_component( TrackRecordGenerator
+                     src/TrackRecordGenerator.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorModulesLib GaudiKernel TrackRecordGeneratorLib )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     DEFINITIONS ${CLHEP_DEFINITIONS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib GeneratorModulesLib TrackRecordLib )
 
 # 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/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py b/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py
index b1e222ea17c28e8d31936b0c2be44d6b7c7de5d2..f456db67df2cbb1acd3e528c22a989a6c3dc36af 100644
--- a/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py
+++ b/Generators/TrackRecordGenerator/python/TrackRecordGeneratorConfig.py
@@ -1,9 +1,9 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ############## Input: Reading Particles from TrackRecord Input File ###############
 def getInput_TrackRecordGenerator(name="TrackRecordGenerator", **kwargs):
     ## Configuring the Athena application for a 'track record' job
-    import G4AtlasApps.AtlasCosmicTrackRecordJob
+    import G4AtlasApps.AtlasCosmicTrackRecordJob  # noqa: F401
     kwargs.setdefault('TRCollection','CosmicRecord') # Collection name
     kwargs.setdefault('TRSmearing', -1) #in millimeters, e.g. 10
     kwargs.setdefault('TRPSmearing', -1) #in radians, e.g. 0.01
diff --git a/Generators/TruthIO/CMakeLists.txt b/Generators/TruthIO/CMakeLists.txt
index bd91ec10b475e6d27a587cd53c87d17ba905e0cc..86a910ee1af5590e8c9e1ef59853bc7fc20b048e 100644
--- a/Generators/TruthIO/CMakeLists.txt
+++ b/Generators/TruthIO/CMakeLists.txt
@@ -1,21 +1,8 @@
-################################################################################
-# Package: TruthIO
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthIO )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          Generators/GeneratorModules
-                          Generators/AtlasHepMC
-                          PRIVATE
-                          Control/StoreGate
-                          Event/EventInfo
-                          Generators/GeneratorObjects )
-
 # External dependencies:
 find_package( HepPDT )
 
@@ -24,9 +11,7 @@ atlas_add_component( TruthIO
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib AthenaBaseComps GaudiKernel GeneratorModulesLib StoreGateLib SGtests EventInfo GeneratorObjects )
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} AtlasHepMCLib AtlasHepMCfioLib AthenaBaseComps GaudiKernel GeneratorModulesLib StoreGateLib EventInfo GeneratorObjects )
 
 # Install files from the package:
-atlas_install_headers( TruthIO )
 atlas_install_joboptions( share/*.py )
-
diff --git a/Generators/TruthUtils/CMakeLists.txt b/Generators/TruthUtils/CMakeLists.txt
index e82e414ea1dceb95010dfd7a869c7671806feb17..c13fbe6a159e845b9fbf7e0c2ee1dc27393a431b 100644
--- a/Generators/TruthUtils/CMakeLists.txt
+++ b/Generators/TruthUtils/CMakeLists.txt
@@ -1,18 +1,9 @@
-# $Id: CMakeLists.txt 744476 2016-05-03 13:24:11Z krasznaa $
-################################################################################
-# Package: TruthUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TruthUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Generators/AtlasHepMC )
-
 # External dependencies:
-find_package( Boost )
 find_package( HEPUtils )
 find_package( MCUtils )
 find_package( HepMC )
@@ -37,5 +28,5 @@ endif()
 atlas_add_library( TruthUtils
    TruthUtils/*.h Root/*.cxx
    PUBLIC_HEADERS TruthUtils
-   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${extra_includes}
-   LINK_LIBRARIES ${Boost_LIBRARIES} ${extra_libs} )
+   INCLUDE_DIRS ${extra_includes}
+   LINK_LIBRARIES ${extra_libs} )
diff --git a/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.py b/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.py
index 1ba9ef0567df46eeb4bd7c5e2b781edae4ca87dc..120f219b32c7797e2dbb42e1e3dedb36d80af155 100644
--- a/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.py
+++ b/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonDbSetup.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
 
 ###############################################################
 ## @file   TrigPSCPythonDbSetup.py
@@ -6,8 +6,8 @@
 ## @author Frank Winklmeier
 ###############################################################
 
-## This is a very minimal Python setup. It is only included when
-## the POSTCOMMAND is non-empty while running from the DB.
+## This is a very minimal Python setup. It is only used when running
+## with athenaHLT from the DB. It is not used in a partition!
 ## Besides providing basic python bindings it also takes care of
 ## switching the OutputLevel in case the "-l" option was used.
 
@@ -39,6 +39,10 @@ from GaudiPython import *
 from GaudiPython.Bindings import iProperty
 from TrigCommon.TrigPyHelper import trigApp
 
+## If HLT PSK is set on command line read it from DB (and not COOL)
+if 'hltkey' in PscConfig.optmap['JOBOPTIONSPATH']:
+   trigApp.changeJobProperties('HLTPrescaleCondAlg', 'Source', 'DB')
+
 ## Set OutputLevel in JobOptionsSvc if "-l" option was used in athenaHLT
 if logLevel!="INFO":
    outputLevel = int(locals()[logLevel])
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
new file mode 100755
index 0000000000000000000000000000000000000000..6880b883bdb3d747465b881aa836c57576f9a143
--- /dev/null
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/OccupancyMapMaker.h
@@ -0,0 +1,107 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PIXELCONDITIONSALGS_OCCUPANCYMAPMAKER_H
+#define PIXELCONDITIONSALGS_OCCUPANCYMAPMAKER_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "InDetConditionsSummaryService/IInDetConditionsTool.h"
+
+#include <string>
+#include <sstream>
+#include <vector>
+#include <fstream>
+#include <utility> // pair
+
+class ITHistSvc;
+class PixelID;
+class TH2D;
+class TH2C;
+class TH1D;
+
+class OccupancyMapMaker: public AthAlgorithm{
+  public:
+    OccupancyMapMaker (const std::string& name, ISvcLocator* pSvcLocator);
+    ~OccupancyMapMaker();
+
+    StatusCode initialize();
+    StatusCode execute();
+    StatusCode finalize();
+
+  private:
+    std::string getDCSIDFromPosition(int bec, int layer, int modPhi, int modEta);
+
+    std::vector<std::string> &splitter(const std::string &str, char delim, std::vector<std::string> &elems);
+
+    std::vector<std::string> splitter(const std::string &str, char delim); 
+    StatusCode registerHistograms();
+
+    const std::string histoSuffix(const int bec, const int layer);
+
+  private:
+    ServiceHandle <ITHistSvc> m_tHistSvc;
+
+    ToolHandle<IInDetConditionsTool> m_pixelConditionsTool
+    {this, "PixelConditionsSummaryTool", "PixelConditionsSummaryTool", "Tool to retrieve Pixel Conditions summary"};
+
+    const PixelID *m_pixelID;
+
+    // vector of modulename and vector(barrel/endcap, layer, phi, eta)
+    std::vector< std::pair< std::string, std::vector<int> > > m_pixelMapping;
+
+    std::string m_pixelRDOKey;
+    std::vector<int> m_moduleHashList;
+
+    double m_nEvents;
+    //  double m_occupancyCut;
+
+    TH1D* m_nEventsHist;
+    TH1D* m_nEventsLBHist;
+    std::vector<TH2D*> m_hitMaps;
+    std::vector<TH2C*> m_noiseMaps;
+    std::vector<TH1D*> m_LBdependence;
+    std::vector<TH1D*> m_BCIDdependence;
+    std::vector<TH1D*> m_TOTdistributions;
+
+    TH1D *m_disabledModules;
+    TH2D *m_overlayedPixelNoiseMap;
+    TH2D *m_overlayedIBLDCNoiseMap; // Planar Double Chip
+    TH2D *m_overlayedIBLSCNoiseMap; // 3D Single Chip
+    //TH2D* m_overlayedDBMNoiseMap; // DBM
+
+    // cuts ....
+    double m_disk1ACut; // disk-1, A-side
+    double m_disk2ACut; // disk-2, A-side
+    double m_disk3ACut; // disk-3, A-side
+    double m_disk1CCut; // disk-1, C-side
+    double m_disk2CCut; // disk-2, C-side
+    double m_disk3CCut; // disk-3, C-side
+    double m_iblCut;    // IBL
+    double m_bLayerCut; // B-Layer
+    double m_layer1Cut; // Layer 1
+    double m_layer2Cut; // Layer 2
+    double m_dbmCut;    // DBM
+
+    int m_hist_lbMax;   // max number of LB 
+
+    double m_longPixelMultiplier;
+    double m_gangedPixelMultiplier;
+
+    //  int m_maxLVL1A;
+
+    bool m_occupancyPerBC;
+
+    unsigned int m_nBCReadout;
+
+    unsigned int m_evt_lbMin; // lower limit for LB to be taken into account
+    unsigned int m_evt_lbMax; // upper limit for LB to be taken into account
+
+    bool m_calculateNoiseMaps;
+
+    std::string m_mapFile;
+};
+
+#endif  // PIXELCONDITIONSALGS_OCCUPANCYMAPMAKERH_
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/PixelCalibAlgs/PixelConvert.h b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
similarity index 100%
rename from InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/PixelCalibAlgs/PixelConvert.h
rename to InnerDetector/InDetCalibAlgs/PixelCalibAlgs/PixelCalibAlgs/PixelConvert.h
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..b235a2e19927aa2a39994e1e8daa5aaa7618a0ac
--- /dev/null
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/OccupancyMapMaker.cxx
@@ -0,0 +1,733 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+// PixelCalibAlgs
+#include "PixelCalibAlgs/OccupancyMapMaker.h"
+#include "PixelCalibAlgs/PixelConvert.h"
+
+// Gaudi
+#include "GaudiKernel/ITHistSvc.h"
+
+// EDM
+#include "InDetRawData/PixelRDO_Container.h"
+#include "EventInfo/EventInfo.h"
+#include "EventInfo/EventID.h"
+
+// geometry
+#include "InDetIdentifier/PixelID.h"
+
+// Thread safety check
+#include "CxxUtils/checker_macros.h"
+
+// ROOT
+#include "TH2.h"
+#include "TString.h" 
+
+// standard library
+#include <string>
+#include <sstream>
+#include <algorithm>
+#include <map> 
+#include <fstream>
+#include <cstdlib> 
+
+OccupancyMapMaker::OccupancyMapMaker(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator),
+  m_tHistSvc("THistSvc", name),
+  m_pixelID(0),
+  m_pixelRDOKey("PixelRDOs"),
+  m_nEvents(0.),
+  m_nEventsHist(nullptr),
+  m_nEventsLBHist(nullptr),
+  m_disabledModules(nullptr),
+  m_overlayedPixelNoiseMap(nullptr),
+  m_overlayedIBLDCNoiseMap(nullptr),
+  m_overlayedIBLSCNoiseMap(nullptr),
+  m_disk1ACut(1.e-3),
+  m_disk2ACut(1.e-3),
+  m_disk3ACut(1.e-3),
+  m_disk1CCut(1.e-3),
+  m_disk2CCut(1.e-3),
+  m_disk3CCut(1.e-3),
+  m_iblCut(1.e-3), 
+  m_bLayerCut(1.e-3),
+  m_layer1Cut(1.e-3),
+  m_layer2Cut(1.e-3),
+  m_dbmCut(1.e-3),
+  m_hist_lbMax(3001),
+  m_longPixelMultiplier(1.5), 
+  m_gangedPixelMultiplier(2.), 
+  m_occupancyPerBC(true),
+  m_nBCReadout(2),
+  m_evt_lbMin(0),
+  m_evt_lbMax(-1),
+  m_calculateNoiseMaps(false),
+  m_mapFile("PixelMapping_Run2.dat")
+{
+  declareProperty("PixelRDOKey", m_pixelRDOKey, "StoreGate key of pixel RDOs");
+  declareProperty("Disk1ACut", m_disk1ACut, "Occupancy cut for Disk1A pixels");
+  declareProperty("Disk2ACut", m_disk2ACut, "Occupancy cut for Disk2A pixels");
+  declareProperty("Disk3ACut", m_disk3ACut, "Occupancy cut for Disk3A pixels");
+  declareProperty("Disk1CCut", m_disk1CCut, "Occupancy cut for Disk1C pixels");
+  declareProperty("Disk2CCut", m_disk2CCut, "Occupancy cut for Disk2C pixels");
+  declareProperty("Disk3CCut", m_disk3CCut, "Occupancy cut for Disk3C pixels");
+  declareProperty("BLayerCut", m_bLayerCut, "Occupancy cut for BLayer pixels");
+  declareProperty("Layer1Cut", m_layer1Cut, "Occupancy cut for Layer1 pixels");
+  declareProperty("Layer2Cut", m_layer2Cut, "Occupancy cut for Layer2 pixels");
+  declareProperty("IBLCut", m_dbmCut, "Occupancy cut for DBM pixels"); 
+  declareProperty("nLBmax", m_hist_lbMax, "Maximum number of LB (for histograms binning)");
+  declareProperty("NBCReadout", m_nBCReadout, "Number of bunch crossings read out");
+  declareProperty("LBMin", m_evt_lbMin, "First lumi block to consider");
+  declareProperty("LBMax", m_evt_lbMax, "Last lumi block to consider");
+  declareProperty("LongPixelMultiplier", m_longPixelMultiplier, "Multiplier for long pixels");
+  declareProperty("GangedPixelMultiplier", m_gangedPixelMultiplier, "Multiplier for ganged pixels");
+  declareProperty("OccupancyPerBC", m_occupancyPerBC, "Calculate occupancy per BC or per event");
+  declareProperty("CalculateNoiseMaps", m_calculateNoiseMaps, "If false only build hit maps");
+  declareProperty("InputPixelMap", m_mapFile);
+  declareProperty("THistSvc", m_tHistSvc, "THistSvc");
+}
+
+OccupancyMapMaker::~OccupancyMapMaker(){}
+
+StatusCode OccupancyMapMaker::initialize(){
+  ATH_MSG_INFO("Initializing OccupancyMapMaker");
+
+  ATH_CHECK(m_tHistSvc.retrieve());
+  ATH_CHECK(m_pixelConditionsTool.retrieve());
+  ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
+ 
+  // resize vectors of histograms
+  const Identifier::size_type maxHash = m_pixelID->wafer_hash_max();
+  ATH_MSG_INFO("PixelID maxHash = " << maxHash);
+  m_hitMaps.resize(maxHash);
+  m_LBdependence.resize(maxHash);
+  m_BCIDdependence.resize(maxHash);
+  m_TOTdistributions.resize(maxHash);
+  if(m_calculateNoiseMaps) {
+    m_noiseMaps.resize(maxHash);
+  }
+  return registerHistograms(); 
+}
+
+std::string OccupancyMapMaker::getDCSIDFromPosition (int barrel_ec, int layer, int modPhi, int module_eta){
+  for(unsigned int ii = 0; ii < m_pixelMapping.size(); ii++) {
+    if (m_pixelMapping[ii].second.size() != 4) {
+      ATH_MSG_WARNING( "getDCSIDFromPosition: Vector size is not 4!" );
+      return std::string("Error!");
+    }
+    if (m_pixelMapping[ii].second[0] != barrel_ec) continue;
+    if (m_pixelMapping[ii].second[1] != layer) continue;
+    if (m_pixelMapping[ii].second[2] != modPhi) continue;
+    if (m_pixelMapping[ii].second[3] != module_eta) continue;
+    return m_pixelMapping[ii].first;
+  }
+  ATH_MSG_WARNING( "Not found!" );
+  return std::string("Error!");
+}
+
+const std::string OccupancyMapMaker::histoSuffix(const int bec, const int layer){
+  std::ostringstream out;
+  
+  switch(bec) {
+  case 0: 
+    out << "barrel/";  
+    if(layer==0)      { out << "IBL";              }
+    else if(layer==1) { out << "B-layer";          }
+    else              { out << "Layer" << layer-1; }
+    break;
+  case +2: out << "endcapA/Disk" << layer+1; break;
+  case -2: out << "endcapC/Disk" << layer+1; break;
+  case +4: out << "DBMA/Layer"   << layer+1; break;
+  case -4: out << "DBMC/Layer"   << layer+1; break;
+  default: break;
+  }  
+  return out.str();
+}
+
+std::vector<std::string>& OccupancyMapMaker::splitter(const std::string &str,
+						    char delim, 
+						    std::vector<std::string> &elems) {
+  std::stringstream ss(str);
+  std::string item;
+  while (std::getline(ss, item, delim)) {
+    elems.push_back(item);
+  }
+  return elems;
+}
+
+std::vector<std::string> OccupancyMapMaker::splitter(const std::string &str, 
+						   char delim) {
+  std::vector<std::string> elems;
+  splitter(str, delim, elems);
+  return elems;
+}
+
+StatusCode OccupancyMapMaker::registerHistograms(){
+
+  char* getenvPath = std::getenv("DATAPATH");
+  const unsigned int maxPathStringLength{3000};
+  if((not getenvPath) or (strlen(getenvPath) > maxPathStringLength) ){
+      ATH_MSG_FATAL( "Unable to retrieve environmental DATAPATH" );
+      return StatusCode::FAILURE;
+  }
+  std::stringstream tmpSstr{};
+  tmpSstr<<getenvPath;
+  std::string tmppath(tmpSstr.str());
+ 
+  std::vector<std::string> paths = splitter(tmppath, ':'); 
+  bool found(false);  
+  for(const auto& x : paths){
+    std::ifstream infile( (x+"/"+m_mapFile).c_str() );
+    if( infile.is_open() ){
+      ATH_MSG_INFO("Mapping file '" << m_mapFile << "' found in " << x);
+
+      int tmp_barrel_ec; int tmp_layer; int tmp_modPhi; int tmp_module_eta; std::string tmp_module_name;
+      std::vector<int> tmp_position;
+      tmp_position.resize(4);
+      while(infile >> tmp_barrel_ec >> tmp_layer >> tmp_modPhi >> tmp_module_eta >> tmp_module_name) {
+        tmp_position[0] = tmp_barrel_ec;
+        tmp_position[1] = tmp_layer;
+        tmp_position[2] = tmp_modPhi;
+        tmp_position[3] = tmp_module_eta;
+        m_pixelMapping.push_back(std::make_pair(tmp_module_name, tmp_position));
+      }
+
+      found=true;
+      infile.close();
+      break;
+    }
+  }
+  
+  if( !found ){
+    ATH_MSG_FATAL("Mapping file '" << m_mapFile << "' not found in DATAPATH !!!");
+    return StatusCode::FAILURE;
+  }
+
+  m_nEventsHist = new TH1D("NEvents", "NEvents", 1, 0, 1);
+  m_tHistSvc->regHist("/histfile/NEvents", m_nEventsHist).setChecked();
+  
+  m_nEventsLBHist = new TH1D("NEventsLB", "NEventsLB", m_hist_lbMax, -0.5, m_hist_lbMax+0.5);
+  m_tHistSvc->regHist("/histfile/NEventsLB", m_nEventsLBHist).setChecked();
+
+  for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
+    Identifier ident = *wafer_it;
+    if(!m_pixelID->is_pixel(ident)) continue; 
+    
+    //const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design());
+    //if(!design) continue;    
+    //unsigned int mchips = design->numberOfCircuits();
+
+    int bec        = m_pixelID->barrel_ec(ident);
+    int layer      = m_pixelID->layer_disk(ident); 
+    int modPhi = m_pixelID->phi_module(ident);
+    int module_eta = m_pixelID->eta_module(ident); 
+    int modHash = m_pixelID->wafer_hash(ident);
+
+    std::string onlineID = 
+      getDCSIDFromPosition(bec,layer,modPhi,module_eta);
+
+    std::ostringstream name;
+    
+    // hitmap
+    if( bec == 0 && layer == 0) // IBL
+      m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 160, 0, 160, 336, 0, 336);
+    else if( abs(bec) == 4 ) // DBM
+      m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 80,  0,  80, 336, 0, 336);
+    else
+      m_hitMaps[modHash] = new TH2D(onlineID.c_str(), onlineID.c_str(), 144, 0, 144, 328, 0, 328);    
+    name << "/histfile/hitMaps_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_hitMaps[modHash]).setChecked();
+    name.str(""); name.clear();
+
+
+    // LB dependence
+    m_LBdependence[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), m_hist_lbMax, -0.5, m_hist_lbMax + 0.5);
+    name  << "/histfile/LBdep_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_LBdependence[modHash]).setChecked();
+    name.str(""); name.clear();
+    
+    // BCID dependence
+    m_BCIDdependence[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 301, -0.5, 300.5);
+    name << "/histfile/BCIDdep_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_BCIDdependence[modHash]).setChecked();
+    name.str(""); name.clear();
+    
+    // TOT
+    if( bec == 0 && layer == 0) // IBL
+      m_TOTdistributions[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 19, -0.5, 18.5);
+    else
+      m_TOTdistributions[modHash] = new TH1D(onlineID.c_str(), onlineID.c_str(), 256, -0.5, 255.5);
+    name << "/histfile/TOT_" << histoSuffix(bec,layer) << "/" << onlineID;
+    m_tHistSvc->regHist(name.str().c_str(), m_TOTdistributions[modHash]).setChecked();
+    name.str(""); name.clear();
+    
+    // noisemap
+    if( m_calculateNoiseMaps ){
+      if( bec == 0 && layer == 0) // IBL
+	m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 160, 0, 160, 336, 0, 336);
+      else if( abs(bec) == 4 ) // DBM
+	m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 80, 0, 80, 336, 0, 336);
+      else
+	m_noiseMaps[modHash] = new TH2C(onlineID.c_str(), onlineID.c_str(), 144, 0, 144, 328, 0, 328);
+      name << "/histfile/noiseMaps_" << histoSuffix(bec,layer) << "/" << onlineID;
+      m_tHistSvc->regHist(name.str().c_str(), m_noiseMaps[modHash]).setChecked();
+      name.str(""); name.clear();
+    }
+  } // end loop in detector elements 
+  
+  m_disabledModules = new TH1D("DisabledModules", "Number of events disabled vs. IdentifierHash", 2048, 0, 2048);
+  m_tHistSvc->regHist("/histfile/DisabledModules", m_disabledModules).setChecked();
+  
+  if (m_calculateNoiseMaps) {
+    m_overlayedPixelNoiseMap = new TH2D("overlayedPixelNoiseMap", "Noisy pixel map overlayed all Pixel modules", 144, 0, 144, 328, 0, 328);
+    m_tHistSvc->regHist("/histfile/overlayedPixelNoiseMap", m_overlayedPixelNoiseMap).setChecked();
+    
+    m_overlayedIBLDCNoiseMap = new TH2D("overlayedIBLDCNoiseMap", "Noisy pixel map overlayed all IBL Planar modules", 160, 0, 160, 336, 0, 336);
+    m_tHistSvc->regHist("/histfile/overlayedIBLDCNoiseMap", m_overlayedIBLDCNoiseMap).setChecked();
+    
+    m_overlayedIBLSCNoiseMap = new TH2D("overlayedIBLSCNoiseMap", "Noisy pixel map overlayed all IBL 3D modules", 80, 0, 80, 336, 0, 336);
+    m_tHistSvc->regHist("/histfile/overlayedIBLSCNoiseMap", m_overlayedIBLSCNoiseMap).setChecked();
+  }  
+  
+  return StatusCode::SUCCESS;
+} 
+
+//=========================================================
+//
+// execute
+//
+//=========================================================
+StatusCode OccupancyMapMaker::execute(){
+  ATH_MSG_DEBUG( "Executing OccupancyMapMaker" );
+
+  // retrieve EventInfo
+  const EventInfo* eventInfo;
+  StatusCode sc = sgSvc()->retrieve(eventInfo);
+  if( !sc.isSuccess() ){
+    ATH_MSG_FATAL("Unable to retrieve event info");
+    return StatusCode::FAILURE;
+  } ATH_MSG_DEBUG("Event info retrieved");
+
+  // check LB is in allowed range
+  unsigned int LB =  eventInfo->event_ID()->lumi_block();
+  if( (LB < m_evt_lbMin) || (m_evt_lbMax >= m_evt_lbMin && LB > m_evt_lbMax) ){
+    ATH_MSG_VERBOSE("Event in lumiblock " << eventInfo->event_ID()->lumi_block() <<
+		    " not in selected range [" << m_evt_lbMin << "," << m_evt_lbMax << "] => skipped");    
+    return StatusCode::SUCCESS;
+  }
+
+  // retrieve PixelRDO container
+  const PixelRDO_Container* pixelRDOs = nullptr;
+  sc = sgSvc()->retrieve(pixelRDOs, m_pixelRDOKey);
+  if( !sc.isSuccess() ){
+    ATH_MSG_FATAL( "Unable to retrieve pixel RDO container at " << m_pixelRDOKey );
+    return StatusCode::FAILURE;
+  } ATH_MSG_DEBUG( "Pixel RDO container retrieved" );
+
+  // loop in RDO container
+  for(PixelRDO_Container::const_iterator coll=pixelRDOs->begin(); 
+      coll!=pixelRDOs->end(); ++coll){
+
+    const InDetRawDataCollection<PixelRDORawData>* PixelRDOCollection(*coll);
+    if(PixelRDOCollection != 0){
+      Identifier moduleID = PixelRDOCollection->identify();
+      IdentifierHash modHash = m_pixelID->wafer_hash(moduleID);
+      ATH_MSG_VERBOSE("moduleID, modHash = " << moduleID << " , " << modHash);
+      
+      // exclude module if reported as not good by PixelConditionsSummaryTool
+      if( !(m_pixelConditionsTool->isGood(modHash)) ) {
+	ATH_MSG_VERBOSE("Module excluded as reported not good by PixelConditionsSummaryTool");
+        continue;
+      }
+
+      // exclude module if containg FE synch errors
+      if (m_pixelConditionsTool->hasBSError(modHash)) {
+	ATH_MSG_VERBOSE("Module excluded as containing FE synch errors");
+	continue;
+      }
+      
+      for(DataVector<PixelRDORawData>::const_iterator rdo = PixelRDOCollection->begin();
+          rdo!=PixelRDOCollection->end(); ++rdo){
+        Identifier rdoID = (*rdo)->identify();
+        unsigned int pixel_eta = m_pixelID->eta_index(rdoID);
+        unsigned int pixel_phi = m_pixelID->phi_index(rdoID);
+
+        int TOT = (*rdo)->getToT(); // it returns a 8 bits "word"
+        int BCID = (*rdo)->getBCID();
+
+        m_hitMaps[modHash]->Fill(pixel_eta, pixel_phi);
+        m_LBdependence[modHash]->Fill(LB);
+        m_BCIDdependence[modHash]->Fill(BCID);
+        m_TOTdistributions[modHash]->Fill(TOT);
+      }
+    }
+  }
+
+
+  // [sgs] why is this done in every event ???
+  for(unsigned int moduleHash = 0; moduleHash < m_pixelID->wafer_hash_max(); moduleHash++) {
+    if( !m_pixelConditionsTool->isActive( moduleHash ) ){
+      m_disabledModules->Fill( moduleHash );
+    }
+  }
+  
+  m_nEvents++;
+  m_nEventsHist->Fill(0.5);
+  m_nEventsLBHist->Fill(LB);
+
+  return StatusCode::SUCCESS;
+}
+
+
+//=========================================================
+//
+// finalize
+//
+//=========================================================
+StatusCode OccupancyMapMaker::finalize() {
+  ATH_MSG_INFO("Finalizing OccupancyMapMaker");
+
+  if(m_occupancyPerBC)
+    m_nEvents *= m_nBCReadout;
+ 
+  const int minLogOccupancy = 8;
+  const double minOccupancy = pow(10.,-minLogOccupancy);
+  
+  TH1D* globalOccupancy= new TH1D("occupancy", "Pixel occupancy", minLogOccupancy*10, -minLogOccupancy, 0.);
+  m_tHistSvc->regHist("/histfile/occupancy",globalOccupancy).setChecked();
+
+  std::map<std::string, TH1D*> h_occupancy;
+
+  // occupancy histograms for different components of the Pixel detector
+  std::vector<std::string> vcomponent;
+  vcomponent.push_back("Disk1A");
+  vcomponent.push_back("Disk2A");
+  vcomponent.push_back("Disk3A");
+  vcomponent.push_back("Disk1C");
+  vcomponent.push_back("Disk2C");
+  vcomponent.push_back("Disk3C");
+  vcomponent.push_back("IBL"); 
+  vcomponent.push_back("B-layer");
+  vcomponent.push_back("Layer1");
+  vcomponent.push_back("Layer2");
+  vcomponent.push_back("DBMA");
+  vcomponent.push_back("DBMC");
+
+  for(std::vector<std::string>::const_iterator cit=vcomponent.begin(); cit!=vcomponent.end(); ++cit) {
+    const std::string comp = (*cit);
+    h_occupancy[comp] = new TH1D( ("occupancy"+comp).c_str(), ("Pixel occupancy "+comp).c_str(),
+				  minLogOccupancy*10, -minLogOccupancy, 0);    
+    m_tHistSvc->regHist(("/histfile/occupancy"+comp).c_str(), h_occupancy[comp]).setChecked();
+  }
+  vcomponent.clear();
+  
+  // occupancy histograms for different pixel types
+  std::vector<std::string> vtype;
+  vtype.push_back("Normal");
+  vtype.push_back("Ganged");
+  vtype.push_back("InterGanged");
+  vtype.push_back("Long");
+  vtype.push_back("Long-Ganged");
+  vtype.push_back("Long-InterGanged");
+ for(std::vector<std::string>::const_iterator cit=vtype.begin(); cit!=vtype.end(); ++cit){
+    const std::string type = (*cit);
+    h_occupancy[type] = 
+      new TH1D( ("occupancy"+type).c_str(), ("Pixel occupancy "+type).c_str(), 
+		minLogOccupancy*10, -minLogOccupancy, 0);
+    m_tHistSvc->regHist(("/histfile/occupancy"+type).c_str(), h_occupancy[type]).setChecked();
+  }
+  vtype.clear();
+
+  //------------------------
+  // number of hits 
+  //------------------------  
+
+  // IBL
+  TH2F* nhitsPlotBI=new TH2F("nhitsPlotBI", "Number of hits BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5); 
+  m_tHistSvc->regHist("/histfile/nhitsPlotBI",nhitsPlotBI).setChecked();
+
+  // B-layer
+  TH2F* nhitsPlotB0=new TH2F("nhitsPlotB0", "Number of hits B0;module_eta;module_phi", 13, -6.5, 6.5, 22, -0.5, 21.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotB0",nhitsPlotB0).setChecked();
+
+  // barrel layer 1
+  TH2F* nhitsPlotB1=new TH2F("nhitsPlotB1", "Number of hits B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotB1",nhitsPlotB1).setChecked();
+
+  // barrel layer 2
+  TH2F* nhitsPlotB2=new TH2F("nhitsPlotB2", "Number of hits B2;module_eta;module_phi", 13,- 6.5, 6.5, 52, -0.5, 51.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotB2",nhitsPlotB2).setChecked();
+
+  // endcap
+  TH2F* nhitsPlotEC=new TH2F("nhitsPlotEC", "Number of hits Endcap;Disk;module_phi", 7, -3.5, 3.5, 48, -0.5, 47.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotEC",nhitsPlotEC).setChecked();
+  
+  // DBM
+  TH2F* nhitsPlotDBM=new TH2F("nhitsPlotDBM", "Number of hits DBM;Layer;module_phi",7,-3.5,3.5,4,-0.5,3.5);
+  m_tHistSvc->regHist("/histfile/nhitsPlotDBM",nhitsPlotDBM).setChecked();
+
+  //------------------------
+  // hits w/o noise
+  //------------------------  
+
+  // IBL
+  TH2F* nhitsNoNoisePlotBI=new TH2F("nhitsNoNoisePlotBI","Number of hits without Noise BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5); 
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotBI",nhitsNoNoisePlotBI).setChecked();
+
+  // B-layer
+  TH2F* nhitsNoNoisePlotB0=new TH2F("nhitsNoNoisePlotB0","Number of hits without Noise B0;module_eta;module_phi", 13, -6.5, 6.5, 22, -0.5, 21.5);
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB0",nhitsNoNoisePlotB0).setChecked();
+
+  // barrel layer 1
+  TH2F* nhitsNoNoisePlotB1=new TH2F("nhitsNoNoisePlotB1","Number of hits without Noise B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB1",nhitsNoNoisePlotB1).setChecked();
+
+  // barrel layer 2
+  TH2F* nhitsNoNoisePlotB2=new TH2F("nhitsNoNoisePlotB2","Number of hits without Noise B2;module_eta;module_phi", 13, -6.5, 6.5, 52, -0.5, 51.5);
+  m_tHistSvc->regHist("/histfile/nhitsNoNoisePlotB2",nhitsNoNoisePlotB2).setChecked();
+
+  //------------------------
+  // disabled pixels
+  //------------------------  
+
+  // IBL
+  TH2F* disablePlotBI=new TH2F("disablePlotBI", "Disabled pixels BI;module_eta;module_phi", 20, -10, 10, 14, -0.5, 13.5); 
+  m_tHistSvc->regHist("/histfile/disablePlotBI",disablePlotBI).setChecked();
+
+  // B-layer
+  TH2F* disablePlotB0=new TH2F("disablePlotB0", "Disabled pixels B0;module_eta;module_phi", 13,- 6.5, 6.5, 22, -0.5, 21.5);
+  m_tHistSvc->regHist("/histfile/disablePlotB0",disablePlotB0).setChecked();
+
+  // barrel layer 1
+  TH2F* disablePlotB1=new TH2F("disablePlotB1", "Disabled pixels B1;module_eta;module_phi", 13, -6.5, 6.5, 38, -0.5, 37.5);
+  m_tHistSvc->regHist("/histfile/disablePlotB1",disablePlotB1).setChecked();
+
+  // barrel layer 2
+  TH2F* disablePlotB2=new TH2F("disablePlotB2", "Disabled pixels B2;module_eta;module_phi", 13, -6.5, 6.5, 52, -0.5, 51.5);
+  m_tHistSvc->regHist("/histfile/disablePlotB2",disablePlotB2).setChecked();
+
+  // endcap
+  TH2F* disablePlotEC=new TH2F("disablePlotEC", "Disabled pixels Endcap;Disk;module_phi", 7, -3.5, 3.5, 48, -0.5, 47.5);
+  m_tHistSvc->regHist("/histfile/disablePlotEC",disablePlotEC).setChecked();
+
+  // DBM
+  TH2F* disablePlotDBM=new TH2F("disablePlotDBM", "Disabled pixels DBM;Layer;module_phi", 7, -3.5, 3.5, 4, -0.5, 3.5);
+  m_tHistSvc->regHist("/histfile/disablePlotDBM",disablePlotDBM).setChecked();
+
+  TH1D* maskedPlot= new TH1D("maskedPlot","Disabled pixel per module",50,0.5,50.5);
+  m_tHistSvc->regHist("/histfile/maskedPlot",maskedPlot).setChecked();
+
+  int totalDisabledPixels=0;
+  int totalDisabledModules=0;
+  int modulesWithHits=0;
+  int modulesWithDisabledPixels=0;
+
+  for (PixelID::const_id_iterator wafer_it=m_pixelID->wafer_begin(); wafer_it!=m_pixelID->wafer_end(); ++wafer_it) {
+    Identifier ident = *wafer_it;
+    if(!m_pixelID->is_pixel(ident)) continue;  
+
+    int bec     = m_pixelID->barrel_ec (ident);
+    int layer   = m_pixelID->layer_disk(ident);
+    int modPhi  = m_pixelID->phi_module(ident);
+    int modEta  = m_pixelID->eta_module(ident); 
+    int modHash = m_pixelID->wafer_hash(ident);
+    int phi_max = m_pixelID->phi_index_max(ident);
+    int eta_max = m_pixelID->eta_index_max(ident);
+
+    TH2F* nhitsNoNoisePlot=0; 
+    std::string comp;
+    double cut = 0.;
+
+    if(bec != 0) { // Disk or DBM
+      if(bec == 2) { 
+        if(layer == 0)      {cut=m_disk1ACut; comp="Disk1A"; }
+        else if(layer == 1) {cut=m_disk2ACut; comp="Disk2A"; }
+        else if(layer == 2) {cut=m_disk3ACut; comp="Disk3A"; }
+      }
+      else if(bec == -2) { 
+        if(layer == 0)      { cut=m_disk1CCut; comp="Disk1C"; }
+        else if(layer == 1) { cut=m_disk2CCut; comp="Disk2C"; }
+        else if(layer == 2) { cut=m_disk3CCut; comp="Disk3C"; }
+      }
+      else if(bec ==  4) { cut=m_dbmCut; comp="DBMA"; }
+      else if(bec == -4) { cut=m_dbmCut; comp="DBMC"; }
+    } 
+    else if(bec == 0) { // Barrel
+      if(layer == 0)        { cut=m_iblCut;    nhitsNoNoisePlot=nhitsNoNoisePlotBI; comp="IBL";     }
+        else if(layer == 1) { cut=m_bLayerCut; nhitsNoNoisePlot=nhitsNoNoisePlotB0; comp="B-layer"; }
+        else if(layer == 2) { cut=m_layer1Cut; nhitsNoNoisePlot=nhitsNoNoisePlotB1; comp="Layer1";  }
+        else if(layer == 3) { cut=m_layer2Cut; nhitsNoNoisePlot=nhitsNoNoisePlotB2; comp="Layer2";  }
+    } 
+
+    if (!m_pixelConditionsTool->hasBSError(modHash) && m_hitMaps[modHash]->GetEntries()==0) {
+      if(bec == 0) {
+	if(layer == 0)      { disablePlotBI->Fill(modEta, modPhi, -1); }
+	else if(layer == 1) { disablePlotB0->Fill(modEta, modPhi, -1); }
+	else if(layer == 2) { disablePlotB1->Fill(modEta, modPhi, -1); }
+	else if(layer == 3) { disablePlotB2->Fill(modEta, modPhi, -1); }
+      }
+      else if(bec ==  2) { disablePlotEC->Fill(layer+1,     modPhi, -1); }
+      else if(bec == -2) { disablePlotEC->Fill(-(layer+1),  modPhi, -1); }
+      else if(bec ==  4) { disablePlotDBM->Fill(layer+1,    modPhi, -1); }
+      else if(bec == -4) { disablePlotDBM->Fill(-(layer+1), modPhi, -1); }
+
+      totalDisabledModules++;
+      continue;
+    }
+    else if( m_hitMaps[modHash]->GetEntries() != 0 ) {
+      if(bec == 0) {
+	if(layer == 0)      { nhitsPlotBI->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+	else if(layer == 1) { nhitsPlotB0->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+	else if(layer == 2) { nhitsPlotB1->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+	else if(layer == 3) { nhitsPlotB2->Fill(modEta, modPhi, m_hitMaps[modHash]->GetEntries()); }
+      }
+      else if(bec ==  2) { nhitsPlotEC->Fill(layer+1,     modPhi, m_hitMaps[modHash]->GetEntries()); }
+      else if(bec == -2) { nhitsPlotEC->Fill(-(layer+1),  modPhi, m_hitMaps[modHash]->GetEntries()); }
+      else if(bec ==  4) { nhitsPlotDBM->Fill(layer+1,    modPhi, m_hitMaps[modHash]->GetEntries()); }
+      else if(bec == -4) { nhitsPlotDBM->Fill(-(layer+1), modPhi, m_hitMaps[modHash]->GetEntries()); }
+
+      modulesWithHits++;
+    }
+
+    int thisModuleCut = 0;
+    bool isIBL3D = ( bec==0 && layer==0 && (modEta <= -7 || modEta >= 6) ) ? true : false;
+
+    for(int pixel_eta=0; pixel_eta<=eta_max; pixel_eta++){
+      for(int pixel_phi=0; pixel_phi<=phi_max; pixel_phi++){
+
+        // kazuki added from here
+        int pixel_eta_on_chip = (bec==0 && layer==0) ? pixel_eta % 80 : pixel_eta % 18; // column
+        int pixel_phi_on_chip = (pixel_phi <= 163) ? pixel_phi : 327 - pixel_phi; // eta
+        if (bec == 0 && layer == 0) pixel_phi_on_chip = pixel_phi;
+        int pixelType = 0;
+
+        if (bec == 0 && layer == 0) { // ----- IBL ----- //
+          if( !isIBL3D && (pixel_eta_on_chip == 0 || pixel_eta_on_chip == 80 - 1) ){
+            pixelType = 1; // long
+          }
+          else { // pixel size = 50x250 um2
+            pixelType = 0; // normal
+          }
+        } else { // Pixel
+          if(pixel_eta_on_chip > 0 && pixel_eta_on_chip < 18 - 1){ // pixel size = 50x400 um2
+            pixelType = 0; // normal
+            for(int kk = 0; kk < 3; kk++){
+              // row 154,156,158                       = inter-ganged
+              // row 153,155,157,159,  160,161,162,163 = ganged
+              if(pixel_phi_on_chip == (153 + 2 * kk + 1)){
+                pixelType = 5; // inter-ganged (dealt as normal)
+                break;
+              }
+              if(pixel_phi_on_chip == (153 + 2 * kk) || pixel_phi_on_chip >= 159){
+                pixelType = 2; // ganged
+                break;
+              }
+            }
+          }
+          else if(pixel_eta_on_chip == 0 || pixel_eta_on_chip == 18 - 1){
+            pixelType =  1; //long
+            for(int kk = 0; kk < 3; kk++){
+              if(pixel_phi_on_chip == (153 + 2 * kk + 1)){
+                pixelType = 6; // long inter-ganged (dealt as long)
+                break;
+              }
+              if(pixel_phi_on_chip == (153 + 2 * kk) || pixel_phi_on_chip >= 159){
+                pixelType = 3; // long ganged
+                break;
+              }
+            }
+          }
+          else
+            pixelType =  8; //invalid pixel_phi/pixel_eta pair
+        }
+        // to here
+
+        std::string type;
+
+
+        switch(pixelType) {
+          case 0:
+            type = "Normal";
+            break;
+          case 1:
+            type = "Long";
+            break;
+          case 2:
+            type = "Ganged";
+            break;
+          case 3:
+            type = "Long-Ganged";
+            break;
+          case 5:
+            type = "Long-InterGanged";
+            break;
+          case 6:
+            type = "InterGanged";
+            break;
+          case 8:
+          default:
+            type = "Invalid";
+            break;
+        }
+
+        double thiscut = cut;
+        if( type == "Ganged" )                thiscut *= m_gangedPixelMultiplier;
+        else if( type == "Long" )             thiscut *= m_longPixelMultiplier;
+        else if( type == "Long-InterGanged" ) thiscut *= m_longPixelMultiplier;
+        else if( type == "Long-Ganged" )      thiscut *= m_longPixelMultiplier * m_gangedPixelMultiplier;
+
+        if( type != "Invalid" ){
+	  double occupancy = 0;
+	  if( m_nEvents != 0 ) 
+	    occupancy = static_cast<double>(m_hitMaps[modHash]->GetBinContent(pixel_eta+1, pixel_phi+1)) /
+	      static_cast<double>(m_nEvents);
+	  
+          if( occupancy < minOccupancy ) occupancy = minOccupancy;
+          globalOccupancy->Fill(log10(occupancy));
+          h_occupancy[comp]->Fill(log10(occupancy));
+          h_occupancy[type]->Fill(log10(occupancy));
+
+          if( occupancy > thiscut ) {
+            thisModuleCut++;
+
+            if( m_calculateNoiseMaps ){
+              m_noiseMaps[modHash]->Fill(pixel_eta, pixel_phi);
+              if (comp == "IBL") {
+                if(modEta >= -6 && modEta <= 5) m_overlayedIBLDCNoiseMap->Fill(pixel_eta, pixel_phi); // Planar
+                if(modEta <= -7 || modEta >= 6) m_overlayedIBLSCNoiseMap->Fill(pixel_eta, pixel_phi); // 3D
+              }
+              else m_overlayedPixelNoiseMap->Fill(pixel_eta, pixel_phi);
+            }
+          } else {
+            if(bec == 0) nhitsNoNoisePlot->Fill(modEta, modPhi, m_hitMaps[modHash]->GetBinContent(pixel_eta+1, pixel_phi+1));
+          }
+        } // end if ( type != "Invalid" )
+      } // end for loop on pixel_phi
+    } // end for loop on pixel_eta
+
+    if ( thisModuleCut > 0 ) {
+      totalDisabledPixels+=thisModuleCut;
+      maskedPlot->Fill( static_cast<double>(thisModuleCut) );
+      modulesWithDisabledPixels++;
+   
+      if(bec == 0) {
+	if(layer == 0)      { disablePlotBI->Fill(modEta, modPhi, thisModuleCut); }
+	else if(layer == 1) { disablePlotB0->Fill(modEta, modPhi, thisModuleCut); }
+	else if(layer == 2) { disablePlotB1->Fill(modEta, modPhi, thisModuleCut); }
+	else if(layer == 3) { disablePlotB2->Fill(modEta, modPhi, thisModuleCut); }
+      }
+      else if(bec ==  2) { disablePlotEC->Fill(layer+1,    modPhi, thisModuleCut); }
+      else if(bec == -2) { disablePlotEC->Fill(-(layer+1), modPhi, thisModuleCut); }
+    }
+  } // end loop in detector elements
+  
+  ATH_MSG_INFO("Modules disabled = " << totalDisabledModules);
+  ATH_MSG_INFO("Modules with hits = " << modulesWithHits);
+  ATH_MSG_INFO("Modules with disabled pixels = " << modulesWithDisabledPixels);
+  ATH_MSG_INFO("Total disabled pixels = " << totalDisabledPixels);
+
+  return StatusCode::SUCCESS;
+  
+} // end finalize
+
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixelConvert.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx
similarity index 100%
rename from InnerDetector/InDetCalibAlgs/PixelCalibAlgs/run2/src/PixelConvert.cxx
rename to InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/PixelConvert.cxx
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx
index 0c751525b68a4349ebfa0a5ed8e06b18e74d17fa..7cfcbfda49c3c197c2d11833a1179e32e49c8712 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/src/components/PixelCalibAlgs_entries.cxx
@@ -1,4 +1,6 @@
 #include "PixelCalibAlgs/PixelChargeToTConversion.h"
+#include "PixelCalibAlgs/OccupancyMapMaker.h"
 
 DECLARE_COMPONENT( PixelChargeToTConversion )
+DECLARE_COMPONENT( OccupancyMapMaker )
 
diff --git a/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h b/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h
index e0db27dac96b10b3b609564b76415351881c2663..90f6c162b9ac8ba825a771d39448021d183224eb 100644
--- a/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h
+++ b/InnerDetector/InDetConditions/InDetBeamSpotService/src/BeamCondSvc.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef InDetBeamSpotService_BEAMCOND_H
@@ -11,7 +11,7 @@
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #ifndef SIMULATIONBASE
 namespace Trk {
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
index f81a2bc64d877330f1e7cf4b0b49997ba929056a..1c9e57a5efcd18f3e36ce2a249ed4dfb855c4b0d 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt
@@ -98,8 +98,11 @@ atlas_add_test( TestSummary
                 ENVIRONMENT THREADS=5 )
 atlas_add_test( TestTdaqEnabled
                 SCRIPT athena.py --threads=5 SCT_ConditionsAlgorithms/testTdaqEnabled.py
-                PROPERTIES TIMEOUT 720
+                PROPERTIES TIMEOUT 600
                 ENVIRONMENT THREADS=5 )
+atlas_add_test( TestDCSConditionsNewConf
+                SCRIPT python -m SCT_ConditionsAlgorithms.SCT_DCSConditionsTestAlgConfig
+                PROPERTIES TIMEOUT 600 )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..3cb842621dd59bdfcbab2de9f17e3a6da9da6c4e
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_DCSConditionsTestAlgConfig.py
@@ -0,0 +1,45 @@
+"""Define method to configure and test SCT_DCSConditionsTestAlg
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+def SCT_DCSConditionsTestAlgCfg(flags, name="SCT_DCSConditionsTestAlg", **kwargs):
+    """Return a configured SCT_DCSConditionsTestAlg"""
+    acc = ComponentAccumulator()
+    from SCT_ConditionsTools.SCT_DCSConditionsConfig import SCT_DCSConditionsCfg
+    kwargs.setdefault("SCT_DCSConditionsTool", acc.popToolsAndMerge(SCT_DCSConditionsCfg(flags)))
+    acc.addEventAlgo(CompFactory.SCT_DCSConditionsTestAlg(**kwargs))
+    return acc
+
+if __name__=="__main__":
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import INFO
+    log.setLevel(INFO)
+
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+    
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    ConfigFlags.Input.isMC = False
+    ConfigFlags.Input.ProjectName = "data17_13TeV"
+    ConfigFlags.Input.RunNumber = [310809]
+    ConfigFlags.addFlag("Input.InitialTimeStamp", 1476741326) # LB 18 of run 310809, 10/17/2016 @ 9:55pm (UTC)
+    ConfigFlags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2017-06"
+    ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2015-03-01-00"
+    ConfigFlags.Detector.GeometrySCT = True
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    cfg = MainServicesCfg(ConfigFlags)
+
+    from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+    cfg.merge(GeoModelCfg(ConfigFlags))
+
+    from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
+    cfg.merge(McEventSelectorCfg(ConfigFlags))
+
+    cfg.merge(SCT_DCSConditionsTestAlgCfg(ConfigFlags))
+
+    cfg.run(maxEvents=20)
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
index 7afdee9b19bec47e3939a306774edb1e1e907344..db384aa64ddcbb4ffb1330cefa31827cb5ef1a01 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/CMakeLists.txt
@@ -44,6 +44,10 @@ atlas_add_test( TestSCTLorentzAngle
                 PROPERTIES TIMEOUT 300
                 ENVIRONMENT THREADS=5 )
 
+atlas_add_test( TestSCTLorentzAngleNewConf
+                SCRIPT python -m SiLorentzAngleTool.SCTSiLorentzAngleTestAlgConfig
+                PROPERTIES TIMEOUT 300 )
+
 atlas_add_test( SiLorentzAngleConfig_test
                 SCRIPT test/SiLorentzAngleConfig_test.py
                 PROPERTIES TIMEOUT 30 )
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..89d6edef896f4cf5bd2eda8ac1118422f0deb3a7
--- /dev/null
+++ b/InnerDetector/InDetConditions/SiLorentzAngleTool/python/SCTSiLorentzAngleTestAlgConfig.py
@@ -0,0 +1,46 @@
+"""Define method to configure and test SCTSiLorentzAngleTestAlg
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+def SCTSiLorentzAngleTestAlgCfg(flags, name="SCTSiLorentzAngleTestAlg", **kwargs):
+    """Return a configured SCTSiLorentzAngleTestAlg"""
+    acc = ComponentAccumulator()
+    from SiLorentzAngleTool.SCT_LorentzAngleConfig import SCT_LorentzAngleCfg
+    kwargs.setdefault("SCTLorentzAngleTool", acc.popToolsAndMerge(SCT_LorentzAngleCfg(flags)))
+    acc.addEventAlgo(CompFactory.SCTSiLorentzAngleTestAlg(**kwargs))
+    return acc
+
+if __name__=="__main__":
+    from AthenaCommon.Logging import log
+    from AthenaCommon.Constants import INFO
+    log.setLevel(INFO)
+
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    ConfigFlags.Input.isMC = True
+    ConfigFlags.Input.ProjectName = "mc16_13TeV"
+    ConfigFlags.Input.RunNumber = [300000] # MC16c 2017 run number
+    ConfigFlags.addFlag("Input.InitialTimeStamp", 1500000000) # MC16c 2017 time stamp
+    ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-18"
+    ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2015-03-01-00"
+    ConfigFlags.Detector.GeometrySCT = True
+    ConfigFlags.lock()
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    cfg = MainServicesCfg(ConfigFlags)
+
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    cfg.merge(SCT_GeometryCfg(ConfigFlags))
+
+    from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
+    cfg.merge(McEventSelectorCfg(ConfigFlags))
+
+    cfg.merge(SCTSiLorentzAngleTestAlgCfg(ConfigFlags))
+
+    cfg.run(maxEvents=20)
+                                                                                                                                
diff --git a/InnerDetector/InDetConfig/python/ClusterizationConfig.py b/InnerDetector/InDetConfig/python/ClusterizationConfig.py
index bdc5672a1c0e12396aa7af1bbeb893b257654bed..80d683ef1860272bb46593b0573be13432e6979b 100644
--- a/InnerDetector/InDetConfig/python/ClusterizationConfig.py
+++ b/InnerDetector/InDetConfig/python/ClusterizationConfig.py
@@ -76,12 +76,10 @@ if __name__ == "__main__":
 
     acc = InDetClusterizationAlgorithmsCfg(ConfigFlags)
     top_acc.merge(acc)
-    # import pdb ; pdb.set_trace()
+
     iovsvc = top_acc.getService('IOVDbSvc')
     iovsvc.OutputLevel=5
-    ##acc.setAppProperty("EvtMax",25)
-    ##acc.store(open("test_SiClusterization.pkl", "w"))
+
+    top_acc.printConfig()
     top_acc.run(25)
-    #with open('test4.pkl', mode="wb") as f:
-    #   dill.dump(acc, f)
-    top_acc.store(open("test00.pkl", "wb"))
+    top_acc.store(open("test_Clusterization.pkl", "wb"))
diff --git a/InnerDetector/InDetConfig/python/TRTPhaseConfig.py b/InnerDetector/InDetConfig/python/TRTPhaseConfig.py
index 5ad1858931d1417d666c30667647e95a37716e57..b904fe576ca16b11d7aff60368b308258219a590 100644
--- a/InnerDetector/InDetConfig/python/TRTPhaseConfig.py
+++ b/InnerDetector/InDetConfig/python/TRTPhaseConfig.py
@@ -2,6 +2,18 @@
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory     import CompFactory
 
+def TRTPhaseCondCfg(flags, name = "TRTPhaseCondAlg", **kwargs):
+    acc = ComponentAccumulator()
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
+    kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
+    # Average T0 CondAlg
+    TRTPhaseCondAlg = CompFactory.TRTPhaseCondAlg(name = name, **kwargs)
+    acc.addCondAlgo(TRTPhaseCondAlg)
+    return acc
+
 def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool',**kwargs) :
     acc = ComponentAccumulator()
 
@@ -36,7 +48,10 @@ def InDetCosmicsEventPhaseToolCfg(flags, name='InDetCosmicsEventPhaseTool', **kw
     else:
         kwargs.setdefault("GlobalOffset", -3.125)
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     kwargs.setdefault("UseNewEP", True)
     kwargs.setdefault("TRTCalDbTool", InDetTRTCalDbTool)
 
@@ -56,7 +71,10 @@ def InDetFixedWindowTrackTimeToolCfg(flags, name='InDetFixedWindowTrackTimeTool'
     else:
         kwargs.setdefault("GlobalOffset", -3.125)
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     cutWindowCenter  = -8.5
     cutWindowSize    = 7
     kwargs.setdefault("UseNewEP"     , True)
@@ -81,7 +99,10 @@ def InDetSlidingWindowTrackTimeToolCfg(flags, name='InDetSlidingWindowTrackTimeT
     else:
         kwargs.setdefault("GlobalOffset", -3.125)
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     numberIterations = 5
     cutWindowSize    = 7
     kwargs.setdefault("UseNewEP"         , True)
@@ -111,7 +132,10 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
     acc.addPublicTool(InDetTrackSummaryTool)
 
     # CalDb tool
-    InDetTRTCalDbTool = CompFactory.TRT_CalDbTool(name = "TRT_CalDbTool")
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+    InDetTRTCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
+    acc.addPublicTool(InDetTRTCalDbTool)
+
     kwargs.setdefault("InputTracksNames" , InputTrackCollections)
     kwargs.setdefault("TrackSummaryTool" , InDetTrackSummaryTool)
     kwargs.setdefault("TRTCalDbTool"     , InDetTRTCalDbTool)
@@ -123,7 +147,6 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
 
     acc.addEventAlgo(CompFactory.InDet.InDetCosmicsEventPhase(name = name, **kwargs))
     return acc
-
 # --------------------------------------------------------------------------------
 #
 # --- TRT phase calculation
@@ -132,6 +155,7 @@ def InDetCosmicsEventPhaseCfg(flags, InputTrackCollections, name = 'InDetCosmics
 def TRTPhaseCfg(flags, self, InputTrackCollections = [], **kwargs):
     acc = ComponentAccumulator()
     if flags.InDet.doPRDFormation and flags.Detector.RecoTRT:
+        acc.merge(TRTPhaseCondCfg(flags))
         #    
         # --- calculation of the event phase from all 3 input collections
         #
diff --git a/InnerDetector/InDetConfig/python/TRTPreProcessing.py b/InnerDetector/InDetConfig/python/TRTPreProcessing.py
index d5546a36f0849d3a5ad81de48a274586e96af51e..38f100e267d6991c2f7fdb2a847b5532ddbcc371 100644
--- a/InnerDetector/InDetConfig/python/TRTPreProcessing.py
+++ b/InnerDetector/InDetConfig/python/TRTPreProcessing.py
@@ -82,12 +82,11 @@ def InDetTRT_DriftFunctionToolCfg(flags, useTimeInfo, usePhase, name = "InDetTRT
                             -0.328962, -0.403399, -0.663656, -1.029428, -1.46008, -1.919092, -2.151582, -2.285481, -2.036822, -2.15805])
                     
     # Second calibration DB Service in case pile-up and physics hits have different calibrations
-    if ConfigFlags.Detector.RecoTRT:
-        TRT_CalDbTool = CompFactory.TRT_CalDbTool
-        InDetTRTCalDbTool2 = TRT_CalDbTool(	name="TRT_CalDbTool2",
-                                            RtFolderName="/TRT/Calib/MC/RT",
-                                            T0FolderName="/TRT/Calib/MC/T0")
+    if flags.Detector.RecoTRT:
+        from InDetOverlay.TRT_ConditionsConfig import TRT_CalDbToolCfg
+        InDetTRTCalDbTool2 = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
         acc.addPublicTool(InDetTRTCalDbTool2)
+
         kwargs.setdefault("TRTCalDbTool2", InDetTRTCalDbTool2)
         kwargs.setdefault("IsOverlay", True)
         kwargs.setdefault("IsMC", False)
@@ -209,6 +208,10 @@ def InDetTRT_RIO_MakerCfg(flags, useTimeInfo, usePhase, prefix, collection, name
     #
     InDetTRT_DriftCircleTool = acc.popToolsAndMerge(TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTRT_DriftCircleTool"))
     acc.addPublicTool(InDetTRT_DriftCircleTool)
+
+    # Region selector tools for TRT
+    from RegionSelector.RegSelToolConfig import regSelTool_TRT_Cfg
+    RegSelTool_TRT = acc.popToolsAndMerge(regSelTool_TRT_Cfg(flags))
     #
     # --- TRT_RIO_Maker Algorithm
     #
@@ -216,6 +219,7 @@ def InDetTRT_RIO_MakerCfg(flags, useTimeInfo, usePhase, prefix, collection, name
     kwargs.setdefault("TrtDescrManageLocation", 'TRT')
     kwargs.setdefault("TRTRDOLocation", 'TRT_RDOs')
     kwargs.setdefault("TRTRIOLocation", collection)
+    kwargs.setdefault("RegSelTool", RegSelTool_TRT)
 
     acc.addEventAlgo(CompFactory.InDet.TRT_RIO_Maker(name, **kwargs))
     return acc
@@ -227,6 +231,10 @@ def InDetTRT_RIO_MakerPUCfg(flags, useTimeInfo, usePhase, prefix, collectionPU,
     #
     InDetTRT_DriftCircleTool = acc.popToolsAndMerge(TRT_DriftCircleToolCfg(flags, useTimeInfo, usePhase, prefix, name = "InDetTRT_DriftCircleTool"))
     acc.addPublicTool(InDetTRT_DriftCircleTool)
+
+    # Region selector tools for TRT
+    from RegionSelector.RegSelToolConfig import regSelTool_TRT_Cfg
+    RegSelTool_TRT = acc.popToolsAndMerge(regSelTool_TRT_Cfg(flags))
     #
     # --- TRT_RIO_Maker Algorithm
     #
@@ -234,6 +242,7 @@ def InDetTRT_RIO_MakerPUCfg(flags, useTimeInfo, usePhase, prefix, collectionPU,
     kwargs.setdefault("TrtDescrManageLocation", 'TRT')
     kwargs.setdefault("TRTRDOLocation", 'TRT_PU_RDOs')
     kwargs.setdefault("TRTRIOLocation", collectionPU)
+    kwargs.setdefault("RegSelTool", RegSelTool_TRT)
 
     acc.addEventAlgo(CompFactory.InDet.TRT_RIO_Maker(name, **kwargs))
     return acc
@@ -242,6 +251,13 @@ def InDetTRT_RIO_MakerPUCfg(flags, useTimeInfo, usePhase, prefix, collectionPU,
 def TRTPreProcessingCfg(flags, useTimeInfo = True, usePhase = False, **kwargs):
     acc = ComponentAccumulator()
 
+    from PixelConditionsAlgorithms.PixelConditionsConfig import (PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg, PixelCablingCondAlgCfg, PixelReadoutSpeedAlgCfg)
+
+    acc.merge(PixelChargeCalibCondAlgCfg(flags))
+    acc.merge(PixelConfigCondAlgCfg(flags))
+    acc.merge(PixelCablingCondAlgCfg(flags))
+    acc.merge(PixelReadoutSpeedAlgCfg(flags))
+
     if flags.InDet.doPRDFormation and flags.InDet.doTRT_PRDFormation:
         #
         # --- setup naming of tools and algs
@@ -306,6 +322,11 @@ if __name__ == "__main__":
     msgService = top_acc.getService('MessageSvc')
     msgService.Format = "S:%s E:%e % F%138W%S%7W%R%T  %0W%M"
 
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    top_acc.merge( PixelGeometryCfg(ConfigFlags) )
+    top_acc.merge( SCT_GeometryCfg(ConfigFlags) )
+
     if not ConfigFlags.InDet.doDBMstandalone:
         top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False))
     
diff --git a/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py b/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..b48fcaad1bcff1700db811272f33f6fd080dfc25
--- /dev/null
+++ b/InnerDetector/InDetConfig/python/TRTSegmentFindingConfig.py
@@ -0,0 +1,277 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+import InDetConfig.TrackingCommonConfig as TC
+
+def TRT_TrackSegmentsMaker_BarrelCosmicsCfg(flags, name='InDetTRTSegmentsMaker', **kwargs) :
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("TrtManagerLocation", 'TRT') # InDetKeys.TRT_Manager
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCirclesUncalibrated') # InDetKeys.TRT_DriftCirclesUncalibrated
+    kwargs.setdefault("IsMagneticFieldOn", flags.BField.solenoidOn)
+
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackSegmentsMaker_BarrelCosmics(name = name, **kwargs))
+    return acc
+
+def TRT_TrackSegmentsMaker_ATLxkCfg(flags, name = 'InDetTRT_SeedsMaker', extension = '', TrackingCuts = None, InputCollections = None, **kwargs):
+    acc = ComponentAccumulator()
+    #
+    # --- decide if use the association tool
+    #
+    usePrdAssociationTool = len(InputCollections) > 0
+
+    #
+    # --- get list of already associated hits (always do this, even if no other tracking ran before)
+    #
+    prefix = 'InDetSegment'
+    suffix = extension
+    #
+    # --- cut values
+    #
+    if extension == "_TRT":
+        # TRT Subdetector segment finding
+        MinNumberDCs   = TrackingCuts.minTRTonly
+        pTmin          = TrackingCuts.minPT
+        sharedFrac     = TrackingCuts.maxTRTonlyShared
+    else:
+        # TRT-only/back-tracking segment finding
+        MinNumberDCs   = TrackingCuts.minSecondaryTRTonTrk
+        pTmin          = TrackingCuts.minSecondaryPt
+        sharedFrac     = TrackingCuts.maxSecondaryTRTShared
+    #
+    # --- offline version  of TRT segemnt making
+    #
+    InDetPatternPropagator = TC.InDetPatternPropagatorCfg()
+    acc.addPublicTool(InDetPatternPropagator)
+
+    InDetTRTExtensionTool = acc.popToolsAndMerge(TC.InDetTRT_ExtensionToolCfg(flags, TrackingCuts = TrackingCuts))
+    acc.addPublicTool(InDetTRTExtensionTool)
+
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles
+    kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+    kwargs.setdefault("TrackExtensionTool", InDetTRTExtensionTool)
+    kwargs.setdefault("PRDtoTrackMap", prefix+'PRDtoTrackMap'+suffix if usePrdAssociationTool else '')
+    kwargs.setdefault("RemoveNoiseDriftCircles", flags.InDet.removeTRTNoise)
+    kwargs.setdefault("MinNumberDriftCircles", MinNumberDCs)
+    kwargs.setdefault("NumberMomentumChannel", TrackingCuts.TRTSegFinderPtBins)
+    kwargs.setdefault("pTmin", pTmin)
+    kwargs.setdefault("sharedFrac", sharedFrac)
+
+    InDetTRT_TrackSegmentsMaker = CompFactory.InDet.TRT_TrackSegmentsMaker_ATLxk(name = name, **kwargs)
+    acc.setPrivateTools(InDetTRT_TrackSegmentsMaker)
+    return acc
+
+def TRT_TrackSegmentsMakerCondAlg_ATLxkCfg(name = 'InDetTRT_SeedsMakerCondAlg', extension = '', TrackingCuts = None, **kwargs):
+    acc = ComponentAccumulator()
+    #
+    # --- cut values
+    #
+    if extension == "_TRT":
+        # TRT Subdetector segment finding
+        pTmin = TrackingCuts.minPT
+    else:
+        # TRT-only/back-tracking segment finding
+        pTmin = TrackingCuts.minSecondaryPt
+
+    InDetPatternPropagator = TC.InDetPatternPropagatorCfg()
+    acc.addPublicTool(InDetPatternPropagator)
+
+    kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+    kwargs.setdefault("NumberMomentumChannel", TrackingCuts.TRTSegFinderPtBins)
+    kwargs.setdefault("pTmin", pTmin)
+
+    InDetTRT_TrackSegmentsMakerCondAlg = CompFactory.InDet.TRT_TrackSegmentsMakerCondAlg_ATLxk(name = name, **kwargs)
+    acc.addCondAlgo(InDetTRT_TrackSegmentsMakerCondAlg)
+    return acc
+
+def TRT_TrackSegmentsFinderCfg(flags, name = 'InDetTRT_TrackSegmentsFinderPhase', extension = '', TrackingCuts = None, BarrelSegments = None, InputCollections =None, doPhase = False, **kwargs):
+    acc = ComponentAccumulator()
+
+    # ---------------------------------------------------------------
+    #
+    # --- now the main steering of the TRT segments finding
+    #
+    # ---------------------------------------------------------------
+    if flags.Beam.Type == "cosmics":
+        #
+        # --- cosmics barrel segments (use TRT track segements even for NewT) 
+        #
+        if doPhase:
+            InDetTRT_TrackSegmentsMakerPhase = acc.popToolsAndMerge(TRT_TrackSegmentsMaker_BarrelCosmicsCfg(flags, name='InDetTRTSegmentsMakerPhase'+extension))
+            acc.addPublicTool(InDetTRT_TrackSegmentsMakerPhase)
+
+            kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMakerPhase)
+            kwargs.setdefault("SegmentsLocation", BarrelSegments)
+        else:
+            InDetTRT_TrackSegmentsMaker = acc.popToolsAndMerge(TRT_TrackSegmentsMaker_BarrelCosmicsCfg(flags, name='InDetTRTSegmentsMaker'+extension,
+                                                                                                              TRT_ClustersContainer = 'TRT_DriftCircles')) # InDetKeys.TRT_DriftCircles
+            acc.addPublicTool(InDetTRT_TrackSegmentsMaker)
+
+            if flags.InDet.doCaloSeededTRTSegments or TrackingCuts.RoISeededBackTracking:
+                kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMaker)
+                kwargs.setdefault("SegmentsLocation", BarrelSegments)
+                kwargs.setdefault("useCaloSeeds", True)
+                kwargs.setdefault("InputClusterContainerName", 'InDetCaloClusterROIs') # InDetKeys.CaloClusterROIContainer
+            else:
+                kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMaker)
+                kwargs.setdefault("SegmentsLocation", BarrelSegments)
+                kwargs.setdefault("InputClusterContainerName", "")
+    else:
+        #
+        # --- offline version  of TRT segemnt making
+        #
+        InDetTRT_TrackSegmentsMaker = acc.popToolsAndMerge(TRT_TrackSegmentsMaker_ATLxkCfg( flags, 
+                                                                                            name = 'InDetTRT_SeedsMaker'+extension, 
+                                                                                            extension = extension,
+                                                                                            TrackingCuts = TrackingCuts,
+                                                                                            InputCollections = InputCollections))
+        acc.addPublicTool(InDetTRT_TrackSegmentsMaker)
+        kwargs.setdefault("SegmentsMakerTool", InDetTRT_TrackSegmentsMaker)
+
+        acc.merge(TRT_TrackSegmentsMakerCondAlg_ATLxkCfg(name = 'InDetTRT_SeedsMakerCondAlg'+ extension, 
+                                                         extension = extension,
+                                                         TrackingCuts=TrackingCuts))
+
+    acc.addEventAlgo(CompFactory.InDet.TRT_TrackSegmentsFinder( name = name, **kwargs))
+    return acc
+
+def SegmentDriftCircleAssValidationCfg(flags, name="InDetSegmentDriftCircleAssValidation", extension='', TrackingCuts=None, BarrelSegments='', **kwargs):
+    acc = ComponentAccumulator()
+    #
+    # --- cut values
+    #
+    if extension == "_TRT":
+        # TRT Subdetector segment finding
+        MinNumberDCs = TrackingCuts.minTRTonly
+        pTmin        = TrackingCuts.minPT
+    else:
+        # TRT-only/back-tracking segment finding
+        MinNumberDCs = TrackingCuts.minSecondaryTRTonTrk
+        pTmin        = TrackingCuts.minSecondaryPt
+
+    #kwargs.setdefault("OrigTracksLocation", BarrelSegments)
+    kwargs.setdefault("TRT_DriftCirclesName", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles
+    kwargs.setdefault("pTmin", pTmin)
+    kwargs.setdefault("Pseudorapidity", 2.1) # end of TRT
+    kwargs.setdefault("RadiusMin", 0.)
+    kwargs.setdefault("RadiusMax", 600.)
+    kwargs.setdefault("MinNumberDCs", MinNumberDCs)
+
+    InDetSegmentDriftCircleAssValidation = CompFactory.InDet.SegmentDriftCircleAssValidation(name = name, **kwargs)
+    acc.addEventAlgo(InDetSegmentDriftCircleAssValidation)
+    return acc
+
+def TRTActiveCondAlgCfg(flags, name="TRTActiveCondAlg", **kwargs):
+    acc = ComponentAccumulator()
+
+    InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(TC.InDetTRTStrawStatusSummaryToolCfg(flags))
+    acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
+
+    kwargs.setdefault("TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool)
+
+    TRTActiveCondAlg = CompFactory.TRTActiveCondAlg(name = name, **kwargs)
+    acc.addCondAlgo(TRTActiveCondAlg)
+    return acc
+
+def TRTSegmentFindingCfg(flags, extension = "", InputCollections = None, NewTrackingCuts = None, BarrelSegments = None, doPhase = False):
+    acc = ComponentAccumulator()
+    #
+    # --- decide if use the association tool
+    #
+    usePrdAssociationTool = len(InputCollections) > 0
+
+    #
+    # --- get list of already associated hits (always do this, even if no other tracking ran before)
+    #
+    prefix = 'InDetSegment'
+    suffix = extension
+    if usePrdAssociationTool:
+        acc.merge(TC.InDetTrackPRD_AssociationCfg(flags, namePrefix = prefix,
+                                                         nameSuffix = suffix,
+                                                         TracksName = list(InputCollections)))
+    #
+    # --- TRT track reconstruction
+    #
+    acc.merge(TRT_TrackSegmentsFinderCfg( flags,
+                                          name = 'InDetTRT_TrackSegmentsFinderPhase'+extension,
+                                          extension =extension,
+                                          TrackingCuts = NewTrackingCuts,
+                                          BarrelSegments=BarrelSegments,
+                                          InputCollections = InputCollections,
+                                          doPhase = doPhase))
+    #
+    # --- load TRT validation alg
+    #
+    
+    if flags.InDet.doTruth and not flags.Beam.Type == "cosmics":
+        acc.merge(SegmentDriftCircleAssValidationCfg(flags,
+                                                    name="InDetSegmentDriftCircleAssValidation"+extension,
+                                                    TrackingCuts = NewTrackingCuts,
+                                                    BarrelSegments=BarrelSegments))
+    
+    return acc
+
+
+if __name__ == "__main__":
+    from AthenaCommon.Configurable import Configurable
+    Configurable.configurableRun3Behavior=1
+
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
+    ConfigFlags.Input.Files=defaultTestFiles.RDO
+
+    ConfigFlags.Detector.RecoTRT = True
+    ConfigFlags.Detector.RecoIBL = True
+
+    numThreads=1
+    ConfigFlags.Concurrency.NumThreads=numThreads
+    ConfigFlags.Concurrency.NumConcurrentEvents=numThreads # Might change this later, but good enough for the moment.
+
+    ConfigFlags.lock()
+    ConfigFlags.dump()
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    top_acc = MainServicesCfg(ConfigFlags)
+
+    msgService = top_acc.getService('MessageSvc')
+    msgService.Format = "S:%s E:%e % F%138W%S%7W%R%T  %0W%M"
+    
+    from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
+    top_acc.merge(PoolReadCfg(ConfigFlags))
+
+    from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
+    top_acc.merge(MagneticFieldSvcCfg(ConfigFlags))
+
+    from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
+    top_acc.merge(TRT_GeometryCfg( ConfigFlags ))
+
+    from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    top_acc.merge( PixelGeometryCfg(ConfigFlags) )
+    top_acc.merge( SCT_GeometryCfg(ConfigFlags) )
+
+    # NewTracking collection keys
+    InputCombinedInDetTracks = []
+
+    InDetNewTrackingCuts = ConfigFlags.InDet.Tracking
+    #############################################################################
+    top_acc.merge(TRTActiveCondAlgCfg(ConfigFlags))
+    top_acc.merge(TC.TRT_DetElementsRoadCondAlgCfg())
+
+    from InDetConfig.TRTPreProcessing import TRTPreProcessingCfg
+    if not ConfigFlags.InDet.doDBMstandalone:
+        top_acc.merge(TRTPreProcessingCfg(ConfigFlags,(not ConfigFlags.InDet.doTRTPhaseCalculation or ConfigFlags.Beam.Type =="collisions"),False))
+
+    top_acc.merge(TRTSegmentFindingCfg( ConfigFlags,
+                                        "",
+                                        InputCombinedInDetTracks,
+                                        InDetNewTrackingCuts,
+                                        'TRTSegments')) # InDetKeys.TRT_Segments
+    #############################################################################
+
+    iovsvc = top_acc.getService('IOVDbSvc')
+    iovsvc.OutputLevel=5
+    top_acc.getService('StoreGateSvc').Dump = True
+    top_acc.printConfig(withDetails = True, summariseProps = True)
+    top_acc.run(25)
+    top_acc.store(open("test_TRTSegmentFinding.pkl", "wb"))
\ No newline at end of file
diff --git a/InnerDetector/InDetConfig/python/TrackRecoConfig.py b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
index 1d4e35f410c176531a2f8b4ee5c9344123512d5f..0291fe7b237205681bd8934e924e86384e9424a6 100644
--- a/InnerDetector/InDetConfig/python/TrackRecoConfig.py
+++ b/InnerDetector/InDetConfig/python/TrackRecoConfig.py
@@ -4,15 +4,15 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
 ##------------------------------------------------------------------------------
-def BCM_ZeroSuppressionCfg(flags, **kwargs):
+def BCM_ZeroSuppressionCfg(flags, name="InDetBCM_ZeroSuppression", **kwargs):
     acc = ComponentAccumulator()
     kwargs.setdefault("BcmContainerName", "BCM_RDOs")
-    algo = CompFactory.BCM_ZeroSuppression("InDetBCM_ZeroSuppression", **kwargs)
+    algo = CompFactory.BCM_ZeroSuppression(name=name, **kwargs)
     acc.addEventAlgo(algo, primary = True)
     return acc
 
 ##------------------------------------------------------------------------------
-def PixelClusterizationCfg(flags, **kwargs) :
+def PixelClusterizationCfg(flags, name = "InDetPixelClusterization", **kwargs) :
     acc = ComponentAccumulator()
     sub_acc = MergedPixelsToolCfg(flags, **kwargs)
     merged_pixels_tool = sub_acc.getPrimary()
@@ -21,24 +21,29 @@ def PixelClusterizationCfg(flags, **kwargs) :
     ambi_finder=sub_acc.getPrimary()
     acc.merge(sub_acc)
 
-    acc.addEventAlgo( CompFactory.InDet.PixelClusterization(   name         = "InDetPixelClusterization",
-                                                    clusteringTool          = merged_pixels_tool,
-                                                    gangedAmbiguitiesFinder = ambi_finder,
-                                                    DataObjectName          = "PixelRDOs",
-                                                    ClustersName            = "PixelClusters" ))
+    # Region selector tools for Pixel
+    from RegionSelector.RegSelToolConfig import regSelTool_Pixel_Cfg
+    RegSelTool_Pixel = acc.popToolsAndMerge(regSelTool_Pixel_Cfg(flags))
+
+    kwargs.setdefault("clusteringTool", merged_pixels_tool)
+    kwargs.setdefault("gangedAmbiguitiesFinder", ambi_finder)
+    kwargs.setdefault("DataObjectName", "PixelRDOs")
+    kwargs.setdefault("ClustersName", "PixelClusters")
+    kwargs.setdefault("RegSelTool", RegSelTool_Pixel)
+
+    acc.addEventAlgo(CompFactory.InDet.PixelClusterization(name=name, **kwargs))
     return acc
 ##------------------------------------------------------------------------------
-def PixelClusterizationPUCfg(flags, **kwargs) :
-    kwargs.setdefault("name", "InDetPixelClusterizationPU")
+def PixelClusterizationPUCfg(flags, name="InDetPixelClusterizationPU", **kwargs) :
     kwargs.setdefault("DataObjectName", "Pixel_PU_RDOs")
     kwargs.setdefault("ClustersName", "PixelPUClusters")
     kwargs.setdefault("AmbiguitiesMap", "PixelClusterAmbiguitiesMapPU")
-    return PixelClusterizationCfg(flags, **kwargs)
+    return PixelClusterizationCfg(flags, name=name, **kwargs)
 
 ##------------------------------------------------------------------------------
 ##------------------------------------------------------------------------------
 
-def SCTClusterizationCfg(flags, **kwargs) :
+def SCTClusterizationCfg(flags, name="InDetSCT_Clusterization", **kwargs) :
     acc = ComponentAccumulator()
 
     # Need to get SCT_ConditionsSummaryTool for e.g. SCT_ClusteringTool
@@ -49,33 +54,32 @@ def SCTClusterizationCfg(flags, **kwargs) :
     accbuf = ClusterMakerToolCfg(flags)
     InDetClusterMakerTool = accbuf.getPrimary()
     acc.merge(accbuf)
-    InDetSCT_ClusteringTool = CompFactory.InDet.SCT_ClusteringTool(    name              = "InDetSCT_ClusteringTool",
-                                                            globalPosAlg     = InDetClusterMakerTool,
-                                                            conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged)
+    InDetSCT_ClusteringTool = CompFactory.InDet.SCT_ClusteringTool( name           = "InDetSCT_ClusteringTool",
+                                                                    globalPosAlg   = InDetClusterMakerTool,
+                                                                    conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged)
     if flags.InDet.selectSCTIntimeHits :
        if flags.InDet.InDet25nsec : 
           InDetSCT_ClusteringTool.timeBins = "01X" 
        else: 
           InDetSCT_ClusteringTool.timeBins = "X1X" 
 
-    acc.addEventAlgo( CompFactory.InDet.SCT_Clusterization(    name                    = "InDetSCT_Clusterization",
-                                                    clusteringTool          = InDetSCT_ClusteringTool,
-                                                    DataObjectName          = 'SCT_RDOs', ##InDetKeys.SCT_RDOs(),
-                                                    ClustersName            = 'SCT_Clusters', ##InDetKeys.SCT_Clusters(),
-                                                    conditionsTool          = InDetSCT_ConditionsSummaryToolWithoutFlagged  ) )
+    kwargs.setdefault("clusteringTool", InDetSCT_ClusteringTool)
+    kwargs.setdefault("DataObjectName", 'SCT_RDOs') ##InDetKeys.SCT_RDOs()
+    kwargs.setdefault("ClustersName", 'SCT_Clusters') ##InDetKeys.SCT_Clusters()
+    kwargs.setdefault("conditionsTool", InDetSCT_ConditionsSummaryToolWithoutFlagged)
 
-    return acc
+    acc.addEventAlgo( CompFactory.InDet.SCT_Clusterization(name=name, **kwargs))
 
+    return acc
 
 ##------------------------------------------------------------------------------
 ##------------------------------------------------------------------------------
 ##------------------------------------------------------------------------------
 
-def SCTClusterizationPUCfg(flags, **kwargs) :
-    kwargs.setdefault("name", "InDetSCT_ClusterizationPU")
+def SCTClusterizationPUCfg(flags, name="InDetSCT_ClusterizationPU", **kwargs) :
     kwargs.setdefault("DataObjectName", "SCT_PU_RDOs" )   #flags.InDetKeys.SCT_PU_RDOs
-    kwargs.setdefault("ClustersName", "SCT_PU_Clusters") #flags.InDetKeys.SCT_PU_Clusters
-    return SCTClusterizationCfg(flags, **kwargs)
+    kwargs.setdefault("ClustersName", "SCT_PU_Clusters")  #flags.InDetKeys.SCT_PU_Clusters
+    return SCTClusterizationCfg(flags, name=name, **kwargs)
 
 ##------------------------------------------------------------------------------
 def PixelGangedAmbiguitiesFinderCfg(flags) :
@@ -84,7 +88,6 @@ def PixelGangedAmbiguitiesFinderCfg(flags) :
     acc.addPublicTool( InDetPixelGangedAmbiguitiesFinder, primary=True)
     return acc
 
-
 ##------------------------------------------------------------------------------
 def MergedPixelsToolCfg(flags, **kwargs) :
       acc = ComponentAccumulator()
@@ -109,9 +112,11 @@ def MergedPixelsToolCfg(flags, **kwargs) :
      
       acc.addPublicTool(InDetMergedPixelsTool, primary=True)
       return acc
+
 ##------------------------------------------------------------------------------
-def ClusterMakerToolCfg(flags, **kwargs) :
-    from PixelConditionsAlgorithms.PixelConditionsConfig import PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg
+def ClusterMakerToolCfg(flags, name="InDetClusterMakerTool", **kwargs) :
+    from PixelConditionsAlgorithms.PixelConditionsConfig import (PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg,
+                                                                 PixelOfflineCalibCondAlgCfg, PixelCablingCondAlgCfg, PixelReadoutSpeedAlgCfg)
 
     acc = ComponentAccumulator()
     # This directly needs the following Conditions data:
@@ -119,7 +124,11 @@ def ClusterMakerToolCfg(flags, **kwargs) :
     acc.merge( PixelChargeCalibCondAlgCfg(flags))
     acc.merge( PixelConfigCondAlgCfg(flags))
 
-    InDetClusterMakerTool = CompFactory.InDet.ClusterMakerTool(name = "InDetClusterMakerTool", **kwargs)
+    acc.merge(PixelOfflineCalibCondAlgCfg(flags))
+    acc.merge(PixelCablingCondAlgCfg(flags))
+    acc.merge(PixelReadoutSpeedAlgCfg(flags))
+
+    InDetClusterMakerTool = CompFactory.InDet.ClusterMakerTool(name = name, **kwargs)
 
     from SiLorentzAngleTool.SCT_LorentzAngleConfig import SCT_LorentzAngleCfg
     SCTLorentzAngleTool = acc.popToolsAndMerge( SCT_LorentzAngleCfg(flags) )    
diff --git a/InnerDetector/InDetConfig/python/TrackingCommonConfig.py b/InnerDetector/InDetConfig/python/TrackingCommonConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..62b03f5a367931676b05e6de731d59783148f2a1
--- /dev/null
+++ b/InnerDetector/InDetConfig/python/TrackingCommonConfig.py
@@ -0,0 +1,820 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory     import CompFactory
+from IOVDbSvc.IOVDbSvcConfig                  import addFoldersSplitOnline
+from InDetConfig.InDetRecToolConfig           import makeName
+#######################################################################
+
+def copyArgs(kwargs, copy_list):
+    dict_copy={}
+    for elm in copy_list :
+        if elm in kwargs :
+            dict_copy[elm]=kwargs[elm]
+    return dict_copy
+
+def NeuralNetworkToHistoToolCfg(**kwargs):
+    acc = ComponentAccumulator()
+    name = kwargs.pop('name',"NeuralNetworkToHistoTool")
+
+    NeuralNetworkToHistoTool=CompFactory.Trk.NeuralNetworkToHistoTool(name, **kwargs)
+    acc.setPrivateTools(NeuralNetworkToHistoTool)
+    return acc
+
+def PixelClusterNnCondAlgCfg(flags, **kwargs):
+    acc = ComponentAccumulator()
+    track_nn = kwargs.pop('TrackNetwork',False)
+    nn_names = [
+          "NumberParticles_NoTrack/",
+          "ImpactPoints1P_NoTrack/",
+          "ImpactPoints2P_NoTrack/",
+          "ImpactPoints3P_NoTrack/",
+          "ImpactPointErrorsX1_NoTrack/",
+          "ImpactPointErrorsX2_NoTrack/",
+          "ImpactPointErrorsX3_NoTrack/",
+          "ImpactPointErrorsY1_NoTrack/",
+          "ImpactPointErrorsY2_NoTrack/",
+          "ImpactPointErrorsY3_NoTrack/" ]
+
+    if track_nn :
+        nn_names = [ elm.replace('_NoTrack', '')  for elm in nn_names ]
+
+    acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixelClustering/PixelClusNNCalib", "/PIXEL/PixelClustering/PixelClusNNCalib", className='CondAttrListCollection'))
+    kwargs.setdefault("NetworkNames", nn_names)
+    kwargs.setdefault("WriteKey", 'PixelClusterNN' if not track_nn else 'PixelClusterNNWithTrack')
+
+    if 'NetworkToHistoTool' not in kwargs :
+        NeuralNetworkToHistoTool = acc.popToolsAndMerge(NeuralNetworkToHistoToolCfg(name = "NeuralNetworkToHistoTool"))
+        kwargs.setdefault("NetworkToHistoTool", NeuralNetworkToHistoTool)
+        acc.addPublicTool(NeuralNetworkToHistoTool)
+
+    acc.addCondAlgo(CompFactory.InDet.TTrainedNetworkCondAlg(kwargs.pop("name", 'PixelClusterNnCondAlg'), **kwargs))
+    return acc
+
+def PixelClusterNnWithTrackCondAlgCfg(flags, **kwargs):
+    kwargs.setdefault("TrackNetwork", True)
+    kwargs.setdefault("name", 'PixelClusterNnWithTrackCondAlg')
+
+    acc = PixelClusterNnCondAlgCfg(flags, **kwargs)
+    return acc
+
+def LWTNNCondAlgCfg(flags, **kwargs):
+    acc = ComponentAccumulator()
+    # Check for the folder
+    acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixelClustering/PixelNNCalibJSON", "/PIXEL/PixelClustering/PixelNNCalibJSON", className='CondAttrListCollection'))
+    # What we'll store it as
+    kwargs.setdefault("WriteKey", 'PixelClusterNNJSON')
+
+    # Set up the algorithm
+    acc.addCondAlgo(CompFactory.InDet.LWTNNCondAlg(kwargs.pop("name", "LWTNNCondAlg"), **kwargs))
+    return acc
+
+def NnClusterizationFactoryCfg(flags, name = 'NnClusterizationFactory', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName(name, kwargs)
+
+    if 'PixelLorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        PixelLorentzAngleTool = PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool", **kwargs)
+        acc.addPublicTool(PixelLorentzAngleTool)
+        kwargs.setdefault("PixelLorentzAngleTool", PixelLorentzAngleTool)
+
+    useTTrainedNetworks = flags.InDet.useNNTTrainedNetworks
+    do_runI = flags.GeoModel.Run not in ["RUN2", "RUN3"]
+
+    if useTTrainedNetworks :
+        acc.merge(PixelClusterNnCondAlgCfg(flags, name='PixelClusterNnCondAlg', GetInputsInfo = do_runI))
+        acc.merge(PixelClusterNnWithTrackCondAlgCfg(flags, name = 'PixelClusterNnWithTrackCondAlg', GetInputsInfo = do_runI))
+    else:
+        acc.merge(addFoldersSplitOnline(flags, "PIXEL", "/PIXEL/Onl/PixelClustering/PixelClusNNCalib", "/PIXEL/PixelClustering/PixelClusNNCalib", className='CondAttrListCollection'))
+        acc.merge(LWTNNCondAlgCfg(flags, name='LWTNNCondAlg'))
+
+    kwargs.setdefault("doRunI", True)
+    kwargs.setdefault("useToT", False if do_runI else flags.InDet.doNNToTCalibration)
+    kwargs.setdefault("useRecenteringNNWithoutTracks", True  if do_runI else False)
+    kwargs.setdefault("useRecenteringNNWithTracks", False if do_runI else False)
+    kwargs.setdefault("correctLorShiftBarrelWithoutTracks", 0)
+    kwargs.setdefault("correctLorShiftBarrelWithTracks", 0.030 if do_runI else 0.000)
+    kwargs.setdefault("useTTrainedNetworks", useTTrainedNetworks)
+    kwargs.setdefault("NnCollectionReadKey", 'PixelClusterNN')
+    kwargs.setdefault("NnCollectionWithTrackReadKey", 'PixelClusterNNWithTrack')
+    kwargs.setdefault("NnCollectionJSONReadKey", '' if useTTrainedNetworks else 'PixelClusterNNJSON')
+
+    NnClusterizationFactory = CompFactory.InDet.NnClusterizationFactory( name = the_name, **kwargs )
+
+    return NnClusterizationFactory
+
+def InDetPixelClusterOnTrackToolBaseCfg(flags, name, **kwargs):
+    the_name = makeName(name, kwargs)
+    split_cluster_map_extension = kwargs.pop('SplitClusterMapExtension','')
+    if (flags.Beam.Type == "cosmics") or flags.InDet.doDBMstandalone:
+        kwargs.setdefault("ErrorStrategy", 0)
+        kwargs.setdefault("PositionStrategy", 0)
+
+    kwargs.setdefault("DisableDistortions", flags.InDet.doFatras or flags.InDet.doDBMstandalone )
+    kwargs.setdefault("applyNNcorrection", flags.InDet.doPixelClusterSplitting and flags.InDet.pixelClusterSplittingType == 'NeuralNet' and not flags.InDet.doSLHC )
+    kwargs.setdefault("NNIBLcorrection", flags.InDet.doPixelClusterSplitting and flags.InDet.pixelClusterSplittingType == 'NeuralNet' and not flags.InDet.doSLHC )
+    kwargs.setdefault("SplitClusterAmbiguityMap", 'SplitClusterAmbiguityMap' + split_cluster_map_extension )
+    kwargs.setdefault("RunningTIDE_Ambi", flags.InDet.doTIDE_Ambi )
+
+    return CompFactory.InDet.PixelClusterOnTrackTool(the_name, **kwargs)
+
+def InDetPixelClusterOnTrackToolDigitalCfg(flags, name='InDetPixelClusterOnTrackToolDigital', **kwargs):
+    if 'LorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        kwargs.setdefault("LorentzAngleTool", PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool") )
+
+    if flags.InDet.doDigitalROTCreation:
+        kwargs.setdefault("applyNNcorrection", False )
+        kwargs.setdefault("NNIBLcorrection", False )
+        kwargs.setdefault("ErrorStrategy", 2 )
+        kwargs.setdefault("PositionStrategy", 1 )
+        kwargs.setdefault("SplitClusterAmbiguityMap", "" )
+    else :
+        kwargs.setdefault("SplitClusterAmbiguityMap", "" )
+    return InDetPixelClusterOnTrackToolBaseCfg(flags, name=name, **kwargs)
+
+def InDetPixelClusterOnTrackToolNNSplittingCfg(flags, name='InDetPixelClusterOnTrackToolNNSplitting', **kwargs):
+    if flags.InDet.doPixelClusterSplitting and flags.InDet.pixelClusterSplittingType == 'NeuralNet':
+        if 'NnClusterizationFactory' not in kwargs :
+            NnClusterizationFactory = NnClusterizationFactoryCfg(flags)
+            kwargs.setdefault("NnClusterizationFactory", NnClusterizationFactory)
+
+    return InDetPixelClusterOnTrackToolBaseCfg(flags, name=name, **kwargs)
+
+def InDetPixelClusterOnTrackToolCfg(flags, name='InDetPixelClusterOnTrackTool', **kwargs):
+    if 'LorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        kwargs.setdefault("LorentzAngleTool", PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool") )
+
+    if flags.InDet.doDigitalROTCreation:
+        return InDetPixelClusterOnTrackToolDigitalCfg(flags, name=name, **kwargs)
+    else:
+        return InDetPixelClusterOnTrackToolNNSplittingCfg(flags, name=name, **kwargs)
+
+def InDetSCT_ClusterOnTrackToolCfg(flags, name='InDetSCT_ClusterOnTrackTool', **kwargs):
+    the_name = makeName(name, kwargs)
+
+    if 'LorentzAngleTool' not in kwargs :
+        from SiLorentzAngleTool.PixelLorentzAngleConfig import PixelLorentzAngleTool
+        kwargs.setdefault("LorentzAngleTool", PixelLorentzAngleTool(flags, name="PixelLorentzAngleTool") )
+
+    kwargs.setdefault("CorrectionStrategy", 0 ) # do correct position bias
+    kwargs.setdefault("ErrorStrategy", 2 ) # do use phi dependent errors
+    return CompFactory.InDet.SCT_ClusterOnTrackTool(the_name, **kwargs)
+
+def InDetBroadSCT_ClusterOnTrackToolCfg(flags, name='InDetBroadSCT_ClusterOnTrackTool', **kwargs):
+    kwargs.setdefault("ErrorStrategy", 0)
+    return InDetSCT_ClusterOnTrackToolCfg(flags, name=name, **kwargs)
+
+def InDetBroadPixelClusterOnTrackToolCfg(flags, name='InDetBroadPixelClusterOnTrackTool', **kwargs):
+    kwargs.setdefault("ErrorStrategy", 0)
+    return InDetPixelClusterOnTrackToolCfg(flags, name=name, **kwargs)
+
+def RIO_OnTrackErrorScalingCondAlgCfg(flags, **kwargs):
+    acc = ComponentAccumulator()
+    the_name=kwargs.pop("name", None)
+
+    if flags.Detector.RecoIBL:
+        error_scaling_type   = ["PixelRIO_OnTrackErrorScaling"]
+        error_scaling_outkey = ["/Indet/TrkErrorScalingPixel"]
+    else:
+        error_scaling_type   = ["PixelRIO_OnTrackErrorScalingRun1"]
+        error_scaling_outkey = ["/Indet/TrkErrorScalingPixel"]
+
+    error_scaling_type      += ["SCTRIO_OnTrackErrorScaling"]
+    error_scaling_outkey    += ["/Indet/TrkErrorScalingSCT"]
+
+    error_scaling_type      += ["TRTRIO_OnTrackErrorScaling"]
+    error_scaling_outkey    += ["/Indet/TrkErrorScalingTRT"]
+
+    acc.merge(addFoldersSplitOnline(flags, 'INDET','/Indet/Onl/TrkErrorScaling','/Indet/TrkErrorScaling', className="CondAttrListCollection"))
+
+    kwargs.setdefault("ReadKey", "/Indet/TrkErrorScaling")
+    kwargs.setdefault("ErrorScalingType", error_scaling_type)
+    kwargs.setdefault("OutKeys", error_scaling_outkey)
+
+    if the_name is not None:
+        kwargs.setdefault("name", the_name)
+    acc.addCondAlgo(CompFactory.RIO_OnTrackErrorScalingCondAlg(**kwargs))
+    return acc
+
+def InDetTRT_DriftCircleOnTrackToolCfg(flags, name='TRT_DriftCircleOnTrackTool', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    kwargs.pop('isHLT',None)
+    acc.merge(RIO_OnTrackErrorScalingCondAlgCfg(flags, name = 'RIO_OnTrackErrorScalingCondAlg'))
+    kwargs.setdefault("TRTErrorScalingKey", '/Indet/TrkErrorScalingTRT')
+    kwargs.setdefault("LumiDataKey", '') # need to check
+    acc.addPublicTool(CompFactory.InDet.TRT_DriftCircleOnTrackTool(name = the_name, **kwargs), primary = True)
+    return acc
+
+def InDetBroadTRT_DriftCircleOnTrackToolCfg(name='InDetBroadTRT_DriftCircleOnTrackTool', **kwargs):
+    the_name = makeName( name, kwargs)
+    return CompFactory.InDet.TRT_DriftCircleOnTrackNoDriftTimeTool(the_name, **kwargs)
+
+def InDetRotCreatorCfg(flags, name='InDetRotCreator', **kwargs):
+    acc = ComponentAccumulator()
+    strip_args=['SplitClusterMapExtension','ClusterSplitProbabilityName','RenounceInputHandles','nameSuffix']
+    pix_cluster_on_track_args = copyArgs(kwargs,strip_args)
+    the_name = makeName(name, kwargs)
+
+    for an_arg in  strip_args:
+        kwargs.pop(an_arg, None)
+
+    use_broad_cluster_pix = flags.InDet.useBroadPixClusterErrors and (not flags.InDet.doDBMstandalone)
+    use_broad_cluster_sct = flags.InDet.useBroadSCTClusterErrors and (not flags.InDet.doDBMstandalone)
+
+    if 'ToolPixelCluster' not in kwargs :
+        if use_broad_cluster_pix :
+            ToolPixelCluster= InDetBroadPixelClusterOnTrackToolCfg(flags, **pix_cluster_on_track_args) 
+        else:
+            ToolPixelCluster= InDetPixelClusterOnTrackToolCfg(flags, **pix_cluster_on_track_args)
+        acc.addPublicTool(ToolPixelCluster)
+        kwargs.setdefault("ToolPixelCluster", ToolPixelCluster)  
+  
+    if 'ToolSCT_Cluster' not in kwargs :
+        if use_broad_cluster_sct :
+            ToolSCT_Cluster = InDetBroadSCT_ClusterOnTrackToolCfg(flags)
+        else :
+            ToolSCT_Cluster = InDetSCT_ClusterOnTrackToolCfg(flags)
+        kwargs.setdefault("ToolSCT_Cluster", ToolSCT_Cluster)
+        acc.addPublicTool(ToolSCT_Cluster)
+
+    if 'ToolTRT_DriftCircle' not in kwargs :
+        acc_trt = InDetTRT_DriftCircleOnTrackToolCfg(flags)
+        TRT_DriftCircleOnTrackTool = acc_trt.getPrimary()
+        acc.merge(acc_trt)
+        kwargs.setdefault("ToolTRT_DriftCircle", TRT_DriftCircleOnTrackTool)
+
+    kwargs.setdefault('Mode', 'indet')
+    acc.addPublicTool(CompFactory.Trk.RIO_OnTrackCreator(name=the_name, **kwargs), primary = True)
+    return acc
+
+def InDetTRT_DriftCircleOnTrackUniversalToolCfg(name='InDetTRT_RefitRotCreator', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    default_ScaleHitUncertainty = 2.5
+
+    if 'RIOonTrackToolDrift' not in kwargs :
+        RIOonTrackToolDrift = InDetBroadTRT_DriftCircleOnTrackToolCfg()
+        kwargs.setdefault("RIOonTrackToolDrift", RIOonTrackToolDrift)
+        acc.addPublicTool(RIOonTrackToolDrift)
+    if 'RIOonTrackToolTube' not in kwargs :
+        RIOonTrackToolTube = InDetBroadTRT_DriftCircleOnTrackToolCfg()
+        kwargs.setdefault("RIOonTrackToolTube", RIOonTrackToolTube)
+        acc.addPublicTool(RIOonTrackToolTube)
+    kwargs.setdefault("ScaleHitUncertainty", default_ScaleHitUncertainty) 
+    acc.setPrivateTools(CompFactory.InDet.TRT_DriftCircleOnTrackUniversalTool(name = the_name, **kwargs))
+    return acc
+
+def InDetRefitRotCreatorCfg(flags, name='InDetRefitRotCreator', **kwargs):
+    acc = ComponentAccumulator()
+    default_ScaleHitUncertainty = 2.5
+    ScaleHitUncertainty = kwargs.pop('ScaleHitUncertainty', default_ScaleHitUncertainty)
+    if flags.InDet.redoTRT_LR:
+        if flags.Detector.RecoTRT:
+            if 'ToolTRT_DriftCircle' not in kwargs :
+                ToolTRT_DriftCircle = acc.popToolsAndMerge(InDetTRT_DriftCircleOnTrackUniversalToolCfg(ScaleHitUncertainty = ScaleHitUncertainty))
+                kwargs.setdefault("ToolTRT_DriftCircle", ToolTRT_DriftCircle)
+                acc.addPublicTool(ToolTRT_DriftCircle)
+    acc.merge(InDetRotCreatorCfg(flags, name = name, **kwargs))
+    return acc
+
+def InDetPRDtoTrackMapToolGangedPixelsCfg(flags, name='PRDtoTrackMapToolGangedPixels', **kwargs):
+    the_name = makeName( name, kwargs)
+    kwargs.setdefault("PixelClusterAmbiguitiesMapName", 'PixelClusterAmbiguitiesMap') # InDetKeys.GangedPixelMap()
+    kwargs.setdefault("addTRToutliers", True)
+    return CompFactory.InDet.InDetPRDtoTrackMapToolGangedPixels( name=the_name, **kwargs)
+
+def InDetTrackPRD_AssociationCfg(flags, name='InDetTrackPRD_Association', **kwargs):
+    acc = ComponentAccumulator()
+    from InDetConfig.InDetRecToolConfig import makeNameGetPreAndSuffix
+    the_name,prefix,suffix=makeNameGetPreAndSuffix(name,kwargs)
+
+    if kwargs.get('TracksName', None) is None :
+        raise Exception('Not TracksName argument provided')
+    kwargs.setdefault("AssociationTool", InDetPRDtoTrackMapToolGangedPixelsCfg(flags) \
+                                                    if 'AssociationTool' not in kwargs else None )
+    kwargs.setdefault("AssociationMapName", prefix+'PRDtoTrackMap'+suffix )
+    acc.addEventAlgo(CompFactory.InDet.InDetTrackPRD_Association(name = the_name, **kwargs))
+    return acc
+
+def InDetTRTDriftCircleCutForPatternRecoCfg(flags, name='InDetTRTDriftCircleCutForPatternReco', TrackingCuts=None, **kwargs):
+    the_name = makeName( name, kwargs)
+
+    kwargs.setdefault("MinOffsetDCs", 5)
+    kwargs.setdefault("UseNewParameterization", TrackingCuts.useNewParameterizationTRT)
+    kwargs.setdefault("UseActiveFractionSvc", flags.Detector.RecoTRT)
+    return CompFactory.InDet.InDetTrtDriftCircleCutTool(the_name, **kwargs)
+
+def InDetSummaryHelperNoHoleSearchCfg(flags, name='InDetSummaryHelperNoHoleSearch', **kwargs):
+    acc = ComponentAccumulator()
+    if 'HoleSearch' not in kwargs :
+        kwargs.setdefault("HoleSearch", None)
+    from  InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
+    tmpAcc =  InDetTrackSummaryHelperToolCfg(flags, name = name, **kwargs)
+    InDetSummaryHelper = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+    acc.setPrivateTools(InDetSummaryHelper)
+    return acc
+
+def InDetTrackSummaryToolCfg(flags, name='InDetTrackSummaryTool', **kwargs):
+    acc = ComponentAccumulator()
+    # makeName will remove the namePrefix in suffix from kwargs, so copyArgs has to be first
+    hlt_args = copyArgs(kwargs,['isHLT','namePrefix'])
+    id_helper_args = copyArgs(kwargs,['ClusterSplitProbabilityName','RenounceInputHandles','namePrefix','nameSuffix']) if 'ClusterSplitProbabilityName' in kwargs else {}
+    kwargs.pop('ClusterSplitProbabilityName',None)
+    kwargs.pop('RenounceInputHandles',None)
+    kwargs.pop('isHLT',None)
+    the_name = makeName( name, kwargs)
+    do_holes=kwargs.get("doHolesInDet",True)
+    if do_holes :
+        id_helper_args.update(hlt_args)
+    if 'InDetSummaryHelperTool' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
+        tmpAcc =  InDetTrackSummaryHelperToolCfg(flags, **id_helper_args)
+        InDetSummaryHelper = tmpAcc.getPrimary()
+        acc.merge(tmpAcc)
+        InDetSummaryHelperNoHoleSearch = acc.popToolsAndMerge(InDetSummaryHelperNoHoleSearchCfg(flags, **id_helper_args))
+        acc.addPublicTool(InDetSummaryHelperNoHoleSearch)
+        kwargs.setdefault("InDetSummaryHelperTool", InDetSummaryHelper if do_holes else InDetSummaryHelperNoHoleSearch)
+
+    #
+    # Configurable version of TrkTrackSummaryTool: no TRT_PID tool needed here (no shared hits)
+    #
+    kwargs.setdefault("doSharedHits", False)
+    kwargs.setdefault("doHolesInDet", do_holes)
+    kwargs.setdefault("TRT_ElectronPidTool", None) # we don't want to use those tools during pattern
+    kwargs.setdefault("TRT_ToT_dEdxTool", None) # dito
+    kwargs.setdefault("PixelToTPIDTool", None) # we don't want to use those tools during pattern
+    acc.setPrivateTools(CompFactory.Trk.TrackSummaryTool(name = the_name, **kwargs))
+    return acc
+
+def InDetPixelToTPIDToolCfg(name = "InDetPixelToTPIDTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    InDetPixelToTPIDTool = CompFactory.InDet.PixelToTPIDTool(name = the_name, **kwargs)
+    acc.setPrivateTools(InDetPixelToTPIDTool)
+    return acc
+
+def InDetRecTestBLayerToolCfg(flags, name='InDetRecTestBLayerTool', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if not flags.Detector.RecoPixel:
+        return None
+
+    if 'Extrapolator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+        tmpAcc =  InDetExtrapolatorCfg(flags)
+        kwargs.setdefault("Extrapolator", tmpAcc.getPrimary())
+        acc.merge(tmpAcc)
+
+    if 'PixelSummaryTool' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import PixelConditionsSummaryToolCfg
+        PixelConditionsSummaryTool = acc.popToolsAndMerge(PixelConditionsSummaryToolCfg(flags))
+        kwargs.setdefault( "PixelSummaryTool", PixelConditionsSummaryTool)
+        acc.merge(tmpAcc)
+
+    InDetTestBLayerTool = CompFactory.InDet.InDetTestBLayerTool(name=the_name, **kwargs)
+    acc.setPrivateTools(InDetTestBLayerTool)
+    return acc
+
+def InDetSummaryHelperSharedHitsCfg(flags, name='InDetSummaryHelperSharedHits', **kwargs):
+    acc = ComponentAccumulator()
+    if 'PixelToTPIDTool' not in kwargs :
+        InDetPixelToTPIDTool = acc.popToolsAndMerge(InDetPixelToTPIDToolCfg())
+        acc.addPublicTool(InDetPixelToTPIDTool)
+        kwargs.setdefault("PixelToTPIDTool", InDetPixelToTPIDTool)
+
+    if 'TestBLayerTool' not in kwargs :
+        if InDetRecTestBLayerToolCfg(flags) is not None:
+            InDetRecTestBLayerTool = acc.popToolsAndMerge(InDetRecTestBLayerToolCfg(flags))
+            acc.addPublicTool(InDetRecTestBLayerTool)
+            kwargs.setdefault("TestBLayerTool", InDetRecTestBLayerTool)
+        else:
+            kwargs.setdefault("TestBLayerTool", None)
+
+    kwargs.setdefault("DoSharedHits", flags.InDet.doSharedHits)
+
+    if flags.Detector.RecoTRT:
+        kwargs.setdefault("DoSharedHitsTRT", flags.InDet.doSharedHits)
+
+    from  InDetConfig.InDetRecToolConfig import InDetTrackSummaryHelperToolCfg
+    tmpAcc =  InDetTrackSummaryHelperToolCfg(flags, name = name, **kwargs)
+    InDetSummaryHelper = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+    acc.setPrivateTools(InDetSummaryHelper)
+    return acc
+
+def InDetTRTStrawStatusSummaryToolCfg(flags, name = "InDetTRT_StrawStatusSummaryTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    kwargs.setdefault("isGEANT4", flags.Input.isMC)
+    InDetTRTStrawStatusSummaryTool = CompFactory.TRT_StrawStatusSummaryTool(name = the_name, **kwargs )
+    acc.setPrivateTools(InDetTRTStrawStatusSummaryTool)
+    return acc
+
+def InDetTRTCalDbToolCfg(name = "InDetTRT_CalDbTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    InDetTRTCalDbTool =  CompFactory.TRT_CalDbTool(name = the_name, **kwargs)
+    acc.setPrivateTools(InDetTRTCalDbTool)
+    return acc
+
+def InDetTRT_LocalOccupancyCfg(flags, name ="InDet_TRT_LocalOccupancy", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    if 'TRTCalDbTool' not in kwargs :
+        InDetTRTCalDbTool = acc.popToolsAndMerge(InDetTRTCalDbToolCfg())
+        acc.addPublicTool(InDetTRTCalDbTool)
+        kwargs.setdefault( "TRTCalDbTool", InDetTRTCalDbTool )
+
+    if 'TRTStrawStatusSummaryTool' not in kwargs :
+        InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(InDetTRTStrawStatusSummaryToolCfg(flags))
+        acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
+        kwargs.setdefault( "TRTStrawStatusSummaryTool", InDetTRTStrawStatusSummaryTool )
+
+    kwargs.setdefault("isTrigger", False)
+    InDetTRT_LocalOccupancy = CompFactory.InDet.TRT_LocalOccupancy(name=the_name, **kwargs )
+    acc.setPrivateTools(InDetTRT_LocalOccupancy)
+    return acc
+
+def InDetTRT_dEdxToolCfg(flags, name = "InDetTRT_dEdxTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if not flags.Detector.RecoTRT or flags.InDet.doSLHC or flags.InDet.doHighPileup \
+            or  flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
+        return None
+
+    kwargs.setdefault("TRT_dEdx_isData", not flags.Input.isMC)
+
+    if 'TRT_LocalOccupancyTool' not in kwargs :
+        InDetTRT_LocalOccupancy = acc.popToolsAndMerge(InDetTRT_LocalOccupancyCfg(flags))
+        kwargs.setdefault( "TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
+
+    InDetTRT_dEdxTool = CompFactory.TRT_ToT_dEdx(name = the_name, **kwargs)
+    return InDetTRT_dEdxTool
+
+def InDetTRT_ElectronPidToolCfg(flags, name = "InDetTRT_ElectronPidTool", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if not flags.Detector.RecoTRT or  flags.InDet.doSLHC or  flags.InDet.doHighPileup \
+            or  flags.InDet.useExistingTracksAsInput: # TRT_RDOs (used by the TRT_LocalOccupancy tool) are not present in ESD
+        return None
+
+    if 'TRTStrawSummaryTool' not in kwargs :
+        InDetTRTStrawStatusSummaryTool = acc.popToolsAndMerge(InDetTRTStrawStatusSummaryToolCfg(flags))
+        acc.addPublicTool(InDetTRTStrawStatusSummaryTool)
+        kwargs.setdefault( "TRTStrawSummaryTool", InDetTRTStrawStatusSummaryTool)
+
+    if 'TRT_LocalOccupancyTool' not in kwargs :
+        InDetTRT_LocalOccupancy = acc.popToolsAndMerge(InDetTRT_LocalOccupancyCfg(flags))
+        acc.addPublicTool(InDetTRT_LocalOccupancy)
+        kwargs.setdefault( "TRT_LocalOccupancyTool", InDetTRT_LocalOccupancy)
+
+    if 'TRT_ToT_dEdx_Tool' not in kwargs :
+        InDetTRT_dEdxTool = InDetTRT_dEdxToolCfg(flags)
+        acc.addPublicTool(InDetTRT_dEdxTool)
+        kwargs.setdefault( "TRT_ToT_dEdx_Tool", InDetTRT_dEdxTool)
+
+    kwargs.setdefault( "isData", not flags.Input.isMC)
+
+    InDetTRT_ElectronPidTool = CompFactory.InDet.TRT_ElectronPidToolRun2(name = the_name, **kwargs)
+    return InDetTRT_ElectronPidTool
+
+def InDetTrackSummaryToolSharedHitsCfg(flags, name='InDetTrackSummaryToolSharedHits',**kwargs):
+    acc = ComponentAccumulator()
+    if 'InDetSummaryHelperTool' not in kwargs :
+        copy_args=['ClusterSplitProbabilityName','RenounceInputHandles','namePrefix','nameSuffix']
+        do_holes=kwargs.get("doHolesInDet",True)
+        if do_holes :
+            copy_args += ['isHLT']
+        id_helper_args = copyArgs(kwargs,copy_args) if 'ClusterSplitProbabilityName' in kwargs else {}
+        kwargs.pop('ClusterSplitProbabilityName',None)
+        kwargs.pop('RenounceInputHandles',None)
+
+        InDetSummaryHelperSharedHits = acc.popToolsAndMerge(InDetSummaryHelperSharedHitsCfg(flags, **id_helper_args))
+        acc.addPublicTool(InDetSummaryHelperSharedHits)
+        kwargs.setdefault("InDetSummaryHelperTool", InDetSummaryHelperSharedHits)
+
+    if 'TRT_ElectronPidTool' not in kwargs :
+        if InDetTRT_ElectronPidToolCfg(flags) is not None:
+            InDetTRT_ElectronPidTool = InDetTRT_ElectronPidToolCfg(flags)
+            acc.addPublicTool(InDetTRT_ElectronPidTool)
+            kwargs.setdefault("TRT_ElectronPidTool", InDetTRT_ElectronPidTool)
+        else:
+            kwargs.setdefault("TRT_ElectronPidTool", None)
+
+    if 'TRT_ToT_dEdxTool' not in kwargs :
+        InDetTRT_dEdxTool = InDetTRT_dEdxToolCfg(flags)
+        acc.addPublicTool(InDetTRT_dEdxTool)
+        kwargs.setdefault("TRT_ToT_dEdxTool", InDetTRT_dEdxTool)
+
+    if 'PixelToTPIDTool' not in kwargs :
+        InDetPixelToTPIDTool = acc.popToolsAndMerge(InDetPixelToTPIDToolCfg())
+        acc.addPublicTool(InDetPixelToTPIDTool)
+        kwargs.setdefault( "PixelToTPIDTool", InDetPixelToTPIDTool)
+
+    kwargs.setdefault( "doSharedHits", flags.InDet.doSharedHits)
+    kwargs.setdefault( "minTRThitsForTRTdEdx", 1)
+
+    InDetTrackSummaryTool = acc.popToolsAndMerge(InDetTrackSummaryToolCfg(flags, name, **kwargs))
+    acc.setPrivateTools(InDetTrackSummaryTool)
+    return acc
+
+def InDetUpdatorCfg(flags, name = 'InDetUpdator', **kwargs):
+    the_name = makeName( name, kwargs )
+    if flags.InDet.kalmanUpdator == "fast" :
+        return CompFactory.Trk.KalmanUpdator_xk(name = the_name, **kwargs)
+    elif flags.InDet.kalmanUpdator == "weight" :
+        return CompFactory.Trk.KalmanWeightUpdator(name = the_name, **kwargs)
+    elif flags.InDet.kalmanUpdator == "smatrix" :
+        return CompFactory.Trk.KalmanUpdatorSMatrix(name = the_name, **kwargs)
+    elif flags.InDet.kalmanUpdator == "amg" :
+        return CompFactory.Trk.KalmanUpdatorAmg(name = the_name, **kwargs)
+    else :
+        return CompFactory.Trk.KalmanUpdator(name = the_name, **kwargs)
+
+def InDetMultipleScatteringUpdatorCfg(name = "InDetMultipleScatteringUpdator", **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    kwargs.setdefault( "UseTrkUtils", False)
+    MultipleScatteringUpdator = CompFactory.Trk.MultipleScatteringUpdator(name = the_name, **kwargs)
+    
+    acc.setPrivateTools(MultipleScatteringUpdator)
+    return acc
+
+def GlobalChi2FitterCfg(flags, name ='InDetTrackFitterTRT', **kwargs):
+    from InDetConfig.InDetRecToolConfig  import InDetNavigatorCfg, InDetPropagatorCfg, InDetExtrapolatorCfg
+    acc = ComponentAccumulator()
+
+    tmpAcc =  InDetExtrapolatorCfg(flags)
+    InDetExtrapolator = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+
+    InDetNavigator = acc.popToolsAndMerge(InDetNavigatorCfg(flags))
+    acc.addPublicTool(InDetNavigator)
+
+    InDetPropagator = acc.popToolsAndMerge(InDetPropagatorCfg(flags))
+    acc.addPublicTool(InDetPropagator)
+
+    acc.merge(InDetRefitRotCreatorCfg(flags))
+    InDetRefitRotCreator = acc.getPublicTool("InDetRefitRotCreator")
+
+    InDetUpdator = InDetUpdatorCfg(flags)
+    acc.addPublicTool(InDetUpdator)
+
+    InDetMultipleScatteringUpdator = acc.popToolsAndMerge(InDetMultipleScatteringUpdatorCfg())
+    acc.addPublicTool(InDetMultipleScatteringUpdator)
+
+    if flags.InDet.doRobustReco or flags.Beam.Type == "cosmics":
+        kwargs.setdefault("MaxOutliers", 99)
+
+    if flags.InDet.materialInteractions and not flags.BField.solenoidOn:
+        from AthenaCommon.SystemOfUnits import MeV
+        kwargs.setdefault("Momentum", 1000.*MeV)
+
+    kwargs.setdefault("ExtrapolationTool", InDetExtrapolator)
+    kwargs.setdefault("NavigatorTool", InDetNavigator)
+    kwargs.setdefault("PropagatorTool", InDetPropagator)
+    kwargs.setdefault("RotCreatorTool", InDetRefitRotCreator)
+    kwargs.setdefault("MeasurementUpdateTool", InDetUpdator)
+    kwargs.setdefault("MultipleScatteringTool", InDetMultipleScatteringUpdator)
+    kwargs.setdefault("StraightLine", not flags.BField.solenoidOn)
+    kwargs.setdefault("ReintegrateOutliers", False)
+    kwargs.setdefault("MaxIterations", 10)
+    kwargs.setdefault("RecalculateDerivatives", False)
+    kwargs.setdefault("TrackChi2PerNDFCut", 999999)
+
+    acc.setPrivateTools(CompFactory.Trk.GlobalChi2Fitter(name = name, **kwargs))
+    return acc
+
+def InDetTrackSummaryToolTRTTracksCfg(flags, name='InDetTrackSummaryToolTRTTracks',**kwargs):
+    kwargs.setdefault("doSharedHits", True)
+    return InDetTrackSummaryToolSharedHitsCfg(flags, name = name, **kwargs)
+
+def PublicFKF(name = 'PublicFKF', **kwargs):
+    PublicFKF = CompFactory.Trk.ForwardKalmanFitter
+    return PublicFKF(name = name, **kwargs)
+
+def InDetFKF(name='InDetFKF', **kwargs):
+    kwargs.setdefault("StateChi2PerNDFPreCut", 30.0)
+    return PublicFKF(name=name, **kwargs)
+
+def InDetBKS(name='InDetBKS', **kwargs):
+    kwargs.setdefault("InitialCovarianceSeedFactor", 200.)
+    PublicBKS = CompFactory.Trk.KalmanSmoother
+    return PublicBKS(name = name, **kwargs)
+
+def InDetKOL(name = 'InDetKOL', **kwargs):
+    kwargs.setdefault("TrackChi2PerNDFCut", 17.0)
+    kwargs.setdefault("StateChi2PerNDFCut", 12.5)
+    PublicKOL = CompFactory.Trk.KalmanOutlierLogic
+    return PublicKOL(name = name, **kwargs)
+
+def InDetKalmanFitterCfg(flags, name ='InDetKalmanFitter', **kwargs):
+    acc = ComponentAccumulator()
+    from InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+
+    tmpAcc =  InDetExtrapolatorCfg(flags)
+    InDetExtrapolator = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+
+    InDetUpdator = InDetUpdatorCfg(flags)
+    acc.addPublicTool(InDetUpdator)
+
+    tmpAcc =  InDetRotCreatorCfg(flags)
+    InDetRotCreator = tmpAcc.getPrimary()
+    acc.merge(tmpAcc)
+
+    kwargs.setdefault("ExtrapolatorHandle", InDetExtrapolator)
+    kwargs.setdefault("RIO_OnTrackCreatorHandle", InDetRotCreator)
+    kwargs.setdefault("MeasurementUpdatorHandle", InDetUpdator)
+    kwargs.setdefault("ForwardKalmanFitterHandle", InDetFKF())
+    kwargs.setdefault("KalmanSmootherHandle", InDetBKS())
+    kwargs.setdefault("KalmanOutlierLogicHandle", InDetKOL())
+    kwargs.setdefault("DynamicNoiseAdjustorHandle", None)
+    kwargs.setdefault("BrempointAnalyserHandle", None)
+    kwargs.setdefault("AlignableSurfaceProviderHandle", None)
+    kwargs.setdefault("RecalibratorHandle", None)
+    kwargs.setdefault("InternalDAFHandle", None)
+
+    acc.setPrivateTools(CompFactory.Trk.KalmanFitter(name = name, **kwargs))
+    return acc
+#############################################################################################
+#TRTSegmentFinder
+#############################################################################################
+def InDetPatternPropagatorCfg(name='InDetPatternPropagator', **kwargs):
+    the_name = makeName( name, kwargs)
+    return CompFactory.Trk.RungeKuttaPropagator(name = the_name, **kwargs)
+
+def InDetTRT_DriftCircleOnTrackUniversalToolCosmicsCfg(name='TRT_DriftCircleOnTrackUniversalTool', **kwargs):
+    kwargs.setdefault("ScaleHitUncertainty", 2.)
+    return InDetTRT_DriftCircleOnTrackUniversalToolCfg(name=name, **kwargs)
+
+def InDetTRT_DriftCircleOnTrackNoDriftTimeToolCfg(**kwargs):
+    return InDetBroadTRT_DriftCircleOnTrackToolCfg(**kwargs)
+
+def InDetTRT_ExtensionToolCosmicsCfg(flags, name='InDetTRT_ExtensionToolCosmics', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'Propagator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetPropagatorCfg
+        InDetPropagator = acc.popToolsAndMerge(InDetPropagatorCfg(flags))
+        acc.addPublicTool(InDetPropagator)
+        kwargs.setdefault("Propagator", InDetPropagator)
+
+    if 'Extrapolator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+        InDetExtrapolator = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))
+        acc.addPublicTool(InDetExtrapolator)
+        kwargs.setdefault("Extrapolator", InDetExtrapolator)
+
+    if 'RIOonTrackToolYesDr' not in kwargs :
+        InDetTRT_DriftCircleOnTrackUniversalToolCosmics = acc.popToolsAndMerge(InDetTRT_DriftCircleOnTrackUniversalToolCosmicsCfg())
+        acc.addPublicTool(InDetTRT_DriftCircleOnTrackUniversalToolCosmics)
+        kwargs.setdefault("RIOonTrackToolYesDr", InDetTRT_DriftCircleOnTrackUniversalToolCosmics)
+
+    if 'RIOonTrackToolNoDr' not in kwargs :
+        InDetBroadTRT_DriftCircleOnTrackTool = InDetTRT_DriftCircleOnTrackNoDriftTimeToolCfg()
+        acc.addPublicTool(InDetBroadTRT_DriftCircleOnTrackTool)
+        kwargs.setdefault("RIOonTrackToolNoDr", InDetBroadTRT_DriftCircleOnTrackTool)
+
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles()
+    kwargs.setdefault("SearchNeighbour", False)   # needs debugging!!!
+    kwargs.setdefault("RoadWidth", 10.0)
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackExtensionToolCosmics(name = the_name, **kwargs))
+    return acc
+
+def InDetPatternUpdatorCfg(name='InDetPatternUpdator', **kwargs):
+    the_name = makeName(name, kwargs)
+    return CompFactory.Trk.KalmanUpdator_xk(name = the_name, **kwargs)
+
+def InDetTRT_TrackExtensionTool_xkCfg(flags, name='InDetTRT_ExtensionTool', TrackingCuts=None, **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'PropagatorTool' not in kwargs :
+        InDetPatternPropagator = InDetPatternPropagatorCfg()
+        acc.addPublicTool(InDetPatternPropagator)
+        kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+
+    if 'UpdatorTool' not in kwargs :
+        InDetPatternUpdator = InDetPatternUpdatorCfg()
+        acc.addPublicTool(InDetPatternUpdator)
+        kwargs.setdefault("UpdatorTool", InDetPatternUpdator)
+
+    if 'DriftCircleCutTool' not in kwargs :
+        InDetTRTDriftCircleCutForPatternReco = InDetTRTDriftCircleCutForPatternRecoCfg(flags, TrackingCuts=TrackingCuts)
+        acc.addPublicTool(InDetTRTDriftCircleCutForPatternReco)
+        kwargs.setdefault("DriftCircleCutTool", InDetTRTDriftCircleCutForPatternReco)
+
+    if 'RIOonTrackToolYesDr' not in kwargs :
+        acc_tmp = InDetTRT_DriftCircleOnTrackToolCfg(flags)
+        InDetTRT_DriftCircleOnTrackTool = acc_tmp.getPrimary()
+        acc.merge(acc_tmp)
+        kwargs.setdefault("RIOonTrackToolYesDr", InDetTRT_DriftCircleOnTrackTool)
+
+    if 'RoadTool' not in kwargs :
+        InDetTRT_RoadMaker = acc.popToolsAndMerge(InDetTRT_RoadMakerCfg(flags))
+        acc.addPublicTool(InDetTRT_RoadMaker)
+        kwargs.setdefault("RoadTool", InDetTRT_RoadMaker)
+
+    kwargs.setdefault("TRT_ClustersContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles()
+    kwargs.setdefault("TrtManagerLocation", 'TRT') # InDetKeys.TRT_Manager()
+    kwargs.setdefault("UseDriftRadius", not flags.InDet.noTRTTiming)
+    kwargs.setdefault("MinNumberDriftCircles", TrackingCuts.minTRTonTrk)
+    kwargs.setdefault("ScaleHitUncertainty", 2)
+    kwargs.setdefault("RoadWidth", 20.)
+    kwargs.setdefault("UseParameterization", TrackingCuts.useParameterizedTRTCuts)
+    kwargs.setdefault("maxImpactParameter", 500 if flags.InDet.doBeamHalo or flags.InDet.doBeamGas else 50 )  # single beam running, open cuts
+
+    if TrackingCuts.RoISeededBackTracking:
+        kwargs.setdefault("minTRTSegmentpT", TrackingCuts.minSecondaryPt)
+
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackExtensionTool_xk(the_name, **kwargs))
+    return acc
+
+def InDetWeightCalculatorCfg(name='InDetWeightCalculator', **kwargs):
+    the_name = makeName( name, kwargs)
+    return CompFactory.Trk.DAF_SimpleWeightCalculator(name = the_name, **kwargs)
+
+def InDetCompetingTRT_DC_ToolCfg(flags, name='InDetCompetingTRT_DC_Tool', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'Extrapolator' not in kwargs :
+        from  InDetConfig.InDetRecToolConfig import InDetExtrapolatorCfg
+        InDetExtrapolator = acc.popToolsAndMerge(InDetExtrapolatorCfg(flags))
+        acc.addPublicTool(InDetExtrapolator)
+        kwargs.setdefault("Extrapolator", InDetExtrapolator)
+
+    if 'ToolForWeightCalculation' not in kwargs :
+        InDetWeightCalculator = InDetWeightCalculatorCfg()
+        acc.addPublicTool(InDetWeightCalculator)
+        kwargs.setdefault("ToolForWeightCalculation", InDetWeightCalculator)
+
+    if 'ToolForTRT_DriftCircleOnTrackCreation' not in kwargs :
+        acc_tmp = InDetTRT_DriftCircleOnTrackToolCfg(flags)
+        InDetTRT_DriftCircleOnTrackTool = acc_tmp.getPrimary()
+        acc.merge(acc_tmp)
+        kwargs.setdefault("ToolForTRT_DriftCircleOnTrackCreation", InDetTRT_DriftCircleOnTrackTool)
+
+    acc.setPrivateTools(CompFactory.InDet.CompetingTRT_DriftCirclesOnTrackTool( the_name, **kwargs))
+    return acc
+
+def InDetTRT_RoadMakerCfg(flags, name='InDetTRT_RoadMaker', **kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+    
+    InDetPatternPropagator = InDetPatternPropagatorCfg()
+    acc.addPublicTool(InDetPatternPropagator)
+    kwargs.setdefault("RoadWidth", 20.)
+    kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+    acc.setPrivateTools(CompFactory.InDet.TRT_DetElementsRoadMaker_xk(the_name, **kwargs))
+    return acc
+
+def InDetTRT_TrackExtensionTool_DAFCfg(flags, name='TRT_TrackExtensionTool_DAF',**kwargs):
+    acc = ComponentAccumulator()
+    the_name = makeName( name, kwargs)
+
+    if 'CompetingDriftCircleTool' not in kwargs :
+        InDetCompetingTRT_DC_Tool = acc.popToolsAndMerge(InDetCompetingTRT_DC_ToolCfg(flags))
+        acc.addPublicTool(InDetCompetingTRT_DC_Tool)
+        kwargs.setdefault("CompetingDriftCircleTool", InDetCompetingTRT_DC_Tool)
+
+    if 'PropagatorTool' not in kwargs :
+        InDetPatternPropagator = InDetPatternPropagatorCfg()
+        acc.addPublicTool(InDetPatternPropagator)
+        kwargs.setdefault("PropagatorTool", InDetPatternPropagator)
+
+    if 'RoadTool' not in kwargs :
+        InDetTRT_RoadMaker = acc.popToolsAndMerge(InDetTRT_RoadMakerCfg(flags)) 
+        acc.addPublicTool(InDetTRT_RoadMaker)
+        kwargs.setdefault("RoadTool", InDetTRT_RoadMaker)
+
+    kwargs.setdefault("TRT_DriftCircleContainer", 'TRT_DriftCircles') # InDetKeys.TRT_DriftCircles()
+
+    acc.setPrivateTools(CompFactory.InDet.TRT_TrackExtensionTool_DAF(the_name,**kwargs))
+    return acc
+
+def InDetTRT_ExtensionToolCfg(flags, TrackingCuts=None, **kwargs):
+    # @TODO set all names to InDetTRT_ExtensionTool ?
+    if (flags.InDet.trtExtensionType == 'xk') or (not flags.InDet.doNewTracking) :
+        if (flags.Beam.Type == "cosmics"):
+            return InDetTRT_ExtensionToolCosmicsCfg(flags, **kwargs)
+        else:
+            return InDetTRT_TrackExtensionTool_xkCfg(flags, TrackingCuts=TrackingCuts, **kwargs)
+    elif flags.InDet.trtExtensionType == 'DAF' :
+        return InDetTRT_TrackExtensionTool_DAFCfg(flags, name = 'InDetTRT_ExtensionTool',**kwargs)
+
+def TRT_DetElementsRoadCondAlgCfg(**kwargs):
+    acc = ComponentAccumulator()
+    the_name=kwargs.pop("name","InDet__TRT_DetElementsRoadCondAlg_xk")
+    acc.addCondAlgo(CompFactory.InDet.TRT_DetElementsRoadCondAlg_xk(the_name, **kwargs))
+    return acc
\ No newline at end of file
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
index 3746f67d0e701499181ccae396bd5664d2d0bbc0..85069ddd3d88e4d88da3edfaaa0c3fc72d2060ad 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
@@ -21,6 +21,8 @@ atlas_add_dictionary( SCT_MonitoringDict
                       SCT_Monitoring/selection.xml )
 
 # Run tests:
+# This is a standalone test with ESD input.
+# This is not essential and can be abandoned if it won't run.
 atlas_add_test( SCTLorentzMonAlg_test
                 SCRIPT python -m SCT_Monitoring.SCTLorentzMonAlg
                 PROPERTIES TIMEOUT 600 )
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
index 42a92f2463088cf69c1d3f4b083e474327d5eb4d..bd79e788f50e7341e14b4e9fa317d8d12e1ca44e 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
@@ -29,7 +29,6 @@ Here are the active monitoring algorithms / tools:
 @subsection SCT_Monitoring_SCT_MonitoringConfigurationNewNew Configuration in the new DQ framework and the new job configuration framework
 
 InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py is the main configuration script.
-Only SCTLorentzMonAlg and SCTTracksMonAlg are configured in the script using SCTLorentzMonAlg.py and SCTTracksMonAlg.py because the Inner Dector configuration is not fully ready in the new job configuration framework as of October, 2020.
 
 When the Reco_tf.py command is used, the chain is the following:
 - Reconstruction/RecJobTransforms/scripts/Reco_tf.py
@@ -39,12 +38,6 @@ When the Reco_tf.py command is used, the chain is the following:
 - Control/AthenaMonitoring/python/AthenaMonitoringCfg.py
 - InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
 
-Individual algorithms can be run using the configuration scripts like:
-
-\verbatim
-python -m SCT_Monitoring.SCTLorentzMonAlg
-\endverbatim
-
 @subsection SCT_Monitoring_SCT_MonitoringConfigurationNewOld Configuration in the new DQ framework and the old job configuration framework
 
 InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringSCT.py is the main configuration script.
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py
new file mode 100644
index 0000000000000000000000000000000000000000..febbed7bf3b5ec99a69b5091e0b36204a24e4104
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTErrMonAlg.py
@@ -0,0 +1,235 @@
+#
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+
+'''@file SCTErrMonAlg_jobOptions.py
+@author Susumu Oda
+@date 2020-10-08
+@brief New style configuration of SCTErrMonAlg
+'''
+
+def SCTErrMonAlgConfig(inputFlags):
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+
+    from AthenaMonitoring import AthMonitorCfgHelper
+    helper = AthMonitorCfgHelper(inputFlags, 'SCTErrMonCfg')
+
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    myMonAlg = helper.addAlgorithm(CompFactory.SCTErrMonAlg, 'SCTErrMonAlg')
+    myMonAlg.TriggerChain = ""
+
+    # SCT conditions tools (update is necessary when the ID configuration in the new job framework is ready.)
+    ConditionsTools = []
+    myMonAlg.conditionsTool = CompFactory.SCT_ConfigurationConditionsTool(name="InDetSCT_ConfigurationConditionsTool")
+    ConditionsTools += [myMonAlg.conditionsTool]
+    myMonAlg.SCT_ByteStreamErrorsTool = CompFactory.SCT_ByteStreamErrorsTool(name="SCT_ByteStreamErrorsTool")
+    myMonAlg.SCT_ByteStreamErrorsTool.ConfigTool = myMonAlg.conditionsTool
+    ConditionsTools += [myMonAlg.SCT_ByteStreamErrorsTool]
+    if inputFlags.InDet.useDCS:
+        myMonAlg.SCT_DCSConditionsTool = CompFactory.SCT_DCSConditionsTool(name="InDetSCT_DCSConditionsTool")
+        ConditionsTools += [myMonAlg.SCT_DCSConditionsTool]
+    else:
+        myMonAlg.UseDCS = False
+    ConditionsTools += [CompFactory.SCT_ReadCalibDataTool(name="InDetSCT_ReadCalibDataTool")]
+    if not inputFlags.Common.isOnline:
+        ConditionsTools += [CompFactory.SCT_MonitorConditionsTool(name="InDetSCT_MonitorConditionsTool")]
+    if not inputFlags.Input.isMC:
+        ConditionsTools += [CompFactory.SCT_TdaqEnabledTool(name="InDetSCT_TdaqEnabledTool")]
+    kwargs = {}
+    kwargs.setdefault("ConditionsTools", ConditionsTools)
+    myMonAlg.SCT_ConditionsSummaryTool = CompFactory.SCT_ConditionsSummaryTool(name="InDetSCT_ConditionsSummaryTool", **kwargs)
+
+    ## The following does not work when running Reco_tf.py
+    ## because it configures condition algorithms
+    ## and they conflict with ones configured in the old framework.
+    # myMonAlg.SCT_ConditionsSummaryTool = result.popToolsAndMerge(InDetSCT_ConditionsSummaryToolCfg(inputFlags))
+    # from InDetConfig.InDetRecToolConfig import SCT_ConfigurationCondAlgCfg, SCT_ConfigurationConditionsToolCfg
+    # result.merge(SCT_ConfigurationCondAlgCfg(inputFlags))
+    # myMonAlg.conditionsTool = result.popToolsAndMerge(SCT_ConfigurationConditionsToolCfg(inputFlags))
+    # from InDetConfig.InDetRecToolConfig import SCT_ByteStreamErrorsToolCfg
+    # myMonAlg.SCT_ByteStreamErrorsTool = result.popToolsAndMerge(SCT_ByteStreamErrorsToolCfg(inputFlags))
+    # if inputFlags.InDet.useDCS:
+    #     from SCT_ConditionsTools.SCT_DCSConditionsConfig import SCT_DCSConditionsCfg
+    #     myMonAlg.SCT_DCSConditionsTool = result.popToolsAndMerge(SCT_DCSConditionsCfg(inputFlags))
+    # else:
+    #     myMonAlg.UseDCS = False
+
+    # FilterTools
+    # There seems no new configureation corresponding to
+    # from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
+    if inputFlags.Beam.Type=='collisions':
+        if inputFlags.Input.isMC:
+            from AthenaMonitoring.AthenaMonitoringConf import DQDummyFilterTool
+            myMonAlg.FilterTools += [DQDummyFilterTool()]
+        else:
+            from AthenaMonitoring.AthenaMonitoringConf import DQFilledBunchFilterTool
+            from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool
+            monFilledBunchFilterTool = DQFilledBunchFilterTool()
+            monFilledBunchFilterTool.bunchCrossingTool = BunchCrossingTool()
+            myMonAlg.FilterTools += [monFilledBunchFilterTool]
+
+    myMonGroup = helper.addGroup(myMonAlg, "SCTErrMonitor", "SCT/")
+
+    # Configure histograms
+
+    from ROOT import SCT_Monitoring as sctMon #import SCT_MonitoringNumbers.h
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "lumiBlock;NumberOfEventsVsLB",
+                               cutmask = "is1D",
+                               type = "TH1F",
+                               title = "Num of events per LB ;LumiBlock",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "lumiBlock;NumberOfSCTFlagErrorsVsLB",
+                               cutmask = "sctFlag",
+                               type = "TH1F",
+                               title = "Num of SCT Flag errors per LB ;LumiBlock",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "lumiBlock, sctFlag;FractionOfSCTFlagErrorsPerLB",
+                               type = "TProfile",
+                               title = "Frac of SCT Flag errors per LB ;LumiBlock",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillConfigurationDetails
+    myMonGroup.defineHistogram(varname = "detailedConfBin, nBad;SCTConfDetails",
+                               type = "TProfile",
+                               title = "Exclusion from the Configuration",
+                               path = "GENERAL/Conf",
+                               xbins = sctMon.ConfbinsDetailed,
+                               xmin = -0.5,
+                               xmax = sctMon.ConfbinsDetailed-0.5,
+                               xlabels = ["Modules", "Link 0", "Link 1", "Chips", "Strips (10^{2})"])
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "moduleOutBin, moduleOut;SCTConfOutM",
+                               type = "TProfile",
+                               title = "Num of Out Modules in All Region",
+                               path = "GENERAL/Conf",
+                               xbins = 1,
+                               xmin = -0.5,
+                               xmax = 0.5,
+                               xlabels = ["Mod Out"])
+
+    # Fiiled in fillByteStreamErrors
+    from ROOT import SCT_ByteStreamErrors
+    for i in range(SCT_ByteStreamErrors.NUM_ERROR_TYPES):
+        myMonGroup.defineHistogram(varname = "lumiBlock, n_"+SCT_ByteStreamErrors.ErrorTypeDescription[i]+";SCT_"+SCT_ByteStreamErrors.ErrorTypeDescription[i]+"VsLbs",
+                                   type = "TProfile",
+                                   title = "Ave. "+SCT_ByteStreamErrors.ErrorTypeDescription[i]+" per LB in All Region;LumiBlock;Num of "+SCT_ByteStreamErrors.ErrorTypeDescription[i],
+                                   path = "GENERAL/Conf",
+                                   xbins = sctMon.NBINS_LBs,
+                                   xmin = 0.5,
+                                   xmax = sctMon.NBINS_LBs+0.5)
+
+    # Fiiled in fillByteStreamErrors
+    for i in range(sctMon.N_ERRCATEGORY):
+        myMonGroup.defineHistogram(varname = "lumiBlock, n_"+sctMon.CategoryErrorsNames[i]+";SCT_LinksWith"+sctMon.CategoryErrorsNames[i]+"VsLbs",
+                                   type = "TProfile",
+                                   title = "Ave. Num of Links with "+sctMon.CategoryErrorsNames[i]+" per LB in All Region;LumiBlock;Num of Links with "+sctMon.CategoryErrorsNames[i],
+                                   path = "GENERAL/Conf",
+                                   xbins = sctMon.NBINS_LBs,
+                                   xmin = 0.5,
+                                   xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillByteStreamErrors
+    for errCate in range(sctMon.N_ERRCATEGORY):
+        for region in range(sctMon.N_REGIONS):
+            for layer in range(sctMon.N_ENDCAPSx2):
+                myMonGroup.defineHistogram(varname = "eta, phi, hasError_"+sctMon.CategoryErrorsNames[errCate]+"_"+sctMon.subDetNameShort[region].Data()+"_"+str(layer/2)+"_"+str(layer%2)+";SCT_NumberOf"+sctMon.CategoryErrorsNames[errCate]+sctMon.subDetNameShort[region].Data()+"_"+str(layer/2)+"_"+str(layer%2),
+                                           type = "TProfile2D",
+                                           title = "Num of "+sctMon.CategoryErrorsNames[errCate]+" per "+sctMon.layerName[region].Data()+str(layer/2)+"_"+str(layer%2),
+                                           path = "SCT"+sctMon.subDetNameShort[region].Data()+"/errors/"+sctMon.CategoryErrorsNames[errCate],
+                                           xbins = sctMon.N_ETA_BINS if region==sctMon.BARREL_INDEX else sctMon.N_ETA_BINS_EC,
+                                           xmin = (sctMon.FIRST_ETA_BIN if region==sctMon.BARREL_INDEX else sctMon.FIRST_ETA_BIN_EC)-0.5,
+                                           xmax = (sctMon.LAST_ETA_BIN if region==sctMon.BARREL_INDEX else sctMon.LAST_ETA_BIN_EC)+0.5,
+                                           ybins = sctMon.N_PHI_BINS if region==sctMon.BARREL_INDEX else sctMon.N_PHI_BINS_EC,
+                                           ymin = (sctMon.FIRST_PHI_BIN if region==sctMon.BARREL_INDEX else sctMon.FIRST_PHI_BIN_EC)-0.5,
+                                           ymax = (sctMon.LAST_PHI_BIN if region==sctMon.BARREL_INDEX else sctMon.LAST_PHI_BIN_EC)+0.5,
+                                           duration = "lb")
+
+    # Filled in fillByteStreamErrorsHelper
+    myMonGroup.defineHistogram(varname = "maskedLinksBin;Masked Links",
+                               weight = "maskedLinks",
+                               type = "TH1I",
+                               title = "Number of Masked Links for SCT,ECA,B,ECC",
+                               path = "GENERAL/errors",
+                               xbins = sctMon.N_REGIONS_INC_GENERAL,
+                               xmin = -0.5,
+                               xmax = sctMon.N_REGIONS_INC_GENERAL-0.5,
+                               xlabels = ["EndCapC", "Barrel", "EndCapA", "All"])
+
+    # Filled in fillHistograms
+    myMonGroup.defineHistogram(varname = "flaggedWafersIndices, nFlaggedWafers;FlaggedWafers",
+                               type = "TProfile",
+                               title = "Number of flagged wafers for SCT,ECA,B,ECC",
+                               path = "GENERAL/errors",
+                               xbins = sctMon.N_REGIONS_INC_GENERAL,
+                               xmin = -0.5,
+                               xmax = sctMon.N_REGIONS_INC_GENERAL-0.5,
+                               xlabels = ["EndCapC", "Barrel", "EndCapA", "All"])
+
+    # Filled in fillByteStreamErrors
+    coverageTitles = [
+        "", # All (not used)
+        "Ave. Coverage of Enabled Links per LB", # All - Disabled
+        "Ave. Coverage of Links with No Bad LinkLevelError per LB", # All - BadLinkLevelError
+        "Ave. Coverage of Links with No Bad RODLevelError per LB", # All - BadRODLevelError
+        "Ave. Coverage of Links with No Bad Error per LB", # All - BadError
+        "Ave. Coverage of links Not Affected by PS Trip", # All - PSTrip (DCS)
+        "Ave. Coverage of Links With No Bad Problem per LB" # All - Summary
+    ]
+    for iProblem in range(1, sctMon.numberOfProblemForCoverage):
+        myMonGroup.defineHistogram(varname = "lumiBlock, detectorCoverage"+sctMon.coverageVarNames[iProblem]+";SCT_Coverage"+sctMon.coverageVarNames[iProblem]+"VsLbs",
+                                   type = "TProfile",
+                                   title = coverageTitles[iProblem]+";LumiBlock;Detector Coverage [%]",
+                                   path = "DetectorCoverage",
+                                   xbins = sctMon.NBINS_LBs,
+                                   xmin = 0.5,
+                                   xmax = sctMon.NBINS_LBs+0.5)    
+
+    # Fiiled in fillByteStreamErrors
+    myMonGroup.defineHistogram(varname = "lumiBlock, psTripModules;SCT_ModulesWithPSTripVsLbs",
+                               type = "TProfile",
+                               title = "Ave. Num of Modules Affected by PS Trip per LB in All Region;LumiBlock;Num. of Modules Affected by PS Trip",
+                               path = "DetectorCoverage",
+                               xbins = sctMon.NBINS_LBs,
+                               xmin = 0.5,
+                               xmax = sctMon.NBINS_LBs+0.5)
+
+    # Filled in fillByteStreamErrorsHelper
+    xlabels = [SCT_ByteStreamErrors.ErrorTypeDescription[i] for i in range(SCT_ByteStreamErrors.NUM_ERROR_TYPES)]
+    for reg in range(sctMon.N_REGIONS):
+        nLayers = sctMon.n_layers[reg]*2
+        ylabels = [str(i/2)+"_"+str(i%2) for i in range(nLayers)]
+        myMonGroup.defineHistogram(varname = "errorType, layerSide, errorFraction;RateErrorsPerLumi",
+                                   cutmask = "is"+sctMon.subDetNameShort[reg].Data(),
+                                   type = "TProfile2D",
+                                   title = "Rate of Error Types for "+sctMon.layerName[reg].Data()+" per Lumi-Block",
+                                   path = "SCT"+sctMon.subDetNameShort[reg].Data()+"/errors",
+                                   xbins = SCT_ByteStreamErrors.NUM_ERROR_TYPES,
+                                   xmin = -0.5,
+                                   xmax = SCT_ByteStreamErrors.NUM_ERROR_TYPES-0.5,
+                                   xlabels = xlabels,
+                                   ybins = nLayers,
+                                   ymin = -0.5,
+                                   ymax = nLayers-0.5,
+                                   ylabels = ylabels,
+                                   duration = "lb")
+
+    result.merge(helper.result())
+    return result
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py
index ed50ebf56f186e1eb407032dc93ba03ca1c6c200..09e7956c59a16098728cc5541594b077d396dccb 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitEffMonAlg.py
@@ -155,7 +155,7 @@ def SCTHitEffMonAlgConfig(inputFlags):
 
     # SCTEC, SCTB, SCTEA
     for isub in range(sctMon.N_REGIONS):
-        profileLabels = range(limit[isub])
+        profileLabels = list(range(limit[isub]))
         for k in range(limit[isub]):
             profileLabels[k] = dedicatedTitle(k, isub)
         # Efficiency
@@ -180,7 +180,7 @@ def SCTHitEffMonAlgConfig(inputFlags):
         # Efficiency as a function of LB
         myMonGroup[isub].defineHistogram(varname= "LumiBlock, eff;"+"effLumiBlock", #different names for fill
                                          type= "TProfile",
-                                         title= "Efficiency vs Luminosity block in "+sctMon.subDetName[isub]+";Luminosity block"+";Efficiency",
+                                         title= "Efficiency vs Luminosity block in "+subDetName[isub]+";Luminosity block"+";Efficiency",
                                          path="eff",
                                          xbins=sctMon.NBINS_LBs,
                                          xmin=0.5,
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
new file mode 100644
index 0000000000000000000000000000000000000000..21db3f66f76884bd29308615b09b2b4ca625fad8
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTHitsNoiseMonAlg.py
@@ -0,0 +1,204 @@
+#
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+#
+
+'''@file SCTHitNoiseMonAlg.py
+@author Susumu Oda
+@date 2020-10-08
+@brief New style configuration of SCTHitNoiseMonAlg
+'''
+
+def Title( i, isub):
+    m_layerStr = i / 2
+    m_sideStr = i % 2
+    m_region = isub
+    if m_region == 1 :
+        return "Layer " + str(m_layerStr) + " Side " + str(m_sideStr)
+    else: 
+        return "Disk " + str(m_layerStr) + " Side " + str(m_sideStr)
+  
+
+def SCTHitsNoiseMonAlgConfig(inputFlags):
+
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+    
+    from AthenaMonitoring import AthMonitorCfgHelper
+    helper = AthMonitorCfgHelper(inputFlags, 'SCTHitsNoiseMonCfg')
+           
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    myMonAlg = helper.addAlgorithm(CompFactory.SCTHitsNoiseMonAlg, 'SCTHitsNoiseMonAlg')
+    myMonAlg.TriggerChain = ""
+
+    # Trigger histogram will be made only for data.
+    myMonAlg.doTrigger = (not inputFlags.Input.isMC)
+
+    from ROOT import SCT_Monitoring as sctMon #import SCT_MonitoringNumbers.h
+
+    # Add a generic monitoring tool (a "group" in old language). The returned 
+    # object here is the standard GenericMonitoringTool.
+    dimension = [sctMon.N_REGIONS]
+
+    MonGroupArray = helper.addArray(dimension,myMonAlg,"SCTHitsNoiseMonitor","SCT") # SCTHitsNoiseMonitor_3 on index 0 !!
+
+    myMonGroupGeneral = helper.addGroup(
+        myMonAlg,
+        "SCTHitsNoiseMonitorGeneral",
+        "SCT/GENERAL/"
+    )
+
+    # Configure histograms
+
+    abbreviations = ["ECp", "", "ECm"]
+    names = ["Endcap A", "Barrel", "Endcap C"]
+    path = ["SCTEA", "SCTB", "SCTEC"]
+    noiseAbbreviations = ["ECA","BAR","ECC"]
+    titleAbbreviations = ["ECp","BAR","ECm"]
+    limits = [ sctMon.N_DISKS*2, sctMon.N_BARRELS*2, sctMon.N_DISKS*2 ]
+
+    for isub in range(sctMon.N_REGIONS):
+        for i in range(limits[isub]):
+
+            HitsMapName = "hitsmap" + abbreviations[isub] +  "_" + str(i/2) + "_" + str(i%2)
+            HitsMapTitle = "SCT Hitmap for " + names[isub] + ": " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+HitsMapName+",phi_"+HitsMapName+";"+HitsMapName,
+                                                            type= "TH2F", 
+                                                            title= HitsMapTitle + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            path= path[isub] + "/hits",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5 , ymax=sctMon.l_phibin[isub]+0.5,
+                                                            weight="numberOfStrips_"+HitsMapName )
+                    
+            streamhitmap = "mapsOfHitsOnTracks" + abbreviations[isub] + "_" + "trackhitsmap_" + str(i/2) + "_" + str(i%2)
+            histotitle = "SCT hits on tracks for " + names[isub] + " " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+streamhitmap + ",phi_"+streamhitmap + ";"+streamhitmap,
+                                                            type= "TH2F", 
+                                                            title= histotitle + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            path= path[isub] + "/hits/mapsOfHitsOnTracks/",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5 , ymax=sctMon.l_phibin[isub]+0.5 )
+                    
+            occMap = "occupancymap" + abbreviations[isub] + "_" + str(i/2) + "_" + str(i%2)
+            hitoccupancy = "hitoccupancymap" + abbreviations[isub] + "_" + str(i/2) + "_" + str(i%2)
+            histotitleR  = "SCT Hit Occupancy map for " + names[isub] + ": " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+occMap + ",phi_"+occMap + ",HO_"+occMap+";" + hitoccupancy,
+                                                            type= "TProfile2D", 
+                                                            title= histotitleR + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            path= path[isub] + "/Noise",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5, ymax=sctMon.l_phibin[isub]+0.5 )
+        
+            noiseoccupancy = "noiseoccupancymaptrigger" + abbreviations[isub] + "_" + str(i/2) + "_" + str(i%2)
+            m_NOTriggerItem =  "L1_RD0_EMPTY"
+            histotitletrigger = "SCT Noise Occupancy map for " + m_NOTriggerItem + " Trigger and " + names[isub] + ": " + Title(i,isub)
+            MonGroupArray.__getitem__(isub).defineHistogram(varname= "eta_"+occMap + ",phi_"+occMap + ",NO_"+occMap+";" + noiseoccupancy,
+                                                            type= "TProfile2D", 
+                                                            title= histotitletrigger + ";Index in the direction of #eta;Index in the direction of #phi",
+                                                            cutmask= "IsSelectedTrigger_"+occMap,
+                                                            path= path[isub] + "/Noise",
+                                                            xbins=sctMon.n_etabins[isub], xmin=sctMon.f_etabin[isub]-0.5, xmax=sctMon.l_etabin[isub]+0.5,
+                                                            ybins=sctMon.n_phibins[isub], ymin=sctMon.f_phibin[isub]-0.5, ymax=sctMon.l_phibin[isub]+0.5 )
+        
+        #End i Loop
+    
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,HO;"+ noiseAbbreviations[isub] + "HO_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "HO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,HO;"+ noiseAbbreviations[isub] + "HOTrigger_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "HO with trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        cutmask= "IsSelectedTrigger",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,NO;"+ noiseAbbreviations[isub] + "NO_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "NO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LB,NO;"+ noiseAbbreviations[isub] + "NOTrigger_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "NO with Trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                                        cutmask= "IsSelectedTrigger",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromSPs;" + "h_HSPHitsTrigger"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of SP Hits in " + titleAbbreviations[isub] + " with trigger vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        cutmask= "isSelectedTriggerHits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromSPs;" + "h_HSPHits"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of SP Hits in " + titleAbbreviations[isub] + " vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromAllRDOs;" + "h_HallHitsTrigger"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of all Hits in " + titleAbbreviations[isub] + " with trigger vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        cutmask= "isSelectedTriggerHits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+        MonGroupArray.__getitem__(isub).defineHistogram(varname= "LBHits,numberOfHitsFromAllRDOs;" + "h_HallHits"+titleAbbreviations[isub]+"_vsLB",
+                                                        type= "TProfile", 
+                                                        title= "Average num of all Hits in " + titleAbbreviations[isub] + " vs LB" + ";LumiBlock;Average number of SP Hits",
+                                                        path= path[isub] + "/Noise",
+                                                        xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+    #GENERAL
+    myMonGroupGeneral.defineHistogram(varname= "clu_size",
+                                      type= "TH1F", 
+                                      title= "SCT Cluster Size" + ";Cluster Size;Num of Events",
+                                      path=  "/hits",
+                                      xbins=200, xmin = 0, xmax = 200)
+    
+    myMonGroupGeneral.defineHistogram(varname= "LB,HO;"+ "HO_vsLB",
+                                      type= "TProfile", 
+                                      title= "HO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      path= "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+    myMonGroupGeneral.defineHistogram(varname= "LB,HO;"+  "HOTrigger_vsLB",
+                                      type= "TProfile", 
+                                      title= "HO with trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      cutmask= "IsSelectedTrigger",
+                                      path=  "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+    myMonGroupGeneral.defineHistogram(varname= "LB,NO;"+ "NO_vsLB",
+                                      type= "TProfile", 
+                                      title= "NO vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      path= "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+                
+    myMonGroupGeneral.defineHistogram(varname= "LB,NO;"+ "NOTrigger_vsLB",
+                                      type= "TProfile", 
+                                      title= "NO with Trigger vs LB for all region (SP noise)" + ";LumiBlock;Hit Occupancy [10^{-5}]",
+                                      cutmask= "IsSelectedTrigger",
+                                      path= "/noise",
+                                      xbins=sctMon.NBINS_LBs, xmin = 0.5, xmax = sctMon.NBINS_LBs + 0.5)
+
+    myMonGroupGeneral.defineHistogram(varname= "Bec_TBinFracAll,TBin_TBinFracAll;" + "TBinFracAll",
+                                      type= "TProfile", 
+                                      title= "fraction of 01X for each region" + "; ;Fraction of 01X",
+                                      path= "/tbin",
+                                      xbins= sctMon.N_REGIONS, xmin = 0., xmax = sctMon.N_REGIONS,
+                                      xlabels= names)
+   
+    myMonGroupGeneral.defineHistogram(varname= "sct_hits",
+                                      type= "TH1F",
+                                      title= "Total SCT Hits;Total SCT Hits;Entries",
+                                      path= "/hits/summary",
+                                      xbins= sctMon.N_NOISE_HIT_BINS, xmin = sctMon.FIRST_NOISE_HIT_BIN, xmax = sctMon.LAST_NOISE_HIT_BIN)
+
+    result.merge(helper.result())
+    return result
+
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
index e810beac3f93b7ebd5ca9a24439c2fa5ee50c609..a9f821c5f86113b488039c5fdb1573405af0911e 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTMonitoringConfig.py
@@ -1,11 +1,17 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 def SCTMonitoringConfig(flags):
     from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
     acc = ComponentAccumulator()
     if flags.DQ.Environment in ('online', 'tier0', 'tier0Raw'):
+        from .SCTErrMonAlg import SCTErrMonAlgConfig
+        acc.merge(SCTErrMonAlgConfig(flags))
+        from .SCTHitEffMonAlg import SCTHitEffMonAlgConfig
+        acc.merge(SCTHitEffMonAlgConfig(flags))
+        from .SCTHitsNoiseMonAlg import SCTHitsNoiseMonAlgConfig
+        acc.merge(SCTHitsNoiseMonAlgConfig(flags))
         from .SCTLorentzMonAlg import SCTLorentzMonAlgConfig
         acc.merge(SCTLorentzMonAlgConfig(flags))
         from .SCTTracksMonAlg import SCTTracksMonAlgConfig
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
index ed109d04c803d8c547f1a236f90b626385dafca0..45930adf8013f47e844d7ddaad7cc47060709f8f 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/CMakeLists.txt
@@ -31,7 +31,7 @@ atlas_add_test( SCTOverlay_test
                 ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
 
 atlas_add_test( TRTOverlay_test
-                SOURCES src/TRTOverlay.cxx test/TRTOverlay_test.cxx
+                SOURCES test/TRTOverlay_test.cxx src/TRTOverlay.cxx
                 INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS}
                 LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps IDC_OverlayBase GaudiKernel InDetRawData StoreGateLib SGtests GeneratorObjects InDetIdentifier InDetSimData TrkTrack TRT_ConditionsServicesLib TRT_ElectronPidToolsLib IdDictParser ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}
                 ENVIRONMENT "JOBOPTSEARCHPATH=${_jobOPath}" )
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
index c9de5b8a2e917f9f63d72f49e1fec7141d6c27d3..367675951898bcf72e68f9dfa8943cdc740c82fd 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlay_test.cxx
@@ -9,6 +9,10 @@
 
 #undef NDEBUG
 
+// Otherwise we get warnings about mutable members in gmock.
+#include "CxxUtils/checker_macros.h"
+ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
+
 // Tested AthAlgorithm
 #include "../InDetOverlay/TRTOverlay.h"
 
@@ -65,18 +69,18 @@ namespace OverlayTesting {
     MOCK_CONST_METHOD1(getDetectorOccupancy, std::map<int, double>(const TRT_RDO_Container*) );
 
     // Dummy methods to confirm status
-    virtual StatusCode initialize() override final {
+    virtual StatusCode initialize() final {
       ATH_MSG_INFO ("initializing MockTRT_LocalOccupancy: " << name());
       return StatusCode::SUCCESS;
     };
 
     // dummy methods implementing in pure virtual interface methods (to make class non-abstract)
     /** Return the local occupancy for the sectors crossed by a given track */
-    virtual float LocalOccupancy( const Trk::Track& ) const override { return 1.0; }; // not used - dummy implementation
-    virtual float LocalOccupancy(const double, const double) const  override{ return 1.0; }; // not used - dummy implementation
+    virtual float LocalOccupancy( const Trk::Track& ) const { return 1.0; }; // not used - dummy implementation
+    virtual float LocalOccupancy(const double, const double) const { return 1.0; }; // not used - dummy implementation
 
     /** Return the global occupancy of the event*/
-    virtual std::vector<float> GlobalOccupancy( ) const override { std::vector<float> dummyVect{}; return dummyVect; }; // not used - dummy implementation
+    virtual std::vector<float> GlobalOccupancy( ) const { std::vector<float> dummyVect{}; return dummyVect; }; // not used - dummy implementation
   };
 
   DECLARE_COMPONENT( MockTRT_LocalOccupancy )
@@ -96,23 +100,23 @@ namespace OverlayTesting {
     virtual ~MockTRT_StrawStatusSummaryTool() = default;
 
     // Dummy methods to confirm status
-    virtual StatusCode initialize() override final {
+    virtual StatusCode initialize() final {
       ATH_MSG_INFO ("initializing MockTRT_StrawStatusSummaryTool: " << name());
       return StatusCode::SUCCESS;
     };
 
-    virtual int getStatus(const Identifier ) const override { return 1; }; // not used - dummy implementation
-    virtual int getStatusPermanent(const Identifier) const override { return 1; }; // not used - dummy implementation
+    virtual int getStatus(const Identifier ) const { return 1; }; // not used - dummy implementation
+    virtual int getStatusPermanent(const Identifier) const { return 1; }; // not used - dummy implementation
     MOCK_CONST_METHOD1(getStatusHT, int(const Identifier)); // This is the only method that we actually need! <--------------
-    virtual bool get_status(const Identifier) const override { return false; }; // not used - dummy implementation
-    virtual bool get_statusHT(const Identifier) const override { return false; }; // not used - dummy implementation
-    virtual const StrawStatusContainer* getStrawStatusHTContainer() const override {return nullptr;}; // not used - dummy implementation
+    virtual bool get_status(const Identifier) const { return false; }; // not used - dummy implementation
+    virtual bool get_statusHT(const Identifier) const { return false; }; // not used - dummy implementation
+    virtual const StrawStatusContainer* getStrawStatusHTContainer() const {return nullptr;}; // not used - dummy implementation
 
-    virtual int getStatus(const Identifier, const EventContext&  ) const override { return 1; }; // not used - dummy implementation
-    virtual int getStatusPermanent(const Identifier, const EventContext& ) const override { return 1; }; // not used - dummy implementation
-    virtual int getStatusHT(const Identifier, const EventContext& ) const override { return 1; }; // not used - dummy implementation
-    virtual bool get_status(const Identifier, const EventContext& ) const override { return false; }; // not used - dummy implementation
-    virtual bool get_statusHT(const Identifier, const EventContext& ) const override { return false; }; // not used - dummy implementation
+    virtual int getStatus(const Identifier, const EventContext&  ) const { return 1; }; // not used - dummy implementation
+    virtual int getStatusPermanent(const Identifier, const EventContext& ) const { return 1; }; // not used - dummy implementation
+    virtual int getStatusHT(const Identifier, const EventContext& ) const { return 1; }; // not used - dummy implementation
+    virtual bool get_status(const Identifier, const EventContext& ) const { return false; }; // not used - dummy implementation
+    virtual bool get_statusHT(const Identifier, const EventContext& ) const { return false; }; // not used - dummy implementation
 
   };
 
@@ -359,7 +363,7 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(), 0 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(), 0u );
   }
 
   TEST_F(TRTOverlay_test, containers_with_matching_empty_collections) {
@@ -390,7 +394,7 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(),1 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(),1u );
     const TRT_RDO_Collection *outputCollection = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection, nullptr );
     ASSERT_TRUE( outputCollection->empty() );
@@ -424,7 +428,7 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(), 2 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(), 2u );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
     ASSERT_TRUE( outputCollection1->empty() );
@@ -482,10 +486,10 @@ namespace OverlayTesting {
     // check output makes sense
     SG::ReadHandle<TRT_RDO_Container> outputDataHandle{"StoreGateSvc+TRT_RDOs"};
     ASSERT_TRUE( outputDataHandle.isValid() );
-    ASSERT_EQ( outputDataHandle->numberOfCollections(), 1 );
+    ASSERT_EQ( outputDataHandle->numberOfCollections(), 1u );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
@@ -561,7 +565,7 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
@@ -569,7 +573,7 @@ namespace OverlayTesting {
     ASSERT_EQ( outputDigit1->driftTimeBin(), sigDriftTimeBin );
     const TRT_RDO_Collection *outputCollection2 = outputDataHandle->indexFindPtr(bkgElementHash);
     ASSERT_NE( outputCollection2, nullptr );
-    ASSERT_EQ( outputCollection2->size(), 1 );
+    ASSERT_EQ( outputCollection2->size(), 1u );
     const TRT_LoLumRawData* outputDigit2 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection2->at(0));
     ASSERT_NE( outputDigit2, nullptr );
     ASSERT_EQ( outputDigit2->highLevel(), bkgHT );
@@ -637,7 +641,7 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
@@ -723,12 +727,12 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
     ASSERT_EQ( outputDigit1->timeOverThreshold(), outputTOT );
-    ASSERT_EQ( outputDigit1->driftTimeBin(), outputDriftTimeBin );
+    ASSERT_EQ( outputDigit1->driftTimeBin(), static_cast<int>(outputDriftTimeBin) );
   }
 
   TEST_F(TRTOverlay_test, containers_with_matching_collections_with_differing_LT_RDOs_same_strawID) {
@@ -821,12 +825,12 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), sigHT );
     ASSERT_EQ( outputDigit1->timeOverThreshold(), outputTOT );
-    ASSERT_EQ( outputDigit1->driftTimeBin(), outputDriftTimeBin );
+    ASSERT_EQ( outputDigit1->driftTimeBin(), static_cast<int>(outputDriftTimeBin) );
   }
 
   TEST_F(TRTOverlay_test, containers_with_matching_collections_with_differing_LT_RDOs_same_strawID_ForceHTbit) {
@@ -918,12 +922,12 @@ namespace OverlayTesting {
     ASSERT_TRUE( outputDataHandle.isValid() );
     const TRT_RDO_Collection *outputCollection1 = outputDataHandle->indexFindPtr(sigElementHash);
     ASSERT_NE( outputCollection1, nullptr );
-    ASSERT_EQ( outputCollection1->size(), 1 );
+    ASSERT_EQ( outputCollection1->size(), 1u );
     const TRT_LoLumRawData* outputDigit1 = dynamic_cast<const TRT_LoLumRawData*>(outputCollection1->at(0));
     ASSERT_NE( outputDigit1, nullptr );
     ASSERT_EQ( outputDigit1->highLevel(), true );
     ASSERT_EQ( outputDigit1->timeOverThreshold(), outputTOT );
-    ASSERT_EQ( outputDigit1->driftTimeBin(), outputDriftTimeBin );
+    ASSERT_EQ( outputDigit1->driftTimeBin(), static_cast<int>(outputDriftTimeBin) );
   }
 
 } // <-- namespace OverlayTesting
diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h
index d16e40b8d40bd89c2a0fee4e982ac123f4e0f927..b61b8bd890b322519ecd88d7521d9cd99fb848e3 100755
--- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool.h
@@ -57,34 +57,43 @@ namespace InDet {
         Output: Changes in information and hitPattern
         Input quantities rot, tsos are used to increment the counts for hits and outliers in information and to set the proper bits in hitPattern.
     */
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::PRDtoTrackMap *prd_to_track_map,
-                         const Trk::RIO_OnTrack* rot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information, 
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override;
-
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::PRDtoTrackMap *prd_to_track_map,
-                         const Trk::CompetingRIOsOnTrack* crot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information, 
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override;
-
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::RIO_OnTrack* rot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information,
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override {
-      analyse(track,nullptr,rot,tsos,information,hitPattern);
+    using IExtendedTrackSummaryHelperTool::analyse;
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const Trk::RIO_OnTrack* rot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override final;
+
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const Trk::CompetingRIOsOnTrack* crot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override final;
+
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::RIO_OnTrack* rot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override
+    {
+      analyse(track, nullptr, rot, tsos, information, hitPattern);
     }
 
-    virtual void analyse(const Trk::Track& track,
-                         const Trk::CompetingRIOsOnTrack* crot,
-                         const Trk::TrackStateOnSurface* tsos,
-                         std::vector<int>& information,
-                         std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const override {
-      analyse(track,nullptr, crot,tsos,information,hitPattern);
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::CompetingRIOsOnTrack* crot,
+      const Trk::TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const override
+    {
+      analyse(track, nullptr, crot, tsos, information, hitPattern);
     }
 
     /** Input : track, partHyp
diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
index aaf99fd5f1e07b0c48e1876cdd85e3d7da4f0538..3205c62f0215d55edb3f22a854102330fa4c8f69 100755
--- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
@@ -108,7 +108,8 @@ namespace {
 }
 
 //==========================================================================
-void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
+void InDet::InDetTrackSummaryHelperTool::analyse(const EventContext& ctx,
+                                                 const Trk::Track& track,
                                                  const Trk::PRDtoTrackMap *prd_to_track_map,
                                                  const Trk::RIO_OnTrack* rot,
                                                  const Trk::TrackStateOnSurface* tsos,
@@ -238,7 +239,7 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
     bool isArgonStraw   = false;
     bool isKryptonStraw = false;
     if (not m_TRTStrawSummaryTool.empty()) {
-      int statusHT = m_TRTStrawSummaryTool->getStatusHT(id);
+      int statusHT = m_TRTStrawSummaryTool->getStatusHT(id,ctx);
       if ( statusHT == TRTCond::StrawStatus::Argon or
            statusHT == TRTCond::StrawStatus::Dead  or
            statusHT == TRTCond::StrawStatus::EmulateArgon ) {
@@ -302,7 +303,8 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
   return;
 }
 
-void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
+void InDet::InDetTrackSummaryHelperTool::analyse(const EventContext& ctx,
+                                                 const Trk::Track& track,
                                                  const Trk::PRDtoTrackMap *prd_to_track_map,
                                                  const Trk::CompetingRIOsOnTrack* crot,
                                                  const Trk::TrackStateOnSurface* tsos,
@@ -310,7 +312,13 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
                                                  std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const
 {
   // re-produce prior behaviour (i.e. just take most probable ROT)
-  analyse(track, prd_to_track_map,  &crot->rioOnTrack(crot->indexOfMaxAssignProb() ), tsos, information, hitPattern);
+  analyse(ctx,
+          track,
+          prd_to_track_map,
+          &crot->rioOnTrack(crot->indexOfMaxAssignProb()),
+          tsos,
+          information,
+          hitPattern);
 }
 
 void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track,
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt
index c4c645b4ee8e596997c9e35babbcaa0b81a26398..7b3574e7378a388d1b99978c8dd0991fdde5d6a2 100644
--- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/CMakeLists.txt
@@ -5,33 +5,6 @@
 # Declare the package name:
 atlas_subdir( SiClusterOnTrackTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/GeoPrimitives
-                          GaudiKernel
-                          InnerDetector/InDetConditions/InDetCondTools
-                          InnerDetector/InDetDetDescr/SCT_ModuleDistortions
-                          InnerDetector/InDetRecEvent/InDetPrepRawData
-                          InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkTools/TrkToolInterfaces
-                          Tracking/TrkEvent/TrkRIO_OnTrack
-                          Tracking/TrkEvent/TrkEventUtils
-                          Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils
-                          Control/StoreGate
-                          PRIVATE
-                          Event/EventPrimitives
-                          InnerDetector/InDetConditions/PixelConditionsTools
-                          InnerDetector/InDetConditions/PixelConditionsData
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/PixelReadoutGeometry
-                          InnerDetector/InDetDetDescr/PixelGeoModel
-                          InnerDetector/InDetRecTools/SiClusterizationTool
-                          Tracking/TrkDetDescr/TrkSurfaces )
-
 # External dependencies:
 find_package( Eigen )
 
@@ -40,7 +13,7 @@ atlas_add_component( SiClusterOnTrackTool
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack PixelConditionsData TrkNeuralNetworkUtilsLib TrkEventUtils)
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives GaudiKernel InDetPrepRawData InDetRIO_OnTrack TrkParameters TrkToolInterfaces StoreGateLib SGtests EventPrimitives InDetIdentifier InDetReadoutGeometry PixelReadoutGeometry SiClusterizationToolLib TrkSurfaces TrkRIO_OnTrack PixelConditionsData TrkNeuralNetworkUtilsLib TrkEventUtils SCT_ModuleDistortionsLib )
 
 # Install files from the package:
 atlas_install_headers( SiClusterOnTrackTool )
diff --git a/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt b/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt
index 25a055221bcd69e840d297af5f25b7c84f26b560..56a6ea1e5718ebc2f39c8287a3a9e1915530a5e1 100644
--- a/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt
+++ b/LArCalorimeter/LArAlignment/LArAlignmentAlgs/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: LArAlignmentAlgs
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArAlignmentAlgs )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Database/RegistrationServices
-                          GaudiKernel
-                          PRIVATE
-                          DetectorDescription/DetDescrCond/DetDescrConditions )
-
 # Component(s) in the package:
 atlas_add_component( LArAlignmentAlgs
                      src/*.cxx
diff --git a/LArCalorimeter/LArBadChannelTool/CMakeLists.txt b/LArCalorimeter/LArBadChannelTool/CMakeLists.txt
index b241c2c5c6f3b35924a825127e0b36f460f866a4..ad0d7d2571ad96596389053efdc7318c67630b3a 100644
--- a/LArCalorimeter/LArBadChannelTool/CMakeLists.txt
+++ b/LArCalorimeter/LArBadChannelTool/CMakeLists.txt
@@ -1,55 +1,32 @@
-################################################################################
-# Package: LArBadChannelTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArBadChannelTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArBadChannelToolLib
                    src/*.cxx
                    PUBLIC_HEADERS LArBadChannelTool
                    INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CaloConditions CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRecConditions StoreGateLib SGtests LArCablingLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRecConditions StoreGateLib LArCablingLib )
 
 atlas_add_component( LArBadChannelTool
                      src/components/*.cxx
-                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                      LINK_LIBRARIES LArBadChannelToolLib )
 
 atlas_add_dictionary( BadChanDict
                       LArBadChannelTool/LArBadChannelDBToolsDict.h
                       LArBadChannelTool/selection.xml
-                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} CaloConditions CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRecConditions LArCablingLib LArBadChannelToolLib )
-
+                      LINK_LIBRARIES LArBadChannelToolLib )
 
 atlas_add_test( LArBadChannelConfigTest
    SCRIPT python -m LArBadChannelTool.LArBadChannelConfig
    POST_EXEC_SCRIPT nopost.sh )
 
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} --extend-ignore=F401,F821 )
diff --git a/LArCalorimeter/LArCOOLConditions/CMakeLists.txt b/LArCalorimeter/LArCOOLConditions/CMakeLists.txt
index 719c7aad5eb46b1481c087e178967debc829a134..e4a3bfdda2612eef3a0b5333fe69d80fb84436a9 100644
--- a/LArCalorimeter/LArCOOLConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArCOOLConditions/CMakeLists.txt
@@ -1,37 +1,20 @@
-################################################################################
-# Package: LArCOOLConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCOOLConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          PRIVATE
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArCOOLConditions
                    src/*.cxx
                    PUBLIC_HEADERS LArCOOLConditions
-                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES Identifier GaudiKernel LArIdentifier LArCablingLib StoreGateLib SGtests LArElecCalib
-                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel AthenaPoolUtilities )
+                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES AthenaKernel Identifier GaudiKernel LArIdentifier LArElecCalib
+                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaPoolUtilities StoreGateLib )
 
 atlas_add_dictionary( LArCOOLConditionsDict
                       LArCOOLConditions/LArCOOLConditionsDict.h
                       LArCOOLConditions/selection.xml
-                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} Identifier GaudiKernel LArCablingLib LArIdentifier AthenaKernel StoreGateLib SGtests AthenaPoolUtilities LArCOOLConditions )
-
+                      LINK_LIBRARIES LArCOOLConditions )
diff --git a/LArCalorimeter/LArCabling/CMakeLists.txt b/LArCalorimeter/LArCabling/CMakeLists.txt
index 2b24348c698a7aa49d4983be1efae9d5fcfaaa83..e958c3fdd97d4fd92384144f7d66a598b895c6d9 100644
--- a/LArCalorimeter/LArCabling/CMakeLists.txt
+++ b/LArCalorimeter/LArCabling/CMakeLists.txt
@@ -1,46 +1,27 @@
-################################################################################
-# Package: LArCabling
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCabling )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Control/CxxUtils
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          PRIVATE
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArCablingLib
                    src/*.cxx
                    PUBLIC_HEADERS LArCabling
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities Identifier GaudiKernel LArIdentifier StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} PathResolver )
+                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel AthenaPoolUtilities CxxUtils Identifier LArIdentifier StoreGateLib
+                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} PathResolver )
 
 atlas_add_component( LArCabling
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
                      LINK_LIBRARIES LArCablingLib )
 
 atlas_add_dictionary( LArCablingDict
                       LArCabling/LArCablingDict.h
                       LArCabling/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier PathResolver LArCablingLib )
+                      LINK_LIBRARIES LArCablingLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt b/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt
index 6d6d3b1bae4361dc9462c782e739b5a343b0af9b..2a3d854e8e1b7fde9317b379cb23db8647edb45e 100644
--- a/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibDataQuality/CMakeLists.txt
@@ -1,33 +1,15 @@
-################################################################################
-# Package: LArCalibDataQuality
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibDataQuality )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent )
-
 # Component(s) in the package:
 atlas_add_component( LArCalibDataQuality
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArRawConditions LArRecConditions LArCablingLib xAODEventInfo LArIdentifier LArRawEvent )
+                     LINK_LIBRARIES CaloIdentifier AthenaBaseComps StoreGateLib GaudiKernel LArElecCalib LArRawConditions LArRecConditions LArCablingLib xAODEventInfo LArIdentifier LArRawEvent )
 
 # Install files from the package:
-atlas_install_headers( LArCalibDataQuality )
-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/LArCalorimeter/LArCalibTools/CMakeLists.txt b/LArCalorimeter/LArCalibTools/CMakeLists.txt
index bc5520802b16fa65f722823f22ceddf27e41618b..945a3c73452eaf396de9b1e8bf6ff7eda19fe129 100644
--- a/LArCalorimeter/LArCalibTools/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibTools/CMakeLists.txt
@@ -1,48 +1,18 @@
-################################################################################
-# Package: LArCalibTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRawEvent
-                          LumiBlock/LumiBlockComps
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-                          Calorimeter/CaloCondBlobObjs
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/EventInfo
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          LumiBlock/LumiBlockData
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArCondUtils
-                          LArCalorimeter/LArTools )
-
 # External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( CORAL COMPONENTS CoralBase )
+find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO )
 
 # Component(s) in the package:
 atlas_add_component( LArCalibTools
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRecConditions CaloCondBlobObjs AthenaKernel AthenaPoolUtilities EventInfo LArCOOLConditions LArRawEvent LArToolsLib TrigDecisionToolLib LumiBlockCompsLib )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloCondBlobObjs CaloDetDescrLib CaloIdentifier EventInfo GaudiKernel LArCOOLConditions LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRecConditions LArToolsLib LumiBlockData StoreGateLib TrigDecisionToolLib xAODEventInfo )
 
 # Install files from the package:
-atlas_install_headers( LArCalibTools )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArCalibUtils/CMakeLists.txt b/LArCalorimeter/LArCalibUtils/CMakeLists.txt
index 459654c622a378537fc584f9d4163d1f61aeb76a..a3af10ba9ce3c7d07c5acc5233d26eb341d7a89d 100644
--- a/LArCalorimeter/LArCalibUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibUtils/CMakeLists.txt
@@ -1,42 +1,14 @@
-################################################################################
-# Package: LArCalibUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRecUtils
-                          LArCalorimeter/LArCabling
-                          TestBeam/TBEvent
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArBadChannelTool
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArSimEvent
-                          Trigger/TrigAnalysis/TrigAnalysisInterfaces )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
+find_package( CORAL COMPONENTS CoralBase )
 find_package( Eigen )
 find_package( GSL )
-find_package( ROOT COMPONENTS Minuit Core Tree MathCore Hist RIO pthread MathMore Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
+find_package( ROOT COMPONENTS Minuit Core Tree MathCore Hist RIO Graf )
 find_package( TBB )
 
 # Component(s) in the package:
@@ -44,9 +16,7 @@ atlas_add_component( LArCalibUtils
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${TBB_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRawUtilsLib LArRecConditions LArRecUtilsLib LArCablingLib TBEvent CaloDetDescrLib AthenaPoolUtilities xAODEventInfo LArBadChannelToolLib LArCOOLConditions LArSimEvent TrigAnalysisInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GSL_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${TBB_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthContainers AthenaBaseComps AthenaKernel StoreGateLib Identifier GaudiKernel LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRawUtilsLib LArRecConditions LArRecUtilsLib LArCablingLib TBEvent CaloDetDescrLib AthenaPoolUtilities xAODEventInfo LArBadChannelToolLib LArCOOLConditions LArSimEvent TrigAnalysisInterfaces )
 
 # Install files from the package:
-atlas_install_headers( LArCalibUtils )
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h
index 1e110eeb8060ec8eea8b15fbf0fb41d33eb8a504..29bd7d575e7cd2702958fd3e83ee133a42dead45 100644
--- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h
+++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArCalibDigitMaker.h
@@ -23,6 +23,7 @@ class LArCalibDigitMaker : public AthAlgorithm
   StatusCode finalize(){return StatusCode::SUCCESS;}
  private:
   SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapKey{this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"};
+  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapSCKey{this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"};
   std::vector<std::string> m_keylist;
   std::vector<unsigned> m_vPattern;
   std::vector<unsigned> m_vDAC;
@@ -31,6 +32,8 @@ class LArCalibDigitMaker : public AthAlgorithm
   unsigned m_nTrigger;
   double m_delayScale;
   bool m_dontRun;
+  bool m_isSC;
+  
 };
 
 #endif
diff --git a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h
index ad0221e3578db63e22607c2b9c339899858a73de..673d7a0a763baca49db68cf96068139a629b817a 100644
--- a/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h
+++ b/LArCalorimeter/LArCalibUtils/LArCalibUtils/LArRampBuilder.h
@@ -47,8 +47,9 @@
 #include "LArCabling/LArOnOffIdMapping.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
+#include "LArRecConditions/LArCalibLineMapping.h"
 //#include "LArCalibTriggerAccumulator.h"
-
+#include "CaloDetDescr/ICaloSuperCellIDTool.h"
 #include <vector>
 #include <string>
 #include <map>
@@ -76,6 +77,8 @@ public:
 
 private:
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKeySC{this,"ScCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};
+
   //Private member functions
   // choose reconstruction mode (i.e. OF or Parabola)
   void chooseRecoMode() ;
@@ -100,7 +103,8 @@ private:
   ToolHandle<LArParabolaPeakRecoTool> m_peakParabolaTool;
   ToolHandle<LArShapePeakRecoTool>    m_peakShapeTool;
   ToolHandle<LArOFPeakRecoTool>       m_peakOFTool;
- 
+  ToolHandle<ICaloSuperCellIDTool> m_sc2ccMappingTool;
+
   unsigned m_event_counter; 
   int m_delay;
   int m_ipassShape; 
@@ -162,6 +166,14 @@ private:
 
   uint16_t m_fatalFebErrorPattern;
 
+  // For calib line mapping, only used for SC for now 
+  IntegerProperty m_nPulsedCalibLines;
+  std::vector<int> m_pulsedCalibLines;    
+  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapKey{this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"};
+  SG::ReadCondHandleKey<LArCalibLineMapping> m_calibMapSCKey{this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"};
+  
+
+
 };
 
 #endif
diff --git a/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py b/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
index 164c5e480d9ec16e370063a2864dcc82185e0140..5c4d9f00854b3d1abc37c945cf5c7daa1942e601 100644
--- a/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
+++ b/LArCalorimeter/LArCalibUtils/python/GetCoolChannelSelection.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 from __future__ import print_function
 
 
@@ -6,8 +6,6 @@ def GetCoolChannelSelection(partition, gain, withPS):
     if (gain<0 or gain>3):
         print ("ERROR Gain out of range: ", gain)
         return ""
-    AccList=[]
-    PSList=[]
     if (gain==0):
         g=0
     elif (gain==1): #Medium
@@ -19,25 +17,25 @@ def GetCoolChannelSelection(partition, gain, withPS):
         return ""
     retString=""
     if (partition=="EMBA"):
-        retstring="%i:%i"%(g+35,g+66)
+        retString="%i:%i"%(g+35,g+66)
         if (withPS):
-            retstring+=",%s:%s"%(g+149,g+180)
+            retString+=",%s:%s"%(g+149,g+180)
             
     elif (partition=="EMBC"):
-        retstring="%i:%i"%(g+3,g+34)
+        retString="%i:%i"%(g+3,g+34)
         if (withPS):
-            retstring+=",%s:%s"%(g+117,g+148)
+            retString+=",%s:%s"%(g+117,g+148)
     
     elif (partition=="EMECA"):
-        retstring="%i:%i,%i,%i,%i,%i"\
+        retString="%i:%i,%i,%i,%i,%i"\
                      %(g+92,g+116,g+232,g+234,g+236,g+238)
         if (withPS):
-            retstring+=",%s:%s"%(g+210,g+230)
+            retString+=",%s:%s"%(g+210,g+230)
             
     elif (partition=="EMECA"):
-        retstring="%i:%i,%i,%i,%i,%i"\
+        retString="%i:%i,%i,%i,%i,%i"\
                    %(g+67,g+91,g+231,g+233,g+235,g+237)
         if (withPS):
-            retstring+=",%s:%s"%(g+181,g+209)
+            retString+=",%s:%s"%(g+181,g+209)
             
-    return retstring
+    return retString
diff --git a/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx
index b56db1c4e0e898ed9650b794231773e5ba8b803a..ebe0864264a3f7f6461c8956dee53d28fd11c686 100755
--- a/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArAutoCorrMaker.cxx
@@ -49,7 +49,6 @@ LArAutoCorrMaker::LArAutoCorrMaker(const std::string& name, ISvcLocator* pSvcLoc
   declareProperty("KeyOutput",    m_keyoutput="LArAutoCorr");
   declareProperty("events_ref",   m_nref=50);
   declareProperty("nsigma",       m_rms_cut=5);
-  declareProperty("Nsamples",     m_nsamples=32);
   declareProperty("normalize",    m_normalize=1); 
   declareProperty("physics",      m_physics=0); 
   declareProperty("GroupingType", m_groupingType); 
@@ -139,7 +138,10 @@ StatusCode LArAutoCorrMaker::execute()
     ATH_MSG_DEBUG("Got LArDigitContainer with key " << *key_it <<", size="  << larDigitContainer->size());
     ++m_nEvents;
     LArDigitContainer::const_iterator it=larDigitContainer->begin();
-    LArDigitContainer::const_iterator it_end=larDigitContainer->end();    
+    LArDigitContainer::const_iterator it_end=larDigitContainer->end();  
+    m_nsamples = (*larDigitContainer->begin())->nsamples();
+    ATH_MSG_DEBUG("NSAMPLES (from digit container) = " << m_nsamples );
+
     for(;it!=it_end;it++){
       const HWIdentifier chid=(*it)->hardwareID();
       const CaloGain::CaloGain gain=(*it)->gain();
diff --git a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
index 7a4a666a50e156c3daf4e1a090c0ec688a3ece9a..c52a8c8f38632b83510d386852aaac7365423a94 100644
--- a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
@@ -33,6 +33,7 @@ LArCalibDigitMaker::LArCalibDigitMaker(const std::string& name, ISvcLocator* pSv
  declareProperty("BoardIDs",m_vBoardIDs);
  declareProperty("DelayScale",m_delayScale=(25./240.)*ns);
  declareProperty("DontRun",m_dontRun=false); //Put only Board configuration in DetectorStore
+ declareProperty("isSC",m_isSC=false);
 }
 
 LArCalibDigitMaker::~LArCalibDigitMaker() 
@@ -42,7 +43,18 @@ LArCalibDigitMaker::~LArCalibDigitMaker()
 StatusCode LArCalibDigitMaker::initialize()
 {
   ATH_MSG_DEBUG ( "======== LArCalibDigitMaker Initialize ========" );
-  ATH_CHECK( m_calibMapKey.initialize() );
+  // bool containsKeySC = false;
+  for (unsigned int i = 0; i < m_keylist.size(); ++i) {
+    if (m_keylist.at(i).compare("SC") == 0) {
+       m_isSC = true;
+       ATH_MSG_DEBUG ( "======== LArCalibDigitMaker isSC is True  ========" );
+    }
+  }
+  if(m_isSC){
+    ATH_CHECK( m_calibMapSCKey.initialize() );
+  }else{
+    ATH_CHECK( m_calibMapKey.initialize() );
+  }
     
 //  std::cout << "Pattern.size()=" << m_vPattern.size() << std::endl;
 //   std::cout << "DAC.size()=" << m_vDAC.size() << std::endl;
@@ -51,6 +63,9 @@ StatusCode LArCalibDigitMaker::initialize()
 //   std::cout << "BoardIDs.size()=" << m_vBoardIDs.size() << std::endl;
 
   //Check if calibParams are given consistently: Either all or non
+
+
+
   if (!((m_vBoardIDs.size()==0 && m_vDAC.size()==0 && m_vDelay.size()==0 && m_vPattern.size()==0 && m_nTrigger==0) ||
       (m_vBoardIDs.size() && m_vDAC.size() && m_vDelay.size() && m_vPattern.size() && m_nTrigger))) {
     ATH_MSG_ERROR ( "Problem with jobOptions! Please set either ALL calibration parameters" << std:: endl 
@@ -92,8 +107,18 @@ StatusCode LArCalibDigitMaker::execute() {
 
  const EventContext& ctx = Gaudi::Hive::currentContext();
 
- SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
- const LArCalibLineMapping* clcabling{*clHdl};
+
+ const LArCalibLineMapping *clcabling=0;
+ if(m_isSC) {
+   ATH_MSG_DEBUG ( "======== LArCalibDigitMaker: using SC calib line map" );
+   SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapSCKey};
+   clcabling=*clHdl;
+ } else {
+   SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
+   clcabling=*clHdl;
+ }
+ 
+
  if(!clcabling) {
     ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_calibMapKey.key() );
     return StatusCode::FAILURE;
diff --git a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
index c28511fdd1b70f6c915be1157a87a8ec03c5b757..40177ba1d2ac3e23722ac526391948fdd2738399 100644
--- a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
@@ -26,6 +26,7 @@ LArRampBuilder::LArRampBuilder(const std::string& name, ISvcLocator* pSvcLocator
     m_peakParabolaTool("LArParabolaPeakRecoTool"),
     m_peakShapeTool("LArShapePeakRecoTool"),
     m_peakOFTool("LArOFPeakRecoTool"),
+    m_sc2ccMappingTool("CaloSuperCellIDTool"),
     m_event_counter(0),
     m_recoType(OF),
     m_onlineHelper(),
@@ -87,6 +88,7 @@ StatusCode LArRampBuilder::initialize()
   
   StatusCode sc;
   if ( m_isSC ) {
+    ATH_MSG_DEBUG("==== LArRampBuilder - looking at SuperCells ====");
     const LArOnline_SuperCellID* ll;
     sc = detStore()->retrieve(ll, "LArOnline_SuperCellID");
     if (sc.isFailure()) {
@@ -111,8 +113,19 @@ StatusCode LArRampBuilder::initialize()
     }
     
   }
-  
+  if ( m_isSC ) ATH_CHECK( m_sc2ccMappingTool.retrieve() );
+
   ATH_CHECK( m_cablingKey.initialize() );
+  if ( m_isSC ) ATH_CHECK( m_cablingKeySC.initialize() );
+
+  // Initialise keys for calib line mapping
+  if (m_isSC){   
+    ATH_CHECK( m_calibMapSCKey.initialize() );
+    ATH_CHECK( m_calibMapKey.initialize() );
+  }else{
+    ATH_CHECK( m_calibMapKey.initialize() );
+  }
+    
 
   if(m_doBadChannelMask) { 
     sc=m_badChannelMask.retrieve(); 
@@ -151,6 +164,9 @@ StatusCode LArRampBuilder::initialize()
        ATH_MSG_INFO( " register callback for HEC map " );
      }
   }
+ 
+  
+
 
   return StatusCode::SUCCESS;
 }
@@ -229,6 +245,55 @@ StatusCode LArRampBuilder::execute()
     if (m_event_counter==1)
       ATH_MSG_WARNING("No FebErrorSummaryObject found! Feb errors not checked!");
  
+  
+
+  ///*
+  // calib line mapping for SC
+  const LArCalibLineMapping *clCont=0;
+  const LArCalibLineMapping *clContSC=0;
+  if(m_isSC) {
+    ATH_MSG_DEBUG( "LArRampBuilder: using SC calib map" );
+    SG::ReadCondHandle<LArCalibLineMapping> clHdlSC{m_calibMapSCKey};
+    clContSC=*clHdlSC;
+
+    if(!clContSC) {
+      ATH_MSG_WARNING( "Do not have SC calib line mapping !!!" );
+      return StatusCode::FAILURE;
+    } else {
+      ATH_MSG_DEBUG( "DONE THE SETUP SC calib line" );
+    }
+  }//} else {
+  // calib line mapping for main readout
+  SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
+  clCont=*clHdl;
+  //}
+  if(!clCont) {
+    ATH_MSG_WARNING( "Do not have calib line mapping !!!" );
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_DEBUG( "DONE THE SETUP calib line" );
+  }
+  // end of calib line mapping
+  // */
+  
+  const LArOnOffIdMapping* cabling(0);
+  if( m_isSC ){
+    SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKeySC};
+    cabling = {*cablingHdl};
+    if(!cabling) {
+	ATH_MSG_ERROR("Do not have mapping object " << m_cablingKeySC.key());
+        return StatusCode::FAILURE;
+    }
+  }else{
+    SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
+    cabling = {*cablingHdl};
+    if(!cabling) {
+       ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
+       return StatusCode::FAILURE;
+    }
+  }
+  
+  
 
   std::vector<std::string>::const_iterator key_it=m_keylist.begin();
   std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
@@ -301,6 +366,8 @@ StatusCode LArRampBuilder::execute()
 	  int DAC = larCaliWave.getDAC();
 	  IdentifierHash chidwave_hash = m_onlineHelper->channel_Hash(itVec.channelId());
 	  
+
+
 	  bool IsBad = false;
 	  for(int i=0;i<24*NSamplesKeep;i++){
 	    tempWave[i] = larCaliWave.getSample(i);
@@ -371,6 +438,27 @@ StatusCode LArRampBuilder::execute()
 	}
       }
 
+      // HEC Calibration lines
+      const std::vector<HWIdentifier>& calibLineV = clCont->calibSlotLine(chid);
+      ATH_MSG_DEBUG( "pulsed lines: "<< calibLineV.size() );
+      if(m_isSC){
+	const std::vector<HWIdentifier>& calibLineVSC = clContSC->calibSlotLine(chid);
+	ATH_MSG_DEBUG( "pulsed SC lines: "<< calibLineVSC.size() );
+      }
+      // std::vector<HWIdentifier>::const_iterator calibLineIt = calibLineV.begin();
+      // for(calibLineIt = calibLineV.begin(); calibLineIt != calibLineV.end();++calibLineIt) {
+      // ATH_MSG_DEBUG( "CALIB LINE "<< m_onlineHelper->channel(*calibLineIt) );
+      // }
+      
+      std::vector<Identifier> ccellIds(0);
+      if( m_isSC ){
+	Identifier myofflineID = cabling->cnvToIdentifier((*it)->hardwareID()) ;
+
+	ccellIds = m_sc2ccMappingTool->superCellToOfflineID( myofflineID );
+	ATH_MSG_DEBUG( "Cell: " << myofflineID << " " << (*it)->channelID() << " " << chid << " " << ccellIds.size() << " : " << ccellIds );
+      }
+
+
       if (m_delay==-1) { //First (pulsed) cell to be processed:
 	m_delay=(*it)->delay();
       }
@@ -440,16 +528,28 @@ StatusCode LArRampBuilder::execute()
       //            << " mean " << (*it)->mean()[0] << " " << (*it)->mean()[1] << " " << (*it)->mean()[2] << " " << (*it)->mean()[3]
       //            << " " << (*it)->mean()[4] << " " << (*it)->mean()[5] << " " << (*it)->mean()[6] << std::endl;
       //     }
-      //  }
+      //  }      
+
       
-      LArCalibTriggerAccumulator& accpoints=(m_ramps->get(chid,gain))[(*it)->DAC()];
-      //rawramp.addAccumulatedEvent( (*it)->mean(),(*it)->RMS(), (*it)->nTriggers() );
-      LArCalibTriggerAccumulator::ERRTYPE ec=accpoints.add((*it)->sampleSum(),(*it)->sample2Sum(),(*it)->nTriggers());
-      if (ec==LArCalibTriggerAccumulator::WrongNSamples) {
-	ATH_MSG_ERROR( "Failed to accumulate sub-steps: Inconsistent number of ADC samples");
-      }
-      if (ec==LArCalibTriggerAccumulator::NumericOverflow) {
-	ATH_MSG_ERROR( "Failed to accumulate sub-steps: Numeric Overflow");
+      if (m_isSC){  // Changed here to give DAC value for supercell, rather than DAC for a constituent cell
+	LArCalibTriggerAccumulator& accpoints=(m_ramps->get(chid,gain))[(*it)->DAC()*ccellIds.size()];
+	LArCalibTriggerAccumulator::ERRTYPE ec=accpoints.add((*it)->sampleSum(),(*it)->sample2Sum(),(*it)->nTriggers());
+	if (ec==LArCalibTriggerAccumulator::WrongNSamples) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Inconsistent number of ADC samples");
+	}
+	if (ec==LArCalibTriggerAccumulator::NumericOverflow) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Numeric Overflow");
+	}
+      }else{
+	LArCalibTriggerAccumulator& accpoints=(m_ramps->get(chid,gain))[(*it)->DAC()];
+	//rawramp.addAccumulatedEvent( (*it)->mean(),(*it)->RMS(), (*it)->nTriggers() );
+	LArCalibTriggerAccumulator::ERRTYPE ec=accpoints.add((*it)->sampleSum(),(*it)->sample2Sum(),(*it)->nTriggers());
+	if (ec==LArCalibTriggerAccumulator::WrongNSamples) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Inconsistent number of ADC samples");
+	}
+	if (ec==LArCalibTriggerAccumulator::NumericOverflow) {
+	  ATH_MSG_ERROR( "Failed to accumulate sub-steps: Numeric Overflow");
+	}
       }
     }//End loop over all cells
   } //End loop over all containers
@@ -483,13 +583,17 @@ StatusCode LArRampBuilder::stop()
   else
     larRampComplete=NULL;
   
+  
   SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
   const LArOnOffIdMapping* cabling{*cablingHdl};
   if(!cabling) {
-     ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
-     return StatusCode::FAILURE;
+    ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
+    return StatusCode::FAILURE;
   }
 
+
+
+
   int containerCounter=0;
   //Outermost loop goes over all gains (different containers).
   //for (CaloGain::CaloGain gain=CaloGain::LARHIGHGAIN;gain<CaloGain::LARNGAIN;gain++) {
@@ -525,6 +629,9 @@ StatusCode LArRampBuilder::stop()
       std::vector<float> adc0v;
       bool isADCsat = false;
 
+
+
+
       for (;dac_it!=dac_it_e;dac_it++) {
 
         LArRawRamp::RAMPPOINT_t ramppoint;
diff --git a/LArCalorimeter/LArCellRec/CMakeLists.txt b/LArCalorimeter/LArCellRec/CMakeLists.txt
index 2adcbe8fc7a27a1302e13dca7bda2c494829b8b5..1387a70c0c2e24eadbc17b220944238489734085 100644
--- a/LArCalorimeter/LArCellRec/CMakeLists.txt
+++ b/LArCalorimeter/LArCellRec/CMakeLists.txt
@@ -1,46 +1,8 @@
-################################################################################
-# Package: LArCellRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCellRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloRec
-                          Calorimeter/CaloUtils
-                          Control/AthAllocators
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-			  Control/CxxUtils
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArSimEvent
-                          Event/xAOD/xAODTrigL1Calo
-                          PRIVATE
-                          Calorimeter/CaloTriggerTool
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventInfo
-                          Generators/GeneratorObjects
-                          LArCalorimeter/LArRecEvent
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArCOOLConditions
-                          Trigger/TrigT1/TrigT1CaloCalibConditions
-                          Trigger/TrigT1/TrigT1CaloCondSvc 
-                          Generators/AtlasHepMC )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -51,25 +13,22 @@ atlas_add_component( LArCellRec
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${TBB_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${TBB_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier 
-		     CaloRecLib CaloUtilsLib AthAllocators AthenaBaseComps AthenaKernel StoreGateLib CxxUtils SGtests AtlasDetDescr Identifier GaudiKernel LArIdentifier 
-		     LArRawEvent LArRecConditions LArCOOLConditions LArSimEvent CaloTriggerToolLib AthenaPoolUtilities xAODEventInfo xAODTrigL1Calo GeneratorObjects 
-		     LArRecEvent LArCablingLib TrigT1CaloCalibConditions TrigT1CaloCondSvcLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} CaloConditions CaloDetDescrLib CaloEvent CaloIdentifier CaloInterfaceLib
+		             CaloUtilsLib AthAllocators AthenaBaseComps AthenaKernel StoreGateLib CxxUtils Identifier GaudiKernel LArIdentifier
+		             LArRawEvent LArRecConditions CaloTriggerToolLib AthenaPoolUtilities xAODEventInfo xAODTrigL1Calo
+		             LArRecEvent LArCablingLib LArElecCalib TrigT1CaloCalibConditions TrigT1CaloCondSvcLib )
 
 # 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_add_test( LArBadFebMaskingTool_test
 #  SCRIPT test/LArBadFebMaskingTool_test.sh
 #  PROPERTIES TIMEOUT 600
 #  LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|Cache alignment" )
 
-
 atlas_add_test( LArCellDeadOTXCorr_test
   SCRIPT test/LArCellDeadOTXCorr_test.sh
   PROPERTIES TIMEOUT 600
   LOG_IGNORE_PATTERN "LArDetectorToolNV|is still valid|no data retrieved|Database being retired|Reading file|Unable to locate catalog|Resolved path|DigitizationFlags|^Domain|created CondCont|no dictionary for class|^ +[+]|Reading LArPedestalMC|IOV callback|^DetectorStore|Cache alignment|object with key|recorded new|into Conditions|IOVDbSvc +INFO" )
 
-
diff --git a/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py b/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py
index 09421761b54e946f9cf42fd0d72811070bd7fd1c..d685adf6a24c65d205f84907e9ef5987370b5cec 100644
--- a/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py
+++ b/LArCalorimeter/LArCellRec/python/LArCellDeadOTXCorrToolDefault.py
@@ -1,12 +1,14 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 def LArCellDeadOTXCorrToolDefault(name='LArCellDeadOTXCorr'):
+    from AthenaCommon.Logging import logging
+    mlog = logging.getLogger( 'LArCellDeadOTXCorrToolDefault' )
 
-    import traceback
     try :
         from LArCellRec.LArCellRecConf import LArCellDeadOTXCorr
         theLArCellDeadOTXCorr = LArCellDeadOTXCorr(name)
-    except:
+    except Exception:
+        import traceback
         mlog.error("could not get handle to LArCellDeadOTXCorr Quit")
         traceback.print_exc()
         return False 
@@ -51,9 +53,9 @@ def LArCellDeadOTXCorrToolDefault(name='LArCellDeadOTXCorr'):
 
 
         L1CaloDb=""
-        if not 'L1CaloDbConnection' in dir():
+        if 'L1CaloDbConnection' not in dir():
             if 'L1CaloSqliteDB' in dir():
-                L1CaloDbConnection="<dbConnection>sqlite://;schema=" + L1CaloSqliteDB + ";dbname=L1CALO</dbConnection>"
+                L1CaloDbConnection="<dbConnection>sqlite://;schema=" + L1CaloSqliteDB + ";dbname=L1CALO</dbConnection>" # noqa: F821
             else:
                 L1CaloDb="TRIGGER"
                 L1CaloDbConnection=""
diff --git a/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py b/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py
index 69b8315ac6565ceb985b144172a19abaa14e1174..d489b4915a8b95c31a8b2e91288b21de3c65cd13 100644
--- a/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py
+++ b/LArCalorimeter/LArCellRec/python/LArCellHVCorrDefault.py
@@ -1,17 +1,15 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-#from AthenaCommon.Logging import logging 
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 #Note: This tool is used as CaloCellCorrection tool and by the CaloNoiseTool
 def LArCellHVCorrDefault(name="LArCellHVCorrDefault"):
-     # check if tool already exists
+    # check if tool already exists
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
     if hasattr(svcMgr.ToolSvc, name):
         # re-use previously configured (public) tool
         return getattr(svcMgr.ToolSvc, name)
     
     
-    from LArConditionsCommon import LArHVDB
+    from LArConditionsCommon import LArHVDB  # noqa: F401
 
     from LArCellRec.LArCellRecConf import LArCellHVCorr
     theLArCellHVCorr = LArCellHVCorr(name)
diff --git a/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py b/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py
index fdaaa599c67a4b133b6d3c76b1f20818b790b021..a175b97da2a9bda81c92cd64fd3832fbdc683728 100644
--- a/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py
+++ b/LArCalorimeter/LArCellRec/python/LArCollisionTimeGetter.py
@@ -1,6 +1,5 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# $Id$
 #
 # @file LArCellRec/python/LArCollisionTimeGetter.py
 # @author scott snyder <snyder@bnl.gov>
@@ -47,7 +46,7 @@ class LArCollisionTimeGetter ( Configured )  :
             objKeyStore.addTransient (self.outputType(),self.outputKey())
 
             self.seq += self._handle
-        except:
+        except Exception:
             mlog.error ("Error configuring LArCollisionTimeAlg.")
             traceback.print_exc()
 
diff --git a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
index 41d5e6b8f153a7bdf5975999694e4aef330b0c5c..c5c6bda0285affe21bfad4f4524b0a44ee384497 100755
--- a/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
+++ b/LArCalorimeter/LArCellRec/python/LArNoisyROSummaryGetter.py
@@ -21,7 +21,7 @@ class LArNoisyROSummaryGetter ( Configured )  :
         try:
             from CaloRec.CaloCellGetter import CaloCellGetter
             theCaloCellGetter = CaloCellGetter()
-        except:
+        except Exception:
             mlog.error("could not get handle to CaloCell Quit")
             traceback.print_exc()
             return False
@@ -38,7 +38,7 @@ class LArNoisyROSummaryGetter ( Configured )  :
         # cannot have same name
         try:        
             from LArCellRec.LArCellRecConf import LArNoisyROAlg,LArNoisyROTool
-        except:
+        except Exception:
             mlog.error("could not import LArNoisyROAlg or LArNoisyROTool")
             traceback.print_exc()
             return False
diff --git a/LArCalorimeter/LArClusterRec/CMakeLists.txt b/LArCalorimeter/LArClusterRec/CMakeLists.txt
index c108a617de4a645cb8f901da7d382002808e6105..54e498696df04d43715455ed73ecca7b753dbfb2 100644
--- a/LArCalorimeter/LArClusterRec/CMakeLists.txt
+++ b/LArCalorimeter/LArClusterRec/CMakeLists.txt
@@ -1,36 +1,15 @@
-################################################################################
-# Package: LArClusterRec
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArClusterRec )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloRec
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          Event/xAOD/xAODCaloEvent
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecEvent
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Calorimeter/CaloUtils
-                          Control/AthContainers
-                          DetectorDescription/Identifier
-                          LArCalorimeter/LArRawEvent 
-			  LArCalorimeter/LArRecConditions)
-
 # Component(s) in the package:
 atlas_add_component( LArClusterRec
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloEvent CaloRecLib AthenaBaseComps StoreGateLib SGtests xAODCaloEvent GaudiKernel LArIdentifier LArRecEvent LArCablingLib CaloUtilsLib AthContainers Identifier LArRawEvent )
+                     LINK_LIBRARIES CaloEvent CaloRecLib AthenaBaseComps StoreGateLib xAODCaloEvent GaudiKernel LArIdentifier LArRecEvent LArCablingLib CaloUtilsLib AthContainers Identifier LArRawEvent )
 
 # Install files from the package:
-atlas_install_headers( LArClusterRec )
-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/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt b/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt
index af833d5353be96502cc08e01bdcd6a2fba6e2e6a..c8923e22a5156cee88fabab80ed4c53ca28d1507 100644
--- a/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArByteStream/CMakeLists.txt
@@ -1,39 +1,8 @@
-# $Id: CMakeLists.txt 757209 2016-06-23 11:15:56Z krasznaa $
-################################################################################
-# Package: LArByteStream
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArByteStream )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Calorimeter/CaloDetDescr
-   Calorimeter/CaloIdentifier
-   Calorimeter/CaloUtils
-   Control/AthenaBaseComps
-   Control/AthenaKernel
-   Control/StoreGate
-   Event/xAOD/xAODEventInfo
-   Event/ByteStreamCnvSvcBase
-   Event/ByteStreamData
-   GaudiKernel
-   LArCalorimeter/LArIdentifier
-   LArCalorimeter/LArROD
-   LArCalorimeter/LArRawEvent
-   LArCalorimeter/LArRawUtils
-   LArCalorimeter/LArRecConditions
-   LArCalorimeter/LArRecEvent
-   LArCalorimeter/LArRecUtils
-   LArCalorimeter/LArCabling
-   PRIVATE
-   Calorimeter/CaloInterface
-   DetectorDescription/AtlasDetDescr
-   DetectorDescription/Identifier
-   Event/ByteStreamCnvSvc
-   LArCalorimeter/LArRawConditions )
-
 # External dependencies:
 find_package( tdaq-common COMPONENTS eformat eformat_write )
 
@@ -45,14 +14,14 @@ atlas_add_library( LArByteStreamLib
    LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier AthenaBaseComps
    AthenaKernel xAODEventInfo ByteStreamData GaudiKernel LArIdentifier LArRawEvent
    LArRecConditions LArRecEvent CaloDetDescrLib CaloUtilsLib StoreGateLib
-   ByteStreamCnvSvcBaseLib LArRODLib LArRawUtilsLib LArRecUtilsLib LArCablingLib
+   ByteStreamCnvSvcBaseLib LArRawUtilsLib LArRecUtilsLib LArCablingLib
    ByteStreamCnvSvcLib
-   PRIVATE_LINK_LIBRARIES AtlasDetDescr Identifier LArRawConditions )
+   PRIVATE_LINK_LIBRARIES AtlasDetDescr CaloInterfaceLib Identifier LArRawConditions )
 
 atlas_add_component( LArByteStream
    src/components/*.cxx
    LINK_LIBRARIES LArByteStreamLib )
 
 # 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/*.txt share/*.py )
diff --git a/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt b/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt
index 0db331bdd0629a0cfc39809b74d10e09ea62729f..2f0d71d7a6941876ba2ee83b180331384d00157e 100644
--- a/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArCondAthenaPool/CMakeLists.txt
@@ -1,19 +1,8 @@
-################################################################################
-# Package: LArCondAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCondAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArCnv/LArCondTPCnv
-                          LArCalorimeter/LArRawConditions )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( LArCondAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt
index ea3379c4087202a923474b0821c107109703fdfd..11000b86648b4688f0cc96ef74442b1426ccbc4f 100644
--- a/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArCondTPCnv/CMakeLists.txt
@@ -1,106 +1,91 @@
-################################################################################
-# Package: LArCondTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCondTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArRawConditions
-                          PRIVATE
-                          Control/AthenaKernel
-                          LArCalorimeter/LArElecCalib )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( LArCondTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS LArCondTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawConditions AthenaKernel )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib LArRawConditions
+                         PRIVATE_LINK_LIBRARIES AthenaKernel LArElecCalib )
 
 atlas_add_dictionary( LArCondTPCnvDict
                       LArCondTPCnv/LArCondTPCnvDict.h
                       LArCondTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawConditions AthenaKernel LArCondTPCnv )
+                      LINK_LIBRARIES LArCondTPCnv )
 
 atlas_add_dictionary( OLD_LArCondTPCnvDict
                       LArCondTPCnv/LArCondTPCnvDict.h
                       LArCondTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawConditions AthenaKernel LArCondTPCnv )
+                      LINK_LIBRARIES LArCondTPCnv )
 
 atlas_add_test( LArAutoCorrSubsetCnv_p1_test
                 SOURCES
                 test/LArAutoCorrSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArCaliWaveSubsetCnv_p1_test
                 SOURCES
                 test/LArCaliWaveSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArCaliWaveSubsetCnv_p2_test
                 SOURCES
                 test/LArCaliWaveSubsetCnv_p2_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArDSPThresholdsSubsetCnv_p1_test
                 SOURCES
                 test/LArDSPThresholdsSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArMphysOverMcalSubsetCnv_p1_test
                 SOURCES
                 test/LArMphysOverMcalSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArOFCBinSubsetCnv_p1_test
                 SOURCES
                 test/LArOFCBinSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPedestalMCCnv_p1_test
                 SOURCES
                 test/LArPedestalMCCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPedestalSubsetCnv_p1_test
                 SOURCES
                 test/LArPedestalSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPedestalSubsetCnv_p2_test
                 SOURCES
                 test/LArPedestalSubsetCnv_p2_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArPhysWaveSubsetCnv_p1_test
                 SOURCES
                 test/LArPhysWaveSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArRampSubsetCnv_p1_test
                 SOURCES
                 test/LArRampSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArShapeSubsetCnv_p1_test
                 SOURCES
                 test/LArShapeSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArShapeSubsetCnv_p2_test
                 SOURCES
                 test/LArShapeSubsetCnv_p2_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
 
 atlas_add_test( LArSingleFloatSubsetCnv_p1_test
                 SOURCES
                 test/LArSingleFloatSubsetCnv_p1_test.cxx
-                LINK_LIBRARIES LArCondTPCnv )
+                LINK_LIBRARIES GaudiKernel LArCondTPCnv TestTools )
diff --git a/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt
index e70f6268749ddf889caf0b3b43a047e1f6b67d22..7bf3ec8fd4d72f029af108a4cc9f7e2a6a2b632c 100644
--- a/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArIdCnv/CMakeLists.txt
@@ -1,27 +1,12 @@
-################################################################################
-# Package: LArIdCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArIdCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/DetDescrCnvSvc
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate
-                          DetectorDescription/IdDictDetDescr
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier )
-
 # Component(s) in the package:
 atlas_add_component( LArIdCnv
                      src/*.cxx
-                     LINK_LIBRARIES DetDescrCnvSvcLib CaloIdentifier StoreGateLib SGtests IdDictDetDescr Identifier GaudiKernel LArIdentifier )
+                     LINK_LIBRARIES DetDescrCnvSvcLib CaloIdentifier StoreGateLib IdDictDetDescr Identifier GaudiKernel LArIdentifier )
 
 # Install files from the package:
-atlas_install_headers( LArIdCnv )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt
index 76526fcf1dd8c529ab9c0df23da38b55217e58bf..b8f33c2cd49e77a4ffb0544f7dd78e0ee9217e1d 100644
--- a/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArSimEventTPCnv/CMakeLists.txt
@@ -1,73 +1,48 @@
-################################################################################
-# Package: LArSimEventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArSimEventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArSimEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/IdDictParser
-                          DetectorDescription/Identifier )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( LArSimEventTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS LArSimEventTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib LArSimEvent
+                         PRIVATE_LINK_LIBRARIES AthenaKernel CaloIdentifier GaudiKernel Identifier StoreGateLib )
 
 atlas_add_dictionary( LArSimEventTPCnvDict
                       LArSimEventTPCnv/LArSimEventTPCnvDict.h
                       LArSimEventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                      LINK_LIBRARIES LArSimEventTPCnv )
 
 atlas_add_dictionary( OLD_LArSimEventTPCnvDict
                       LArSimEventTPCnv/LArSimEventTPCnvDict.h
                       LArSimEventTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                      LINK_LIBRARIES LArSimEventTPCnv )
 
 atlas_add_test( LArHitCnv_p1_test
                 SOURCES
                 test/LArHitCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                LINK_LIBRARIES LArSimEventTPCnv TestTools )
 
 atlas_add_test( LArHitContainerCnv_p1_test
                 SOURCES
                 test/LArHitContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                LINK_LIBRARIES LArSimEventTPCnv TestTools )
 
 atlas_add_test( LArHitContainerCnv_p2_test
                 SOURCES
                 test/LArHitContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv
+                LINK_LIBRARIES CaloIdentifier IdDictParser LArSimEventTPCnv StoreGateLib TestTools
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( LArHitFloatCnv_p1_test
                 SOURCES
                 test/LArHitFloatCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv )
+                LINK_LIBRARIES LArSimEventTPCnv TestTools )
 
 atlas_add_test( LArHitFloatContainerCnv_p2_test
                 SOURCES
                 test/LArHitFloatContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArSimEvent TestTools CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser Identifier LArSimEventTPCnv 
+                LINK_LIBRARIES CaloIdentifier IdDictParser LArSimEventTPCnv StoreGateLib TestTools
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
-
diff --git a/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt b/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt
index 860e72a1a086949eedeb43aced71b114aca89317..f704ffd5411524a284200ee95ff95683faf5ba4f 100644
--- a/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt
+++ b/LArCalorimeter/LArCnv/LArTPCnv/CMakeLists.txt
@@ -1,101 +1,71 @@
-################################################################################
-# Package: LArTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecEvent
-                          Control/CxxUtils
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( LArTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS LArTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier )
+                         LINK_LIBRARIES AthenaPoolCnvSvcLib CxxUtils Identifier LArRawEvent LArRecEvent
+                         PRIVATE_LINK_LIBRARIES AthenaKernel CaloIdentifier GaudiKernel LArIdentifier )
 
 atlas_add_dictionary( LArTPCnvDict
                       LArTPCnv/LArTPCnvDict.h
                       LArTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                      LINK_LIBRARIES LArTPCnv )
 
 atlas_add_dictionary( OLD_LArTPCnvDict
                       LArTPCnv/LArTPCnvDict.h
                       LArTPCnv/OLD_selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                      LINK_LIBRARIES LArTPCnv )
 
 atlas_add_test( LArDigitContainerCnv_p1_test
                 SOURCES
                 test/LArDigitContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArFebErrorSummaryCnv_p1_test
                 SOURCES
                 test/LArFebErrorSummaryCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p1_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p2_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p3_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p3_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p4_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p4_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArNoisyROSummaryCnv_p5_test
                 SOURCES
                 test/LArNoisyROSummaryCnv_p5_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArRawChannelCnv_p2_test
                 SOURCES
                 test/LArRawChannelCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArRawChannelContainerCnv_p4_test
                 SOURCES
                 test/LArRawChannelContainerCnv_p4_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
 
 atlas_add_test( LArLATOMEHeaderContainerCnv_p1_test
                 SOURCES
                 test/LArLATOMEHeaderContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib LArRawEvent LArRecEvent TestTools CaloIdentifier AthenaKernel Identifier LArTPCnv )
-
+                LINK_LIBRARIES GaudiKernel LArTPCnv TestTools )
diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
index f677055139d9f8cd3e074f9070269b4d78b64cdb..6f221c59fa7a21ef044cc0ee37e6491d6e4e71fe 100644
--- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py
@@ -80,18 +80,6 @@ class LArCellConditionsAlg(PyAthena.Alg):
             self.msg.error("Failed to get CaloCell_ID")
             return StatusCode.Failure
 
-
-        # -----------------------------------------------------------
-        # Initialize LArCabling service
-        self.larCablingSvc=PyAthena.py_tool("LArCablingLegacyService")
-        if self.larCablingSvc is None:
-            self.msg.error('Problem retrieving LArCablingService pointer !')
-            return StatusCode.Failure
-        else:
-            self.msg.info('retrieved [%s]', self.larCablingSvc.name())
-
-
-
         self.bc_packing=LArBadChanBitPacking()
 
         self.noisepattern=0
@@ -130,13 +118,28 @@ class LArCellConditionsAlg(PyAthena.Alg):
     def execute(self):
         self.msg.info('running execute...')
 
-        #for some obscure reason, we need run dump before we can retrieve the flat objects using their abstract interface
-        garbagedump = open("sgdump.txt", 'w')
-        self._condStore.dump(garbagedump)
-        garbagedump.close()
+        #for debugging purposes:
+        #sgdump = open("sgdump.txt", 'w')
+        #self._condStore.dump(sgdump)
+        #sgdump.close()
 
         eid=ROOT.Gaudi.Hive.currentContext().eventID()
 
+        try:
+            condCont=self._condStore.retrieve("CondCont<LArOnOffIdMapping>","LArOnOffIdMap")
+            self.larCabling=condCont.find(eid)
+        except Exception:
+            print("ERROR, failed to get LArCabling")
+            return StatusCode.Failure
+
+
+        try:
+            condCont=self._condStore.retrieve("CondCont<LArBadChannelCont>","LArBadChannel")
+            self.badChannels=condCont.find(eid)
+        except Exception:
+            print("ERROR, failed to get LArBadChannels")
+            return StatusCode.Failure
+            
         if self.includeConditions:
             try:
                 condCont=self._condStore.retrieve("CondCont<ILArPedestal>","LArPedestal")
@@ -240,9 +243,9 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 t_int=int(rep,10)
                 t=Identifier(c_uint(t_int))
                 if self.onlineID.is_lar(t):
-                    print(t," IsLAr (online)")
+                    print(t.get_identifier32().get_compact()," IsLAr (online)")
                 if self.offlineID.is_lar(t):
-                    print(t," isLAr (offline)")
+                    print(t.get_identifier32().getCompact()," isLAr (offline)")
             except:
                 pass
 
@@ -255,7 +258,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 if s==-1:s=0
                 chid=self.getOnlineIDFromString(rep[s:])
                 if chid is not None and self.onlineID.is_lar(chid):
-                    id=self.larCablingSvc.cnvToIdentifier(chid)
+                    id=self.larCabling.cnvToIdentifier(chid)
                     if id is None: id=self.noid
                     self.printChannelInfo(id,chid)
                 else:
@@ -268,7 +271,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 if s==-1:s=0
                 id=self.getOfflineIDFromString(rep[s:])
                 if id is not None and self.offlineID.is_lar(id):
-                    chid=self.larCablingSvc.createSignalChannelID(id)
+                    chid=self.larCabling.createSignalChannelID(id)
                     self.printChannelInfo(id,chid)
                 else:
                     print("ERROR: Could not interpret input.")
@@ -278,11 +281,11 @@ class LArCellConditionsAlg(PyAthena.Alg):
             #Try to interpet input as identifiers
             chid=self.getOnlineIDFromString(rep)
             if chid is not None and self.onlineID.is_lar(chid):
-                id=self.larCablingSvc.cnvToIdentifier(chid)
+                id=self.larCabling.cnvToIdentifier(chid)
             else: #try interpret at offline ID
                 id=self.getOfflineIDFromString(rep)
                 if id is not None and self.offlineID.is_lar(id):
-                     chid=self.larCablingSvc.createSignalChannelID(id)
+                     chid=self.larCabling.createSignalChannelID(id)
                      
             if chid is None or id is None:
                 print( "ERROR: Could not interpret input.")
@@ -295,7 +298,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
         return StatusCode.Success
 
     def printChannelInfo(self,id,chid):
-        print(self.IdentifiersToString(chid,id))
+        bc=self.badChannels.status(chid)
+        print(self.IdentifiersToString(chid,id)+ " " + self.bc_packing.stringStatus(bc))
         if id!=self.noid: #Don't try to show anything more for disconnected channels
             if self.includeLocation:
                 try:
@@ -331,8 +335,8 @@ class LArCellConditionsAlg(PyAthena.Alg):
                         ped=-9999
                         pedRMS=-9999
 
-                    print ("Ped: %.3f " % ped,end="")
-                    print ("PedRMS: %.3f" % pedRMS,end="")
+                    print (" Ped: %.3f " % ped,end="")
+                    print (" PedRMS: %.3f" % pedRMS,end="")
 
                     if self.larRamp is not None:
                         ramp=self.larRamp.ADC2DAC(chid,gain)
@@ -348,7 +352,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                         print (" MphysOverMcal: %.5f" % mpmc,end="")
                     else:
                         print (" MphysOverMcal: None",end="")
-                    print (os.linesep)
+                    print ("")
             if self.includeDSPTh:
                 if self.larDSPThr is not None:
                     tQThr=self.larDSPThr.tQThr(chid)
@@ -412,7 +416,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
             onlName+="FT "+str(ft)+"("+ftname+")/Slot "+str(slot)+"/Chan "+str(chan)
 
             try:
-                calibLines=self.larCablingSvc.calibSlotLine(chid);
+                calibLines=self.larCabling.calibSlotLine(chid);
                 if (len(calibLines)):
                     onlName+="/CL"
                     for calib_chid in calibLines:
@@ -714,7 +718,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
         outfile=None
         layer=None
         cl=None
-        tbl=maketrans(",:;#=","     ");
+        tbl=str.maketrans(",:;#=","     ");
         tokens=[]
         for t in input.translate(tbl).split():
             if len(t):
@@ -811,7 +815,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
                     print("Unknown Keyword",tokens[i]    )
             i=i+1
 
-        print("Searching for cells with",end="")
+        print("Searching for cells with ",end="")
         if eta is not None: print(" %.3f <= eta <= %.3f" % (eta[0],eta[1]),end="")
         if phi is not None: print(" %.3f <= phi <= %.3f" % (phi[0],phi[1]),end="")
         if layer is not None: print(" %.0f <= layer <= %.0f" % (layer[0],layer[1]),end="")
@@ -855,9 +859,14 @@ class LArCellConditionsAlg(PyAthena.Alg):
         #for idH in range(self.offlineID.calo_cell_hash_max()): //This one includes also tile cells
         for idH in range(182468):
             idHash=IdentifierHash(idH)
-            chid=self.larCablingSvc.createSignalChannelIDFromHash(idHash)
+            chid=self.larCabling.createSignalChannelIDFromHash(idHash)
             
             #print ("Loop hash=%i , on: %x , off: %x" % (idH, chid.get_identifier32().get_compact(), self.offlineID.cell_id(idHash).get_identifier32().get_compact()))
+            #Check Bad-Channel Status
+            bcstat=self.badChannels.status(chid)
+            if bctypes!=0:
+                bcw=bcstat.packedData()
+                if bcw & bctypes == 0: continue
 
                     
             #Check Online Id
@@ -868,7 +877,7 @@ class LArCellConditionsAlg(PyAthena.Alg):
 
             if cl is not None:
                 try:
-                    calibLines=self.larCablingSvc.calibSlotLine(chid);
+                    calibLines=self.larCabling.calibSlotLine(chid);
                     keep=False
                     for foundCLs in calibLines:
                         if self.onlineID.channel(foundCLs) == cl:
@@ -891,13 +900,13 @@ class LArCellConditionsAlg(PyAthena.Alg):
                 p=theDDE.phi()
                 if eta is not None and (e<eta[0] or e>eta[1]): continue
                 if phi is not None and (p<phi[0] or p>phi[1]): continue
-                ep=" eta=%.3f phi=%.3f" % (e,p)
+                ep=" eta=%.3f phi=%.3f " % (e,p)
                 
             id=self.offlineID.cell_id(idHash)
             if subcalo is not None and subcalo!=self.offlineID.sub_calo(id): continue
             if layer is not None and (self.offlineID.sampling(id)<layer[0] or self.offlineID.sampling(id)>layer[1]): continue
 
-            br=self.output(self.IdentifiersToString(chid,id) + " " +ep,outfile)
+            br=self.output(self.IdentifiersToString(chid,id) + " " +ep+self.bc_packing.stringStatus(bcstat),outfile)
             if br: break
             
         if outfile is not None: outfile.close()
diff --git a/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt b/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt
index 49484db3737f4ff99ac9f1cd30b51f6a03831537..1335816c0a9692fe8c9ddaa795dfaa63a690b443 100644
--- a/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt
+++ b/LArCalorimeter/LArExample/TestLArDetDescr/CMakeLists.txt
@@ -1,25 +1,10 @@
-################################################################################
-# Package: TestLArDetDescr
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TestLArDetDescr )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloTTDetDescr
-                          Calorimeter/CaloTrackingGeometry
-                          Control/StoreGate
-                          LArCalorimeter/LArIdentifier )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
 
 # Component(s) in the package:
@@ -27,9 +12,7 @@ atlas_add_component( TestLArDetDescr
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloIdentifier AthenaBaseComps GaudiKernel CaloGeoHelpers CaloTTDetDescr StoreGateLib SGtests LArIdentifier CaloTrackingGeometryLib )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloIdentifier AthenaBaseComps GaudiKernel CaloGeoHelpers CaloTTDetDescr StoreGateLib LArIdentifier CaloTrackingGeometryLib )
 
 # Install files from the package:
-atlas_install_headers( TestLArDetDescr )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt b/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt
index 7af2ab21a883cdcfb9aba52a92859350e50b34de..3fead7162f2ddf4a8f59f88a629f7cb485c6cd0e 100644
--- a/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt
+++ b/LArCalorimeter/LArExample/TestLArHardwareID/CMakeLists.txt
@@ -1,32 +1,13 @@
-################################################################################
-# Package: TestLArHardwareID
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TestLArHardwareID )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Database/RegistrationServices
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRecConditions
-                          Tools/PathResolver )
-
 # Component(s) in the package:
 atlas_add_component( TestLArHardwareID
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib SGtests LArCablingLib LArIdentifier LArRecConditions PathResolver RegistrationServicesLib )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib LArCablingLib LArIdentifier LArRecConditions PathResolver RegistrationServicesLib )
 
 # Install files from the package:
-atlas_install_headers( TestLArHardwareID )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt
index 9a4ca1d4c7296dbdd90e4a8ce083689f2e8ea86a..2f5b3a2a49224c0eb908952cc131b024a836425b 100644
--- a/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4FastSimulation/CMakeLists.txt
@@ -1,43 +1,21 @@
-################################################################################
-# Package: LArG4FastSimulation
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4FastSimulation )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoSpecialShapes
-			  DetectorDescription/GeoPrimitives
-                          LArCalorimeter/LArG4/LArG4Code
-                          LArCalorimeter/LArG4/LArG4ShowerLibSvc
-                          LArCalorimeter/LArGeoModel/LArReadoutGeometry
-                          LArCalorimeter/LArSimEvent
-                          Simulation/G4Atlas/G4AtlasTools 
-                          Generators/AtlasHepMC )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Geant4 )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
-find_package( XercesC )
 find_package( GeoModelCore )
 
-# tag ROOTBasicLibs was not recognized in automatic conversion in cmt2cmake
-
-# tag ROOTSTLDictLibs was not recognized in automatic conversion in cmt2cmake
-
 # Component(s) in the package:
 atlas_add_component( LArG4FastSimulation
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${GEOMODELCORE_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${GEOMODELCORE_LIBRARIES} GaudiKernel StoreGateLib SGtests GeoSpecialShapes LArG4Code LArReadoutGeometry LArSimEvent G4AtlasToolsLib GeoPrimitives LArG4ShowerLibSvcLib )
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib ${GEOMODELCORE_LIBRARIES} GaudiKernel StoreGateLib GeoSpecialShapes LArG4Code LArReadoutGeometry LArSimEvent G4AtlasToolsLib GeoPrimitives LArG4ShowerLibSvcLib )
 
 # 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/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
index ef9f5753b1f8211ce8d92600042f6834928ca103..5158176b0d6277994f62de3de76b3824b043a711 100644
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/CMakeLists.txt
@@ -1,25 +1,11 @@
-################################################################################
-# Package: LArG4ShowerLibSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4ShowerLibSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArG4/LArG4Code
-                          PRIVATE
-                          Control/AthenaKernel
-                          LArCalorimeter/LArG4/LArG4ShowerLib
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( CLHEP )
 find_package( Geant4 )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-find_package( XercesC )
 
 atlas_add_library( LArG4ShowerLibSvcLib
                    LArG4ShowerLibSvc/*.h
@@ -31,10 +17,10 @@ atlas_add_library( LArG4ShowerLibSvcLib
 atlas_add_component( LArG4ShowerLibSvc
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES}  LArG4ShowerLibSvcLib AthenaKernel LArG4ShowerLib PathResolver )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${GEANT4_LIBRARIES} LArG4ShowerLibSvcLib AthenaKernel LArG4ShowerLib PathResolver )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_scripts( share/*.py )
 
diff --git a/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt b/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt
index 0a32bde9c9c0b55004324d745f30b4f6050ba899..3be7778afb9deb7c7faba2df91fe5eabb5046c78 100644
--- a/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArG4TB/LArG4TBSimEvent/CMakeLists.txt
@@ -1,32 +1,20 @@
-################################################################################
-# Package: LArG4TBSimEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4TBSimEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Simulation/HitManagement )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArG4TBSimEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArG4TBSimEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel HitManagement
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel HitManagement )
 
 atlas_add_dictionary( LArG4TBSimEventDict
                       LArG4TBSimEvent/LArG4TBSimEventDict.h
                       LArG4TBSimEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} HitManagement LArG4TBSimEvent )
-
+                      LINK_LIBRARIES LArG4TBSimEvent )
diff --git a/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt b/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt
index 62054562af64b4bca405aab96773ddcd92f2c980..a0ff8c5dda47812d673451ed6a80fbe1001d3062 100644
--- a/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt
+++ b/LArCalorimeter/LArG4TB/LArG4TBSimEventAthenaPool/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: LArG4TBSimEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArG4TBSimEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          LArCalorimeter/LArG4TB/LArG4TBSimEvent )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( LArG4TBSimEventAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/LArCalorimeter/LArIdentifier/CMakeLists.txt b/LArCalorimeter/LArIdentifier/CMakeLists.txt
index 696ba6bdc47961182169d66f223f060b90ac0557..75f9a77f4621d56bbb25abcf1b773274f6f16228 100644
--- a/LArCalorimeter/LArIdentifier/CMakeLists.txt
+++ b/LArCalorimeter/LArIdentifier/CMakeLists.txt
@@ -1,46 +1,28 @@
-################################################################################
-# Package: LArIdentifier
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArIdentifier )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/IdDict
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate
-                          DetectorDescription/IdDictParser
-                          GaudiKernel )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( LArIdentifier
                    src/*.cxx
                    PUBLIC_HEADERS LArIdentifier
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaKernel AtlasDetDescr IdDict Identifier StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel IdDictParser GaudiKernel )
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel AtlasDetDescr IdDict Identifier StoreGateLib
+                   PRIVATE_LINK_LIBRARIES CaloIdentifier GaudiKernel )
 
 atlas_add_dictionary( LArIdentifierDict
                       LArIdentifier/LArIdentifierDict.h
                       LArIdentifier/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser GaudiKernel LArIdentifier )
+                      LINK_LIBRARIES LArIdentifier )
 
 atlas_add_executable( test_laronlineid
                       test/test_laronlineid.cxx
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser GaudiKernel LArIdentifier )
+                      LINK_LIBRARIES GaudiKernel IdDictParser LArIdentifier )
 
 atlas_add_executable( test_larhvid
                       test/test_larhvid.cxx
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasDetDescr IdDict Identifier CaloIdentifier AthenaKernel StoreGateLib SGtests IdDictParser GaudiKernel LArIdentifier )
-
+                      LINK_LIBRARIES GaudiKernel IdDictParser LArIdentifier )
diff --git a/LArCalorimeter/LArL1Sim/CMakeLists.txt b/LArCalorimeter/LArL1Sim/CMakeLists.txt
index 7352e14a1c25284698654548105ad432c3e0d594..92691271c225c79f3fa616e075c590b861dfd2f2 100644
--- a/LArCalorimeter/LArL1Sim/CMakeLists.txt
+++ b/LArCalorimeter/LArL1Sim/CMakeLists.txt
@@ -1,46 +1,20 @@
-################################################################################
-# Package: LArL1Sim
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArL1Sim )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthAllocators
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArDigitization
-                          LArCalorimeter/LArElecCalib
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          Event/EventInfo
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArSimEvent
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
 
 # Component(s) in the package:
 atlas_add_component( LArL1Sim
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthAllocators AthenaBaseComps GaudiKernel LArDigitizationLib CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib SGtests EventInfo LArCablingLib LArIdentifier LArRawEvent LArSimEvent PathResolver )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaBaseComps GaudiKernel GeoModelInterfaces LArDigitizationLib CaloDetDescrLib CaloEvent CaloIdentifier CaloTriggerToolLib AthenaKernel StoreGateLib EventInfo LArCablingLib LArElecCalib LArIdentifier LArRawEvent LArSimEvent PathResolver )
 
 # Install files from the package:
-atlas_install_headers( LArL1Sim )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/Fcal_ptweights_table7.data )
 
diff --git a/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py b/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py
index e5e7b1a5efb79882c4355b4b15be10bfd5abcd3e..235f308732c8b95e13184f06ae6053b5dec7701d 100644
--- a/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.py
+++ b/LArCalorimeter/LArL1Sim/python/LArSCL1Getter.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
 
 # LArSCL1 creation from LArHits with LArSCL1Maker algorithm
 
@@ -19,7 +19,7 @@ class LArSCL1Getter ( Configured )  :
         try:
             from LArL1Sim.LArSCL1Getter import LArSCL1Getter
             theLArSCL1Getter=LArSCL1Getter()
-        except:
+        except Exception:
             mlog.error("could not get handle to LArSCL1Getter Quit")
             traceback.print_exc()
             return False
@@ -34,7 +34,7 @@ class LArSCL1Getter ( Configured )  :
         # Instantiation of the C++ algorithm
         try:        
             from LArL1Sim.LArL1SimConf import LArSCL1Maker                
-        except:
+        except Exception:
             mlog.error("could not import LArL1Sim.LArSCL1Maker")
             traceback.print_exc()
             return False
@@ -53,13 +53,12 @@ class LArSCL1Getter ( Configured )  :
 
         theLArSCL1Maker.SCL1ContainerName = "LArDigitSCL1"
 
-        self._LArSCL1Maker = theLArSCL1Maker ;
+        self._LArSCL1Maker = theLArSCL1Maker
 
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
 
         # check if LArdigitization is run before. If yes, uses hit map from detector store produces from lardigitization
-        from Digitization.DigitizationFlags import jobproperties
         from AthenaCommon.DetFlags import DetFlags
         if DetFlags.digitize.LAr_on():
             mlog.info("Using hit map from LArDigitMaker algoritm")
diff --git a/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.py b/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.py
index 16c380d2fd574df2127dbb8ed8906e849883b498..b3a48e1d73e8fa204e6ee5f4d65366cedf7170fc 100644
--- a/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.py
+++ b/LArCalorimeter/LArL1Sim/python/LArTTL1Getter.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
 
 # Author: F. Ledroit (ledroit@lpsc.in2p3.fr)
 # LArTTL1 creation from LArHits with LArTTL1Maker algorithm
@@ -20,7 +20,7 @@ class LArTTL1Getter ( Configured )  :
         try:
             from LArL1Sim.LArTTL1Getter import LArTTL1Getter
             theLArTTL1Getter=LArTTL1Getter()
-        except:
+        except Exception:
             mlog.error("could not get handle to LArTTL1Getter Quit")
             traceback.print_exc()
             return False
@@ -35,13 +35,13 @@ class LArTTL1Getter ( Configured )  :
         # Instantiation of the C++ algorithm
         try:        
             from LArL1Sim.LArL1SimConf import LArTTL1Maker                
-        except:
+        except Exception:
             mlog.error("could not import LArL1Sim.LArTTL1Maker")
             traceback.print_exc()
             return False
 
         theLArTTL1Maker=LArTTL1Maker()
-        self._LArTTL1Maker = theLArTTL1Maker ;
+        self._LArTTL1Maker = theLArTTL1Maker
 
         # Configure LArTTL1Maker here
         #theLArTTL1Maker.SubDetectors="LAr_All"
@@ -74,7 +74,6 @@ class LArTTL1Getter ( Configured )  :
         topSequence = AlgSequence()
 
         # check if LArdigitization is run before. If yes, uses hit map from detector store produces from lardigitization
-        from Digitization.DigitizationFlags import jobproperties
         from AthenaCommon.DetFlags import DetFlags
         if DetFlags.digitize.LAr_on():
             mlog.info("Using hit map from LArDigitMaker algoritm")
diff --git a/LArCalorimeter/LArMonitoring/CMakeLists.txt b/LArCalorimeter/LArMonitoring/CMakeLists.txt
index 31507db6ee03aef44b8c5267f7bcd00a0fe686a8..8419ede74db41220b2e12cdbc79e314b4093735c 100644
--- a/LArCalorimeter/LArMonitoring/CMakeLists.txt
+++ b/LArCalorimeter/LArMonitoring/CMakeLists.txt
@@ -1,35 +1,8 @@
-################################################################################
-# Package: LArMonitoring
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArMonitoring )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloGeoHelpers
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Control/AthenaMonitoring
-                          DetectorDescription/Identifier
-                          Event/EventContainers
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          Trigger/TrigAnalysis/TrigDecisionTool
-                          PRIVATE
-                          Calorimeter/CaloConditions
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Event/xAOD/xAODEventInfo
-                          Trigger/TrigAnalysis/TrigAnalysisInterfaces
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRecEvent )
-
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
@@ -43,6 +16,5 @@ atlas_add_component( LArMonitoring
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloDetDescrLib CaloGeoHelpers CaloIdentifier AthenaMonitoringLib  SGtests Identifier LArIdentifier LArRawEvent LArRecConditions LArCablingLib TrigDecisionToolLib CaloConditions AthenaKernel AthenaPoolUtilities xAODEventInfo LArCOOLConditions LArRawConditions LArRecEvent )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py 
-  POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.txt share/*.py )
diff --git a/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt b/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt
index 4bd32ce71f6ebdbd8e52b5f4e6151c25789a9959..c35e7186ad9f2cb8a1ff774586a8a8e17c7939a4 100644
--- a/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt
+++ b/LArCalorimeter/LArOnlDbPrep/CMakeLists.txt
@@ -1,40 +1,20 @@
-################################################################################
-# Package: LArOnlDbPrep
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArOnlDbPrep )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTriggerTool
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloInterface
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArCOOLConditions
-                          LArCalorimeter/LArIdentifier )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_component( LArOnlDbPrep
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier CaloTriggerToolLib AthenaBaseComps GaudiKernel LArRecConditions LArCablingLib CaloDetDescrLib StoreGateLib SGtests AthenaPoolUtilities LArCOOLConditions LArIdentifier CaloInterfaceLib )
+                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier CaloTriggerToolLib AthenaBaseComps GaudiKernel LArRecConditions LArCablingLib CaloDetDescrLib StoreGateLib AthenaPoolUtilities LArCOOLConditions LArIdentifier CaloInterfaceLib )
 
 # Install files from the package:
-atlas_install_headers( LArOnlDbPrep )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( share/*.sh )
 
diff --git a/LArCalorimeter/LArROD/CMakeLists.txt b/LArCalorimeter/LArROD/CMakeLists.txt
index ad2d74386b4dd0d379771c46e012b1de023efb13..c53b25571f05363e89f606f199e43a9d8db36461 100644
--- a/LArCalorimeter/LArROD/CMakeLists.txt
+++ b/LArCalorimeter/LArROD/CMakeLists.txt
@@ -1,35 +1,8 @@
-################################################################################
-# Package: LArROD
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArROD )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRecUtils
-                          TestBeam/TBEvent
-                          PRIVATE
-                          Control/CxxUtils
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Commission/CommissionEvent
-                          Control/AthContainers
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArCOOLConditions )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -42,8 +15,8 @@ atlas_add_library( LArRODLib
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecConditions TBEvent StoreGateLib SGtests LArCablingLib LArRawUtilsLib LArRecUtilsLib CaloDetDescrLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CommissionEvent AthContainers AthenaPoolUtilities LArCOOLConditions )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthContainers AthenaBaseComps AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArRecConditions TBEvent StoreGateLib LArCablingLib LArElecCalib LArRawUtilsLib LArRecUtilsLib
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloDetDescrLib CommissionEvent LArCOOLConditions )
 
 atlas_add_component( LArROD
                      src/components/*.cxx
diff --git a/LArCalorimeter/LArRawConditions/CMakeLists.txt b/LArCalorimeter/LArRawConditions/CMakeLists.txt
index 645d7097b2336815e9a722f7300781c72075530b..92accfdbc3bb88beda0fc13cc64f43956bea8929 100644
--- a/LArCalorimeter/LArRawConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArRawConditions/CMakeLists.txt
@@ -1,56 +1,28 @@
-################################################################################
-# Package: LArRawConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRawConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          Control/SGTools
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArRecConditions
-                          PRIVATE
-                          DetectorDescription/IdDictParser
-                          LArCalorimeter/LArTools )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( LArRawConditions
                    src/*.cxx
                    PUBLIC_HEADERS LArRawConditions
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier AthenaKernel AthContainers SGTools AthenaPoolUtilities Identifier GaudiKernel LArIdentifier StoreGateLib SGtests LArToolsLib LArCablingLib LArRecConditions
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES CaloIdentifier AthenaKernel AthContainers AthenaPoolUtilities Identifier GaudiKernel LArIdentifier StoreGateLib LArElecCalib LArCablingLib )
 
 atlas_add_dictionary( LArRawConditions1Dict
                       LArRawConditions/LArRawConditionsDict1.h
                       LArRawConditions/selection1.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel AthContainers SGTools StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArToolsLib LArCablingLib LArRawConditions LArRecConditions)
+                      LINK_LIBRARIES LArRawConditions )
 
 atlas_add_dictionary( LArRawConditions2Dict
                       LArRawConditions/LArRawConditionsDict2.h
                       LArRawConditions/selection2.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel AthContainers SGTools StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArToolsLib LArCablingLib LArRawConditions )
+                      LINK_LIBRARIES LArRawConditions )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 
-
 atlas_add_test( LArConditionsContainerDB_test
    SOURCES test/LArConditionsContainerDB_test.cxx
    LINK_LIBRARIES LArRawConditions )
diff --git a/LArCalorimeter/LArRawEvent/CMakeLists.txt b/LArCalorimeter/LArRawEvent/CMakeLists.txt
index a2b566bebfee4e44083e102ed639f5c608be8372..708999adfe5ba4c1cb40a085222402d389d2ad8e 100644
--- a/LArCalorimeter/LArRawEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArRawEvent/CMakeLists.txt
@@ -1,34 +1,20 @@
-################################################################################
-# Package: LArRawEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRawEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          DetectorDescription/Identifier )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArRawEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArRawEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthContainers Identifier
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel CaloIdentifier AthContainers Identifier )
 
 atlas_add_dictionary( LArRawEventDict
                       LArRawEvent/LArRawEventDict.h
                       LArRawEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthContainers Identifier AthenaKernel LArRawEvent )
-
+                      LINK_LIBRARIES LArRawEvent )
diff --git a/LArCalorimeter/LArRawUtils/CMakeLists.txt b/LArCalorimeter/LArRawUtils/CMakeLists.txt
index 5c672622a834872fc4b386260ccefa636dba2f13..1eacf72f7c56f243264910aa1a45585581ef59c8 100644
--- a/LArCalorimeter/LArRawUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRawUtils/CMakeLists.txt
@@ -1,31 +1,13 @@
-################################################################################
-# Package: LArRawUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRawUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloTTDetDescr
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          Calorimeter/CaloTriggerTool
-                          PRIVATE
-                          DetectorDescription/AtlasDetDescr
-                          LArCalorimeter/LArCabling )
-
 # Component(s) in the package:
 atlas_add_library( LArRawUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArRawUtils
-                   LINK_LIBRARIES CaloIdentifier CaloTTDetDescr AthenaBaseComps AthenaKernel Identifier GaudiKernel LArIdentifier LArRawEvent StoreGateLib SGtests CaloTriggerToolLib LArToolsLib
+                   LINK_LIBRARIES CaloIdentifier CaloTTDetDescr AthenaBaseComps AthenaKernel Identifier GaudiKernel LArCablingLib LArIdentifier LArRawEvent StoreGateLib CaloTriggerToolLib
                    PRIVATE_LINK_LIBRARIES AtlasDetDescr )
 
 atlas_add_component( LArRawUtils
diff --git a/LArCalorimeter/LArRecConditions/CMakeLists.txt b/LArCalorimeter/LArRecConditions/CMakeLists.txt
index bd92fe9a79be1020bc5015049e87b03a82430647..6e20c9ac90d03c0e345209b9da8e8712294f7b6a 100644
--- a/LArCalorimeter/LArRecConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArRecConditions/CMakeLists.txt
@@ -1,41 +1,26 @@
-################################################################################
-# Package: LArRecConditions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRecConditions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-			  LArCalorimeter/LArIdentifier
-                          Control/AthenaKernel
-                          Control/AthenaBaseComps
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          PRIVATE
-			  LArCalorimeter/LArElecCalib
-			  LArCalorimeter/LArCabling )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_library( LArRecConditions
                    src/*.cxx
                    PUBLIC_HEADERS LArRecConditions
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloIdentifier LArIdentifier AthenaKernel Identifier GaudiKernel AthenaBaseComps LArElecCalib LArCablingLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${CORAL_LIBRARIES} CaloIdentifier AthenaKernel Identifier GaudiKernel AthenaBaseComps LArElecCalib LArCablingLib
+                   PRIVATE_LINK_LIBRARIES LArIdentifier )
 
 atlas_add_dictionary( LArRecConditionsDict
                       LArRecConditions/LArRecConditionsDict.h
                       LArRecConditions/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel Identifier GaudiKernel LArRecConditions)
+                      LINK_LIBRARIES LArRecConditions )
 
+# Test(s) in the package:
 atlas_add_test (test_LArBadChannelCont
-	        SOURCES
-	        test/test_LArBadChannelCont.cxx
-                LINK_LIBRARIES Identifier CxxUtils StoreGateLib LArRecConditions 
-               )
+                SOURCES
+	            test/test_LArBadChannelCont.cxx
+                LINK_LIBRARIES LArRecConditions )
diff --git a/LArCalorimeter/LArRecEvent/CMakeLists.txt b/LArCalorimeter/LArRecEvent/CMakeLists.txt
index 1f4fa867e5d1ab40e626c68b99cce3363fd3768d..efd6bcdb7bcfc88c27a46f648d9b146fccf0876f 100644
--- a/LArCalorimeter/LArRecEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArRecEvent/CMakeLists.txt
@@ -1,34 +1,16 @@
-################################################################################
-# Package: LArRecEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRecEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Control/AthContainers
-                          DetectorDescription/Identifier
-                          PRIVATE
-                          Event/FourMomUtils )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( LArRecEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArRecEvent
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloEvent CaloIdentifier AthContainers Identifier
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} FourMomUtils )
+                   LINK_LIBRARIES CaloEvent CaloIdentifier AthContainers AthenaKernel Identifier
+                   PRIVATE_LINK_LIBRARIES FourMomUtils )
 
 atlas_add_dictionary( LArRecEventDict
                       LArRecEvent/LArRecEventDict.h
                       LArRecEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloIdentifier AthContainers Identifier FourMomUtils LArRecEvent )
-
+                      LINK_LIBRARIES LArRecEvent )
diff --git a/LArCalorimeter/LArRecUtils/CMakeLists.txt b/LArCalorimeter/LArRecUtils/CMakeLists.txt
index 1f2fb686f8774cf687f8934b9476131ac395b061..1645d736d9d6368aded27a11b599cee93700b803 100644
--- a/LArCalorimeter/LArRecUtils/CMakeLists.txt
+++ b/LArCalorimeter/LArRecUtils/CMakeLists.txt
@@ -1,67 +1,32 @@
-################################################################################
-# Package: LArRecUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRecUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloUtils
-                          Calorimeter/CaloConditions
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/AthAllocators
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecEvent
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Calorimeter/CaloGeoHelpers
-                          Control/SGTools
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArCOOLConditions
-			  LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArRawUtils
-                          Tools/PathResolver )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
 find_package( Eigen )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_library( LArRecUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArRecUtils
-                   INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel AthAllocators AthenaPoolUtilities Identifier GaudiKernel LArIdentifier LArRawEvent LArRecEvent CaloDetDescrLib CaloUtilsLib StoreGateLib SGtests LArCablingLib LArRawUtilsLib LArRecConditions LArRawConditions
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions PathResolver CaloConditions )
+                   LINK_LIBRARIES AthAllocators AthenaBaseComps AthenaKernel CaloIdentifier CaloUtilsLib LArCOOLConditions LArElecCalib LArIdentifier LArRawEvent LArRecConditions LArRecEvent StoreGateLib
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${ROOT_LIBRARIES} AthenaPoolUtilities CaloConditions CaloDetDescrLib CaloEvent CaloGeoHelpers CaloInterfaceLib GaudiKernel Identifier LArCablingLib LArHV LArRawConditions LArRawUtilsLib LArReadoutGeometry PathResolver SGTools )
 
 atlas_add_component( LArRecUtils
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib PathResolver LArRecUtilsLib LArRecConditions LArRawConditions CaloConditions)
+                     LINK_LIBRARIES LArRecUtilsLib )
 
+# Test(s) in the package:
 atlas_add_test( dummy_test
                 SOURCES
                 test/dummy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} CaloDetDescrLib CaloEvent CaloIdentifier CaloUtilsLib AthenaBaseComps AthenaKernel AthAllocators StoreGateLib SGtests AthenaPoolUtilities Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawEvent LArRecEvent TestTools CaloGeoHelpers SGTools xAODEventInfo LArCOOLConditions LArRawUtilsLib CaloConditions PathResolver LArRecUtilsLib )
+                LINK_LIBRARIES LArRecUtilsLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/LArCalorimeter/LArRegionSelector/CMakeLists.txt b/LArCalorimeter/LArRegionSelector/CMakeLists.txt
index f616cf4727e57c05f17c21f78da1f6bc2accdd1d..46f91af193060d053a0367f6b9040e3bfb09adf5 100644
--- a/LArCalorimeter/LArRegionSelector/CMakeLists.txt
+++ b/LArCalorimeter/LArRegionSelector/CMakeLists.txt
@@ -1,30 +1,8 @@
-################################################################################
-# Package: LArRegionSelector
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArRegionSelector )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          DetectorDescription/Identifier
-                          DetectorDescription/IRegionSelector
-                          DetectorDescription/RegionSelector
-                          DetectorDescription/RegSelLUT
-			  InnerDetector/InDetConditions/PixelConditionsData
-                          GaudiKernel
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloTTDetDescr
-                          Calorimeter/CaloTriggerTool
-                          Control/StoreGate
-                          Event/ByteStreamData
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArCabling )
-
 # External dependencies:
 find_package( tdaq-common )
 
@@ -33,9 +11,7 @@ atlas_add_component( LArRegionSelector
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier AthenaBaseComps Identifier RegionSelectorLib GaudiKernel CaloDetDescrLib CaloTTDetDescr CaloTriggerToolLib StoreGateLib SGtests ByteStreamData ByteStreamData_test LArIdentifier LArRawUtilsLib LArCablingLib PixelConditionsData )
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} CaloIdentifier AthenaBaseComps Identifier IRegionSelector RegionSelectorLib GaudiKernel CaloDetDescrLib CaloTTDetDescr CaloTriggerToolLib StoreGateLib ByteStreamData LArIdentifier LArRawUtilsLib PixelConditionsData )
 
 # Install files from the package:
-atlas_install_headers( LArRegionSelector )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArSim/CMakeLists.txt b/LArCalorimeter/LArSim/CMakeLists.txt
index 6bac08440bc87f032b66a6b5ec5fcb0261058dbf..eb83225f98bcf974d0d5fef86559423bde6fd7f9 100644
--- a/LArCalorimeter/LArSim/CMakeLists.txt
+++ b/LArCalorimeter/LArSim/CMakeLists.txt
@@ -1,26 +1,13 @@
-################################################################################
-# Package: LArSim
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArSim )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArSimEvent
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate )
-
 # Component(s) in the package:
 atlas_add_component( LArSim
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel LArSimEvent CaloIdentifier StoreGateLib SGtests )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel LArSimEvent CaloIdentifier StoreGateLib )
 
 # Install files from the package:
-atlas_install_headers( LArSim )
 atlas_install_joboptions( share/*.txt share/*.py )
-
diff --git a/LArCalorimeter/LArSimEvent/CMakeLists.txt b/LArCalorimeter/LArSimEvent/CMakeLists.txt
index 48067c191d90f80495a0196f3d53886ca663f7f4..6fca6c43202638ac6b2abcd0a13cf3d05476df93 100644
--- a/LArCalorimeter/LArSimEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArSimEvent/CMakeLists.txt
@@ -1,35 +1,20 @@
-################################################################################
-# Package: LArSimEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArSimEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          Simulation/HitManagement
-                          PRIVATE
-                          Control/StoreGate )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( LArSimEvent
                    src/*.cxx
                    PUBLIC_HEADERS LArSimEvent
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel Identifier HitManagement StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel Identifier HitManagement StoreGateLib )
 
 atlas_add_dictionary( LArSimEventDict
                       LArSimEvent/LArSimEventDict.h
                       LArSimEvent/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel Identifier HitManagement StoreGateLib SGtests LArSimEvent )
-
+                      LINK_LIBRARIES LArSimEvent )
diff --git a/LArCalorimeter/LArTBEvent/CMakeLists.txt b/LArCalorimeter/LArTBEvent/CMakeLists.txt
index fdc8a60c5c6b99a3d37e97993e2161dc5553d1a0..d70559557f2e410650ec54329d2b3650854f304b 100644
--- a/LArCalorimeter/LArTBEvent/CMakeLists.txt
+++ b/LArCalorimeter/LArTBEvent/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: LArTBEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArTBEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthenaKernel )
-
 # Component(s) in the package:
 atlas_add_library( LArTBEvent
                    src/*.cxx
diff --git a/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt
index e0efce0719a38bf92d08808404d8717644af8bdd..c373496edc31731f7d53eeb32d9b91e049ece7bc 100644
--- a/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArCalibTest/CMakeLists.txt
@@ -1,27 +1,10 @@
-################################################################################
-# Package: LArCalibTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArCalibTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloConditions
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArRecConditions
-                          LArCalorimeter/LArCabling
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Control/StoreGate
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArCOOLConditions
-                          Tools/PathResolver )
+# External dependencies:
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_component( LArCalibTest
@@ -29,10 +12,9 @@ atlas_add_component( LArCalibTest
                      src/DumpCaloBadChannels.cxx
                      src/FixLArElecCalib.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloConditions CaloIdentifier AthenaBaseComps GaudiKernel LArIdentifier LArRawEvent LArRecConditions LArCablingLib CaloDetDescrLib StoreGateLib SGtests xAODEventInfo LArRawConditions LArCOOLConditions PathResolver )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CaloConditions CaloDetDescrLib CaloIdentifier GaudiKernel Identifier LArCOOLConditions LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRecConditions PathResolver StoreGateLib xAODEventInfo )
 
 # Install files from the package:
-atlas_install_headers( LArCalibTest )
-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/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py b/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py
index c19fa00d222d626e003a34cbf838f8e5f582a1b8..c1c1e66173d7715fd650e633108b7926b335d5a5 100644
--- a/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.py
+++ b/LArCalorimeter/LArTest/LArCalibTest/python/HECNoiseD3PDMaker.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
 
 #
 # D3PDMaker
@@ -58,7 +58,7 @@ class HECNoiseD3PDMaker(PyAthena.Alg):
         self.cid = self.cdd.getCaloCell_ID()
         self.tdt = PyAthena.py_tool('Trig::TrigDecisionTool/TrigDecisionTool')
         self.ntfile =  TFile(self.NtupleFileName,"RECREATE")
-        self.hectree = TTree("HECNoise","HECNoise");
+        self.hectree = TTree("HECNoise","HECNoise")
         self.iRun = array('i',[0])
         self.iEvent = array('L',[0])            
         self.iEventCount = array('i',[0])            
@@ -101,30 +101,30 @@ class HECNoiseD3PDMaker(PyAthena.Alg):
             self.hectree.Branch(tl+"_Prescale",self.fPrescale[tl],tl+"_Prescale/F")
             self.hectree.Branch(tl+"_Trigger",self.iTrigger[tl],tl+"_Trigger/I")
             pass
-        self.hectree.Branch("iTime",self.iTime,"iTime/I");
-        self.hectree.Branch("iLB",self.iLB,"iLB/I");
-        self.hectree.Branch("iBCID",self.iBCID,"iBCID/I");
+        self.hectree.Branch("iTime",self.iTime,"iTime/I")
+        self.hectree.Branch("iLB",self.iLB,"iLB/I")
+        self.hectree.Branch("iBCID",self.iBCID,"iBCID/I")
         self.hectree.Branch("avgMu",self.avgMu,"avgMu/F")
         self.hectree.Branch("actMu",self.actMu,"actMu/F")
-        self.hectree.Branch("iGain",self.iGain,"iGain/I");
-        self.hectree.Branch("iOID",self.iOID,"iOID/l");
-        self.hectree.Branch("iSide",self.iSide,"iSide/I");
-        self.hectree.Branch("iSamp",self.iSamp,"iSamp/I");
-        self.hectree.Branch("iReg",self.iReg,"iReg/I");
-        self.hectree.Branch("iEta",self.iEta,"iEta/I");
-        self.hectree.Branch("iPhi",self.iPhi,"iPhi/I");
+        self.hectree.Branch("iGain",self.iGain,"iGain/I")
+        self.hectree.Branch("iOID",self.iOID,"iOID/l")
+        self.hectree.Branch("iSide",self.iSide,"iSide/I")
+        self.hectree.Branch("iSamp",self.iSamp,"iSamp/I")
+        self.hectree.Branch("iReg",self.iReg,"iReg/I")
+        self.hectree.Branch("iEta",self.iEta,"iEta/I")
+        self.hectree.Branch("iPhi",self.iPhi,"iPhi/I")
         self.hectree.Branch("iQuality",self.iQuality,"iQuality/I")
-        self.hectree.Branch("e",self.e,"e/F");
-        self.hectree.Branch("t",self.t,"t/F");
-        self.hectree.Branch("eta",self.eta,"eta/F");
-        self.hectree.Branch("phi",self.phi,"phi/F");
-        self.hectree.Branch("z",self.z,"z/F");
-        self.hectree.Branch("r",self.r,"r/F");
-        self.hectree.Branch("Ped",self.Ped,"Ped/F");
-        self.hectree.Branch("PedRMS",self.PedRMS,"PedRMS/F");
-        self.hectree.Branch("iDigi",self.iDigi,"iDigi[32]/I");
-        self.hectree.Branch("iMax",self.iMax,"iMax/I");
-        self.hectree.Branch("iMin",self.iMin,"iMin/I");
+        self.hectree.Branch("e",self.e,"e/F")
+        self.hectree.Branch("t",self.t,"t/F")
+        self.hectree.Branch("eta",self.eta,"eta/F")
+        self.hectree.Branch("phi",self.phi,"phi/F")
+        self.hectree.Branch("z",self.z,"z/F")
+        self.hectree.Branch("r",self.r,"r/F")
+        self.hectree.Branch("Ped",self.Ped,"Ped/F")
+        self.hectree.Branch("PedRMS",self.PedRMS,"PedRMS/F")
+        self.hectree.Branch("iDigi",self.iDigi,"iDigi[32]/I")
+        self.hectree.Branch("iMax",self.iMax,"iMax/I")
+        self.hectree.Branch("iMin",self.iMin,"iMin/I")
         #
         return True
 
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
index 1b62213e33d9866783aef639e939e1562cb889a2..2f49412409fa073aab9f08e0e87b8ff5dd5e5079 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
@@ -1,34 +1,8 @@
-################################################################################
-# Package: LArConditionsTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArConditionsTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloInterface
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawUtils
-                          LArCalorimeter/LArTools
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArCOOLConditions )
-
-# External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-
 # Component(s) in the package:
 atlas_add_component( LArConditionsTest
                      src/LArConditionsTest_entries.cxx
@@ -36,15 +10,11 @@ atlas_add_component( LArConditionsTest
                      src/LArCondDataTest.cxx
                      src/LArConditionsTestAlg.cxx
                      src/LArCablingTest.cxx
-                     INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps StoreGateLib SGtests Identifier GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRawUtilsLib LArToolsLib CaloDetDescrLib CaloEvent CaloIdentifier AthenaKernel AthenaPoolUtilities LArCOOLConditions CaloInterfaceLib )
+                     LINK_LIBRARIES AthenaBaseComps StoreGateLib Identifier GaudiKernel LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawUtilsLib LArRecConditions CaloDetDescrLib CaloEvent CaloIdentifier AthenaKernel CaloInterfaceLib )
 
 # Install files from the package:
-atlas_install_headers( LArConditionsTest )
 atlas_install_joboptions( share/*.py )
 
-
-
 function (larconditions_run_test testName)
   cmake_parse_arguments( ARG "" "DEPENDS" "" ${ARGN} )
 
@@ -63,7 +33,6 @@ function (larconditions_run_test testName)
   endif()
 endfunction (larconditions_run_test)
 
-
 larconditions_run_test (LArConditionsTest)
 larconditions_run_test (LArConditionsTestWriteNoReg)
 larconditions_run_test (LArConditionsTestReadNoReg DEPENDS LArConditionsTestWriteNoReg)
diff --git a/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt
index 66bbb1a95eaaf4846af79e3eff19a7aa3324b6a9..3d3f783689d592971a3281c3baa2b9e256517bb1 100644
--- a/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArEventTest/CMakeLists.txt
@@ -1,37 +1,18 @@
-################################################################################
-# Package: LArEventTest
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArEventTest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/AthenaBaseComps
-                          Control/StoreGate
-                          GaudiKernel
-                          LArCalorimeter/LArIdentifier
-                          LArCalorimeter/LArRawConditions
-                          LArCalorimeter/LArRawEvent
-                          LArCalorimeter/LArCabling
-                          TestBeam/TBEvent
-                          PRIVATE
-                          Calorimeter/CaloEvent
-                          Event/xAOD/xAODEventInfo
-                          LArCalorimeter/LArElecCalib )
-
 # External dependencies:
 find_package( CLHEP )
+find_package( ROOT COMPONENTS Core Tree )
 
 # Component(s) in the package:
 atlas_add_component( LArEventTest
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArIdentifier LArRawConditions LArRawEvent LArCablingLib TBEvent CaloEvent xAODEventInfo )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib GaudiKernel LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArCablingLib TBEvent CaloEvent xAODEventInfo )
 
 # Install files from the package:
-atlas_install_headers( LArEventTest )
 atlas_install_joboptions( share/*.py )
-
diff --git a/LArCalorimeter/LArTools/CMakeLists.txt b/LArCalorimeter/LArTools/CMakeLists.txt
index 5d16c2c0c2792affe06a113ee6f1202189ff003b..cc3b936ceafb1422abf4fe6be522e75d75c8f590 100644
--- a/LArCalorimeter/LArTools/CMakeLists.txt
+++ b/LArCalorimeter/LArTools/CMakeLists.txt
@@ -1,23 +1,8 @@
-################################################################################
-# Package: LArTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( LArTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          DetectorDescription/Identifier
-                          GaudiKernel
-                          LArCalorimeter/LArCabling
-                          LArCalorimeter/LArElecCalib
-                          PRIVATE
-                          Calorimeter/CaloIdentifier
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          LArCalorimeter/LArRecConditions )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( ROOT COMPONENTS RIO Core Tree MathCore Hist pthread )
@@ -27,19 +12,17 @@ atlas_add_library( LArToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS LArTools
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaBaseComps AthenaKernel Identifier GaudiKernel LArCablingLib LArElecCalib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaPoolUtilities LArRecConditions )
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel CxxUtils Identifier GaudiKernel LArElecCalib
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaPoolUtilities LArCablingLib LArRecConditions )
 
 atlas_add_component( LArTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
                      LINK_LIBRARIES LArToolsLib )
 
 atlas_add_dictionary( LArToolsDict
                       LArTools/LArToolsDict.h
                       LArTools/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel Identifier GaudiKernel LArCablingLib CaloIdentifier AthenaPoolUtilities LArRecConditions LArToolsLib )
+                      LINK_LIBRARIES LArToolsLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx
index f033040f489681871332ca263d06da16dc14422b..31eb878914877a5d34b15e39a4a56342dcaf8964 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTimingTools/src/MuonHitTimingTool.cxx
@@ -10,7 +10,9 @@
 namespace Muon {
 
   MuonHitTimingTool::MuonHitTimingTool(const std::string& t, const std::string& n, const IInterface* p):
-    AthAlgTool(t,n,p) {
+    AthAlgTool(t,n,p),
+    m_hitTimingTools(this)
+  {
     declareInterface<IMuonHitTimingTool>(this);
     
     for( unsigned int tech = 0;tech<MuonStationIndex::TechnologyIndexMax;++tech ){
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
index 6a45faabff7f2f04209ee615a22df85ff3d3c8a7..2b072f2b099c76feedcd42283ce1bb8733adbd4d 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/src/MuonTrackSummaryHelperTool.h
@@ -44,7 +44,9 @@ namespace Muon {
     virtual ~MuonTrackSummaryHelperTool()=default;
         
     virtual StatusCode initialize() override;
-        
+
+    using IExtendedTrackSummaryHelperTool::analyse;    
+    using IExtendedTrackSummaryHelperTool::updateSharedHitCount;    
     virtual void analyse(
                          const Trk::Track& trk,
                          const Trk::RIO_OnTrack* rot,
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
index f1aca9130cdf715edb83d9e0d5e41d59ec79ded9..617f0a5b3c988c6bc2004b8f1fe3cfdca1dfa576 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/python/TgcRawDataMonitorAlgorithm.py
@@ -24,7 +24,15 @@ def TgcRawDataMonitoringConfig(inputFlags):
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu26_ivarmedium_L1MU20'
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu6'
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu6_L1MU6'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu6_idperf'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu14'
     tgcRawDataMonAlg.TagTrigList += ',HLT_mu20_mu8noL1;HLT_mu20'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu24_mu8noL1;HLT_mu24'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu50_L1MU20'
+    tgcRawDataMonAlg.TagTrigList += ',HLT_mu60_0eta105_msonly_L1MU20'
+
+    tgcRawDataMonAlg.TagAndProbe = False
+    tgcRawDataMonAlg.TagAndProbeZmumu = False
 
     if not inputFlags.DQ.triggerDataAvailable:
         tgcRawDataMonAlg.MuonRoIContainerName = ''
@@ -91,12 +99,104 @@ def TgcRawDataMonitoringConfig(inputFlags):
     myGroup.defineHistogram('hit_bunch;TgcPrd_Timing',title='TgcPrd_Timing;Timing;Number of events',
                             path=hitPath,xbins=4,xmin=-1.5,xmax=1.5,xlabels=['Previous','Current','Next'])
 
+    for side in ['A', 'C']:# side-A or side-C
+        for station in range(1,5):# M1,2,3,4
+            for s_or_w in ['S','W']:# strip or wire
+                name = "%sM%02i%s" % (side,station,s_or_w)
+                x_name = "lb_for_%s" % (name)
+                y_name = name
+                nbins = 10
+                if station==1:
+                    nbins = 648
+                elif station==2 or station==3:
+                    nbins = 528
+                else: # station==4
+                    nbins = 90
+
+                myGroup.defineHistogram(x_name+','+y_name+';'+y_name+'_vs_lb',
+                                        title=y_name+'_vs_lb;Luminosity block;Chamber index',type='TH2F',
+                                        path=hitPath,xbins=100,xmin=-0.5,xmax=99.5,
+                                        ybins=nbins,ymin=0.5,ymax=nbins+0.5,opt='kAddBinsDynamically')
+                x_name = name
+                y_name = "timing_for_%s" % (name)
+                myGroup.defineHistogram(x_name+','+y_name+';'+y_name,
+                                        title='Timing_for_'+name+';Chamber index;Timing',type='TH2F',
+                                        path=hitPath,xbins=nbins,xmin=0.5,xmax=nbins+0.5,
+                                        ybins=3,ymin=-1.5,ymax=1.5,ylabels=['Previous','Current','Next'])
+
+                x_name = "x_%s" % (name)
+                y_name = "y_%s" % (name)
+                nbinsx = 10
+                nbinsy = 10
+                if station==1:
+                    nbinsx = 15
+                    nbinsy = 48
+                elif station==2 or station==3:
+                    nbinsx = 12
+                    nbinsy = 48
+                else: # station==4
+                    nbinsx = 4
+                    nbinsy = 24
+
+                myGroup.defineHistogram(x_name+','+y_name+';'+name+'_vs_iEta',
+                                        title=name+'_vs_iEta;iEta;Chamber index',type='TH2F',path=hitPath,
+                                        xbins=nbinsx,xmin=0.5,xmax=nbinsx+0.5,
+                                        ybins=nbinsy,ymin=0.5,ymax=nbinsy+0.5)
+
+
     coinPath = 'Coin/'
     myGroup.defineHistogram('coin_n;TgcCoin_nCoins',title='TgcPrd_nCoins;Number of coincidences;Number of events',
                             path=coinPath,xbins=100,xmin=0,xmax=1000,opt='kAddBinsDynamically')
     myGroup.defineHistogram('coin_bunch;TgcCoin_Timing',title='TgcCoin_Timing;Timing;Number of events',
                             path=coinPath,xbins=4,xmin=-1.5,xmax=1.5,xlabels=['Previous','Current','Next'])
     
+
+    hitDetailsPath = 'HitDetails/'
+    for side in ['A', 'C']:# side-A or side-C
+        for sector in range(1,13):# Sector 01,,,12
+            for station in range(1,5):# M1,2,3,4
+                for phi in range(4):# internal phi 0,1,2,3
+                    for eta in range(6):# eta index 1,,,5 for Endcap, and 0 for Forward
+                        for lay in range(1,4):# sub-layer 1,2,3 (triplet) or 1,2 (doublet)
+                            chamber_name = "%s%02dM%02df%02d%s%02dL%02d" % (side,sector,station,phi,'F' if eta==0 else 'E',eta,lay)
+                            for s_or_w in ['S','W']:# strip or wire
+                                nbins = 100
+                                if s_or_w=="S":
+                                    nbins = 32
+                                else:
+                                    if station==1:
+                                        if eta==1:     nbins = 24
+                                        elif eta==2:   nbins = 23
+                                        elif eta==3:
+                                            if lay==1: nbins = 61
+                                            else:      nbins = 62
+                                        elif eta==4:
+                                            if lay==1: nbins = 92
+                                            else:      nbins = 91
+                                        else: # forward
+                                            if lay==2: nbins = 104
+                                            else:      nbins = 105
+                                    elif station==2:
+                                        if eta==1 or eta==2 or eta==3: nbins = 32
+                                        elif eta==4:                   nbins = 103
+                                        elif eta==5:                   nbins = 110
+                                        else:                          nbins = 125 # forward
+                                    elif station==3:
+                                        if eta==1:   nbins = 31
+                                        elif eta==2: nbins = 30
+                                        elif eta==3: nbins = 32
+                                        elif eta==4: nbins = 106
+                                        elif eta==5: nbins = 96
+                                        else:        nbins = 122
+                                    else: # EI/FI
+                                        if eta==1:   nbins = 24 # EI
+                                        else:        nbins = 32 # FI
+
+                                myGroup.defineHistogram('hits_on_'+chamber_name+s_or_w,
+                                                        title='Hits_on_'+chamber_name+s_or_w+";Channel ID;Number of events",
+                                                        path=hitDetailsPath,xbins=nbins,xmin=0.5,xmax=nbins+0.5)
+
+
     acc = helper.result()
     result.merge(acc)
     return result
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
index 5c60f071005e44865e473cb7757dd35b484f888c..913e4b3308dcfde5e163231092834469ad100228 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.cxx
@@ -143,15 +143,31 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
     mymuon.tagged = triggerMatching(muon,m_trigTagDefs)==StatusCode::SUCCESS ? true : false;
     /* fill info of isolation among muons */
     mymuon.isolated = true;
+    mymuon.probeOK = false;
+    if(!m_TagAndProbe.value()) mymuon.probeOK = true;
     for(const auto& muon2 : *muons){
       if( muon == muon2 )continue;
+
       TLorentzVector muonvec2;
       muonvec2.SetPtEtaPhiM(muon2->pt(),muon2->eta(),muon2->phi(),m_muonMass.value());
       float dr = muonvec2.DeltaR( mymuon.fourvec );
       if( dr < m_isolationWindow.value() ){
   	mymuon.isolated = false;
-  	break;
       }
+
+      if( muon2->muonType()!=xAOD::Muon::Combined )continue;
+      if( muon2->author()!=xAOD::Muon::MuidCo && muon2->author()!=xAOD::Muon::STACO )continue;
+      if( muon2->quality()!=xAOD::Muon::Tight && muon2->quality()!=xAOD::Muon::Medium )continue;
+      if( triggerMatching(muon2,m_trigTagDefs)!=StatusCode::SUCCESS )continue;
+      if(!m_TagAndProbeZmumu.value()){
+	mymuon.probeOK=true;
+      }else{
+	if( muon->charge() == muon2->charge() )continue;
+	double dimuon_mass = (muonvec2 + mymuon.fourvec).M();
+	if(std::abs( dimuon_mass - m_zMass.value()) > m_zMassWindow.value() )continue;
+	mymuon.probeOK=true;
+      }
+
     }
     /* fill extrapolation info (only to TGC) */
     extrapolate( muon, mymuon );
@@ -179,32 +195,18 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
       }
       if(pass) mymuon.matchedL1ThrInclusive.insert(ithr);
     }
+
     /* store MyMuon */
     mymuons.push_back( mymuon );
   }
 
-  /* fill probe of tag-and-probe info */
-  for(auto mymuon : mymuons){
-    mymuon.probeOK_any = false;
-    mymuon.probeOK_Z = false;
-    for(const auto& mu2 : mymuons){
-      if( mymuon.muon == mu2.muon )continue;
-      if( !mu2.tagged )continue;
-      mymuon.probeOK_any = true;
-      if( mymuon.muon->charge() == mu2.muon->charge() )continue;
-      double dimuon_mass = (mu2.fourvec + mymuon.fourvec).M();
-      if(std::abs( dimuon_mass - m_zMass.value()) > m_zMassWindow.value() )continue;
-      mymuon.probeOK_Z = true;
-      break;
-    }
-  }
   
-  auto muon_eta = Monitored::Collection("muon_eta",mymuons,[](const MyMuon& m){return (m.muon->pt()/1000>30)?m.muon->eta():-10;});variables.push_back(muon_eta);
-  auto muon_phi = Monitored::Collection("muon_phi",mymuons,[](const MyMuon& m){return (m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi);
-  auto muon_phi_rpc = Monitored::Collection("muon_phi_rpc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())<1.05&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_rpc);
-  auto muon_phi_tgc = Monitored::Collection("muon_phi_tgc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_tgc);
-  auto muon_pt_rpc = Monitored::Collection("muon_pt_rpc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())<1.05)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_rpc);
-  auto muon_pt_tgc = Monitored::Collection("muon_pt_tgc",mymuons,[](const MyMuon& m){return (std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_tgc);
+  auto muon_eta = Monitored::Collection("muon_eta",mymuons,[](const MyMuon& m){return (m.probeOK&&m.muon->pt()/1000>30)?m.muon->eta():-10;});variables.push_back(muon_eta);
+  auto muon_phi = Monitored::Collection("muon_phi",mymuons,[](const MyMuon& m){return (m.probeOK&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi);
+  auto muon_phi_rpc = Monitored::Collection("muon_phi_rpc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())<1.05&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_rpc);
+  auto muon_phi_tgc = Monitored::Collection("muon_phi_tgc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4&&m.muon->pt()/1000>30)?m.muon->phi():-10;});variables.push_back(muon_phi_tgc);
+  auto muon_pt_rpc = Monitored::Collection("muon_pt_rpc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())<1.05)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_rpc);
+  auto muon_pt_tgc = Monitored::Collection("muon_pt_tgc",mymuons,[](const MyMuon& m){return (m.probeOK&&std::abs(m.muon->eta())>1.05&&std::abs(m.muon->eta())<2.4)?m.muon->pt()/1000:-10;});variables.push_back(muon_pt_tgc);
   auto muon_l1passThr1 = Monitored::Collection("muon_l1passThr1",mymuons,[](const MyMuon& m){return m.matchedL1ThrInclusive.find(1)!=m.matchedL1ThrInclusive.end();});variables.push_back(muon_l1passThr1);
   auto muon_l1passThr2 = Monitored::Collection("muon_l1passThr2",mymuons,[](const MyMuon& m){return m.matchedL1ThrInclusive.find(2)!=m.matchedL1ThrInclusive.end();});variables.push_back(muon_l1passThr2);
   auto muon_l1passThr3 = Monitored::Collection("muon_l1passThr3",mymuons,[](const MyMuon& m){return m.matchedL1ThrInclusive.find(3)!=m.matchedL1ThrInclusive.end();});variables.push_back(muon_l1passThr3);
@@ -236,6 +238,12 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
   }
   const TgcIdHelper& tgcIdHelper = m_idHelperSvc->tgcIdHelper();
   std::vector<TgcHit> tgcHits;
+  std::set<TString> chamber_list;
+  std::map<TString,std::vector<TgcHit>> tgcHitsMap;
+  std::map<TString,std::vector<int>> tgcHitPhiMap;
+  std::map<TString,std::vector<int>> tgcHitEtaMap;
+  std::map<TString,std::vector<int>> tgcHitPhiMapGlobal;
+  std::map<TString,std::vector<int>> tgcHitTiming;
   for(auto tgccnt : *tgcPrd){
     for(auto data : *tgccnt){
       TgcHit tgcHit;
@@ -268,7 +276,101 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
       tgcHit.phi = tgcIdHelper.stationPhi(id);
       tgcHit.station = tgcIdHelper.stationName(id);
       tgcHit.bunch = bunch;
+
+      tgcHit.igasGap = tgcHit.gasGap;
+      tgcHit.ieta = tgcHit.eta;
+      tgcHit.iphi = tgcHit.phi;
+      tgcHit.side = ( tgcHit.ieta > 0 )?("A"):("C");
+      tgcHit.iside = ( tgcHit.ieta > 0 )?(0):(1);
+      tgcHit.M = 0;
+      tgcHit.istation = tgcHit.station;
+      if( tgcHit.istation == 41 || tgcHit.istation == 42 ) tgcHit.M = 1;
+      else if( tgcHit.istation == 43 || tgcHit.istation == 44 ) tgcHit.M = 2;
+      else if( tgcHit.istation == 45 || tgcHit.istation == 46 ) tgcHit.M = 3;
+      else if( tgcHit.istation == 47 || tgcHit.istation == 48 ) tgcHit.M = 4; // EIFI
+      if(tgcHit.M == 0){
+	ATH_MSG_ERROR("unknown station: " << tgcHit.istation);
+      }
+
+      if( tgcHit.M != 4 ){ // Big Wheel, (M1,M2,M3)
+	if( tgcHit.istation % 2 == 0 ){ // Endcap
+	  int iphi2 = tgcHit.iphi + 1; // 2,3,4,..,49
+	  if(iphi2>=48)iphi2-=48; // 0,1,2,3 ..., 47
+	  tgcHit.sector = int(iphi2 / 4) + 1; // 1,2,3,,,12
+	  tgcHit.f = iphi2 - (tgcHit.sector-1) * 4; // 0,1,2,3
+	  tgcHit.E = (tgcHit.M==1) ? ( 5 - TMath::Abs( tgcHit.ieta ) ) : ( 6 - TMath::Abs( tgcHit.ieta ) );
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form( "%s%02iM%02if%02iE%02iL%02i%s", tgcHit.side.Data(), tgcHit.sector, tgcHit.M, tgcHit.f, tgcHit.E, tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}else{ // Forward
+	  int iphi2 = tgcHit.iphi; // 1,2,3,4,..,25
+	  if(iphi2>=24)iphi2-=24; // 0,1,2,3 ...,23
+	  tgcHit.sector = int(iphi2 / 2) + 1; // 1,2,3,,,12
+	  tgcHit.f = iphi2 - (tgcHit.sector-1) * 2; // 0,1
+	  if(tgcHit.f==1)tgcHit.f = 2;//0,2
+	  tgcHit.E = 0; // F
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form( "%s%02iM%02if%02iF00L%02i%s", tgcHit.side.Data(), tgcHit.sector, tgcHit.M, tgcHit.f, tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}
+      }else{ // Small Wheel (M4)
+	if( tgcHit.istation == 47 ){// FI
+	  tgcHit.sector = 0;
+	  tgcHit.f = tgcHit.iphi; // 1,2,3..24
+	  tgcHit.E = 0;
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form("%s00M04f%02iF00L%02i%s",tgcHit.side.Data(),tgcHit.f,tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}else if( tgcHit.istation == 48 ){// EI
+	  int iphi2 = (tgcHit.iphi>=21)?(tgcHit.iphi-21):(tgcHit.iphi); // 0,1,2,..,20
+	  if(iphi2>=0&&iphi2<=2){ tgcHit.sector = 1; tgcHit.f = iphi2;}
+	  else if(iphi2>=3&&iphi2<=5){ tgcHit.sector = 3; tgcHit.f = iphi2-3;}
+	  else if(iphi2>=6&&iphi2<=8){ tgcHit.sector = 5; tgcHit.f = iphi2-6;}
+	  else if(iphi2>=9&&iphi2<=10){ tgcHit.sector = 7; tgcHit.f = iphi2-9 +1;}
+	  else if(iphi2>=11&&iphi2<=13){ tgcHit.sector = 9; tgcHit.f = iphi2-11;}
+	  else if(iphi2>=14&&iphi2<=15){ tgcHit.sector = 11; tgcHit.f = iphi2-13;}
+	  else if(iphi2>=16&&iphi2<=18){ tgcHit.sector = 13; tgcHit.f = iphi2-16;}
+	  else if(iphi2>=19&&iphi2<=20){ tgcHit.sector = 15; tgcHit.f = iphi2-19 +1;}
+	  tgcHit.E = 1;
+	  tgcHit.L = tgcHit.igasGap;
+	  tgcHit.name = Form("%s%02iM04f%02iE01L%02i%s",tgcHit.side.Data(),tgcHit.sector,tgcHit.f,tgcHit.L,(tgcHit.isStrip>0)?("S"):("W"));
+	}else{
+	  ATH_MSG_ERROR("Unknown detector");
+	}
+      }
       tgcHits.push_back(tgcHit);
+      tgcHitsMap[tgcHit.name].push_back(tgcHit);
+      chamber_list.insert(tgcHit.name);
+
+      TString station_name = Form("%sM%02i%s",tgcHit.side.Data(),tgcHit.M,(tgcHit.isStrip>0)?("S"):("W"));
+      int phimap_index = 0;
+      int etamap_index = 0;
+      int phimap_global_index = 0; // no empty bins compare to the above index
+      if( tgcHit.M==1 ){
+	phimap_index = (tgcHit.sector - 1) * 4 + tgcHit.f + 1;
+	int tmpeta = (tgcHit.E==0)?(5):(tgcHit.E);
+	etamap_index = (tmpeta - 1) * 3 + tgcHit.L;
+	int tmpphi = tgcHit.f;
+	if( tgcHit.E==0 && tgcHit.f==2 ) tmpphi = 1;
+	if( tgcHit.E>0 ) phimap_global_index = (tmpeta - 1) * 144 + (tgcHit.sector - 1) * 12 + tmpphi * 3 + tgcHit.L;
+	else             phimap_global_index = 576 + (tgcHit.sector - 1) * 6 + tmpphi * 3 + tgcHit.L;
+      }else if( tgcHit.M==2 || tgcHit.M==3 ){
+	phimap_index = (tgcHit.sector - 1) * 4 + tgcHit.f + 1;
+	int tmpeta = (tgcHit.E==0)?(6):(tgcHit.E);
+	etamap_index = (tmpeta - 1) * 2 + tgcHit.L;
+	int tmpphi = tgcHit.f;
+	if( tgcHit.E==0 && tgcHit.f==2 ) tmpphi = 1;
+	if( tgcHit.E>0 ) phimap_global_index = (tmpeta - 1) * 96 + (tgcHit.sector - 1) * 8 + tmpphi * 2 + tgcHit.L;
+	else             phimap_global_index = 480 + (tgcHit.sector - 1) * 4 + tmpphi * 2 + tgcHit.L;
+      }else if( tgcHit.M==4 ){
+	phimap_index = tgcHit.iphi;
+	int tmpeta = (tgcHit.E==0)?(2):(tgcHit.E);
+	etamap_index = (tmpeta - 1) * 2 + tgcHit.L;
+	if( tgcHit.E>0 ) phimap_global_index = (tgcHit.iphi-1) * 2 + tgcHit.L;
+	else             phimap_global_index = 42 + (tgcHit.iphi-1) * 2 + tgcHit.L;
+      }
+      tgcHitPhiMap[station_name].push_back(phimap_index);
+      tgcHitEtaMap[station_name].push_back(etamap_index);
+      tgcHitPhiMapGlobal[station_name].push_back(phimap_global_index);
+      tgcHitTiming[station_name].push_back(bunch);
+
     }
   }
 
@@ -276,6 +378,23 @@ StatusCode TgcRawDataMonitorAlgorithm::fillHistograms( const EventContext& ctx )
   auto hit_bunch = Monitored::Collection("hit_bunch",tgcHits,[](const TgcHit& m){return m.bunch;});variables.push_back(hit_bunch);
   auto hit_sideA = Monitored::Collection("hit_sideA",tgcHits,[](const TgcHit& m){return m.z>0;});variables.push_back(hit_sideA);
   auto hit_sideC = Monitored::Collection("hit_sideC",tgcHits,[](const TgcHit& m){return m.z<0;});variables.push_back(hit_sideC);
+
+  for(auto chamber_name : chamber_list){
+    auto hits_on_a_chamber = Monitored::Collection(Form("hits_on_%s",chamber_name.Data()),tgcHitsMap[chamber_name],[](const TgcHit& m){return m.channel;});
+    fill(m_packageName,hits_on_a_chamber);
+  }
+
+  for(auto phimap : tgcHitPhiMap){
+    auto x = Monitored::Collection(Form("x_%s",phimap.first.Data()),tgcHitEtaMap[phimap.first],[](const int& m){return m;});
+    auto y = Monitored::Collection(Form("y_%s",phimap.first.Data()),phimap.second,[](const int& m){return m;});
+    fill(m_packageName,x,y);
+  }
+  for(auto phimap : tgcHitPhiMapGlobal){
+    auto x = Monitored::Scalar<int>(Form("lb_for_%s",phimap.first.Data()),GetEventInfo(ctx)->lumiBlock());
+    auto y = Monitored::Collection(Form("%s",phimap.first.Data()),phimap.second,[](const int& m){return m;});
+    auto z = Monitored::Collection(Form("timing_for_%s",phimap.first.Data()),tgcHitTiming[phimap.first],[](const int& m){return m;});
+    fill(m_packageName,x,y,z);
+  }
   
   SG::ReadHandle<Muon::TgcCoinDataContainer> tgcCoinCurr(m_TgcCoinDataContainerCurrBCKey, ctx);
   if(!tgcCoinCurr.isValid()){
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h
index b22c1e8c6e8a3f2c916c7adae8c4db6eeb58f6f5..5c7a7e031352cba646655e6cb7d8f219234fcdaa 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/TgcRawDataMonitoring/src/TgcRawDataMonitorAlgorithm.h
@@ -37,6 +37,7 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
     bool isolated;
     bool probeOK_any;
     bool probeOK_Z;
+    bool probeOK;
     std::set<int> matchedL1ThrExclusive;
     std::set<int> matchedL1ThrInclusive;
   };
@@ -55,6 +56,18 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
     int phi;
     int station;
     int bunch;
+    int sector;
+    int f;
+    int E;
+    int M;
+    int iphi;
+    int ieta;
+    int L;
+    TString name;
+    int istation;
+    int igasGap;
+    int iside;
+    TString side;
   };
   struct TgcTrig{
     float x_In;
@@ -84,7 +97,6 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
     int bunch;
     int inner;
   };
-
   
  private:
   ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
@@ -99,7 +111,8 @@ class TgcRawDataMonitorAlgorithm : public AthMonitorAlgorithm {
   
   StringProperty m_packageName{this,"PackageName","TgcRawDataMonitor","group name for histograming"};
   StringProperty m_trigTagList{this,"TagTrigList","HLT_mu26_ivarmedium_L1MU20","list of triggers to be used for trigger matching"};
-  BooleanProperty m_TagAndProbe{this,"TagAndProbe",true,"switch to perform tag-and-probe method"};
+  BooleanProperty m_TagAndProbe{this,"TagAndProbe",false,"switch to perform tag-and-probe method"};
+  BooleanProperty m_TagAndProbeZmumu{this,"TagAndProbeZmumu",false,"switch to perform tag-and-probe method Z->mumu"};
   BooleanProperty m_anaTgcPrd{this,"AnaTgcPrd",false,"switch to perform analysis on TGC PRD/Coin"};
   BooleanProperty m_anaOfflMuon{this,"AnaOfflMuon",true,"switch to perform analysis on xAOD::Muon"};
   BooleanProperty m_anaMuonRoI{this,"AnaMuonRoI",true,"switch to perform analysis on xAOD::LVL1MuonRoI"};
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx
index da495e1c3cdb9fbd780346b427e254c59e44ca7e..d8c2eef6d022e1ab667f82d7fb824cd4bd32b871 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonSegmentPlots.cxx
@@ -33,7 +33,7 @@ void RecoMuonSegmentPlots::fill(const xAOD::Muon& mu){
 //use the link to fill
 void RecoMuonSegmentPlots::fill(const std::vector<ElementLink<DataVector<xAOD::MuonSegment_v1>>> Mu_Segments){
 
-  for(const auto Mu_Segment : Mu_Segments){
+  for(const auto& Mu_Segment : Mu_Segments){
     const ElementLink<DataVector<xAOD::MuonSegment_v1>> Mu_seg = Mu_Segment;
     if(Mu_seg.isValid()){
       const xAOD::MuonSegment* seg = *Mu_seg;
diff --git a/Projects/AnalysisBase/version.txt b/Projects/AnalysisBase/version.txt
index 44e031ba9ba43444a4a4413b5755e21a977f3470..0398faf11c23a7b4f71ebf50cfb8ce6d4b0b4b99 100644
--- a/Projects/AnalysisBase/version.txt
+++ b/Projects/AnalysisBase/version.txt
@@ -1 +1 @@
-22.2.0
+22.2.1
diff --git a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
index 9232884db3d359d1aeb11019c4c070e5eaff954c..13c4c42a69c36b4ae4072b962577500eb63a017f 100755
--- a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
+++ b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
@@ -128,6 +128,7 @@ def JetBuildAlgCfg(ConfigFlags,buildjetsname):
     jclust.JetAlgorithm = "AntiKt"
     jclust.JetRadius = 1.0
     jclust.PtMin = 10e3 # MeV
+    jclust.GhostArea = 0.01
     jclust.InputPseudoJets = "PseudoJetMerged_"+buildjetsname
     jclust.JetInputType = 1 # Hardcoded "magic number" for now
     # See https://gitlab.cern.ch/atlas/athena/blob/master/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
diff --git a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
index af610bb51f00badf21c15c062801d41798d5b5ed..591ec931f52703dbbd71ecd9880b50ff26b4e243 100644
--- a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
+++ b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
@@ -155,7 +155,7 @@ namespace xAOD {
 
     // muon etcone isolation
     const Muon* muon = dynamic_cast<const Muon*>(&particle);
-    if(muon) return caloCellIsolation(result,*muon,cones,corrlist,coneCoreSize, derefMap);
+    if(muon) return caloCellIsolation(result,*muon,cones,corrlist,coneCoreSize,derefMap);
 
     // egamma etcone isolation
     const Egamma* egam = dynamic_cast<const Egamma*>(ip);
@@ -719,62 +719,82 @@ namespace xAOD {
       conesf.push_back(cone);
       if(cone>maxConeSize) maxConeSize = cone;
     }
-
-    const xAOD::CaloCluster* muonCluster=*muon.clusterLink();
-    if(!muonCluster){//have to figure this part out
-      ATH_MSG_WARNING("muon has no cluster, cannot calculate etcone isolation");
-      return false;
-    }
     /// add coreCone if asked -- make sure it's the last one! or a better
     const double coreConeDR = coneCoreSize;
     bool doCoreCone = (!m_saveOnlyRequestedCorrections || result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone)));
     if(doCoreCone && maxConeSize<coreConeDR) maxConeSize = coreConeDR;
-    /// start the calculation
-    ATH_MSG_DEBUG("calculating etcone for # " << conesf.size() << " cones");
-    Trk::CaloCellSelectorLayerdR selector(maxConeSize);
-    selector.preSelectAction(*muonCluster);
-    ATH_MSG_DEBUG("looping over cells " << muonCluster->size());
-    for(unsigned int i=0; i<conesf.size(); i++){
-      double totE = 0.;
-      selector.setConeSize(conesf[i]);
-      xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
-      for(; cell_itr!=muonCluster->end(); ++cell_itr){
-        if( !selector.select(**cell_itr) ) continue;
-        if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
-        totE += (*cell_itr)->et();
+
+    if(!muon.clusterLink().isValid()){
+      ATH_MSG_DEBUG("no valid cluster link");
+      //no cluster, set everything to 0
+      for(unsigned int i=0; i<conesf.size(); i++) result.etcones[i] = 0;
+      if(doCoreCone){
+	ATH_MSG_DEBUG("starting etcone, coreCone");
+	double totE = 0.;
+	std::map<Iso::IsolationCorrectionParameter,float> corecorr;
+	corecorr[Iso::coreEnergy] = totE;
+	corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
+	result.coreCorrections[Iso::coreCone] = corecorr;
+	ATH_MSG_DEBUG("done etcone, coreCone");
+	/// apply the correction if required.                                                                                                                                                           
+	if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
+	  double ecore = totE;
+	  ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
+	  for( unsigned int i=0;i<result.etcones.size();++i ) {
+	    result.etcones[i] -= ecore;
+	    ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
+	  }
+	}
       }
-      result.etcones[i] = totE;
-      ATH_MSG_DEBUG("etcone raw: coneSize = " << conesf[i] << "; etcone = " << result.etcones[i]);
     }
-    ATH_MSG_DEBUG("done looping over cells ");
-    /// do coreCone
-    if(doCoreCone){
-      ATH_MSG_DEBUG("starting etcone, coreCone");
-      double totE = 0.;
-      selector.setConeSize(coreConeDR);
-      xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
-      for(; cell_itr!=muonCluster->end(); ++cell_itr){
-        if( !selector.select(**cell_itr) ) continue;
-        if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
-        totE += (*cell_itr)->et();
+    else{
+      const xAOD::CaloCluster* muonCluster=*muon.clusterLink();
+      /// start the calculation
+      ATH_MSG_DEBUG("calculating etcone for # " << conesf.size() << " cones");
+      Trk::CaloCellSelectorLayerdR selector(maxConeSize);
+      selector.preSelectAction(*muonCluster);
+      ATH_MSG_DEBUG("looping over cells " << muonCluster->size());
+      for(unsigned int i=0; i<conesf.size(); i++){
+	double totE = 0.;
+	selector.setConeSize(conesf[i]);
+	xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
+	for(; cell_itr!=muonCluster->end(); ++cell_itr){
+	  if( !selector.select(**cell_itr) ) continue;
+	  if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
+	  totE += (*cell_itr)->et();
+	}
+	result.etcones[i] = totE;
+	ATH_MSG_DEBUG("etcone raw: coneSize = " << conesf[i] << "; etcone = " << result.etcones[i]);
       }
-      std::map<Iso::IsolationCorrectionParameter,float> corecorr;
-      corecorr[Iso::coreEnergy] = totE;
-      corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
-      result.coreCorrections[Iso::coreCone] = corecorr;
-      ATH_MSG_DEBUG("done etcone, coreCone");
-
-      /// apply the correction if required.
-      if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
-        double ecore = totE;
-        ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
-        for( unsigned int i=0;i<result.etcones.size();++i ) {
-          result.etcones[i] -= ecore;
-          ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
-        }
+      ATH_MSG_DEBUG("done looping over cells ");
+      /// do coreCone
+      if(doCoreCone){
+	ATH_MSG_DEBUG("starting etcone, coreCone");
+	double totE = 0.;
+	selector.setConeSize(coreConeDR);
+	xAOD::CaloCluster::const_cell_iterator cell_itr=muonCluster->begin();
+	for(; cell_itr!=muonCluster->end(); ++cell_itr){
+	  if( !selector.select(**cell_itr) ) continue;
+	  if (m_ExcludeTG3 && CaloCell_ID::TileGap3 == (*cell_itr)->caloDDE()->getSampling()) continue;
+	  totE += (*cell_itr)->et();
+	}
+	std::map<Iso::IsolationCorrectionParameter,float> corecorr;
+	corecorr[Iso::coreEnergy] = totE;
+	corecorr[Iso::coreArea]   = coreConeDR*coreConeDR*M_PI;
+	result.coreCorrections[Iso::coreCone] = corecorr;
+	ATH_MSG_DEBUG("done etcone, coreCone");
+	
+	/// apply the correction if required.
+	if(result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreCone))){
+	  double ecore = totE;
+	  ATH_MSG_DEBUG("Applying coreCone correction for trackParticle etcone isolation.");
+	  for( unsigned int i=0;i<result.etcones.size();++i ) {
+	    result.etcones[i] -= ecore;
+	    ATH_MSG_DEBUG("i: " << i << " cone [before] " << result.etcones[i]+ecore << " cone [after] " << result.etcones[i]);
+	  }
+	}
       }
     }
-
     // calculate etcore
     if(!m_saveOnlyRequestedCorrections ||
        result.corrlist.calobitset.test(static_cast<unsigned int>(Iso::coreMuon))){
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
index 1457745db97f25b5093e0f723861b63efe8a2099..e72fa6abe1de26733eb06933cf57dcdeade7601d 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaSelectedTrackCopy.h
@@ -168,13 +168,13 @@ private:
                         "SCT_DetectorElementCollection",
                         "Key of SiDetectorElementCollection for SCT" };
 
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllClusters;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedClusters;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllSiTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedSiTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_AllTRTTracks;
-  mutable Gaudi::Accumulators::Counter<unsigned long> m_SelectedTRTTracks;
+  mutable Gaudi::Accumulators::Counter<> m_AllClusters;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedClusters;
+  mutable Gaudi::Accumulators::Counter<> m_AllTracks;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedTracks;
+  mutable Gaudi::Accumulators::Counter<> m_AllSiTracks;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedSiTracks;
+  mutable Gaudi::Accumulators::Counter<> m_AllTRTTracks;
+  mutable Gaudi::Accumulators::Counter<> m_SelectedTRTTracks;
 };
 #endif
diff --git a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
index 7661343ec097b78cd2870e81bdde3b9658a0eb79..6508d069edc78e594fbcdd211c3738c3276f88f4 100644
--- a/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
+++ b/Reconstruction/egamma/egammaAlgs/src/egammaTopoClusterCopier.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef EGAMMAALGS_EGAMMATOPOCLUSTERCOPIER_H
@@ -44,12 +44,12 @@ class egammaTopoClusterCopier : public AthReentrantAlgorithm {
       "View container of selected topoclusters"};
 
   Gaudi::Property<float> m_etaCut {this, "EtaCut", 2.6, "maximum |eta| of selected clusters"};
-  Gaudi::Property<float> m_ECut {this, "ECut", 500, "minimum energy of selected clusters"};
+  Gaudi::Property<float> m_ECut {this, "ECut", 700, "minimum energy of selected clusters"};
   Gaudi::Property<float> m_EMFracCut {this, "EMFracCut", 0.5, "mimimum EM fraction"};
  
-  mutable Gaudi::Accumulators::Counter<long int>                     m_AllClusters;            
-  mutable Gaudi::Accumulators::Counter<long int>                     m_PassPreSelection;
-  mutable Gaudi::Accumulators::Counter<long int>                     m_PassSelection; 
+  mutable Gaudi::Accumulators::Counter<>                     m_AllClusters;
+  mutable Gaudi::Accumulators::Counter<>                     m_PassPreSelection;
+  mutable Gaudi::Accumulators::Counter<>                     m_PassSelection;
 };
 
 #endif // EGAMMATOOLS_EMCLUSTERTOOL_H
diff --git a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
index 340d2986ad9abe19359067d58a493b84ad4d0b12..a1621e15ebd3ab404e83fe76c16cf1b3f7de9fb7 100644
--- a/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.py
+++ b/Reconstruction/egamma/egammaRec/python/EMCommonRefitter.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 __future__ import print_function
 from InDetRecExample import TrackingCommon as TrackingCommon
@@ -7,6 +7,8 @@ print("EMCommonRefitter.py")
 
 
 def getGSFTrackFitter():
+
+    # setup Rot and error scaling
     egRotCreator = TrackingCommon.getInDetRotCreator(
         name='egRotCreator',
         private=True)
@@ -15,23 +17,19 @@ def getGSFTrackFitter():
         TrackingCommon.getRIO_OnTrackErrorScalingCondAlg,
         'RIO_OnTrackErrorScalingCondAlg')
 
-    # get Rk propagator
+    # setup Rk propagator
     from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import (
         Trk__RungeKuttaPropagator as Propagator)
 
     egTrkPropagator = Propagator(name='egTrkPropagator')
     egTrkPropagator.AccuracyParameter = 0.0001
 
-    # Setup the Navigator (default)
-    from TrkDetDescrSvc.AtlasTrackingGeometrySvc import (
-        AtlasTrackingGeometrySvc)
-
-    from TrkExTools.TrkExToolsConf import Trk__Navigator
-    egTrkNavigator = Trk__Navigator(
+    # setup Navigator
+    egTrkNavigator = TrackingCommon.getInDetNavigator(
         name='egTrkNavigator',
-        TrackingGeometrySvc=AtlasTrackingGeometrySvc)
+        private=True)
 
-    # Set up the GSF
+    # setup the GSF
     from TrkGaussianSumFilter.TrkGaussianSumFilterConf import (
         Trk__GsfMaterialMixtureConvolution)
 
diff --git a/Reconstruction/tauRec/python/TauRecBuilder.py b/Reconstruction/tauRec/python/TauRecBuilder.py
index cdab5f3e925a016e0ad897c3a02412181076a8f6..1efea1c0173164b153605da9a3e923e95a9ee649 100644
--- a/Reconstruction/tauRec/python/TauRecBuilder.py
+++ b/Reconstruction/tauRec/python/TauRecBuilder.py
@@ -13,61 +13,34 @@
 ################################################################################
 
 import os, sys, string
-
 from AthenaCommon.Logging import logging
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.Constants import *
 from AthenaCommon.BeamFlags import jobproperties
 import traceback
-
 from RecExConfig.Configured import Configured
 from .TauRecConfigured import TauRecConfigured
 
-# global tauRec config keys - to be replaced with tauRecFlags
-_outputType = "xAOD::TauJetContainer"
-_outputKey = "TauJets"
-_outputAuxType = "xAOD::TauJetAuxContainer"
-_outputAuxKey = "TauJetsAux."
-
 ################################################################################
 ## @class TauRecCoreBuilder
-# Build proper tau candidates and associate tracks, vertex and cells
+# Build tau candidates and associate tracks, vertex and cells
 ################################################################################
 class TauRecCoreBuilder ( TauRecConfigured ) :
-    """Build proper tau candidates and associate tracks, vertex and cells. 
+    """Build tau candidates and associate tracks, vertex and cells. 
     Calculate properties based on cell informations. 
-    Find clusters used for Pi0 identification and eflow variables.
-    PhotonConversion will be run here too.
-    """
-    
-    _output     = { _outputType:_outputKey , _outputAuxType:_outputAuxKey,
-                    'xAOD::TauTrackContainer' : 'TauTracks',
-                    'xAOD::CaloClusterContainer' : 'TauShotClusters',
-                    'xAOD::PFOContainer' : 'TauShotParticleFlowObjects',
-                    'CaloCellContainer' : 'TauCommonPi0Cells',
-                    }
-
+    Find cells used for Pi0 identification and eflow variables.
+    """    
 
     def __init__(self, name = "TauCoreBuilder",doPi0Clus=False, doTJVA=False):
         self.name = name
         self.doPi0Clus = doPi0Clus
         self.do_TJVA = doTJVA
         TauRecConfigured.__init__(self, name, doPi0Clus)
-
-
  
     def configure(self):
         mlog = logging.getLogger ('TauCoreBuilder.py::configure:')
         mlog.info('entering')
-        
-        
-        from RecExConfig.RecFlags import rec    
-        
-        from RecExConfig.ObjKeyStore import objKeyStore
-        objKeyStore.addManyTypesStreamESD(self._output)
-        objKeyStore.addManyTypesStreamAOD(self._output)   
-        objKeyStore.addManyTypesTransient(self._output)
-        
+                
         import tauRec.TauAlgorithmsHolder as taualgs
         from tauRec.tauRecFlags import tauFlags
         
@@ -119,10 +92,4 @@ class TauRecCoreBuilder ( TauRecConfigured ) :
     def TauBuilderToolHandle(self):
         return self._TauBuilderToolHandle
 
-    def outputKey(self):
-         return self._output[self._outputType]
-    
-    def outputType(self):
-         return self._outputType
-
 #end
diff --git a/Reconstruction/tauRec/python/TauRecRunConfigured.py b/Reconstruction/tauRec/python/TauRecRunConfigured.py
index b31874fd000c18ab6c1bedee7c787161a0041434..ea01dfddb4014521152688cfd33c2b2a15594bb1 100644
--- a/Reconstruction/tauRec/python/TauRecRunConfigured.py
+++ b/Reconstruction/tauRec/python/TauRecRunConfigured.py
@@ -31,14 +31,14 @@ class TauRecRunConfigured ( Configured ) :
         from tauRec.tauRecFlags import tauFlags
         self._TauRunnerAlgHandle = TauRunnerAlg ( name=self.name+'Alg', 
                                                   Key_tauInputContainer="tmp_TauJets",
-                                                  Key_Pi0ClusterInputContainer="TauPi0SubtractedClusters",
+                                                  Key_Pi0ClusterInputContainer="TauInitialPi0Clusters",
                                                   Key_tauOutputContainer="TauJets",
                                                   Key_neutralPFOOutputContainer="TauNeutralParticleFlowObjects",
                                                   Key_pi0ClusterOutputContainer="TauPi0Clusters",
                                                   Key_hadronicPFOOutputContainer="TauHadronicParticleFlowObjects",
                                                   Key_vertexOutputContainer = "TauSecondaryVertices",
                                                   Key_chargedPFOOutputContainer = "TauChargedParticleFlowObjects",
-                                                  Key_pi0Container= "finalTauPi0s"
+                                                  Key_pi0Container= "TauFinalPi0s"
                                                   )
                                                                                                 
         Configured.__init__(self, ignoreExistingDataObject=ignoreExistingDataObject)
diff --git a/Reconstruction/tauRec/python/TauRecRunner.py b/Reconstruction/tauRec/python/TauRecRunner.py
index 04cc5c067417f579f731679ef27fe102aabee0ca..789d13b2ef57f91633a904d7e289185083e4d5ff 100644
--- a/Reconstruction/tauRec/python/TauRecRunner.py
+++ b/Reconstruction/tauRec/python/TauRecRunner.py
@@ -13,59 +13,37 @@
 ################################################################################
 
 import os, sys, string
-
 from AthenaCommon.Logging import logging
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.Constants import *
 from AthenaCommon.BeamFlags import jobproperties
 import traceback
-
 from RecExConfig.Configured import Configured
 from .TauRecRunConfigured import TauRecRunConfigured
 
-# global tauRec config keys
-_outputType = "xAOD::TauJetContainer"
-_outputKey = "TauJets"
-_outputAuxType = "xAOD::TauJetAuxContainer"
-_outputAuxKey = "TauJetsAux."
-
 ################################################################################
 ## @class TauRecRunner
 # Build proper tau candidates and associate tracks, vertex and cells
 ################################################################################
 class TauRecRunner ( TauRecRunConfigured ) :
-    """Build proper tau candidates and associate tracks, vertex and cells. 
-    Calculate properties based on cell informations. 
-    Find clusters used for Pi0 identification and eflow variables.
-    PhotonConversion will be run here too.
+    """Build final tau candidates.
+    Run algorithms that require pi0 cells, and all downstream algorithms.
     """
   
-    _output     = { _outputType:_outputKey , _outputAuxType:_outputAuxKey }
-    
     def __init__(self, name = "TauRecRunner"):
         self.name = name
         TauRecRunConfigured.__init__(self, name)
-
-
  
     def configure(self):
         mlog = logging.getLogger ('TauRecRunner.py::configure:')
         mlog.info('entering')
                 
-        from RecExConfig.RecFlags import rec    
-        
-        # xxx ToDo: still needed?        
-        from RecExConfig.ObjKeyStore import objKeyStore
-        objKeyStore.addManyTypesStreamESD(self._output)
-        objKeyStore.addManyTypesStreamAOD(self._output)              
-        
-        import tauRec.TauAlgorithmsHolder as taualgs
-        
-        from tauRec.tauRecFlags import tauFlags
-                
+        from RecExConfig.RecFlags import rec                
+        import tauRec.TauAlgorithmsHolder as taualgs        
+        from tauRec.tauRecFlags import tauFlags                
         
         tools = []
-                        
+        
         tools.append(taualgs.getPi0ClusterCreator())
         tools.append(taualgs.getPi0ClusterScaler())
         tools.append(taualgs.getPi0ScoreCalculator())
@@ -129,14 +107,6 @@ class TauRecRunner ( TauRecRunConfigured ) :
                 
         # run first part of Tau Builder
         TauRecRunConfigured.WrapTauRecToolExecHandle(self, tool=tools)
-        return True
-        
-
-    def outputKey(self):
-         return self._output[self._outputType]
-    
-    def outputType(self):
-         return self._outputType
-
+        return True        
 
 #end
diff --git a/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py b/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py
index 1b97e0974cb774656b7d1b4bb63eb8719a95d337..4ee5fe96b024e82c59aa90c6cad7c39590547316 100644
--- a/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py
+++ b/Reconstruction/tauRec/share/Pi0ClusterMaker_jobOptions.py
@@ -249,8 +249,8 @@ TopoSplitterForTaus.RestrictHECIWandFCalNeighbors  = False
 TopoSplitterForTaus.WeightingOfNegClusters = jobproperties.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute()
 
 # cluster maker
-cluster_container = 'TauPi0SubtractedClusters'
-CaloTopoForTausMaker = CaloClusterMaker ("TauPi0SubtractedClusterMaker")
+cluster_container = 'TauInitialPi0Clusters'
+CaloTopoForTausMaker = CaloClusterMaker ("TauInitialPi0ClusterMaker")
 CaloTopoForTausMaker.ClustersOutputName=cluster_container
 CaloTopoForTausMaker.ClusterMakerTools=[
     TopoClusterForTaus.getFullName(),
diff --git a/Reconstruction/tauRec/share/TauAODList.py b/Reconstruction/tauRec/share/TauAODList.py
index 0df44446948e96f2e21c0a5eb0996d31412c70d5..df83c6b16998eb42febc13a8b340ce0f9a5ea9b0 100644
--- a/Reconstruction/tauRec/share/TauAODList.py
+++ b/Reconstruction/tauRec/share/TauAODList.py
@@ -11,38 +11,46 @@
 TauAODList = []
 
 #------------------------------------------------------------------------------
-# Tau Pi0 cluster
-#------------------------------------------------------------------------------
-#TauAODList += [ "xAOD::CaloClusterContainer#TauPi0Clusters" ]
-#TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0ClustersAux." ]
-
-TauAODList += [ "xAOD::CaloClusterContainer#TauPi0SubtractedClusters" ]
-TauAODList += [ "xAOD::CaloClusterAuxContainer#TauPi0SubtractedClustersAux." ]
-TauAODList += [ "CaloClusterCellLinkContainer#TauPi0SubtractedClusters_links" ]
-
-#------------------------------------------------------------------------------
-# TauRec main xAOD containers
+# Taus
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::TauJetContainer#TauJets" ]
 TauAODList += [ "xAOD::TauJetAuxContainer#TauJetsAux.-mu.-nVtxPU.-ABS_ETA_LEAD_TRACK.-TAU_ABSDELTAPHI.-TAU_ABSDELTAETA.-absipSigLeadTrk" ]
 
 #------------------------------------------------------------------------------
-# TauRec tauTrack xAOD containers
+# Tau tracks
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::TauTrackContainer#TauTracks" ]
 TauAODList += [ "xAOD::TauTrackAuxContainer#TauTracksAux." ]
 
 #------------------------------------------------------------------------------
-# Secondary Vertex for Tau Decay
+# Secondary vertex
 #------------------------------------------------------------------------------
 TauAODList += [ "xAOD::VertexContainer#TauSecondaryVertices" ]
 TauAODList += [ "xAOD::VertexAuxContainer#TauSecondaryVerticesAux.-vxTrackAtVertex" ]
 
+#------------------------------------------------------------------------------
+# Pi0 cells
+#------------------------------------------------------------------------------
+TauAODList += [ "CaloCellContainer#TauCommonPi0Cells" ]
+TauAODList += [ "CaloClusterCellLinkContainer#TauInitialPi0Clusters_links" ]
+
+#------------------------------------------------------------------------------
+# Pi0 initial clusters
+#------------------------------------------------------------------------------
+TauAODList += [ "xAOD::CaloClusterContainer#TauInitialPi0Clusters" ]
+TauAODList += [ "xAOD::CaloClusterAuxContainer#TauInitialPi0ClustersAux." ]
+
+#------------------------------------------------------------------------------
+# Shot clusters
+#------------------------------------------------------------------------------
+TauAODList += [ "xAOD::CaloClusterContainer#TauShotClusters"]
+TauAODList += [ "xAOD::CaloClusterAuxContainer#TauShotClustersAux."]
+
 #------------------------------------------------------------------------------
 # Final reconstructed 4-vectors of Pi0s
 #------------------------------------------------------------------------------
-TauAODList += [ "xAOD::ParticleContainer#finalTauPi0s" ]
-TauAODList += [ "xAOD::ParticleAuxContainer#finalTauPi0sAux." ]
+TauAODList += [ "xAOD::ParticleContainer#TauFinalPi0s" ]
+TauAODList += [ "xAOD::ParticleAuxContainer#TauFinalPi0sAux." ]
 
 #------------------------------------------------------------------------------
 # Shot ParticleFlowObjects
@@ -68,18 +76,10 @@ TauAODList += [ "xAOD::PFOAuxContainer#TauNeutralParticleFlowObjectsAux." ]
 TauAODList += [ "xAOD::PFOContainer#TauHadronicParticleFlowObjects" ]
 TauAODList += [ "xAOD::PFOAuxContainer#TauHadronicParticleFlowObjectsAux." ]
 
+#------------------------------------------------------------------------------
+# Di-tau AOD content
+#------------------------------------------------------------------------------
 from DiTauRec.DiTauRecFlags import jobproperties
 if jobproperties.DiTauRecFlags.doDiTauRec():
     include("DiTauRec/DiTauAODList.py")
     TauAODList += DiTauAODList
-
-
-#-------------------------------------------------------------------------
-# eflowObjects for tau
-#--------------------------------------------------------------------------
-#TauAODList += [ "eflowObjectContainer#eflowObjects_tauMode" ]
-#TauAODList += [ "xAOD::PFOContainer#neutralTauPFO_eflowRec" ]
-#TauAODList += [ "xAOD::PFOAuxContainer#neutralTauPFO_eflowRecAux." ]
-#TauAODList += [ "xAOD::PFOContainer#chargedTauPFO_eflowRec" ]
-#TauAODList += [ "xAOD::PFOAuxContainer#chargedTauPFO_eflowRecAux." ]
-
diff --git a/Reconstruction/tauRec/share/TauESDList.py b/Reconstruction/tauRec/share/TauESDList.py
index 97ef76bd7a22eb60166d760894fd3a97cd367567..5313f4b1f07d1828486bdc24295d7d30b2fc3d8e 100644
--- a/Reconstruction/tauRec/share/TauESDList.py
+++ b/Reconstruction/tauRec/share/TauESDList.py
@@ -11,66 +11,46 @@
 TauESDList = []
 
 #------------------------------------------------------------------------------
-# Tau1P3P cell cluster
+# Taus
 #------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#Tau1P3PCellCluster" ]
-#TauESDList += [ "CaloCellLinkContainer#Tau1P3PCellCluster_Link" ]
-#TauESDList += [ "CaloShowerContainer#Tau1P3PCellCluster_Data" ]
-
-#------------------------------------------------------------------------------
-# TauRec cell cluster
-#------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#TauRecCellCluster" ]
-#TauESDList += [ "CaloCellLinkContainer#TauRecCellCluster_Link" ]
-#TauESDList += [ "CaloShowerContainer#TauRecCellCluster_Data" ]
+TauESDList += [ "xAOD::TauJetContainer#TauJets" ]
+TauESDList += [ "xAOD::TauJetAuxContainer#TauJetsAux." ]
 
 #------------------------------------------------------------------------------
-# Tau1P3P Pi0 cluster
+# Tau tracks
 #------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#TauPi0ClusterContainer" ]
-#TauESDList += [ "CaloCellLinkContainer#TauPi0ClusterContainer_Link" ]
-#TauESDList += [ "CaloShowerContainer#TauPi0ClusterContainer_Data" ]
-#TauESDList += [ "CaloCellContainer#TauCommonPi0CellContainer" ]  # for studies of the cell-based algorithm
+TauESDList += [ "xAOD::TauTrackContainer#TauTracks" ]
+TauESDList += [ "xAOD::TauTrackAuxContainer#TauTracksAux." ]
 
 #------------------------------------------------------------------------------
-# Tau Pi0 cluster
+# Secondary vertex
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::CaloClusterContainer#TauPi0Clusters" ]
-TauESDList += [ "xAOD::CaloClusterAuxContainer#TauPi0ClustersAux." ]
-
+TauESDList += [ "xAOD::VertexContainer#TauSecondaryVertices" ]
+TauESDList += [ "xAOD::VertexAuxContainer#TauSecondaryVerticesAux.-vxTrackAtVertex" ]
 
 #------------------------------------------------------------------------------
-# Tau Pi0 cluster cell container and links
+# Pi0 cells
 #------------------------------------------------------------------------------
-TauESDList += [ "CaloClusterCellLinkContainer#TauPi0Clusters_links" ]
 TauESDList += [ "CaloCellContainer#TauCommonPi0Cells" ]
+TauESDList += [ "CaloClusterCellLinkContainer#TauInitialPi0Clusters_links" ]
 
 #------------------------------------------------------------------------------
-# TauRec main xAOD containers
+# Pi0 initial clusters
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::TauJetContainer#TauJets" ]
-TauESDList += [ "xAOD::TauJetAuxContainer#TauJetsAux." ]
+TauESDList += [ "xAOD::CaloClusterContainer#TauInitialPi0Clusters" ]
+TauESDList += [ "xAOD::CaloClusterAuxContainer#TauInitialPi0ClustersAux." ]
 
 #------------------------------------------------------------------------------
-# TauRec tauTrack xAOD containers
+# Shot clusters
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::TauTrackContainer#TauTracks" ]
-TauESDList += [ "xAOD::TauTrackAuxContainer#TauTracksAux." ]
+TauESDList += [ "xAOD::CaloClusterContainer#TauShotClusters"]
+TauESDList += [ "xAOD::CaloClusterAuxContainer#TauShotClustersAux."]
 
 #------------------------------------------------------------------------------
-# Secondary Vertex for Tau Decay
+# Final reconstructed 4-vectors of Pi0s
 #------------------------------------------------------------------------------
-TauESDList += [ "xAOD::VertexContainer#TauSecondaryVertices" ]
-TauESDList += [ "xAOD::VertexAuxContainer#TauSecondaryVerticesAux.-vxTrackAtVertex" ]
-
-TauESDList += [ "xAOD::ParticleContainer#finalTauPi0s" ]
-TauESDList += [ "xAOD::ParticleAuxContainer#finalTauPi0sAux." ]
-##------------------------------------------------------------------------------
-## Tau shot clusters
-##------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#TauShotClusters" ]
-#TauESDList += [ "CaloCellLinkContainer#TauShotClusters_Link" ]
-#TauESDList += [ "CaloShowerContainer#TauShotClusters_Data" ]
+TauESDList += [ "xAOD::ParticleContainer#TauFinalPi0s" ]
+TauESDList += [ "xAOD::ParticleAuxContainer#TauFinalPi0sAux." ]
 
 #------------------------------------------------------------------------------
 # Shot ParticleFlowObjects
@@ -95,29 +75,11 @@ TauESDList += [ "xAOD::PFOAuxContainer#TauNeutralParticleFlowObjectsAux." ]
 #------------------------------------------------------------------------------
 TauESDList += [ "xAOD::PFOContainer#TauHadronicParticleFlowObjects" ]
 TauESDList += [ "xAOD::PFOAuxContainer#TauHadronicParticleFlowObjectsAux." ]
-                    
-
-#-------------------------------------------------------------------------
-# eflowObjects for tau
-#--------------------------------------------------------------------------
-#TauESDList += [ "eflowObjectContainer#eflowObjects_tauMode" ]
-#TauESDList += [ "xAOD::PFOContainer#neutralTauPFO_eflowRec" ]
-#TauESDList += [ "xAOD::PFOAuxContainer#neutralTauPFO_eflowRecAux." ]
-#TauESDList += [ "xAOD::PFOContainer#chargedTauPFO_eflowRec" ]
-#TauESDList += [ "xAOD::PFOAuxContainer#chargedTauPFO_eflowRecAux." ]
-
-
-        
-##------------------------------------------------------------------------------
-## Tau1P3P cell EM012 cluster
-##------------------------------------------------------------------------------
-#TauESDList += [ "CaloClusterContainer#Tau1P3PCellEM012ClusterContainer" ]
-#TauESDList += [ "CaloCellLinkContainer#Tau1P3PCellEM012ClusterContainer_Link" ]
-#TauESDList += [ "CaloShowerContainer#Tau1P3PCellEM012ClusterContainer_Data" ]
-                                     
 
+#------------------------------------------------------------------------------
+# Di-tau AOD content
+#------------------------------------------------------------------------------
 from DiTauRec.DiTauRecFlags import jobproperties
 if jobproperties.DiTauRecFlags.doDiTauRec():
     include("DiTauRec/DiTauESDList.py")
     TauESDList += DiTauESDList
-    pass
diff --git a/Reconstruction/tauRec/tauRec/TauRunnerAlg.h b/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
index 68c5da9a297e28578dacab6e435fed5906445887..498c3e194b272a61efc676790091d6673f215a5f 100644
--- a/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
+++ b/Reconstruction/tauRec/tauRec/TauRunnerAlg.h
@@ -48,16 +48,15 @@ class TauRunnerAlg: public AthAlgorithm
 	ToolHandleArray<ITauToolBase>  m_tools{this, "Tools", {}, "Tools building taus"};
 
 	SG::ReadHandleKey<xAOD::TauJetContainer> m_tauInputContainer{this,"Key_tauInputContainer","tmp_TauJets","input temp tau key"};
-	SG::ReadHandleKey<xAOD::CaloClusterContainer> m_pi0ClusterInputContainer{this,"Key_Pi0ClusterInputContainer", "TauPi0SubtractedClusters", "input pi0 cluster"};
-
-	SG::WriteHandleKey<xAOD::TauJetContainer> m_tauOutputContainer{this,"Key_tauOutputContainer","TauJets","output tau data key"};	
+	SG::ReadHandleKey<xAOD::CaloClusterContainer> m_pi0ClusterInputContainer{this,"Key_Pi0ClusterInputContainer", "TauInitialPi0Clusters", "input pi0 cluster"};
 
+	SG::WriteHandleKey<xAOD::TauJetContainer> m_tauOutputContainer{this,"Key_tauOutputContainer","TauJets","output tau data key"};
 	SG::WriteHandleKey<xAOD::PFOContainer> m_neutralPFOOutputContainer{this,"Key_neutralPFOOutputContainer", "TauNeutralParticleFlowObjects", "tau neutral pfo out key"};
 	SG::WriteHandleKey<xAOD::CaloClusterContainer> m_pi0ClusterOutputContainer{this,"Key_pi0ClusterOutputContainer", "TauPi0Clusters", "tau pi0cluster output"};
 	SG::WriteHandleKey<xAOD::PFOContainer> m_hadronicPFOOutputContainer{this,"Key_hadronicPFOOutputContainer", "TauHadronicParticleFlowObjects", "tau hadronic pfo out key"};
 	SG::WriteHandleKey<xAOD::VertexContainer> m_vertexOutputContainer{this,"Key_vertexOutputContainer", "TauSecondaryVertices", "input vertex container key"};
 	SG::WriteHandleKey<xAOD::PFOContainer> m_chargedPFOOutputContainer{this,"Key_chargedPFOOutputContainer", "TauChargedParticleFlowObjects", "tau charged pfo out key"};
-	SG::WriteHandleKey<xAOD::ParticleContainer> m_pi0Container{this,"Key_pi0Container", "finalTauPi0s", "tau final pi0s output"};
+	SG::WriteHandleKey<xAOD::ParticleContainer> m_pi0Container{this,"Key_pi0Container", "TauFinalPi0s", "tau final pi0s output"};
 	
 };
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h
index 7790f808ca3aefe74df1f6dc90c2903ed1627653..f1478e30d46c23998fead8b51a9a6778473d54f4 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/ISF_FatrasRecoTools/ISF_TrackSummaryHelperTool.h
@@ -44,6 +44,8 @@ namespace iFatras {
         Output: Changes in information and hitPattern
         Input quantities rot, tsos are used to increment the counts for hits and outliers in information and to set the proper bits in hitPattern.
     */
+    using IExtendedTrackSummaryHelperTool::analyse;
+    using IExtendedTrackSummaryHelperTool::updateSharedHitCount;
     virtual void analyse(const Trk::Track& track,
                          const Trk::PRDtoTrackMap *prd_to_track_map,
                          const Trk::RIO_OnTrack* rot,
diff --git a/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h b/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
index 93a207fb8407c5379638fc5fc2ef45f07ab74611..c857eba1c3797645384a3f76aca795449eaba9e9 100644
--- a/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
+++ b/TileCalorimeter/TileConditions/TileConditions/TileCablingService.h
@@ -280,6 +280,7 @@ public:
     inline bool                isRun2Cabling()     const { return m_run2; }
     inline bool                isRun2PlusCabling() const { return m_run2plus; }
     inline bool                isRun3Cabling()     const { return m_run3; }
+    inline int                 runPeriod()         const { return (2 * int(m_run2) + 3 * int(m_run3)); }
 };
 
 #endif // TILECONDITIONS_TILECABLINGSERVICE_H
diff --git a/TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY b/TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 0000000000000000000000000000000000000000..d38aea3cadff612cb3e00bfd9be22f215a16c504
--- /dev/null
+++ b/TileCalorimeter/TileSimEvent/TileSimEvent/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+TileCalorimeter/TileSimEvent
diff --git a/TileCalorimeter/TileSimEvent/src/TileHit.cxx b/TileCalorimeter/TileSimEvent/src/TileHit.cxx
index 366c386ddc8327ff7a30c4cca3e298afb38f0c1b..6dd6c3ad8047f8f03b82faf5edfd428a932a6166 100755
--- a/TileCalorimeter/TileSimEvent/src/TileHit.cxx
+++ b/TileCalorimeter/TileSimEvent/src/TileHit.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //********************************************************************
@@ -30,8 +30,10 @@
 #include <cmath>
 
 
+namespace {
 // get cabling
-TileCablingService * s_cabling = TileCablingService::getInstance();
+const TileCablingService * const s_cabling = TileCablingService::getInstance();
+}
 
 TileHit::TileHit(const Identifier & id, float energy, float time)
     : m_pmt_id( id )
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
index ba1bd19e06b602d9f8df6e874bacb5c9c41118e1..b0939e4acbe74b1c3d9073d17440d52be76e681b 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Extrapolator.h
@@ -932,49 +932,49 @@ private:
   bool m_materialEffectsOnTrackValidation; //!< mat effects on track validation
 
   // extrapolation counters
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateCalls; //!< number of calls: extrapolate() method
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateBlindlyCalls; //!< number of calls: extrapolateBlindly() method
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateDirectlyCalls; //!< number of calls: extrapolateDirectly() method
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_extrapolateStepwiseCalls; //!< number of calls: extrapolateStepwise() method
 
-  mutable Gaudi::Accumulators::Counter<int> m_startThroughAssociation; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int> m_startThroughRecall;      //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<> m_startThroughAssociation; //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<> m_startThroughRecall;      //!< navigation intialization
+  mutable Gaudi::Accumulators::Counter<>
     m_startThroughGlobalSearch; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_destinationThroughAssociation; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_destinationThroughRecall; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_destinationThroughGlobalSearch; //!< navigation intialization
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_layerSwitched; //!< number of layers that have been switched
 
   // navigation counters
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakLoop; //!< number of navigation breaks due to loop
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakOscillation; //!< number of navigation breaks due to oscillation
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakNoVolume; //!< number of navigation breaks due no Volume found
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakDistIncrease; //!< number of navigation breaks due to distance increase
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_navigationBreakVolumeSignature; //!< number of navigation breaks due to distance increase
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_overlapSurfaceHit; //!< number of OverlapSurfaces found
 
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchCallsFw; //!< how often the meot search is called: forward
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchCallsBw; //!< how often the meot search is called: backward
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchSuccessfulFw; //!< how often the meot search was successful: forward
-  mutable Gaudi::Accumulators::Counter<int>
+  mutable Gaudi::Accumulators::Counter<>
     m_meotSearchSuccessfulBw; //!< how often the meot search was successful: backward
 };
 
diff --git a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
index fbc3fa6530453558e3e47793c922028691f08be2..80ecaf0e539876b22959bc871acc7df7c80a8004 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/TrkExTools/Navigator.h
@@ -192,16 +192,16 @@ namespace Trk {
       // ------ PERFORMANCE STATISTICS -------------------------------- //
       /* All performance stat counters are atomic (the simplest solution perhaps
        * not the most performant one)*/
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardCalls;              //!< counter for forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardFirstBoundSwitch;   //!< counter for failed first forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardSecondBoundSwitch;  //!< counter for failed second forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_forwardThirdBoundSwitch;   //!< counter for failed third forward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardCalls;             //!< counter for backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardFirstBoundSwitch;  //!< counter for failed first backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardSecondBoundSwitch; //!< counter for failed second backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_backwardThirdBoundSwitch;  //!< counter for failed third backward nextBounday calls
-      mutable Gaudi::Accumulators::Counter<int>       m_outsideVolumeCase;         //!< counter for navigation-break in outside volume cases (ovc)
-      mutable Gaudi::Accumulators::Counter<int>       m_sucessfulBackPropagation;  //!< counter for sucessful recovery of navigation-break in ovc
+      mutable Gaudi::Accumulators::Counter<>       m_forwardCalls;              //!< counter for forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_forwardFirstBoundSwitch;   //!< counter for failed first forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_forwardSecondBoundSwitch;  //!< counter for failed second forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_forwardThirdBoundSwitch;   //!< counter for failed third forward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardCalls;             //!< counter for backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardFirstBoundSwitch;  //!< counter for failed first backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardSecondBoundSwitch; //!< counter for failed second backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_backwardThirdBoundSwitch;  //!< counter for failed third backward nextBounday calls
+      mutable Gaudi::Accumulators::Counter<>       m_outsideVolumeCase;         //!< counter for navigation-break in outside volume cases (ovc)
+      mutable Gaudi::Accumulators::Counter<>       m_sucessfulBackPropagation;  //!< counter for sucessful recovery of navigation-break in ovc
     };
 
 } // end of namespace
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
index 5340f8a854f4de4af46e332b1bae155c9ba9ae13..3e850999ab669c73ed0242f71e2d956a5dfca9e7 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
@@ -5560,7 +5560,14 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
               if (currentUpdator) {
                 nextPar = ManagedTrackParmPtr::recapture(
                   nextPar,
-                  currentUpdator->postUpdate(*nextPar, *nextLayer, dir, particle, matupmod).release());
+                  currentUpdator
+                    ->postUpdate(currentUpdatorCache,
+                                 *nextPar,
+                                 *nextLayer,
+                                 dir,
+                                 particle,
+                                 matupmod)
+                    .release());
               }
               if (!nextPar) {
                 ATH_MSG_VERBOSE("postUpdate failed for input parameters:"
@@ -5577,9 +5584,16 @@ Trk::Extrapolator::extrapolateToVolumeWithPathLimit(const EventContext& ctx,
           } else {
             double pIn = nextPar->momentum().mag();
             if (currentUpdator) {
-              nextPar = ManagedTrackParmPtr::recapture(
-                nextPar,
-                currentUpdator->update(nextPar.get(), *nextLayer, dir, particle, matupmod).release());
+              nextPar =
+                ManagedTrackParmPtr::recapture(nextPar,
+                                               currentUpdator
+                                                 ->update(currentUpdatorCache,
+                                                          nextPar.get(),
+                                                          *nextLayer,
+                                                          dir,
+                                                          particle,
+                                                          matupmod)
+                                                 .release());
             }
             if (!nextPar) {
               ATH_MSG_VERBOSE("  [+] Update may have killed track - return.");
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
index fc6e6283a8ba87e7ab637586f982dc4786fca345..8f41475d80b3a20555d299a752e4698520865b3f 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
@@ -295,30 +295,18 @@ private:
   Trk::MagneticFieldProperties m_fieldProperties;
 
   //!< Statistics: Number of calls to the main extrapolate method
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_extrapolateCalls;
+  mutable Gaudi::Accumulators::Counter<> m_extrapolateCalls;
   //!< Statistics: Number of calls to the extrapolate directly method
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_extrapolateDirectlyCalls;
+  mutable Gaudi::Accumulators::Counter<> m_extrapolateDirectlyCalls;
   //!< Statistics: Number of calls to the  extrapolate directly fallback
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_extrapolateDirectlyFallbacks;
+  mutable Gaudi::Accumulators::Counter<> m_extrapolateDirectlyFallbacks;
   //!< Statistics: Number of times navigation stepping fails to go the  right
   //!< way
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_navigationDistanceIncreaseBreaks;
+  mutable Gaudi::Accumulators::Counter<> m_navigationDistanceIncreaseBreaks;
   //!< Statistics: Number of times a tracking volume oscillation is detected
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_oscillationBreaks;
+  mutable Gaudi::Accumulators::Counter<> m_oscillationBreaks;
   //!< Statistics: Number of times the volume boundary is missed
-  mutable Gaudi::Accumulators::Counter<int,
-                                       Gaudi::Accumulators::atomicity::full>
-    m_missedVolumeBoundary;
+  mutable Gaudi::Accumulators::Counter<> m_missedVolumeBoundary;
 };
 
 } // end namespace Trk
diff --git a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h
index a719c233e085f1fe3117392f226dd0c86e856e4e..2fd7cec77d5d10f0f218c95046da7f958cd5b6a9 100644
--- a/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h
+++ b/Tracking/TrkTools/TrkToolInterfaces/TrkToolInterfaces/IExtendedTrackSummaryHelperTool.h
@@ -1,19 +1,17 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef IEXTENDEDTRACKSUMMARYHELPERTOOL
 #define IEXTENDEDTRACKSUMMARYHELPERTOOL
 
-
+#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
+#include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/IAlgTool.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 #include <vector>
 #include <bitset>
 
-// @TODO remove once interface without PRDtoTrackMap argument is retired.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Woverloaded-virtual"
-#include "TrkToolInterfaces/ITrackSummaryHelperTool.h"
 
 class Identifier;
 
@@ -35,43 +33,105 @@ namespace Trk {
     @author Edward Moyse, Martin Siebel <http://consult.cern.ch/xwho>
 */
 
-  class IExtendedTrackSummaryHelperTool : virtual public ITrackSummaryHelperTool {
+  class IExtendedTrackSummaryHelperTool : virtual public ITrackSummaryHelperTool
+  {
   public:
     static const InterfaceID& interfaceID();
 
-  /** fill 'information' and 'hitpattern' using information from 'rot'. Should be overloaded by concrete
-    TrackSummaryHelperTools. It is mandatory that the RIO_OnTrack* points to exactly the object contained
-      inside the TrackStateOnSurface. This is to avoid that the RTTI from the TrackSummaryTool is done twice.
-        */
-      virtual void analyse(const Trk::Track& track,
-                           const Trk::PRDtoTrackMap *prd_to_track_map,
-                           const RIO_OnTrack* rot,
-                           const TrackStateOnSurface* tsos,
-                           std::vector<int>& information,
-                           std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const = 0;
-
-      virtual void analyse(const Trk::Track& track,
-                           const Trk::PRDtoTrackMap *prd_to_track_map,
-                           const CompetingRIOsOnTrack* crot,
-                           const TrackStateOnSurface* tsos,
-                           std::vector<int>& information,
-                           std::bitset<Trk::numberOfDetectorTypes>& hitPattern ) const = 0;
-
-      virtual void updateSharedHitCount(const Trk::Track&,
-                                        const Trk::PRDtoTrackMap *prd_to_track_map,
-                                        Trk::TrackSummary&) const  = 0 ;
-
-    virtual void addDetailedTrackSummary(const Track& track, Trk::TrackSummary& summary ) const = 0;
-
-
-
+    /** fill 'information' and 'hitpattern' using information from 'rot'. Should
+      be overloaded by concrete TrackSummaryHelperTools. It is mandatory that
+      the RIO_OnTrack* points to exactly the object contained inside the
+      TrackStateOnSurface. This is to avoid that the RTTI from the
+      TrackSummaryTool is done twice.
+      */
+    using ITrackSummaryHelperTool::analyse;
+    using ITrackSummaryHelperTool::updateSharedHitCount;
+    using ITrackSummaryHelperTool::addDetailedTrackSummary;
+
+    /*
+     * First the context aware methods.
+     * If this set is not overloaded , it
+     * will call the methods without EventContext
+     */
+
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const RIO_OnTrack* rot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      (void)(ctx);
+      analyse(track, prd_to_track_map, rot, tsos, information, hitPattern);
+    }
+
+    virtual void analyse(
+      const EventContext& ctx,
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const CompetingRIOsOnTrack* crot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      (void)(ctx);
+      analyse(track, prd_to_track_map, crot, tsos, information, hitPattern);
+    }
+
+    /*
+     * The context unaware methods.
+     * If this set is not overloaded , it
+     * will call the methods with EventContext
+     */
+
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const RIO_OnTrack* rot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      analyse(Gaudi::Hive::currentContext(),
+              track,
+              prd_to_track_map,
+              rot,
+              tsos,
+              information,
+              hitPattern);
+    }
+
+    virtual void analyse(
+      const Trk::Track& track,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      const CompetingRIOsOnTrack* crot,
+      const TrackStateOnSurface* tsos,
+      std::vector<int>& information,
+      std::bitset<Trk::numberOfDetectorTypes>& hitPattern) const
+    {
+      analyse(Gaudi::Hive::currentContext(),
+              track,
+              prd_to_track_map,
+              crot,
+              tsos,
+              information,
+              hitPattern);
+    }
+
+    virtual void updateSharedHitCount(
+      const Trk::Track&,
+      const Trk::PRDtoTrackMap* prd_to_track_map,
+      Trk::TrackSummary&) const = 0;
+
+    virtual void addDetailedTrackSummary(const Track& track,
+                                         Trk::TrackSummary& summary) const = 0;
   };
   inline const InterfaceID& Trk::IExtendedTrackSummaryHelperTool::interfaceID()
   {
     return IID_ITrackSummaryHelperTool;
   }
 
-
 }
-#pragma GCC diagnostic pop
 #endif
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h b/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
index 9014d072681fbc27415650e88125137a5e25ac55..405062de0b3912b34cd1b4476ddf14d710fe2c5a 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
@@ -6,8 +6,8 @@
 #define TRKTRACKSUMMARYTOOL_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "CxxUtils/checker_macros.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/EventContext.h"
 #include "TrkParameters/TrackParameters.h"
 #include "TrkTrack/Track.h"
 #include "TrkTrackSummary/TrackSummary.h"
@@ -277,7 +277,8 @@ private:
 
   /**loops over TrackStatesOnSurface and uses this to produce the summary
      information Fills 'information', 'eProbability', and 'hitPattern'*/
-  void processTrackStates(const Track& track,
+  void processTrackStates(const EventContext& ctx,
+                          const Track& track,
                           const Trk::PRDtoTrackMap* prd_to_track_map,
                           const DataVector<const TrackStateOnSurface>* tsos,
                           std::vector<int>& information,
@@ -285,7 +286,8 @@ private:
                           bool doHolesInDet,
                           bool doHolesMuon) const;
 
-  void processMeasurement(const Track& track,
+  void processMeasurement(const EventContext& ctx,
+                          const Track& track,
                           const Trk::PRDtoTrackMap* prd_to_track_map,
                           const Trk::MeasurementBase* meas,
                           const Trk::TrackStateOnSurface* tsos,
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
index 3b081fddc069fdf13312167a890a80ff53d15ab3..7b4ae59a39dd9ff7245b252ca1cb3c58f3f6182f 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
@@ -19,6 +19,7 @@
 #include "TrkGeometry/TrackingVolume.h"
 #include "TrkParameters/TrackParameters.h"
 
+
 #include <cassert>
 #include <vector>
 #include <algorithm>
@@ -282,12 +283,20 @@ std::vector<float> eProbability(numberOfeProbabilityTypes, 0.5);
 
   ATH_MSG_DEBUG ("Produce summary for: "<<track.info().dumpInfo());
 
+
+  const EventContext& ctx= Gaudi::Hive::currentContext();
   if (track.trackStateOnSurfaces()!=nullptr)
   {
     information[Trk::numberOfOutliersOnTrack] = 0;
-    processTrackStates(track,prd_to_track_map, track.trackStateOnSurfaces(), information, hitPattern,
-                       doHolesInDet, doHolesMuon);
-  }else{
+    processTrackStates(ctx,
+                       track,
+                       prd_to_track_map,
+                       track.trackStateOnSurfaces(),
+                       information,
+                       hitPattern,
+                       doHolesInDet,
+                       doHolesMuon);
+  } else {
     ATH_MSG_WARNING ("Null pointer to TSoS found on Track (author = "
       <<track.info().dumpInfo()<<"). This should never happen! ");
   }
@@ -400,16 +409,20 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(const Track& track, const Trk::
  * Then the internal helpers
  */
 
-void Trk::TrackSummaryTool::processTrackStates(const Track& track,
-                                               const Trk::PRDtoTrackMap *prd_to_track_map,
-					       const DataVector<const TrackStateOnSurface>* tsos,
-					       std::vector<int>& information,
-					       std::bitset<numberOfDetectorTypes>& hitPattern,
-                                               bool doHolesInDet,
-                                               bool doHolesMuon) const
+void
+Trk::TrackSummaryTool::processTrackStates(
+  const EventContext& ctx,
+  const Track& track,
+  const Trk::PRDtoTrackMap* prd_to_track_map,
+  const DataVector<const TrackStateOnSurface>* tsos,
+  std::vector<int>& information,
+  std::bitset<numberOfDetectorTypes>& hitPattern,
+  bool doHolesInDet,
+  bool doHolesMuon) const
 {
   ATH_MSG_DEBUG ("Starting to process " << tsos->size() << " track states");
 
+
   int measCounter = 0;
   int cntAddChi2 = 0;
   float chi2Sum = 0;
@@ -426,7 +439,7 @@ void Trk::TrackSummaryTool::processTrackStates(const Track& track,
       } else {
         if ((*it)->type(Trk::TrackStateOnSurface::Outlier)) ++information[Trk::numberOfOutliersOnTrack]; // increment outlier counter
         ATH_MSG_VERBOSE ("analysing TSoS " << measCounter << " of type " << (*it)->dumpType() );
-        processMeasurement(track, prd_to_track_map, measurement, *it, information, hitPattern);
+        processMeasurement(ctx,track, prd_to_track_map, measurement, *it, information, hitPattern);
       } // if have measurement pointer
     } // if type measurement, scatterer or outlier
 
@@ -464,12 +477,13 @@ void Trk::TrackSummaryTool::processTrackStates(const Track& track,
   if (varChi2>0 && varChi2<1.e13) information[Trk::standardDeviationOfChi2OS] = int(sqrt(varChi2)*100);
 }
 
-void Trk::TrackSummaryTool::processMeasurement(const Track& track,
+void Trk::TrackSummaryTool::processMeasurement(const EventContext& ctx,
+                                               const Track& track,
                                                const Trk::PRDtoTrackMap *prd_to_track_map,
-					       const Trk::MeasurementBase* meas,
-					       const Trk::TrackStateOnSurface* tsos,
-					       std::vector<int>& information,
-					       std::bitset<numberOfDetectorTypes>& hitPattern) const
+                                               const Trk::MeasurementBase* meas,
+                                               const Trk::TrackStateOnSurface* tsos,
+                                               std::vector<int>& information,
+                                               std::bitset<numberOfDetectorTypes>& hitPattern) const
 {
 
   // Check if the measurement type is RIO on Track (ROT)
@@ -484,7 +498,7 @@ void Trk::TrackSummaryTool::processMeasurement(const Track& track,
     if (tool==nullptr){
       ATH_MSG_WARNING("Cannot find tool to match ROT. Skipping.");
     } else {
-      tool->analyse(track,prd_to_track_map, rot,tsos,information, hitPattern);
+      tool->analyse(ctx,track,prd_to_track_map, rot,tsos,information, hitPattern);
     }
   } else {
     //check if the measurement type is CompetingRIOsOnTrack
@@ -501,7 +515,7 @@ void Trk::TrackSummaryTool::processMeasurement(const Track& track,
       if (tool==nullptr){
         ATH_MSG_WARNING("Cannot find tool to match cROT. Skipping.");
       } else {
-        tool->analyse(track,prd_to_track_map, compROT,tsos,information, hitPattern);
+        tool->analyse(ctx,track,prd_to_track_map, compROT,tsos,information, hitPattern);
       }
     }
   }
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index b60697b17d69ae8aa4a71bde92b952a985c81c79..2db8347a2972c3f71998215c10a8e089c8c8af23 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -377,7 +377,18 @@ def TMEF_MuonCreatorTool(name="TMEF_MuonCreatorTool",**kwargs):
 
 def TMEF_MuonCandidateTrackBuilderTool(name="TMEF_MuonCandidateTrackBuilderTool",**kwargs):
     kwargs.setdefault('MuonTrackBuilder', 'TMEF_CombinedMuonTrackBuilder')
-    kwargs.setdefault('MuonSegmentTrackBuilder', CfgGetter.getPublicTool("MooMuonTrackBuilder"))
+    from MuonRecExample.MuonRecUtils import ExtraFlags
+    extraFlags = ExtraFlags()
+    extraFlags.setFlagDefault("doSegmentPhiMatching", True)
+    from MuonRecExample.MuonStandaloneFlags import muonStandaloneFlags
+    extraFlags.setFlagDefault(muonStandaloneFlags.optimiseMomentumResolutionUsingChi2) # take name & value from JobProperty
+    extraFlags.setFlagDefault(muonStandaloneFlags.strategy)
+    extraFlags.setFlagDefault(muonStandaloneFlags.trackBuilder)
+    extraFlags.setFlagDefault(muonStandaloneFlags.printSummary)
+    extraFlags.setFlagDefault(muonStandaloneFlags.refinementTool)
+    if "TrackBuilderTool" not in kwargs:
+        extraFlags.setFlagDefault('UseTrackingHistory',True)
+    kwargs.setdefault('MuonSegmentTrackBuilder', CfgGetter.getPublicToolClone("MooMuonTrackBuilder","MooTrackBuilderTemplate",extraFlags=extraFlags))
     return CfgMgr.Muon__MuonCandidateTrackBuilderTool(name,**kwargs)
 
 def TMEF_MuonPRDSelectionTool(name="TMEF_MuonPRDSelectionTool",**kwargs):
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx b/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx
index fc1faa470485412f09d08c1714427360179c64d0..f6b6947c9566fb8f6ef6766ce3679b0eae251de9 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/src/HLTPrescaleCondAlg.cxx
@@ -27,7 +27,6 @@ TrigConf::HLTPrescaleCondAlg::createFromFile( const std::string & filename ) con
    if( psLoader.loadFile( filename, *pss) ) {
       ATH_MSG_INFO( "HLT prescales set successfully loaded from file " << filename );
    } else {
-      ATH_MSG_WARNING( "Failed loading HLT prescales set from file " << filename ); // will be made an error later
       pss = nullptr;
    }
    return pss;
@@ -71,15 +70,17 @@ TrigConf::HLTPrescaleCondAlg::initialize() {
 
    ATH_CHECK(m_hltPrescalesSetOutputKey.initialize());
 
-   if( m_configSource == "COOL" && m_dbConnection == "JOSVC" ) {
-      if( auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>( "JobOptionsSvc" ) ) {
-         if( joSvc->hltPrescaleKey()>0 ) {
-            m_psk = joSvc->hltPrescaleKey();
-            m_dbConnection = joSvc->server();
-            ATH_MSG_INFO("Set psk to " << m_psk <<  " and db connection to " << m_dbConnection );
+   if( m_dbConnection == "JOSVC" ) {
+      if( m_configSource == "COOL" || m_configSource == "DB" ) {
+         if( auto joSvc = serviceLocator()->service<TrigConf::IJobOptionsSvc>( "JobOptionsSvc" ) ) {
+            if( joSvc->hltPrescaleKey()>0 ) {
+               m_psk = joSvc->hltPrescaleKey();
+               m_dbConnection = joSvc->server();
+               ATH_MSG_INFO("Set psk to " << m_psk <<  " and db connection to " << m_dbConnection );
+            }
+         } else {
+            ATH_MSG_DEBUG("Did not locate TrigConf::IJobOptionsSvc");
          }
-      } else {
-         ATH_MSG_DEBUG("Did not locate TrigConf::IJobOptionsSvc");
       }
    }
 
@@ -92,15 +93,24 @@ TrigConf::HLTPrescaleCondAlg::initialize() {
 
       // index 0 indicates that the configuration is from a file, a DB
       // PSK is greater than 0
-      m_pssMap[0] = createFromFile( m_filename );
+      std::shared_ptr<HLTPrescalesSet> pss = createFromFile( m_filename );
+      if( pss == nullptr ) {
+         ATH_MSG_ERROR( "Failed loading HLT prescales set from the file " << m_filename );
+         return StatusCode::FAILURE;
+      }
+      m_pssMap[0] = pss;
 
    } else if( m_psk != 0u ) {
 
       // this is for the case where the reading from the DB was
       // configured and also when we read from COOL online and get a
       // PSK through the JobOptionsSvc
-      m_pssMap[m_psk] = createFromDB( m_psk, true );
-
+      std::shared_ptr<HLTPrescalesSet> pss = createFromDB( m_psk, true );
+      if( pss == nullptr ) {
+         ATH_MSG_ERROR( "Failed loading HLT prescales set " << m_psk << " from the database" );
+         return StatusCode::FAILURE;
+      }
+      m_pssMap[m_psk] = pss;
    }
 
    return StatusCode::SUCCESS;
@@ -156,11 +166,16 @@ TrigConf::HLTPrescaleCondAlg::execute(const EventContext& ctx) const {
       auto pssi = m_pssMap.find( hltPsk );
 
       if( pssi == m_pssMap.end()) {
-
+         
          bool isRun3 = range.start().run_number()>350000;
 
          pss = m_pssMap[hltPsk] = createFromDB( hltPsk, isRun3 );
 
+         if( pss == nullptr ) {
+            ATH_MSG_ERROR( "Failed loading HLT prescales set from the database" );
+            return StatusCode::FAILURE;
+         }
+
       } else {
       
          pss = pssi->second;
@@ -181,7 +196,7 @@ TrigConf::HLTPrescaleCondAlg::execute(const EventContext& ctx) const {
       ATH_MSG_INFO("Recording empty HLT prescales set with range " << range);
       ATH_CHECK( writeCondHandle.record( range, new HLTPrescalesSet ) );
    } else {
-      ATH_MSG_INFO("Recording HLT prescales set with range " << range);
+      ATH_MSG_INFO("Recording HLT prescales set with range " << range << " (key = " << hltPsk << ")");
       ATH_CHECK( writeCondHandle.record( range, new HLTPrescalesSet(*pss) ) );
    }
 
diff --git a/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt b/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt
index 6b9b7a8e7d2a5669c21d23748b781326c4d7031e..72339d0aa2bb808e1ff0ee04ee9defcc4c96002f 100644
--- a/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt
+++ b/Trigger/TrigCost/TrigCostAnalysis/CMakeLists.txt
@@ -24,4 +24,4 @@ atlas_add_executable( trigCostHistToCSV
                       LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthenaBaseComps TrigCostAnalysisLib )
 
 atlas_install_joboptions( share/TrigCostAnalysis_JobOptions.py )
-atlas_install_scripts( share/TrigCostAnalysis.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_scripts( share/RunTrigCostAnalysis.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Trigger/TrigCost/TrigCostAnalysis/share/TrigCostAnalysis.py b/Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py
similarity index 100%
rename from Trigger/TrigCost/TrigCostAnalysis/share/TrigCostAnalysis.py
rename to Trigger/TrigCost/TrigCostAnalysis/share/RunTrigCostAnalysis.py
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
index 1ea900de788822c2a9dd9e1719bc6f1fd22dca8d..44ff7dbcb3e39471d861301a1429fd6c3aec65e5 100644
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/TrigBjetMonitorAlgorithm.cxx
@@ -368,8 +368,9 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
 	    NameH = "DL1_mv_tr_"+trigName;
 	    ATH_MSG_DEBUG( " NameH: " << NameH  );
 	    auto DL1_mv = Monitored::Scalar<double>(NameH,0.0);
-	    if ( LLR (DL1_pu, DL1_pc, DL1_pb, DL1_mv) ) fill("TrigBjetMonitor",DL1_mv);
-	    ATH_MSG_DEBUG("        DL1_mv: " << DL1_mv << " LLR: " << LLR); 
+            bool theLLR = LLR (DL1_pu, DL1_pc, DL1_pb, DL1_mv);
+	    if ( theLLR ) fill("TrigBjetMonitor",DL1_mv);
+	    ATH_MSG_DEBUG("        DL1_mv: " << DL1_mv << " LLR: " << theLLR); 
 
 
 	    NameH = "DL1r_pu_tr_"+trigName;
@@ -396,8 +397,9 @@ StatusCode TrigBjetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c
 	    NameH = "DL1r_mv_tr_"+trigName;
 	    ATH_MSG_DEBUG( " NameH: " << NameH  );
 	    auto DL1r_mv = Monitored::Scalar<double>(NameH,0.0);
-	    if ( LLR (DL1r_pu, DL1r_pc, DL1r_pb, DL1r_mv) ) fill("TrigBjetMonitor",DL1r_mv);
-	    ATH_MSG_DEBUG("        DL1r_mv: " << DL1r_mv << " LLR: " << LLR); 
+            theLLR = LLR (DL1r_pu, DL1r_pc, DL1r_pb, DL1r_mv);
+	    if ( theLLR ) fill("TrigBjetMonitor",DL1r_mv);
+	    ATH_MSG_DEBUG("        DL1r_mv: " << DL1r_mv << " LLR: " << theLLR); 
 
 	  } // if (ijet == 0)
 	  
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
index 68544140eb08d2db70f4d4bf0fbc89b7b3ac15e2..80f5e3779c49a58095627be1b7645c1ead3e4ce0 100644
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/python/HLTMonTriggerList.py
@@ -1,5 +1,5 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
+ 
 from __future__ import print_function
 
 import TrigBjetMonitoring.TrigBjetMonitCategory as bjet
@@ -12,238 +12,242 @@ import TrigMuonMonitoring.TrigMuonMonitCategory as muon
 import TrigTauMonitoring.TrigTauMonitCategory as tau
 
 if 'DQMonFlags' not in dir():
-	from AthenaMonitoring.DQMonFlags import DQMonFlags
+  from AthenaMonitoring.DQMonFlags import DQMonFlags
 
 class HLTMonTriggerList:
-
-	# HLTMonTriggerList config
-	_configured = False
-
-	# running mode config
-	_get_monitoring_mode_success = False
-	mc_mode = False
-	pp_mode = False
-	HI_mode = False
-	cosmic_mode = False
-
-	# trigger lists
-	monitoring_mujet = []
-	monitoring_bjet = []
-	monitoring_bphys = []
-	primary_bphys = []
-	monitoring_egamma = []
-	primary_single_ele = []
-	primary_single_ele_iso = []
-	primary_single_ele_cutbased = []
-	primary_single_ele_cutbased_iso = []
-	primary_double_ele = []
-	primary_double_ele_cutbased = []
-	monitoring_ele_idperf = []
-	monitoring_ele_idperf_cutbased = []
-	monitoring_Zee = []
-	monitoring_Jpsiee = []
-	primary_single_pho = []
-	primary_double_pho = []
-	monitoring_l1jet = []
-	monitoring_jet = []
-	primary_l1jet = []
-	primary_jet = []
-	monitoring_met_shifter = []
-	monitoring_met_expert = []
-	monitoring_minbias = []
-	monitoring_muonNonIso = []
-	monitoring_muonIso = []
-	monitoring_MSonly = []
-	monitoring_muonEFFS = []
-	monitoring_muonLowpt = []
-	monitoring_muon_Support = []
-	monitoring_tau = []
-	monitoring_singleTau = []
-
-
-	def __init__(self):
-		if not self._configured:
-			self.config()
-
-	def config(self):
-
-		self.set_HLTMonTrigList_default()
-
-		self._get_monitoring_mode_success = self.get_monitoring_mode()
-
-		if self._get_monitoring_mode_success is False:
-			# what should be done in this case?
-			print ("HLTMonTriggerList: Error getting monitoring mode, default monitoring lists will be used.")
-
-		elif self.pp_mode is True:
-			print ("HLTMonTriggerList: Setting up pp monitoring.")
-			self.set_HLTMonTrigList_pp()
-
-		elif self.mc_mode is True:
-			print ("HLTMonTriggerList: Setting up MC monitoring.")
-			self.set_HLTMonTrigList_mc()
-
-		elif self.HI_mode is True:
-			print ("HLTMonTriggerList: Setting up HI monitoring.")
-			self.set_HLTMonTrigList_HI()
-
-		elif self.cosmic_mode is True:
-			print ("HLTMonTriggerList: Setting up cosmic monitoring.")
-			self.set_HLTMonTrigList_cosmic()
-
-		self._configured = True
-
-
-	# Implementation of https://its.cern.ch/jira/browse/ATR-13200
-	def get_monitoring_mode(self):
-		# Set monitoring mode
-		self.data_type = DQMonFlags.monManDataType()
-
-		if self.data_type == 'monteCarlo':
-			self.mc_mode = True
-			return True
-
-		elif self.data_type == 'collisions':
-			#singlebeam is included in collisions
-			self.pp_mode = True
-			return True
-
-		elif self.data_type == 'heavyioncollisions':
-			#heavy ion is pPb or PbPb
-			self.HI_mode = True
-			return True
-
-		elif self.data_type == 'cosmics':
-			self.cosmic_mode = True
-			return True
-
-		else:
-			return False
-
-
-	# Config of default/running mode independent monitoring lists
-	def set_HLTMonTrigList_default(self):
-		# Monitoring lists (defaults) which are independent of running mode:
-		# These are the trigger lists that will be used unless they are overwritten based on the running mode. In this way the trigger lists can be updated based on running mode with no risk of a signature being left unmonitored
-
-		# set the bjet and mujet triggers to the default values
-		self.monitoring_bjet = bjet.monitoring_bjet
-		self.monitoring_mujet = bjet.monitoring_mujet
-
-		# set the bphys triggers to the default values
-		self.monitoring_bphys = bphys.monitoring_bphys
-		self.primary_bphys = bphys.primary_bphys
-
-		# set the egamma triggers to the default values
-		self.monitoring_egamma = egamma.monitoring_egamma
-		self.primary_single_ele = egamma.primary_single_ele
-		self.primary_single_ele_iso = egamma.primary_single_ele_iso
-		self.primary_single_ele_cutbased = egamma.primary_single_ele_cutbased
-		self.primary_single_ele_cutbased_iso = egamma.primary_single_ele_cutbased_iso
-		self.primary_double_ele = egamma.primary_double_ele
-		self.primary_double_ele_cutbased = egamma.primary_double_ele_cutbased
-		self.monitoring_ele_idperf = egamma.monitoring_ele_idperf
-		self.monitoring_ele_idperf_cutbased = egamma.monitoring_ele_idperf_cutbased
-		self.monitoring_Zee = egamma.monitoring_Zee
-		self.monitoring_Jpsiee = egamma.monitoring_Jpsiee
-		self.primary_single_pho = egamma.primary_single_pho
-		self.primary_double_pho = egamma.primary_double_pho
-
-		# set the jet triggers to the default values
-		self.monitoring_l1jet = jets.monitoring_l1jet
-		self.monitoring_jet = jets.monitoring_jet
-		self.primary_l1jet = jets.primary_l1jet
-		self.primary_jet = jets.primary_jet
-
-		# set the met triggers to the default values
-		self.monitoring_met_shifter = met.monitoring_met_shifter
-		self.monitoring_met_expert = met.monitoring_met_expert
-
-		# set the minbias triggers to the default values
-		self.monitoring_minbias = minbias.monitoring_minbias
-
-		# set the muon triggers to the default values
-		self.monitoring_muonNonIso = muon.monitoring_muonNonIso
-		self.monitoring_muonIso = muon.monitoring_muonIso
-		self.monitoring_MSonly = muon.monitoring_MSonly
-		self.monitoring_muonEFFS = muon.monitoring_muonEFFS
-		self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-		self.monitoring_muon_Support = muon.monitoring_muon_Support
-
-		# set the tau triggers to the default values
-		self.monitoring_tau = tau.monitoring_tau
-		self.monitoring_singleTau = tau.monitoring_singleTau
-
-
-	# Config of monitoring lists which are dependent on running mode
-	def set_HLTMonTrigList_pp(self):
-		self.monitoring_bjet = bjet.monitoring_bjet_pp
-		self.monitoring_mujet = bjet.monitoring_mujet_pp
-
-		self.primary_bphys = bphys.primary_bphys_pp
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_pp
-		self.monitoring_jet = jets.monitoring_jet_pp
-		self.primary_l1jet = jets.primary_l1jet_pp
-		self.primary_jet = jets.primary_jet_pp
-
-		self.monitoring_met_shifter = met.monitoring_met_shifter_pp
-		self.monitoring_met_expert = met.monitoring_met_expert_pp
-
-		self.monitoring_muonNonIso = muon.monitoring_muonNonIso_pp
-		self.monitoring_muonIso = muon.monitoring_muonIso_pp
-		self.monitoring_MSonly = muon.monitoring_MSonly_pp
-		self.monitoring_muonEFFS = muon.monitoring_muonEFFS_pp
-		self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-		self.monitoring_muon_Support = muon.monitoring_muon_Support_pp
-
-		self.monitoring_tau = tau.monitoring_tau_pp
-
-	def set_HLTMonTrigList_HI(self):
-		self.monitoring_bjet = bjet.monitoring_bjet_hi
-		self.monitoring_mujet = bjet.monitoring_mujet_hi
-
-		self.primary_bphys = bphys.primary_bphys_hi
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_hi
-		self.monitoring_jet = jets.monitoring_jet_hi
-		self.primary_l1jet = jets.primary_l1jet_hi
-		self.primary_jet = jets.primary_jet_hi
-
-		self.monitoring_met_shifter = []
-		self.monitoring_met_expert = []
-
-		self.monitoring_muonNonIso = muon.monitoring_muonNonIso_HI
-		self.monitoring_muonIso = muon.monitoring_muonIso_HI
-		self.monitoring_MSonly = muon.monitoring_MSonly_HI
-		self.monitoring_muonEFFS = muon.monitoring_muonEFFS_HI
-		self.monitoring_muonLowpt = muon.monitoring_muonLowpt
-		self.monitoring_muon_Support = muon.monitoring_muon_Support_HI
-
-	def set_HLTMonTrigList_cosmic (self):
-		self.monitoring_bjet = bjet.monitoring_bjet_cosmic
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_cosmic
-		self.monitoring_jet = jets.monitoring_jet_cosmic
-		self.primary_l1jet = jets.primary_l1jet_cosmic
-		self.primary_jet = jets.primary_jet_cosmic
-
-		self.monitoring_met_shifter = met.monitoring_met_shifter_cosmic
-		self.monitoring_met_expert = met.monitoring_met_expert_cosmic
-
-		self.monitoring_tau = tau.monitoring_tau_cosmic
-		self.monitoring_singleTau = tau.monitoring_singleTau_cosmic
-
-	def set_HLTMonTrigList_mc(self):
-		self.monitoring_bjet = bjet.monitoring_bjet_validation
-		self.monitoring_mujet = bjet.monitoring_mujet_validation
-
-		self.monitoring_l1jet = jets.monitoring_l1jet_validation
-		self.monitoring_jet = jets.monitoring_jet_validation
-		self.primary_l1jet = jets.primary_l1jet_validation
-		self.primary_jet = jets.primary_jet_validation
-
-		self.monitoring_tau = tau.monitoring_tau_validation
-
-
+  
+  # HLTMonTriggerList config
+  _configured = False
+  
+  # running mode config
+  _get_monitoring_mode_success = False
+  mc_mode = False
+  pp_mode = False
+  HI_mode = False
+  cosmic_mode = False
+  
+  # trigger lists
+  monitoring_mujet = []
+  monitoring_bjet = []
+  monitoring_bphys = []
+  primary_bphys = []
+  monitoring_egamma = []
+  primary_single_ele = []
+  primary_single_ele_iso = []
+  primary_single_ele_cutbased = []
+  primary_single_ele_cutbased_iso = []
+  primary_double_ele = []
+  primary_double_ele_cutbased = []
+  monitoring_ele_idperf = []
+  monitoring_ele_idperf_cutbased = []
+  monitoring_Zee = []
+  monitoring_Jpsiee = []
+  primary_single_pho = []
+  primary_double_pho = []
+  monitoring_l1jet = []
+  monitoring_jet = []
+  primary_l1jet = []
+  primary_jet = []
+  monitoring_met_shifter = []
+  monitoring_met_expert = []
+  monitoring_minbias = []
+  monitoring_muonNonIso = []
+  monitoring_muonIso = []
+  monitoring_MSonly = []
+  monitoring_muonEFFS = []
+  monitoring_muonLowpt = []
+  monitoring_muon_Support = []
+  monitoring_tau = []
+  monitoring_singleTau = []
+  
+  
+  def __init__(self):
+    if not self._configured:
+      self.config()
+
+  def config(self):
+    
+    self.set_HLTMonTrigList_default()
+    
+    self._get_monitoring_mode_success = self.get_monitoring_mode()
+    
+    if self._get_monitoring_mode_success is False:
+      # what should be done in this case?
+      print ("HLTMonTriggerList: Error getting monitoring mode, default monitoring lists will be used.")
+      
+    elif self.pp_mode is True:
+      print ("HLTMonTriggerList: Setting up pp monitoring.")
+      self.set_HLTMonTrigList_pp()
+      
+    elif self.mc_mode is True:
+      print ("HLTMonTriggerList: Setting up MC monitoring.")
+      self.set_HLTMonTrigList_mc()
+      
+    elif self.HI_mode is True:
+      print ("HLTMonTriggerList: Setting up HI monitoring.")
+      self.set_HLTMonTrigList_HI()
+      
+    elif self.cosmic_mode is True:
+      print ("HLTMonTriggerList: Setting up cosmic monitoring.")
+      self.set_HLTMonTrigList_cosmic()
+      
+    self._configured = True
+
+
+  # Implementation of https://its.cern.ch/jira/browse/ATR-13200
+  def get_monitoring_mode(self):
+    # Set monitoring mode
+    self.data_type = DQMonFlags.monManDataType()
+    
+    if self.data_type == 'monteCarlo':
+      self.mc_mode = True
+      return True
+    
+    elif self.data_type == 'collisions':
+      #singlebeam is included in collisions
+      self.pp_mode = True
+      return True
+    
+    elif self.data_type == 'heavyioncollisions':
+      #heavy ion is pPb or PbPb
+      self.HI_mode = True
+      return True
+    
+    elif self.data_type == 'cosmics':
+      self.cosmic_mode = True
+      return True
+    
+    else:
+      return False
+
+
+  # Config of default/running mode independent monitoring lists
+  def set_HLTMonTrigList_default(self):
+    # Monitoring lists (defaults) which are independent of running mode:
+    # These are the trigger lists that will be used unless they are overwritten based on the running mode. In this way the trigger lists can be updated based on running mode with no risk of a signature being left unmonitored
+    
+    # set the bjet and mujet triggers to the default values
+    self.monitoring_bjet = bjet.monitoring_bjet
+    self.monitoring_mujet = bjet.monitoring_mujet
+    
+    # set the bphys triggers to the default values
+    self.monitoring_bphys = bphys.monitoring_bphys
+    self.primary_bphys = bphys.primary_bphys
+    
+    # set the egamma triggers to the default values
+    self.monitoring_egamma = egamma.monitoring_egamma
+    self.primary_single_ele = egamma.primary_single_ele
+    self.primary_single_ele_iso = egamma.primary_single_ele_iso
+    self.primary_single_ele_cutbased = egamma.primary_single_ele_cutbased
+    self.primary_single_ele_cutbased_iso = egamma.primary_single_ele_cutbased_iso
+    self.primary_double_ele = egamma.primary_double_ele
+    self.primary_double_ele_cutbased = egamma.primary_double_ele_cutbased
+    self.monitoring_ele_idperf = egamma.monitoring_ele_idperf
+    self.monitoring_ele_idperf_cutbased = egamma.monitoring_ele_idperf_cutbased
+    self.monitoring_Zee = egamma.monitoring_Zee
+    self.monitoring_Jpsiee = egamma.monitoring_Jpsiee
+    self.primary_single_pho = egamma.primary_single_pho
+    self.primary_double_pho = egamma.primary_double_pho
+    
+    # set the jet triggers to the default values
+    self.monitoring_l1jet = jets.monitoring_l1jet
+    self.monitoring_jet = jets.monitoring_jet
+    self.primary_l1jet = jets.primary_l1jet
+    self.primary_jet = jets.primary_jet
+    
+    # set the met triggers to the default values
+    self.monitoring_met_shifter = met.monitoring_met_shifter
+    self.monitoring_met_expert = met.monitoring_met_expert
+    
+    # set the minbias triggers to the default values
+    self.monitoring_minbias = minbias.monitoring_minbias
+    
+    # set the muon triggers to the default values
+    self.monitoring_muonNonIso = muon.monitoring_muonNonIso
+    self.monitoring_muonIso = muon.monitoring_muonIso
+    self.monitoring_MSonly = muon.monitoring_MSonly
+    self.monitoring_muonEFFS = muon.monitoring_muonEFFS
+    self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+    self.monitoring_muon_Support = muon.monitoring_muon_Support
+    
+    # set the tau triggers to the default values
+    self.monitoring_tau = tau.monitoring_tau
+    self.monitoring_singleTau = tau.monitoring_singleTau
+    
+    
+  # Config of monitoring lists which are dependent on running mode
+  def set_HLTMonTrigList_pp(self):
+    self.monitoring_bjet = bjet.monitoring_bjet_pp
+    self.monitoring_mujet = bjet.monitoring_mujet_pp
+    
+    self.primary_bphys = bphys.primary_bphys_pp
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_pp
+    self.monitoring_jet = jets.monitoring_jet_pp
+    self.primary_l1jet = jets.primary_l1jet_pp
+    self.primary_jet = jets.primary_jet_pp
+    
+    self.monitoring_met_shifter = met.monitoring_met_shifter_pp
+    self.monitoring_met_expert = met.monitoring_met_expert_pp
+    
+    self.monitoring_muonNonIso = muon.monitoring_muonNonIso_pp
+    self.monitoring_muonIso = muon.monitoring_muonIso_pp
+    self.monitoring_MSonly = muon.monitoring_MSonly_pp
+    self.monitoring_muonEFFS = muon.monitoring_muonEFFS_pp
+    self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+    self.monitoring_muon_Support = muon.monitoring_muon_Support_pp
+    
+    self.monitoring_tau = tau.monitoring_tau_pp
+    
+    #override if both pp and MC are true
+    if DQMonFlags.monManDataType()=='monteCarlo':
+      self.monitoring_tau = tau.monitoring_tau_validation
+
+  def set_HLTMonTrigList_HI(self):
+    self.monitoring_bjet = bjet.monitoring_bjet_hi
+    self.monitoring_mujet = bjet.monitoring_mujet_hi
+    
+    self.primary_bphys = bphys.primary_bphys_hi
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_hi
+    self.monitoring_jet = jets.monitoring_jet_hi
+    self.primary_l1jet = jets.primary_l1jet_hi
+    self.primary_jet = jets.primary_jet_hi
+    
+    self.monitoring_met_shifter = []
+    self.monitoring_met_expert = []
+    
+    self.monitoring_muonNonIso = muon.monitoring_muonNonIso_HI
+    self.monitoring_muonIso = muon.monitoring_muonIso_HI
+    self.monitoring_MSonly = muon.monitoring_MSonly_HI
+    self.monitoring_muonEFFS = muon.monitoring_muonEFFS_HI
+    self.monitoring_muonLowpt = muon.monitoring_muonLowpt
+    self.monitoring_muon_Support = muon.monitoring_muon_Support_HI
+    
+  def set_HLTMonTrigList_cosmic (self):
+    self.monitoring_bjet = bjet.monitoring_bjet_cosmic
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_cosmic
+    self.monitoring_jet = jets.monitoring_jet_cosmic
+    self.primary_l1jet = jets.primary_l1jet_cosmic
+    self.primary_jet = jets.primary_jet_cosmic
+    
+    self.monitoring_met_shifter = met.monitoring_met_shifter_cosmic
+    self.monitoring_met_expert = met.monitoring_met_expert_cosmic
+    
+    self.monitoring_tau = tau.monitoring_tau_cosmic
+    self.monitoring_singleTau = tau.monitoring_singleTau_cosmic
+    
+  def set_HLTMonTrigList_mc(self):
+    self.monitoring_bjet = bjet.monitoring_bjet_validation
+    self.monitoring_mujet = bjet.monitoring_mujet_validation
+    
+    self.monitoring_l1jet = jets.monitoring_l1jet_validation
+    self.monitoring_jet = jets.monitoring_jet_validation
+    self.primary_l1jet = jets.primary_l1jet_validation
+    self.primary_jet = jets.primary_jet_validation
+    
+    self.monitoring_tau = tau.monitoring_tau_validation
+    
+    
 hltmonList = HLTMonTriggerList()
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
index e5f4ed71f450743b658560d647ab847daaa45a3a..a39aa0c19116dbf36635b1810af01a9b4b0a2aea 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMDeserialiserAlg.cxx
@@ -178,15 +178,19 @@ StatusCode TriggerEDMDeserialiserAlg::deserialise(   const Payload* dataptr  ) c
       }
 
       if ( isxAODInterfaceContainer ) {
+        static const RootType vbase = RootType::ByNameNoQuiet( "SG::AuxVectorBase" );
 	currentAuxStore = nullptr; // the store will be following, setting it to nullptr assure we catch issue with of missing Aux
-	xAODInterfaceContainer = reinterpret_cast<SG::AuxVectorBase*>(dataBucket->object());
+	xAODInterfaceContainer =
+          reinterpret_cast<SG::AuxVectorBase*>(classDesc.Cast (vbase, dataBucket->object(), true));
       } else if ( isxAODAuxContainer )  {
 	ATH_CHECK( key.back() == '.' );
 	ATH_CHECK( std::count( key.begin(), key.end(), '.')  == 1 );
 	ATH_CHECK( currentAuxStore == nullptr );
 	ATH_CHECK( xAODInterfaceContainer != nullptr );
-	
-	xAOD::AuxContainerBase* auxHolder = reinterpret_cast<xAOD::AuxContainerBase*>(dataBucket->object());
+
+        static const RootType auxinterface = RootType::ByNameNoQuiet( "SG::IAuxStore" );
+	xAOD::AuxContainerBase* auxHolder =
+          reinterpret_cast<xAOD::AuxContainerBase*>(classDesc.Cast (auxinterface, dataBucket->object(), true));
 	ATH_CHECK( auxHolder != nullptr );
 	xAODInterfaceContainer->setStore( auxHolder );
 	currentAuxStore = new WritableAuxStore();
diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
index 18ad4deb0c4323522037068150c7f0fb1b9de440..18a291418dd1da63c072fe9c0af52feb97c1e513 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerEDMSerialiserTool.cxx
@@ -11,6 +11,7 @@
 #include "AthenaKernel/StorableConversions.h"
 #include "AthContainersInterfaces/IAuxStoreIO.h"
 #include "AthContainers/AuxTypeRegistry.h"
+#include "AthContainers/tools/copyAuxStoreThinned.h"
 #include "AthContainers/debug.h"
 #include "xAODCore/AuxContainerBase.h"
 #include "xAODTrigger/TrigCompositeAuxContainer.h"
@@ -297,7 +298,28 @@ StatusCode TriggerEDMSerialiserTool::serialisexAODAuxContainer( void* data,
   SGImplSvc* evtStore) const
 {
   ATH_MSG_DEBUG("xAOD Aux Container");
-  ATH_CHECK( serialiseContainer( data, address, buffer ) );
+
+  void* copy = data;
+  RootType classDesc = RootType::ByNameNoQuiet( address.persType );
+  static const RootType interface = RootType::ByNameNoQuiet( "SG::IAuxStore" );
+  static const RootType interface_c = RootType::ByNameNoQuiet( "xAOD::AuxContainerBase" );
+
+  void* data_interface = classDesc.Cast (interface_c, data, true);
+  if (data_interface) {
+    const xAOD::AuxContainerBase* store = reinterpret_cast<const xAOD::AuxContainerBase*> (data_interface);
+    copy = classDesc.Construct();
+    void* copy_interface = classDesc.Cast (interface, copy, true);
+    SG::copyAuxStoreThinned (*store,
+                             *reinterpret_cast<SG::IAuxStore*> (copy_interface),
+                             nullptr);
+  }
+
+  ATH_CHECK( serialiseContainer( copy, address, buffer ) );
+
+  if (copy != data) {
+    classDesc.Destruct (copy);
+  }
+
   size_t baseSize = buffer.size();
   if ( not m_saveDynamic )
     return StatusCode::SUCCESS;
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py b/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py
index 7239ea8d82859e8bfb8e7a738e092f777e35192c..b1e4cef9b6cca0418ba482927fc4d9be36b1d243 100755
--- a/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/bin/checkFileTrigSize_RTT.py
@@ -1095,7 +1095,7 @@ class checkFileTrigSize_RTT:
 
             #for new xAOD    
             if re.search("Total",line):
-                if (unicode(splitline[4])).isnumeric():
+                if (str(splitline[4])).isnumeric():
                     self.total = float(splitline[4])
 
             #only count the good lines (ie. not "=====", etc.)
@@ -1203,8 +1203,8 @@ class checkFileTrigSize_RTT:
 
             
         print()
-        print("Summary of catagories:")
-        fout.write( "\n Summary of catagories:\n") 
+        print("Summary of categories:")
+        fout.write( "\n Summary of categories:\n")
 
         #print the size of each counter (and calculate the sum)
         for counter in listofCounters:
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py b/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py
index 1d0eede3af941e6bb77083bd52eef70cc07d5055..cfa617aa119a55fdca1820a2f95b029a0625537a 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/python/TrigAnalysisSteps.py
@@ -164,7 +164,9 @@ def trig_analysis_exec_steps(input_file='AOD.pool.root'):
     return [
         TrigDecChecker(in_file=input_file),
         TrigEDMChecker(in_file=input_file),
-        TrigEDMAuxChecker(in_file=input_file)]
+        # to be fixed and enabled
+        #TrigEDMAuxChecker(in_file=input_file)
+    ]
 
 def trig_analysis_check_steps():
     return [CheckFileTrigSizeStep()]
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
index 2060d7418e7358f86c29c77b89bf4ac6c007ff84..9f32921c33b7e9d75620d985909e5f517f8596fd 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_v1Dev_build.ref
@@ -24,7 +24,7 @@ TrigSignatureMoniMT                                 INFO -- #1796849979 Events
 TrigSignatureMoniMT                                 INFO -- #1796849979 Features                             2          0          0          0          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2e3_etcut_L12EM3 #2613484113
 TrigSignatureMoniMT                                 INFO -- #2613484113 Events         20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3676       780        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             342        3676       738        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         8          8          1          1          1          0          0          0          0          0          -          -          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             2          2          6          0          0          0          0          0          -          -          -          -          -
@@ -258,34 +258,34 @@ TrigSignatureMoniMT                                 INFO -- #1745513164 Events
 TrigSignatureMoniMT                                 INFO -- #1745513164 Features                             55         55         55         -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e3_etcut_L1EM3 #683953566
 TrigSignatureMoniMT                                 INFO -- #683953566 Events          20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
-TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1838       390        -          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #683953566 Features                              171        1838       369        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324908483
 TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         20         20         20         -          -          -          -          -          -          -          -          -          -          20
 TrigSignatureMoniMT                                 INFO -- #324908483 Features                              137        1652       190        -          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_L1EM3 #736648247
 TrigSignatureMoniMT                                 INFO -- #736648247 Events          20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #736648247 Features                              54         585        109        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #736648247 Features                              54         585        105        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
 TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         17         17         17         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         650        116        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             56         650        113        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_L1EM3 #2713915187
 TrigSignatureMoniMT                                 INFO -- #2713915187 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             53         580        106        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             53         580        102        5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
 TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         531        93         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #176627878 Features                              48         531        91         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_L1EM3 #2070133824
 TrigSignatureMoniMT                                 INFO -- #2070133824 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             51         561        101        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             51         561        97         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_nod0_L1EM3 #3303895627
 TrigSignatureMoniMT                                 INFO -- #3303895627 Events         20         20         18         18         18         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             51         561        101        5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             51         561        97         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         513        84         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             45         513        82         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
 TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         16         16         16         4          -          -          -          -          -          -          -          -          -          4
-TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         513        84         5          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             45         513        82         5          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
 TrigSignatureMoniMT                                 INFO -- #298591874 Events          6          6          2          2          2          2          -          -          -          -          -          -          -          -          -          2
 TrigSignatureMoniMT                                 INFO -- #298591874 Features                              2          33         4          2          -          -          -          -          -          -          -          -          -
@@ -354,13 +354,13 @@ TrigSignatureMoniMT                                 INFO -- #3486231698 Events
 TrigSignatureMoniMT                                 INFO -- #3486231698 Features                             137        137        190        118        -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g5_loose_L1EM3 #3230088967
 TrigSignatureMoniMT                                 INFO -- #3230088967 Events         20         20         17         17         17         9          -          -          -          -          -          -          -          -          -          9
-TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             56         56         116        12         -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             56         56         113        12         -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g5_medium_L1EM3 #385248610
 TrigSignatureMoniMT                                 INFO -- #385248610 Events          20         20         16         16         16         9          -          -          -          -          -          -          -          -          -          9
-TrigSignatureMoniMT                                 INFO -- #385248610 Features                              48         48         93         12         -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #385248610 Features                              48         48         91         12         -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_g5_tight_L1EM3 #3280865118
 TrigSignatureMoniMT                                 INFO -- #3280865118 Events         20         20         16         16         16         9          -          -          -          -          -          -          -          -          -          9
-TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             45         45         84         9          -          -          -          -          -          -          -          -          -
+TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             45         45         82         9          -          -          -          -          -          -          -          -          -
 TrigSignatureMoniMT                                 INFO HLT_j0_perf_L1J12_EMPTY #1341875780
 TrigSignatureMoniMT                                 INFO -- #1341875780 Events         0          0          0          0          0          0          0          0          0          0          0          0          -          -          -          0
 TrigSignatureMoniMT                                 INFO -- #1341875780 Features                             0          0          0          0          0          0          0          0          0          0          -          -          -
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
index a1525c75c57ae67dc2e34cd80e7d570f959431a5..bfd009be21215f35dfa38fb7cbd51b3611370a20 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/testAthenaTrigAOD_TrigEDMCheck.py
@@ -98,7 +98,7 @@ ToolSvc.TrigDecisionTool.Navigation.Dlls = EDMLibraries
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 topSequence += TrigEDMChecker
-TrigEDMChecker.doDumpAll = True
+TrigEDMChecker.doDumpAll = False
 
 
 
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
index 378b33fe83296344319c5088d87e8b9f9dd75303..55be636e80d10d74400fdfa3902a382ca02bcb58 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt.py
@@ -56,7 +56,7 @@ for opt,arg in opts:
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon','electron','tau','bjet']
 rdo2aod.max_events = 2000 
-rdo2aod.threads = 1 # TODO: change to 4
+rdo2aod.threads = 4
 rdo2aod.concurrent_events = 4 
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py
index 7ef225f72347a76ccc36e5ea971f1aebf563490e..85e21cdfe4ffced924678ef3ee8a0e94ee1a690e 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt2.py
@@ -4,7 +4,7 @@
 # art-type: grid
 # art-include: master/Athena
 # art-input-nfiles: 3
-# art-athena-mt: 4
+# art-athena-mt: 8
 # art-memory: 4096
 # art-html: https://idtrigger-val.web.cern.ch/idtrigger-val/TIDAWeb/TIDAart/?jobdir=
 # art-output: *.txt
@@ -56,8 +56,8 @@ for opt,arg in opts:
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon','electron','tau','bjet']
 rdo2aod.max_events = 2000 
-rdo2aod.threads = 4 
-rdo2aod.concurrent_events = 4 
+rdo2aod.threads = 8 
+rdo2aod.concurrent_events = 8
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
 rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
diff --git a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py
index 9ff4e7edcc96e7defeaed0cf00b19db58c68016e..5f9a6159994865cadd647cf5a877572de6fd8684 100755
--- a/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/test/test_trigID_all_ttbar_pu80_mt3.py
@@ -4,7 +4,7 @@
 # art-type: grid
 # art-include: master/Athena
 # art-input-nfiles: 3
-# art-athena-mt: 4
+# art-athena-mt: 12
 # art-memory: 4096
 # art-output: *.txt
 # art-output: *.log
@@ -55,8 +55,8 @@ for opt,arg in opts:
 rdo2aod = TrigInDetReco()
 rdo2aod.slices = ['muon','electron','tau','bjet']
 rdo2aod.max_events = 2000 
-rdo2aod.threads = 4
-rdo2aod.concurrent_events = 1 
+rdo2aod.threads = 12
+rdo2aod.concurrent_events = 12 
 rdo2aod.perfmon = False
 rdo2aod.timeout = 18*3600
 rdo2aod.input = 'ttbar_pu80'   # defined in TrigValTools/share/TrigValInputs.json  
diff --git a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
index 96600fad8d35bb6f43580560faeb628b17abc2ac..524de6923fae628c22614f2a066a690885c28dff 100755
--- a/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
+++ b/Trigger/TrigValidation/TrigValAlgs/python/TrigValAlgsConfig.py
@@ -64,8 +64,9 @@ class TrigEDMChecker ( TrigEDMChecker ):
 
 
 def getEDMAuxList():
-    from TrigEDMConfig.TriggerEDM import getTriggerObjList,TriggerHLTList
-    tlist=getTriggerObjList('AODFULL',[TriggerHLTList])
+    from TrigEDMConfig.TriggerEDM import getTriggerEDMList
+    #from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
+    tlist=getTriggerEDMList('AODFULL',3)
     objlist=[]
     for t,kset in six.iteritems(tlist):
         for k in kset:
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 673cb5fc606571ef59d1424b6b4fa5b31f253441..2e59e14d5910ffee2960ba8f9aa2aca598188c33 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -24,7 +24,7 @@ TrigSignatureMoniMT                                 INFO -- #1796849979 Events
 TrigSignatureMoniMT                                 INFO -- #1796849979 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2e3_etcut_L12EM3 #2613484113
 TrigSignatureMoniMT                                 INFO -- #2613484113 Events         20         20         15         13         13         -          -          -          -          -          -          -          -          -          -          13         
-TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             94         324        178        -          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2613484113 Features                             94         324        172        -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2g10_loose_mu20_L1MU20 #3765708828
 TrigSignatureMoniMT                                 INFO -- #3765708828 Events         20         20         0          0          0          0          0          0          0          0          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3765708828 Features                             0          0          0          0          0          0          0          0          -          -          -          -          -          
@@ -258,34 +258,34 @@ TrigSignatureMoniMT                                 INFO -- #1745513164 Events
 TrigSignatureMoniMT                                 INFO -- #1745513164 Features                             23         23         23         -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e3_etcut_L1EM3 #683953566
 TrigSignatureMoniMT                                 INFO -- #683953566 Events          20         20         15         14         14         -          -          -          -          -          -          -          -          -          -          14         
-TrigSignatureMoniMT                                 INFO -- #683953566 Features                              48         163        90         -          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #683953566 Features                              48         163        87         -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324908483
 TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         13         13         13         -          -          -          -          -          -          -          -          -          -          13         
 TrigSignatureMoniMT                                 INFO -- #324908483 Features                              41         148        49         -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_L1EM3 #736648247
 TrigSignatureMoniMT                                 INFO -- #736648247 Events          20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #736648247 Features                              18         52         28         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #736648247 Features                              18         52         27         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
 TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         10         10         10         0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             15         48         31         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             15         48         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_L1EM3 #2713915187
 TrigSignatureMoniMT                                 INFO -- #2713915187 Events         20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             19         55         28         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2713915187 Features                             19         55         27         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
 TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #176627878 Features                              13         51         30         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #176627878 Features                              13         51         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_L1EM3 #2070133824
 TrigSignatureMoniMT                                 INFO -- #2070133824 Events         20         20         8          8          8          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             16         43         25         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2070133824 Features                             16         43         24         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_nod0_L1EM3 #3303895627
 TrigSignatureMoniMT                                 INFO -- #3303895627 Events         20         20         8          8          8          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             16         43         25         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3303895627 Features                             16         43         24         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             13         51         30         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             13         51         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
 TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         9          9          9          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             13         51         30         0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             13         51         29         0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
 TrigSignatureMoniMT                                 INFO -- #298591874 Events          20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #298591874 Features                              0          0          0          0          -          -          -          -          -          -          -          -          -          
@@ -327,7 +327,7 @@ TrigSignatureMoniMT                                 INFO -- #1417839619 Events
 TrigSignatureMoniMT                                 INFO -- #1417839619 Features                             3          3          2          -          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g25_loose_L1EM20VH #3476696431
 TrigSignatureMoniMT                                 INFO -- #3476696431 Events         20         20         2          2          2          0          -          -          -          -          -          -          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3476696431 Features                             2          2          6          0          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3476696431 Features                             2          2          5          0          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g25_medium_L1EM20VH #1519793981
 TrigSignatureMoniMT                                 INFO -- #1519793981 Events         20         20         0          0          0          0          -          -          -          -          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1519793981 Features                             0          0          0          0          -          -          -          -          -          -          -          -          -          
@@ -354,13 +354,13 @@ TrigSignatureMoniMT                                 INFO -- #3486231698 Events
 TrigSignatureMoniMT                                 INFO -- #3486231698 Features                             41         41         50         36         -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g5_loose_L1EM3 #3230088967
 TrigSignatureMoniMT                                 INFO -- #3230088967 Events         20         20         10         10         10         2          -          -          -          -          -          -          -          -          -          2          
-TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             15         15         31         2          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3230088967 Features                             15         15         29         2          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g5_medium_L1EM3 #385248610
 TrigSignatureMoniMT                                 INFO -- #385248610 Events          20         20         9          9          9          2          -          -          -          -          -          -          -          -          -          2          
-TrigSignatureMoniMT                                 INFO -- #385248610 Features                              13         13         30         2          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #385248610 Features                              13         13         29         2          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g5_tight_L1EM3 #3280865118
 TrigSignatureMoniMT                                 INFO -- #3280865118 Events         20         20         9          9          9          1          -          -          -          -          -          -          -          -          -          1          
-TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             13         13         30         1          -          -          -          -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #3280865118 Features                             13         13         29         1          -          -          -          -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_j0_perf_L1J12_EMPTY #1341875780
 TrigSignatureMoniMT                                 INFO -- #1341875780 Events         20         20         0          0          0          0          0          0          0          0          0          8          -          -          -          8          
 TrigSignatureMoniMT                                 INFO -- #1341875780 Features                             0          0          0          0          0          0          0          0          0          117        -          -          -