diff --git a/Calorimeter/CaloCnv/CaloSimEventAthenaPool/src/CaloCalibrationHitContainerCnv.cxx b/Calorimeter/CaloCnv/CaloSimEventAthenaPool/src/CaloCalibrationHitContainerCnv.cxx
index 8f9325bf619b4e8def38eb78711e29aaf531a0d3..faada3b08e3ec3d02d27fa302a51fb6806ce0910 100644
--- a/Calorimeter/CaloCnv/CaloSimEventAthenaPool/src/CaloCalibrationHitContainerCnv.cxx
+++ b/Calorimeter/CaloCnv/CaloSimEventAthenaPool/src/CaloCalibrationHitContainerCnv.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
 */
 
 #include "CaloSimEventTPCnv/CaloCalibrationHitContainerCnv_p1.h"
@@ -31,15 +31,15 @@ CaloCalibrationHitContainer* CaloCalibrationHitContainerCnv::createTransient() {
     static const pool::Guid  p0_guid("33CDAED0-F472-47D2-8F28-27C6D6761F35");
 
     if( this->compareClassGuid(p3_guid)) {
-      std::auto_ptr< CaloCalibrationHitContainer_p3 >   col_vect( this->poolReadObject< CaloCalibrationHitContainer_p3 >() );
+      std::unique_ptr< CaloCalibrationHitContainer_p3 >   col_vect( this->poolReadObject< CaloCalibrationHitContainer_p3 >() );
       trans_cont = converter_p3.createTransient( col_vect.get(), mlog );
     }
     else if( this->compareClassGuid(p2_guid)) {
-      std::auto_ptr< CaloCalibrationHitContainer_p2 >   col_vect( this->poolReadObject< CaloCalibrationHitContainer_p2 >() );
+      std::unique_ptr< CaloCalibrationHitContainer_p2 >   col_vect( this->poolReadObject< CaloCalibrationHitContainer_p2 >() );
       trans_cont = converter_p2.createTransient( col_vect.get(), mlog );
     }
     else if( this->compareClassGuid(p1_guid)) {
-        std::auto_ptr< CaloCalibrationHitContainer_p1 >   col_vect( this->poolReadObject< CaloCalibrationHitContainer_p1 >() );
+        std::unique_ptr< CaloCalibrationHitContainer_p1 >   col_vect( this->poolReadObject< CaloCalibrationHitContainer_p1 >() );
         trans_cont = converter_p1.createTransient( col_vect.get(), mlog );
     }
     else if( this->compareClassGuid(p0_guid)) {
diff --git a/Control/AthContainers/AthContainers/ThinningDecision.h b/Control/AthContainers/AthContainers/ThinningDecision.h
index 785a660d3cd67f2903f73836ff576b23fed63cd3..2a94df9997060109e4bb13bddfa0425b81bdbd93 100644
--- a/Control/AthContainers/AthContainers/ThinningDecision.h
+++ b/Control/AthContainers/AthContainers/ThinningDecision.h
@@ -1,6 +1,6 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 /*
- * 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 AthContainers/ThinningDecision.h
@@ -12,6 +12,7 @@
 
 #ifndef ATHCONTAINERS_THINNINGDECISION_H
 #define ATHCONTAINERS_THINNINGDECISION_H
+#ifndef XAOD_STANDALONE
 
 
 #include "AthContainers/AuxVectorBase.h"
@@ -86,4 +87,5 @@ private:
 CLASS_DEF( SG::ThinningDecision, 74079355, 1 )
 
 
+#endif // XAOD_STANDALONE
 #endif // not ATHCONTAINERS_THINNINGDECISION_H
diff --git a/Control/AthContainers/AthContainers/exceptions.h b/Control/AthContainers/AthContainers/exceptions.h
index f86ac4ad581b5959044610026f637fd8e315243f..bbcd4bbebad30c7665eceb51275dba4e537bf6e1 100644
--- a/Control/AthContainers/AthContainers/exceptions.h
+++ b/Control/AthContainers/AthContainers/exceptions.h
@@ -1,7 +1,7 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
 
 /*
-  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 AthContainers/exceptions.h
@@ -16,7 +16,6 @@
 
 
 #include "AthContainersInterfaces/AuxTypes.h"
-#include "GaudiKernel/ClassID.h"
 #include <stdexcept>
 #include <typeinfo>
 #include <string>
@@ -398,7 +397,7 @@ public:
    * @param clid The CLID of the requested container.
    * @param key The StoreGate key of the requested container.
    */
-  ExcInvalidThinningTarget (CLID clid,
+  ExcInvalidThinningTarget (unsigned int clid,
                             const std::string& key);
 };
 
diff --git a/Control/AthContainers/CMakeLists.txt b/Control/AthContainers/CMakeLists.txt
index 526aec0e4d4741ef66c2972f56eeb29e6331531c..f64afd1fbac94b85df36a6082ff098848b17c988 100644
--- a/Control/AthContainers/CMakeLists.txt
+++ b/Control/AthContainers/CMakeLists.txt
@@ -7,21 +7,10 @@ atlas_subdir( AthContainers )
 
 # Extra dependencies, based on the environment we are in:
 if( NOT XAOD_STANDALONE )
-   set( extra_deps Control/AthenaKernel Control/SGTools GaudiKernel )
    set( extra_libs AthenaKernel SGTools GaudiKernel )
    set( extra_sources src/*.cxx )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainersInterfaces
-   Control/AthLinks
-   Control/CxxUtils
-   ${extra_deps}
-   PRIVATE
-   AtlasTest/TestTools )
-
 # External dependencies:
 find_package( Boost COMPONENTS thread )
 find_package( ROOT COMPONENTS Core )
@@ -35,7 +24,7 @@ atlas_add_library( AthContainers
    PUBLIC_HEADERS AthContainers
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS}
    LINK_LIBRARIES ${Boost_LIBRARIES} ${TBB_LIBRARIES}
-                  AthLinks CxxUtils ${extra_libs} )
+                  AthContainersInterfaces AthLinks CxxUtils ${extra_libs} )
 
 atlas_add_dictionary( AthContainersDict
    AthContainers/AthContainersDict.h
@@ -96,7 +85,6 @@ _add_test( debug_test )
 _add_test( AtomicDecorator_test )
 _add_test( AtomicConstAccessor_test )
 _add_test( supportsThinning_test )
-_add_test( ThinningDecision_test )
 
 
 if( NOT XAOD_STANDALONE )
@@ -105,4 +93,5 @@ if( NOT XAOD_STANDALONE )
    _add_test( ViewVectorBase_test )
    _add_test( AuxVectorData_test LOG_IGNORE_PATTERN "will use std::" )
    _add_test( DVLDataBucket_test )
+   _add_test( ThinningDecision_test )
 endif()
diff --git a/Control/AthContainers/Root/exceptions.cxx b/Control/AthContainers/Root/exceptions.cxx
index aa83ea7d61d0d8baedfeb85a7ef89bdf0ee6de2a..9eaa55736a5831373bf3a05c4594633cccc1dbe5 100644
--- a/Control/AthContainers/Root/exceptions.cxx
+++ b/Control/AthContainers/Root/exceptions.cxx
@@ -478,7 +478,7 @@ ExcAtomicMismatch::ExcAtomicMismatch (SG::auxid_t auxid,
 
 
 /// Helper: format exception error string.
-std::string excInvalidThinningTarget_format (CLID clid,
+std::string excInvalidThinningTarget_format (unsigned int clid,
                                              const std::string& key)
 {
   std::ostringstream os;
@@ -494,7 +494,7 @@ std::string excInvalidThinningTarget_format (CLID clid,
  * @param clid The CLID of the requested container.
  * @param key The StoreGate key of the requested container.
  */
-ExcInvalidThinningTarget::ExcInvalidThinningTarget (CLID clid,
+ExcInvalidThinningTarget::ExcInvalidThinningTarget (unsigned int clid,
                                                     const std::string& key)
   : std::runtime_error (excInvalidThinningTarget_format (clid, key))
 {
diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaCheck.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaCheck.cxx
index e99d041493ec980da47018cc42d0a6aa9430399a..6847f5a4f8b241500f3f63e461ab487d3429a131 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_AnaCheck.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_AnaCheck.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
 */
 
 /// @author Nils Krumnack
@@ -13,7 +13,6 @@
 #include <AsgTools/AnaToolHandle.h>
 #include <AsgMessaging/MessageCheck.h>
 #include <AsgMessaging/IMessagePrinter.h>
-#include <AsgMessaging/MessagePrinterMock.h>
 #include <AsgMessaging/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
 #include <cmath>
diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_AsgTool.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_AsgTool.cxx
index 8b6b5ffd7bb430da67294fe8d71a4501365a078e..9d21c3e339135b9e76b8d80a9a72a14ddb640597 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_AsgTool.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_AsgTool.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
 */
 
 /// @author Nils Krumnack
@@ -13,9 +13,9 @@
 #include <AsgTools/AnaToolHandle.h>
 #include <AsgMessaging/MessageCheck.h>
 #include <AsgMessaging/IMessagePrinter.h>
-#include <AsgMessaging/MessagePrinterMock.h>
 #include <AsgMessaging/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
+#include <AsgTesting/MessagePrinterMock.h>
 #include <cmath>
 #include <gtest/gtest.h>
 #include <gtest/gtest-spi.h>
diff --git a/Control/AthToolSupport/AsgExampleTools/test/gt_MessageCheck.cxx b/Control/AthToolSupport/AsgExampleTools/test/gt_MessageCheck.cxx
index ab52777f2b70fe32d311c47cbc1b3b714a5a583c..d6adbe8a87b932434b24a491504d75fb5cd5028e 100644
--- a/Control/AthToolSupport/AsgExampleTools/test/gt_MessageCheck.cxx
+++ b/Control/AthToolSupport/AsgExampleTools/test/gt_MessageCheck.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
 */
 
 /// @author Nils Krumnack
@@ -13,9 +13,9 @@
 #include <AsgTools/AnaToolHandle.h>
 #include <AsgMessaging/MessageCheck.h>
 #include <AsgMessaging/IMessagePrinter.h>
-#include <AsgMessaging/MessagePrinterMock.h>
 #include <AsgMessaging/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
+#include <AsgTesting/MessagePrinterMock.h>
 #include <cmath>
 #include <gtest/gtest.h>
 #include <gtest/gtest-spi.h>
diff --git a/Control/AthToolSupport/AsgMessaging/CMakeLists.txt b/Control/AthToolSupport/AsgMessaging/CMakeLists.txt
index 6fc449312609c51b069be5c2c226db3e9ddd1a32..e19677fdcdf353d2f7654a9c81aeaa85d8c9af68 100644
--- a/Control/AthToolSupport/AsgMessaging/CMakeLists.txt
+++ b/Control/AthToolSupport/AsgMessaging/CMakeLists.txt
@@ -1,18 +1,15 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
+
 # Declare the package name:
 atlas_subdir( AsgMessaging )
 
 # Dependencies are taken based on what environment we are in:
 if( XAOD_STANDALONE )
-   set( deps )
-   set( libs )
+   set( extra_libs )
 else()
-   set( deps GaudiKernel Control/AthenaBaseComps )
-   set( libs GaudiKernel AthenaBaseComps )
+   set( extra_libs GaudiKernel AthenaBaseComps )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC ${deps} )
-
 # Decide which sources to use:
 if( XAOD_STANDALONE )
    set( sources Root/*.cxx )
@@ -26,7 +23,7 @@ endif()
 atlas_add_library( AsgMessagingLib
    AsgMessaging/*.h AsgMessaging/*.icc ${sources}
    PUBLIC_HEADERS AsgMessaging
-   LINK_LIBRARIES ${libs} )
+   LINK_LIBRARIES CxxUtils ${extra_libs} )
 
 # Select which xml files to use for dictionary generation
 
diff --git a/Control/AthToolSupport/AsgMessaging/Root/MessageCheck.cxx b/Control/AthToolSupport/AsgMessaging/Root/MessageCheck.cxx
index c0cb0f393facea44765341562befbf8c657a04fd..bd886b86767684d5d3b51b05cbd6674e37bb3229 100644
--- a/Control/AthToolSupport/AsgMessaging/Root/MessageCheck.cxx
+++ b/Control/AthToolSupport/AsgMessaging/Root/MessageCheck.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
 */
 
 /// @author Nils Krumnack
@@ -13,8 +13,10 @@
 #include <AsgMessaging/MessageCheck.h>
 
 #include <AsgMessaging/MessageCheckLocal.h>
+#include <cassert>
 #include <mutex>
 #include <stdexcept>
+#include <unordered_map>
 
 #ifndef XAOD_STANDALONE
 #include <GaudiKernel/Bootstrap.h>
diff --git a/Control/AthToolSupport/AsgMessaging/AsgMessaging/MessagePrinterMock.h b/Control/AthToolSupport/AsgTesting/AsgTesting/MessagePrinterMock.h
similarity index 67%
rename from Control/AthToolSupport/AsgMessaging/AsgMessaging/MessagePrinterMock.h
rename to Control/AthToolSupport/AsgTesting/AsgTesting/MessagePrinterMock.h
index 1a7c4fd076a8904b6ec21651435a8a7c66731c98..9a2b46e707ef693f497f76ace4266e19d41556db 100644
--- a/Control/AthToolSupport/AsgMessaging/AsgMessaging/MessagePrinterMock.h
+++ b/Control/AthToolSupport/AsgTesting/AsgTesting/MessagePrinterMock.h
@@ -1,13 +1,13 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /// @author Nils Krumnack
 
 
 
-#ifndef ASG_MESSAGING__MESSAGE_PRINTER_MOCK_H
-#define ASG_MESSAGING__MESSAGE_PRINTER_MOCK_H
+#ifndef ASG_TESTING__MESSAGE_PRINTER_MOCK_H
+#define ASG_TESTING__MESSAGE_PRINTER_MOCK_H
 
 #include <AsgMessaging/IMessagePrinter.h>
 #include <gmock/gmock.h>
diff --git a/Control/AthToolSupport/AsgTesting/CMakeLists.txt b/Control/AthToolSupport/AsgTesting/CMakeLists.txt
index b469ea8a7224597ed891d73dda38843f82950f2b..46bf1a477dc63004cd239cbcf3f3ef8410a04e34 100644
--- a/Control/AthToolSupport/AsgTesting/CMakeLists.txt
+++ b/Control/AthToolSupport/AsgTesting/CMakeLists.txt
@@ -1,9 +1,8 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # Declare the package name:
 atlas_subdir( AsgTesting )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC Control/AthToolSupport/AsgTools )
-
 # External dependencies:
 find_package( Boost COMPONENTS regex )
 find_package( GTest )
@@ -13,12 +12,12 @@ find_package( GMock )
 atlas_add_library( AsgTestingLib
    AsgTesting/*.h AsgTesting/*.icc Root/*.cxx
    PUBLIC_HEADERS AsgTesting
-   INCLUDE_DIRS ${GTEST_INCLUDE_DIRS}
+   INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-   LINK_LIBRARIES AsgTools
+   LINK_LIBRARIES AsgTools AsgMessagingLib ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES}
    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} )
 
 atlas_add_test( gt_UnitTest_test
    SOURCES test/gt_UnitTest_test.cxx
    INCLUDE_DIRS ${GTEST_INCLUDE_DIRS}
-   LINK_LIBRARIES ${GTEST_LIBRARIES} AsgTestingLib )
+   LINK_LIBRARIES ${GTEST_LIBRARIES} AsgTools AsgMessagingLib AsgTestingLib )
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterMock.h b/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterMock.h
deleted file mode 100644
index 741d5d1d83977085e8c387451f9aa1a8ab1475f6..0000000000000000000000000000000000000000
--- a/Control/AthToolSupport/AsgTools/AsgTools/MessagePrinterMock.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef FILE_AsgTools_MessagePrinterMock_h
-#define FILE_AsgTools_MessagePrinterMock_h
-
-// this file is likely used in a variety of places, so this warning is
-// disabled in 21.2.  once this gets swept to master it may be a good
-// idea to include this warning and remove all the users.
-
-// #warning "use of this file is deprecated, please include the header from AsgMessaging instead"
-
-#include <AsgMessaging/MessagePrinterMock.h>
-
-#endif
diff --git a/Control/AthenaConfiguration/share/confTool.py b/Control/AthenaConfiguration/share/confTool.py
index 9b5b97204d9ee500d6f211152bfd0dd600b15a51..58140100e629cbb158c4743524f683a72f9015db 100755
--- a/Control/AthenaConfiguration/share/confTool.py
+++ b/Control/AthenaConfiguration/share/confTool.py
@@ -170,20 +170,22 @@ def __compareConfig(configRef, configChk, args):
 
     for component in allComps:
 
-        if component not in configRef and not args.ignoreMissing:
-            print(
-                "\n\033[91m Component ",
-                component,
-                " \033[94m exists only in Chk \033[0m \033[0m \n",
-            )
+        if component not in configRef:
+            if not args.ignoreMissing:
+                print(
+                    "\n\033[91m Component ",
+                    component,
+                    " \033[94m exists only in Chk \033[0m \033[0m \n",
+                )
             continue
 
-        if component not in configChk and not args.ignoreMissing:
-            print(
-                "\n\033[91m Component",
-                component,
-                " \033[92m exists only in Ref \033[0m  \033[0m \n",
-            )
+        if component not in configChk:
+            if not args.ignoreMissing:
+                print(
+                    "\n\033[91m Component",
+                    component,
+                    " \033[92m exists only in Ref \033[0m  \033[0m \n",
+                )
             continue
         refValue = configRef[component]
         chkValue = configChk[component]
diff --git a/Database/CrestApi/src/CrestApi.cxx b/Database/CrestApi/src/CrestApi.cxx
index bf93976d3bef70c220cb4a9f51303b4701ae6f22..732de9be1a83ee03fcaf31b8e20666a5a67c6db8 100644
--- a/Database/CrestApi/src/CrestApi.cxx
+++ b/Database/CrestApi/src/CrestApi.cxx
@@ -869,6 +869,8 @@ namespace Crest {
     return respond;
   }
 
+// REQUEST METHODS
+
   void CrestClient::storePayload(const std::string& tag, uint64_t since, const std::string& js) {
     if (m_mode == FILESYSTEM_MODE) {
       storePayloadDump(tag, since, js);
@@ -877,10 +879,6 @@ namespace Crest {
     storePayloadRequest(tag, since, js);
   }
 
-// REQUEST METHODS
-
-
-
 
   struct data {
     char trace_ascii; /* 1 or 0 */
@@ -959,6 +957,11 @@ namespace Crest {
 
       /* always cleanup */
       curl_easy_cleanup(curl);
+      curl_formfree(formpost);
+      curl_slist_free_all (headers);
+
+      curl_formfree(lastptr);      
+      curl_global_cleanup(); 
 
       return s;
     }
@@ -1027,6 +1030,10 @@ namespace Crest {
 
       /* always cleanup */
       curl_easy_cleanup(curl);
+      curl_slist_free_all (headers);
+      
+      curl_global_cleanup();
+
       return s;
     }
 
@@ -1240,6 +1247,12 @@ namespace Crest {
 
       // always cleanup
       curl_easy_cleanup(curl);
+      curl_formfree(formpost);
+      curl_slist_free_all (headers);
+
+      curl_formfree(lastptr);      
+      curl_global_cleanup();
+
       return s;
     }
     std::string mes = "CrestClient::storeBatchPayload";
diff --git a/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx b/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx
index 3e811eb976c788b1acda403c1eedc18e7a913d6d..9862e27c9b29707d4aa9a78a596123be2e3dad82 100755
--- a/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx
+++ b/Event/EventCommonAthenaPool/src/INav4MomAssocsCnv.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // INav4MomAssocsCnv.cxx 
@@ -68,17 +68,17 @@ INav4MomAssocs* INav4MomAssocsCnv::createTransient()
 
   if( compareClassGuid(p3_guid) ) {
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<INav4MomAssocs_p3> persObj( poolReadObject<INav4MomAssocs_p3>() );
+    std::unique_ptr<INav4MomAssocs_p3> persObj( poolReadObject<INav4MomAssocs_p3>() );
     transObj =  m_tpConverter_p3.createTransient( persObj.get(), log );
   }
   else if ( compareClassGuid(p2_guid) ) {
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<INav4MomAssocs_p2> persObj( poolReadObject<INav4MomAssocs_p2>() );
+    std::unique_ptr<INav4MomAssocs_p2> persObj( poolReadObject<INav4MomAssocs_p2>() );
     transObj = m_tpConverter_p2.createTransient( persObj.get(), log );
   }
   else if( compareClassGuid(p1_guid) ) {
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<INav4MomAssocs_p1> persObj( poolReadObject<INav4MomAssocs_p1>() );
+    std::unique_ptr<INav4MomAssocs_p1> persObj( poolReadObject<INav4MomAssocs_p1>() );
     INav4MomAssocsCnv_p1 cnv( m_storeGate );
     transObj = cnv.createTransient( persObj.get(), log );
   }
diff --git a/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx b/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx
index 4443f4c9b0bc14510e0826a6f63b92590dfb6b02..c1e6e7f5d12ceeb1d5716511d0e10ad1f1d49883 100644
--- a/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.cxx
+++ b/Event/EventCommonAthenaPool/src/INav4MomLinkContainerCnv.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
 */
 
 /** INav4MomLinkContainerCnv.cxx
@@ -46,7 +46,7 @@ INav4MomLinkContainer* INav4MomLinkContainerCnv::createTransient()
   if( compareClassGuid(p1_guid) )
     {
       // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< INav4MomLinkContainer_PERS > col_vect( poolReadObject< INav4MomLinkContainer_PERS >() );
+      std::unique_ptr< INav4MomLinkContainer_PERS > col_vect( poolReadObject< INav4MomLinkContainer_PERS >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
     }
   else
diff --git a/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx b/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx
index ad98151f50ed1c0ff3c718c3bf66dc8a6aaee712..5871bb7d19dce594a5eb910b6c6d27f8279e22eb 100644
--- a/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.cxx
+++ b/Event/EventCommonAthenaPool/src/IParticleLinkContainerCnv.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
 */
 
 /** IParticleLinkContainerCnv.cxx
@@ -53,7 +53,7 @@ IParticleLinkContainer* IParticleLinkContainerCnv::createTransient()
   if( compareClassGuid(p1_guid) )
     {
       // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< IParticleLinkContainer_PERS > col_vect( poolReadObject< IParticleLinkContainer_PERS >() );
+      std::unique_ptr< IParticleLinkContainer_PERS > col_vect( poolReadObject< IParticleLinkContainer_PERS >() );
       return m_TPConverter.createTransient( col_vect.get(), log );
     }
   else
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayInput_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayInput_jobOptions.py
index 64ef7b271b8100ca98e343d87ca9cec983fcc061..3e7be9325fba6a7fdf1c749d5513b8d5a04e5b90 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayInput_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/OverlayInput_jobOptions.py
@@ -17,8 +17,6 @@ else:
 
 # Timings
 AddressRemappingSvc.addInputRename('RecoTimingObj', 'EVNTtoHITS_timings', 'Sig_EVNTtoHITS_timings')
-if not overlayFlags.isDataOverlay():
-    AddressRemappingSvc.addInputRename('RecoTimingObj', 'HITStoRDO_timings', 'Bkg_HITStoRDO_timings')
 
 # Truth
 if DetFlags.overlay.Truth_on():
@@ -31,9 +29,3 @@ if DetFlags.overlay.Truth_on():
     if 'CaloCalibrationHitContainer' in overlayFlags.optionalContainerMap():
         for collection in overlayFlags.optionalContainerMap()['CaloCalibrationHitContainer']:
             AddressRemappingSvc.addInputRename('CaloCalibrationHitContainer', collection, 'Sig_' + collection)
-
-    if not overlayFlags.isDataOverlay():
-        AddressRemappingSvc.addInputRename('xAOD::JetContainer', 'InTimeAntiKt4TruthJets', 'Bkg_InTimeAntiKt4TruthJets')
-        AddressRemappingSvc.addInputRename('xAOD::JetAuxContainer', 'InTimeAntiKt4TruthJetsAux.', 'Bkg_InTimeAntiKt4TruthJetsAux.')
-        AddressRemappingSvc.addInputRename('xAOD::JetContainer', 'OutOfTimeAntiKt4TruthJets', 'Bkg_OutOfTimeAntiKt4TruthJets')
-        AddressRemappingSvc.addInputRename('xAOD::JetAuxContainer', 'OutOfTimeAntiKt4TruthJetsAux.', 'Bkg_OutOfTimeAntiKt4TruthJetsAux.')
diff --git a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx
index 7316fe5b5aafa5ad4a841ec27167a23cd49cec9d..8fb55bdde9a7ab43d712bfde3194faeb7e41cebb 100644
--- a/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx
+++ b/Event/xAOD/xAODTrigger/Root/TrigComposite_v1.cxx
@@ -7,6 +7,18 @@
 #include <algorithm>
 #include <stdexcept>
 
+// In "standalone mode" xAOD::IParticleContainer doesn't have a CLID
+// defined for it. But this code requires one to be set.
+//
+// The following is incredibly ugly, but this is the best that I could
+// come up with on short notice. Note that the CLID value is copy-pasted
+// from the IParticleContainer.h header.
+#include "xAODBase/IParticleContainer.h"
+#ifdef XAOD_STANDALONE
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::IParticleContainer, 1241842700, 1 )
+#endif // XAOD_STANDALONE
+
 // xAOD include(s):
 #include "xAODCore/AuxStoreAccessorMacros.h"
 
@@ -15,6 +27,7 @@
 // Local include(s):
 #include "xAODTrigger/versions/TrigComposite_v1.h"
 
+
 namespace xAOD {
 
   const std::string TrigComposite_v1::s_collectionSuffix{"__COLL"};
diff --git a/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonSetup.py b/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonSetup.py
index 177c62d5f3fc65f11c2f92c1aa8843b35606ead7..791f40b244febb3b5481cd4b3abae5d948e4b19f 100755
--- a/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonSetup.py
+++ b/HLT/Trigger/TrigControl/TrigPSC/share/TrigPSCPythonSetup.py
@@ -76,7 +76,7 @@ else:
    del logLevel
 
    from AthenaCommon.Logging import logging
-   log = logging.getLogger('TrigPSCPythonSetup')
+   psclog = logging.getLogger('TrigPSCPythonSetup')
 
    ## file inclusion and tracing
    from AthenaCommon.Include import IncludeError, include
@@ -199,13 +199,14 @@ else:
          jocat = pickle.load(f)   # basic job properties
          jocfg = pickle.load(f)   # some specialized services
          jocat.update(jocfg)       # merge the two dictionaries
-         log.info('Dumping joboptions to "%s.json"', fname)
+         psclog.info('Dumping joboptions to "%s.json"', fname)
          create_joboptions_json(jocat, fname+".json")
 
       if PscConfig.exitAfterDump:
          theApp.exit(0)
+   else:
+      # storeJobOptionsCatalogue calls setup() itself, so we only need it here
+      theApp.setup()
 
-   del log
-
-   ### setup everything ---------------------------------------------------------
-   theApp.setup()
+   ### Cleanup
+   del psclog
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/fancyTab.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/fancyTab.py
index f883bcc45852deb2494f4c14567b6472335fc741..830221b7628a8eb685d8836bb6c7648e03367a3f 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/fancyTab.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/fancyTab.py
@@ -1,5 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
+from __future__ import print_function
+
 import types
 import math
 
@@ -10,8 +12,8 @@ def print_table_row(row, top_border=False, bottom_border=False):
     """Prints columns of a single table row with ascii cell seperator and
     an optional top and/or bottom border line.
     """
-    if not type(row) == types.ListType:
-        print "ERROR: A line has to be of the type ListType."
+    if isinstane(row,(list,tuple)):
+        print ("ERROR: A line has to be of the type ListType.")
         return 1
     cc = "+"
     """corner char"""
@@ -33,10 +35,10 @@ def print_table_row(row, top_border=False, bottom_border=False):
         c += 1
     # now print table row
     if top_border:
-        print sep
-    print out
+        print (sep)
+    print (out)
     if bottom_border:
-        print sep
+        print (sep)
     return 0
 
 def print_table(rows):
@@ -44,8 +46,8 @@ def print_table(rows):
     The first row is assumed to be the heading line. The heading line
     and the last line of the table are printed with seperator lines.
     """
-    if not type(rows) == types.ListType:
-        print "ERROR: Table rows have to be of the type ListType."
+    if isinstane(rows,(list,tuple)):
+        print ("ERROR: Table rows have to be of the type ListType.")
         return 1
     r = 0
     """row counter"""
@@ -105,7 +107,8 @@ def align_cell_content(cell, max_cell_length=0, alignment=0, truncate=True):
         return cell
     cur_cell_length=len(cell)
     padding=max_cell_length-cur_cell_length
-    if padding == 0: return cell
+    if padding == 0:
+        return cell
     if padding < 0:
         if truncate:
             return cell[:max_cell_length]
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/parseDir.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/parseDir.py
index f56e9de9aef3a72bce64494baa6b5042dd420a3a..d6c7b28e78be497a34afcb58bb84b55ea4607eff 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/parseDir.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/parseDir.py
@@ -1,5 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
+from __future__ import print_function
 
 from fancyTab import *
 
@@ -32,13 +33,13 @@ test_table = []
 
 
 import os
-print "-----------------------------------------------------------------------------------------------------------"
+print ("-----------------------------------------------------------------------------------------------------------")
 
-print "Now looking for the best current minimum of the training in directory: "
-print path
-print "-----------------------------------------------------------------------------------------------------------"
-print " "
-#print "Network type | \t parameters | \t epoch | \t minimum "
+print ("Now looking for the best current minimum of the training in directory: ")
+print (path)
+print ("-----------------------------------------------------------------------------------------------------------")
+print (" ")
+#print ("Network type | \t parameters | \t epoch | \t minimum ")
 test_table.append(["Network Type", "Parameters", "Epoch", "Minimum"])
 
 for dir in [ "number", "positions" , "errors" ]:
@@ -61,8 +62,8 @@ for dir in [ "number", "positions" , "errors" ]:
 
     test_table.append(["------------","---------------------" ,"------" ,"----------"])
 
-#            print dir+"\t"+weightsDir+"\t"+w+"\t"+str(epochAtMin)+"\t"+str(min)
-#            print dir+" |\t| "+weightsDir+" \t \t "+str(epochAtMin)+" \t "+str(min)
+#            print (dir+"\t"+weightsDir+"\t"+w+"\t"+str(epochAtMin)+"\t"+str(min))
+#            print (dir+" |\t| "+weightsDir+" \t \t "+str(epochAtMin)+" \t "+str(min))
 
 
 print_table(test_table)
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
index 8df36112258966fe0fba5793a04928808b5e8ec8..ff6bdb8ee35aa6e8e1c171b0397e270b66c70783 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
@@ -29,6 +29,7 @@ doValidate = False
 ## Input files
 
 collection = []
+import os
 if os.path.isfile("inputfilelist"):
   for line in open("inputfilelist"):
     collection.append(line.strip())
@@ -44,7 +45,7 @@ globalflags.DataSource = 'data'
 
 
 ## input file parameters
-import PyUtils.MetaReader import read_metadata
+from PyUtils.MetaReader import read_metadata
 inputfile = read_metadata(collection[0])
 inputfile = inputfile[collection[0]]  # promote keys stored under input filename key one level up to access them directly
 
@@ -63,16 +64,16 @@ else:
   globalflags.DatabaseInstance = 'CONDBR2'  ######################
   # globalflags.ConditionsTag = 'OFLCOND-RUN12-SDR-22' #
 
-from IOVDbSvc.CondDB import conddb;
-conddb.addOverride("/PIXEL/NoiseMapLong","PixNoiseMapLong-RUN2-DATA-UPD4-02");
-conddb.addOverride("/PIXEL/NoiseMapShort","PixNoiseMapShort-RUN2-DATA-UPD4-02");
-conddb.addOverride("/PIXEL/PixMapLong","PixMapLong-RUN2-DATA-UPD1-02");
-conddb.addOverride("/PIXEL/PixMapShort","PixMapShort-RUN2-DATA-UPD1-02");
-
-#conddb.addOverride("/PIXEL/NoiseMapLong","PixNoiseMapLong-DATA-RUN2-000-00");
-#conddb.addOverride("/PIXEL/NoiseMapShort","PixNoiseMapShort-DATA-RUN2-000-00");
-#conddb.addOverride("/PIXEL/PixMapLong","PixMapLong-DATA-RUN2-000-00");
-#conddb.addOverride("/PIXEL/PixMapShort","PixMapShort-DATA-RUN2-000-00");
+from IOVDbSvc.CondDB import conddb
+conddb.addOverride("/PIXEL/NoiseMapLong","PixNoiseMapLong-RUN2-DATA-UPD4-02")
+conddb.addOverride("/PIXEL/NoiseMapShort","PixNoiseMapShort-RUN2-DATA-UPD4-02")
+conddb.addOverride("/PIXEL/PixMapLong","PixMapLong-RUN2-DATA-UPD1-02")
+conddb.addOverride("/PIXEL/PixMapShort","PixMapShort-RUN2-DATA-UPD1-02")
+
+#conddb.addOverride("/PIXEL/NoiseMapLong","PixNoiseMapLong-DATA-RUN2-000-00")
+#conddb.addOverride("/PIXEL/NoiseMapShort","PixNoiseMapShort-DATA-RUN2-000-00")
+#conddb.addOverride("/PIXEL/PixMapLong","PixMapLong-DATA-RUN2-000-00")
+#conddb.addOverride("/PIXEL/PixMapShort","PixMapShort-DATA-RUN2-000-00")
 globalflags.print_JobProperties()
 
 
@@ -100,15 +101,15 @@ conddb.setGlobalTag('CONDBR2-BLKPA-2014-03') ###########
 
 include("SpecialPixelMapSvc_jobOptions.py")
 
-if not 'doValidate' in dir() :
+if 'doValidate' not in dir() :
   doValidate=False
 
-if doValidate == False :
-#  conddb.addOverride('/PIXEL/PixMapShort','PixMapShort-DATA-RUN2-000-00');
-#  conddb.addOverride('/PIXEL/PixMapLong','PixMapLong-DATA-RUN2-000-00');
+if doValidate is False :
+#  conddb.addOverride('/PIXEL/PixMapShort','PixMapShort-DATA-RUN2-000-00')
+#  conddb.addOverride('/PIXEL/PixMapLong','PixMapLong-DATA-RUN2-000-00')
 
-  conddb.addOverride('/PIXEL/PixMapShort','PixMapShort-RUN2-DATA-UPD1-02');
-  conddb.addOverride('/PIXEL/PixMapLong','PixMapLong-RUN2-DATA-UPD1-02');
+  conddb.addOverride('/PIXEL/PixMapShort','PixMapShort-RUN2-DATA-UPD1-02')
+  conddb.addOverride('/PIXEL/PixMapLong','PixMapLong-RUN2-DATA-UPD1-02')
 else :
 #  conddb.iovdbsvc.Folders += [ "<dbConnection>sqlite://;schema=noisemap.db;dbname=CONDBR2</dbConnection> /PIXEL/NoiseMapShort<tag>PixNoiseMapShort-DATA-RUN2-000-00</tag>" ]
 #  conddb.iovdbsvc.Folders += [ "<dbConnection>sqlite://;schema=noisemap.db;dbname=CONDBR2</dbConnection> /PIXEL/NoiseMapLong<tag>PixNoiseMapLong-DATA-RUN2-000-00</tag>" ]
@@ -166,7 +167,9 @@ if doClusterization :
 
   from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
   topSequence += InDet__PixelClusterization("PixelClusterization")
-  print topSequence.PixelClusterization
+  import logging
+  logger = logging.getLogger( 'PixelCalibAlgs' )
+  logger.info(topSequence.PixelClusterization)
 
 #
 # include pixel monitoring package
@@ -194,7 +197,9 @@ if doClusterization :
 #  PixelMainsMon=PixelMainMon()
 #  ToolSvc += PixelMainsMon
 #  monMan.AthenaMonTools += [ PixelMainsMon ]
-#  print PixelMainsMon
+#  import logging
+#  logger = logging.getLogger( 'PixelCalibAlgs' )
+#  logger.info(PixelMainsMon)
 #
 ### FileKey must match that given to THistSvc
 #  monMan.FileKey = "GLOBAL"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixMapOverlay_Run2_CommandLineArguments.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixMapOverlay_Run2_CommandLineArguments.py
index d3c76137451ea2453de158d9f85cc8470c796a58..465817bc5fb3ee23ed03ca89d2367f448f9da082 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixMapOverlay_Run2_CommandLineArguments.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixMapOverlay_Run2_CommandLineArguments.py
@@ -27,6 +27,9 @@ if "," in tempmaskmodules:
     for i_module in tempmaskmodules.split(","):
         maskmodules.append(int(i_module))
 
+import logging
+logger = logging.getLogger( 'PixelCalibAlgs' )
+
 #reformat the frontends to mask
 #such that they are in the format that 
 #SpecialPixelMapService wants
@@ -35,34 +38,34 @@ maskfrontends = {}
 if "|" in tempmaskfrontends or tempmaskfrontends.count(":")==1:
     for module in tempmaskfrontends.split("|"):
 
-        print "module: ",module
+        logger.info("module: ",module)
 
         moduleID = str(module.split(":")[0].strip())
 
-        print "moduleID: ",moduleID
+        logger.info("moduleID: ",moduleID)
 
         frontend_list = []    
         temp_felist   = module.split(":")[1].replace("[","").replace("]","").strip().split(",")
-        print temp_felist
+        logger.info(temp_felist)
         for fe in temp_felist:
-            print "MaskingFE: ",fe
+            logger.info("MaskingFE: ",fe)
             frontend_list.append(int(fe))
 
         maskfrontends[moduleID] = frontend_list
 
 
-print "============================"
-print "USER CONFIGURABLE ARGUMENTS:"
-print "outfilename  : ",outfilename
-print "database     : ",database
-print "tagname      : ",tagname
-print "run1         : ",run1       
-print "lb1          : ",lb1        
-print "run2         : ",run2       
-print "lb2          : ",lb2       
-print "maskmodules  : ",maskmodules
-print "maskfrontends: ",maskfrontends
-print "============================"
+logger.info("============================")
+logger.info("USER CONFIGURABLE ARGUMENTS:")
+logger.info("outfilename  : ",outfilename)
+logger.info("database     : ",database)
+logger.info("tagname      : ",tagname)
+logger.info("run1         : ",run1       )
+logger.info("lb1          : ",lb1        )
+logger.info("run2         : ",run2       )
+logger.info("lb2          : ",lb2       )
+logger.info("maskmodules  : ",maskmodules)
+logger.info("maskfrontends: ",maskfrontends)
+logger.info("============================")
 
 ##############################################
 #real jobOptions start here
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelBarrelSurvey_jobOptions.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelBarrelSurvey_jobOptions.py
index 959722cda33935051f19004edb2f2a70febff014..15d8030928595e587efe3569e9f433cdf6797065 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelBarrelSurvey_jobOptions.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelBarrelSurvey_jobOptions.py
@@ -46,7 +46,9 @@ MyAlg = PixelBarrelSurvey()
 # MyAlg.OutputFile = "MyOutputFile.txt"
 # MyAlg.DistoFile = "MyDistoFile.txt"
 # MyAlg.COOL_Tag   = "testtag"
-print MyAlg
+import logging
+logger = logging.getLogger( 'PixelCalibAlgs' )
+logger.info(MyAlg)
 
 #top algorithms to be run
 theApp.TopAlg += [ "PixelBarrelSurvey" ]
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelByteStreamErrorsSvc_jobOptions.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelByteStreamErrorsSvc_jobOptions.py
index 9b460e1f87d7609b602bb7ba8a0248122989c1d4..593a489e7b68d6c802e4ae9ce3ad83577e056568 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelByteStreamErrorsSvc_jobOptions.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/PixelByteStreamErrorsSvc_jobOptions.py
@@ -12,7 +12,9 @@ elif ( globalflags.DataSource == 'data' ) :
 if hasattr(ServiceMgr,'PixelByteStreamErrorsSvc'):
     PixelByteStreamErrorsSvc = ServiceMgr.PixelByteStreamErrorsSvc
     theApp.CreateSvc += [ ServiceMgr.PixelByteStreamErrorsSvc.getFullName() ]
-    print PixelByteStreamErrorsSvc
+    import logging
+    logger = logging.getLogger( 'PixelCalibAlgs' )
+    logger.info(PixelByteStreamErrorsSvc)
     # Due to a "feature" in the BS encoder for simulation, the information of the BS error service
     # is not reliable on MC data.
     if ( globalflags.DataSource == 'geant4' ) :
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py b/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py
index a8ee1e72670b705b6a166c50c300cf1c6e2d4b76..df2266da56d2320db4afcd4f58cb7147954f37d8 100644
--- a/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/python/BCM_DigitizationConfigNew.py
@@ -1,14 +1,12 @@
 """Define methods to construct configured BCM Digitization tools and algs
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from RngComps.RandomServices import RNG
-PileUpXingFolder=CompFactory.PileUpXingFolder
 from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-BCM_DigitizationTool, BCM_Digitization=CompFactory.getComps("BCM_DigitizationTool","BCM_Digitization",)
 from Digitization.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
 
@@ -30,6 +28,7 @@ def BCM_RangeCfg(flags, name="BCM_Range", **kwargs):
     # Default 0 no dataproxy reset
     kwargs.setdefault("CacheRefreshFrequency", 1.0)
     kwargs.setdefault("ItemList", ["SiHitCollection#BCMHits"])
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
@@ -61,6 +60,8 @@ def BCM_DigitizationToolCfg(flags, name="BCM_DigitizationTool", **kwargs):
     if flags.Digitization.DoXingByXingPileUp:
         kwargs.setdefault("FirstXing", BCM_FirstXing())
         kwargs.setdefault("LastXing",  BCM_LastXing())
+    
+    BCM_DigitizationTool = CompFactory.BCM_DigitizationTool
     acc.setPrivateTools(BCM_DigitizationTool(name, **kwargs))
     return acc
 
@@ -93,6 +94,7 @@ def BCM_OverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(BCM_DigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
+    BCM_Digitization = CompFactory.BCM_Digitization
     acc.addEventAlgo(BCM_Digitization(**kwargs))
     return acc
 
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
index aa939261cad38cf703092d44325850abc6dae32a..9b7c1e86907cb4f87a6f1bc8690bdc57ddb9e598 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfig.py
@@ -196,30 +196,53 @@ def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs):
         PixelConfigCondAlg.FEI4EndcapHitDiscConfig=[2,2,2]
 
         IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_2016.dat"
-        # ITk:
-        if geoFlags.isSLHC():
-            IdMappingDat = "ITk_Atlas_IdMapping.dat"
-            if "BrlIncl4.0_ref" == commonGeoFlags.GeoType():
-                IdMappingDat = "ITk_Atlas_IdMapping_InclBrl4.dat"
-            elif "IBrlExt4.0ref" == commonGeoFlags.GeoType():
-                IdMappingDat = "ITk_Atlas_IdMapping_IExtBrl4.dat"
-            elif "BrlExt4.0_ref" == commonGeoFlags.GeoType():
-                IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl4.dat"
-            elif "BrlExt3.2_ref" == commonGeoFlags.GeoType():
-                IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl32.dat"
-        elif (geoFlags.isIBL() == False):
-            IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping.dat"
-        else:
-            # Planar IBL
-            if (geoFlags.IBLLayout() == "planar"):
-                if (geoFlags.isDBM() == True):
-                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL_DBM.dat"
+        rodIDForSingleLink40=0
+        from AthenaCommon.GlobalFlags import globalflags
+        if globalflags.DataSource() == 'geant4':
+            # ITk:
+            if geoFlags.isSLHC():
+                IdMappingDat = "ITk_Atlas_IdMapping.dat"
+                if "BrlIncl4.0_ref" == commonGeoFlags.GeoType():
+                    IdMappingDat = "ITk_Atlas_IdMapping_InclBrl4.dat"
+                elif "IBrlExt4.0ref" == commonGeoFlags.GeoType():
+                    IdMappingDat = "ITk_Atlas_IdMapping_IExtBrl4.dat"
+                elif "BrlExt4.0_ref" == commonGeoFlags.GeoType():
+                    IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl4.dat"
+                elif "BrlExt3.2_ref" == commonGeoFlags.GeoType():
+                    IdMappingDat = "ITk_Atlas_IdMapping_ExtBrl32.dat"
+            elif (geoFlags.isIBL() == False):
+                IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping.dat"
+            else:
+                # Planar IBL
+                if (geoFlags.IBLLayout() == "planar"):
+                    if (geoFlags.isDBM() == True):
+                        IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL_DBM.dat"
+                    else:
+                        IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL.dat"
+                # Hybrid IBL plus DBM
+                elif (geoFlags.IBLLayout() == "3D"):
+                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_Run2.dat"
+        elif globalflags.DataSource == 'data':  # for data overlay
+            from RecExConfig.AutoConfiguration import GetRunNumber
+            runNum = GetRunNumber()
+            if (runNum<222222):
+                IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_May08.dat"
+                rodIDForSingleLink40=1300000
+            else:
+                PixelConfigCondAlg.UseCablingConditions = True
+                rodIDForSingleLink40=1300000
+                # Even though we are reading from COOL, set the correct fallback map.
+                if (runNum >= 344494):
+                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_344494.dat"
+                elif (runNum >= 314940 and runNum < 344494):
+                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_314940.dat"
+                elif (runNum >= 289350 and runNum < 314940): # 2016
+                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_2016.dat"
+                elif (runNum >= 222222 and runNum < 289350): # 2015
+                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_Run2.dat"
                 else:
-                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_inclIBL.dat"
-            # Hybrid IBL plus DBM
-            elif (geoFlags.IBLLayout() == "3D"):
-                IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_Run2.dat"
-        
+                    IdMappingDat="PixelCabling/Pixels_Atlas_IdMapping_May08.dat"
+
         PixelConfigCondAlg.CablingMapFileName=IdMappingDat
 
         condSeq += PixelConfigCondAlg(name="PixelConfigCondAlg")
@@ -274,11 +297,15 @@ def BasicPixelDigitizationTool(name="PixelDigitizationTool", **kwargs):
         from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelReadoutSpeedAlg
         condSeq += PixelReadoutSpeedAlg(name="PixelReadoutSpeedAlg")
 
+    if (globalflags.DataSource=='data' and conddb.dbdata == 'CONDBR2'):  # for data overlay
+        if not conddb.folderRequested("/PIXEL/CablingMap"):
+            conddb.addFolderSplitOnline("PIXEL", "/PIXEL/Onl/CablingMap","/PIXEL/CablingMap", className="AthenaAttributeList")
+
     if not hasattr(condSeq, 'PixelCablingCondAlg'):
         from PixelConditionsAlgorithms.PixelConditionsAlgorithmsConf import PixelCablingCondAlg
         condSeq += PixelCablingCondAlg(name="PixelCablingCondAlg",
                                        MappingFile=IdMappingDat,
-                                       RodIDForSingleLink40=0)
+                                       RodIDForSingleLink40=rodIDForSingleLink40)
 
     if not conddb.folderRequested("/PIXEL/PixReco"):
         conddb.addFolder("PIXEL_OFL", "/PIXEL/PixReco", className="DetCondCFloat")
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py
index 173f5c8fc61e9540afd08940b7acb2cca4edec73..945f1a4f20f67a7ad93b99f98a36757ccf7979cf 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py
+++ b/InnerDetector/InDetDigitization/PixelDigitization/python/PixelDigitizationConfigNew.py
@@ -4,14 +4,7 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
-PileUpXingFolder=CompFactory.PileUpXingFolder
 from PixelCabling.PixelCablingConfigNew import PixelCablingSvcCfg
-from PixelDigitization.PixelDigitizationConf import (
-    PixelDigitizationTool, PixelDigitization,
-    EnergyDepositionTool, SensorSimPlanarTool, SensorSim3DTool,
-    RD53SimTool, FEI4SimTool, FEI3SimTool,
-    RadDamageUtil, EfieldInterpolator
-)
 from PixelConditionsAlgorithms.PixelConditionsConfig import (
     PixelCablingCondAlgCfg, PixelChargeCalibCondAlgCfg, PixelConfigCondAlgCfg, 
     PixelDCSCondHVAlgCfg, PixelDCSCondStateAlgCfg, PixelDCSCondStatusAlgCfg, 
@@ -56,6 +49,7 @@ def RadDamageUtilCfg(flags, name="RadDamageUtil", **kwargs):
     kwargs.setdefault("betaElectrons", 4.5e-16)
     kwargs.setdefault("betaHoles", 6.0e-16)
     kwargs.setdefault("saveDebugMaps", False)
+    RadDamageUtil = CompFactory.RadDamageUtil
     return RadDamageUtil(name, **kwargs)
 
 
@@ -64,6 +58,7 @@ def EfieldInterpolatorCfg(flags, name="EfieldInterpolator", **kwargs):
     kwargs.setdefault("initialized", False)
     kwargs.setdefault("useSpline", True)
     kwargs.setdefault("sensorDepth", 200)
+    EfieldInterpolator = CompFactory.EfieldInterpolator
     return EfieldInterpolator(name, **kwargs)
 
 
@@ -76,6 +71,7 @@ def EnergyDepositionToolCfg(flags, name="EnergyDepositionTool", **kwargs):
     kwargs.setdefault("doBichselBetaGammaCut", 0.7) # dEdx not quite consistent below this
     kwargs.setdefault("doDeltaRay", False)          # needs validation
     kwargs.setdefault("doPU", True)
+    EnergyDepositionTool = CompFactory.EnergyDepositionTool
     return EnergyDepositionTool(name, **kwargs)
 
 
@@ -86,6 +82,7 @@ def SensorSimPlanarToolCfg(flags, name="SensorSimPlanarTool", **kwargs):
     LorentzTool = acc.popToolsAndMerge(PixelLorentzAngleCfg(flags))
     kwargs.setdefault("SiPropertiesTool", SiTool)
     kwargs.setdefault("LorentzAngleTool", LorentzTool)
+    SensorSimPlanarTool = CompFactory.SensorSimPlanarTool
     acc.setPrivateTools(SensorSimPlanarTool(name, **kwargs))
     return acc
 
@@ -96,6 +93,7 @@ def SensorSim3DToolCfg(flags, name="SensorSim3DTool", **kwargs):
     SiTool = acc.popPrivateTools()
     acc.popToolsAndMerge(PixelLorentzAngleCfg(flags))
     kwargs.setdefault("SiPropertiesTool", SiTool)
+    SensorSim3DTool = CompFactory.SensorSim3DTool
     acc.setPrivateTools(SensorSim3DTool(name, **kwargs))
     return acc
 
@@ -103,36 +101,46 @@ def SensorSim3DToolCfg(flags, name="SensorSim3DTool", **kwargs):
 def BarrelRD53SimToolCfg(flags, name="BarrelRD53SimTool", **kwargs):
     """Return a RD53SimTool configured for Barrel"""
     kwargs.setdefault("BarrelEC", 0)
+    kwargs.setdefault("DoNoise", flags.Digitization.DoInnerDetectorNoise)
+    RD53SimTool = CompFactory.RD53SimTool
     return RD53SimTool(name, **kwargs)
 
 
 def EndcapRD53SimToolCfg(flags, name="EndcapRD53SimTool", **kwargs):
     """Return a RD53SimTool configured for Endcap"""
     kwargs.setdefault("BarrelEC", 2)
+    kwargs.setdefault("DoNoise", flags.Digitization.DoInnerDetectorNoise)
+    RD53SimTool = CompFactory.RD53SimTool
     return RD53SimTool(name, **kwargs)
 
 
 def BarrelFEI4SimToolCfg(flags, name="BarrelFEI4SimTool", **kwargs):
     """Return a FEI4SimTool configured for Barrel"""
     kwargs.setdefault("BarrelEC", 0)
+    kwargs.setdefault("DoNoise", flags.Digitization.DoInnerDetectorNoise)
+    FEI4SimTool = CompFactory.FEI4SimTool
     return FEI4SimTool(name, **kwargs)
 
 
 def DBMFEI4SimToolCfg(flags, name="DBMFEI4SimTool", **kwargs):
     """Return a FEI4SimTool configured for Endcap"""
     kwargs.setdefault("BarrelEC", 4)
+    kwargs.setdefault("DoNoise", flags.Digitization.DoInnerDetectorNoise)
+    FEI4SimTool = CompFactory.FEI4SimTool
     return FEI4SimTool(name, **kwargs)
 
 
 def BarrelFEI3SimToolCfg(flags, name="BarrelFEI3SimTool", **kwargs):
     """Return a FEI3SimTool configured for Barrel"""
     kwargs.setdefault("BarrelEC", 0)
+    FEI3SimTool = CompFactory.FEI3SimTool
     return FEI3SimTool(name, **kwargs)
 
 
 def EndcapFEI3SimToolCfg(flags, name="EndcapFEI3SimTool", **kwargs):
     """Return a FEI3SimTool configured for Endcap"""
     kwargs.setdefault("BarrelEC", 2)
+    FEI3SimTool = CompFactory.FEI3SimTool
     return FEI3SimTool(name, **kwargs)
 
 
@@ -192,6 +200,8 @@ def PixelDigitizationBasicToolCfg(flags, name="PixelDigitizationBasicTool", **kw
     if flags.Digitization.DoXingByXingPileUp:
         kwargs.setdefault("FirstXing", Pixel_FirstXing(flags))
         kwargs.setdefault("LastXing", Pixel_LastXing(flags))
+
+    PixelDigitizationTool = CompFactory.PixelDigitizationTool
     acc.setPrivateTools(PixelDigitizationTool(name, **kwargs))
     return acc
 
@@ -205,6 +215,7 @@ def PixelDigitizationToolCfg(flags, name="PixelDigitizationTool", **kwargs):
 def PixelGeantinoTruthDigitizationToolCfg(flags, name="PixelGeantinoTruthDigitizationTool", **kwargs):
     """Return configured PixelDigitizationTool"""
     kwargs.setdefault("ParticleBarcodeVeto", 0)
+    PixelDigitizationTool = CompFactory.PixelDigitizationTool
     return PixelDigitizationTool(name, **kwargs)
 
 
@@ -234,8 +245,8 @@ def PixelDigitizationSplitNoMergePUToolCfg(flags, name="PixelDigitizationSplitNo
 def PixelOverlayDigitizationToolCfg(flags, name="PixelOverlayDigitizationTool", **kwargs):
     """Return ComponentAccumulator with PixelDigitizationTool configured for overlay"""
     kwargs.setdefault("OnlyUseContainerName", False)
-    kwargs.setdefault("RDOCollName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "PixelRDOs")
-    kwargs.setdefault("SDOCollName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "PixelSDO_Map")
+    kwargs.setdefault("RDOCollName", flags.Overlay.SigPrefix + "PixelRDOs")
+    kwargs.setdefault("SDOCollName", flags.Overlay.SigPrefix + "PixelSDO_Map")
     kwargs.setdefault("HardScatterSplittingMode", 0)
     return PixelDigitizationBasicToolCfg(flags, name, **kwargs)
 
@@ -246,6 +257,7 @@ def PixelRangeCfg(flags, name="PixelRange", **kwargs):
     kwargs.setdefault("LastXing", Pixel_LastXing(flags))
     kwargs.setdefault("CacheRefreshFrequency", 1.0) # default 0 no dataproxy reset
     kwargs.setdefault("ItemList", ["SiHitCollection#PixelHits"])
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
@@ -276,7 +288,12 @@ def PixelOverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(PixelOverlayDigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
-    acc.addEventAlgo(PixelDigitization(**kwargs))
+
+    if flags.Concurrency.NumThreads > 0:
+        kwargs.setdefault("Cardinality", flags.Concurrency.NumThreads)
+
+    PixelDigitization = CompFactory.PixelDigitization
+    acc.addEventAlgo(PixelDigitization(name="PixelOverlayDigitization", **kwargs))
     return acc
 
 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py
index 9fca89128a01d8b699d669a36c46df925711ee99..8a5b7fe474481ef5796054b766fed02e36add527 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/python/SCT_DigitizationConfigNew.py
@@ -1,21 +1,11 @@
 """Define methods to construct configured SCT Digitization tools and algorithms
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaCommon.Logging import logging
-from SCT_Digitization.SCT_DigitizationConf import (
-    SCT_RandomDisabledCellGenerator,
-    SCT_Amp,
-    SCT_SurfaceChargesGenerator,
-    SCT_FrontEnd,
-    SCT_DigitizationTool,
-    SCT_Digitization,
-)
-PileUpXingFolder=CompFactory.PileUpXingFolder
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-SCT_RadDamageSummaryTool=CompFactory.SCT_RadDamageSummaryTool
 from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
 from SCT_ConditionsTools.SCT_DCSConditionsConfig import SCT_DCSConditionsCfg
 from SCT_ConditionsTools.SCT_SiliconConditionsConfig import SCT_SiliconConditionsToolCfg, SCT_SiliconConditionsCfg
@@ -51,6 +41,8 @@ def SCT_DigitizationCommonCfg(flags, name="SCT_DigitizationToolCommon", **kwargs
     if flags.Digitization.DoXingByXingPileUp:
         kwargs.setdefault("FirstXing", SCT_FirstXing())
         kwargs.setdefault("LastXing", SCT_LastXing() )
+    
+    SCT_DigitizationTool = CompFactory.SCT_DigitizationTool
     tool = SCT_DigitizationTool(name, **kwargs)
     # attach ToolHandles
     tool.FrontEnd = acc.popToolsAndMerge(SCT_FrontEndCfg(flags))
@@ -120,6 +112,7 @@ def SCT_DigitizationToolGeantinoTruthCfg(flags, name="SCT_GeantinoTruthDigitizat
 def SCT_RandomDisabledCellGeneratorCfg(flags, name="SCT_RandomDisabledCellGenerator", **kwargs):
     """Return configured random cell disabling tool"""
     kwargs.setdefault("TotalBadChannels", 0.01)
+    SCT_RandomDisabledCellGenerator = CompFactory.SCT_RandomDisabledCellGenerator
     return SCT_RandomDisabledCellGenerator(name, **kwargs)
 
 
@@ -131,6 +124,7 @@ def SCT_AmpCfg(flags, name="SCT_Amp", **kwargs):
     kwargs.setdefault("deltaT", 1.0)
     kwargs.setdefault("Tmin", -25.0)
     kwargs.setdefault("Tmax", 150.0)
+    SCT_Amp = CompFactory.SCT_Amp
     return SCT_Amp(name, **kwargs)
 
 
@@ -147,6 +141,7 @@ def SCT_SurfaceChargesGeneratorCfg(flags, name="SCT_SurfaceChargesGenerator", **
     kwargs.setdefault("isOverlay", flags.Detector.Overlay)
     # kwargs.setdefault("doTrapping", True) # ATL-INDET-INT-2016-019
     # experimental SCT_DetailedSurfaceChargesGenerator config dropped here
+    SCT_SurfaceChargesGenerator, SCT_RadDamageSummaryTool = CompFactory.getComps("SCT_SurfaceChargesGenerator", "SCT_RadDamageSummaryTool",)
     tool = SCT_SurfaceChargesGenerator(name, **kwargs)
     tool.RadDamageSummaryTool = SCT_RadDamageSummaryTool()
     DCSCondTool = acc.popToolsAndMerge(SCT_DCSConditionsCfg(flags))
@@ -209,6 +204,7 @@ def SCT_FrontEndCfg(flags, name="SCT_FrontEnd", **kwargs):
         kwargs.setdefault("DataReadOutMode", 0)
     else:
         kwargs.setdefault("DataReadOutMode", 1)
+    SCT_FrontEnd = CompFactory.SCT_FrontEnd
     acc.setPrivateTools(SCT_FrontEnd(name, **kwargs))
     return acc
 
@@ -236,6 +232,7 @@ def SCT_RangeCfg(flags, name="SiliconRange", **kwargs):
     kwargs.setdefault("LastXing", SCT_LastXing())
     kwargs.setdefault("CacheRefreshFrequency", 1.0) # default 0 no dataproxy reset
     kwargs.setdefault("ItemList", ["SiHitCollection#SCT_Hits"] )
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
@@ -270,6 +267,7 @@ def SCT_OverlayDigitizationBasicCfg(flags, **kwargs):
     if flags.Concurrency.NumThreads > 0:
         kwargs.setdefault('Cardinality', flags.Concurrency.NumThreads)
 
+    SCT_Digitization = CompFactory.SCT_Digitization
     acc.addEventAlgo(SCT_Digitization(name="SCT_OverlayDigitization", **kwargs))
     return acc
 
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py b/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py
index ec503c3d4d815fc2aaa7d6a3ec73bc31a01f9bef..7bc0e54b04db8e48749f927d3352f68e01d89239 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/python/TRT_DigitizationConfigNew.py
@@ -1,17 +1,14 @@
 """Define methods to construct configured TRT Digitization tools and algorithms
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
-TRTDigitizationTool, TRTDigitization=CompFactory.getComps("TRTDigitizationTool","TRTDigitization",)
 from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
 from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
 from TRT_PAI_Process.TRT_PAI_ProcessConfigNew import TRT_PAI_Process_XeToolCfg
 from TRT_PAI_Process.TRT_PAI_ProcessConfigNew import TRT_PAI_Process_ArToolCfg
 from TRT_PAI_Process.TRT_PAI_ProcessConfigNew import TRT_PAI_Process_KrToolCfg
-PileUpXingFolder=CompFactory.PileUpXingFolder
-PartPropSvc=CompFactory.PartPropSvc
 from IOVDbSvc.IOVDbSvcConfig import addFolders
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
@@ -34,6 +31,7 @@ def TRT_RangeCfg(flags, name="TRTRange", **kwargs):
     kwargs.setdefault("LastXing", TRT_LastXing())
     kwargs.setdefault("CacheRefreshFrequency", 1.0) #default 0 no dataproxy reset
     kwargs.setdefault("ItemList", ["TRTUncompressedHitCollection#TRTUncompressedHits"])
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
@@ -41,9 +39,10 @@ def TRT_DigitizationBasicToolCfg(flags, name="TRT_DigitizationBasicTool", **kwar
     """Return ComponentAccumulator with common TRT digitization tool config"""
     acc = TRT_GeometryCfg(flags)
     acc.merge(MagneticFieldSvcCfg(flags))
+    PartPropSvc = CompFactory.PartPropSvc
     acc.addService(PartPropSvc(InputFile="PDGTABLE.MeV"))
     if flags.Detector.Overlay and not flags.Input.isMC:
-        acc.merge(addFolders(flags, "/TRT/Cond/DigVers", "TRT_OFL", className="CondAttrListCollection"))
+        acc.merge(addFolders(flags, "/TRT/Cond/DigVers", "TRT_OFL", tag="TRTCondDigVers-Collisions-01", db="OFLP200"))
     # default arguments
     kwargs.setdefault("PAI_Tool_Ar", TRT_PAI_Process_ArToolCfg(flags))
     kwargs.setdefault("PAI_Tool_Kr", TRT_PAI_Process_KrToolCfg(flags))
@@ -61,6 +60,7 @@ def TRT_DigitizationBasicToolCfg(flags, name="TRT_DigitizationBasicTool", **kwar
     if flags.Digitization.DoXingByXingPileUp:
         kwargs.setdefault("FirstXing", TRT_FirstXing())
         kwargs.setdefault("LastXing", TRT_LastXing())
+    TRTDigitizationTool = CompFactory.TRTDigitizationTool
     tool = TRTDigitizationTool(name, **kwargs)
     acc.setPrivateTools(tool)
     return acc
@@ -114,8 +114,8 @@ def TRT_OverlayDigitizationToolCfg(flags, name="TRT_OverlayDigitizationTool", **
     """Return ComponentAccumulator with configured Overlay TRT digitization tool"""
     acc = ComponentAccumulator()
     kwargs.setdefault("OnlyUseContainerName", False)
-    kwargs.setdefault("OutputObjectName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "TRT_RDOs")
-    kwargs.setdefault("OutputSDOName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "TRT_SDO_Map")
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "TRT_RDOs")
+    kwargs.setdefault("OutputSDOName", flags.Overlay.SigPrefix + "TRT_SDO_Map")
     kwargs.setdefault("HardScatterSplittingMode", 0)
     kwargs.setdefault("Override_getT0FromData", 0)
     kwargs.setdefault("Override_noiseInSimhits", 0)
@@ -153,7 +153,12 @@ def TRT_OverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(TRT_OverlayDigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
-    acc.addEventAlgo(TRTDigitization(**kwargs))
+
+    if flags.Concurrency.NumThreads > 0:
+        kwargs.setdefault("Cardinality", flags.Concurrency.NumThreads)
+
+    TRTDigitization = CompFactory.TRTDigitization
+    acc.addEventAlgo(TRTDigitization(name="TRT_OverlayDigitization", **kwargs))
     return acc
 
 
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/PixelOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/PixelOverlayConfig.py
index 4bb8034a4587f375fa1542726f0ce3fff55e75b1..25e314a5391bc38937ac82b9779740d1424034bf 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/PixelOverlayConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/PixelOverlayConfig.py
@@ -7,7 +7,31 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
 
-def PixelOverlayAlgCfg(flags, name = "PixelOverlay", **kwargs):
+def PixelRawDataProviderAlgCfg(flags, name="PixelRawDataProvider", **kwargs):
+    """Return a ComponentAccumulator for pixel raw data provider"""
+    # Temporary until available in the central location
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("RDOKey", flags.Overlay.BkgPrefix + "PixelRDOs")
+
+    PixelRawDataProvider = CompFactory.PixelRawDataProvider
+    alg = PixelRawDataProvider(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    return acc
+
+
+def PixelDataOverlayExtraCfg(flags, **kwargs):
+    """Return a ComponentAccumulator with pixel data overlay specifics"""
+    acc = ComponentAccumulator()
+
+    # We need to convert BS to RDO for data overlay
+    acc.merge(PixelRawDataProviderAlgCfg(flags))
+
+    return acc
+
+
+def PixelOverlayAlgCfg(flags, name="PixelOverlay", **kwargs):
     """Return a ComponentAccumulator for PixelOverlay algorithm"""
     acc = ComponentAccumulator()
 
@@ -16,37 +40,38 @@ def PixelOverlayAlgCfg(flags, name = "PixelOverlay", **kwargs):
     kwargs.setdefault("OutputKey", "PixelRDOs")
 
     # Do Pixel overlay
-    PixelOverlay=CompFactory.PixelOverlay
+    PixelOverlay = CompFactory.PixelOverlay
     alg = PixelOverlay(name, **kwargs)
     acc.addEventAlgo(alg)
 
     # Setup output
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-    acc.merge(OutputStreamCfg(flags, "RDO", ItemList = [
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
         "PixelRDO_Container#PixelRDOs"
     ]))
 
     return acc
 
 
-def PixelTruthOverlayCfg(flags, name = "PixelSDOOverlay", **kwargs):
+def PixelTruthOverlayCfg(flags, name="PixelSDOOverlay", **kwargs):
     """Return a ComponentAccumulator for the Pixel SDO overlay algorithm"""
     acc = ComponentAccumulator()
 
     # We do not need background Pixel SDOs
     kwargs.setdefault("BkgInputKey", "")
 
-    kwargs.setdefault("SignalInputKey", flags.Overlay.BkgPrefix + "PixelSDO_Map")
+    kwargs.setdefault("SignalInputKey",
+                      flags.Overlay.SigPrefix + "PixelSDO_Map")
     kwargs.setdefault("OutputKey", "PixelSDO_Map")
 
     # Do Pixel truth overlay
-    InDetSDOOverlay=CompFactory.InDetSDOOverlay
+    InDetSDOOverlay = CompFactory.InDetSDOOverlay
     alg = InDetSDOOverlay(name, **kwargs)
     acc.addEventAlgo(alg)
 
     # Setup output
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-    acc.merge(OutputStreamCfg(flags, "RDO", ItemList = [
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
         "InDetSimDataCollection#PixelSDO_Map"
     ]))
 
@@ -57,9 +82,13 @@ def PixelOverlayCfg(flags):
     """Configure and return a ComponentAccumulator for Pixel overlay"""
     acc = ComponentAccumulator()
 
+    # Add data overlay specifics
+    if flags.Overlay.DataOverlay:
+        acc.merge(PixelDataOverlayExtraCfg(flags))
+
     # Add Pixel overlay digitization algorithm
-    from PixelDigitization.PixelDigitizationConfigNew import PixelOverlayDigitizationCfg
-    acc.merge(PixelOverlayDigitizationCfg(flags))
+    from PixelDigitization.PixelDigitizationConfigNew import PixelOverlayDigitizationBasicCfg
+    acc.merge(PixelOverlayDigitizationBasicCfg(flags))
     # Add Pixel overlay algorithm
     acc.merge(PixelOverlayAlgCfg(flags))
     # Add Pixel truth overlay
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/SCTOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/SCTOverlayConfig.py
index abcafb562a09605b77aeb2c218c77fef00f81e31..01f497e7a36a8f19df6161d312ae093d114c9705 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/SCTOverlayConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/SCTOverlayConfig.py
@@ -7,6 +7,28 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
 
+def SCT_ConfigurationConditionsCfg(flags, **kwargs):
+    """Return a ComponentAccumulator for SCT configuration conditions"""
+    # Temporary until available in the central location
+    from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
+    acc = SCT_GeometryCfg(flags)
+
+    SCT_ConfigurationConditionsTool = CompFactory.SCT_ConfigurationConditionsTool
+    acc.addPublicTool(SCT_ConfigurationConditionsTool())
+
+    channelFolder = "/SCT/DAQ/Config/Chip"
+    moduleFolder = "/SCT/DAQ/Config/Module"
+    murFolder = "/SCT/DAQ/Config/MUR"
+    from IOVDbSvc.IOVDbSvcConfig import addFolders
+    acc.merge(addFolders(flags, [channelFolder, moduleFolder, murFolder],
+                         "SCT", className="CondAttrListVec"))
+    SCT_ConfigurationCondAlg = CompFactory.SCT_ConfigurationCondAlg
+    acc.addCondAlgo(SCT_ConfigurationCondAlg(ReadKeyChannel=channelFolder,
+                                             ReadKeyModule=moduleFolder,
+                                             ReadKeyMur=murFolder))
+    return acc
+
+
 def SCTRawDataProviderAlgCfg(flags, name="SCTRawDataProvider", **kwargs):
     """Return a ComponentAccumulator for SCT raw data provider"""
     # Temporary until available in the central location
@@ -20,24 +42,16 @@ def SCTRawDataProviderAlgCfg(flags, name="SCTRawDataProvider", **kwargs):
     alg = SCTRawDataProvider(name, **kwargs)
     acc.addEventAlgo(alg)
 
-    # load the SCTEventFlagWriter
-    SCT_ConfigurationConditionsTool = CompFactory.SCT_ConfigurationConditionsTool
-    acc.addPublicTool(SCT_ConfigurationConditionsTool())
+    return acc
 
-    channelFolder = "/SCT/DAQ/Config/Chip"
-    moduleFolder = "/SCT/DAQ/Config/Module"
-    murFolder = "/SCT/DAQ/Config/MUR"
-    SCT_ConfigurationCondAlg = CompFactory.SCT_ConfigurationCondAlg
-    acc.addCondAlgo(SCT_ConfigurationCondAlg(ReadKeyChannel = channelFolder,
-                                             ReadKeyModule = moduleFolder,
-                                             ReadKeyMur = murFolder))
-    from IOVDbSvc.IOVDbSvcConfig import addFolders
-    acc.merge(addFolders(flags, [channelFolder, moduleFolder, murFolder], "SCT", className="CondAttrListVec"))
 
+def SCTEventFlagWriterCfg(flags, **kwargs):
+    """Return a ComponentAccumulator for SCT event flag writer"""
+    # Temporary until available in the central location
+    acc = ComponentAccumulator()
     SCTEventFlagWriter = CompFactory.SCTEventFlagWriter
     alg = SCTEventFlagWriter()
     acc.addEventAlgo(alg)
-
     return acc
 
 
@@ -45,13 +59,19 @@ def SCTDataOverlayExtraCfg(flags, **kwargs):
     """Return a ComponentAccumulator with SCT data overlay specifics"""
     acc = ComponentAccumulator()
 
-    # We need to convert BS to RDO for data overlay
-    acc.merge(SCTRawDataProviderAlgCfg(flags))
-
     # Add SCT cabling conditions
     from SCT_Cabling.SCT_CablingConfig import SCT_CablingCondAlgCfg
     acc.merge(SCT_CablingCondAlgCfg(flags))
 
+    # Add SCT configuration conditions
+    acc.merge(SCT_ConfigurationConditionsCfg(flags))
+
+    # We need to convert BS to RDO for data overlay
+    acc.merge(SCTRawDataProviderAlgCfg(flags))
+
+    # Add SCT event flag writer
+    acc.merge(SCTEventFlagWriterCfg(flags))
+
     return acc
 
 
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRTOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRTOverlayConfig.py
index 2440b7c0e8049127eb35021b0ab8ba2be4b138a6..79ac6acb2d3d8f5a40b7da970504aa3c08a29012 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRTOverlayConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRTOverlayConfig.py
@@ -6,16 +6,53 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
-def TRTOverlayAlgCfg(flags, name = "TRTOverlay", **kwargs):
+
+def TRTRawDataProviderAlgCfg(flags, name="TRTRawDataProvider", **kwargs):
+    """Return a ComponentAccumulator for TRT raw data provider"""
+    # Temporary until available in the central location
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("RDOKey", flags.Overlay.BkgPrefix + "TRT_RDOs")
+
+    TRTRawDataProvider = CompFactory.TRTRawDataProvider
+    alg = TRTRawDataProvider(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    ByteStreamAddressProviderSvc = CompFactory.ByteStreamAddressProviderSvc
+    bsAddressProviderSvc = ByteStreamAddressProviderSvc(TypeNames=[
+        "InDet::TRT_DriftCircleContainer/TRT_DriftCircle",
+    ])
+    acc.addService(bsAddressProviderSvc)
+
+    return acc
+
+
+def TRTDataOverlayExtraCfg(flags, **kwargs):
+    """Return a ComponentAccumulator with TRT data overlay specifics"""
+    acc = ComponentAccumulator()
+
+    # We need to convert BS to RDO for data overlay
+    acc.merge(TRTRawDataProviderAlgCfg(flags))
+
+    # Add additional conditions infrastructure
+    from InDetOverlay.TRT_ConditionsConfig import TRT_CablingSvcCfg, TRT_OnlineFoldersCfg
+    acc.merge(TRT_CablingSvcCfg(flags))
+    acc.merge(TRT_OnlineFoldersCfg(flags))
+
+    return acc
+
+
+def TRTOverlayAlgCfg(flags, name="TRTOverlay", **kwargs):
     """Return a ComponentAccumulator for TRTOverlay algorithm"""
     acc = ComponentAccumulator()
     from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
-    acc.merge(TRT_GeometryCfg( flags ))
+    acc.merge(TRT_GeometryCfg(flags))
     from InDetOverlay.TRT_ConditionsConfig import TRTStrawCondAlgCfg
     acc.merge(TRTStrawCondAlgCfg(flags))
 
     kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "TRT_RDOs")
     kwargs.setdefault("SignalInputKey", flags.Overlay.SigPrefix + "TRT_RDOs")
+    kwargs.setdefault("SignalInputSDOKey", flags.Overlay.SigPrefix + "TRT_SDO_Map")
     kwargs.setdefault("OutputKey", "TRT_RDOs")
 
     # HT hit correction fraction
@@ -25,41 +62,47 @@ def TRTOverlayAlgCfg(flags, name = "TRTOverlay", **kwargs):
     kwargs.setdefault("TRT_HT_OccupancyCorrectionEndcapNoE", 0.050)
 
     # Do TRT overlay
-    TRTOverlay=CompFactory.TRTOverlay
+    TRTOverlay = CompFactory.TRTOverlay
     alg = TRTOverlay(name, **kwargs)
 
     from InDetOverlay.TRT_ConditionsConfig import TRT_LocalOccupancyCfg, TRT_StrawStatusSummaryToolCfg
-    alg.TRT_LocalOccupancyTool = acc.popToolsAndMerge(TRT_LocalOccupancyCfg(flags))
-    alg.TRTStrawSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
+    alg.TRT_LocalOccupancyTool = acc.popToolsAndMerge(
+        TRT_LocalOccupancyCfg(flags))
+    alg.TRTStrawSummaryTool = acc.popToolsAndMerge(
+        TRT_StrawStatusSummaryToolCfg(flags))
     acc.addEventAlgo(alg)
 
     # Setup output
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-    acc.merge(OutputStreamCfg(flags, "RDO", ItemList = [
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
         "TRT_RDO_Container#TRT_RDOs"
     ]))
 
     return acc
 
 
-def TRTTruthOverlayCfg(flags, name = "TRTSDOOverlay", **kwargs):
+def TRTTruthOverlayCfg(flags, name="TRTSDOOverlay", **kwargs):
     """Return a ComponentAccumulator for the TRT SDO overlay algorithm"""
     acc = ComponentAccumulator()
 
-    # We do not need background TRT SDOs
-    kwargs.setdefault("BkgInputKey", "")
+    # We do not need background TRT SDOs for data overlay
+    if flags.Overlay.DataOverlay:
+        kwargs.setdefault("BkgInputKey", "")
+    else:
+        kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "TRT_SDO_Map")
 
-    kwargs.setdefault("SignalInputKey", flags.Overlay.BkgPrefix + "TRT_SDO_Map")
+    kwargs.setdefault("SignalInputKey",
+                      flags.Overlay.SigPrefix + "TRT_SDO_Map")
     kwargs.setdefault("OutputKey", "TRT_SDO_Map")
 
     # Do TRT truth overlay
-    InDetSDOOverlay=CompFactory.InDetSDOOverlay
+    InDetSDOOverlay = CompFactory.InDetSDOOverlay
     alg = InDetSDOOverlay(name, **kwargs)
     acc.addEventAlgo(alg)
 
     # Setup output
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-    acc.merge(OutputStreamCfg(flags, "RDO", ItemList = [
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
         "InDetSimDataCollection#TRT_SDO_Map"
     ]))
 
@@ -70,9 +113,13 @@ def TRTOverlayCfg(flags):
     """Configure and return a ComponentAccumulator for TRT overlay"""
     acc = ComponentAccumulator()
 
+    # Add data overlay specifics
+    if flags.Overlay.DataOverlay:
+        acc.merge(TRTDataOverlayExtraCfg(flags))
+
     # Add TRT overlay digitization algorithm
-    from TRT_Digitization.TRT_DigitizationConfigNew import TRT_OverlayDigitizationCfg
-    acc.merge(TRT_OverlayDigitizationCfg(flags))
+    from TRT_Digitization.TRT_DigitizationConfigNew import TRT_OverlayDigitizationBasicCfg
+    acc.merge(TRT_OverlayDigitizationBasicCfg(flags))
     # Add TRT overlay algorithm
     acc.merge(TRTOverlayAlgCfg(flags))
     # Add TRT truth overlay
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRT_ConditionsConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRT_ConditionsConfig.py
index ed124dfb894bfa883b16c5b7d2a2dce1665dc8aa..b0e6d7bde59d45a01a9a1af055f896af7f8d5c07 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRT_ConditionsConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/TRT_ConditionsConfig.py
@@ -1,52 +1,89 @@
 """Define methods to construct configured TRT conditions tools and
 algorithms needed by TRT Overlay - FIXME should move somewhere else
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
-def TRT_CalDbToolCfg(flags, name = "TRT_CalDbTool"):
+
+def TRT_OnlineFoldersCfg(flags):
+    """Setup online conditions folders for TRT data overlay"""
+    from IOVDbSvc.IOVDbSvcConfig import addFolders
+    acc = ComponentAccumulator()
+    acc.merge(addFolders(flags, "/TRT/Onl/ROD/Compress",
+                         "TRT_ONL", className='CondAttrListCollection'))
+    return acc
+
+
+def TRT_CalDbToolCfg(flags, name="TRT_CalDbTool"):
     """Return a ComponentAccumulator for TRT_CalDbTool"""
     from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
-    acc = addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Calib/T0","/TRT/Calib/T0",className='TRTCond::StrawT0MultChanContainer')
-    TRT_CalDbTool=CompFactory.TRT_CalDbTool
-    acc.setPrivateTools(TRT_CalDbTool(name = "TRT_CalDbTool"))
+    acc = ComponentAccumulator()
+    acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/RT", "/TRT/Calib/RT",
+                                    className="TRTCond::RtRelationMultChanContainer"))
+    acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/T0", "/TRT/Calib/T0",
+                                    className='TRTCond::StrawT0MultChanContainer'))
+    acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/errors2d", "/TRT/Calib/errors2d",
+                                    className="TRTCond::RtRelationMultChanContainer"))
+    acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/slopes", "/TRT/Calib/slopes",
+                                    className='TRTCond::RtRelationMultChanContainer'))
+
+    TRT_CalDbTool = CompFactory.TRT_CalDbTool
+    acc.setPrivateTools(TRT_CalDbTool(name="TRT_CalDbTool"))
     return acc
 
 
-def TRT_StrawStatusSummaryToolCfg(flags, name = "TRT_StrawStatusSummaryTool"):
+def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool"):
     """Return a ComponentAccumulator for TRT_StrawStatusSummaryTool"""
     acc = ComponentAccumulator()
-    TRT_StrawStatusSummaryTool=CompFactory.TRT_StrawStatusSummaryTool
-    acc.setPrivateTools(TRT_StrawStatusSummaryTool(name = "TRT_StrawStatusSummaryTool",
-                                                   isGEANT4 = flags.Detector.Simulate))
+    TRT_StrawStatusSummaryTool = CompFactory.TRT_StrawStatusSummaryTool
+    acc.setPrivateTools(TRT_StrawStatusSummaryTool(name="TRT_StrawStatusSummaryTool",
+                                                   isGEANT4=flags.Detector.Simulate))
     return acc
 
 
-def TRT_LocalOccupancyCfg(flags, name = "TRT_LocalOccupancy"):
+def TRT_LocalOccupancyCfg(flags, name="TRT_LocalOccupancy"):
     """Return a ComponentAccumulator for TRT_LocalOccupancy Tool"""
     acc = ComponentAccumulator()
     trtCalDbTool = acc.popToolsAndMerge(TRT_CalDbToolCfg(flags))
-    trtStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
+    trtStrawStatusSummaryTool = acc.popToolsAndMerge(
+        TRT_StrawStatusSummaryToolCfg(flags))
 
-    InDet__TRT_LocalOccupancy=CompFactory.InDet__TRT_LocalOccupancy
-    acc.setPrivateTools(InDet__TRT_LocalOccupancy(name = "TRT_LocalOccupancy",
-                                                  isTrigger = False,
-                                                  TRTCalDbTool = trtCalDbTool,
-                                                  TRTStrawStatusSummaryTool =  trtStrawStatusSummaryTool))
+    InDet__TRT_LocalOccupancy = CompFactory.InDet__TRT_LocalOccupancy
+    acc.setPrivateTools(InDet__TRT_LocalOccupancy(name="TRT_LocalOccupancy",
+                                                  isTrigger=False,
+                                                  TRTCalDbTool=trtCalDbTool,
+                                                  TRTStrawStatusSummaryTool=trtStrawStatusSummaryTool,
+                                                  TRT_RDOContainerName="",
+                                                  TRT_DriftCircleCollection="",
+                                                  ))
     return acc
 
 
-def TRTStrawCondAlgCfg(flags, name = "TRTStrawCondAlg"):
+def TRTStrawCondAlgCfg(flags, name="TRTStrawCondAlg"):
     """Return a ComponentAccumulator for TRTStrawCondAlg algorithm"""
     acc = ComponentAccumulator()
-    trtStrawStatusSummaryTool = acc.popToolsAndMerge(TRT_StrawStatusSummaryToolCfg(flags))
+    trtStrawStatusSummaryTool = acc.popToolsAndMerge(
+        TRT_StrawStatusSummaryToolCfg(flags))
     # Alive straws algorithm
-    TRTStrawCondAlg=CompFactory.TRTStrawCondAlg
-    acc.addCondAlgo(TRTStrawCondAlg(name = "TRTStrawCondAlg",
-                                    TRTStrawStatusSummaryTool = trtStrawStatusSummaryTool,
-                                    isGEANT4 =flags.Detector.Simulate))
+    TRTStrawCondAlg = CompFactory.TRTStrawCondAlg
+    acc.addCondAlgo(TRTStrawCondAlg(name="TRTStrawCondAlg",
+                                    TRTStrawStatusSummaryTool=trtStrawStatusSummaryTool,
+                                    isGEANT4=flags.Detector.Simulate))
+    return acc
+
+
+def TRT_CablingSvcCfg(flags):
+    """Return a ComponentAccumulator for TRT_CablingSvc service"""
+    acc = ComponentAccumulator()
+    # Properly configure MC/data for TRT cabling
+    TRT_FillCablingData_DC3 = CompFactory.TRT_FillCablingData_DC3
+    tool = TRT_FillCablingData_DC3(RealData=not flags.Input.isMC)
+    acc.addPublicTool(tool)
+    # Setup TRT cabling service
+    TRT_CablingSvc = CompFactory.TRT_CablingSvc
+    acc.addService(TRT_CablingSvc())
     return acc
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlayConfig_test.py b/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlayConfig_test.py
index 467864c7e429cad777a694e540adc5b8e68f4f4d..18d0938923d0440e5f55b0cacea71bfe8749d4bc 100755
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlayConfig_test.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/PixelOverlayConfig_test.py
@@ -8,12 +8,12 @@ import sys
 from AthenaCommon.Configurable import Configurable
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg
-from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from InDetOverlay.PixelOverlayConfig import PixelOverlayCfg
 from OverlayConfiguration.OverlayTestHelpers import \
-    CommonTestArgumentParser, postprocessAndLockFlags, printAndRun
+    CommonTestArgumentParser, defaultTestFlags, postprocessAndLockFlags, printAndRun
 from OverlayCopyAlgs.OverlayCopyAlgsConfig import CopyMcEventCollectionCfg
+from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoOverlayCfg
 
 # Configure
 Configurable.configurableRun3Behavior = True
@@ -23,10 +23,8 @@ parser = CommonTestArgumentParser("PixelOverlayConfig_test.py")
 args = parser.parse_args()
 
 # Configure
-ConfigFlags.Input.Files = defaultTestFiles.RDO_BKG
-ConfigFlags.Input.SecondaryFiles = defaultTestFiles.HITS
-ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
-ConfigFlags.Overlay.DataOverlay = False
+defaultTestFlags(ConfigFlags, args)
+
 ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
 ConfigFlags.Output.RDO_SGNLFileName = "myRDO_SGNL.pool.root"
 
@@ -36,7 +34,8 @@ postprocessAndLockFlags(ConfigFlags, args)
 acc = MainServicesThreadedCfg(ConfigFlags)
 acc.merge(PoolReadCfg(ConfigFlags))
 
-# Add truth overlay (needed downstream)
+# Add event and truth overlay (needed downstream)
+acc.merge(EventInfoOverlayCfg(ConfigFlags))
 acc.merge(CopyMcEventCollectionCfg(ConfigFlags))
 
 # Add Pixel overlay
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlayConfig_test.py b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlayConfig_test.py
index 1fcf8b39e6ee369fef8ce06fab8718c3743b0416..c328ced7acbabdee576ab8a5de191f84abc9c422 100755
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlayConfig_test.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/test/TRTOverlayConfig_test.py
@@ -8,12 +8,12 @@ import sys
 from AthenaCommon.Configurable import Configurable
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg
-from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from InDetOverlay.TRTOverlayConfig import TRTOverlayCfg
 from OverlayConfiguration.OverlayTestHelpers import \
-    CommonTestArgumentParser, postprocessAndLockFlags, printAndRun
+    CommonTestArgumentParser, defaultTestFlags, postprocessAndLockFlags, printAndRun
 from OverlayCopyAlgs.OverlayCopyAlgsConfig import CopyMcEventCollectionCfg
+from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoOverlayCfg
 
 # Configure
 Configurable.configurableRun3Behavior = True
@@ -23,10 +23,8 @@ parser = CommonTestArgumentParser("TRTOverlayConfig_test.py")
 args = parser.parse_args()
 
 # Configure
-ConfigFlags.Input.Files = defaultTestFiles.RDO_BKG
-ConfigFlags.Input.SecondaryFiles = defaultTestFiles.HITS
-ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
-ConfigFlags.Overlay.DataOverlay = False
+defaultTestFlags(ConfigFlags, args)
+
 ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
 ConfigFlags.Output.RDO_SGNLFileName = "myRDO_SGNL.pool.root"
 
@@ -36,7 +34,8 @@ postprocessAndLockFlags(ConfigFlags, args)
 acc = MainServicesThreadedCfg(ConfigFlags)
 acc.merge(PoolReadCfg(ConfigFlags))
 
-# Add truth overlay (needed downstream)
+# Add event and truth overlay (needed downstream)
+acc.merge(EventInfoOverlayCfg(ConfigFlags))
 acc.merge(CopyMcEventCollectionCfg(ConfigFlags))
 
 # Add TRT overlay
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx
index 52411db49680158aaca2517cbf72544afa0d2259..e9497959cefc3d33f43ecd48cbca6e76122e39c6 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_LocalOccupancy.cxx
@@ -83,8 +83,8 @@ StatusCode TRT_LocalOccupancy::initialize()
   ATH_MSG_INFO ("initialize() successful in " << name());
 
   //Initlalize ReadHandleKey
-  ATH_CHECK( m_trt_rdo_location.initialize() );
-  ATH_CHECK( m_trt_driftcircles.initialize() );
+  ATH_CHECK( m_trt_rdo_location.initialize(!m_trt_rdo_location.empty()) );
+  ATH_CHECK( m_trt_driftcircles.initialize(!m_trt_driftcircles.empty()) );
   ATH_CHECK( m_strawReadKey.initialize() );
 
   return StatusCode::SUCCESS;
diff --git a/LArCalorimeter/LArCnv/LArAthenaPool/src/LArFebErrorSummaryCnv.cxx b/LArCalorimeter/LArCnv/LArAthenaPool/src/LArFebErrorSummaryCnv.cxx
index cad3b8a88f2d818aed04ccdba998f484cfd13665..94fa1da02921eca7674798616c1095f3958a9649 100755
--- a/LArCalorimeter/LArCnv/LArAthenaPool/src/LArFebErrorSummaryCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArAthenaPool/src/LArFebErrorSummaryCnv.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 "LArFebErrorSummaryCnv.h"
@@ -33,7 +33,7 @@ LArFebErrorSummaryCnv::createTransient()
   static pool::Guid   guid_p1("9448FB64-AB7E-4995-A5FC-23E9A6C1AF80");
 
   if( compareClassGuid(guid_p1) ) {
-      std::auto_ptr<LArFebErrorSummary_p1> col_vect( poolReadObject<LArFebErrorSummary_p1>() );
+      std::unique_ptr<LArFebErrorSummary_p1> col_vect( poolReadObject<LArFebErrorSummary_p1>() );
       trans = m_converter.createTransient( col_vect.get(), log );
   }
   else {
diff --git a/LArCalorimeter/LArCnv/LArAthenaPool/src/LArNoisyROSummaryCnv.cxx b/LArCalorimeter/LArCnv/LArAthenaPool/src/LArNoisyROSummaryCnv.cxx
index 31e2698c9502a69b26f4d762aaf36262588e5e27..fbb436d98988e062efc8577db34e26f28b6c291d 100755
--- a/LArCalorimeter/LArCnv/LArAthenaPool/src/LArNoisyROSummaryCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArAthenaPool/src/LArNoisyROSummaryCnv.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 "LArNoisyROSummaryCnv.h"
@@ -40,27 +40,27 @@ LArNoisyROSummaryCnv::createTransient()
   static pool::Guid   guid_p5("4AE11DAE-F40C-4B90-B105-0A7BA5D29C1D");
 
   if( compareClassGuid(guid_p5) ) {
-     std::auto_ptr<LArNoisyROSummary_p5> col_vect( poolReadObject<LArNoisyROSummary_p5>() );
+     std::unique_ptr<LArNoisyROSummary_p5> col_vect( poolReadObject<LArNoisyROSummary_p5>() );
      trans = m_converter.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(guid_p4) ) {
      LArNoisyROSummaryCnv_p4   converter;
-     std::auto_ptr<LArNoisyROSummary_p4> col_vect( poolReadObject<LArNoisyROSummary_p4>() );
+     std::unique_ptr<LArNoisyROSummary_p4> col_vect( poolReadObject<LArNoisyROSummary_p4>() );
      trans = converter.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(guid_p3) ) {
       LArNoisyROSummaryCnv_p3   converter;
-      std::auto_ptr<LArNoisyROSummary_p3> col_vect( poolReadObject<LArNoisyROSummary_p3>() );
+      std::unique_ptr<LArNoisyROSummary_p3> col_vect( poolReadObject<LArNoisyROSummary_p3>() );
       trans = converter.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(guid_p2) ) {
       LArNoisyROSummaryCnv_p2   converter;
-      std::auto_ptr<LArNoisyROSummary_p2> col_vect( poolReadObject<LArNoisyROSummary_p2>() );
+      std::unique_ptr<LArNoisyROSummary_p2> col_vect( poolReadObject<LArNoisyROSummary_p2>() );
       trans = converter.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(guid_p1) ) {
       LArNoisyROSummaryCnv_p1   converter;
-      std::auto_ptr<LArNoisyROSummary_p1> col_vect( poolReadObject<LArNoisyROSummary_p1>() );
+      std::unique_ptr<LArNoisyROSummary_p1> col_vect( poolReadObject<LArNoisyROSummary_p1>() );
       trans = converter.createTransient( col_vect.get(), log );
   }
   else {
diff --git a/LArCalorimeter/LArCnv/LArAthenaPool/src/LArRawChannelContainerCnv.cxx b/LArCalorimeter/LArCnv/LArAthenaPool/src/LArRawChannelContainerCnv.cxx
index 3d13930424dea4033df4c596facd41abe57e7389..58ae0a340bec4a0b7ccc3ee2f50fb492bfd85729 100755
--- a/LArCalorimeter/LArCnv/LArAthenaPool/src/LArRawChannelContainerCnv.cxx
+++ b/LArCalorimeter/LArCnv/LArAthenaPool/src/LArRawChannelContainerCnv.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 "LArRawChannelContainerCnv.h"
@@ -40,18 +40,18 @@ LArRawChannelContainerCnv::createTransient()
  // even newer representation of LArRawChannelContainer
   if( compareClassGuid(guid_p4) ) {
       LArRawChannelContainerCnv_p4   converter;
-      std::auto_ptr<LArRawChannelContainer_p4> col_vect( poolReadObject<LArRawChannelContainer_p4>() );
+      std::unique_ptr<LArRawChannelContainer_p4> col_vect( poolReadObject<LArRawChannelContainer_p4>() );
       trans_cont = converter.createTransient( col_vect.get(), log );
   }
   else if( compareClassGuid(guid_p3) ) {
       LArRawChannelContainerCnv_p3   converter;
-      std::auto_ptr<LArRawChannelContainer_p3> col_vect( poolReadObject<LArRawChannelContainer_p3>() );
+      std::unique_ptr<LArRawChannelContainer_p3> col_vect( poolReadObject<LArRawChannelContainer_p3>() );
       trans_cont = converter.createTransient( col_vect.get(), log );
   }
   // new representation of LArRawChannelContainer
   else if( compareClassGuid(guid_p2) ) {
       LArRawChannelContainerCnv_p2   converter;
-      std::auto_ptr<LArRawChannelContainer_p2> col_vect( poolReadObject<LArRawChannelContainer_p2>() );
+      std::unique_ptr<LArRawChannelContainer_p2> col_vect( poolReadObject<LArRawChannelContainer_p2>() );
       trans_cont = converter.createTransient( col_vect.get(), log );
 
   }
@@ -59,7 +59,7 @@ LArRawChannelContainerCnv::createTransient()
   else if( compareClassGuid(guid_p1) )
     {
       LArRawChannelContainerCnv_p1   converter;
-      std::auto_ptr<LArRawChannelContainer_p1> col_vect( poolReadObject<LArRawChannelContainer_p1>() );
+      std::unique_ptr<LArRawChannelContainer_p1> col_vect( poolReadObject<LArRawChannelContainer_p1>() );
       trans_cont = converter.createTransient( col_vect.get(), log );
     }
   // old representation of LArRawChannelContainer
diff --git a/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.cxx b/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.cxx
index 140bafc68cbfb863d4c90178fa03f80f9ce923ff..e3b5b2b9d967c3c5edb6a0406a02fbe2cd7154fe 100755
--- a/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.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
 */
 
 //-----------------------------------------------------------------------
@@ -140,7 +140,7 @@ StatusCode LArFecLvTempDcsTool::getFec( const HWIdentifier& crateID,
 }
 
 void
-LArFecLvTempDcsTool::translateFec( const coral::AttributeList att, 
+LArFecLvTempDcsTool::translateFec( const coral::AttributeList& att, 
 	LArFecLvTempDcs& fec ) const
 {
 	// Temporary variables
diff --git a/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.h b/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.h
index 4c0fd9c60f313b78c3f3027fc9d19b8ddca0b8a7..6d920f821e15a7b6184ff8dcdab07935cffe4f08 100755
--- a/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.h
+++ b/LArCalorimeter/LArCondUtils/src/LArFecLvTempDcsTool.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 LARCONDUTILS_LARFECLVTEMPDCSTOOL_H
@@ -58,7 +58,7 @@ class LArFecLvTempDcsTool: public AthAlgTool, virtual public ILArFecLvTempDcsToo
 
   private:
 
-  void translateFec( const coral::AttributeList, LArFecLvTempDcs& ) const;
+  void translateFec( const coral::AttributeList&, LArFecLvTempDcs& ) const;
 
   const LArOnlineID* m_larOnlineId;
   std::string m_foldername;
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx
index 06d5acf038ee8943acc6e268e6c83214ea9fcc2b..052c33c2a5813d540a39ec400c0a57cd5c923207 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.cxx
@@ -10,11 +10,8 @@
 /** constructor */ 
 Muon::CscRDO_Decoder::CscRDO_Decoder
 ( const std::string& type, const std::string& name,const IInterface* parent )
-  :  base_class(type,name,parent),
-     m_cabling( "CSCcablingSvc" ,name),
-     m_cscCalibTool( "CscCalibTool") {
-  
-  declareProperty("CscCalibTool",        m_cscCalibTool );
+  : base_class(type,name,parent)
+{  
 }
 
 StatusCode Muon::CscRDO_Decoder::initialize()
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h
index e2ecf3ec9417ffd56a74c492f04ffabc05b96b61..510483137dbfb6b7c0f70725c48fce099a42c4bf 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRDO_Decoder.h
@@ -58,8 +58,8 @@ namespace Muon {
     std::string m_detdescr;
     ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
       "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
-    ServiceHandle<CSCcablingSvc>      m_cabling;
-    ToolHandle<ICscCalibTool>         m_cscCalibTool;
+    ServiceHandle<CSCcablingSvc>       m_cabling{this, "CSCcablingSvc", "CSCcablingSvc", "CSC cabling service handle"};
+    ToolHandle<ICscCalibTool>          m_cscCalibTool{this, "cscCalibTool", "CscCalibTool", "CSC calibration tool handle"};
     double   m_timeOffset   ;
     double   m_samplingTime ;
     double   m_signalWidth  ;
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h
index e7e4be4887922a5dc0891ea93d1cfab86210f58f..fcbf3f86d9fec04268053696946efa00b7551b39 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolCore.h
@@ -63,9 +63,9 @@ namespace Muon {
   protected:
     
     /// private method for the decoding RDO --> PrepRawData
-    virtual StatusCode decode(const CscRawDataContainer* rdo, IdentifierHash givenIdh, 
+    StatusCode decode(const CscRawDataContainer* rdo, IdentifierHash givenIdh, 
 			std::vector<IdentifierHash>& decodedIdhs);
-    virtual StatusCode decode(const CscRawDataContainer* rdo, 
+    StatusCode decode(const CscRawDataContainer* rdo, 
 		      std::vector<IdentifierHash>& decodedIdhs);
     virtual StatusCode decode( const std::vector<uint32_t>& ) {return StatusCode::FAILURE;}
     
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
index 3ef1e0e9f0bb7c9f971dfd187cd1200c17d14577..eda8f1c5fc9655d9e950df5c03dfc2c3edab8932 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
@@ -32,7 +32,6 @@ using namespace Muon;
 CscRdoToCscPrepDataToolMT::CscRdoToCscPrepDataToolMT
 (const std::string& type, const std::string& name, const IInterface* parent)
   : CscRdoToCscPrepDataToolCore(type, name, parent) {
-    declareProperty("CscStripPrdContainerCacheKey", m_prdContainerCacheKey, "Optional external cache for the CSC RDO container");
 }  
 
 CscRdoToCscPrepDataToolMT::~CscRdoToCscPrepDataToolMT(){}
@@ -40,7 +39,6 @@ CscRdoToCscPrepDataToolMT::~CscRdoToCscPrepDataToolMT(){}
 StatusCode CscRdoToCscPrepDataToolMT::initialize(){
   ATH_MSG_VERBOSE("Starting init");
   ATH_CHECK( CscRdoToCscPrepDataToolCore::initialize() );
-  ATH_CHECK( m_prdContainerCacheKey.initialize( !m_prdContainerCacheKey.key().empty() ) );
   ATH_MSG_DEBUG("initialize() successful in " << name());
   return StatusCode::SUCCESS;
 }
@@ -58,39 +56,16 @@ StatusCode CscRdoToCscPrepDataToolMT::decode(std::vector<IdentifierHash>& givenI
   // clear output vector of selected data collections containing data
   decodedIdhs.clear();
 
-  /// Recording the PRD container in StoreGate
+  /// record the container in storeGate
   SG::WriteHandle< Muon::CscStripPrepDataContainer > outputHandle (m_outputCollectionKey);
+  StatusCode status = outputHandle.record(std::make_unique<Muon::CscStripPrepDataContainer>(m_muonMgr->cscIdHelper()->module_hash_max()));
 
-  // Caching of PRD container
-  const bool externalCachePRD = !m_prdContainerCacheKey.key().empty();
-  if (!externalCachePRD) {
-    // without the cache we just record the container
-    StatusCode status = outputHandle.record(std::make_unique<Muon::CscStripPrepDataContainer>(m_muonMgr->cscIdHelper()->module_hash_max()));
-    if (status.isFailure() || !outputHandle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of CSC PrepData Container at " << m_outputCollectionKey.key());
-      return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG("Created container " << m_outputCollectionKey.key());
+  if (status.isFailure() || !outputHandle.isValid() )       {
+    ATH_MSG_FATAL("Could not record container of CSC PrepData Container at " << m_outputCollectionKey.key());
+    return StatusCode::FAILURE;
   } 
-  else {
-    // use the cache to get the container
-    SG::UpdateHandle<CscStripPrepDataCollection_Cache> update(m_prdContainerCacheKey);
-    if (!update.isValid()){
-      ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
-      return StatusCode::FAILURE;
-    }
-    StatusCode status = outputHandle.record(std::make_unique<Muon::CscStripPrepDataContainer>(update.ptr()));
-    if (status.isFailure() || !outputHandle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of CSC PrepData Container using cache " 
-        << m_prdContainerCacheKey.key() << " - " <<m_outputCollectionKey.key()); 
-      return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG("Created container using cache for " << m_prdContainerCacheKey.key());
-  }
-  // Pass the container from the handle
   m_outputCollection = outputHandle.ptr();
 
-
   if (sizeVectorRequested == 0) {
     m_fullEventDone=true;
     ATH_MSG_DEBUG ( "decoding the entire event " );
@@ -116,14 +91,14 @@ StatusCode CscRdoToCscPrepDataToolMT::decode(std::vector<IdentifierHash>& givenI
   if (sizeVectorRequested)  {
     // seeded decoding
     for (unsigned int i=0; i<sizeVectorRequested; ++i) {
-      if (CscRdoToCscPrepDataToolMT::decode(rdoContainer, givenIdhs[i],decodedIdhs).isFailure()) {
+      if (decode(rdoContainer, givenIdhs[i],decodedIdhs).isFailure()) {
         ATH_MSG_ERROR ( "Unable to decode CSC RDO " << i << "th into CSC PrepRawData" );
         return StatusCode::FAILURE;
       }
     }
   } else {
     // unseeded decoding
-    if (CscRdoToCscPrepDataToolMT::decode(rdoContainer, decodedIdhs).isFailure()) {
+    if (decode(rdoContainer, decodedIdhs).isFailure()) {
       ATH_MSG_ERROR ( "Unable to decode CSC RDO " );
       return StatusCode::FAILURE;
     }	
@@ -131,381 +106,3 @@ StatusCode CscRdoToCscPrepDataToolMT::decode(std::vector<IdentifierHash>& givenI
   
   return StatusCode::SUCCESS;
 }  
-
-StatusCode CscRdoToCscPrepDataToolMT::decode(const CscRawDataContainer* rdoContainer, IdentifierHash givenHashId, std::vector<IdentifierHash>& decodedIdhs) {
-  
-  
-  //typedef CscRawDataContainer::const_iterator collection_iterator;
-  
-  IdContext cscContext = m_muonIdHelperTool->cscIdHelper().module_context();
-  
-  // if CSC decoding is switched off stop here
-  if( !m_decodeData ) {
-    ATH_MSG_DEBUG ( "Stored empty container; Decoding CSC RDO into CSC PrepRawData is switched off" );
-    return StatusCode::SUCCESS;
-  }
-
-  //These collections can be empty for the trigger
-  if(!m_outputCollection || m_outputCollection->size()==0){
-    ATH_MSG_DEBUG("Stored empty collection.");
-    return StatusCode::SUCCESS;
-  }
-
-  ATH_MSG_DEBUG ( "Decoding CSC RDO into CSC PrepRawData" );
-  /// create the CSC RDO decoder
-  //**********************************************
-  // retrieve specific collection for the givenID
-  uint16_t idColl = 0xffff;
-  m_cabling->hash2CollectionId(givenHashId,idColl);
-  CscRawDataContainer::const_iterator it_coll = rdoContainer->indexFind(idColl);
-  if (rdoContainer->end() ==  it_coll) {
-    ATH_MSG_DEBUG ( "Specific CSC RDO collection retrieving failed for collection hash = " << idColl );
-    return StatusCode::SUCCESS;
-  }
-
-  const CscRawDataCollection * rawCollection = *it_coll;
-  ATH_MSG_DEBUG ( "Retrieved " << rawCollection->size() << " CSC RDOs.");
-  //************************************************
-  IdentifierHash cscHashId;
-
-  unsigned int samplingTime = rawCollection->rate();
-  unsigned int numSamples   = rawCollection->numSamples();
-  bool samplingPhase        = rawCollection->samplingPhase();
-  std::vector<float> charges;
-  charges.reserve(4);
-  std::vector<uint16_t> samples;
-  samples.reserve(4);
-
-  if ( int(samplingTime) != int(m_cscCalibTool->getSamplingTime())) {
-    ATH_MSG_WARNING ( " CSC sampling time from Collection is NOT consistant to calibTool parameter!!!!!!! " );
-  }
-  
-  /** for each Rdo, loop over RawData, converter RawData to PrepRawData
-      retrieve/create PrepRawData collection, and insert PrepRawData into collection */
-  CscRawDataCollection::const_iterator itD   =  rawCollection->begin(); 
-  CscRawDataCollection::const_iterator itD_e =  rawCollection->end();
-
-  // Each RDO Collection goes into a PRD Collection, but we need to know what hash the PRD container is
-  // and this is determined by the stationID, no the RDO hash ID
-  ATH_MSG_DEBUG("CSC RDO ID " << rawCollection->identify() << " with hashID " << rawCollection->identifyHash() );
-  // Just use the first iterator entry as stationID does not change between data inside a single container
-  Identifier stationId = m_cscRdoDecoderTool->stationIdentifier( (const CscRawData *)(*itD) );
-  if (m_muonIdHelperTool->cscIdHelper().get_hash(stationId, cscHashId, &cscContext)) {
-    ATH_MSG_WARNING ( "Unable to get CSC digiti collection hash id "
-                       << "context begin_index = " << cscContext.begin_index()
-                       << " context end_index  = " << cscContext.end_index()
-                       << " the identifier is "     );
-    stationId.show();
-  }
-  ATH_MSG_DEBUG("Create CSC PRD Collection with hash " << cscHashId << " (givenHashId is " << givenHashId << ")");
-  std::unique_ptr<CscStripPrepDataCollection> collection = nullptr;
-  CscStripPrepDataContainer::IDC_WriteHandle lock = m_outputCollection->getWriteHandle( cscHashId );
-  // Note that if the hash check above works, we should never reach this step where the lock is present
-  if( lock.alreadyPresent() ) {
-     ATH_MSG_DEBUG ( "CSC PRD collection already exist with collection hash = " << cscHashId << " collection filling is skipped!");
-     decodedIdhs.push_back(givenHashId);
-     return StatusCode::SUCCESS;
-  }
-  else{
-    ATH_MSG_DEBUG ( "CSC PRD collection does not exist - creating a new one with hash = " << cscHashId );
-    collection = std::make_unique<CscStripPrepDataCollection>( cscHashId );
-    collection->setIdentifier(stationId);
-  }
-
-  for (; itD!=itD_e; ++itD) { 
-    const CscRawData * data = (*itD);
-    uint16_t width          = data->width();
-    uint16_t totalSamples   = (data->samples()).size();
-    uint32_t hashOffset     = data->hashId();
-
-    ATH_MSG_DEBUG ( " Size of online cluster in this RawData: " 
-        << " Width = " << width << " Samples = " << totalSamples
-        << " stationId : " << stationId << "  hashOffset : " << hashOffset);
-
-    for (unsigned int j=0; j<width; ++j) {
-      const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(data, j);
-      ATH_MSG_DEBUG ( "        LOOP over width  " << j <<  " " << channelId );
-
-      const CscReadoutElement * descriptor = m_muonMgr->getCscReadoutElement(channelId);
-      //calculate local positions on the strip planes
-      if ( !descriptor ) {
-        ATH_MSG_WARNING ( "Invalid descriptor for " << m_muonIdHelperTool->cscIdHelper().show_to_string(channelId)
-                          << " Skipping channel " );
-        continue;
-      } else if (!descriptor->containsId(channelId)) {
-        ATH_MSG_WARNING ("Identifier from the cabling service <"
-                         <<m_muonIdHelperTool->cscIdHelper().show_to_string(channelId)
-                         <<"> inconsistent with the geometry of detector element <"
-                         <<m_muonIdHelperTool->cscIdHelper().show_to_string(descriptor->identify())
-                         <<">  =>>ignore this hit");
-        continue;
-      }
-      
-      float timeOfFirstSample = 0.0;
-      bool extractSamples = data->samples(j, numSamples, samples);
-      if (!extractSamples) {
-        ATH_MSG_WARNING ( "Unable to extract samples for strip " << j 
-                          << " Online Cluster width = " << width 
-                          << " for number of Samples = " << numSamples 
-                          << " continuing ..." ); 
-        continue;
-      }   
-      
-      //      uint32_t stripHash = hashOffset+j;
-      IdentifierHash stripHash;
-      if (m_muonIdHelperTool->cscIdHelper().get_channel_hash(channelId, stripHash)) {
-        ATH_MSG_WARNING ( "Unable to get CSC strip hash id");
-        channelId.show();
-      }
-      
-      bool adctocharge = m_cscCalibTool->adcToCharge(samples, stripHash, charges);
-      if ( !adctocharge ) {
-        ATH_MSG_WARNING ( " CSC conversion ADC to Charge failed " 
-                          << "CSC PrepData not build ... skipping " );
-        continue;
-      }
-      if ( samples.size() >=4 ) 
-        ATH_MSG_DEBUG ( "ADC: " << m_muonIdHelperTool->cscIdHelper().show_to_string(channelId) 
-                        << " " << samples[0] << " " << samples[1] << " " << samples[2] << " " << samples[3]
-                        << " Charges: "  
-                        << " " << charges[0] << " " << charges[1] << " " << charges[2] << " " << charges[3] ); 
-      
-      int measuresPhi    = m_muonIdHelperTool->cscIdHelper().measuresPhi(channelId);
-
-      Amg::Vector2D localWirePos1( descriptor->xCoordinateInTrackingFrame(channelId ),0.);
-      
-      int chamberLayer   = m_muonIdHelperTool->cscIdHelper().chamberLayer(channelId);
-      float stripWidth   = descriptor->cathodeReadoutPitch( chamberLayer, measuresPhi );
-      double errPos      = stripWidth / sqrt(12.0);
-
-      AmgSymMatrix(2) covariance;
-      covariance.setIdentity();
-      covariance *= errPos*errPos;
-      Amg::MatrixX * errClusterPos = new Amg::MatrixX(covariance);
-
-      /** new CscStripPrepRawData */
-      CscStripPrepData * newPrepData = new CscStripPrepData(channelId,
-                                                            cscHashId,
-                                                            localWirePos1,
-                                                            errClusterPos,
-                                                            descriptor,
-                                                            charges,
-                                                            timeOfFirstSample,
-                                                            samplingTime);
-      
-      if (samplingPhase) newPrepData->set_samplingPhase();
-      newPrepData->setHashAndIndex(collection->identifyHash(), collection->size());
-      collection->push_back(newPrepData);
-
-    }
-  }
-  // Record the container
-  StatusCode status_lock = lock.addOrDelete(std::move( collection ) );
-  if (status_lock.isFailure()) {
-    ATH_MSG_ERROR ( "Could not insert CscStripPrepdataCollection into CscStripPrepdataContainer..." );
-    return StatusCode::FAILURE;
-  }
-  else{
-    decodedIdhs.push_back(cscHashId);
-  }
-  return StatusCode::SUCCESS;
-}
-
-//************** Process for all in case of Offline
-StatusCode CscRdoToCscPrepDataToolMT::decode(const CscRawDataContainer* rdoContainer, std::vector<IdentifierHash>& decodedIdhs)
-{
-  
-  typedef CscRawDataContainer::const_iterator collection_iterator;
-  
-  IdContext cscContext = m_muonIdHelperTool->cscIdHelper().module_context();
- 
-  // if CSC decoding is switched off stop here
-  if( !m_decodeData ) {
-    ATH_MSG_DEBUG ( "Stored empty container. "
-                    << "Decoding CSC RDO into CSC PrepRawData is switched off" );
-    return StatusCode::SUCCESS;
-  }
-  ATH_MSG_DEBUG ( "Decoding CSC RDO into CSC PrepRawData" );
-
-  collection_iterator rdoColl     = rdoContainer->begin(); 
-  collection_iterator lastRdoColl = rdoContainer->end();
-  std::vector<float> charges;
-  charges.reserve(4);
-  std::vector<uint16_t> samples;
-  samples.reserve(4);
-
-  Identifier oldId;
-  IdentifierHash cscHashId;
-  Identifier stationId;
-  for (; rdoColl!=lastRdoColl; ++rdoColl) {
-    if ( (*rdoColl)->size() > 0 ) {
-      ATH_MSG_DEBUG ( " Number of RawData in this rdo " << (*rdoColl)->size() );
-      
-      const  CscRawDataCollection* cscCollection = *rdoColl; 
-      unsigned int samplingTime = cscCollection->rate();
-      unsigned int numSamples   = cscCollection->numSamples();
-      bool samplingPhase        = cscCollection->samplingPhase();
-
-      if ( int(samplingTime) != int(m_cscCalibTool->getSamplingTime())) {
-        ATH_MSG_WARNING ( " CSC sampling time from Collection is NOT consistant to calibTool parameter!!!!!!! " );
-      }
-      /** for each Rdo, loop over RawData, converter RawData to PrepRawData
-          retrieve/create PrepRawData collection, and insert PrepRawData into collection */
-      CscRawDataCollection::const_iterator itD   =  cscCollection->begin(); 
-      CscRawDataCollection::const_iterator itD_e =  cscCollection->end();
-
-      // Each RDO Collection goes into a PRD Collection, but we need to know what hash the PRD container is
-      // and this is determined by the stationID, no the RDO hash ID
-      ATH_MSG_DEBUG("CSC RDO ID " << (*rdoColl)->identify() << " with hashID " << (*rdoColl)->identifyHash() );
-      // Just use the first iterator entry as stationID does not change between data inside a single container
-      Identifier stationId = m_cscRdoDecoderTool->stationIdentifier( (const CscRawData *)(*itD) );
-      if (m_muonIdHelperTool->cscIdHelper().get_hash(stationId, cscHashId, &cscContext)) {
-        ATH_MSG_WARNING ( "Unable to get CSC digiti collection hash id "
-                           << "context begin_index = " << cscContext.begin_index()
-                           << " context end_index  = " << cscContext.end_index()
-                           << " the identifier is "     );
-        stationId.show();
-      }
-
-      ATH_MSG_DEBUG("Create CSC PRD Collection with hash " << cscHashId);
-      std::unique_ptr<CscStripPrepDataCollection> collection = nullptr;
-      CscStripPrepDataContainer::IDC_WriteHandle lock = m_outputCollection->getWriteHandle( cscHashId );
-      if( lock.alreadyPresent() ) {
-         ATH_MSG_DEBUG ( "CSC PRD collection already exist with collection hash = " << cscHashId << " collection filling is skipped!");
-         continue;
-      }
-      else{
-        ATH_MSG_DEBUG ( "CSC PRD collection does not exist - creating a new one with hash = " << cscHashId );
-        collection = std::make_unique<CscStripPrepDataCollection>( cscHashId );
-        collection->setIdentifier(stationId);
-      }
-
-      // This loops over the RDO data, decodes and puts into the PRD collection      
-      for (; itD!=itD_e; ++itD) { 
-        const CscRawData * data = (*itD);
-        uint16_t width        = data->width();
-        uint16_t totalSamples = (data->samples()).size();
-        uint32_t hashOffset   = data->hashId();
-
-        ATH_MSG_DEBUG ( "DecodeAll*Size of online cluster in this RawData: " 
-                        << " Width = " << width << " Samples = " << totalSamples
-                        << " stationId : " << stationId << "  hashOffset : " << hashOffset);
-
-        for (unsigned int j=0; j<width; ++j) {
-          const Identifier channelId = m_cscRdoDecoderTool->channelIdentifier(data, j);
-          ATH_MSG_DEBUG ( "DecodeAll**LOOP over width  " << j <<  " " << channelId );
-
-          const CscReadoutElement * descriptor = m_muonMgr->getCscReadoutElement(channelId);
-          //calculate local positions on the strip planes
-          if ( !descriptor ) {
-            ATH_MSG_WARNING ( "Invalid descriptor for " << m_muonIdHelperTool->cscIdHelper().show_to_string(channelId)
-                              << " Skipping channel " );
-            continue;
-          }
-          else if (!descriptor->containsId(channelId)) {
-            ATH_MSG_WARNING ("Identifier from the cabling service <"
-                             <<m_muonIdHelperTool->cscIdHelper().show_to_string(channelId)
-                             <<"> inconsistent with the geometry of detector element <"
-                             <<m_muonIdHelperTool->cscIdHelper().show_to_string(descriptor->identify())
-                             <<">  =>>ignore this hit");
-            continue;
-          }
-          
-          float timeOfFirstSample = 0.0;
-          bool extractSamples = data->samples(j, numSamples, samples);
-          if (!extractSamples) {
-            ATH_MSG_WARNING ( "Unable to extract samples for strip " << j 
-                              << " Online Cluster width = " << width 
-                              << " for number of Samples = " << numSamples 
-                              << " continuing ..." ); 
-            continue;
-          }  
-          
-
-          //      uint32_t stripHash = hashOffset+j;
-          IdentifierHash stripHash;
-          if (m_muonIdHelperTool->cscIdHelper().get_channel_hash(channelId, stripHash)) {
-            ATH_MSG_WARNING ( "Unable to get CSC strip hash id");
-            channelId.show();
-          }
-
-
-          Identifier channelIdFromHash;
-          m_muonIdHelperTool->cscIdHelper().get_id(stripHash, channelIdFromHash, &cscContext);
-          
-          
-          bool adctocharge = m_cscCalibTool->adcToCharge(samples, stripHash, charges);
-          if ( !adctocharge ) {
-            ATH_MSG_WARNING ( " CSC conversion ADC to Charge failed " 
-                              << "CSC PrepData not build ... skipping " );
-            continue;
-          }
-          if ( samples.size() >=4 ) 
-            ATH_MSG_DEBUG ( "DecodeAll*** ADC: " << m_muonIdHelperTool->cscIdHelper().show_to_string(channelId) << " "
-                            << (int) stripHash << " "
-                            << m_muonIdHelperTool->cscIdHelper().show_to_string(channelIdFromHash) 
-                            << " " << samples[0] << " " << samples[1] << " " << samples[2] << " " << samples[3]
-                            << " Charges: "  
-                            << " " << charges[0] << " " << charges[1] << " " << charges[2] << " " << charges[3] ); 
-          if (m_muonIdHelperTool->cscIdHelper().get_hash(stationId, cscHashId, &cscContext)) {
-            ATH_MSG_WARNING ( "Unable to get CSC hash id from CSC RDO collection "
-                              << "context begin_index = " << cscContext.begin_index()
-                              << " context end_index  = " << cscContext.end_index() 
-                              << " the identifier is "      );
-            stationId.show();
-          }
-                    
-          // Check if this strip is already decoded.. Then we don't have to decode it again
-          bool IsThisStripDecoded =0; 
-          for ( CscStripPrepDataCollection::const_iterator idig=collection->begin();
-                idig!=collection->end(); ++idig ) {
-            const CscStripPrepData& dig = **idig;
-            Identifier did = dig.identify();
-            if (did ==channelId) {
-              IsThisStripDecoded =1;
-              break;
-            }
-          }
-          if (IsThisStripDecoded) continue;
-
-          int measuresPhi    = m_muonIdHelperTool->cscIdHelper().measuresPhi(channelId);
-
-          Amg::Vector2D localWirePos1( descriptor->xCoordinateInTrackingFrame(channelId ),0.);
-
- 
-          int chamberLayer   = m_muonIdHelperTool->cscIdHelper().chamberLayer(channelId);
-          float stripWidth   = descriptor->cathodeReadoutPitch( chamberLayer, measuresPhi );
-          double errPos      = stripWidth / sqrt(12.0);
-                
-          AmgSymMatrix(2) covariance;
-          covariance.setIdentity();
-          covariance *= errPos*errPos;
-          Amg::MatrixX * errClusterPos = new Amg::MatrixX(covariance);
-
-          /** new CscPrepRawData */
-          CscStripPrepData * newPrepData = new CscStripPrepData(  channelId,
-                                                                  cscHashId,
-                                                                  localWirePos1,
-                                                                  errClusterPos,
-                                                                  descriptor,
-                                                                  charges,
-                                                                  timeOfFirstSample,
-                                                                  samplingTime);
-          
-          if (samplingPhase) newPrepData->set_samplingPhase();
-          newPrepData->setHashAndIndex(collection->identifyHash(), collection->size());
-          collection->push_back(newPrepData);
-
-        }
-      }
-      // Record the container after looping through all the RDO data in this RDO collection
-      StatusCode status_lock = lock.addOrDelete(std::move( collection ) );
-      if (status_lock.isFailure()) {
-        ATH_MSG_ERROR ( "Could not insert CscStripPrepdataCollection into CscStripPrepdataContainer..." );
-        return StatusCode::FAILURE;
-      }
-      decodedIdhs.push_back(cscHashId);
-    }
-  }
-  return  StatusCode::SUCCESS;
-}
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.h
index aacbf864131ce7eb712b55cf7b449dba699b6079..88c4ba2e7b4ae79ad104332d942c28752c500d69 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.h
@@ -6,7 +6,6 @@
 #define MUONCSC_CNVTOOLS_CSCRDOTOCSCPREPDATATOOLMT_H 
 
 #include "CscRdoToCscPrepDataToolCore.h"
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 
 #include <string>
 
@@ -41,14 +40,6 @@ namespace Muon {
     using CscRdoToCscPrepDataToolCore::decode;
     
     virtual StatusCode decode(std::vector<IdentifierHash>& givenIdhs, std::vector<IdentifierHash>& decodedIdhs) override;
-    virtual StatusCode decode(const CscRawDataContainer* rdoContainer, IdentifierHash givenHashId, std::vector<IdentifierHash>& decodedIdhs) override;
-    virtual StatusCode decode(const CscRawDataContainer* rdoContainer, std::vector<IdentifierHash>& decodedIdhs) override;
-
-
-
-  private:
-    /// This is the key for the cache for the CSC PRD containers, can be empty
-    SG::UpdateHandleKey<CscStripPrepDataCollection_Cache> m_prdContainerCacheKey ;
   };
 }
 #endif /// MUONCSC_CNVTOOL_CSCRDOTOCSCPREPDATA_H
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
index 7922a9a7a6c4035315638e921cc6eec07d2658d8..c384bb51b6a9b2e0d35e7ba355e14be678e86579 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
@@ -54,6 +54,7 @@ Muon::MdtRdoToPrepDataToolCore::MdtRdoToPrepDataToolCore(const std::string& t,
   //  template for property decalration
   declareProperty("CalibratePrepData",   m_calibratePrepData = true );
   declareProperty("DecodeData",          m_decodeData = true ); 
+  declareProperty("SortPrepData",        m_sortPrepData = false );
   
   // + TWIN TUBE
   declareProperty("UseTwin",                 m_useTwin = true);
@@ -223,75 +224,69 @@ void Muon::MdtRdoToPrepDataToolCore::processRDOContainer( std::vector<Identifier
   const MdtCsmContainer* rdoContainer = getRdoContainer();
   if(!rdoContainer) {
     return;                                        
-  }    
-
-  // It is more practical to loop through all the hashes rather than all RDO elements
-  // as we benefit from handling the 2 RDO to 1 PRD special case
-  for(unsigned int iHash = 0; iHash < m_muonIdHelperTool->mdtIdHelper().module_hash_max(); iHash++){
-    handlePRDHash( IdentifierHash(iHash), *rdoContainer, idWithDataVect);
+  }                 
+  // unseeded mode
+  for (MdtCsmContainer::const_iterator rdoColli = rdoContainer->begin(); rdoColli!=rdoContainer->end(); ++rdoColli) {
+    
+    auto rdoColl = *rdoColli;
+    if (rdoColl->empty()) continue;
+    ATH_MSG_DEBUG("A new csm here with " << rdoColl->size() <<" amt hits inside ");
+    if(processCsm(rdoColl, idWithDataVect).isFailure()) {
+      ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event");
+    }
+  }
+  // finally sort the collections
+  if (m_sortPrepData) {
+    for( auto it = m_mdtPrepDataContainer->begin();it != m_mdtPrepDataContainer->end(); ++it) {
+      sortMdtPrdCollection(*it);
+    }
   }
+}
 
+void Muon::MdtRdoToPrepDataToolCore::sortMdtPrdCollection( const Muon::MdtPrepDataCollection* col ){
+  // this method is using nasty const_casts - we should get rid of them if possible
+  if(!col) return;
+  const_cast<Muon::MdtPrepDataCollection*>(col)->sort([]( const Muon::MdtPrepData* prd1, const Muon::MdtPrepData* prd2 ) {
+    return prd1->identify() < prd2->identify();
+  });
+  // need to modify indices saved within the sorted PrepData objects
+  for (unsigned short index=0; index < col->size(); ++index) {
+    const_cast<IdentContIndex*>( &(col->at(index)->getHashAndIndex()) )->setObjIndex(index);
+  }
 }
 
 bool Muon::MdtRdoToPrepDataToolCore::handlePRDHash( IdentifierHash hash, const MdtCsmContainer& rdoContainer, std::vector<IdentifierHash>& idWithDataVect ) {
   
-  // Check PRD container for the hash, if it exists, we already decoded fully
-  if( m_mdtPrepDataContainer->tryAddFromCache(hash) ){
-    ATH_MSG_DEBUG("RDO hash " << hash << " already decoded and inside PRD container cache");
+  // if in prep data the chamber already exists ... do nothing
+  if( m_mdtPrepDataContainer->indexFind(hash) != m_mdtPrepDataContainer->end() ){
     return true;
   }
-
   IdentifierHash rdoHash = hash; // before BMEs were installed, RDOs were indexed by offline hashes (same as PRD)
   if (m_BMEpresent) { // after BMEs were installed, the RDOs are indexed by the detectorElement hash of a multilayer
     Identifier elementId;
     IdContext tmp_context = m_muonIdHelperTool->mdtIdHelper().module_context();
     m_muonIdHelperTool->mdtIdHelper().get_id(hash, elementId, &tmp_context);
-
     Identifier multilayerId = m_muonIdHelperTool->mdtIdHelper().multilayerID(elementId, 1); //first multilayer
     IdentifierHash multilayerHash;
     m_muonIdHelperTool->mdtIdHelper().get_detectorElement_hash(multilayerId, multilayerHash);
     rdoHash = multilayerHash;
-
+    
+    // process CSM if data was found
+    MdtCsmContainer::const_iterator rdoColli = rdoContainer.indexFind(rdoHash);
+    if( rdoColli != rdoContainer.end() ) {
+      if ( processCsm(*rdoColli, idWithDataVect).isFailure() ) {
+        ATH_MSG_WARNING("processCsm failed for RDO id " << (unsigned long long)((*rdoColli)->identify().get_compact()));
+        return false;
+      }
+    } else ATH_MSG_DEBUG("handlePRDHash: hash id " << (unsigned int)(hash) << " not found in RDO container");
+    
     // for BMEs there are 2 CSMs per chamber, registered with the hashes of the 2 multilayers
-    // If this is BMEid then we handle two RDO at once, else just one
+    // we've processed only one now, now time for the second
     if (m_muonIdHelperTool->mdtIdHelper().stationName(elementId) == m_BMEid) {
-      Identifier multilayerId2 = m_muonIdHelperTool->mdtIdHelper().multilayerID(elementId, 2); //second multilayer
-      IdentifierHash multilayerHash2;
-      m_muonIdHelperTool->mdtIdHelper().get_detectorElement_hash(multilayerId2, multilayerHash2);
-      IdentifierHash rdoHash2 = multilayerHash2;
-      // Retrieve the two RDO
-      MdtCsmContainer::const_iterator rdoColli  = rdoContainer.indexFind(rdoHash);
-      MdtCsmContainer::const_iterator rdoColli2 = rdoContainer.indexFind(rdoHash2);
-      if( rdoColli != rdoContainer.end() && rdoColli2 != rdoContainer.end() ) {
-        // Handle both at once
-        if(processCsm(*rdoColli, idWithDataVect, *rdoColli2).isFailure()){
-          ATH_MSG_WARNING("processCsm failed for RDO id " 
-            << (unsigned long long)((*rdoColli)->identify().get_compact()) << " and " 
-            << (unsigned long long)((*rdoColli2)->identify().get_compact()));
-          return false;
-        }
-      }
-      else if(rdoColli != rdoContainer.end()){
-        // Handle just one
-        ATH_MSG_WARNING("Only one RDO container was found for hash " << hash << " despite BME - Missing " << rdoHash2 );
-        if ( processCsm(*rdoColli, idWithDataVect).isFailure() ) {
-          ATH_MSG_WARNING("processCsm failed for RDO id " << (unsigned long long)((*rdoColli)->identify().get_compact()));
-          return false;
-        }
-      }
-      else if(rdoColli2 != rdoContainer.end()){
-        // Handle just one
-        ATH_MSG_WARNING("Only one RDO container was found for hash " << hash << " despite BME - Missing " << rdoHash );
-        if ( processCsm(*rdoColli2, idWithDataVect).isFailure() ) {
-          ATH_MSG_WARNING("processCsm failed for RDO id " << (unsigned long long)((*rdoColli)->identify().get_compact()));
-          return false;
-        }
-      }
-      else{
-        ATH_MSG_WARNING("handlePRDHash: hash id " << hash << " not found in RDO container, and is BME - Missing " << rdoHash << " " << rdoHash2);
-      }
-    } // End of m_BMEpresent
-    else{
+      multilayerId = m_muonIdHelperTool->mdtIdHelper().multilayerID(elementId, 2); //second multilayer
+      m_muonIdHelperTool->mdtIdHelper().get_detectorElement_hash(multilayerId, multilayerHash);
+      rdoHash = multilayerHash;
+      
       // process CSM if data was found
       MdtCsmContainer::const_iterator rdoColli = rdoContainer.indexFind(rdoHash);
       if( rdoColli != rdoContainer.end() ) {
@@ -300,7 +295,8 @@ bool Muon::MdtRdoToPrepDataToolCore::handlePRDHash( IdentifierHash hash, const M
           return false;
         }
       } else ATH_MSG_DEBUG("handlePRDHash: hash id " << (unsigned int)(hash) << " not found in RDO container");
-    } 
+      
+    }
   } else { // using pre-BME data
     // process CSM if data was found
     MdtCsmContainer::const_iterator rdoColli = rdoContainer.indexFind(rdoHash);
@@ -311,7 +307,14 @@ bool Muon::MdtRdoToPrepDataToolCore::handlePRDHash( IdentifierHash hash, const M
       }
     } else ATH_MSG_DEBUG("handlePRDHash: hash id " << (unsigned int)(hash) << " not found in RDO container");
   }
-
+  
+  // sort hits in the collection
+  if (m_sortPrepData) {
+    auto it = m_mdtPrepDataContainer->indexFind(hash);
+    if( it != m_mdtPrepDataContainer->end() ) {
+      sortMdtPrdCollection(*it);
+    }
+  }
   return true;
 }
 
@@ -454,7 +457,7 @@ void Muon::MdtRdoToPrepDataToolCore::printPrepData(  )
   
 }
 
-StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std::vector<IdentifierHash>& idWithDataVect, const MdtCsm *rdoColl2 ) {
+StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std::vector<IdentifierHash>& idWithDataVect) {
   
   // first handle the case of twin tubes
   if(m_useTwin){
@@ -470,39 +473,21 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
   
   ATH_MSG_DEBUG(" ***************** Start of processCsm");
 
-  // Make some checks if we are in special circumstances
-  if(rdoColl2){
-    Identifier elementId1 = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl->identify());
-    Identifier elementId2 = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl2->identify());
-    IdContext mdtContext  = m_muonIdHelperTool->mdtIdHelper().module_context();
-    IdentifierHash hash1, hash2;
-    m_muonIdHelperTool->mdtIdHelper().get_hash(elementId1, hash1, &mdtContext);
-    m_muonIdHelperTool->mdtIdHelper().get_hash(elementId2, hash2, &mdtContext);
-    ATH_MSG_DEBUG("Special case with 2 RDO going into 1 PRD - ID1 " << elementId1 
-      << " ID2 " << elementId2 << " hash 1 " << hash1 << " hash 2 " << hash2 );
-    // These should have the same PRD MDT hash otherwise we need to understand why we are here
-    if(hash1 != hash2){
-      ATH_MSG_ERROR("Hash1 and Hash2 are different for special case : " << hash1 << " " << hash2);
-      return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG(" Number of AmtHit in this Csm (1) " << rdoColl->size()  <<" CSM id is "<<m_idHelper->toString(elementId1));
-    ATH_MSG_DEBUG(" Number of AmtHit in this Csm (2) " << rdoColl2->size() <<" CSM id is "<<m_idHelper->toString(elementId2));
-  }
-
   /// MDT hit context
   //IdContext hitContext = m_muonIdHelperTool->mdtIdHelper().channel_context();
   Identifier elementId = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl->identify());
-  
+
   // prepare the special case of two chamber connected to the same CSM
   // create objects but do not initialize them
   bool doubleCsmFound = false;
   bool doubleCsm = false;
 
   Identifier secondElementId;
+  MdtPrepDataCollection* secondDriftCircleColl = NULL;
   IdentifierHash secondMdtHashId;
 
-  if(!rdoColl2)
-    ATH_MSG_DEBUG(" Number of AmtHit in this Csm " << rdoColl->size() <<" CSM id is "<<m_idHelper->toString(elementId));
+  ATH_MSG_DEBUG(" Number of AmtHit in this Csm "
+                << rdoColl->size() <<" CSM id is "<<m_idHelper->toString(elementId));
 
   uint16_t subdetId = rdoColl->SubDetId();
   uint16_t mrodId = rdoColl->MrodId();
@@ -523,21 +508,34 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
   }
   ATH_MSG_VERBOSE("HashId = "<<(int)mdtHashId);
 
-  std::unique_ptr<MdtPrepDataCollection> driftCircleColl = nullptr;
-  std::unique_ptr<MdtPrepDataCollection> secondDriftCircleColl = nullptr;
+  MdtPrepDataCollection * driftCircleColl = NULL;
 
-  // Check the IDC cache (no write handles here)
-  if( m_mdtPrepDataContainer->tryAddFromCache(mdtHashId) ){
-    // The collection is in the container so we should not process anything (true for elevator chambers)
-    ATH_MSG_DEBUG("In ProcessCSM - collection already contained in IDC " << elementId << " " << mdtHashId);
-    // But instead of returning, we will process in case this RDO has two possible PRD and we only decoded one
+  if ( m_mdtPrepDataContainer->indexFind(mdtHashId) != m_mdtPrepDataContainer->end() ) {
+    // for elevator chambers there are 2 CSMs to be filled in the same collection
+    if ( m_muonIdHelperTool->mdtIdHelper().stationName(elementId) == m_BMEid && m_BMEpresent) {
+      driftCircleColl = const_cast<MdtPrepDataCollection*>(&(**m_mdtPrepDataContainer->indexFind(mdtHashId)));
+      ATH_MSG_DEBUG("In ProcessCSM - collection already contained in IDC, but BME! Taking it.");
+    } 
+    else {
+      ATH_MSG_DEBUG("In ProcessCSM - collection already contained in IDC");
+      return StatusCode::FAILURE;
+    }
   }
-  // Create new collection 
-  else{
-    driftCircleColl.reset( new MdtPrepDataCollection( mdtHashId ) );
+  // create new collection + add it if there's nothing yet (also for the first CSM of a elevator chambers)
+  else { 
+    driftCircleColl = new MdtPrepDataCollection(mdtHashId);
     idWithDataVect.push_back(mdtHashId);
     driftCircleColl->setIdentifier(elementId);
-    ATH_MSG_DEBUG("Created MdtPrepDataCollection (not found in cache) " << mdtHashId);
+    ATH_MSG_DEBUG("A new MdtPrepDataCollection here with hashId " << (unsigned int)mdtHashId);
+    //MdtPrepDataContainer::KEY key = m_mdtPrepDataContainer->key(elementId);
+
+    if (StatusCode::SUCCESS != m_mdtPrepDataContainer->addCollection(driftCircleColl, mdtHashId)) {
+      ATH_MSG_DEBUG("In ProcessCSM - Couldn't record in the Container MDT Drift Circle Collection with hashID = "
+                    << (int)mdtHashId <<" ext. id = "
+                    << m_idHelper->toString(elementId));
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG("MdtPrepDataCollection added to the container");
   }
 
   // for each Csm, loop over AmtHit, converter AmtHit to digit
@@ -546,7 +544,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
   MdtCsm::const_iterator itD_e = rdoColl->end();
 
   int mc = 0;
-  for (; itD!=itD_e; ) {
+  for (; itD!=itD_e; ++itD) {
     mc++;
     const MdtAmtHit * amtHit = (*itD);
 
@@ -564,7 +562,6 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
       ATH_MSG_WARNING("Found issue MDT RDO decoder for subdetId/mrodId/csmId "
                       <<subdetId<<"/"<<mrodId<<"/"<<csmId<<" amtHit channelId/tdcId ="
                       <<amtHit->channelId()<<"/"<<amtHit->tdcId());
-      ++itD;
       continue;
     }
 
@@ -577,7 +574,6 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
         if( std::find( (myIt->second).begin(), (myIt->second).end(), channelId) != (myIt->second).end() ) {
           ATH_MSG_DEBUG("processCsm : Deleting BMG digit with identifier" << m_muonIdHelperTool->mdtIdHelper().show_to_string(channelId) );
           delete newDigit;
-	  ++itD;
           continue;
         }
       }
@@ -621,16 +617,22 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
           }
           ATH_MSG_VERBOSE("HashId = "<<(int) secondMdtHashId);
 
-          // If we got to here we need to inspect the cache and create or nullptr
-          if( m_mdtPrepDataContainer->tryAddFromCache(secondMdtHashId) ){
+          if (m_mdtPrepDataContainer->indexFind(secondMdtHashId)!=m_mdtPrepDataContainer->end()) {
             ATH_MSG_DEBUG("In ProcessCSM - collection already contained in IDC");
-            // Proceed with the nullptr
+            return StatusCode::FAILURE;
           }
-          else{
-            secondDriftCircleColl.reset( new MdtPrepDataCollection(secondMdtHashId) );
-            idWithDataVect.push_back(secondMdtHashId);
-            secondDriftCircleColl->setIdentifier(secondElementId);
-            ATH_MSG_DEBUG("Created second MdtPrepDataCollection (not found in cache) " << secondMdtHashId);
+
+          secondDriftCircleColl = new MdtPrepDataCollection(secondMdtHashId);
+          idWithDataVect.push_back(secondMdtHashId);
+          secondDriftCircleColl->setIdentifier(secondElementId);
+
+          ATH_MSG_DEBUG("A new MdtPrepDataCollection here with hashId " << (unsigned int)secondMdtHashId);
+
+          if (StatusCode::SUCCESS != m_mdtPrepDataContainer->addCollection(secondDriftCircleColl, secondMdtHashId)) {
+            ATH_MSG_DEBUG("In ProcessCSM - Couldn't record in the Container MDT Drift Circle Collection with hashID = "
+                          << (int)secondMdtHashId <<" ext. id = "
+                          << m_idHelper->toString(secondElementId));
+            return StatusCode::FAILURE;
           }
         } 
       }
@@ -649,7 +651,6 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
       ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
                       <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
       delete newDigit;
-      ++itD;
       continue;
     }
     if (!descriptor->containsId(channelId)) {
@@ -657,7 +658,6 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
                       <<" does not contains candidate prd Identifier <"
                       <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
       delete newDigit;
-      ++itD;
       continue;
     }
       
@@ -684,73 +684,29 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
     IdentifierHash hashId;
 
     if ( (!doubleCsmFound) || (!doubleCsm) ) {
-      collectionToBeUpdated = driftCircleColl.get();
+      collectionToBeUpdated = driftCircleColl;
       hashId = mdtHashId;
     }
     else {
-      collectionToBeUpdated = secondDriftCircleColl.get();
+      collectionToBeUpdated = secondDriftCircleColl;
       hashId = secondMdtHashId;
     }
 
-    // We can make the MdtPrepData, but only if our collection is being used (ie not null)
-    if(collectionToBeUpdated){
-      MdtPrepData* newPrepData = new MdtPrepData(channelId,
-                                                 hashId,
-                                                 driftRadius,
-                                                 cov,
-                                                 descriptor,
-                                                 newDigit->tdc(),
-                                                 newDigit->adc(),
-                                                 digitStatus);
-
-      newPrepData->setHashAndIndex(collectionToBeUpdated->identifyHash(), collectionToBeUpdated->size());
-      collectionToBeUpdated->push_back(newPrepData);
-    }
+    MdtPrepData* newPrepData = new MdtPrepData(channelId,
+                                               hashId,
+                                               driftRadius,
+                                               cov,
+                                               descriptor,
+                                               newDigit->tdc(),
+                                               newDigit->adc(),
+                                               digitStatus);
+
+    newPrepData->setHashAndIndex(collectionToBeUpdated->identifyHash(), collectionToBeUpdated->size());
+    collectionToBeUpdated->push_back(newPrepData);
 
     delete newDigit;
 
-    // Special case when we need to process two RDO for one PRD in a single pass
-    ++itD;
-    // Check if we have two containers
-    if(rdoColl2){
-      // Check finished the first collection (second pass is handled by for-loop end condition)
-      if(itD == rdoColl->end()){
-        ATH_MSG_DEBUG("RDO collection 1 is processed - Iterators moving to RDO collection 2");
-        // Update our iterators and continue processing
-        itD   = rdoColl2->begin();
-        itD_e = rdoColl2->end();
-        mc = 0; // for logging
-      }
-    }
   }
-  // At the end, we finally tell the cache we will be putting collections into it
-  if(driftCircleColl){
-    MdtPrepDataContainer::IDC_WriteHandle lock = m_mdtPrepDataContainer->getWriteHandle( mdtHashId );
-    if( !lock.alreadyPresent() ){
-      StatusCode status_lock = lock.addOrDelete(std::move( driftCircleColl ));
-      if (status_lock.isFailure()) {
-        ATH_MSG_ERROR ( "Could not insert MdtCsmPrepdataCollection into MdtCsmPrepdataContainer..." );
-        return StatusCode::FAILURE;
-      }
-    }
-    else{
-      ATH_MSG_DEBUG("MdtCsmPrepdataCollection already inside MdtCsmPrepdataContainer " << mdtHashId);
-    }
-  }
-  if(secondDriftCircleColl){
-    MdtPrepDataContainer::IDC_WriteHandle lock = m_mdtPrepDataContainer->getWriteHandle( secondMdtHashId );
-    if( !lock.alreadyPresent() ){
-      StatusCode status_lock = lock.addOrDelete(std::move( secondDriftCircleColl ));
-      if (status_lock.isFailure()) {
-        ATH_MSG_ERROR ( "Could not insert MdtCsmPrepdataCollection into MdtCsmPrepdataContainer..." );
-        return StatusCode::FAILURE;
-      }
-    }
-    else{
-      ATH_MSG_DEBUG("MdtCsmPrepdataCollection already inside MdtCsmPrepdataContainer " << secondMdtHashId);
-    }
-  }
-
   return StatusCode::SUCCESS;
 }
 
@@ -786,17 +742,24 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
   }
   ATH_MSG_VERBOSE("HashId = "<<(int)mdtHashId);
 
-  // Check the IDC cache (no write handles here)
-  MdtPrepDataContainer::IDC_WriteHandle lock = m_mdtPrepDataContainer->getWriteHandle( mdtHashId );
-  if( lock.alreadyPresent() ){
-    ATH_MSG_DEBUG("MdtPrepDataCollection already contained in IDC " << elementId << " " << mdtHashId);
-    return StatusCode::SUCCESS;
-  }  
-  
-  std::unique_ptr<MdtPrepDataCollection> driftCircleColl ( new MdtPrepDataCollection( mdtHashId ) );
+  if (m_mdtPrepDataContainer->indexFind(mdtHashId)!=m_mdtPrepDataContainer->end()) {
+    ATH_MSG_DEBUG("In ProcessCSM - collection already contained in IDC");
+    return StatusCode::FAILURE;
+  }
+
+  MdtPrepDataCollection * driftCircleColl = new MdtPrepDataCollection(mdtHashId);
   idWithDataVect.push_back(mdtHashId);
   driftCircleColl->setIdentifier(elementId);
-  ATH_MSG_DEBUG("Created MdtPrepDataCollection (not found in cache) " << mdtHashId);
+  ATH_MSG_DEBUG("A new MdtPrepDataCollection here with hashId " << (unsigned int)mdtHashId);
+  //MdtPrepDataContainer::KEY key = m_mdtPrepDataContainer->key(elementId);
+
+  if (StatusCode::SUCCESS != m_mdtPrepDataContainer->addCollection(driftCircleColl, mdtHashId)) {
+    ATH_MSG_DEBUG("In ProcessCSMtwin - Couldn't record in the Container MDT Drift Circle Collection with hashID = "
+                  << (int)mdtHashId <<" ext. id = "
+                  << m_idHelper->toString(elementId));
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("MdtPrepDataCollection added to the container");
 
   // for each Csm, loop over AmtHit, converter AmtHit to digit
   // retrieve/create digit collection, and insert digit into collection
@@ -1272,15 +1235,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
     }
       
       
-  } // end for( iter_map = mdtDigitColl.begin(); iter_map != mdtDigitColl.end(); iter_map++ )
+  } // end for( iter_map = mdtDigitColl.begin(); iter_map != mdtDigitColl.end(); iter_map++ ) {
+    
     
-  // Finished decoding RDO to PRD, so now we record the collection in the container
-  StatusCode status_lock = lock.addOrDelete(std::move( driftCircleColl ));
-  if (status_lock.isFailure()) {
-    ATH_MSG_ERROR ( "Could not insert MdtCsmPrepdataCollection into MdtCsmPrepdataContainer..." );
-    return StatusCode::FAILURE;
-  }
-
   return StatusCode::SUCCESS;
 }
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h
index 444b22d278f1a8cd2310c0ff9142a622b09e322a..798dbb313362f787ba9f126e396570f3597724de 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h
@@ -78,12 +78,12 @@ namespace Muon
     //new decode method for Rob based readout
     StatusCode decode( const std::vector<uint32_t>& robIds ) override;
      
-    virtual StatusCode processCsm(const MdtCsm *rdoColl, std::vector<IdentifierHash>& idWithDataVect, const MdtCsm *rdoColl2 = nullptr);
+    StatusCode processCsm(const MdtCsm *rdoColl, std::vector<IdentifierHash>& idWithDataVect);
 
     Muon::MdtDriftCircleStatus getMdtDriftRadius(const MdtDigit * digit, double& radius, double& errRadius, const MuonGM::MdtReadoutElement * descriptor);
  
     // + TWIN TUBE
-    virtual StatusCode processCsmTwin(const MdtCsm *rdoColll, std::vector<IdentifierHash>& idWithDataVect);
+    StatusCode processCsmTwin(const MdtCsm *rdoColll, std::vector<IdentifierHash>& idWithDataVect);
     // method to get the twin tube 2nd coordinate
     Muon::MdtDriftCircleStatus getMdtTwinPosition(const MdtDigit * prompt_digit, const MdtDigit * twin_digit, 
                                                   double& radius, double& errRadius, 
@@ -113,6 +113,7 @@ namespace Muon
     const MdtCsmContainer* getRdoContainer();
     void processPRDHashes( const std::vector<IdentifierHash>& chamberHashInRobs, std::vector<IdentifierHash>& idWithDataVect );
     bool handlePRDHash( IdentifierHash hash, const MdtCsmContainer& rdoContainer, std::vector<IdentifierHash>& idWithDataVect );
+    void sortMdtPrdCollection( const Muon::MdtPrepDataCollection* col );
   
     /// Muon Detector Descriptor
     const MuonGM::MuonDetectorManager * m_muonMgr;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx
index 940390f0f237fd8ab186802890fc1bfb410b4a45..0d1831eba5b4a75701e69b21e08d3ef835db9ad4 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx
@@ -14,7 +14,6 @@ Muon::MdtRdoToPrepDataToolMT::MdtRdoToPrepDataToolMT(const std::string& t, const
   AthAlgTool(t,n,p),
   MdtRdoToPrepDataToolCore(t,n,p)
 {
-  declareProperty("MdtPrdContainerCacheKey", m_prdContainerCacheKey, "Optional external cache for the MDT PRD container");
 }
 
 Muon::MdtRdoToPrepDataToolMT::~MdtRdoToPrepDataToolMT()
@@ -25,7 +24,6 @@ StatusCode Muon::MdtRdoToPrepDataToolMT::initialize()
 {    
     ATH_MSG_VERBOSE("Starting init");
     ATH_CHECK( MdtRdoToPrepDataToolCore::initialize() );
-    ATH_CHECK( m_prdContainerCacheKey.initialize( !m_prdContainerCacheKey.key().empty() ) );
     ATH_MSG_DEBUG("initialize() successful in " << name());
     return StatusCode::SUCCESS;
 }
@@ -37,37 +35,16 @@ StatusCode Muon::MdtRdoToPrepDataToolMT::finalize()
 
 Muon::MdtRdoToPrepDataToolMT::SetupMdtPrepDataContainerStatus Muon::MdtRdoToPrepDataToolMT::setupMdtPrepDataContainer()
 {
+  // MT version of this method always adds container. Caching will be added later.
   m_fullEventDone=false;
 
   SG::WriteHandle< Muon::MdtPrepDataContainer >handle(m_mdtPrepDataContainerKey);
+  StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(m_muonIdHelperTool->mdtIdHelper().module_hash_max()));
 
-  // Caching of PRD container
-  const bool externalCachePRD = !m_prdContainerCacheKey.key().empty();
-  if (!externalCachePRD) {
-    // without the cache we just record the container
-    StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(m_muonIdHelperTool->mdtIdHelper().module_hash_max()));
-    if (status.isFailure() || !handle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of MDT PrepData Container at " << m_mdtPrepDataContainerKey.key()); 
-      return FAILED;
-    }
-    ATH_MSG_DEBUG("Created container " << m_mdtPrepDataContainerKey.key());
-  } 
-  else {
-    // use the cache to get the container
-    SG::UpdateHandle<MdtPrepDataCollection_Cache> update(m_prdContainerCacheKey);
-    if (!update.isValid()){
-      ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
-      return FAILED;
-    }
-    StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(update.ptr()));
-    if (status.isFailure() || !handle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of MDT PrepData Container using cache " 
-        << m_prdContainerCacheKey.key() << " - " <<m_mdtPrepDataContainerKey.key()); 
-      return FAILED;
-    }
-    ATH_MSG_DEBUG("Created container using cache for " << m_prdContainerCacheKey.key());
+  if (status.isFailure() || !handle.isValid() ) 	{
+    ATH_MSG_FATAL("Could not record container of MDT PrepData Container at " << m_mdtPrepDataContainerKey.key());	
+    return FAILED;
   }
-  // Pass the container from the handle
   m_mdtPrepDataContainer = handle.ptr();
   return ADDED;
 }
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h
index 645d933bad0097c9019edd183c004f65ba5b38e2..e7aa05e8868ddf88e6e22bb9b43402d3eef72c6f 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h
@@ -10,7 +10,6 @@
 #define MUONMdtRdoToPrepDataToolMT_H
 
 #include "MdtRdoToPrepDataToolCore.h"
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 
 namespace Muon 
 {
@@ -42,10 +41,6 @@ namespace Muon
       
   protected:
     virtual SetupMdtPrepDataContainerStatus setupMdtPrepDataContainer() override;
-
-  private:
-    /// This is the key for the cache for the MDT PRD containers, can be empty
-    SG::UpdateHandleKey<MdtPrepDataCollection_Cache> m_prdContainerCacheKey ;
   }; 
 } // end of namespace
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.cxx
index 753cd4c2b7150e9babc780b3a3d4b58ffe40b521..74063d8425e8ccf60a8f89589e4c0de802fd3f88 100644
--- a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.cxx
@@ -3,7 +3,7 @@
 */
 
 ///////////////////////////////////////////////////////////////////
-// MMRdoToPrepDataTool.cxx, (c) ATLAS Detector software
+// MdtRdoToPrepDataTool.cxx, (c) ATLAS Detector software
 ///////////////////////////////////////////////////////////////////
 
 #include "MmRdoToPrepDataToolMT.h"
@@ -16,7 +16,6 @@ Muon::MmRdoToPrepDataToolMT::MmRdoToPrepDataToolMT(const std::string& t,
   AthAlgTool(t,n,p),
   MmRdoToPrepDataToolCore(t,n,p)
 {
-  declareProperty("MmPrdContainterCacheKey", m_prdContainerCacheKey, "Optional external cache for the MM PRD container");
 }
 
 
@@ -28,7 +27,6 @@ StatusCode Muon::MmRdoToPrepDataToolMT::initialize()
 {  
   ATH_MSG_VERBOSE("Starting init");
   ATH_CHECK( MmRdoToPrepDataToolCore::initialize() );
-  ATH_CHECK( m_prdContainerCacheKey.initialize( !m_prdContainerCacheKey.key().empty() ) );
   ATH_MSG_DEBUG("initialize() successful in " << name());
   return StatusCode::SUCCESS;
 }
@@ -42,35 +40,12 @@ Muon::MmRdoToPrepDataToolCore::SetupMM_PrepDataContainerStatus Muon::MmRdoToPrep
 {
   // MT version of this method always adds container. Caching will be added later.
   SG::WriteHandle< Muon::MMPrepDataContainer > handle(m_mmPrepDataContainerKey);
-
-  // Caching of PRD container
-  const bool externalCachePRD = !m_prdContainerCacheKey.key().empty();
-  if (!externalCachePRD) {
-    // without the cache we just record the container
-    StatusCode status = handle.record(std::make_unique<Muon::MMPrepDataContainer>(m_muonIdHelperTool->mmIdHelper().module_hash_max()));
-    if (status.isFailure() || !handle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of MicroMega PrepData Container at " << m_mmPrepDataContainerKey.key()); 
-      return FAILED;
-    }
-    ATH_MSG_DEBUG("Created container " << m_mmPrepDataContainerKey.key());
-  } 
-  else {
-    // use the cache to get the container
-    SG::UpdateHandle<MMPrepDataCollection_Cache> update(m_prdContainerCacheKey);
-    if (!update.isValid()){
-      ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
-      return FAILED;
-    }
-    StatusCode status = handle.record(std::make_unique<Muon::MMPrepDataContainer>(update.ptr()));
-    if (status.isFailure() || !handle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of MicroMega PrepData Container using cache " 
-        << m_prdContainerCacheKey.key() << " - " <<m_mmPrepDataContainerKey.key()); 
-      return FAILED;
-    }
-    ATH_MSG_DEBUG("Created container using cache for " << m_prdContainerCacheKey.key());
+  StatusCode status = handle.record(std::make_unique<Muon::MMPrepDataContainer>(m_muonIdHelperTool->mmIdHelper().module_hash_max()));
+  
+  if (status.isFailure() || !handle.isValid() )   {
+    ATH_MSG_FATAL("Could not record container of MicroMega PrepData Container at " << m_mmPrepDataContainerKey.key()); 
+    return FAILED;
   }
-  // Pass the container from the handle
   m_mmPrepDataContainer = handle.ptr();
-
   return ADDED;
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.h
index 9a48d4b1925f83c9eb700194e56087336014fcea..354e811e6bf8aae336b47f3f6a055a1729cb49b8 100644
--- a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataToolMT.h
@@ -21,8 +21,6 @@
 #include "MuonRDO/MM_RawDataContainer.h"
 
 #include "MuonIdHelpers/MuonIdHelperTool.h"
-  
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 
 #include <string>
 #include <vector>
@@ -60,10 +58,6 @@ namespace Muon
   
   protected:
     virtual SetupMM_PrepDataContainerStatus setupMM_PrepDataContainer() override;
-  
-  private:
-    /// This is the key for the cache for the MM PRD containers, can be empty
-    SG::UpdateHandleKey<MMPrepDataCollection_Cache> m_prdContainerCacheKey ;
   }; 
 } // end of namespace
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
index 83ac5691e8896ea741a7fcc8e39e46c2e066fae6..09d90db716f397cb81ccd94e1d125896bc6fced8 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
@@ -14,8 +14,6 @@ Muon::RpcRdoToPrepDataToolMT::RpcRdoToPrepDataToolMT( const std::string& type, c
   : AthAlgTool( type, name, parent ),
     RpcRdoToPrepDataToolCore( type, name, parent )
 {
-  declareProperty("RpcPrdContainerCacheKey", m_prdContainerCacheKey, "Optional external cache for the RPC RDO container");
-  declareProperty("RpcCoinContainerCacheKey", m_coinContainerCacheKey, "Optional external cache for the RPC Trigger Coin container");
 }
 
 Muon::RpcRdoToPrepDataToolMT::~RpcRdoToPrepDataToolMT()
@@ -26,8 +24,6 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::initialize()
 {
   ATH_MSG_VERBOSE("Starting init");
   ATH_CHECK( RpcRdoToPrepDataToolCore::initialize() );
-  ATH_CHECK( m_prdContainerCacheKey.initialize( !m_prdContainerCacheKey.key().empty() ) );
-  ATH_CHECK( m_coinContainerCacheKey.initialize( !m_coinContainerCacheKey.key().empty() ) );
   ATH_MSG_DEBUG("initialize() successful in " << name());
   return StatusCode::SUCCESS;
 }
@@ -39,75 +35,55 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::finalize()
 
 StatusCode Muon::RpcRdoToPrepDataToolMT::manageOutputContainers(bool& firstTimeInTheEvent)
 {
-  // Redundant
-  firstTimeInTheEvent = false;
-
-  // RPC PRD
+  // MT version of this method always adds container. Caching will be added later.
   SG::WriteHandle< Muon::RpcPrepDataContainer > rpcPrepDataHandle(m_rpcPrepDataContainerKey);
+  if(!rpcPrepDataHandle.isPresent()) {
+    firstTimeInTheEvent = true;
 
-  // Caching of PRD container
-  const bool externalCachePRD = !m_prdContainerCacheKey.key().empty();
-  if (!externalCachePRD) {
-    // without the cache we just record the container
     StatusCode status = rpcPrepDataHandle.record(std::make_unique<Muon::RpcPrepDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
-    if (status.isFailure() || !rpcPrepDataHandle.isValid() )  {
+
+    if (status.isFailure() || !rpcPrepDataHandle.isValid() ) 	{
       ATH_MSG_FATAL("Could not record container of RPC PrepData Container at " << m_rpcPrepDataContainerKey.key());
       return status;
+    } else {
+      m_rpcPrepDataContainer = rpcPrepDataHandle.ptr();
+      ATH_MSG_DEBUG("RPC PrepData Container recorded in StoreGate with key " << m_rpcPrepDataContainerKey.key() << ", " << rpcPrepDataHandle.key());
     }
-    ATH_MSG_DEBUG("Created container " << m_prdContainerCacheKey.key());
-  } 
-  else {
-    // use the cache to get the container
-    SG::UpdateHandle<RpcPrepDataCollection_Cache> update(m_prdContainerCacheKey);
-    if (!update.isValid()){
-      ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
-      return StatusCode::FAILURE;
-    }
-    StatusCode status = rpcPrepDataHandle.record(std::make_unique<Muon::RpcPrepDataContainer>(update.ptr()));
-    if (status.isFailure() || !rpcPrepDataHandle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of RPC PrepData Container using cache " 
-        << m_prdContainerCacheKey.key() << " - " << m_rpcPrepDataContainerKey.key()); 
-      return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG("Created container using cache for " << m_prdContainerCacheKey.key());
-  }
-  // Pass the container from the handle
-  m_rpcPrepDataContainer = rpcPrepDataHandle.ptr();
 
-  // Cache for the RPC trigger coin
-  if(m_producePRDfromTriggerWords){
-    // RPC Trigger Coin
-    SG::WriteHandle< Muon::RpcCoinDataContainer > rpcCoinDataHandle(m_rpcCoinDataContainerKey);
-    // Caching of trigger coin container
-    const bool externalCacheTriggerCoin = !m_coinContainerCacheKey.key().empty();
-    if(!externalCacheTriggerCoin){
-      StatusCode status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
-      if (status.isFailure() || !rpcCoinDataHandle.isValid() )  {
+    if (m_producePRDfromTriggerWords){
+      /// create an empty RPC trigger hit container for filling
+      SG::WriteHandle< Muon::RpcCoinDataContainer > rpcCoinDataHandle(m_rpcCoinDataContainerKey);
+      status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
+
+      if (status.isFailure() || !rpcCoinDataHandle.isValid() ) 	{
         ATH_MSG_FATAL("Could not record container of RPC TrigCoinData Container at " << m_rpcCoinDataContainerKey.key());
         return status;
-      }
-      // Clean if it was created
-      m_decodedOfflineHashIds.clear();
-      m_decodedRobIds.clear();
-    }
-    else{
-      // use the cache to get the container
-      SG::UpdateHandle<RpcCoinDataCollection_Cache> update(m_coinContainerCacheKey);
-      if (!update.isValid()){
-        ATH_MSG_FATAL("Invalid UpdateHandle " << m_coinContainerCacheKey.key());
-        return StatusCode::FAILURE;
-      }
-      StatusCode status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(update.ptr()));
-      if (status.isFailure() || !rpcCoinDataHandle.isValid() )   {
-        ATH_MSG_FATAL("Could not record container of RPC TrigCoinData Container using cache " 
-          << m_coinContainerCacheKey.key() << " - " << m_rpcCoinDataContainerKey.key()); 
+      } else {
+        m_rpcCoinDataContainer = rpcCoinDataHandle.ptr();
+	ATH_MSG_DEBUG("RPC TrigCoinData Container recorded in StoreGate with key " << m_rpcCoinDataContainerKey.key());
+      }      
+      ATH_MSG_VERBOSE(" RpcCoinDataContainer created");
+    } 
+    m_decodedOfflineHashIds.clear();
+    m_decodedRobIds.clear();
+
+  }
+  else{
+    const Muon::RpcPrepDataContainer* rpcPrepDataContainer_c;
+    ATH_CHECK( evtStore()->retrieve (rpcPrepDataContainer_c, m_rpcPrepDataContainerKey.key()) );
+    m_rpcPrepDataContainer = const_cast<Muon::RpcPrepDataContainer*> (rpcPrepDataContainer_c);
+    ATH_MSG_DEBUG("RPC PrepData Container is already in StoreGate ");
+    if (m_producePRDfromTriggerWords){
+      SG::WriteHandle< Muon::RpcCoinDataContainer > rpcCoinDataHandle(m_rpcCoinDataContainerKey);
+      if (!rpcCoinDataHandle.isPresent()) {
+        ATH_MSG_FATAL("Muon::RpcPrepDataContainer found while Muon::RpcCoinDataContainer not found in Event Store");
         return StatusCode::FAILURE;
       }
-      ATH_MSG_DEBUG("Created container using cache for " << m_rpcCoinDataContainerKey.key());
+      const Muon::RpcCoinDataContainer* rpcCoinDataContainer_c;
+      ATH_CHECK( evtStore()->retrieve (rpcCoinDataContainer_c, m_rpcCoinDataContainerKey.key()) );
+      m_rpcCoinDataContainer = const_cast<Muon::RpcCoinDataContainer*> (rpcCoinDataContainer_c);
+      ATH_MSG_DEBUG("RPC CoinData Container is already in StoreGate ");
     }
-    // Pass the container from the handle
-    m_rpcCoinDataContainer = rpcCoinDataHandle.ptr();
   }
-
   return StatusCode::SUCCESS;
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h
index aac8ca04b1ce23935e11fca448741d5c55b0d087..ffb2ac146bb9f077ce44966828b73e3a64950dbd 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.h
@@ -6,8 +6,6 @@
 #define MUONRDOTOPREPDATA_RPCRDOTOPREPDATATOOLMT_H
 
 #include "RpcRdoToPrepDataToolCore.h"
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
-#include "MuonTrigCoinData/MuonTrigCoinData_Cache.h"
 
 namespace Muon {
 
@@ -20,11 +18,6 @@ public:
 
 protected:
   virtual StatusCode manageOutputContainers(bool& firstTimeInTheEvent) override;
-
-private:
-   /// This is the key for the cache for the RPC PRD containers, can be empty
-   SG::UpdateHandleKey<RpcPrepDataCollection_Cache> m_prdContainerCacheKey ;
-   SG::UpdateHandleKey<RpcCoinDataCollection_Cache> m_coinContainerCacheKey ;
 };
 
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt
index dc23846f25f384693a1886b5f270052b4875e153..932a66cb317543859ecbff890859b9eb158049af 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/CMakeLists.txt
@@ -16,14 +16,13 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/Identifier
 			                    Trigger/TrigEvent/TrigSteeringEvent
 			                    DetectorDescription/IRegionSelector 
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData)
+                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData)
 
 # Component(s) in the package:
 atlas_add_component( MuonRdoToPrepData
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib SGtests Identifier TrigSteeringEvent IRegionSelector MuonPrepRawData MuonTrigCoinData AthViews)
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib SGtests Identifier TrigSteeringEvent IRegionSelector MuonPrepRawData AthViews)
 
 # Install files from the package:
 atlas_install_headers( MuonRdoToPrepData )
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx
index 7f5c6973c300dc7cca79d4a9833a319e12e6b2dd..2b017caee850d686323a2bb9ea259045158ba379 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx
@@ -22,9 +22,7 @@ MuonPRDCacheCreator::MuonPRDCacheCreator(const std::string &name,ISvcLocator *pS
    m_RpcCacheKey(""),
    m_TgcCacheKey(""),
    m_sTgcCacheKey(""),
-   m_MmCacheKey(""),
-   m_RpcCoinCacheKey(""),
-   m_TgcCoinCacheKey("")
+   m_MmCacheKey("")
 {
   declareProperty("CscCacheKey",        m_CscCacheKey);
   declareProperty("CscStripCacheKey",   m_CscStripCacheKey);
@@ -33,8 +31,6 @@ MuonPRDCacheCreator::MuonPRDCacheCreator(const std::string &name,ISvcLocator *pS
   declareProperty("TgcCacheKey",        m_TgcCacheKey);
   declareProperty("sTgcCacheKey",       m_sTgcCacheKey);
   declareProperty("MmCacheKey",         m_MmCacheKey);
-  declareProperty("RpcCoinCacheKey",    m_RpcCoinCacheKey);
-  declareProperty("TgcCoinCacheKey",    m_TgcCoinCacheKey);
   declareProperty("DisableViewWarning", m_disableWarning);
 }
 
@@ -50,8 +46,6 @@ StatusCode MuonPRDCacheCreator::initialize() {
   ATH_CHECK( m_TgcCacheKey.initialize( !m_TgcCacheKey.key().empty() ));
   ATH_CHECK( m_sTgcCacheKey.initialize( !m_sTgcCacheKey.key().empty() ));
   ATH_CHECK( m_MmCacheKey.initialize( !m_MmCacheKey.key().empty() ));
-  ATH_CHECK( m_RpcCoinCacheKey.initialize( !m_RpcCoinCacheKey.key().empty() ));
-  ATH_CHECK( m_TgcCoinCacheKey.initialize( !m_TgcCoinCacheKey.key().empty() ));
 
   // Retrieve ID tools
   ATH_CHECK( m_muonIdHelperTool.retrieve() );
@@ -61,7 +55,7 @@ StatusCode MuonPRDCacheCreator::initialize() {
 
 bool MuonPRDCacheCreator::isInsideView(const EventContext& context) const
 {
-   const IProxyDict* proxy = Atlas::getExtendedEventContext(context).proxy();
+   const IProxyDict* proxy = context.getExtension<Atlas::ExtendedEventContext>().proxy();
    const SG::View* view = dynamic_cast<const SG::View*>(proxy);
    return view != nullptr;
 }
@@ -76,58 +70,29 @@ StatusCode MuonPRDCacheCreator::execute (const EventContext& ctx) const {
      m_disableWarning = true; //only check once
   }
 
-  // Create all the cache containers (if the tools are available)
+  // Create all the cache containers
   // CSC
-  if( m_muonIdHelperTool->hasCscIdHelper() ){
-    ATH_CHECK(createContainer(m_CscCacheKey, m_muonIdHelperTool->cscIdHelper().module_hash_max(), ctx));
-    ATH_CHECK(createContainer(m_CscStripCacheKey, m_muonIdHelperTool->cscIdHelper().module_hash_max(), ctx));
-  }
-  if( !m_muonIdHelperTool->hasCscIdHelper() && !m_CscCacheKey.key().empty() ){
-    ATH_MSG_WARNING("CSC ID Helper is not available and CSC PRD cache was requested. This will not be created");
-  }
-
+  ATH_CHECK(createContainer(m_CscCacheKey, m_muonIdHelperTool->cscIdHelper().module_hash_max(), ctx));
+  ATH_CHECK(createContainer(m_CscStripCacheKey, m_muonIdHelperTool->cscIdHelper().module_hash_max(), ctx));
   // MDT
-  if( m_muonIdHelperTool->hasMdtIdHelper() ){
-    auto maxHashMDTs = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME") != -1 ? m_muonIdHelperTool->mdtIdHelper().detectorElement_hash_max() : m_muonIdHelperTool->mdtIdHelper().module_hash_max();
-    ATH_CHECK(createContainer(m_MdtCacheKey, maxHashMDTs, ctx));
-  }
-  if( !m_muonIdHelperTool->hasMdtIdHelper() && !m_MdtCacheKey.key().empty() ){
-    ATH_MSG_WARNING("MDT ID Helper is not available and MDT PRD cache was requested. This will not be created");
-  }
-
+  auto maxHashMDTs = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME") != -1 ? m_muonIdHelperTool->mdtIdHelper().detectorElement_hash_max() : m_muonIdHelperTool->mdtIdHelper().module_hash_max();
+  ATH_CHECK(createContainer(m_MdtCacheKey, maxHashMDTs, ctx));
   // RPC
-  if( m_muonIdHelperTool->hasRpcIdHelper() ){
-    ATH_CHECK(createContainer(m_RpcCacheKey, m_muonIdHelperTool->rpcIdHelper().module_hash_max(), ctx));
-    ATH_CHECK(createContainer(m_RpcCoinCacheKey, m_muonIdHelperTool->rpcIdHelper().module_hash_max(), ctx));
-  }
-  if( !m_muonIdHelperTool->hasRpcIdHelper() && !m_RpcCacheKey.key().empty() ){
-    ATH_MSG_WARNING("RPC ID Helper is not available and RPC PRD cache was requested. This will not be created");
-  }
-
+  ATH_CHECK(createContainer(m_RpcCacheKey, m_muonIdHelperTool->rpcIdHelper().module_hash_max(), ctx));
   // TGC
-  if( m_muonIdHelperTool->hasTgcIdHelper() ){
-    ATH_CHECK(createContainer(m_TgcCacheKey, m_muonIdHelperTool->tgcIdHelper().module_hash_max(), ctx));
-    ATH_CHECK(createContainer(m_TgcCoinCacheKey, m_muonIdHelperTool->tgcIdHelper().module_hash_max(), ctx));
-  }
-  if( !m_muonIdHelperTool->hasTgcIdHelper() && !m_TgcCacheKey.key().empty() ){
-    ATH_MSG_WARNING("TGC ID Helper is not available and TGC PRD cache was requested. This will not be created");
-  }
-
+  ATH_CHECK(createContainer(m_TgcCacheKey, m_muonIdHelperTool->tgcIdHelper().module_hash_max(), ctx));
   // NSW STGC
-  if( m_muonIdHelperTool->hasSTgcIdHelper() ){
-    ATH_CHECK(createContainer(m_sTgcCacheKey, m_muonIdHelperTool->stgcIdHelper().module_hash_max(), ctx));
-  }
-  if( !m_muonIdHelperTool->hasSTgcIdHelper() && !m_sTgcCacheKey.key().empty() ){
-    ATH_MSG_WARNING("STGC ID Helper is not available and STGC PRD cache was requested. This will not be created");
-  }
-
+  ATH_CHECK(createContainer(m_sTgcCacheKey, m_muonIdHelperTool->stgcIdHelper().module_hash_max(), ctx));
   // NSW MM
-  if( m_muonIdHelperTool->hasMmIdHelper() ){
-    ATH_CHECK(createContainer(m_MmCacheKey, m_muonIdHelperTool->mmIdHelper().module_hash_max(), ctx));
-  }
-  if( !m_muonIdHelperTool->hasMmIdHelper() && !m_MmCacheKey.key().empty() ){
-    ATH_MSG_WARNING("MM ID Helper is not available and MM PRD cache was requested. This will not be created");
-  }
+  ATH_CHECK(createContainer(m_MmCacheKey, m_muonIdHelperTool->mmIdHelper().module_hash_max(), ctx));
+
+  ATH_MSG_DEBUG("Created cache container " << m_CscCacheKey );
+  ATH_MSG_DEBUG("Created cache container " << m_CscStripCacheKey );
+  ATH_MSG_DEBUG("Created cache container " << m_MdtCacheKey );
+  ATH_MSG_DEBUG("Created cache container " << m_RpcCacheKey );
+  ATH_MSG_DEBUG("Created cache container " << m_TgcCacheKey );
+  ATH_MSG_DEBUG("Created cache container " << m_sTgcCacheKey );
+  ATH_MSG_DEBUG("Created cache container " << m_MmCacheKey );
 
   return StatusCode::SUCCESS;
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h
index 41b3b48b9a68a7116d834c27400e4e492a7faabc..1a80c0937d02d1b573e80943e247a4330b81a5b0 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h
@@ -8,7 +8,6 @@
 #include "GaudiKernel/ToolHandle.h"
 
 #include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
-#include "MuonTrigCoinData/MuonTrigCoinData_Cache.h"
 #include "MuonIdHelpers/MuonIdHelperTool.h"
 
 
@@ -40,9 +39,6 @@ protected:
   SG::WriteHandleKey<TgcPrepDataCollection_Cache>       m_TgcCacheKey;
   SG::WriteHandleKey<sTgcPrepDataCollection_Cache>      m_sTgcCacheKey;
   SG::WriteHandleKey<MMPrepDataCollection_Cache>        m_MmCacheKey;
-  SG::WriteHandleKey<RpcCoinDataCollection_Cache>       m_RpcCoinCacheKey;
-  SG::WriteHandleKey<TgcCoinDataCollection_Cache>       m_TgcCoinCacheKey;
-
 
   ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
     "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
diff --git a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.cxx
index 07091726e84d15cadc7a71c3975880a8b9c1e90d..c0f744e0ecb67a7492a6c1ed6fc54a878aa7f63d 100644
--- a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.cxx
@@ -17,7 +17,6 @@ Muon::sTgcRdoToPrepDataToolMT::sTgcRdoToPrepDataToolMT(const std::string& t,
   AthAlgTool(t,n,p),
   sTgcRdoToPrepDataToolCore(t,n,p)
 {
-  declareProperty("sTgcPrdContainterCacheKey", m_prdContainerCacheKey, "Optional external cache for the sTGC PRD container");
 }
 
 Muon::sTgcRdoToPrepDataToolMT::~sTgcRdoToPrepDataToolMT()
@@ -28,7 +27,6 @@ StatusCode Muon::sTgcRdoToPrepDataToolMT::initialize()
 {  
   ATH_MSG_VERBOSE("Starting init");
   ATH_CHECK( sTgcRdoToPrepDataToolCore::initialize() );
-  ATH_CHECK( m_prdContainerCacheKey.initialize( !m_prdContainerCacheKey.key().empty() ) );  
   ATH_MSG_DEBUG("initialize() successful in " << name());
   return StatusCode::SUCCESS;
 }
@@ -40,39 +38,20 @@ StatusCode Muon::sTgcRdoToPrepDataToolMT::finalize()
 
 Muon::sTgcRdoToPrepDataToolCore::SetupSTGC_PrepDataContainerStatus Muon::sTgcRdoToPrepDataToolMT::setupSTGC_PrepDataContainer() 
 {
-  m_fullEventDone = false;
 
-  SG::WriteHandle< Muon::sTgcPrepDataContainer > handle(m_stgcPrepDataContainerKey);
-  
-  // Caching of PRD container
-  const bool externalCachePRD = !m_prdContainerCacheKey.key().empty();
-  if (!externalCachePRD) {
-    // without the cache we just record the container
+  if(!evtStore()->contains<Muon::sTgcPrepDataContainer>(m_stgcPrepDataContainerKey.key())){    
+    m_fullEventDone=false;
+    
+    SG::WriteHandle< Muon::sTgcPrepDataContainer > handle(m_stgcPrepDataContainerKey);
     StatusCode status = handle.record(std::make_unique<Muon::sTgcPrepDataContainer>(m_muonIdHelperTool->stgcIdHelper().module_hash_max()));
+    
     if (status.isFailure() || !handle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of sTGC PrepData Container at " << m_stgcPrepDataContainerKey.key()); 
-      return FAILED;
-    }
-    ATH_MSG_DEBUG("Created container " << m_stgcPrepDataContainerKey.key());
-  } 
-  else {
-    // use the cache to get the container
-    SG::UpdateHandle<sTgcPrepDataCollection_Cache> update(m_prdContainerCacheKey);
-    if (!update.isValid()){
-      ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKey.key());
-      return FAILED;
-    }
-    StatusCode status = handle.record(std::make_unique<Muon::sTgcPrepDataContainer>(update.ptr()));
-    if (status.isFailure() || !handle.isValid() )   {
-      ATH_MSG_FATAL("Could not record container of sTGC PrepData Container using cache " 
-        << m_prdContainerCacheKey.key() << " - " <<m_stgcPrepDataContainerKey.key()); 
+      ATH_MSG_FATAL("Could not record container of STGC PrepData Container at " << m_stgcPrepDataContainerKey.key()); 
       return FAILED;
     }
-    ATH_MSG_DEBUG("Created container using cache for " << m_stgcPrepDataContainerKey.key());
-  }
-  // Pass the container from the handle
-  m_stgcPrepDataContainer = handle.ptr();
-
-  return ADDED;
+    m_stgcPrepDataContainer = handle.ptr();
+    return ADDED;
     
+  }
+  return ALREADYCONTAINED;
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.h
index c78bca2c8b66b3253219e55931e8165f95a94843..786cd133730f47e773bc56adfaa8ea5b818a4afd 100644
--- a/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonSTGC_CnvTools/src/sTgcRdoToPrepDataToolMT.h
@@ -18,7 +18,6 @@
 #include "MuonRDO/STGC_RawDataContainer.h"
 #include "MuonPrepRawData/sTgcPrepDataContainer.h"
 #include "MuonIdHelpers/MuonIdHelperTool.h"
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 
 class AtlasDetectorID;
 class Identifier;
@@ -56,10 +55,6 @@ namespace Muon
 
     protected:
       virtual SetupSTGC_PrepDataContainerStatus setupSTGC_PrepDataContainer() override;
-
-    private:
-      /// This is the key for the cache for the sTGC PRD containers, can be empty
-      SG::UpdateHandleKey<sTgcPrepDataCollection_Cache> m_prdContainerCacheKey ;
    }; 
 } // end of namespace
 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx
index 24f53ab5cb67c5361d8feebe7df546e88e601bde..d8f629fbe5c2b8971b6d3e4a194a31e635f74ebf 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx
@@ -14,16 +14,8 @@
 
 Muon::TgcRdoToPrepDataToolMT::TgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p)
   : AthAlgTool(t, n, p), 
-    TgcRdoToPrepDataToolCore(t, n, p),
-    m_prdContainerCacheKeys{"","","",""},
-    m_coinContainerCacheKeys{"","",""},
-    m_prdContainerCacheKeyStr(""),
-    m_coinContainerCacheKeyStr("")
-
+    TgcRdoToPrepDataToolCore(t, n, p)
 {
-  // Declare the cache name as a string because we build the keys in initialise same as done for the containers
-  declareProperty("TgcPrdContainerCacheKey",  m_prdContainerCacheKeyStr, "Optional external cache for the TGC PRD container");
-  declareProperty("TgcCoinContainerCacheKey", m_coinContainerCacheKeyStr, "Optional external cache for the TGC Trigger Coin container");
 }  
 
 Muon::TgcRdoToPrepDataToolMT::~TgcRdoToPrepDataToolMT()
@@ -34,33 +26,6 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::initialize()
 {
   ATH_MSG_VERBOSE("Starting init");
   ATH_CHECK( TgcRdoToPrepDataToolCore::initialize() );
-
-  // Build names for the keys same as done for output containers
-  if(m_prdContainerCacheKeyStr != ""){
-    for(int ibc=0; ibc<NBC+1; ibc++) {      
-      int bcTag=ibc+1;
-      std::ostringstream location;
-      location << m_prdContainerCacheKeyStr << (bcTag==TgcDigit::BC_PREVIOUS ? "PriorBC" : "")
-         << (bcTag==TgcDigit::BC_NEXT ? "NextBC" : "") << (bcTag==(NBC+1) ? "AllBCs" : "");    
-      m_prdContainerCacheKeys.at(ibc) = location.str();
-      ATH_MSG_INFO( location.str() );
-    }
-  }
-
-  if(m_prdContainerCacheKeyStr != ""){
-    for(int ibc=0; ibc<NBC; ibc++) {
-      int bcTag=ibc+1;
-      std::ostringstream location;
-      location << m_coinContainerCacheKeyStr << (bcTag==TgcDigit::BC_PREVIOUS ? "PriorBC" : "")
-               << (bcTag==TgcDigit::BC_NEXT ? "NextBC" : "");
-      m_coinContainerCacheKeys.at(ibc) = location.str();
-      ATH_MSG_INFO( location.str() );
-    }
-  }
-
-  // Only initialise if we passed in the cache name
-  ATH_CHECK( m_prdContainerCacheKeys.initialize( m_prdContainerCacheKeyStr != "" ) );
-  ATH_CHECK( m_coinContainerCacheKeys.initialize( m_prdContainerCacheKeyStr != "" ) );
   ATH_MSG_DEBUG("initialize() successful in " << name());
   return StatusCode::SUCCESS;
 }
@@ -70,8 +35,10 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::finalize()
   return TgcRdoToPrepDataToolCore::finalize();
 }
 
-StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& requestedIdHashVect, std::vector<IdentifierHash>& selectedIdHashVect)
+StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& requestedIdHashVect, 
+  std::vector<IdentifierHash>& selectedIdHashVect)
 {
+  // MT version of this method always adds containers. Caching will be added later.
 
   int sizeVectorRequested = requestedIdHashVect.size();
   ATH_MSG_DEBUG("decode for " << sizeVectorRequested << " offline collections called");
@@ -79,97 +46,67 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& req
   // clear output vector of selected data collections containing data 
   selectedIdHashVect.clear(); 
   
-  // This seems redundant in the MT setup
   bool nothingToDo[NBC+1];  
-  for(int ibc=0; ibc<NBC+1; ibc++){
-    nothingToDo[ibc] = false; 
-  }
-  bool nothingToDoForAllBC = true;
-  for(int ibc=0; ibc<NBC; ibc++) {
-    if(!nothingToDo[ibc]) nothingToDoForAllBC = false;
-  } 
-  // ---
+  for(int ibc=0; ibc<NBC+1; ibc++) nothingToDo[ibc] = false; 
+
   if(!m_tgcCabling) {
     StatusCode status = getCabling();
     if(!status.isSuccess()) return status; 
   }
 
-  // initialize with false - does not need to be inside IBC loop
-  std::fill(m_decodedOnlineId.begin(), m_decodedOnlineId.end(), false);
-
   /// clean up containers for Hits
-  for(int ibc=0; ibc<NBC+1; ibc++) {
-    // PRD
+  for(int ibc=0; ibc<NBC+1; ibc++) {      
+    // initialize with false  
+    std::fill(m_decodedOnlineId.begin(), m_decodedOnlineId.end(), false);
     SG::WriteHandle<TgcPrepDataContainer>  handle(m_outputprepdataKeys[ibc]);
-    // Caching of PRD container
-    const bool externalCachePRD = !m_prdContainerCacheKeys[ibc].key().empty();
-    if (!externalCachePRD) {
-      // without the cache we just record the container
-      StatusCode status = handle.record(std::make_unique<Muon::TgcPrepDataContainer>(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
-      if (status.isFailure() || !handle.isValid() )   {
-        ATH_MSG_FATAL("Could not record container of TGC PrepRawData at " << m_outputprepdataKeys[ibc].key());
-        return StatusCode::FAILURE;;
-      }
-      ATH_MSG_DEBUG("Created container " << m_outputprepdataKeys[ibc].key());
-    } 
-    else {
-      // use the cache to get the container
-      SG::UpdateHandle<TgcPrepDataCollection_Cache> update(m_prdContainerCacheKeys[ibc]);
-      if (!update.isValid()){
-        ATH_MSG_FATAL("Invalid UpdateHandle " << m_prdContainerCacheKeys[ibc].key());
-        return StatusCode::FAILURE;
-      }
-      StatusCode status = handle.record(std::make_unique<Muon::TgcPrepDataContainer>(update.ptr()));
-      if (status.isFailure() || !handle.isValid() )   {
-        ATH_MSG_FATAL("Could not record container of TGC PrepData Container using cache " 
-          << m_prdContainerCacheKeys[ibc].key() << " - " <<m_outputprepdataKeys[ibc].key()); 
-        return StatusCode::FAILURE;
-      }
-      ATH_MSG_DEBUG("Created container using cache for " << m_prdContainerCacheKeys[ibc].key());
-    }
     
+    // record the container in storeGate
+    handle = std::unique_ptr<TgcPrepDataContainer> (new TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
+    // cache the pointer, storegate retains ownership
+    m_tgcPrepDataContainer[ibc] = handle.ptr();
+    if(!handle.isValid()) {
+      ATH_MSG_FATAL("Could not record container of TGC PrepRawData at " << m_outputprepdataKeys[ibc].key());
+      return StatusCode::FAILURE;
+    } else {
+      ATH_MSG_DEBUG("TGC PrepData Container recorded in StoreGate with key " << m_outputprepdataKeys[ibc].key());
+    }
+
     //true: un-seeded mode (no need to decode this event after this execution)
     //false: seeded mode (still need to decode this event even after this execution) 
     m_fullEventDone[ibc] = sizeVectorRequested==0;
 
-    // Pass the container from the handle
-    m_tgcPrepDataContainer[ibc] = handle.ptr();
+    m_decodedRdoCollVec.clear(); // The information of decoded RDO in the previous event is cleared. 
   }
+  
+  // If at least one BC has to do something, nothingToDoForAllBC should be false.  
+  bool nothingToDoForAllBC = true;
+  for(int ibc=0; ibc<NBC; ibc++) {
+    if(!nothingToDo[ibc]) nothingToDoForAllBC = false;
+  } 
+  
+  /*if(nothingToDoForAllBC) {
+    ATH_MSG_DEBUG("Whole events at all " << NBC << " BCs have already been decoded; nothing to do");
+    return StatusCode::SUCCESS;
+    }*/
 
-
+  
   /// clean up containers for Coincidence
   for(int ibc=0; ibc<NBC; ibc++) {
-
-    // PRD
+    // this happens the first time in the event !
     SG::WriteHandle<TgcCoinDataContainer>  handle(m_outputCoinKeys[ibc]);
-    // Caching of PRD container
-    const bool externalCacheCoin = !m_coinContainerCacheKeys[ibc].key().empty();
-    if (!externalCacheCoin) {
-      // without the cache we just record the container
-      StatusCode status = handle.record(std::make_unique<Muon::TgcCoinDataContainer>(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
-      if (status.isFailure() || !handle.isValid() )   {
-        ATH_MSG_FATAL("Could not record container of TGC CoinData at " << m_outputCoinKeys[ibc].key());
-        return StatusCode::FAILURE;
-      }
-      ATH_MSG_DEBUG("Created container " << m_outputCoinKeys[ibc].key());
-    } 
-    else {
-      // use the cache to get the container
-      SG::UpdateHandle<TgcCoinDataCollection_Cache> update(m_coinContainerCacheKeys[ibc]);
-      if (!update.isValid()){
-        ATH_MSG_FATAL("Invalid UpdateHandle " << m_coinContainerCacheKeys[ibc].key());
-        return StatusCode::FAILURE;
-      }
-      StatusCode status = handle.record(std::make_unique<Muon::TgcCoinDataContainer>(update.ptr()));
-      if (status.isFailure() || !handle.isValid() )   {
-        ATH_MSG_FATAL("Could not record container of TGC CoinData Container using cache " 
-          << m_coinContainerCacheKeys[ibc].key() << " - " <<m_outputCoinKeys[ibc].key()); 
-        return StatusCode::FAILURE;
-      }
-      ATH_MSG_DEBUG("Created container using cache for " << m_coinContainerCacheKeys[ibc].key());
-    }
-    // Pass the container from the handle
+    
+    // record the container in storeGate
+    handle = std::unique_ptr<TgcCoinDataContainer> (new TgcCoinDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
+    
+    // cache the pointer, storegate retains ownership
     m_tgcCoinDataContainer[ibc] = handle.ptr();
+
+    if(!handle.isValid()) {
+      ATH_MSG_FATAL("Could not record container of TGC CoinData at " << m_outputCoinKeys[ibc].key());
+      return StatusCode::FAILURE;
+    } else {
+      ATH_MSG_DEBUG("TGC CoinData Container recorded in StoreGate with key " << m_outputCoinKeys[ibc].key());
+    }
   }
 
   if(!nothingToDoForAllBC) { // If still need to do something 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h
index 1ba0b34d1f09fe4a95d8c212a27cd45d5ebed5b5..ef08a36cd1df8a1677fe53478c7277665f62e6f2 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h
@@ -9,21 +9,10 @@
 #define MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOLMT_H
 
 #include "TgcRdoToPrepDataToolCore.h"
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
-#include "MuonTrigCoinData/MuonTrigCoinData_Cache.h"
 
-#include "StoreGate/HandleKeyArray.h"
-#include "StoreGate/UpdateHandleKey.h"
-#include "StoreGate/UpdateHandle.h"
 
 namespace Muon 
 {
-
-  // Typedef the two update handle arrays that can be used to match handle key functionality used in Core
-  // Requested to not use StoreGate template for UpdateHandleKeyArray
-  typedef SG::HandleKeyArray<SG::UpdateHandle<TgcPrepDataCollection_Cache>, SG::UpdateHandleKey<TgcPrepDataCollection_Cache>, Gaudi::DataHandle::Reader > TgcPrdUpdateHandles;
-  typedef SG::HandleKeyArray<SG::UpdateHandle<TgcCoinDataCollection_Cache>, SG::UpdateHandleKey<TgcCoinDataCollection_Cache>, Gaudi::DataHandle::Reader > TgcCoinUpdateHandles;
-
   /** @class TgcRdoToPrepDataToolMT 
    *  This is the algorithm that convert TGCRdo To TGCPrepdata as a tool.
    * 
@@ -49,16 +38,6 @@ namespace Muon
     
       using TgcRdoToPrepDataToolCore::decode; // To prevent the decode below from hiding the superclass decode methods
       virtual StatusCode decode(std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& idWithDataVect) override;
-
-    private:
-      /// This is the key for the cache for the TGC PRD containers, can be empty
-      TgcPrdUpdateHandles m_prdContainerCacheKeys ;
-      TgcCoinUpdateHandles m_coinContainerCacheKeys ;
-      // TgcPrepRawData container key for current BC 
-      std::string m_prdContainerCacheKeyStr;   
-      // TgcCoinData container key for current BC 
-      std::string m_coinContainerCacheKeyStr;
-
    }; 
 } // end of namespace
 
diff --git a/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py b/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py
index 800e8751c3f03dbb9b319646f5263e9aabde9830..86ebbc9504648436bb5134b1fc98a3227fb5a0b7 100644
--- a/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/CSC_DigitizationConfig.py
@@ -7,9 +7,7 @@ from AthenaConfiguration.ComponentFactory import CompFactory
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
 from MuonConfig.MuonCondAlgConfig import CscCondDbAlgCfg
-CscDigitizationTool, CscDigitBuilder=CompFactory.getComps("CscDigitizationTool","CscDigitBuilder",)
-PileUpXingFolder=CompFactory.PileUpXingFolder
-from MuonConfig.MuonByteStreamCnvTestConfig import CscDigitToCscRDOCfg, CscOverlayDigitToCscRDOCfg
+from MuonConfig.MuonByteStreamCnvTestConfig import CscDigitToCscRDOCfg
 from MuonConfig.MuonCablingConfig import CSCCablingConfigCfg
 from Digitization.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
@@ -31,21 +29,16 @@ def CSC_RangeToolCfg(flags, name="CSC_Range", **kwargs):
     kwargs.setdefault("LastXing",  CSC_LastXing())
     kwargs.setdefault("CacheRefreshFrequency", 1.0)
     kwargs.setdefault("ItemList", ["CSCSimHitCollection#CSC_Hits"])
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
-def CSC_DigitizationToolCfg(flags, name="CSC_DigitizationTool", **kwargs):
+def CSC_DigitizationToolCommonCfg(flags, name="CSC_DigitizationTool", **kwargs):
     """Return a ComponentAccumulator with configured CscDigitizationTool"""
     acc = ComponentAccumulator()
     if flags.Digitization.DoXingByXingPileUp:
         kwargs.setdefault("FirstXing", CSC_FirstXing())
         kwargs.setdefault("LastXing",  CSC_LastXing())
-    kwargs.setdefault("InputObjectName", "CSC_Hits")
-    kwargs.setdefault("OutputObjectName", "CSC_DIGITS")
-    if flags.Digitization.PileUpPremixing:
-        kwargs.setdefault("CSCSimDataCollectionOutputName", flags.Overlay.BkgPrefix + "CSC_SDO")
-    else:
-        kwargs.setdefault("CSCSimDataCollectionOutputName", "CSC_SDO")
     kwargs.setdefault("pedestal", 0.0)
     kwargs.setdefault("WindowLowerOffset", -25.0)
     kwargs.setdefault("WindowUpperOffset",  25.0)
@@ -54,19 +47,32 @@ def CSC_DigitizationToolCfg(flags, name="CSC_DigitizationTool", **kwargs):
     kwargs.setdefault("NewDigitEDM", True)
     kwargs.setdefault("DriftVelocity", 39)
     kwargs.setdefault("ElectronEnergy", 66) # eV
+
+    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    kwargs.setdefault("cscCalibTool", acc.popToolsAndMerge(CscCalibToolCfg(flags)))
+
+    CscDigitizationTool = CompFactory.CscDigitizationTool
     acc.setPrivateTools(CscDigitizationTool(name, **kwargs))
     return acc
 
 
-def CSC_OverlayDigitizationToolCfg(flags, name="CSC_OverlayDigitizationTool",**kwargs):
+def CSC_DigitizationToolCfg(flags, name="CSC_DigitizationTool", **kwargs):
+    """Return a ComponentAccumulator with configured CscDigitizationTool"""
+    kwargs.setdefault("InputObjectName", "CSC_Hits")
+    kwargs.setdefault("OutputObjectName", "CSC_DIGITS")
+    if flags.Digitization.PileUpPremixing:
+        kwargs.setdefault("CSCSimDataCollectionOutputName", flags.Overlay.BkgPrefix + "CSC_SDO")
+    else:
+        kwargs.setdefault("CSCSimDataCollectionOutputName", "CSC_SDO")
+    return CSC_DigitizationToolCommonCfg(flags, name, **kwargs)
+
+
+def CSC_OverlayDigitizationToolCfg(flags, name="CscOverlayDigitizationTool", **kwargs):
     """Return a ComponentAccumulator with CscDigitizationTool configured for Overlay"""
-    acc = ComponentAccumulator()
     kwargs.setdefault("OnlyUseContainerName", False)
-    kwargs.setdefault("OutputObjectName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "CSC_DIGITS")
-    if not flags.Overlay.DataOverlay:
-        kwargs.setdefault("CSCSimDataCollectionOutputName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "CSC_SDO")
-    acc.setPrivateTools(CscDigitizationTool(name, **kwargs))
-    return acc
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "CSC_DIGITS")
+    kwargs.setdefault("CSCSimDataCollectionOutputName", flags.Overlay.SigPrefix + "CSC_SDO")
+    return CSC_DigitizationToolCommonCfg(flags, name, **kwargs)
 
 
 def CSC_OutputCfg(flags):
@@ -98,7 +104,12 @@ def CSC_OverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(CSC_OverlayDigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
-    acc.addEventAlgo(CscDigitBuilder(**kwargs))
+
+    if flags.Concurrency.NumThreads > 0:
+        kwargs.setdefault("Cardinality", flags.Concurrency.NumThreads)
+
+    CscDigitBuilder = CompFactory.CscDigitBuilder
+    acc.addEventAlgo(CscDigitBuilder(name="CscOverlayDigitBuilder", **kwargs))
     return acc
 
 
@@ -110,24 +121,9 @@ def CSC_DigitizationCfg(flags, **kwargs):
     return acc
 
 
-def CSC_OverlayDigitizationCfg(flags, **kwargs):
-    """Return ComponentAccumulator with CSC Overlay digitization and Output"""
-    acc = CSC_OverlayDigitizationBasicCfg(flags, **kwargs)
-    acc.merge(CSC_OutputCfg(flags))
-    return acc
-
-
 def CSC_DigitizationDigitToRDOCfg(flags):
     """Return ComponentAccumulator with CSC Digitization and Digit to CSCRDO"""
     acc = CSC_DigitizationCfg(flags)
     acc.merge(CSCCablingConfigCfg(flags))
     acc.merge(CscDigitToCscRDOCfg(flags))
     return acc
-
-
-def CSC_OverlayDigitizationDigitToRDOCfg(flags):
-    """Return ComponentAccumulator with CSC Overlay Digitization and Digit to CSCRDO"""
-    acc = CSC_OverlayDigitizationCfg(flags)
-    acc.merge(CSCCablingConfigCfg(flags))
-    acc.merge(CscOverlayDigitToCscRDOCfg(flags))
-    return acc
diff --git a/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py b/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..55073cb5543f6b9fc7fb84460a2b9295f1e69814
--- /dev/null
+++ b/MuonSpectrometer/MuonConfig/python/CscOverlayConfig.py
@@ -0,0 +1,99 @@
+
+"""Define methods to construct configured CSC overlay algorithms
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def CSCDataOverlayExtraCfg(flags, **kwargs):
+    """Return a ComponentAccumulator with CSC data overlay specifics"""
+    acc = ComponentAccumulator()
+
+    # We need to convert BS to RDO for data overlay
+    from MuonConfig.MuonBytestreamDecodeConfig import CscBytestreamDecodeCfg
+    acc.merge(CscBytestreamDecodeCfg(flags))
+
+    return acc
+
+
+def CscOverlayAlgCfg(flags, name="CscOverlay", **kwargs):
+    """Return a ComponentAccumulator for CSCOverlay algorithm"""
+    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    acc = CscCalibToolCfg(flags)
+    kwargs.setdefault("CalibTool", acc.popPrivateTools())
+
+    from MuonConfig.MuonCSC_CnvToolsConfig import MuonCscRDODecoderCfg
+    kwargs.setdefault("CscRdoDecoderTool", acc.popToolsAndMerge(MuonCscRDODecoderCfg(flags)))
+
+    kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "CSCRDO")
+    kwargs.setdefault("SignalInputKey", flags.Overlay.SigPrefix + "CSCRDO")
+    kwargs.setdefault("OutputKey", "CSCRDO")
+
+    kwargs.setdefault("isDataOverlay", flags.Overlay.DataOverlay)
+
+    # Do CSC overlay
+    CscOverlay = CompFactory.CscOverlay
+    alg = CscOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "CscRawDataContainer#CSCRDO"
+    ]))
+
+    return acc
+
+
+def CscTruthOverlayCfg(flags, name="CscTruthOverlay", **kwargs):
+    """Return a ComponentAccumulator for the CSC SDO overlay algorithm"""
+    acc = ComponentAccumulator()
+
+    # We do not need background CSC SDOs
+    if flags.Overlay.DataOverlay:
+        kwargs.setdefault("BkgInputKey", "")
+    else:
+        kwargs.setdefault("BkgInputKey",
+                          flags.Overlay.BkgPrefix + "CSC_SDO")
+
+    kwargs.setdefault("SignalInputKey",
+                      flags.Overlay.SigPrefix + "CSC_SDO")
+    kwargs.setdefault("OutputKey", "CSC_SDO")
+
+    # Do CSC truth overlay
+    CscSimDataOverlay = CompFactory.CscSimDataOverlay
+    alg = CscSimDataOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "CscSimDataCollection#CSC_SDO"
+    ]))
+
+    return acc
+
+
+def CscOverlayCfg(flags):
+    """Configure and return a ComponentAccumulator for CSC overlay"""
+    acc = ComponentAccumulator()
+
+    # Add data overlay specifics
+    if flags.Overlay.DataOverlay:
+        acc.merge(CSCDataOverlayExtraCfg(flags))
+
+    # Add CSC overlay digitization algorithm
+    from MuonConfig.CSC_DigitizationConfig import CSC_OverlayDigitizationBasicCfg
+    acc.merge(CSC_OverlayDigitizationBasicCfg(flags))
+    # Add CSC digit to RDO config
+    from MuonConfig.MuonByteStreamCnvTestConfig import CscDigitToCscRDOCfg
+    acc.merge(CscDigitToCscRDOCfg(flags))
+    # Add CSC overlay algorithm
+    acc.merge(CscOverlayAlgCfg(flags))
+    # Add CSC truth overlay
+    acc.merge(CscTruthOverlayCfg(flags))
+
+    return acc
diff --git a/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py b/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py
index 350fb82977af1a382cc791affd049e17a4ae13e9..3c2875333e122e445c570c342606bac43c86f06f 100644
--- a/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MDT_DigitizationConfig.py
@@ -1,16 +1,12 @@
 """Define methods to construct configured MDT Digitization tools and algorithms
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
-from MDT_Digitization.MDT_DigitizationConf import (
-    MdtDigitizationTool, MDT_Response_DigiTool, RT_Relation_DB_DigiTool, MDT_Digitizer
-)
-PileUpXingFolder=CompFactory.PileUpXingFolder
-from MuonConfig.MuonByteStreamCnvTestConfig import MdtDigitToMdtRDOCfg, MdtOverlayDigitToMdtRDOCfg
+from MuonConfig.MuonByteStreamCnvTestConfig import MdtDigitToMdtRDOCfg
 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
 from Digitization.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
@@ -33,11 +29,13 @@ def MDT_RangeToolCfg(flags, name="MDT_Range", **kwargs):
     kwargs.setdefault("LastXing",  MDT_LastXing())
     kwargs.setdefault("CacheRefreshFrequency", 1.0)
     kwargs.setdefault("ItemList", ["MDTSimHitCollection#MDT_Hits"])
+    PileUpXingFolder=CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
 def RT_Relation_DB_DigiToolCfg(flags, name="RT_Relation_DB_DigiTool", **kwargs):
     """Return an RT_Relation_DB_DigiTool"""
+    RT_Relation_DB_DigiTool = CompFactory.RT_Relation_DB_DigiTool
     return RT_Relation_DB_DigiTool(name, **kwargs)
 
 
@@ -45,11 +43,12 @@ def MDT_Response_DigiToolCfg(flags, name="MDT_Response_DigiTool",**kwargs):
     """Return a configured MDT_Response_DigiTool"""
     QballConfig = (flags.Digitization.SpecialConfiguration.get("MDT_QballConfig") == "True")
     kwargs.setdefault("DoQballGamma", QballConfig)
+    MDT_Response_DigiTool = CompFactory.MDT_Response_DigiTool
     return MDT_Response_DigiTool(name, **kwargs)
 
 
-def MDT_DigitizationToolCfg(flags, name="MDT_DigitizationTool", **kwargs):
-    """Return ComponentAccumulator with configured MdtDigitizationTool"""
+def MDT_DigitizationToolCommonCfg(flags, name="MDT_DigitizationTool", **kwargs):
+    """Return ComponentAccumulator with common MdtDigitizationTool config"""
     from MuonConfig.MuonCondAlgConfig import MdtCondDbAlgCfg # MT-safe conditions access
     acc = MdtCondDbAlgCfg(flags)
     kwargs.setdefault("MaskedStations", [])
@@ -63,24 +62,28 @@ def MDT_DigitizationToolCfg(flags, name="MDT_DigitizationTool", **kwargs):
     if flags.Digitization.DoXingByXingPileUp:
         kwargs.setdefault("FirstXing", MDT_FirstXing())
         kwargs.setdefault("LastXing", MDT_LastXing())
+    MdtDigitizationTool = CompFactory.MdtDigitizationTool
+    acc.setPrivateTools(MdtDigitizationTool(name, **kwargs))
+    return acc
+
+
+def MDT_DigitizationToolCfg(flags, name="MDT_DigitizationTool", **kwargs):
+    """Return ComponentAccumulator with configured MdtDigitizationTool"""
     kwargs.setdefault("OutputObjectName", "MDT_DIGITS")
     if flags.Digitization.PileUpPremixing:
         kwargs.setdefault("OutputSDOName", flags.Overlay.BkgPrefix + "MDT_SDO")
     else:
         kwargs.setdefault("OutputSDOName", "MDT_SDO")
-    acc.setPrivateTools(MdtDigitizationTool(name, **kwargs))
-    return acc
+    return MDT_DigitizationToolCommonCfg(flags, name, **kwargs)
 
 
-def MDT_OverlayDigitizationToolCfg(flags, name="MDT_OverlayDigitizationTool",**kwargs):
+def MDT_OverlayDigitizationToolCfg(flags, name="Mdt_OverlayDigitizationTool", **kwargs):
     """Return ComponentAccumulator with MdtDigitizationTool configured for Overlay"""
-    acc = ComponentAccumulator()
     kwargs.setdefault("OnlyUseContainerName", False)
-    kwargs.setdefault("OutputObjectName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "MDT_DIGITS")
-    kwargs.setdefault("GetT0FromBD", flags.Detector.Overlay)
-    if not flags.Overlay.DataOverlay:
-        kwargs.setdefault("OutputSDOName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "MDT_SDO")
-    return acc
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "MDT_DIGITS")
+    kwargs.setdefault("OutputSDOName", flags.Overlay.SigPrefix + "MDT_SDO")
+    kwargs.setdefault("GetT0FromBD", flags.Detector.OverlayMDT and not flags.Input.isMC)
+    return MDT_DigitizationToolCommonCfg(flags, name, **kwargs)
 
 
 def MDT_OutputCfg(flags):
@@ -110,7 +113,12 @@ def MDT_OverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(MDT_OverlayDigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
-    acc.addEventAlgo(MDT_Digitizer(**kwargs))
+
+    if flags.Concurrency.NumThreads > 0:
+       kwargs.setdefault("Cardinality", flags.Concurrency.NumThreads)
+
+    MDT_Digitizer = CompFactory.MDT_Digitizer
+    acc.addEventAlgo(MDT_Digitizer(name="MDT_OverlayDigitizer", **kwargs))
     return acc
 
 
@@ -122,24 +130,9 @@ def MDT_DigitizationCfg(flags, **kwargs):
     return acc
 
 
-def MDT_OverlayDigitizationCfg(flags, **kwargs):
-    """Return ComponentAccumulator with MDT Overlay digitization and Output"""
-    acc = MDT_OverlayDigitizationBasicCfg(flags, **kwargs)
-    acc.merge(MDT_OutputCfg(flags))
-    return acc
-
-
 def MDT_DigitizationDigitToRDOCfg(flags):
     """Return ComponentAccumulator with MDT digitization and Digit to MDTCSM RDO"""
     acc = MDT_DigitizationCfg(flags)
     acc.merge(MDTCablingConfigCfg(flags))
     acc.merge(MdtDigitToMdtRDOCfg(flags))
     return acc
-
-
-def MDT_OverlayDigitizationDigitToRDOCfg(flags):
-    """Return ComponentAccumulator with MDT Overlay digitization and Digit to MDTCSM RDO"""
-    acc = MDT_OverlayDigitizationCfg(flags)
-    acc.merge(MDTCablingConfigCfg(flags))
-    acc.merge(MdtOverlayDigitToMdtRDOCfg(flags))
-    return acc
diff --git a/MuonSpectrometer/MuonConfig/python/MdtOverlayConfig.py b/MuonSpectrometer/MuonConfig/python/MdtOverlayConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..ebffac04842d87e74d3d18595a2c22354772f45f
--- /dev/null
+++ b/MuonSpectrometer/MuonConfig/python/MdtOverlayConfig.py
@@ -0,0 +1,97 @@
+
+"""Define methods to construct configured MDT overlay algorithms
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def MDTDataOverlayExtraCfg(flags, **kwargs):
+    """Return a ComponentAccumulator with MDT data overlay specifics"""
+    acc = ComponentAccumulator()
+
+    # We need to convert BS to RDO for data overlay
+    from MuonConfig.MuonBytestreamDecodeConfig import MdtBytestreamDecodeCfg
+    acc.merge(MdtBytestreamDecodeCfg(flags))
+
+    return acc
+
+
+def MdtOverlayAlgCfg(flags, name="MdtOverlay", **kwargs):
+    """Return a ComponentAccumulator for MDTOverlay algorithm"""
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "MDT_DIGITS")
+    kwargs.setdefault("SignalInputKey", flags.Overlay.SigPrefix + "MDT_DIGITS")
+    kwargs.setdefault("OutputKey", "MDT_DIGITS")
+
+    kwargs.setdefault("IntegrationWindow", 20) # in ns
+
+    # Do MDT overlay
+    MdtOverlay = CompFactory.MdtOverlay
+    alg = MdtOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "MdtCsmContainer#MDTCSM"
+    ]))
+
+    return acc
+
+
+def MdtTruthOverlayCfg(flags, name="MdtTruthOverlay", **kwargs):
+    """Return a ComponentAccumulator for the MDT SDO overlay algorithm"""
+    acc = ComponentAccumulator()
+
+    # We do not need background MDT SDOs
+    if flags.Overlay.DataOverlay:
+        kwargs.setdefault("BkgInputKey", "")
+    else:
+        kwargs.setdefault("BkgInputKey",
+                          flags.Overlay.BkgPrefix + "MDT_SDO")
+
+    kwargs.setdefault("SignalInputKey",
+                      flags.Overlay.SigPrefix + "MDT_SDO")
+    kwargs.setdefault("OutputKey", "MDT_SDO")
+
+    # Do MDT truth overlay
+    MuonSimDataOverlay = CompFactory.MuonSimDataOverlay
+    alg = MuonSimDataOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "MuonSimDataCollection#MDT_SDO"
+    ]))
+
+    return acc
+
+
+def MdtOverlayCfg(flags):
+    """Configure and return a ComponentAccumulator for MDT overlay"""
+    acc = ComponentAccumulator()
+
+    # Add data overlay specifics
+    if flags.Overlay.DataOverlay:
+        acc.merge(MDTDataOverlayExtraCfg(flags))
+
+    # Add MDT RDO to digit config
+    from MuonConfig.MuonByteStreamCnvTestConfig import MdtRdoToMdtDigitCfg
+    acc.merge(MdtRdoToMdtDigitCfg(flags))
+    # Add MDT overlay digitization algorithm
+    from MuonConfig.MDT_DigitizationConfig import MDT_OverlayDigitizationBasicCfg
+    acc.merge(MDT_OverlayDigitizationBasicCfg(flags))
+    # Add MDT overlay algorithm
+    acc.merge(MdtOverlayAlgCfg(flags))
+    # Add MDT truth overlay
+    acc.merge(MdtTruthOverlayCfg(flags))
+    # Add MDT digit to RDO config
+    from MuonConfig.MuonByteStreamCnvTestConfig import MdtDigitToMdtRDOCfg
+    acc.merge(MdtDigitToMdtRDOCfg(flags))
+
+    return acc
diff --git a/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py b/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py
index 43482003af004034edfc75c4e2c485fe6d786bf7..3607db8f187f454c559abfbd7ac97f4eef9a80db 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonByteStreamCnvTestConfig.py
@@ -1,22 +1,22 @@
 """Define ComponentAccumulator functions for configuration of muon data conversions
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
-from MuonByteStreamCnvTest.MuonByteStreamCnvTestConf import (
-    MdtRdoToMdtDigit, RpcRdoToRpcDigit, TgcRdoToTgcDigit, STGC_RdoToDigit, MM_RdoToDigit, 
-    MdtDigitToMdtRDO, RpcDigitToRpcRDO, TgcDigitToTgcRDO, STGC_DigitToRDO, MM_DigitToRDO, CscDigitToCscRDO
-)
-CscDigitToCscRDOTool=CompFactory.CscDigitToCscRDOTool
-from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+
 
 def MdtRdoToMdtDigitCfg(flags, name="MdtRdoToMdtDigitAlg", **kwargs):
     """Return ComponentAccumulator with configured MdtRdoToMdtDigit algorithm"""
     acc = ComponentAccumulator()
-    if flags.Detector.Overlay:
+    from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
+    from MuonConfig.MuonCalibConfig import MdtCalibDbAlgCfg
+    acc.merge(MDTCablingConfigCfg(flags))
+    acc.merge(MdtCalibDbAlgCfg(flags))
+    if flags.Detector.OverlayMDT:
         kwargs.setdefault("MdtRdoContainer", flags.Overlay.BkgPrefix + "MDTCSM")
         kwargs.setdefault("MdtDigitContainer", flags.Overlay.BkgPrefix + "MDT_DIGITS")
+    MdtRdoToMdtDigit = CompFactory.MdtRdoToMdtDigit
     acc.addEventAlgo(MdtRdoToMdtDigit(name, **kwargs))
     return acc
 
@@ -24,9 +24,12 @@ def MdtRdoToMdtDigitCfg(flags, name="MdtRdoToMdtDigitAlg", **kwargs):
 def RpcRdoToRpcDigitCfg(flags, name="RpcRdoToRpcDigitAlg", **kwargs):
     """Return ComponentAccumulator with configured RpcRdoToRpcDigit algorithm"""
     acc = ComponentAccumulator()
-    if flags.Detector.Overlay:
+    from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg
+    acc.merge(RPCCablingConfigCfg(flags))
+    if flags.Detector.OverlayRPC:
         kwargs.setdefault("RpcRdoContainer", flags.Overlay.BkgPrefix + "RPCPAD")
         kwargs.setdefault("RpcDigitContainer", flags.Overlay.BkgPrefix + "RPC_DIGITS")
+    RpcRdoToRpcDigit = CompFactory.RpcRdoToRpcDigit
     acc.addEventAlgo(RpcRdoToRpcDigit(name, **kwargs))
     return acc
 
@@ -34,9 +37,12 @@ def RpcRdoToRpcDigitCfg(flags, name="RpcRdoToRpcDigitAlg", **kwargs):
 def TgcRdoToTgcDigitCfg(flags, name="TgcRdoToTgcDigitAlg", **kwargs):
     """Return ComponentAccumulator with configured TgcRdoToTgcDigit algorithm"""
     acc = ComponentAccumulator()
-    if flags.Detector.Overlay:
+    from MuonConfig.MuonCablingConfig import TGCCablingConfigCfg
+    acc.merge(TGCCablingConfigCfg(flags))
+    if flags.Detector.OverlayTGC:
         kwargs.setdefault("TgcRdoContainer", flags.Overlay.BkgPrefix + "TGCRDO")
         kwargs.setdefault("TgcDigitContainer", flags.Overlay.BkgPrefix + "TGC_DIGITS")
+    TgcRdoToTgcDigit = CompFactory.TgcRdoToTgcDigit
     acc.addEventAlgo(TgcRdoToTgcDigit(name, **kwargs))
     return acc
 
@@ -44,9 +50,10 @@ def TgcRdoToTgcDigitCfg(flags, name="TgcRdoToTgcDigitAlg", **kwargs):
 def STGC_RdoToDigitCfg(flags, name="STGC_RdoToDigitAlg", **kwargs):
     """Return ComponentAccumulator with configured STGC_RdoToDigit algorithm"""
     acc = ComponentAccumulator()
-    if flags.Detector.Overlay:
+    if flags.Detector.OverlaysTGC:
         kwargs.setdefault("sTgcRdoContainer", flags.Overlay.BkgPrefix + "sTGCRDO")
         kwargs.setdefault("sTgcDigitContainer", flags.Overlay.BkgPrefix + "sTGC_DIGITS")
+    STGC_RdoToDigit = CompFactory.STGC_RdoToDigit
     acc.addEventAlgo(STGC_RdoToDigit(name, **kwargs))
     return acc
 
@@ -54,9 +61,10 @@ def STGC_RdoToDigitCfg(flags, name="STGC_RdoToDigitAlg", **kwargs):
 def MM_RdoToDigitCfg(flags, name="MM_RdoToDigitAlg", **kwargs):
     """Return ComponentAccumulator with configured MM_RdoToDigit algorithm"""
     acc = ComponentAccumulator()
-    if flags.Detector.Overlay:
+    if flags.Detector.OverlayMM:
         kwargs.setdefault("MmRdoContainer", flags.Overlay.BkgPrefix + "MMRDO")
         kwargs.setdefault("MmDigitContainer", flags.Overlay.BkgPrefix + "MM_DIGITS")
+    MM_RdoToDigit = CompFactory.MM_RdoToDigit
     acc.addEventAlgo(MM_RdoToDigit(name, **kwargs))
     return acc
 
@@ -68,15 +76,7 @@ def MdtDigitToMdtRDOCfg(flags, name="MdtDigitToMdtRDO", **kwargs):
         kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "MDTCSM")
     else:
         kwargs.setdefault("OutputObjectName", "MDTCSM")
-    acc.addEventAlgo(MdtDigitToMdtRDO(name, **kwargs))
-    return acc
-
-
-def MdtOverlayDigitToMdtRDOCfg(flags, name="MdtOverlayDigitToMdtRDO", **kwargs):
-    """Return ComponentAccumulator with Overlay configured MdtDigitToMdtRDO algorithm"""
-    acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "MDT_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "MDTCSM")
+    MdtDigitToMdtRDO = CompFactory.MdtDigitToMdtRDO
     acc.addEventAlgo(MdtDigitToMdtRDO(name, **kwargs))
     return acc
 
@@ -88,15 +88,7 @@ def RpcDigitToRpcRDOCfg(flags, name="RpcDigitToRpcRDO", **kwargs):
         kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "RPCPAD")
     else:
         kwargs.setdefault("OutputObjectName", "RPCPAD")
-    acc.addEventAlgo(RpcDigitToRpcRDO(name, **kwargs))
-    return acc
-
-
-def RpcOverlayDigitToRpcRDOCfg(flags, name="RpcOverlayDigitToRpcRDO", **kwargs):
-    """Return ComponentAccumulator with Overlay configured RpcDigitToRpcRDO algorithm"""
-    acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "RPC_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "RPCPAD")
+    RpcDigitToRpcRDO = CompFactory.RpcDigitToRpcRDO
     acc.addEventAlgo(RpcDigitToRpcRDO(name, **kwargs))
     return acc
 
@@ -108,49 +100,38 @@ def TgcDigitToTgcRDOCfg(flags, name="TgcDigitToTgcRDO", **kwargs):
         kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "TGCRDO")
     else:
         kwargs.setdefault("OutputObjectName", "TGCRDO")
+    TgcDigitToTgcRDO = CompFactory.TgcDigitToTgcRDO
     acc.addEventAlgo(TgcDigitToTgcRDO(name, **kwargs))
     return acc
 
 
-def TgcOverlayDigitToTgcRDOCfg(flags, name="TgcOverlayDigitToTgcRDO", **kwargs):
-    """Return ComponentAccumulator with Overlay configured TgcDigitToTgcRDO algorithm"""
-    acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "TGC_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "TGCRDO")
-    acc.addEventAlgo(TgcDigitToTgcRDO(name, **kwargs))
-    return acc
-
-
-def CscDigitToCscRDOCfg(flags, name="CscDigitToCscRDO", **kwargs):
+def CscDigitToCscRDOCfg(flags, name="CscDigitToCscRDO4", **kwargs):
     """Return ComponentAccumulator with configured CscDigitToCscRDO algorithm"""
     # for Csc, configuration is in the tool CscDigitToCscRDOTool
     # configure dependency
+    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
     acc = CscCalibToolCfg(flags)
     CscCalibTool = acc.popPrivateTools()
     # configure basic parameters
     kwargs.setdefault("cscCalibTool", CscCalibTool)
     kwargs.setdefault("NumSamples", 4)
     kwargs.setdefault("Latency", 0)
-    kwargs.setdefault("addNoise", True) # doMuonNoise flag not migrated
-    if flags.Digitization.PileUpPremixing:
+    kwargs.setdefault("addNoise", not flags.Detector.OverlayCSC) # doMuonNoise flag not migrated
+    if flags.Detector.OverlayCSC:
+        kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "CSC_DIGITS")
+        kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "CSCRDO")
+    elif flags.Digitization.PileUpPremixing:
         kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "CSCRDO")
     else:
         kwargs.setdefault("OutputObjectName", "CSCRDO")
     # tool and container algorithm
-    tool = CscDigitToCscRDOTool(name + "Tool", **kwargs)
+    CscDigitToCscRDOTool = CompFactory.CscDigitToCscRDOTool
+    tool = CscDigitToCscRDOTool("CscDigitToCscRDOTool4", **kwargs)
+    CscDigitToCscRDO = CompFactory.CscDigitToCscRDO
     acc.addEventAlgo(CscDigitToCscRDO(name, CscDigitToRDOTool=tool))
     return acc
 
 
-def CscOverlayDigitToCscRDOCfg(flags, name="CscOverlayDigitToCscRDO", **kwargs):
-    """Return ComponentAccumulator with Overlay configured CscDigitToCscRDO algorithm"""
-    kwargs.setdefault("NumSamples", 4)
-    kwargs.setdefault("addNoise", False)
-    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "CSC_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "CSCRDO")
-    return CscDigitToCscRDOCfg(flags, name, **kwargs)
-
-
 def STGC_DigitToRDOCfg(flags, name="STGC_DigitToRDO", **kwargs):
     """Return ComponentAccumulator with configured STGC_DigitToRDO algorithm"""
     acc = ComponentAccumulator()
@@ -158,15 +139,7 @@ def STGC_DigitToRDOCfg(flags, name="STGC_DigitToRDO", **kwargs):
         kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "sTGCRDO")
     else:
         kwargs.setdefault("OutputObjectName", "sTGCRDO")
-    acc.addEventAlgo(STGC_DigitToRDO(name, **kwargs))
-    return acc
-
-
-def STGC_OverlayDigitToRDOCfg(flags, name="STGC_OverlayDigitToRDO", **kwargs):
-    """Return ComponentAccumulator with Overlay configured STGC_DigitToRDO algorithm"""
-    acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "sTGC_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "STGCRDO")
+    STGC_DigitToRDO = CompFactory.STGC_DigitToRDO
     acc.addEventAlgo(STGC_DigitToRDO(name, **kwargs))
     return acc
 
@@ -178,15 +151,7 @@ def MM_DigitToRDOCfg(flags, name="MM_DigitToRDO", **kwargs):
         kwargs.setdefault("OutputObjectName", flags.Overlay.BkgPrefix + "MMRDO")
     else:
         kwargs.setdefault("OutputObjectName", "MMRDO")
-    acc.addEventAlgo(MM_DigitToRDO(name, **kwargs))
-    return acc
-
-
-def MM_OverlayDigitToRDOCfg(flags, name="MM_OverlayDigitToRDO", **kwargs):
-    """Return ComponentAccumulator with Overlay configured MM_DigitToRDO algorithm"""
-    acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "MM_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "MMRDO")
+    MM_DigitToRDO = CompFactory.MM_DigitToRDO
     acc.addEventAlgo(MM_DigitToRDO(name, **kwargs))
     return acc
 
@@ -194,8 +159,9 @@ def MM_OverlayDigitToRDOCfg(flags, name="MM_OverlayDigitToRDO", **kwargs):
 def SigMdtDigitToMdtRDOCfg(flags, name="SigMdtDigitToMdtRDO", **kwargs):
     """Return ComponentAccumulator with configured MdtDigitToMdtRDO algorithm"""
     acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.Legacy.EventStore + "+MDT_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.Legacy.EventStore + "+MDTCSM")
+    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "MDT_DIGITS")
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "MDTCSM")
+    MdtDigitToMdtRDO = CompFactory.MdtDigitToMdtRDO
     acc.addEventAlgo(MdtDigitToMdtRDO(name, **kwargs))
     return acc
 
@@ -203,8 +169,9 @@ def SigMdtDigitToMdtRDOCfg(flags, name="SigMdtDigitToMdtRDO", **kwargs):
 def SigRpcDigitToRpcRDOCfg(flags, name="SigRpcDigitToRpcRDO", **kwargs):
     """Return ComponentAccumulator with configured RpcDigitToRpcRDO algorithm"""
     acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.Legacy.EventStore + "+RPC_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.Legacy.EventStore + "+RPCPAD")
+    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "RPC_DIGITS")
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "RPCPAD")
+    RpcDigitToRpcRDO = CompFactory.RpcDigitToRpcRDO
     acc.addEventAlgo(RpcDigitToRpcRDO(name, **kwargs))
     return acc
 
@@ -212,8 +179,9 @@ def SigRpcDigitToRpcRDOCfg(flags, name="SigRpcDigitToRpcRDO", **kwargs):
 def SigTgcDigitToTgcRDOCfg(flags, name="SigTgcDigitToTgcRDO", **kwargs):
     """Return ComponentAccumulator with configured TgcDigitToTgcRDO algorithm"""
     acc = ComponentAccumulator()
-    kwargs.setdefault("InputObjectName", flags.Overlay.Legacy.EventStore + "+TGC_DIGITS")
-    kwargs.setdefault("OutputObjectName", flags.Overlay.Legacy.EventStore + "+TGCRDO")
+    kwargs.setdefault("InputObjectName", flags.Overlay.SigPrefix + "TGC_DIGITS")
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "TGCRDO")
+    TgcDigitToTgcRDO = CompFactory.TgcDigitToTgcRDO
     acc.addEventAlgo(TgcDigitToTgcRDO(name, **kwargs))
     return acc
 
diff --git a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py
index ae447293546755d151adba7ad8e4fa3281c0e9fe..b61d1ecc61c4a4717679d2319079eb784a3747b3 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py
@@ -52,9 +52,11 @@ def RpcBytestreamDecodeCfg(flags, forTrigger=False):
     acc.addService( robDPSvc )
 
     # Setup the RAW data provider tool
+    keyName = flags.Overlay.BkgPrefix + "RPCPAD" if flags.Detector.OverlayRPC else "RPCPAD"
     Muon__RPC_RawDataProviderToolMT=CompFactory.Muon__RPC_RawDataProviderToolMT
     MuonRpcRawDataProviderTool = Muon__RPC_RawDataProviderToolMT(name    = "RPC_RawDataProviderToolMT",
-                                                               Decoder = RPCRodDecoder )
+                                                                 Decoder = RPCRodDecoder,
+                                                                 RdoLocation = keyName )
     if forTrigger:
         MuonRpcRawDataProviderTool.RpcContainerCacheKey   = MuonCacheNames.RpcCache
         MuonRpcRawDataProviderTool.WriteOutRpcSectorLogic = False
@@ -95,9 +97,11 @@ def TgcBytestreamDecodeCfg(flags, forTrigger=False):
     acc.addService( robDPSvc )
 
     # Setup the RAW data provider tool
+    keyName = flags.Overlay.BkgPrefix + "TGCRDO" if flags.Detector.OverlayTGC else "TGCRDO"
     Muon__TGC_RawDataProviderToolMT=CompFactory.Muon__TGC_RawDataProviderToolMT
     MuonTgcRawDataProviderTool = Muon__TGC_RawDataProviderToolMT(name    = "TGC_RawDataProviderToolMT",
-                                                               Decoder = TGCRodDecoder )
+                                                                 Decoder = TGCRodDecoder,
+                                                                 RdoLocation = keyName )
 
     if forTrigger:
         MuonTgcRawDataProviderTool.TgcContainerCacheKey   = MuonCacheNames.TgcCache
@@ -138,9 +142,11 @@ def MdtBytestreamDecodeCfg(flags, forTrigger=False):
     acc.addService( robDPSvc )
 
     # Setup the RAW data provider tool
+    keyName = flags.Overlay.BkgPrefix + "MDTCSM" if flags.Detector.OverlayMDT else "MDTCSM"
     Muon__MDT_RawDataProviderToolMT=CompFactory.Muon__MDT_RawDataProviderToolMT
     MuonMdtRawDataProviderTool = Muon__MDT_RawDataProviderToolMT(name    = "MDT_RawDataProviderToolMT",
-                                                                 Decoder = MDTRodDecoder)
+                                                                 Decoder = MDTRodDecoder,
+                                                                 RdoLocation = keyName)
 
     if forTrigger:
         MuonMdtRawDataProviderTool.CsmContainerCacheKey = MuonCacheNames.MdtCsmCache
@@ -177,9 +183,11 @@ def CscBytestreamDecodeCfg(flags, forTrigger=False):
     acc.addService( robDPSvc )
 
     # Setup the RAW data provider tool
+    keyName = flags.Overlay.BkgPrefix + "CSCRDO" if flags.Detector.OverlayCSC else "CSCRDO"
     Muon__CSC_RawDataProviderToolMT=CompFactory.Muon__CSC_RawDataProviderToolMT
     MuonCscRawDataProviderTool = Muon__CSC_RawDataProviderToolMT(name    = "CSC_RawDataProviderToolMT",
-                                                               Decoder = CSCRodDecoder)
+                                                                 Decoder = CSCRodDecoder,
+                                                                 RdoLocation = keyName)
     if forTrigger:
         MuonCscRawDataProviderTool.CscContainerCacheKey = MuonCacheNames.CscCache
 
diff --git a/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..147f852dc56f8c87c7f0d198059aeafd06b73c22
--- /dev/null
+++ b/MuonSpectrometer/MuonConfig/python/MuonCSC_CnvToolsConfig.py
@@ -0,0 +1,13 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def MuonCscRDODecoderCfg(flags, **kwargs):
+    from MuonConfig.MuonCalibConfig import CscCalibToolCfg
+    acc = CscCalibToolCfg(flags)
+    kwargs.setdefault("cscCalibTool", acc.popPrivateTools())
+
+    CscRDO_Decoder = CompFactory.Muon__CscRDO_Decoder
+    acc.setPrivateTools(CscRDO_Decoder(**kwargs))
+    return acc
diff --git a/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py
index ee3ecd36349af50b87daf99f3a344713f91c0fc4..8a76674e39fdbaa7f26813ffe49e03affce36aaf 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonCablingConfig.py
@@ -31,7 +31,7 @@ def RPCCablingConfigCfg(flags):
     rpcCablingSvc.CorrFileName = 'LVL1confAtlas.corr' 
     rpcCablingSvc.ConfFilePath = 'MuonRPC_Cabling/'
     rpcCablingSvc.RPCTriggerRoadsfromCool = True
-    rpcCablingSvc.CosmicConfiguration     = True  # this was set to true by the modifier openThresholdRPCCabling in runHLT_standalone.py
+    rpcCablingSvc.CosmicConfiguration     = 'HLT' in flags.IOVDb.GlobalTag  # this was set to true by the modifier openThresholdRPCCabling in runHLT_standalone.py
 
     from IOVDbSvc.IOVDbSvcConfig import addFolders
     dbName = 'RPC_OFL' if flags.Input.isMC else 'RPC'
diff --git a/MuonSpectrometer/MuonConfig/python/MuonCalibConfig.py b/MuonSpectrometer/MuonConfig/python/MuonCalibConfig.py
index 76498e383568d2f4477f92c15f3c2a4f3f133523..4bd925e36864cc07e5d9b36c3cda7e25ee8d1dc2 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonCalibConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonCalibConfig.py
@@ -68,7 +68,6 @@ def _setupMdtCondDB(flags):
 # end of function setupMdtCondDB()
 
 def MdtCalibrationToolCfg(flags, **kwargs):
-    from MdtCalibSvc.MdtCalibSvcConf import MdtCalibrationTool    
     result=MdtCalibrationDbToolCfg(flags, **kwargs)
     mdt_calibibration_db_tool = result.getPrimary()
     
@@ -83,12 +82,12 @@ def MdtCalibrationToolCfg(flags, **kwargs):
     result.merge(acc)
     kwargs.setdefault("MagFieldSvc",  mag_field_svc )
     
+    MdtCalibrationTool = CompFactory.MdtCalibrationTool
     mdt_calibration_tool = MdtCalibrationTool(**kwargs)
     result.setPrivateTools(mdt_calibration_tool)
     return result
 
 def MdtCalibrationDbToolCfg(flags, **kwargs):
-    from MdtCalibSvc.MdtCalibSvcConf import MdtCalibrationDbTool    
     # We need the conditions objects to have been created.
     result = MdtCalibDbAlgCfg(flags, **kwargs)
         
@@ -96,6 +95,7 @@ def MdtCalibrationDbToolCfg(flags, **kwargs):
     kwargs.setdefault("CreateWireSagFunctions", flags.Muon.Calib.correctMdtRtWireSag)
     kwargs.setdefault("CreateSlewingFunctions", flags.Muon.Calib.correctMdtRtForTimeSlewing)
     
+    MdtCalibrationDbTool = CompFactory.MdtCalibrationDbTool
     mdt_calibration_db_tool = MdtCalibrationDbTool(**kwargs)
     result.setPrivateTools(mdt_calibration_db_tool)
     return result
diff --git a/MuonSpectrometer/MuonConfig/python/MuonConfigFlags.py b/MuonSpectrometer/MuonConfig/python/MuonConfigFlags.py
index 9713600b03fe03e35f97d567caea63804e36b733..479b78149b6e73b0129c0205a806ba33ced4b3f9 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonConfigFlags.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonConfigFlags.py
@@ -92,7 +92,7 @@ def createMuonConfigFlags():
     mcf.addFlag("Muon.Calib.applyRtScaling", False) # TODO - apparently not needed, but currently used in MuonCalibConfig. Set false to match https://acode-browser1.usatlas.bnl.gov/lxr/source/athena/MuonSpectrometer/MuonCnv/MuonCnvExample/python/MuonCalibFlags.py#0072
     mcf.addFlag("Muon.Calib.correctMdtRtWireSag", False) # Apply RT wiresag correction
     mcf.addFlag("Muon.Calib.mdtCalibrationSource", "MDT") # Source for MDT t0s and rts
-    mcf.addFlag("Muon.Calib.mdtPropagationSpeedBeta", 0.85) #
+    mcf.addFlag("Muon.Calib.mdtPropagationSpeedBeta", lambda prevFlags : 1.0 if prevFlags.Input.isMC else 0.85) #
      
     mcf.addFlag("Muon.Calib.CscPedFromLocalFile", False)  
     mcf.addFlag("Muon.Calib.CscNoiseFromLocalFile", False)  
diff --git a/MuonSpectrometer/MuonConfig/python/MuonConfigUtils.py b/MuonSpectrometer/MuonConfig/python/MuonConfigUtils.py
index f843eff1428157842b25f47c151f4d498a15a1ff..0581a31abf81101f0ccefc29e069a77610bd11fc 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonConfigUtils.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonConfigUtils.py
@@ -2,6 +2,7 @@
 
 # This file is just for shared functions etc used by this package.
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
 
 def SetupMuonStandaloneArguments():
     from argparse import ArgumentParser
@@ -71,7 +72,7 @@ def SetupMuonStandaloneOutput(cfg, ConfigFlags, itemsToRecord):
     outstream.ForceRead = True
 
     # Fix for ATLASRECTS-5151
-    from  TrkEventCnvTools.TrkEventCnvToolsConf import Trk__EventCnvSuperTool
+    Trk__EventCnvSuperTool = CompFactory.Trk__EventCnvSuperTool
     cnvTool = Trk__EventCnvSuperTool(name = 'EventCnvSuperTool')
     cnvTool.MuonCnvTool.FixTGCs = True 
-    cfg.addPublicTool(cnvTool)
\ No newline at end of file
+    cfg.addPublicTool(cnvTool)
diff --git a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
index b733d3873960acc599ee9bf5ad2d1d13034c1bce..d6fac1734e4ab26771ba9cb9c8633b231f65bfb3 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonGeometryConfig.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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
@@ -24,7 +24,9 @@ def MuonGeoModelCfg(flags):
     detTool.UseConditionDb = 1
     detTool.UseIlinesFromGM = 1
     detTool.BuildFromNova = 0
-    if ( ( not flags.Detector.SimulateMuon or flags.Detector.OverlayMuon ) and flags.Common.Project != "AthSimulation" ):
+
+    enableAlignment = flags.Common.Project != 'AthSimulation' and not flags.Detector.SimulateMuon and not flags.Detector.OverlayMuon
+    if enableAlignment:
         # This is all migrated from MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonAlignConfig.py
 
         from IOVDbSvc.IOVDbSvcConfig import addFolders
@@ -121,10 +123,11 @@ def MuonGeoModelCfg(flags):
     # turn on/off caching of MdtReadoutElement surfaces
     detTool.CachingFlag = 1
 
-    from MuonGeoModel.MuonGeoModelConf import MuonDetectorCondAlg
-    MuonDetectorManagerCond = MuonDetectorCondAlg()
-    MuonDetectorManagerCond.MuonDetectorTool = detTool
-    acc.addCondAlgo(MuonDetectorManagerCond)
+    if enableAlignment:
+        MuonDetectorCondAlg = CompFactory.MuonDetectorCondAlg
+        MuonDetectorManagerCond = MuonDetectorCondAlg()
+        MuonDetectorManagerCond.MuonDetectorTool = detTool
+        acc.addCondAlgo(MuonDetectorManagerCond)
 
     gms.DetectorTools += [ detTool ]
     
diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
index b5ab1035dca0335afb6d99d9f3e281f40ec0f3c1..b688aec495bfb6e214571d182deaf34476fbd48d 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py
@@ -6,15 +6,12 @@ from AthenaCommon.Constants import DEBUG, INFO
 
 ## Small class to hold the names for cache containers, should help to avoid copy / paste errors
 class MuonPrdCacheNames(object):
-    MdtCache       = "MdtPrdCache"
-    CscCache       = "CscPrdCache"
-    CscStripCache  = "CscStripPrdCache"
-    RpcCache       = "RpcPrdCache"
-    TgcCache       = "TgcPrdCache"
-    sTgcCache      = "sTgcPrdCache"
-    MmCache        = "MmPrdCache"
-    RpcCoinCache   = "RpcCoinCache"  
-    TgcCoinCache   = "TgcCoinCache"
+    MdtCache  = "MdtPrdCache"
+    CscCache  = "CscPrdCache"
+    RpcCache  = "RpcPrdCache"
+    TgcCache  = "TgcPrdCache"
+    sTgcCache = "sTgcPrdCache"
+    MmCache   = "MmPrdCache"  
 
 ## This configuration function creates the IdentifiableCaches for PRD
 #
@@ -24,18 +21,12 @@ def MuonPrdCacheCfg():
     acc = ComponentAccumulator()
 
     MuonPRDCacheCreator=CompFactory.MuonPRDCacheCreator
-    cacheCreator = MuonPRDCacheCreator(CscStripCacheKey  = MuonPrdCacheNames.CscStripCache,
-                                       MdtCacheKey       = MuonPrdCacheNames.MdtCache,
-                                       CscCacheKey       = MuonPrdCacheNames.CscCache,
-                                       RpcCacheKey       = MuonPrdCacheNames.RpcCache,
-                                       TgcCacheKey       = MuonPrdCacheNames.TgcCache,
-                                       sTgcCacheKey      = MuonPrdCacheNames.sTgcCache,
-                                       MmCacheKey        = MuonPrdCacheNames.MmCache,
-                                       TgcCoinCacheKey   = MuonPrdCacheNames.TgcCoinCache,
-                                       RpcCoinCacheKey   = MuonPrdCacheNames.RpcCoinCache,
-                                       )
-
-    cacheCreator.OutputLevel = DEBUG
+    cacheCreator = MuonPRDCacheCreator(MdtCacheKey  = MuonPrdCacheNames.MdtCache,
+                                       CscCacheKey  = MuonPrdCacheNames.CscCache,
+                                       RpcCacheKey  = MuonPrdCacheNames.RpcCache,
+                                       TgcCacheKey  = MuonPrdCacheNames.TgcCache,
+                                       sTgcCacheKey = MuonPrdCacheNames.sTgcCache,
+                                       MmCacheKey   = MuonPrdCacheNames.MmCache)
     acc.addEventAlgo( cacheCreator, primary=True )
     return acc
 
diff --git a/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py b/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
index ab194938790bd6dea312322f289bb57080b8d9c4..913a945491846edee5fb03e82ce7883ec55bc17b 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonReconstructionConfig.py
@@ -33,15 +33,16 @@ if __name__=="__main__":
         from AthenaCommon.Logging import log
         log.info('Forcing track building cardinality to be equal to '+str(args.threads))
         # We want to force the algorithms to run in parallel (eventually the algorithm will be marked as cloneable in the source code)
-        from GaudiHive.GaudiHiveConf import AlgResourcePool
+        AlgResourcePool = CompFactory.AlgResourcePool
         cfg.addService(AlgResourcePool( OverrideUnClonable=True ) )
         track_builder = acc.getPrimary()
         track_builder.Cardinality=args.threads
             
     # This is a temporary fix - it should go someplace central as it replaces the functionality of addInputRename from here:
     # https://gitlab.cern.ch/atlas/athena/blob/master/Control/SGComps/python/AddressRemappingSvc.py
-    from SGComps.SGCompsConf import AddressRemappingSvc, ProxyProviderSvc
+    ProxyProviderSvc = CompFactory.ProxyProviderSvc
     pps = ProxyProviderSvc()
+    AddressRemappingSvc = CompFactory.AddressRemappingSvc
     ars=AddressRemappingSvc()
     pps.ProviderNames += [ 'AddressRemappingSvc' ]
     ars.TypeKeyRenameMaps += [ '%s#%s->%s' % ("TrackCollection", "MuonSpectrometerTracks", "MuonSpectrometerTracks_old") ]
diff --git a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
index a81b16422c1377a0aec869dd9059e94911053b98..6001317af28aec61d0c95075f5cfd97d381bebba 100644
--- a/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/MuonSegmentFindingConfig.py
@@ -29,7 +29,7 @@ from MuonConfig.MuonCalibConfig import MdtCalibDbAlgCfg
 from MuonConfig.MuonRecToolsConfig import MCTBFitterCfg, MuonAmbiProcessorCfg, MuonStationIntersectSvcCfg, MuonTrackCleanerCfg
 
 def MuonHoughPatternFinderTool(flags, **kwargs):
-    # Taken from https://gitlab.cern.ch/atlas/athena/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py#L173     from MuonHoughPatternTools/MuonHoughPatternToolsConf import Muon__MuonHoughPatternFinderTool
+    # Taken from https://gitlab.cern.ch/atlas/athena/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecTools.py#L173
 
     Muon__MuonHoughPatternFinderTool=CompFactory.Muon__MuonHoughPatternFinderTool
     
diff --git a/MuonSpectrometer/MuonConfig/python/RPC_DigitizationConfig.py b/MuonSpectrometer/MuonConfig/python/RPC_DigitizationConfig.py
index bec08779483e07422b70a1998d7687dda492655a..e941cfcf3b7f13b054104d153c872927a7f3ac0e 100644
--- a/MuonSpectrometer/MuonConfig/python/RPC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/RPC_DigitizationConfig.py
@@ -1,14 +1,12 @@
 """Define methods to construct configured RPC Digitization tools and algorithms
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
-RpcDigitizationTool, RPC_Digitizer=CompFactory.getComps("RpcDigitizationTool","RPC_Digitizer",)
-PileUpXingFolder=CompFactory.PileUpXingFolder
-from MuonConfig.MuonByteStreamCnvTestConfig import RpcDigitToRpcRDOCfg, RpcOverlayDigitToRpcRDOCfg
+from MuonConfig.MuonByteStreamCnvTestConfig import RpcDigitToRpcRDOCfg
 from MuonConfig.MuonCablingConfig import RPCCablingConfigCfg
 from Digitization.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
@@ -30,10 +28,11 @@ def RPC_RangeToolCfg(flags, name="RPC_Range", **kwargs):
     kwargs.setdefault("LastXing", RPC_LastXing())
     kwargs.setdefault("CacheRefreshFrequency", 1.0)
     kwargs.setdefault("ItemList", ["RPCSimHitCollection#RPC_Hits"])
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
-def RPC_DigitizationToolCfg(flags, name="RPC_DigitizationTool", **kwargs):
+def RPC_DigitizationToolCommonCfg(flags, name="RPC_DigitizationTool", **kwargs):
     """Return ComponentAccumulator with configured RpcDigitizationTool"""
     from MuonConfig.MuonCondAlgConfig import RpcCondDbAlgCfg # MT-safe conditions access
     acc = RpcCondDbAlgCfg(flags)
@@ -78,19 +77,27 @@ def RPC_DigitizationToolCfg(flags, name="RPC_DigitizationTool", **kwargs):
     kwargs.setdefault("FracClusterSize2_C",   [0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986, 0.259986])
     kwargs.setdefault("FracClusterSizeTail_C",[0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035, 0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035,  0.13035 ])
     kwargs.setdefault("MeanClusterSizeTail_C",[0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598, 0.548598])
+    RpcDigitizationTool = CompFactory.RpcDigitizationTool
     acc.setPrivateTools(RpcDigitizationTool(name, **kwargs))
     return acc
 
 
-def RPC_OverlayDigitizationToolCfg(flags, name="RPC_DigitizationTool", **kwargs):
+def RPC_DigitizationToolCfg(flags, name="RPC_DigitizationTool", **kwargs):
+    """Return ComponentAccumulator with configured RpcDigitizationTool"""
+    kwargs.setdefault("OutputObjectName", "RPC_DIGITS")
+    if flags.Digitization.PileUpPremixing:
+        kwargs.setdefault("OutputSDOName", flags.Overlay.BkgPrefix + "RPC_SDO")
+    else:
+        kwargs.setdefault("OutputSDOName", "RPC_SDO")
+    return RPC_DigitizationToolCommonCfg(flags, name, **kwargs)
+
+
+def RPC_OverlayDigitizationToolCfg(flags, name="Rpc_OverlayDigitizationTool", **kwargs):
     """Return ComponentAccumulator with RpcDigitizationTool configured for Overlay"""
-    acc = ComponentAccumulator()
     kwargs.setdefault("OnlyUseContainerName", False)
-    kwargs.setdefault("OutputObjectName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "RPC_DIGITS")
-    if not flags.Overlay.DataOverlay:
-        kwargs.setdefault("OutputSDOName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "RPC_SDO")
-    acc.setPrivateTools(RpcDigitizationTool(name, **kwargs))
-    return acc
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "RPC_DIGITS")
+    kwargs.setdefault("OutputSDOName", flags.Overlay.SigPrefix + "RPC_SDO")
+    return RPC_DigitizationToolCommonCfg(flags, name, **kwargs)
 
 
 def RPC_OutputCfg(flags):
@@ -120,7 +127,12 @@ def RPC_OverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(RPC_OverlayDigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
-    acc.addEventAlgo(RPC_Digitizer(**kwargs))
+
+    if flags.Concurrency.NumThreads > 0:
+        kwargs.setdefault("Cardinality", flags.Concurrency.NumThreads)
+
+    RPC_Digitizer = CompFactory.RPC_Digitizer
+    acc.addEventAlgo(RPC_Digitizer(name="RPC_OverlayDigitizer", **kwargs))
     return acc
 
 
@@ -132,25 +144,9 @@ def RPC_DigitizationCfg(flags, **kwargs):
     return acc
 
 
-def RPC_OverlayDigitizationCfg(flags, **kwargs):
-    """Return ComponentAccumulator with RPC Overlay digitization and Output"""
-    acc = RPC_OverlayDigitizationBasicCfg(flags, **kwargs)
-    acc.merge(RPC_OutputCfg(flags))
-    return acc
-
-
 def RPC_DigitizationDigitToRDOCfg(flags):
     """Return ComponentAccumulator with RPC digitization and Digit to RPCPAD RDO"""
     acc = RPC_DigitizationCfg(flags)
     acc.merge(RPCCablingConfigCfg(flags))
     acc.merge(RpcDigitToRpcRDOCfg(flags))
     return acc
-
-
-def RPC_OverlayDigitizationDigitToRDOCfg(flags):
-    """Return ComponentAccumulator with RPC Overlay digitization and Digit to RPCPAD RDO"""
-    acc = RPC_OverlayDigitizationCfg(flags)
-    acc.merge(RPCCablingConfigCfg(flags))
-    acc.merge(RpcOverlayDigitToRpcRDOCfg(flags))
-    return acc
-
diff --git a/MuonSpectrometer/MuonConfig/python/RpcOverlayConfig.py b/MuonSpectrometer/MuonConfig/python/RpcOverlayConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..ccedcadf798250cd70b794c6db9e5dfafea70a4e
--- /dev/null
+++ b/MuonSpectrometer/MuonConfig/python/RpcOverlayConfig.py
@@ -0,0 +1,95 @@
+
+"""Define methods to construct configured RPC overlay algorithms
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def RPCDataOverlayExtraCfg(flags, **kwargs):
+    """Return a ComponentAccumulator with RPC data overlay specifics"""
+    acc = ComponentAccumulator()
+
+    # We need to convert BS to RDO for data overlay
+    from MuonConfig.MuonBytestreamDecodeConfig import RpcBytestreamDecodeCfg
+    acc.merge(RpcBytestreamDecodeCfg(flags))
+
+    return acc
+
+
+def RpcOverlayAlgCfg(flags, name="RpcOverlay", **kwargs):
+    """Return a ComponentAccumulator for RPCOverlay algorithm"""
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "RPC_DIGITS")
+    kwargs.setdefault("SignalInputKey", flags.Overlay.SigPrefix + "RPC_DIGITS")
+    kwargs.setdefault("OutputKey", "RPC_DIGITS")
+
+    # Do RPC overlay
+    RpcOverlay = CompFactory.RpcOverlay
+    alg = RpcOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "RpcPadContainer#RPCPAD"
+    ]))
+
+    return acc
+
+
+def RpcTruthOverlayCfg(flags, name="RpcTruthOverlay", **kwargs):
+    """Return a ComponentAccumulator for the RPC SDO overlay algorithm"""
+    acc = ComponentAccumulator()
+
+    # We do not need background RPC SDOs
+    if flags.Overlay.DataOverlay:
+        kwargs.setdefault("BkgInputKey", "")
+    else:
+        kwargs.setdefault("BkgInputKey",
+                          flags.Overlay.BkgPrefix + "RPC_SDO")
+
+    kwargs.setdefault("SignalInputKey",
+                      flags.Overlay.SigPrefix + "RPC_SDO")
+    kwargs.setdefault("OutputKey", "RPC_SDO")
+
+    # Do RPC truth overlay
+    MuonSimDataOverlay = CompFactory.MuonSimDataOverlay
+    alg = MuonSimDataOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "MuonSimDataCollection#RPC_SDO"
+    ]))
+
+    return acc
+
+
+def RpcOverlayCfg(flags):
+    """Configure and return a ComponentAccumulator for RPC overlay"""
+    acc = ComponentAccumulator()
+
+    # Add data overlay specifics
+    if flags.Overlay.DataOverlay:
+        acc.merge(RPCDataOverlayExtraCfg(flags))
+
+    # Add RPC RDO to digit config
+    from MuonConfig.MuonByteStreamCnvTestConfig import RpcRdoToRpcDigitCfg
+    acc.merge(RpcRdoToRpcDigitCfg(flags))
+    # Add RPC overlay digitization algorithm
+    from MuonConfig.RPC_DigitizationConfig import RPC_OverlayDigitizationBasicCfg
+    acc.merge(RPC_OverlayDigitizationBasicCfg(flags))
+    # Add RPC overlay algorithm
+    acc.merge(RpcOverlayAlgCfg(flags))
+    # Add RPC truth overlay
+    acc.merge(RpcTruthOverlayCfg(flags))
+    # Add RPC digit to RDO config
+    from MuonConfig.MuonByteStreamCnvTestConfig import RpcDigitToRpcRDOCfg
+    acc.merge(RpcDigitToRpcRDOCfg(flags))
+
+    return acc
diff --git a/MuonSpectrometer/MuonConfig/python/TGC_DigitizationConfig.py b/MuonSpectrometer/MuonConfig/python/TGC_DigitizationConfig.py
index 0eb8779e6236ed0f7a89dedc20b7fa274e340f6c..dcf3178a509db12840083734e3ce0079930f7fb6 100644
--- a/MuonSpectrometer/MuonConfig/python/TGC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonConfig/python/TGC_DigitizationConfig.py
@@ -1,14 +1,12 @@
 """Define methods to construct configured TGC Digitization tools and algorithms
 
-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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
-TgcDigitizationTool, TGCDigitizer=CompFactory.getComps("TgcDigitizationTool","TGCDigitizer",)
-PileUpXingFolder=CompFactory.PileUpXingFolder
-from MuonConfig.MuonByteStreamCnvTestConfig import TgcDigitToTgcRDOCfg, TgcOverlayDigitToTgcRDOCfg
+from MuonConfig.MuonByteStreamCnvTestConfig import TgcDigitToTgcRDOCfg
 from MuonConfig.MuonCablingConfig import TGCCablingConfigCfg
 from Digitization.TruthDigitizationOutputConfig import TruthDigitizationOutputCfg
 from Digitization.PileUpToolsConfig import PileUpToolsCfg
@@ -30,6 +28,7 @@ def TGC_RangeToolCfg(flags, name="TGC_Range", **kwargs):
     kwargs.setdefault("LastXing", TGC_LastXing())
     kwargs.setdefault("CacheRefreshFrequency", 1.0)
     kwargs.setdefault("ItemList", ["TGCSimHitCollection#TGC_Hits"])
+    PileUpXingFolder = CompFactory.PileUpXingFolder
     return PileUpXingFolder(name, **kwargs)
 
 
@@ -44,17 +43,18 @@ def TGC_DigitizationToolCfg(flags, name="TGC_DigitizationTool", **kwargs):
         kwargs.setdefault("OutputSDOName", flags.Overlay.BkgPrefix + "TGC_SDO")
     else:
         kwargs.setdefault("OutputSDOName", "TGC_SDO")
+        TgcDigitizationTool = CompFactory.TgcDigitizationTool
     acc.setPrivateTools(TgcDigitizationTool(name, **kwargs))
     return acc
 
 
-def TGC_OverlayDigitizationToolCfg(flags, name="TGC_OverlayDigitizationTool", **kwargs):
+def TGC_OverlayDigitizationToolCfg(flags, name="Tgc_OverlayDigitizationTool", **kwargs):
     """Return ComponentAccumulator with TgcDigitizationTool configured for Overlay"""
     acc = ComponentAccumulator()
     kwargs.setdefault("OnlyUseContainerName", False)
-    kwargs.setdefault("OutputObjectName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "TGC_DIGITS")
-    if not flags.Overlay.DataOverlay:
-        kwargs.setdefault("OutputSDOName", "StoreGateSvc+" + flags.Overlay.SigPrefix + "TGC_SDO")
+    kwargs.setdefault("OutputObjectName", flags.Overlay.SigPrefix + "TGC_DIGITS")
+    kwargs.setdefault("OutputSDOName", flags.Overlay.SigPrefix + "TGC_SDO")
+    TgcDigitizationTool = CompFactory.TgcDigitizationTool
     acc.setPrivateTools(TgcDigitizationTool(name, **kwargs))
     return acc
 
@@ -86,7 +86,12 @@ def TGC_OverlayDigitizationBasicCfg(flags, **kwargs):
     if "DigitizationTool" not in kwargs:
         tool = acc.popToolsAndMerge(TGC_OverlayDigitizationToolCfg(flags))
         kwargs["DigitizationTool"] = tool
-    acc.addEventAlgo(TGCDigitizer(**kwargs))
+
+    if flags.Concurrency.NumThreads > 0:
+        kwargs.setdefault("Cardinality", flags.Concurrency.NumThreads)
+
+    TGCDigitizer = CompFactory.TGCDigitizer
+    acc.addEventAlgo(TGCDigitizer(name="TGC_OverlayDigitizer", **kwargs))
     return acc
 
 
@@ -98,25 +103,9 @@ def TGC_DigitizationCfg(flags, **kwargs):
     return acc
 
 
-def TGC_OverlayDigitizationCfg(flags, **kwargs):
-    """Return ComponentAccumulator with TGC Overlay digitization and Output"""
-    acc = TGC_OverlayDigitizationBasicCfg(flags, **kwargs)
-    acc.merge(TGC_OutputCfg(flags))
-    return acc
-
-
 def TGC_DigitizationDigitToRDOCfg(flags):
     """Return ComponentAccumulator with TGC digitization and Digit to TGCRDO"""
     acc = TGC_DigitizationCfg(flags)
     acc.merge(TGCCablingConfigCfg(flags))
     acc.merge(TgcDigitToTgcRDOCfg(flags))
     return acc
-
-
-def TGC_OverlayDigitizationDigitToRDOCfg(flags):
-    """Return ComponentAccumulator with TGC Overlay digitization and Digit to TGCRDO"""
-    acc = TGC_OverlayDigitizationCfg(flags)
-    acc.merge(TGCCablingConfigCfg(flags))
-    acc.merge(TgcOverlayDigitToTgcRDOCfg(flags))
-    return acc
-
diff --git a/MuonSpectrometer/MuonConfig/python/TgcOverlayConfig.py b/MuonSpectrometer/MuonConfig/python/TgcOverlayConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..dfceb435bf37292cabbcd7e18330cb490de383ab
--- /dev/null
+++ b/MuonSpectrometer/MuonConfig/python/TgcOverlayConfig.py
@@ -0,0 +1,95 @@
+
+"""Define methods to construct configured TGC overlay algorithms
+
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def TGCDataOverlayExtraCfg(flags, **kwargs):
+    """Return a ComponentAccumulator with TGC data overlay specifics"""
+    acc = ComponentAccumulator()
+
+    # We need to convert BS to RDO for data overlay
+    from MuonConfig.MuonBytestreamDecodeConfig import TgcBytestreamDecodeCfg
+    acc.merge(TgcBytestreamDecodeCfg(flags))
+
+    return acc
+
+
+def TgcOverlayAlgCfg(flags, name="TgcOverlay", **kwargs):
+    """Return a ComponentAccumulator for TGCOverlay algorithm"""
+    acc = ComponentAccumulator()
+
+    kwargs.setdefault("BkgInputKey", flags.Overlay.BkgPrefix + "TGC_DIGITS")
+    kwargs.setdefault("SignalInputKey", flags.Overlay.SigPrefix + "TGC_DIGITS")
+    kwargs.setdefault("OutputKey", "TGC_DIGITS")
+
+    # Do TGC overlay
+    TgcOverlay = CompFactory.TgcOverlay
+    alg = TgcOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "TgcRdoContainer#TGCRDO"
+    ]))
+
+    return acc
+
+
+def TgcTruthOverlayCfg(flags, name="TgcTruthOverlay", **kwargs):
+    """Return a ComponentAccumulator for the TGC SDO overlay algorithm"""
+    acc = ComponentAccumulator()
+
+    # We do not need background TGC SDOs
+    if flags.Overlay.DataOverlay:
+        kwargs.setdefault("BkgInputKey", "")
+    else:
+        kwargs.setdefault("BkgInputKey",
+                          flags.Overlay.BkgPrefix + "TGC_SDO")
+
+    kwargs.setdefault("SignalInputKey",
+                      flags.Overlay.SigPrefix + "TGC_SDO")
+    kwargs.setdefault("OutputKey", "TGC_SDO")
+
+    # Do TGC truth overlay
+    MuonSimDataOverlay = CompFactory.MuonSimDataOverlay
+    alg = MuonSimDataOverlay(name, **kwargs)
+    acc.addEventAlgo(alg)
+
+    # Setup output
+    from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
+    acc.merge(OutputStreamCfg(flags, "RDO", ItemList=[
+        "MuonSimDataCollection#TGC_SDO"
+    ]))
+
+    return acc
+
+
+def TgcOverlayCfg(flags):
+    """Configure and return a ComponentAccumulator for TGC overlay"""
+    acc = ComponentAccumulator()
+
+    # Add data overlay specifics
+    if flags.Overlay.DataOverlay:
+        acc.merge(TGCDataOverlayExtraCfg(flags))
+
+    # Add TGC RDO to digit config
+    from MuonConfig.MuonByteStreamCnvTestConfig import TgcRdoToTgcDigitCfg
+    acc.merge(TgcRdoToTgcDigitCfg(flags))
+    # Add TGC overlay digitization algorithm
+    from MuonConfig.TGC_DigitizationConfig import TGC_OverlayDigitizationBasicCfg
+    acc.merge(TGC_OverlayDigitizationBasicCfg(flags))
+    # Add TGC overlay algorithm
+    acc.merge(TgcOverlayAlgCfg(flags))
+    # Add TGC truth overlay
+    acc.merge(TgcTruthOverlayCfg(flags))
+    # Add TGC digit to RDO config
+    from MuonConfig.MuonByteStreamCnvTestConfig import TgcDigitToTgcRDOCfg
+    acc.merge(TgcDigitToTgcRDOCfg(flags))
+
+    return acc
diff --git a/MuonSpectrometer/MuonConfig/test/MDT_DigitizationConfig_test.py b/MuonSpectrometer/MuonConfig/test/MDT_DigitizationConfig_test.py
index 7e89dd880eeaf2e5e70feec74b2d1f740c658332..6aa3821368fc9ca832e06a50239688e8c9391acf 100755
--- a/MuonSpectrometer/MuonConfig/test/MDT_DigitizationConfig_test.py
+++ b/MuonSpectrometer/MuonConfig/test/MDT_DigitizationConfig_test.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 """Run tests on MDT_DigitizationConfigNew.py
 
-Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 """
 import sys
 from AthenaCommon.Logging import log
@@ -11,7 +11,7 @@ from AthenaConfiguration.TestDefaults import defaultTestFiles
 from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
-from MuonConfig.MDT_DigitizationConfig import MDT_DigitizerDigitToRDOCfg
+from MuonConfig.MDT_DigitizationConfig import MDT_DigitizationCfg
 
 # Set up logging and new style config
 log.setLevel(DEBUG)
@@ -24,7 +24,7 @@ ConfigFlags.lock()
 # Construct our accumulator to run
 acc = MainServicesSerialCfg()
 acc.merge(PoolReadCfg(ConfigFlags))
-acc.merge(MDT_DigitizerDigitToRDOCfg(ConfigFlags))
+acc.merge(MDT_DigitizationCfg(ConfigFlags))
 # Dump config
 acc.getService("StoreGateSvc").Dump = True
 acc.getService("ConditionStore").Dump = True
diff --git a/MuonSpectrometer/MuonConfig/test/MdtIntersectGeometry_test.py b/MuonSpectrometer/MuonConfig/test/MdtIntersectGeometry_test.py
index 8116c96c0dde07debc92840a24c015c345f090cf..02771d73b8c37b3d8dc72ae67721e3a50628b2ac 100644
--- a/MuonSpectrometer/MuonConfig/test/MdtIntersectGeometry_test.py
+++ b/MuonSpectrometer/MuonConfig/test/MdtIntersectGeometry_test.py
@@ -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.
 #
 # File: MuonStationIntersectSvc/share/MdtIntersectGeometry_test.py
 # Author: scott snyder
@@ -12,6 +12,7 @@
 from __future__ import print_function
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaPython.PyAthenaComps import Alg, StatusCode
 import ROOT
 
@@ -41,7 +42,7 @@ def testCfg (configFlags):
     from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
     result.merge (MagneticFieldSvcCfg(configFlags, UseDCS = False))
 
-    from MuonStationIntersectSvc.MuonStationIntersectSvcConf import MuonStationIntersectSvc
+    MuonStationIntersectSvc = CompFactory.MuonStationIntersectSvc
     result.addService (MuonStationIntersectSvc ('MuonStationIntersectSvc',
                                                 OutputLevel = 1))
     
diff --git a/MuonSpectrometer/MuonConfig/test/MdtRdoToPrepDataTool_test.py b/MuonSpectrometer/MuonConfig/test/MdtRdoToPrepDataTool_test.py
index aac52de592941b7293d4fb33eba8e4ff173fde6c..a5911c4aafa118a11be0b04cbc3ed6c57f9b5c7b 100644
--- a/MuonSpectrometer/MuonConfig/test/MdtRdoToPrepDataTool_test.py
+++ b/MuonSpectrometer/MuonConfig/test/MdtRdoToPrepDataTool_test.py
@@ -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.
 #
 # File: MuonMDT_CnvTools/share/MdtRdoToPrepDataTool_test.py
 # Author: scott snyder
@@ -12,6 +12,7 @@
 from __future__ import print_function
 
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
 from AthenaPython.PyAthenaComps import Alg, StatusCode
 import ROOT
 
@@ -43,7 +44,7 @@ def testCfg (configFlags):
     from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
     result.merge (MagneticFieldSvcCfg(configFlags, UseDCS = False))
 
-    from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataTool
+    Muon__MdtRdoToPrepDataTool = CompFactory.Muon__MdtRdoToPrepDataTool
     result.addPublicTool (Muon__MdtRdoToPrepDataTool ('Muon__MdtRdoToPrepDataTool', OutputLevel = 1))
     
     result.addEventAlgo (TestAlg ('TestAlg'))
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/CSC_Digitization/CscDigitizationTool.h b/MuonSpectrometer/MuonDigitization/CSC_Digitization/CSC_Digitization/CscDigitizationTool.h
index 9151ec77c61b93209ff96df29c338bcd83901f0c..2de2b90ef3cfe62adb9d067a200d24a6f5459749 100644
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/CSC_Digitization/CscDigitizationTool.h
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/CSC_Digitization/CscDigitizationTool.h
@@ -83,7 +83,7 @@ public: //possibly these should be private?
 
 private:
 
-  PublicToolHandle<ICscCalibTool> m_pcalib{this, "cscCalibTool", "CscCalibTool", ""};
+  ToolHandle<ICscCalibTool> m_pcalib{this, "cscCalibTool", "CscCalibTool", "CSC calibration tool"};
 
   BooleanProperty m_onlyUseContainerName{this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."};
   SG::ReadHandleKey<CSCSimHitCollection> m_hitsContainerKey{this, "InputObjectName", "CSC_Hits", "name of the input objects"}; // name of the input objects
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py
index 8022118349ad6ee58802954ede5e3dd0620d20d7..7768892374359ed092734379dc89addc88820628 100644
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/python/CSC_DigitizationConfig.py
@@ -26,20 +26,12 @@ def getCscRange(name="CscRange", **kwargs):
     return CfgMgr.PileUpXingFolder(name, **kwargs)
 
 
-def getCscDigitizationTool(name="CscDigitizationTool", **kwargs):
+def getCscDigitizationToolBase(name, **kwargs):
     if jobproperties.Digitization.doXingByXingPileUp(): # PileUpTool approach
         # This should match the range for the CSC in Simulation/Digitization/share/MuonDigitization.py 
         kwargs.setdefault("FirstXing", CSC_FirstXing() ) 
         kwargs.setdefault("LastXing",  CSC_LastXing() ) 
 
-    kwargs.setdefault("InputObjectName", "CSC_Hits")
-    kwargs.setdefault("OutputObjectName", "CSC_DIGITS")
-    if jobproperties.Digitization.PileUpPremixing and 'OverlayMT' in jobproperties.Digitization.experimentalDigi():
-        from OverlayCommonAlgs.OverlayFlags import overlayFlags
-        kwargs.setdefault("CSCSimDataCollectionOutputName", overlayFlags.bkgPrefix() + "CSC_SDO")
-    else:
-        kwargs.setdefault("CSCSimDataCollectionOutputName", "CSC_SDO")
-
     kwargs.setdefault("pedestal", 0.0) 	 
     kwargs.setdefault("WindowLowerOffset", -25.0) #-50.0,	 
     kwargs.setdefault("WindowUpperOffset",  25.0) #50.0  	 
@@ -51,6 +43,18 @@ def getCscDigitizationTool(name="CscDigitizationTool", **kwargs):
 
     return CfgMgr.CscDigitizationTool(name, **kwargs)
 
+
+def getCscDigitizationTool(name="CscDigitizationTool", **kwargs):
+    kwargs.setdefault("InputObjectName", "CSC_Hits")
+    kwargs.setdefault("OutputObjectName", "CSC_DIGITS")
+    if jobproperties.Digitization.PileUpPremixing and 'OverlayMT' in jobproperties.Digitization.experimentalDigi():
+        from OverlayCommonAlgs.OverlayFlags import overlayFlags
+        kwargs.setdefault("CSCSimDataCollectionOutputName", overlayFlags.bkgPrefix() + "CSC_SDO")
+    else:
+        kwargs.setdefault("CSCSimDataCollectionOutputName", "CSC_SDO")
+    return getCscDigitizationToolBase(name, **kwargs)
+
+
 def getCscOverlayDigitizationTool(name="CscOverlayDigitizationTool",**kwargs):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
     if overlayFlags.isOverlayMT():
@@ -62,7 +66,8 @@ def getCscOverlayDigitizationTool(name="CscOverlayDigitizationTool",**kwargs):
         kwargs.setdefault("OutputObjectName", overlayFlags.evtStore() +  "+CSC_DIGITS")
         if not overlayFlags.isDataOverlay():
             kwargs.setdefault("CSCSimDataCollectionOutputName", overlayFlags.evtStore() + "+CSC_SDO")
-    return CfgMgr.CscDigitizationTool(name,**kwargs)
+    return getCscDigitizationToolBase(name, **kwargs)
+
 
 def getCscOverlayDigitBuilder(name="CscOverlayDigitBuilder", **kwargs):
     kwargs.setdefault("DigitizationTool","CscOverlayDigitizationTool")
diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h
index 2bb8c59437d2370c0bf2d68392c4493da39e94d1..7012d0fdfefcdfed2f71df86136933bec3f3d526 100644
--- a/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h
+++ b/MuonSpectrometer/MuonOverlay/CscOverlay/CscOverlay/CscOverlay.h
@@ -97,7 +97,7 @@ private:
   ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
     "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
   ToolHandle<ICscCalibTool> m_cscCalibTool{this, "CalibTool", "CscCalibTool", ""};
-  PublicToolHandle<Muon::ICSC_RDO_Decoder> m_cscRdoDecoderTool{this, "CscRdoDecoderTool", "Muon::CscRDO_Decoder", ""};
+  ToolHandle<Muon::ICSC_RDO_Decoder> m_cscRdoDecoderTool{this, "CscRdoDecoderTool", "Muon::CscRDO_Decoder", ""};
 
   ServiceHandle <IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", "Random Number Service"};      // Random number service
 };
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h
index 985fd62d1779abe1aeb56111260b82b9d724f784..01d8e691f6163f794df700f9ecb3d2f687108ceb 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h
@@ -53,7 +53,7 @@ public:
   MuonPrepDataContainer(unsigned int max);
 
   // Constructor with IdentifiableCache object
-  MuonPrepDataContainer(EventContainers::IdentifiableCache<CollectionT> * cache);
+  MuonPrepDataContainer(EventContainers::IdentifiableCache< Muon::MuonPrepDataCollection <CollectionT> >* cache);
 
   // Destructor:
   virtual ~MuonPrepDataContainer();
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc
index 454e660fd8ef6703d9fe5a6828a7eb9824f83da0..b872fac33a51c01614f16c3331c523dd5ce82a6d 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ MuonPrepDataContainer< CollectionT>::MuonPrepDataContainer(unsigned int max) :
 
 template< class CollectionT>
 // Constructor with IdentifiableCache:
-MuonPrepDataContainer<CollectionT>::MuonPrepDataContainer(EventContainers::IdentifiableCache<CollectionT> * cache):
+MuonPrepDataContainer<CollectionT>::MuonPrepDataContainer(EventContainers::IdentifiableCache< Muon::MuonPrepDataCollection <CollectionT> >* cache):
   IdentifiableContainer<CollectionT>(cache)
 {}
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h
index 9aa34a47310dfea49bef98cdce9c6398f7ab9277..15d9f0fb09d6ea4de002ed3c934c545c504366ea 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h
@@ -21,7 +21,6 @@
 #include "MuonPrepRawData/sTgcPrepDataContainer.h"
 #include "MuonPrepRawData/MMPrepDataContainer.h"
 #include "AthLinks/ElementLink.h"
-#include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 
 #define EXPAND_DLV(T, suffix) \
   ::DataLinkVector< Muon::MuonPrepDataCollection< T > > m_dummy_dlv_ ## suffix ; \
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/selection.xml b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/selection.xml
index bde3225fac24afea29a4d6b9aa492345119930d6..65dce4844e6a755e6965554b2960d93de325508e 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/selection.xml
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/selection.xml
@@ -156,14 +156,5 @@
   <class name="ElementLink<Muon::MMPrepDataContainer>"/>
   <class name="ElementLink<Muon::MMPrepDataContainer>::Base"/>
 
-  <!-- Caches -->
-  <class name="CscPrepDataCollection_Cache"/>
-  <class name="CscStripPrepDataCollection_Cache"/>
-  <class name="MdtPrepDataCollection_Cache"/>
-  <class name="RpcPrepDataCollection_Cache"/>
-  <class name="TgcPrepDataCollection_Cache"/>
-  <class name="sTgcPrepDataCollection_Cache"/>
-  <class name="MMPrepDataCollection_Cache"/>
-
 
 </lcgdict>
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h
index 0f5b7315927dc2f2521514216eda2b9bd37a24ce..e95ceb62c1aafaac3eb141b3f835024e28b84dad 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h
@@ -41,9 +41,6 @@ public:
     
   // Constructor with parameters:
   MuonCoinDataContainer(unsigned int max);
-
-  // Constructor with cache
-  MuonCoinDataContainer(EventContainers::IdentifiableCache<CollectionT> * cache);
   
   // Destructor:
   virtual ~MuonCoinDataContainer();
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc
index 43cbd8895d24a830a3f88fc3dc71d72c80c300f8..81678d6b295c98824800adc8bc4245a90d737f29 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -16,12 +16,6 @@ MuonCoinDataContainer< CollectionT>::MuonCoinDataContainer(unsigned int max) :
   IdentifiableContainer<CollectionT>(max)
 {}
 
-template< class CollectionT>
-// Constructor with parameters:
-MuonCoinDataContainer< CollectionT>::MuonCoinDataContainer(EventContainers::IdentifiableCache<CollectionT> * cache) :
-  IdentifiableContainer<CollectionT>(cache)
-{}
-
 template< class CollectionT>
 // Destructor
 MuonCoinDataContainer< CollectionT>::~MuonCoinDataContainer()
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataDict.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataDict.h
index e72395f5f34450e83141f18c5628336548f5c415..9345d3f56b0c6b1e22870cd8a2bbcd0f95d33faa 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataDict.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataDict.h
@@ -10,7 +10,6 @@
 #include "MuonTrigCoinData/TgcCoinDataContainer.h"
 #include "MuonTrigCoinData/RpcCoinData.h"
 #include "MuonTrigCoinData/RpcCoinDataContainer.h"
-#include "MuonTrigCoinData/MuonTrigCoinData_Cache.h"
 
 namespace tmpMuonTrigCoinData
 {
@@ -24,8 +23,6 @@ namespace tmpMuonTrigCoinData
     std::vector<Muon::MuonCoinDataCollection<Muon::TgcCoinData>* >  dummy2Tgc;
     DataVector<Muon::MuonCoinDataCollection<Muon::RpcCoinData> >    dummy1Rpc;
     std::vector<Muon::MuonCoinDataCollection<Muon::RpcCoinData>* >  dummy2Rpc;
-
-
   };
 }
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonTrigCoinData_Cache.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonTrigCoinData_Cache.h
deleted file mode 100644
index f84d3c52550d60b7ef57b7f862319081c5a25076..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonTrigCoinData_Cache.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#pragma once
-
-#include "EventContainers/IdentifiableCache.h"
-
-#include "MuonTrigCoinData/RpcCoinDataCollection.h"
-#include "MuonTrigCoinData/TgcCoinDataCollection.h"
-
-// Typedef the different templates which are likely to be used later on
-typedef EventContainers::IdentifiableCache <Muon::RpcCoinDataCollection> RpcCoinDataCollection_Cache;
-typedef EventContainers::IdentifiableCache <Muon::TgcCoinDataCollection> TgcCoinDataCollection_Cache;
-
-CLASS_DEF( RpcCoinDataCollection_Cache, 1162490086, 1 )
-CLASS_DEF( TgcCoinDataCollection_Cache, 1080713821, 1 )
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/selection.xml b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/selection.xml
index 2e5a89112ddd3855f0bbcd6888cc4a8ca874d6f9..6027d95d85b3a37b139ce456b98a59e9d3adb3d4 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/selection.xml
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/selection.xml
@@ -34,7 +34,4 @@
     <field name="m_last"   transient="true" />
     <field name="m_vect"   transient="true" />
   </class>
-
-  <class name="RpcCoinDataCollection_Cache" />
-  <class name="TgcCoinDataCollection_Cache" />
 </lcgdict>
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
index 8edff6311fd96ff2434ab5ad91682ba175b6fe86..616a8a72f870f01fa828dff70c4434578e10fc78 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/src/MuonClusterSegmentFinderTool.cxx
@@ -358,7 +358,13 @@ namespace Muon {
 
 	//interleave the phi hits
 	std::vector<const Trk::MeasurementBase*> vec2;
-        unsigned int netas = (*sit)->numberOfContainedROTs();
+	std::vector<const Trk::RIO_OnTrack*> etaHits;
+	for(unsigned int irot=0;irot<(*sit)->numberOfContainedROTs();irot++){
+	  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>((*sit)->rioOnTrack(irot));
+	  if( rot ) etaHits.push_back(rot);
+	}
+        unsigned int netas = etaHits.size();
+	ATH_MSG_DEBUG("got "<<netas<<" eta hits and "<<etaHitsRedone.size()<<" redone eta hits");
         bool useEtaHitsRedone = false;
         if(etaHitsRedone.size()>netas) {
           ATH_MSG_VERBOSE(" Found additional eta hits " << etaHitsRedone.size() - netas);
@@ -371,6 +377,7 @@ namespace Muon {
 	// pseudo measurement for vtx
 	Trk::PseudoMeasurementOnTrack* pseudoVtx = nullptr;
 	if(m_ipConstraint) {
+	  ATH_MSG_DEBUG("add pseudo vertex");
 	  double errVtx = 100.;
 	  Amg::MatrixX covVtx(1,1);
 	  covVtx(0,0) = errVtx*errVtx;
@@ -379,20 +386,19 @@ namespace Muon {
 	  pseudoVtx = new Trk::PseudoMeasurementOnTrack(Trk::LocalParameters( Trk::DefinedParameter(0,Trk::locX) ), covVtx,perVtx);
 	  vec2.push_back(pseudoVtx);
 	}
-
 	unsigned int iEta(0),iPhi(0);
 	ATH_MSG_VERBOSE( "There are " << (*sit)->numberOfContainedROTs() << " & " << phiHits.size() << " eta and phi hits" );
 	while(true) {
 	  float phiZ(999999.),etaZ(999999.);
 	  if(iPhi < phiHits.size()) phiZ = fabs(phiHits[iPhi]->globalPosition().z());
-	  if(iEta < (*sit)->numberOfContainedROTs()) etaZ = fabs((*sit)->rioOnTrack(iEta)->globalPosition().z());
+	  if(iEta < etaHits.size()) etaZ = fabs(etaHits[iEta]->globalPosition().z());
 	  if( phiZ < etaZ ) {
 	    vec2.push_back(phiHits[iPhi]);
 	    iPhi++;
 	  }
 	  else {
 	    if(!useEtaHitsRedone) {
-              vec2.push_back((*sit)->rioOnTrack(iEta));
+              vec2.push_back(etaHits[iEta]);
             } else {
               vec2.push_back(etaHitsRedone[iEta]);
             }
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx
index 4a9a130cdca3d8895c051c5927362140420fe85b..790b5b1acf798ee036c30f5db7e5f2d7ecf5b9e3 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx
@@ -65,7 +65,7 @@ StatusCode MuonTruthAssociationAlg::execute()
   for( const auto& muon : *muonTruthParticleLink ){
     // use primary track particle to get the truth link (except for the case of STACO, where we must use the ID track particle, as the combined is not truth-matched)
     const xAOD::TrackParticle* tp(0);
-    if (m_associateWithInDetTP || muon->author()==2) {
+    if (m_associateWithInDetTP || muon->author()==2 || muon->author()==6 ) {
       tp = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
     } 
     else{
@@ -92,6 +92,7 @@ StatusCode MuonTruthAssociationAlg::execute()
     try {
       ElementLink< xAOD::TruthParticleContainer > truthLink = tp->auxdata<ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink");
       if( truthLink.isValid() ){
+      	ATH_MSG_VERBOSE(" Got valid truth link for muon author " << muon->author() << " barcode " << (*truthLink)->barcode());
 	// loop over truth particles
 	bool foundTruth=false;
 	for( const auto& truthParticle : *muonTruthParticleRecoLink ){
diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx
index 97a7746da01c1231e90becd896f60c0b9d3ced36..d0cd9c98c7b2bfd40533eedc9717375132f131b2 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.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
 */
 
 /***************************************************************************
@@ -28,7 +28,7 @@ MuonPerformanceAlg
 
 //  CONSTRUCTOR:
 MuonPerformanceAlg::MuonPerformanceAlg(const std::string& name, ISvcLocator* pSvcLocator)
-  : 
+  :
   AthAlgorithm(name, pSvcLocator),
   m_writeToFile (false),
   m_nevents(0),
@@ -62,23 +62,23 @@ StatusCode MuonPerformanceAlg::initialize()
   m_nreco.resize(nbins);
   m_nreco5.resize(nbins);
   m_nreco10.resize(nbins);
-  m_hitCutString = { "SA 2.0   ", "CB all   ", "MuidCB   ", "MuGirl   ", "Tag      ","Calo     ", "ID       ","SA(no ID)","Tight    ", "Medium   ", "Loose    ","Combined " };
+  m_hitCutString = { "SA 2.0   ", "CB all   ", "MuidCB   ", "MuGirl   ", "Tag      ", "Calo     ", "ID       ", "SA(no ID)", "Tight    ", "Medium   ", "Loose    ", "Combined " };
 
-  // add muons 
-  if( m_pdgsToBeConsidered.value().empty() ){
+  // add muons
+  if ( m_pdgsToBeConsidered.value().empty() ) {
     m_selectedPdgs.insert(13);
     m_selectedPdgs.insert(-13);
-  }else{
+  } else {
     // add pdgs
-    for( auto pdg : m_pdgsToBeConsidered.value() ) m_selectedPdgs.insert(pdg);
+    for ( auto pdg : m_pdgsToBeConsidered.value() ) m_selectedPdgs.insert(pdg);
   }
-  if(!m_muonsNameKey.key().empty()) ATH_CHECK(m_muonsNameKey.initialize());
+  if (!m_muonsNameKey.key().empty()) ATH_CHECK(m_muonsNameKey.initialize());
 
   ATH_CHECK(m_eventInfo.initialize());
   ATH_CHECK(m_truthMuons.initialize());
   return StatusCode::SUCCESS;
 }
- 
+
 
 /////////////////////////////////////////////////////////////////
 
@@ -96,52 +96,52 @@ bool MuonPerformanceAlg::passID(const xAOD::TrackParticle* tp, bool debug) const
   uint8_t npho   = 0x0;
   uint8_t ntrthi = 0x0;
   uint8_t ntrtol = 0x0;
-      
+
   int tightness = 0;
 
   bool passesIDcuts = false;
 
-  if( tp  ){
-      
-    // check blayer 
-    tp->summaryValue(eblh,xAOD::expectInnermostPixelLayerHit);
-    tp->summaryValue(nblh,xAOD::numberOfInnermostPixelLayerHits);
-    tp->summaryValue(nblo,xAOD::numberOfInnermostPixelLayerOutliers);
-    if( static_cast<int>(eblh) ==0 ||
-	static_cast<int>(nblh) + static_cast<int>(nblo) > 0 )   tightness += 1;
+  if ( tp  ) {
+
+    // check blayer
+    tp->summaryValue(eblh, xAOD::expectInnermostPixelLayerHit);
+    tp->summaryValue(nblh, xAOD::numberOfInnermostPixelLayerHits);
+    tp->summaryValue(nblo, xAOD::numberOfInnermostPixelLayerOutliers);
+    if ( static_cast<int>(eblh) == 0 ||
+         static_cast<int>(nblh) + static_cast<int>(nblo) > 0 )   tightness += 1;
 
     // pixel hit counts
-    tp->summaryValue(nphi,xAOD::numberOfPixelHits);
-    tp->summaryValue(npds,xAOD::numberOfPixelDeadSensors);
-    if( static_cast<int>(nphi) + static_cast<int>(npds) >= 2 ) tightness +=2;
+    tp->summaryValue(nphi, xAOD::numberOfPixelHits);
+    tp->summaryValue(npds, xAOD::numberOfPixelDeadSensors);
+    if ( static_cast<int>(nphi) + static_cast<int>(npds) >= 2 ) tightness += 2;
 
     // sct hit counts
-    tp->summaryValue(nscthi,xAOD::numberOfSCTHits);
-    tp->summaryValue(nsctds,xAOD::numberOfSCTDeadSensors);
-    if( static_cast<int>(nscthi) + static_cast<int>(nsctds) > 5 )      tightness +=4;
+    tp->summaryValue(nscthi, xAOD::numberOfSCTHits);
+    tp->summaryValue(nsctds, xAOD::numberOfSCTDeadSensors);
+    if ( static_cast<int>(nscthi) + static_cast<int>(nsctds) > 5 )      tightness += 4;
 
     // hole cuts
-    tp->summaryValue(npho,xAOD::numberOfPixelHoles);
-    tp->summaryValue(nsctho,xAOD::numberOfSCTHoles);
-    if( static_cast<int>(npho) + static_cast<int>(nsctho) < 2 )         tightness +=8;
+    tp->summaryValue(npho, xAOD::numberOfPixelHoles);
+    tp->summaryValue(nsctho, xAOD::numberOfSCTHoles);
+    if ( static_cast<int>(npho) + static_cast<int>(nsctho) < 2 )         tightness += 8;
 
     // trt cuts
-    tp->summaryValue(ntrthi,xAOD::numberOfTRTHits);
-    tp->summaryValue(ntrtol,xAOD::numberOfTRTOutliers );
+    tp->summaryValue(ntrthi, xAOD::numberOfTRTHits);
+    tp->summaryValue(ntrtol, xAOD::numberOfTRTOutliers );
     int ntrt = static_cast<int>(ntrthi) + static_cast<int>(ntrtol);
     bool pass = true;
-    if(  ntrt > 5 && static_cast<int>(ntrtol)/(double)ntrt > 0.9 ) pass = false;                             
-    if( (fabs(tp->eta()) > 0.1 && fabs(tp->eta()) < 1.9 ) && ntrt <= 5 )                  pass = false; 
-    if( pass ) tightness += 16;
+    if (  ntrt > 5 && static_cast<int>(ntrtol) / (double)ntrt > 0.9 ) pass = false;
+    if ( (fabs(tp->eta()) > 0.1 && fabs(tp->eta()) < 1.9 ) && ntrt <= 5 )                  pass = false;
+    if ( pass ) tightness += 16;
 //
-// B layer is not a requirement anymore 
+// B layer is not a requirement anymore
 //
-    if(pass && tightness > 29) passesIDcuts = true;
+    if (pass && tightness > 29) passesIDcuts = true;
 
-    if(passesIDcuts&&debug) ATH_MSG_VERBOSE("ID trackparticle PASSED IDcuts with tightness " <<  tightness);
+    if (passesIDcuts && debug) ATH_MSG_VERBOSE("ID trackparticle PASSED IDcuts with tightness " <<  tightness);
 
   }
-  if(!passesIDcuts&&debug) ATH_MSG_DEBUG("ID trackparticle FAILED IDcuts with tightness " <<  tightness);
+  if (!passesIDcuts && debug) ATH_MSG_DEBUG("ID trackparticle FAILED IDcuts with tightness " <<  tightness);
 
   return passesIDcuts;
 
@@ -158,456 +158,453 @@ StatusCode MuonPerformanceAlg::execute()
   m_eventNumber = eventInfo->eventNumber();
 
   SG::ReadHandle<xAOD::TruthParticleContainer> TruthMuons(m_truthMuons);
-  if(!TruthMuons.isPresent()){
+  if (!TruthMuons.isPresent()) {
     ATH_MSG_DEBUG("no truth muon collection present");
     return StatusCode::SUCCESS;
   }
-  if(!TruthMuons.isValid()){
-    ATH_MSG_WARNING(m_truthMuons.key()<<" not valid");
+  if (!TruthMuons.isValid()) {
+    ATH_MSG_WARNING(m_truthMuons.key() << " not valid");
     return StatusCode::FAILURE;
   }
   ATH_MSG_VERBOSE("Retrieved truth muons " << TruthMuons->size());
   typedef ElementLink< xAOD::MuonContainer > MuonLink;
 
-  m_nevents +=1;
+  m_nevents += 1;
 
-  for (const auto truthMu: *TruthMuons){
+  for (const auto truthMu : *TruthMuons) {
     MuonLink link;
-    if( truthMu->pt() < 2000. || fabs(truthMu->eta()) > 2.5 ) continue;
     const int& theType   = truthMu->auxdata<int>("truthType");
     const int& theOrigin = truthMu->auxdata<int>("truthOrigin");
-    if( theType != 6 && theType != 7 ) continue;
-    if( theOrigin == 0 || theOrigin > 17 ) continue;
-    ATH_MSG_VERBOSE("first loop: type "<< theType << " origin " << theOrigin );
-    bool insideID = false;
-    if( fabs(truthMu->eta()) < 2.0 ) insideID = true;
     ATH_MSG_VERBOSE("Truth muon: pt " << truthMu->pt() << " eta " << truthMu->eta() );
+    ATH_MSG_VERBOSE("first loop: type " << theType << " origin " << theOrigin );
+    if ( truthMu->pt() < 2000. || fabs(truthMu->eta()) > 2.8 ) continue;
+    if (fabs(truthMu->eta()) > 2.5) ATH_MSG_VERBOSE(" SA |eta| > 2.5 muon with truth prec layers " << (int) truthMu->auxdata<uint8_t>("nprecLayers"));
+
+    if (fabs(truthMu->eta()) > 2.5 && (int) truthMu->auxdata<uint8_t>("nprecLayers") < 2 ) continue;
+    if ( theType != 6 && theType != 7 ) continue;
+    if ( theOrigin == 0 || theOrigin > 17 ) continue;
+    bool insideID = false;
+    if ( fabs(truthMu->eta()) < 2.0 ) insideID = true;
+    ATH_MSG_VERBOSE("Accepted Truth muon: pt " << truthMu->pt() << " eta " << truthMu->eta() );
+
+    if (!insideID) m_ntruth[0] += 1;
+    if (!insideID) m_ntruth[8] += 1;
+    if (!insideID) m_ntruth[9] += 1;
+    if (!insideID) m_ntruth[10] += 1;
+    if (insideID) for (int n = 1; n < 6; n++) m_ntruth[n] += 1;
+    if (insideID) for (int n = 7; n < 11; n++) m_ntruth[n] += 1;
+
+    if (truthMu->pt() > 5000.) {
+      if (!insideID) m_ntruth5[0] += 1;
+      if (!insideID) m_ntruth5[8] += 1;
+      if (!insideID) m_ntruth5[9] += 1;
+      if (!insideID) m_ntruth5[10] += 1;
+      if (insideID) for (int n = 1; n < 6; n++) m_ntruth5[n] += 1;
+      if (insideID) for (int n = 7; n < 11; n++) m_ntruth5[n] += 1;
+    }
 
-    if(!insideID) m_ntruth[0]+=1;
-    if(!insideID) m_ntruth[8]+=1;
-    if(!insideID) m_ntruth[9]+=1;
-    if(!insideID) m_ntruth[10]+=1;
-    if(insideID) for(int n=1; n<6; n++) m_ntruth[n]+=1;
-    if(insideID) for(int n=7; n<11; n++) m_ntruth[n]+=1;
-
-    if(truthMu->pt() > 5000.) {
-      if(!insideID) m_ntruth5[0]+=1;
-      if(!insideID) m_ntruth5[8]+=1;
-      if(!insideID) m_ntruth5[9]+=1;
-      if(!insideID) m_ntruth5[10]+=1;
-      if(insideID) for(int n=1; n<6; n++) m_ntruth5[n]+=1;
-      if(insideID) for(int n=7; n<11; n++) m_ntruth5[n]+=1;
-    } 
-
-    if(truthMu->pt() > 10000.) {
-      if(!insideID) m_ntruth10[0]+=1;
-      if(!insideID) m_ntruth10[8]+=1;
-      if(!insideID) m_ntruth10[9]+=1;
-      if(!insideID) m_ntruth10[10]+=1;
-      if(insideID) for(int n=1; n<6; n++) m_ntruth10[n]+=1;
-      if(insideID) for(int n=7; n<11; n++) m_ntruth10[n]+=1;
-    } 
-
-    if( truthMu->isAvailable< MuonLink >("recoMuonLink") ) link = truthMu->auxdata< MuonLink >("recoMuonLink");
-    else {
-      ATH_MSG_VERBOSE("No muon found for " << "pt " << truthMu->pt() << " eta " << truthMu->eta() << " precisionHits " << truthMu->auxdata<uint8_t>("nprecLayers") );
-      print(" Muon not found  by CaloTag and Calolikelihood ",  truthMu );
-      print(" Muon not found by MuidSA ", truthMu);
-      print(" Muon not found by MuTagIMO ", truthMu);
-      print(" Muon not found by MuGirl ", truthMu); 
-      print(" Muon not found by MuidCo ", truthMu);
-      print(" Combined Muon not found ", truthMu);
+    if (truthMu->pt() > 10000.) {
+      if (!insideID) m_ntruth10[0] += 1;
+      if (!insideID) m_ntruth10[8] += 1;
+      if (!insideID) m_ntruth10[9] += 1;
+      if (!insideID) m_ntruth10[10] += 1;
+      if (insideID) for (int n = 1; n < 6; n++) m_ntruth10[n] += 1;
+      if (insideID) for (int n = 7; n < 11; n++) m_ntruth10[n] += 1;
     }
-    ATH_MSG_VERBOSE(" link " << link.isValid() );
-    if( link.isValid() ){
+
+    if ( truthMu->isAvailable< MuonLink >("recoMuonLink") ) {
+      link = truthMu->auxdata< MuonLink >("recoMuonLink");
+      ATH_MSG_VERBOSE(" link " << link.isValid() );
+      if ( link.isValid() ) {
         bool loose = false;
         bool medium = false;
         bool tight = false;
-        if(((*link)->quality() == xAOD::Muon_v1::Loose)) loose = true;
-        if(((*link)->quality() == xAOD::Muon_v1::Medium)) loose = true;
-        if(((*link)->quality() == xAOD::Muon_v1::Tight)) loose = true;
-        if(((*link)->quality() == xAOD::Muon_v1::Medium)) medium = true;
-        if(((*link)->quality() == xAOD::Muon_v1::Tight)) medium = true;
-        if(((*link)->quality() == xAOD::Muon_v1::Tight)) tight = true;
-        if(insideID){
+        if (((*link)->quality() == xAOD::Muon_v1::Loose)) loose = true;
+        if (((*link)->quality() == xAOD::Muon_v1::Medium)) loose = true;
+        if (((*link)->quality() == xAOD::Muon_v1::Tight)) loose = true;
+        if (((*link)->quality() == xAOD::Muon_v1::Medium)) medium = true;
+        if (((*link)->quality() == xAOD::Muon_v1::Tight)) medium = true;
+        if (((*link)->quality() == xAOD::Muon_v1::Tight)) tight = true;
+        if (insideID) {
           const xAOD::TrackParticle* tp  = (*link)->primaryTrackParticle();
-          if(tp) {
+          if (tp) {
           } else ATH_MSG_VERBOSE("No Track particle found on recoMuonLink");
-// ID efficiency can only be measured on muons in the container 
+// ID efficiency can only be measured on muons in the container
 
-          m_ntruth[6]+=1;
-          if(truthMu->pt() > 5000.) m_ntruth5[6]+=1;
-          if(truthMu->pt() > 10000.) m_ntruth10[6]+=1;
+          m_ntruth[6] += 1;
+          if (truthMu->pt() > 5000.) m_ntruth5[6] += 1;
+          if (truthMu->pt() > 10000.) m_ntruth10[6] += 1;
 
-          bool passesIDcuts = passID(tp,true);
+          bool passesIDcuts = passID(tp, true);
           ATH_MSG_VERBOSE(" all authors " << (*link)->allAuthors() << " passesIDcuts " << passesIDcuts );
-          if(passesIDcuts!=(*link)->passesIDCuts()) {  
+          if (passesIDcuts != (*link)->passesIDCuts()) {
             ATH_MSG_DEBUG(" PROBLEM passedIDcuts from xAOD muon: " << (*link)->passesIDCuts() << " BUT MuonPerformancAlg code gives " << passesIDcuts);
-          } 
+          }
 // Use xAOD Muon ID hit selection cuts
           passesIDcuts = (*link)->passesIDCuts();
-  	  if(passesIDcuts){
-            if(truthMu->auxdata<uint8_t>("nprecLayers")>0) {
-              m_ntruth[11]+=1;
-              if(truthMu->pt() > 5000.) m_ntruth5[11]+=1;
-              if(truthMu->pt() > 10000.) m_ntruth10[11]+=1;
+          if (passesIDcuts) {
+            if (truthMu->auxdata<uint8_t>("nprecLayers") > 0) {
+              m_ntruth[11] += 1;
+              if (truthMu->pt() > 5000.) m_ntruth5[11] += 1;
+              if (truthMu->pt() > 10000.) m_ntruth10[11] += 1;
             }
-	    if(loose) {
-              m_nfound[10]+=1;
+            if (loose) {
+              m_nfound[10] += 1;
             } else print(" Muon not found by Loose ", truthMu);
-	    if(medium) {
-              m_nfound[9]+=1;
-            } else if(!loose) print(" Muon not found by Medium ", truthMu);
-	    if(tight) {
-              m_nfound[8]+=1;
-            } else if(!medium) print(" Muon not found by Tight ", truthMu);
-	    m_nfound[6]+=1;
-            if(truthMu->pt() > 5000.) {
-              if(loose) m_nfound5[10]+=1;
-              if(medium) m_nfound5[9]+=1;
-              if(tight) m_nfound5[8]+=1;
-	      m_nfound5[6]+=1;
+            if (medium) {
+              m_nfound[9] += 1;
+            } else if (!loose) print(" Muon not found by Medium ", truthMu);
+            if (tight) {
+              m_nfound[8] += 1;
+            } else if (!medium) print(" Muon not found by Tight ", truthMu);
+            m_nfound[6] += 1;
+            if (truthMu->pt() > 5000.) {
+              if (loose) m_nfound5[10] += 1;
+              if (medium) m_nfound5[9] += 1;
+              if (tight) m_nfound5[8] += 1;
+              m_nfound5[6] += 1;
             }
-            if(truthMu->pt() > 10000.) {
-              if(loose) m_nfound10[10]+=1;
-              if(medium) m_nfound10[9]+=1;
-              if(tight) m_nfound10[8]+=1;
-	       m_nfound10[6]+=1;
+            if (truthMu->pt() > 10000.) {
+              if (loose) m_nfound10[10] += 1;
+              if (medium) m_nfound10[9] += 1;
+              if (tight) m_nfound10[8] += 1;
+              m_nfound10[6] += 1;
             }
-	    //CaloTag or Calolikelihood
-	    if(((*link)->allAuthors() & 64*4) || ((*link)->allAuthors() & 64*8) ) {
-              m_nfound[5]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[5]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[5]+=1;
+            //CaloTag or Calolikelihood
+            if (((*link)->allAuthors() & 64 * 4) || ((*link)->allAuthors() & 64 * 8) ) {
+              m_nfound[5] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[5] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[5] += 1;
             } else print(" Muon not found  by CaloTag and Calolikelihood ",  truthMu );
-	    //MuidSA
-	    if(((*link)->allAuthors() & 32)) {
-              m_nfound[7]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[7]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[7]+=1;
-            } else if(!((*link)->allAuthors() & 2))  print(" Muon not found by MuidSA ", truthMu);
-	    //MuTag or  MuTagIMO
-	    if(((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) {
-              m_nfound[4]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[4]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[4]+=1;
+            //MuidSA
+            if (((*link)->allAuthors() & 32)) {
+              m_nfound[7] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[7] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[7] += 1;
+            } else if (!((*link)->allAuthors() & 2))  print(" Muon not found by MuidSA ", truthMu);
+            //MuTag or  MuTagIMO
+            if (((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) {
+              m_nfound[4] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[4] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[4] += 1;
             } else print(" Muon not found by MuTagIMO ", truthMu);
-	    //MuGirl
-	    if(((*link)->allAuthors() & 64) ) {
-              m_nfound[3]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[3]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[3]+=1;
+            //MuGirl
+            if (((*link)->allAuthors() & 64) ) {
+              m_nfound[3] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[3] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[3] += 1;
             } else print(" Muon not found by MuGirl ", truthMu);
-	    //MuidCo
-	    if(((*link)->allAuthors() & 2) ) {
-              m_nfound[2]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[2]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[2]+=1;
+            //MuidCo
+            if (((*link)->allAuthors() & 2) ) {
+              m_nfound[2] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[2] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[2] += 1;
             } else print(" Muon not found by MuidCo ", truthMu);
-	    //MuidCo || STACO || Combined
-	    if(((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) {
-              m_nfound[1]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[1]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[1]+=1;
-              if(truthMu->auxdata<uint8_t>("nprecLayers")>0) {
-                m_nfound[11]+=1;
-                if(truthMu->pt() > 5000.) m_nfound5[11]+=1;
-                if(truthMu->pt() > 10000.) m_nfound10[11]+=1;
+            //MuidCo || STACO || Combined
+            if (((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) {
+              m_nfound[1] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[1] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[1] += 1;
+              if (truthMu->auxdata<uint8_t>("nprecLayers") > 0) {
+                m_nfound[11] += 1;
+                if (truthMu->pt() > 5000.) m_nfound5[11] += 1;
+                if (truthMu->pt() > 10000.) m_nfound10[11] += 1;
               }
             } else print(" Combined Muon not found ", truthMu);
-	  } else {
+          } else {
 // SA or CB  not passing ID cuts
-	    if(((*link)->allAuthors() & 32)|| (*link)->muonType() == xAOD::Muon::MuonType::Combined ) {
-              m_nfound[7]+=1;
-              if(truthMu->pt() > 5000.) m_nfound5[7]+=1;
-              if(truthMu->pt() > 10000.) m_nfound10[7]+=1;
+            if (((*link)->allAuthors() & 32) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) {
+              m_nfound[7] += 1;
+              if (truthMu->pt() > 5000.) m_nfound5[7] += 1;
+              if (truthMu->pt() > 10000.) m_nfound10[7] += 1;
             } else print(" SA (CB) Muon not found ", truthMu);
           }
         }
-      //MuidSA
-        else if(!insideID){
-	  if( (((*link)->allAuthors() & 32)) || ((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) ) {
-            m_nfound[0]+=1;
-            if(truthMu->pt() > 5000.) m_nfound5[0]+=1;
-            if(truthMu->pt() > 10000.) m_nfound10[0]+=1;
+        //MuidSA
+        else if (!insideID) {
+          if ( (((*link)->allAuthors() & 32)) || ((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) ) {
+            m_nfound[0] += 1;
+            if (truthMu->pt() > 5000.) m_nfound5[0] += 1;
+            if (truthMu->pt() > 10000.) m_nfound10[0] += 1;
           } else  print(" Muon not found by MuidSA endcap ", truthMu);
-	  if(loose) {
-            m_nfound[10]+=1;
-            if(truthMu->pt() > 5000.) m_nfound5[10]+=1;
-            if(truthMu->pt() > 10000.) m_nfound10[10]+=1;
+          if (loose) {
+            m_nfound[10] += 1;
+            if (truthMu->pt() > 5000.) m_nfound5[10] += 1;
+            if (truthMu->pt() > 10000.) m_nfound10[10] += 1;
           } else print(" Muon not found by Loose endcap ", truthMu);
-	  if(medium) {
-            m_nfound[9]+=1;
-            if(truthMu->pt() > 5000.) m_nfound5[9]+=1;
-            if(truthMu->pt() > 10000.) m_nfound10[9]+=1;
-          } else if(!loose) print(" Muon not found by Medium endcap ", truthMu);
-	  if(tight) {
-            m_nfound[8]+=1;
-            if(truthMu->pt() > 5000.) m_nfound5[8]+=1;
-            if(truthMu->pt() > 10000.) m_nfound10[8]+=1;
-          } else if(!medium) print(" Muon not found by Tight endcap ", truthMu);
+          if (medium) {
+            m_nfound[9] += 1;
+            if (truthMu->pt() > 5000.) m_nfound5[9] += 1;
+            if (truthMu->pt() > 10000.) m_nfound10[9] += 1;
+          } else if (!loose) print(" Muon not found by Medium endcap ", truthMu);
+          if (tight) {
+            m_nfound[8] += 1;
+            if (truthMu->pt() > 5000.) m_nfound5[8] += 1;
+            if (truthMu->pt() > 10000.) m_nfound10[8] += 1;
+          } else if (!medium) print(" Muon not found by Tight endcap ", truthMu);
         }
-    } else {
-      print(" No link Muon not found  by CaloTag and Calolikelihood ",  truthMu );
-      print(" No link Muon not found by MuidSA ", truthMu);
-      print(" No link Muon not found by MuTagIMO ", truthMu);
-      print(" No link Muon not found by MuGirl ", truthMu); 
-      print(" No link Muon not found by MuidCo ", truthMu);
-      print(" No link Combined Muon not found ", truthMu);
-    }
-
-
-    for (const auto truthMu: *TruthMuons){
-      MuonLink link;
-      if( truthMu->pt() < 2000. || fabs(truthMu->eta()) > 3. ) continue;
-      const int& theType   = truthMu->auxdata<int>("truthType");
-      const int& theOrigin = truthMu->auxdata<int>("truthOrigin");
-      if( theType != 6 && theType != 7 ) continue;
-      if( theOrigin == 0 || theOrigin > 17 ) continue;
-      bool insideID = false;
-      if( truthMu->isAvailable< MuonLink >("recoMuonLink") ) link = truthMu->auxdata< MuonLink >("recoMuonLink");
-      else {
+      } else {
+        print(" No link Muon not found  by CaloTag and Calolikelihood ",  truthMu );
+        print(" No link Muon not found by MuidSA ", truthMu);
+        print(" No link Muon not found by MuTagIMO ", truthMu);
+        print(" No link Muon not found by MuGirl ", truthMu);
+        print(" No link Muon not found by MuidCo ", truthMu);
+        print(" No link Combined Muon not found ", truthMu);
       }
-      if( link.isValid() ){
-	const xAOD::TrackParticle* tp  = (*link)->primaryTrackParticle();
-        if(tp) {
-	  if( (*link)->pt() < 2000. || fabs((*link)->eta()) > 2.5 ) continue;
-	  if( fabs((*link)->eta()) < 2.0 ) insideID = true;
+    } // end valid link
+  }
+
+  for (const auto truthMu : *TruthMuons) {
+    MuonLink link;
+    if ( truthMu->pt() < 2000. || fabs(truthMu->eta()) > 3. ) continue;
+    const int& theType   = truthMu->auxdata<int>("truthType");
+    const int& theOrigin = truthMu->auxdata<int>("truthOrigin");
+    if ( theType != 6 && theType != 7 ) continue;
+    if ( theOrigin == 0 || theOrigin > 17 ) continue;
+    if (fabs(truthMu->eta()) > 2.5 && (int) truthMu->auxdata<uint8_t>("nprecLayers") < 2 ) continue;
+    bool insideID = false;
+    if ( truthMu->isAvailable< MuonLink >("recoMuonLink") ) {
+      link = truthMu->auxdata< MuonLink >("recoMuonLink");
+      if ( link.isValid() ) {
+        const xAOD::TrackParticle* tp  = (*link)->primaryTrackParticle();
+        if (tp) {
+          if ( (*link)->pt() < 2000. || fabs((*link)->eta()) > 2.8 ) continue;
+          if ( fabs((*link)->eta()) < 2.0 ) insideID = true;
           bool loose = false;
           bool medium = false;
           bool tight = false;
-          if(((*link)->quality() == xAOD::Muon_v1::Loose)) loose = true;
-          if(((*link)->quality() == xAOD::Muon_v1::Medium)) loose = true;
-          if(((*link)->quality() == xAOD::Muon_v1::Tight)) loose = true;
-          if(((*link)->quality() == xAOD::Muon_v1::Medium)) medium = true;
-          if(((*link)->quality() == xAOD::Muon_v1::Tight)) medium = true;
-          if(((*link)->quality() == xAOD::Muon_v1::Tight)) tight = true;
-	  if(insideID){
- 	    bool passesIDcuts = passID(tp,false);
+          if (((*link)->quality() == xAOD::Muon_v1::Loose)) loose = true;
+          if (((*link)->quality() == xAOD::Muon_v1::Medium)) loose = true;
+          if (((*link)->quality() == xAOD::Muon_v1::Tight)) loose = true;
+          if (((*link)->quality() == xAOD::Muon_v1::Medium)) medium = true;
+          if (((*link)->quality() == xAOD::Muon_v1::Tight)) medium = true;
+          if (((*link)->quality() == xAOD::Muon_v1::Tight)) tight = true;
+          if (insideID) {
+            bool passesIDcuts = passID(tp, false);
 // Use xAOD Muon ID hit selection cuts
             passesIDcuts = (*link)->passesIDCuts();
-	    if(passesIDcuts){
-	      if(loose) m_nfoundr[10]+=1;
-	      if(medium) m_nfoundr[9]+=1;
-	      if(tight) m_nfoundr[8]+=1;
-	      m_nfoundr[6]+=1;
-	      if(((*link)->allAuthors() & 64*4) || ((*link)->allAuthors() & 64*8) ) m_nfoundr[5]+=1;
-	      if(((*link)->allAuthors() & 32)) m_nfoundr[7]+=1;
-	      if(((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) m_nfoundr[4]+=1;
-	      if(((*link)->allAuthors() & 64) ) m_nfoundr[3]+=1;
-	      if(((*link)->allAuthors() & 2) ) m_nfoundr[2]+=1;
-	      if(((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) m_nfoundr[1]+=1;
-              if((*link)->pt() > 5000.) {
-	        if(loose) m_nfoundr5[10]+=1;
-	        if(medium) m_nfoundr5[9]+=1;
-	        if(tight) m_nfoundr5[8]+=1;
-	        m_nfoundr5[6]+=1;
-	        if(((*link)->allAuthors() & 64*4) || ((*link)->allAuthors() & 64*8) ) m_nfoundr5[5]+=1;
-	        if(((*link)->allAuthors() & 32)) m_nfoundr5[7]+=1;
-	        if(((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) m_nfoundr5[4]+=1;
-	        if(((*link)->allAuthors() & 64) ) m_nfoundr5[3]+=1;
-	        if(((*link)->allAuthors() & 2) ) m_nfoundr5[2]+=1;
-	        if(((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) m_nfoundr5[1]+=1;
+            if (passesIDcuts) {
+              if (loose) m_nfoundr[10] += 1;
+              if (medium) m_nfoundr[9] += 1;
+              if (tight) m_nfoundr[8] += 1;
+              m_nfoundr[6] += 1;
+              if (((*link)->allAuthors() & 64 * 4) || ((*link)->allAuthors() & 64 * 8) ) m_nfoundr[5] += 1;
+              if (((*link)->allAuthors() & 32)) m_nfoundr[7] += 1;
+              if (((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) m_nfoundr[4] += 1;
+              if (((*link)->allAuthors() & 64) ) m_nfoundr[3] += 1;
+              if (((*link)->allAuthors() & 2) ) m_nfoundr[2] += 1;
+              if (((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) m_nfoundr[1] += 1;
+              if ((*link)->pt() > 5000.) {
+                if (loose) m_nfoundr5[10] += 1;
+                if (medium) m_nfoundr5[9] += 1;
+                if (tight) m_nfoundr5[8] += 1;
+                m_nfoundr5[6] += 1;
+                if (((*link)->allAuthors() & 64 * 4) || ((*link)->allAuthors() & 64 * 8) ) m_nfoundr5[5] += 1;
+                if (((*link)->allAuthors() & 32)) m_nfoundr5[7] += 1;
+                if (((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) m_nfoundr5[4] += 1;
+                if (((*link)->allAuthors() & 64) ) m_nfoundr5[3] += 1;
+                if (((*link)->allAuthors() & 2) ) m_nfoundr5[2] += 1;
+                if (((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) m_nfoundr5[1] += 1;
               }
-              if((*link)->pt() > 10000.) {
-	        if(loose) m_nfoundr10[10]+=1;
-	        if(medium) m_nfoundr10[9]+=1;
-	        if(tight) m_nfoundr10[8]+=1;
-	        m_nfoundr10[6]+=1;
-	        if(((*link)->allAuthors() & 64*4) || ((*link)->allAuthors() & 64*8) ) m_nfoundr10[5]+=1;
-	        if(((*link)->allAuthors() & 32)) m_nfoundr10[7]+=1;
-	        if(((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) m_nfoundr10[4]+=1;
-	        if(((*link)->allAuthors() & 64) ) m_nfoundr10[3]+=1;
-	        if(((*link)->allAuthors() & 2) ) m_nfoundr10[2]+=1;
-	        if(((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) m_nfoundr10[1]+=1;
+              if ((*link)->pt() > 10000.) {
+                if (loose) m_nfoundr10[10] += 1;
+                if (medium) m_nfoundr10[9] += 1;
+                if (tight) m_nfoundr10[8] += 1;
+                m_nfoundr10[6] += 1;
+                if (((*link)->allAuthors() & 64 * 4) || ((*link)->allAuthors() & 64 * 8) ) m_nfoundr10[5] += 1;
+                if (((*link)->allAuthors() & 32)) m_nfoundr10[7] += 1;
+                if (((*link)->allAuthors() & 8) || ((*link)->allAuthors() & 16) ) m_nfoundr10[4] += 1;
+                if (((*link)->allAuthors() & 64) ) m_nfoundr10[3] += 1;
+                if (((*link)->allAuthors() & 2) ) m_nfoundr10[2] += 1;
+                if (((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) m_nfoundr10[1] += 1;
               }
-	    } else  { 
-	      if(((*link)->allAuthors() & 32)|| (*link)->muonType() == xAOD::Muon::MuonType::Combined ) {
-                m_nfoundr[7]+=1;
-                if((*link)->pt() > 5000.) m_nfoundr5[7]+=1;
-                if((*link)->pt() > 10000.) m_nfoundr10[7]+=1;
+            } else  {
+              if (((*link)->allAuthors() & 32) || (*link)->muonType() == xAOD::Muon::MuonType::Combined ) {
+                m_nfoundr[7] += 1;
+                if ((*link)->pt() > 5000.) m_nfoundr5[7] += 1;
+                if ((*link)->pt() > 10000.) m_nfoundr10[7] += 1;
               }
             }
-	  }
-	  else if(!insideID){
-	    if( (((*link)->allAuthors() & 32)) || ((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) ) {
-              m_nfoundr[0]+=1;
-              if((*link)->pt() > 5000.) m_nfoundr5[0]+=1; 
-              if((*link)->pt() > 10000.) m_nfoundr10[0]+=1; 
+          }
+          else if (!insideID) {
+            if ( (((*link)->allAuthors() & 32)) || ((*link)->allAuthors() & 2) || ((*link)->allAuthors() & 4) ) {
+              m_nfoundr[0] += 1;
+              if ((*link)->pt() > 5000.) m_nfoundr5[0] += 1;
+              if ((*link)->pt() > 10000.) m_nfoundr10[0] += 1;
             }
-	    if(loose) m_nfoundr[10]+=1;
-	    if(medium) m_nfoundr[9]+=1;
-	    if(tight) m_nfoundr[8]+=1;
-            if((*link)->pt() > 5000.) {
-	      if(loose) m_nfoundr5[10]+=1;
-	      if(medium) m_nfoundr5[9]+=1;
-	      if(tight) m_nfoundr5[8]+=1;
+            if (loose) m_nfoundr[10] += 1;
+            if (medium) m_nfoundr[9] += 1;
+            if (tight) m_nfoundr[8] += 1;
+            if ((*link)->pt() > 5000.) {
+              if (loose) m_nfoundr5[10] += 1;
+              if (medium) m_nfoundr5[9] += 1;
+              if (tight) m_nfoundr5[8] += 1;
             }
-            if((*link)->pt() > 10000.) {
-	      if(loose) m_nfoundr10[10]+=1;
-	      if(medium) m_nfoundr10[9]+=1;
-	      if(tight) m_nfoundr10[8]+=1;
+            if ((*link)->pt() > 10000.) {
+              if (loose) m_nfoundr10[10] += 1;
+              if (medium) m_nfoundr10[9] += 1;
+              if (tight) m_nfoundr10[8] += 1;
             }
-	  }
-          
+          }
         } else ATH_MSG_VERBOSE("No Track particle found on recoMuonLink");
-      }
-    }
+      } // not valid muonLink
+    } // no muonLink
+  }
 
 
-    SG::ReadHandle<xAOD::MuonContainer> Muons(m_muonsNameKey);
+  SG::ReadHandle<xAOD::MuonContainer> Muons(m_muonsNameKey);
 
-    if (!Muons.isValid()) {
-      ATH_MSG_ERROR ("Couldn't retrieve Muons container with key: " << m_muonsNameKey.key());
-      return StatusCode::FAILURE;
-    } 
-    ATH_MSG_VERBOSE("Retrieved muons " << Muons->size());
+  if (!Muons.isValid()) {
+    ATH_MSG_ERROR ("Couldn't retrieve Muons container with key: " << m_muonsNameKey.key());
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_VERBOSE("Retrieved muons " << Muons->size());
 
-    for(const auto mu : *Muons){
-      if( mu->pt() < 2000. || fabs(mu->eta()) > 2.5 ) continue;
-      const xAOD::TrackParticle* tp  = mu->primaryTrackParticle();
+  for (const auto mu : *Muons) {
+    if ( mu->pt() < 2000. || fabs(mu->eta()) > 2.8 ) continue;
+    const xAOD::TrackParticle* tp  = mu->primaryTrackParticle();
 
-      if(tp) {
-        ElementLink< xAOD::TruthParticleContainer > truthLink;
-        bool passesIDcuts = passID(tp,false);
+    if (tp) {
+      ElementLink< xAOD::TruthParticleContainer > truthLink;
+      bool passesIDcuts = passID(tp, false);
 // Use xAOD Muon ID hit selection cuts
-        passesIDcuts = mu->passesIDCuts();
- 
-        bool insideID = false;
-        if( fabs(mu->eta()) < 2.0 ) insideID = true;
-        if( tp->isAvailable< ElementLink< xAOD::TruthParticleContainer > > ("truthParticleLink") ) truthLink = tp->auxdata< ElementLink< xAOD::TruthParticleContainer >  >("truthParticleLink");
-        bool fake = true;
-        if(truthLink.isValid()) {
+      passesIDcuts = mu->passesIDCuts();
+
+      bool insideID = false;
+      if ( fabs(mu->eta()) < 2.0 ) insideID = true;
+      if ( tp->isAvailable< ElementLink< xAOD::TruthParticleContainer > > ("truthParticleLink") ) truthLink = tp->auxdata< ElementLink< xAOD::TruthParticleContainer >  >("truthParticleLink");
+      bool fake = true;
+      if (truthLink.isValid()) {
 //          if( (*truthLink)->auxdata<int>("truthType") == 6 || (*truthLink)->auxdata<int>("truthType") == 7 ) {
 //            if( (*truthLink)->auxdata<int>("truthOrigin") > 0 && (*truthLink)->auxdata<int>("truthOrigin") <= 17 ) {
-          if( selectPdg( (*truthLink)->pdgId()) ) fake = false; 
+        if ( selectPdg( (*truthLink)->pdgId()) ) fake = false;
 //            }
 //          }
-        }
-        bool loose = false;
-        bool medium = false;
-        bool tight = false;
-        if(mu->quality() == xAOD::Muon_v1::Loose) loose = true;
-        if(mu->quality() == xAOD::Muon_v1::Medium) loose = true;
-        if(mu->quality() == xAOD::Muon_v1::Tight) loose = true;
-        if(mu->quality() == xAOD::Muon_v1::Medium) medium = true;
-        if(mu->quality() == xAOD::Muon_v1::Tight) medium = true;
-        if(mu->quality() == xAOD::Muon_v1::Tight) tight = true;
-        if(insideID){
-  	  if(passesIDcuts){
-	    if(loose) m_nreco[10]+=1;
-	    if(medium) m_nreco[9]+=1;
-	    if(tight) m_nreco[8]+=1;
-	    m_nreco[6]+=1;
-	    if((mu->allAuthors() & 64*4) || (mu->allAuthors() & 64*8) ) m_nreco[5]+=1;
-	    if((mu->allAuthors() & 32)) m_nreco[7]+=1;
-	    if((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) m_nreco[4]+=1;
-	    if((mu->allAuthors() & 64) ) m_nreco[3]+=1;
-	    if((mu->allAuthors() & 2) ) m_nreco[2]+=1;
-	    if((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined ) m_nreco[1]+=1;
-            if(mu->pt() > 5000.) {
-	      if(loose) m_nreco5[10]+=1;
-	      if(medium) m_nreco5[9]+=1;
-	      if(tight) m_nreco5[8]+=1;
-	      m_nreco5[6]+=1;
-	      if((mu->allAuthors() & 64*4) || (mu->allAuthors() & 64*8) ) m_nreco5[5]+=1;
-	      if((mu->allAuthors() & 32)) m_nreco5[7]+=1;
-	      if((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) m_nreco5[4]+=1;
-	      if((mu->allAuthors() & 64) ) m_nreco5[3]+=1;
-	      if((mu->allAuthors() & 2) ) m_nreco5[2]+=1;
-	      if((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined ) m_nreco5[1]+=1;
-            }
-            if(mu->pt() > 10000.) {
-	      if(loose) m_nreco10[10]+=1;
-	      if(medium) m_nreco10[9]+=1;
-	      if(tight) m_nreco10[8]+=1;
-	      m_nreco10[6]+=1;
-	      if((mu->allAuthors() & 64*4) || (mu->allAuthors() & 64*8) ) m_nreco10[5]+=1;
-	      if((mu->allAuthors() & 32)) m_nreco10[7]+=1;
-	      if((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) m_nreco10[4]+=1;
-	      if((mu->allAuthors() & 64) ) m_nreco10[3]+=1;
-	      if((mu->allAuthors() & 2) ) m_nreco10[2]+=1;
-	      if((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined ) m_nreco10[1]+=1;
-            }
-            if(fake) {
-	      if((mu->quality() == xAOD::Muon_v1::Loose)) print(" Fake muon found by Loose ", mu); 
-	      if((mu->quality() == xAOD::Muon_v1::Medium)) print(" Fake muon found by Medium ", mu); 
-	      if((mu->quality() == xAOD::Muon_v1::Tight)) print(" Fake muon found by Tight ", mu);
-	      if((mu->allAuthors() & 64*4) || (mu->allAuthors() & 64*8) ) print(" Fake muon found by CaloTag and Calolikelihood ", mu);
-	      if((mu->allAuthors() & 32)) print(" Fake muon found by MuidSA ", mu); 
-	      if((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) print(" Fake muon found by MuTagIMO ", mu); 
-	      if((mu->allAuthors() & 64) )  print(" Fake muon found by MuGirl ", mu);
-              if((mu->allAuthors() & 2) ) print(" Fake muon found by MuidCo ", mu);
-              if((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined )  print(" Fake Combined muon ", mu);
-            }     
-	  } else { 
-	    if((mu->allAuthors() & 32)|| mu->muonType() == xAOD::Muon::MuonType::Combined ) {
-              m_nreco[7]+=1;
-	      if(fake) print(" Fake muon found by MuidSA with no ID", mu); 
-              if(mu->pt() > 5000.) m_nreco5[7]+=1;
-              if(mu->pt() > 10000.) m_nreco10[7]+=1;
-            }
+      }
+      bool loose = false;
+      bool medium = false;
+      bool tight = false;
+      if (mu->quality() == xAOD::Muon_v1::Loose) loose = true;
+      if (mu->quality() == xAOD::Muon_v1::Medium) loose = true;
+      if (mu->quality() == xAOD::Muon_v1::Tight) loose = true;
+      if (mu->quality() == xAOD::Muon_v1::Medium) medium = true;
+      if (mu->quality() == xAOD::Muon_v1::Tight) medium = true;
+      if (mu->quality() == xAOD::Muon_v1::Tight) tight = true;
+      if (insideID) {
+        if (passesIDcuts) {
+          if (loose) m_nreco[10] += 1;
+          if (medium) m_nreco[9] += 1;
+          if (tight) m_nreco[8] += 1;
+          m_nreco[6] += 1;
+          if ((mu->allAuthors() & 64 * 4) || (mu->allAuthors() & 64 * 8) ) m_nreco[5] += 1;
+          if ((mu->allAuthors() & 32)) m_nreco[7] += 1;
+          if ((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) m_nreco[4] += 1;
+          if ((mu->allAuthors() & 64) ) m_nreco[3] += 1;
+          if ((mu->allAuthors() & 2) ) m_nreco[2] += 1;
+          if ((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined ) m_nreco[1] += 1;
+          if (mu->pt() > 5000.) {
+            if (loose) m_nreco5[10] += 1;
+            if (medium) m_nreco5[9] += 1;
+            if (tight) m_nreco5[8] += 1;
+            m_nreco5[6] += 1;
+            if ((mu->allAuthors() & 64 * 4) || (mu->allAuthors() & 64 * 8) ) m_nreco5[5] += 1;
+            if ((mu->allAuthors() & 32)) m_nreco5[7] += 1;
+            if ((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) m_nreco5[4] += 1;
+            if ((mu->allAuthors() & 64) ) m_nreco5[3] += 1;
+            if ((mu->allAuthors() & 2) ) m_nreco5[2] += 1;
+            if ((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined ) m_nreco5[1] += 1;
           }
-        }
-        else if(!insideID){
-	  if(loose) m_nreco[10]+=1;
-	  if(medium) m_nreco[9]+=1;
-	  if(tight) m_nreco[8]+=1;
-	  if(loose&&fake) print(" Fake muon found by Loose Endcap ", mu); 
-	  if(medium&&fake&&!loose) print(" Fake muon found by Medium Endcap ", mu); 
-	  if(tight&&!medium&&fake) print(" Fake muon found by Tight Endcap ", mu); 
-          if(mu->pt() > 5000.) {
-	    if(loose) m_nreco5[10]+=1;
-	    if(medium) m_nreco5[9]+=1;
-	    if(tight) m_nreco5[8]+=1;
-          }  
-          if(mu->pt() > 10000.) {
-	    if(loose) m_nreco10[10]+=1;
-	    if(medium) m_nreco10[9]+=1;
-	    if(tight) m_nreco10[8]+=1;
-          }  
-	  if( ((mu->allAuthors() & 32)) || (mu->allAuthors() & 2) || (mu->allAuthors() & 4) ) {
-            m_nreco[0]+=1;
-	    if(fake) print(" Fake muon found by MuidSA Endcap ", mu); 
-            if(mu->pt() > 5000.) m_nreco5[0]+=1;
-            if(mu->pt() > 10000.) m_nreco10[0]+=1;
+          if (mu->pt() > 10000.) {
+            if (loose) m_nreco10[10] += 1;
+            if (medium) m_nreco10[9] += 1;
+            if (tight) m_nreco10[8] += 1;
+            m_nreco10[6] += 1;
+            if ((mu->allAuthors() & 64 * 4) || (mu->allAuthors() & 64 * 8) ) m_nreco10[5] += 1;
+            if ((mu->allAuthors() & 32)) m_nreco10[7] += 1;
+            if ((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) m_nreco10[4] += 1;
+            if ((mu->allAuthors() & 64) ) m_nreco10[3] += 1;
+            if ((mu->allAuthors() & 2) ) m_nreco10[2] += 1;
+            if ((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined ) m_nreco10[1] += 1;
+          }
+          if (fake) {
+            if ((mu->quality() == xAOD::Muon_v1::Loose)) print(" Fake muon found by Loose ", mu);
+            if ((mu->quality() == xAOD::Muon_v1::Medium)) print(" Fake muon found by Medium ", mu);
+            if ((mu->quality() == xAOD::Muon_v1::Tight)) print(" Fake muon found by Tight ", mu);
+            if ((mu->allAuthors() & 64 * 4) || (mu->allAuthors() & 64 * 8) ) print(" Fake muon found by CaloTag and Calolikelihood ", mu);
+            if ((mu->allAuthors() & 32)) print(" Fake muon found by MuidSA ", mu);
+            if ((mu->allAuthors() & 8) || (mu->allAuthors() & 16) ) print(" Fake muon found by MuTagIMO ", mu);
+            if ((mu->allAuthors() & 64) )  print(" Fake muon found by MuGirl ", mu);
+            if ((mu->allAuthors() & 2) ) print(" Fake muon found by MuidCo ", mu);
+            if ((mu->allAuthors() & 2) || (mu->allAuthors() & 4) || mu->muonType() == xAOD::Muon::MuonType::Combined )  print(" Fake Combined muon ", mu);
+          }
+        } else {
+          if ((mu->allAuthors() & 32) || mu->muonType() == xAOD::Muon::MuonType::Combined ) {
+            m_nreco[7] += 1;
+            if (fake) print(" Fake muon found by MuidSA with no ID", mu);
+            if (mu->pt() > 5000.) m_nreco5[7] += 1;
+            if (mu->pt() > 10000.) m_nreco10[7] += 1;
           }
         }
       }
+      else if (!insideID) {
+        if (loose) m_nreco[10] += 1;
+        if (medium) m_nreco[9] += 1;
+        if (tight) m_nreco[8] += 1;
+        if (loose && fake) print(" Fake muon found by Loose Endcap ", mu);
+        if (medium && fake && !loose) print(" Fake muon found by Medium Endcap ", mu);
+        if (tight && !medium && fake) print(" Fake muon found by Tight Endcap ", mu);
+        if (mu->pt() > 5000.) {
+          if (loose) m_nreco5[10] += 1;
+          if (medium) m_nreco5[9] += 1;
+          if (tight) m_nreco5[8] += 1;
+        }
+        if (mu->pt() > 10000.) {
+          if (loose) m_nreco10[10] += 1;
+          if (medium) m_nreco10[9] += 1;
+          if (tight) m_nreco10[8] += 1;
+        }
+        if ( ((mu->allAuthors() & 32)) || (mu->allAuthors() & 2) || (mu->allAuthors() & 4) ) {
+          m_nreco[0] += 1;
+          if (fake) print(" Fake muon found by MuidSA Endcap ", mu);
+          if (mu->pt() > 5000.) m_nreco5[0] += 1;
+          if (mu->pt() > 10000.) m_nreco10[0] += 1;
+        }
+      }
     }
-  }       
+  }
+
 
   return StatusCode::SUCCESS;
-  
+
 }
-void MuonPerformanceAlg::print(std::string txt, const xAOD::TruthParticle* muon)  
+void MuonPerformanceAlg::print(std::string txt, const xAOD::TruthParticle* muon)
 {
 
 // Truth: r  4251 z   3147 theta 0.91843 phi -0.781 q*p(GeV)  1.081e+02 pt(Gev) 8.589e+01
 // barcode 1489 mother 23 production vertex: r  1.06363 z -102.414
-    int q  = 1;
-    if(muon->pdgId()>0) q = -1;
-    double p = sqrt(muon->e()*muon->e()-muon->m()*muon->m());
-    ATH_MSG_DEBUG(txt << " run " << m_runNumber << " event " << m_eventNumber << std::endl  << " Truth:  pdgId " << muon->pdgId()  <<  " barcode " << muon->barcode() << " eta " << muon->eta() << " phi " << muon->phi() << " q*p (GeV) " << q*p/1000. << " pt (GeV) " << muon->pt()/1000. << " precisionLayers " << static_cast<int>(muon->auxdata<uint8_t>("nprecLayers")) );
+  int q  = 1;
+  if (muon->pdgId() > 0) q = -1;
+  double p = sqrt(muon->e() * muon->e() - muon->m() * muon->m());
+  ATH_MSG_DEBUG(txt << " run " << m_runNumber << " event " << m_eventNumber << std::endl  << " Truth:  pdgId " << muon->pdgId()  <<  " barcode " << muon->barcode() << " eta " << muon->eta() << " phi " << muon->phi() << " q*p (GeV) " << q * p / 1000. << " pt (GeV) " << muon->pt() / 1000. << " precisionLayers " << static_cast<int>(muon->auxdata<uint8_t>("nprecLayers")) );
 
 }
-void MuonPerformanceAlg::print(std::string txt, const xAOD::Muon* muon)  
+void MuonPerformanceAlg::print(std::string txt, const xAOD::Muon* muon)
 {
-    int nprec = 0;
-    uint8_t nPrecision=0;
-    if(muon->primaryTrackParticleLink().isValid()) {
-      muon->primaryTrackParticle()->summaryValue(nPrecision,xAOD::numberOfPrecisionLayers);
-      nprec = static_cast <int> (nPrecision);
-    }
-    double p = sqrt(muon->e()*muon->e()-muon->m()*muon->m());
-    ATH_MSG_DEBUG(txt << " run " << m_runNumber << " event " << m_eventNumber << std::endl  << " eta " << muon->eta() << " phi " << muon->phi() << " q*p (GeV) " << muon->charge()*p/1000. << " pt (GeV) " << muon->pt()/1000. << " precisionLayers " << nprec << " nr segments " << muon->nMuonSegments() );
+  int nprec = 0;
+  uint8_t nPrecision = 0;
+  if (muon->primaryTrackParticleLink().isValid()) {
+    muon->primaryTrackParticle()->summaryValue(nPrecision, xAOD::numberOfPrecisionLayers);
+    nprec = static_cast <int> (nPrecision);
+  }
+  double p = sqrt(muon->e() * muon->e() - muon->m() * muon->m());
+  ATH_MSG_DEBUG(txt << " run " << m_runNumber << " event " << m_eventNumber << std::endl  << " eta " << muon->eta() << " phi " << muon->phi() << " q*p (GeV) " << muon->charge()*p / 1000. << " pt (GeV) " << muon->pt() / 1000. << " precisionLayers " << nprec << " nr segments " << muon->nMuonSegments() );
 }
 
 /////////////////////////////////////////////////////////////////
 // ATHENA FINALIZE:
 
 
-StatusCode MuonPerformanceAlg::finalize() 
+StatusCode MuonPerformanceAlg::finalize()
 {
 
   unsigned int width = 9;
@@ -615,63 +612,63 @@ StatusCode MuonPerformanceAlg::finalize()
 
   msg(MSG::INFO) << std::endl;
   msg(MSG::INFO) <<  " Summary of the xAOD Muon performance "  << std::endl;
-  msg(MSG::INFO) << "  Muon type  #Truth muons   Efficiency #Truth muons   Efficiency #Truth muons   Efficiency"<< std::endl;
-  msg(MSG::INFO) << "                        (pt>2)                   (pt>5)                 (pt>10 GeV/c)    "<< std::endl;
-  for( unsigned int i=0;i<12;++i ){
-    if(  m_ntruth[i] == 0  ) { 
+  msg(MSG::INFO) << "  Muon type  #Truth muons   Efficiency #Truth muons   Efficiency #Truth muons   Efficiency" << std::endl;
+  msg(MSG::INFO) << "                        (pt>2)                   (pt>5)                 (pt>10 GeV/c)    " << std::endl;
+  for ( unsigned int i = 0; i < 12; ++i ) {
+    if (  m_ntruth[i] == 0  ) {
       msg(MSG::INFO) << " " << std::endl;
     } else {
       msg(MSG::INFO) << "    " << m_hitCutString[i];
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_ntruth[i]);  
+      msg(MSG::INFO) << static_cast<double>(m_ntruth[i]);
       msg(MSG::INFO) << "       ";
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_nfound[i])/static_cast<double>(m_ntruth[i]);
+      msg(MSG::INFO) << static_cast<double>(m_nfound[i]) / static_cast<double>(m_ntruth[i]);
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_ntruth5[i]);  
+      msg(MSG::INFO) << static_cast<double>(m_ntruth5[i]);
       msg(MSG::INFO) << "       ";
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      if(m_ntruth5[i]!=0) {
-        msg(MSG::INFO) << static_cast<double>(m_nfound5[i])/static_cast<double>(m_ntruth5[i]);
-      } else msg(MSG::INFO) << 0.; 
+      if (m_ntruth5[i] != 0) {
+        msg(MSG::INFO) << static_cast<double>(m_nfound5[i]) / static_cast<double>(m_ntruth5[i]);
+      } else msg(MSG::INFO) << 0.;
 
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_ntruth10[i]);  
-       msg(MSG::INFO) << "       ";
+      msg(MSG::INFO) << static_cast<double>(m_ntruth10[i]);
+      msg(MSG::INFO) << "       ";
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      if(m_ntruth10[i]!=0) {
-        msg(MSG::INFO) << static_cast<double>(m_nfound10[i])/static_cast<double>(m_ntruth10[i]) << std::endl;
-      } else msg(MSG::INFO) << 0. << std::endl; 
+      if (m_ntruth10[i] != 0) {
+        msg(MSG::INFO) << static_cast<double>(m_nfound10[i]) / static_cast<double>(m_ntruth10[i]) << std::endl;
+      } else msg(MSG::INFO) << 0. << std::endl;
     }
   }
-  msg(MSG::INFO) << " The efficiency of the ID is calculated inside |eta| < 2 for the MCP ID hit selection cuts (it uses identified - Combined, Tagged or CaloTagged - muons with an ID track)"<< std::endl;
-  msg(MSG::INFO) << " The efficiencies for CB all, MuidCB, MuGirl, Tag and Calo include the MCP ID cuts"<< std::endl;
-  msg(MSG::INFO) << " The Tight, Medium and Loose efficiencies include MCP ID cuts for muons |eta| < 2"<< std::endl;
-  msg(MSG::INFO) << " The SA 2.0 for |eta| >2 and SA (no ID) for |eta| < 2  doesnot include MCP ID cuts"<< std::endl;
-  msg(MSG::INFO) << " The Combined efficiency is defined ID tracks after MCP cuts and requiring at least 1 muon station at truth level"<< std::endl;
-  msg(MSG::INFO) << " Fakes are calculated with the selections listed above"<< std::endl;
+  msg(MSG::INFO) << " The efficiency of the ID is calculated inside |eta| < 2 for the MCP ID hit selection cuts (it uses identified - Combined, Tagged or CaloTagged - muons with an ID track)" << std::endl;
+  msg(MSG::INFO) << " The efficiencies for CB all, MuidCB, MuGirl, Tag and Calo include the MCP ID cuts" << std::endl;
+  msg(MSG::INFO) << " The Tight, Medium and Loose efficiencies include MCP ID cuts for muons |eta| < 2" << std::endl;
+  msg(MSG::INFO) << " The SA 2.0 for |eta| >2 and SA (no ID) for |eta| < 2  doesnot include MCP ID cuts" << std::endl;
+  msg(MSG::INFO) << " The Combined efficiency is defined ID tracks after MCP cuts and requiring at least 1 muon station at truth level" << std::endl;
+  msg(MSG::INFO) << " Fakes are calculated with the selections listed above" << std::endl;
   msg(MSG::INFO) << std::endl;
 
-  msg(MSG::INFO) << "  Muon type #Fake muons rate #Fake muons rate  #Fake muons rate   "<< std::endl;
-  msg(MSG::INFO) << "             (all pt>0,2)           (pt>5)        (pt>10 GeV/c)    "<< std::endl;
-  for( unsigned int i=0;i<11;++i ){
-    if(i==6) continue;
-    if(  m_nevents == 0 ) { 
+  msg(MSG::INFO) << "  Muon type #Fake muons rate #Fake muons rate  #Fake muons rate   " << std::endl;
+  msg(MSG::INFO) << "             (all pt>0,2)           (pt>5)        (pt>10 GeV/c)    " << std::endl;
+  for ( unsigned int i = 0; i < 11; ++i ) {
+    if (i == 6) continue;
+    if (  m_nevents == 0 ) {
       msg(MSG::INFO) << " " << std::endl;
     } else {
       msg(MSG::INFO) << "  " << m_hitCutString[i];
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_nreco[i]-m_nfoundr[i]); 
+      msg(MSG::INFO) << static_cast<double>(m_nreco[i] - m_nfoundr[i]);
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_nreco[i]-m_nfoundr[i])/static_cast<double>(m_nevents);
+      msg(MSG::INFO) << static_cast<double>(m_nreco[i] - m_nfoundr[i]) / static_cast<double>(m_nevents);
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_nreco5[i]-m_nfoundr5[i]);
+      msg(MSG::INFO) << static_cast<double>(m_nreco5[i] - m_nfoundr5[i]);
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_nreco5[i]-m_nfoundr5[i])/static_cast<double>(m_nevents);
+      msg(MSG::INFO) << static_cast<double>(m_nreco5[i] - m_nfoundr5[i]) / static_cast<double>(m_nevents);
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) << static_cast<double>(m_nreco10[i]-m_nfoundr10[i]);
+      msg(MSG::INFO) << static_cast<double>(m_nreco10[i] - m_nfoundr10[i]);
       msg(MSG::INFO) << std::setw(width) << std::setprecision(precision);
-      msg(MSG::INFO) <<  static_cast<double>(m_nreco10[i]-m_nfoundr10[i])/static_cast<double>(m_nevents) << std::endl;
+      msg(MSG::INFO) <<  static_cast<double>(m_nreco10[i] - m_nfoundr10[i]) / static_cast<double>(m_nevents) << std::endl;
     }
   }
 
@@ -681,4 +678,4 @@ StatusCode MuonPerformanceAlg::finalize()
   return StatusCode::SUCCESS;
 }
 
- 
+
diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx
index 104c98cd8a92b7e7190e44cbfc6f5d874f27a0e8..3b1a4caa510ea1756d910e1e278857829d4a7632 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonTrackPerformanceAlg.cxx
@@ -303,7 +303,7 @@ bool MuonTrackPerformanceAlg::goodTruthTrack( const Muon::IMuonTrackTruthTool::T
     if( trackRecord->GetMomentum().mag() < m_momentumCutSim ) return false; 
   }
   if( !selectPdg(trackRecord->GetPDGCode()) ) return false;
-  if( m_isCombined && fabs(trackRecord->GetMomentum().eta()) > 2.5 ) return false;
+  if( m_isCombined && fabs(trackRecord->GetMomentum().eta()) > 2.8 ) return false;
   int hits = entry.mdtHits.size();
   if(m_idHelperSvc->hasCSC()) hits += entry.cscHits.size();
   if(m_idHelperSvc->hasMM()) hits += entry.mmHits.size();
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/python/AnalysisFlags.py b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/python/AnalysisFlags.py
index 7fbd652bf25777d5bf522b6d0268a00dc2e58d71..7a3ee2aa954362a5a2dccdf3f40ab3a3410fd453 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/python/AnalysisFlags.py
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/python/AnalysisFlags.py
@@ -24,9 +24,9 @@ class _AnalysisFlags:
         format = "%17s : %s"
         for attr in self._partAna:
             if getattr(self, attr):
-                print format % (attr, "ON")
+                print(format % (attr, "ON"))
             else:
-                print format % (attr, "--")
+                print(format % (attr, "--"))
 
 AnalysisFlags = _AnalysisFlags()
 
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt b/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt
index ed73af398ed4d5fdd2bf2db594ae9931075ce99d..92322572dfe7ec82ad764089016fac11d7577547 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/CMakeLists.txt
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # The name of the package:
 atlas_subdir( EventLoopTest )
@@ -5,25 +6,7 @@ atlas_subdir( EventLoopTest )
 # External(s) needed for the build:
 find_package( GTest )
 find_package( GMock )
-
-# The package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTesting
-   PhysicsAnalysis/D3PDTools/AnaAlgorithm
-   PhysicsAnalysis/D3PDTools/RootCoreUtils
-   PhysicsAnalysis/D3PDTools/SampleHandler
-   PhysicsAnalysis/D3PDTools/EventLoop
-   PhysicsAnalysis/D3PDTools/EventLoopGrid
-   PRIVATE
-   Control/AthToolSupport/AsgTools
-   Control/xAODRootAccess
-   Event/xAOD/xAODEventInfo
-   Event/xAOD/xAODMetaData )
-
-# Find the needed external(s):
 find_package( ROOT COMPONENTS Core RIO Hist Tree TreePlayer )
-find_package( GTest )
 
 # Component(s) in the package:
 atlas_add_root_dictionary( EventLoopTestLib
@@ -36,13 +19,12 @@ atlas_add_root_dictionary( EventLoopTestLib
 atlas_add_library( EventLoopTestLib
    EventLoopTest/*.h EventLoopTest/*.ihh Root/*.cxx ${EventLoopTestDictSource}
    PUBLIC_HEADERS EventLoopTest
+   DEFINITIONS USE_CMAKE
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS}
    LINK_LIBRARIES ${ROOT_LIBRARIES} ${GMOCK_LIBRARIES} RootCoreUtils
    SampleHandler AnaAlgorithmLib EventLoop EventLoopGrid AsgTestingLib xAODEventInfo
    PRIVATE_LINK_LIBRARIES AsgTools xAODRootAccess xAODEventInfo xAODMetaData )
 
-target_compile_definitions (EventLoopTestLib PUBLIC USE_CMAKE)
-
 # Test(s) in the package:
 function( _add_gtest cxx_name )
    set (EXTRA_ARGS PROPERTIES )
@@ -54,7 +36,7 @@ function( _add_gtest cxx_name )
    atlas_add_test (${test_name}
       SOURCES test/${test_name}.cxx
       INCLUDE_DIRS ${GMOCK_INCLUDE_DIRS}
-      LINK_LIBRARIES ${GMOCK_LIBRARIES} RootCoreUtils AsgTools
+      LINK_LIBRARIES ${GMOCK_LIBRARIES} RootCoreUtils AsgTools AsgTesting
       SampleHandler EventLoopTestLib xAODRootAccess ${EXTRA_ARGS})
    set_tests_properties (EventLoopTest_${test_name}_ctest PROPERTIES LABELS "EventLoopTest;EventLoop;SampleHandler;AnaAlgorithm" )
 endfunction( _add_gtest )
diff --git a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
index e470103802ba0391fcc9e58b4e3a3af9efc181de..101fbee1ac949bc44cb2942984abc1048378ae59 100644
--- a/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.cxx
+++ b/PhysicsAnalysis/D3PDTools/EventLoopTest/test/gt_Algorithm.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
 */
 
 /// @author Nils Krumnack
@@ -13,9 +13,9 @@
 #include <AsgTools/AnaToolHandle.h>
 #include <AsgTools/MessageCheck.h>
 #include <AsgTools/IMessagePrinter.h>
-#include <AsgTools/MessagePrinterMock.h>
 #include <AsgTools/MessagePrinterOverlay.h>
 #include <AsgTesting/UnitTest.h>
+#include <AsgTesting/MessagePrinterMock.h>
 #include <cmath>
 #include <gtest/gtest.h>
 #include <gtest/gtest-spi.h>
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
index d3f7b00c253a087f667b52debb163469f9c7b099..e1905f4780c919edd7ea403f0dc4181236c37b14 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/python/EGammaCommon.py
@@ -37,9 +37,9 @@ if isMC:
     simulationFlavour = af.fileinfos['metadata']['/Simulation/Parameters']['SimulationFlavour']
     isFullSim = simulationFlavour in ('default', 'MC12G4', 'FullG4')
 
-print "EGammaCommon: isMC = ", isMC
+print("EGammaCommon: isMC = ", isMC)
 if isMC: 
-    print "EGammaCommon: isFullSim = ", isFullSim
+    print("EGammaCommon: isFullSim = ", isFullSim)
 
 if isFullSim:
 #from AthenaCommon.GlobalFlags import globalflags
@@ -48,7 +48,7 @@ if isFullSim:
     from ElectronPhotonShowerShapeFudgeTool.ElectronPhotonShowerShapeFudgeToolConf import ElectronPhotonShowerShapeFudgeTool
     DF_ElectronPhotonShowerShapeFudgeTool = ElectronPhotonShowerShapeFudgeTool(Preselection=16)
     ToolSvc += DF_ElectronPhotonShowerShapeFudgeTool
-    print DF_ElectronPhotonShowerShapeFudgeTool
+    print(DF_ElectronPhotonShowerShapeFudgeTool)
 
 
 #====================================================================
@@ -163,7 +163,7 @@ ElectronPassLHVeryLoose = DerivationFramework__AsgSelectionToolWrapper( name = "
                                                                         StoreGateEntryName = "DFCommonElectronsLHVeryLoose",
                                                                         ContainerName = "Electrons")
 ToolSvc += ElectronPassLHVeryLoose
-print ElectronPassLHVeryLoose
+print(ElectronPassLHVeryLoose)
 
 # decorate electrons with the output of LH loose
 ElectronPassLHLoose = DerivationFramework__AsgSelectionToolWrapper( name = "ElectronPassLHLoose",
@@ -172,7 +172,7 @@ ElectronPassLHLoose = DerivationFramework__AsgSelectionToolWrapper( name = "Elec
                                                                     StoreGateEntryName = "DFCommonElectronsLHLoose",
                                                                     ContainerName = "Electrons")
 ToolSvc += ElectronPassLHLoose
-print ElectronPassLHLoose
+print(ElectronPassLHLoose)
 
 # decorate electrons with the output of LH medium
 ElectronPassLHMedium = DerivationFramework__AsgSelectionToolWrapper( name = "ElectronPassLHMedium",
@@ -181,7 +181,7 @@ ElectronPassLHMedium = DerivationFramework__AsgSelectionToolWrapper( name = "Ele
                                                                      StoreGateEntryName = "DFCommonElectronsLHMedium",
                                                                      ContainerName = "Electrons")
 ToolSvc += ElectronPassLHMedium
-print ElectronPassLHMedium
+print(ElectronPassLHMedium)
 
 # decorate electrons with the output of LH tight
 ElectronPassLHTight = DerivationFramework__AsgSelectionToolWrapper( name = "ElectronPassLHTight",
@@ -190,7 +190,7 @@ ElectronPassLHTight = DerivationFramework__AsgSelectionToolWrapper( name = "Elec
                                                                     StoreGateEntryName = "DFCommonElectronsLHTight",
                                                                     ContainerName = "Electrons")
 ToolSvc += ElectronPassLHTight
-print ElectronPassLHTight
+print(ElectronPassLHTight)
 
 
 from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__EGSelectionToolWrapper
@@ -204,7 +204,7 @@ ElectronPassIsEMLoose = DerivationFramework__EGSelectionToolWrapper( name = "Ele
                                                                      ContainerName = "Electrons")
 
 ToolSvc += ElectronPassIsEMLoose
-print ElectronPassIsEMLoose
+print(ElectronPassIsEMLoose)
 
 # decorate electrons with the output of IsEM medium
 ElectronPassIsEMMedium = DerivationFramework__EGSelectionToolWrapper( name = "ElectronPassIsEMMedium",
@@ -216,7 +216,7 @@ ElectronPassIsEMMedium = DerivationFramework__EGSelectionToolWrapper( name = "El
 
 
 ToolSvc += ElectronPassIsEMMedium
-print ElectronPassIsEMMedium
+print(ElectronPassIsEMMedium)
 
 # decorate electrons with the output of IsEM tight
 ElectronPassIsEMTight = DerivationFramework__EGSelectionToolWrapper( name = "ElectronPassIsEMTight",
@@ -227,7 +227,7 @@ ElectronPassIsEMTight = DerivationFramework__EGSelectionToolWrapper( name = "Ele
                                                                      ContainerName = "Electrons")
 
 ToolSvc += ElectronPassIsEMTight
-print ElectronPassIsEMTight
+print(ElectronPassIsEMTight)
 
 # decorate electrons with the output of MultiLepton
 from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__AsgSelectionToolWrapper
@@ -237,7 +237,7 @@ ElectronPassML = DerivationFramework__AsgSelectionToolWrapper( name = "ElectronP
                                                                StoreGateEntryName = "DFCommonElectronsML",
                                                                ContainerName = "Electrons")
 ToolSvc += ElectronPassML
-print ElectronPassML
+print(ElectronPassML)
 
 
 from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__EGSelectionToolWrapper
@@ -260,7 +260,7 @@ else:
                                                                        StoreGateEntryName = "DFCommonPhotonsIsEMLoose",
                                                                        ContainerName = "Photons")
 ToolSvc += PhotonPassIsEMLoose
-print PhotonPassIsEMLoose
+print(PhotonPassIsEMLoose)
  
 # decorate photons with the output of IsEM tight
 # on full-sim MC, fudge the shower shapes before computing the ID (but the original shower shapes are not overridden)
@@ -280,7 +280,7 @@ else:
                                                                        StoreGateEntryName = "DFCommonPhotonsIsEMTight",
                                                                        ContainerName = "Photons")
 ToolSvc += PhotonPassIsEMTight
-print PhotonPassIsEMTight
+print(PhotonPassIsEMTight)
 
 # list of all the decorators so far
 EGAugmentationTools = [DFCommonPhotonsDirection,
@@ -303,7 +303,7 @@ if  rec.doTruth():
 
 
     ToolSvc += BkgElectronClassificationTool
-    print BkgElectronClassificationTool
+    print(BkgElectronClassificationTool)
     EGAugmentationTools.append(BkgElectronClassificationTool)
 
     # Decorate egammaTruthParticles with truth-particle-level etcone20,30,40
@@ -317,7 +317,7 @@ if  rec.doTruth():
                                   IsolationVarNamePrefix = 'etcone',
                                   ChargedParticlesOnly   = False)
     ToolSvc += TruthEgetIsolationTool
-    print TruthEgetIsolationTool
+    print(TruthEgetIsolationTool)
     EGAugmentationTools.append(TruthEgetIsolationTool)
 
     # Decorate egammaTruthParticles with truth-particle-level ptcone20,30,40
@@ -329,7 +329,7 @@ if  rec.doTruth():
                                   IsolationVarNamePrefix = 'ptcone',
                                   ChargedParticlesOnly   = True)
     ToolSvc += TruthEgptIsolationTool
-    print TruthEgptIsolationTool
+    print(TruthEgptIsolationTool)
     EGAugmentationTools.append(TruthEgptIsolationTool)
     
     # Compute the truth-particle-level energy density in the central eta region
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/share/IDTIDE1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/share/IDTIDE1.py
index a43899d60ce7eea607865d2baa5b83fa6767adef..47c8abadacbb0a51f1df883ef76e716242a3d943 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/share/IDTIDE1.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/share/IDTIDE1.py
@@ -41,7 +41,6 @@ from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
 streamName = primDPD.WriteDAOD_IDTIDEStream.StreamName
 fileName   = buildFileName( primDPD.WriteDAOD_IDTIDEStream )
 IDTIDE1Stream = MSMgr.NewPoolRootStream( streamName, fileName )
-IDTIDE1Stream.AcceptAlgs( accept_algs )
 
 #idtideSeq = CfgMgr.AthSequencer("IDTIDE1Sequence")
 #DerivationFrameworkJob += idtideSeq
@@ -314,6 +313,8 @@ if IsMonteCarlo:
   else :
     logger.info('IDPVM decorations to track particles already applied to input file not adding again.')
 
+# Set the accept algs for the stream
+IDTIDE1Stream.AcceptAlgs( accept_algs )
 
 #====================================================================
 # CONTENT LIST  
diff --git a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/python/run_egammaMVACalib.py b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/python/run_egammaMVACalib.py
index e20a4a05bb258a0d91d5857e1fd16bf144e69d7d..ff38dd9e0d598ab8aeb25d936e7ffab1b164bb24 100755
--- a/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/python/run_egammaMVACalib.py
+++ b/PhysicsAnalysis/ElectronPhotonID/egammaMVACalibAnalysis/python/run_egammaMVACalib.py
@@ -15,7 +15,7 @@ def doInteract(**kw):
     "Start the interactive mode, adding the given variables to globals"
     os.environ["PYTHONINSPECT"] = "1"
     globals().update(kw)
-    print "\nEntering interactive mode, MVACalib object is called 'm'\n"
+    print("\nEntering interactive mode, MVACalib object is called 'm'\n")
 
 
 def make_list(x, N=1):
@@ -44,7 +44,7 @@ def create_TChain(inputfiles, treename):
 def create_file_list(list_filename, dataset_name):
     f = ROOT.TFile(list_filename)
     file_collection = f.Get(dataset_name)
-    urls = map(lambda x: x.GetFirstUrl().GetUrl(), file_collection.GetList())
+    urls = [x.GetFirstUrl().GetUrl() for x in file_collection.GetList()]
     return (file_collection.GetDefaultTreeName(), urls)
 
 
@@ -61,7 +61,7 @@ def getTChain(inputfiles, treename, readFromFile=False, dataset=False):
     else:
         if readFromFile:
             # filter is to remove empty strings
-            file_list = filter(bool, (i.strip('\n') for f in inputfiles for i in open(f)))
+            file_list = list(filter(bool, (i.strip('\n') for f in inputfiles for i in open(f))))
         else:
             file_list = inputfiles
         chain = create_TChain(file_list, treename)
@@ -99,7 +99,7 @@ def run_egammaMVACalib(outputfile, inputTree,
     if printBranches:
         m.InitTree(inputTree)
         for i in m.getListOfBranches():
-            print i.GetName()
+            print(i.GetName())
         return
     elif interact:
         doInteract(**locals())
@@ -122,13 +122,13 @@ def run_egammaMVACalibMulti(outputfile, inputTree, inputPath, useTMVA, method,
     logging.info("Running egammaMVACalibMulti")
     # Convert all the inputs to lists and make sure all the lists have the same size
     # (lists that have size 1 are multiplied by N, the maximum size)
-    iter_options = map(make_list, (inputPath, useTMVA, method, calibrationType, shift, defs))
+    iter_options = list(map(make_list, (inputPath, useTMVA, method, calibrationType, shift, defs)))
     N = max(len(i) for i in iter_options)
     if any(len(i) not in (1, N) for i in iter_options):
         raise ValueError("Invalid input: %s" % iter_options)
 
     iter_options = (make_list(i[0], N) if len(i) == 1 else i for i in iter_options)
-    loop = zip(*iter_options)
+    loop = list(zip(*iter_options))
     #  print loop
     if len(loop) != len(branchName):
         raise ValueError("Multiple options passed, branchName must have %s values, got %s" % (len(loop), len(branchName)))
diff --git a/Projects/AnalysisBase/package_filters.txt b/Projects/AnalysisBase/package_filters.txt
index 0faac768a091ad51a52d4cafe8e034b33e824f85..d5d599ad07943e3bc20cfd60b7814fdd0369a08e 100644
--- a/Projects/AnalysisBase/package_filters.txt
+++ b/Projects/AnalysisBase/package_filters.txt
@@ -25,4 +25,5 @@
 + Trigger/TrigConfiguration/TrigConfL1Data
 + Trigger/TrigConfiguration/TrigConfHLTData
 + Trigger/TrigEvent/TrigNavStructure
++ Trigger/TrigSteer/TrigCompositeUtils
 - .*
diff --git a/Reconstruction/RecAlgs/src/JobOptsDumperAlg.cxx b/Reconstruction/RecAlgs/src/JobOptsDumperAlg.cxx
index 9b65520e051eb883ede3f69c950c4a4bf53f61d9..1aa63d94971f12bc9f5c24432a3f04b1135bbeaa 100755
--- a/Reconstruction/RecAlgs/src/JobOptsDumperAlg.cxx
+++ b/Reconstruction/RecAlgs/src/JobOptsDumperAlg.cxx
@@ -19,12 +19,19 @@ StatusCode JobOptsDumperAlg::initialize() {
   IJobOptionsSvc* p_jobOptionSvc;
   ATH_CHECK(service("JobOptionsSvc", p_jobOptionSvc));
 
+  std::vector<std::string> options;
   for (const std::string& compName :  p_jobOptionSvc->getClients()) {
     for (const auto& props:  *p_jobOptionSvc->getProperties(compName)) {
-      fout << compName << "." << props->name() << " = " << props->toString() << std::endl;
-    } 
-    fout << std::endl;
+      std::ostringstream os;
+      os << compName << "." << props->name() << " = " << props->toString() << std::endl;
+      options.emplace_back(os.str());
+    }
+  }
+
+  std::sort(options.begin(), options.end()); 
+  for (const std::string& opt : options) {
+    fout << opt << std::endl;
   }
   fout.close();
   return StatusCode::SUCCESS;
-}
\ No newline at end of file
+}
diff --git a/Simulation/Overlay/OverlayConfiguration/python/OverlaySteering.py b/Simulation/Overlay/OverlayConfiguration/python/OverlaySteering.py
index 2fc9e28852cca5f612248543211e753a1292105c..389f208f3a55737b4c0c62e5723a7a59e99c108f 100644
--- a/Simulation/Overlay/OverlayConfiguration/python/OverlaySteering.py
+++ b/Simulation/Overlay/OverlayConfiguration/python/OverlaySteering.py
@@ -9,7 +9,13 @@ from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg
 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
 from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
 
+from InDetOverlay.PixelOverlayConfig import PixelOverlayCfg
 from InDetOverlay.SCTOverlayConfig import SCTOverlayCfg
+from InDetOverlay.TRTOverlayConfig import TRTOverlayCfg
+from MuonConfig.CscOverlayConfig import CscOverlayCfg
+from MuonConfig.MdtOverlayConfig import MdtOverlayCfg
+from MuonConfig.RpcOverlayConfig import RpcOverlayCfg
+from MuonConfig.TgcOverlayConfig import TgcOverlayCfg
 from OverlayCopyAlgs.OverlayCopyAlgsConfig import \
     CopyCaloCalibrationHitContainersCfg, CopyJetTruthInfoCfg, CopyMcEventCollectionCfg, \
     CopyTimingsCfg, CopyTrackRecordCollectionsCfg
@@ -50,7 +56,21 @@ def OverlayMainCfg(configFlags):
     acc.merge(CopyTrackRecordCollectionsCfg(configFlags))
 
     # Inner detector
+    if configFlags.Detector.OverlayPixel:
+        acc.merge(PixelOverlayCfg(configFlags))
     if configFlags.Detector.OverlaySCT:
         acc.merge(SCTOverlayCfg(configFlags))
+    if configFlags.Detector.OverlayTRT:
+        acc.merge(TRTOverlayCfg(configFlags))
+
+    # Muon system
+    if configFlags.Detector.OverlayCSC:
+        acc.merge(CscOverlayCfg(configFlags))
+    if configFlags.Detector.OverlayMDT:
+        acc.merge(MdtOverlayCfg(configFlags))
+    if configFlags.Detector.OverlayRPC:
+        acc.merge(RpcOverlayCfg(configFlags))
+    if configFlags.Detector.OverlayTGC:
+        acc.merge(TgcOverlayCfg(configFlags))
 
     return acc
diff --git a/Simulation/Overlay/OverlayConfiguration/python/OverlayTestHelpers.py b/Simulation/Overlay/OverlayConfiguration/python/OverlayTestHelpers.py
index b06c127dd4806c1248d5f755af00fe5797ecefb9..8f34a948d4c63c1cf1d58832c68c06ef12de982e 100644
--- a/Simulation/Overlay/OverlayConfiguration/python/OverlayTestHelpers.py
+++ b/Simulation/Overlay/OverlayConfiguration/python/OverlayTestHelpers.py
@@ -6,7 +6,16 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from argparse import ArgumentParser
 
-from AthenaConfiguration.TestDefaults import defaultTestFiles
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+
+def JobOptsDumperCfg(flags):
+    """Configure event loop for overlay"""
+    JobOptsDumperAlg = CompFactory.JobOptsDumperAlg
+    acc = ComponentAccumulator()
+    acc.addEventAlgo(JobOptsDumperAlg(FileName="OverlayTestConfig.txt"))
+    return acc
 
 
 def CommonTestArgumentParser(prog):
@@ -59,7 +68,9 @@ def setupOverlayTestDetectorFlags(configFlags, detectors):
 
 def defaultTestFlags(configFlags, args):
     """Fill default overlay flags for testing"""
+    from AthenaConfiguration.TestDefaults import defaultTestFiles
     configFlags.GeoModel.Align.Dynamic = False
+    configFlags.Digitization.DoInnerDetectorNoise = False
     if args.data:
         configFlags.Input.isMC = False  # TODO: this one should be autodetected
         configFlags.Input.Files = defaultTestFiles.HITS_DATA_OVERLAY
diff --git a/Simulation/Overlay/OverlayConfiguration/test/OverlayTest.py b/Simulation/Overlay/OverlayConfiguration/test/OverlayTest.py
index 76ee571a78ddc6486d756c34292e18881d673718..73ba5785953b2da1c00ffb5397c1270fd18a29ac 100755
--- a/Simulation/Overlay/OverlayConfiguration/test/OverlayTest.py
+++ b/Simulation/Overlay/OverlayConfiguration/test/OverlayTest.py
@@ -12,7 +12,7 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
 
 from OverlayConfiguration.OverlaySteering import OverlayMainCfg
 from OverlayConfiguration.OverlayTestHelpers import \
-    CommonTestArgumentParser, defaultTestFlags, postprocessAndLockFlags, printAndRun
+    CommonTestArgumentParser, JobOptsDumperCfg, defaultTestFlags, postprocessAndLockFlags, printAndRun
 
 # Set up logging and new style config
 Configurable.configurableRun3Behavior = True
@@ -38,6 +38,7 @@ postprocessAndLockFlags(ConfigFlags, args)
 
 # Construct our accumulator to run
 acc = OverlayMainCfg(ConfigFlags)
+acc.merge(JobOptsDumperCfg(ConfigFlags))
 
 # dump pickle
 with open("ConfigOverlay.pkl", "wb") as f:
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Muon.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Muon.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d71b116cdf3fa5cfcd6217b33a62a4a29ae13f70
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Muon.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# art-description: MC+data Overlay with MT support, config test
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: legacyDataOverlayRDO.pool.root
+# art-output: dataOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+events=2
+
+OverlayBS_tf.py \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--outputRDOFile legacyDataOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postExec 'outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--preInclude 'SimulationJobOptions/preInclude.MuonOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--ignorePatterns "L1TopoMenuLoader.+ERROR." \
+--imf False \
+--athenaopts '"--config-only=ConfigLegacy.pkl"'
+
+OverlayBS_tf.py \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--outputRDOFile legacyDataOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt"); outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--preInclude 'SimulationJobOptions/preInclude.MuonOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--ignorePatterns "L1TopoMenuLoader.+ERROR." \
+--imf False
+
+rc=$?
+echo "art-result: $rc configLegacy"
+mv log.OverlayBS log.OverlayLegacy
+
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    OverlayTest.py Muon -d -t 1 -n $events 2>&1 | tee log.OverlayTest
+    rc2=$?
+fi
+echo  "art-result: $rc2 configNew"
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root legacyDataOverlayRDO.pool.root dataOverlayRDO.pool.root \
+        --error-mode resilient --mode=semi-detailed \
+        --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings RecoTimingObj_p1_HITStoRDO_timings index_ref \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventIndex \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventTime \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventType \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask0 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask1 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask2 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask3 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.actualInteractionsPerCrossing \
+            xAOD::EventAuxInfo_v1_EventInfoAux.averageInteractionsPerCrossing
+    rc3=$?
+fi
+echo  "art-result: $rc3 comparison"
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Pixel.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Pixel.sh
new file mode 100755
index 0000000000000000000000000000000000000000..db6d3defc4bce6f0b3f917b8a79f1a35f7675c08
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Pixel.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# art-description: MC+data Overlay with MT support, config test
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: legacyDataOverlayRDO.pool.root
+# art-output: dataOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+events=2
+
+OverlayBS_tf.py \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--outputRDOFile legacyDataOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postExec 'outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--preInclude 'SimulationJobOptions/preInclude.PixelOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--ignorePatterns "L1TopoMenuLoader.+ERROR." \
+--imf False \
+--athenaopts '"--config-only=ConfigLegacy.pkl"'
+
+OverlayBS_tf.py \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--outputRDOFile legacyDataOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt"); outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--preInclude 'SimulationJobOptions/preInclude.PixelOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--ignorePatterns "L1TopoMenuLoader.+ERROR." \
+--imf False
+
+rc=$?
+echo "art-result: $rc configLegacy"
+mv log.OverlayBS log.OverlayLegacy
+
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    OverlayTest.py Pixel -d -t 1 -n $events 2>&1 | tee log.OverlayTest
+    rc2=$?
+fi
+echo  "art-result: $rc2 configNew"
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root legacyDataOverlayRDO.pool.root dataOverlayRDO.pool.root \
+        --error-mode resilient --mode=semi-detailed \
+        --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings RecoTimingObj_p1_HITStoRDO_timings index_ref \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventIndex \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventTime \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventType \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask0 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask1 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask2 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask3 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.actualInteractionsPerCrossing \
+            xAOD::EventAuxInfo_v1_EventInfoAux.averageInteractionsPerCrossing
+    rc3=$?
+fi
+echo  "art-result: $rc3 comparison"
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_SCT.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_SCT.sh
index 3145403eb42d384014935f1813a3d1abdda3124f..a60548aa40a6e00ec467e7ab272d03dba1b30d83 100755
--- a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_SCT.sh
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_SCT.sh
@@ -10,6 +10,10 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 # art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
 
 events=2
 
@@ -36,7 +40,7 @@ OverlayBS_tf.py \
 --conditionsTag CONDBR2-BLKPA-2016-12 \
 --fSampltag LARElecCalibMCfSampl-G496-19213- \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
---postExec 'outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt"); outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
 --preInclude 'SimulationJobOptions/preInclude.SCTOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
 --postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
 --ignorePatterns "L1TopoMenuLoader.+ERROR." \
@@ -49,7 +53,7 @@ mv log.OverlayBS log.OverlayLegacy
 rc2=-9999
 if [ $rc -eq 0 ]
 then
-    OverlayTest.py SCT -d -t 0 -n $events 2>&1 | tee log.OverlayTest
+    OverlayTest.py SCT -d -t 1 -n $events 2>&1 | tee log.OverlayTest
     rc2=$?
 fi
 echo  "art-result: $rc2 configNew"
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_TRT.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_TRT.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9863dc9078744edf10c33d27f33da0153eec5041
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_TRT.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# art-description: MC+data Overlay with MT support, config test
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: legacyDataOverlayRDO.pool.root
+# art-output: dataOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+events=2
+
+OverlayBS_tf.py \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--outputRDOFile legacyDataOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postExec 'outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--preInclude 'SimulationJobOptions/preInclude.TRTOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--ignorePatterns "L1TopoMenuLoader.+ERROR." \
+--imf False \
+--athenaopts '"--config-only=ConfigLegacy.pkl"'
+
+OverlayBS_tf.py \
+--inputBS_SKIMFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/mc16_13TeV.361107.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Zmumu.OverlaySim/HITS.pool.root \
+--outputRDOFile legacyDataOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag CONDBR2-BLKPA-2016-12 \
+--fSampltag LARElecCalibMCfSampl-G496-19213- \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt"); outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--preInclude 'SimulationJobOptions/preInclude.TRTOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
+--ignorePatterns "L1TopoMenuLoader.+ERROR." \
+--imf False
+
+rc=$?
+echo "art-result: $rc configLegacy"
+mv log.OverlayBS log.OverlayLegacy
+
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    OverlayTest.py TRT -d -t 1 -n $events 2>&1 | tee log.OverlayTest
+    rc2=$?
+fi
+echo  "art-result: $rc2 configNew"
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root legacyDataOverlayRDO.pool.root dataOverlayRDO.pool.root \
+        --error-mode resilient --mode=semi-detailed \
+        --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings RecoTimingObj_p1_HITStoRDO_timings index_ref \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventIndex \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventTime \
+            xAOD::EventAuxInfo_v1_EventInfoAuxDyn.subEventType \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask0 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask1 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask2 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.detectorMask3 \
+            xAOD::EventAuxInfo_v1_EventInfoAux.actualInteractionsPerCrossing \
+            xAOD::EventAuxInfo_v1_EventInfoAux.averageInteractionsPerCrossing
+    rc3=$?
+fi
+echo  "art-result: $rc3 comparison"
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Truth.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Truth.sh
index 2d8a02d008f7fad94d8f6c235f534d65ff0763bd..a7619077d3dbd807afcfb9e5d61c05823702f64b 100755
--- a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Truth.sh
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_Truth.sh
@@ -10,6 +10,10 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 # art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
 
 events=2
 
@@ -36,7 +40,7 @@ OverlayBS_tf.py \
 --conditionsTag CONDBR2-BLKPA-2016-12 \
 --fSampltag LARElecCalibMCfSampl-G496-19213- \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' \
---postExec 'outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt"); outStream.ItemList.remove("xAOD::EventInfoContainer#*"); outStream.ItemList.remove("xAOD::EventInfoAuxContainer#*");' \
 --preInclude 'SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
 --postInclude 'EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' \
 --ignorePatterns "L1TopoMenuLoader.+ERROR." \
@@ -49,7 +53,7 @@ mv log.OverlayBS log.OverlayLegacy
 rc2=-9999
 if [ $rc -eq 0 ]
 then
-    OverlayTest.py Truth -d -t 0 -n $events 2>&1 | tee log.OverlayTest
+    OverlayTest.py Truth -d -t 1 -n $events 2>&1 | tee log.OverlayTest
     rc2=$?
 fi
 echo  "art-result: $rc2 configNew"
diff --git a/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_sequential.sh b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_sequential.sh
new file mode 100755
index 0000000000000000000000000000000000000000..169f057dc40016a4fcc80ea191b7c2fd4aff4206
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_DataOverlay_ConfigTest_Zmumu_sequential.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# art-description: MC+data Overlay with MT support, running sequentially, new config
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: dataOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+OverlayTest.py -d -n 10 -t 0 2>&1 | tee log.OverlayTest
+
+rc=$?
+echo "art-result: $rc overlay"
+
+# Regression disabled as many changes are planned
+# rc2=-9999
+# if [ $rc -eq 0 ]
+# then
+#     ArtPackage=$1
+#     ArtJobName=$2
+#     art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --error-mode resilient --mode=semi-detailed --order-trees
+#     rc2=$?
+# fi
+# echo  "art-result: $rc2 regression"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Muon.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Muon.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7690e142d31afd85f9193f968cf91d82a2affa04
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Muon.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# art-description: MC+MC Overlay with MT support, config test
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: legacyMcOverlayRDO.pool.root
+# art-output: mcOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+events=2
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v4/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile legacyMcOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--preInclude 'Overlay:SimulationJobOptions/preInclude.MuonOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--imf False \
+--athenaopts '"--config-only=ConfigLegacy.pkl"'
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v4/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile legacyMcOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt");' \
+--preInclude 'Overlay:SimulationJobOptions/preInclude.MuonOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--imf False
+
+rc=$?
+echo "art-result: $rc configLegacy"
+mv log.Overlay log.OverlayLegacy
+
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    OverlayTest.py Muon -t 1 -n $events 2>&1 | tee log.OverlayTest
+    rc2=$?
+fi
+echo  "art-result: $rc2 configNew"
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root legacyMcOverlayRDO.pool.root mcOverlayRDO.pool.root --error-mode resilient --mode=semi-detailed --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings RecoTimingObj_p1_HITStoRDO_timings index_ref
+    rc3=$?
+fi
+echo  "art-result: $rc3 comparison"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Pixel.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Pixel.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1a02f0bb8e5393c2e33a72c1ec406284d52f663d
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Pixel.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# art-description: MC+MC Overlay with MT support, config test
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: legacyMcOverlayRDO.pool.root
+# art-output: mcOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+events=2
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v4/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile legacyMcOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--preInclude 'Overlay:SimulationJobOptions/preInclude.PixelOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--imf False \
+--athenaopts '"--config-only=ConfigLegacy.pkl"'
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v4/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile legacyMcOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt");' \
+--preInclude 'Overlay:SimulationJobOptions/preInclude.PixelOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--imf False
+
+rc=$?
+echo "art-result: $rc configLegacy"
+mv log.Overlay log.OverlayLegacy
+
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    OverlayTest.py Pixel -t 1 -n $events 2>&1 | tee log.OverlayTest
+    rc2=$?
+fi
+echo  "art-result: $rc2 configNew"
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root legacyMcOverlayRDO.pool.root mcOverlayRDO.pool.root --error-mode resilient --mode=semi-detailed --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings RecoTimingObj_p1_HITStoRDO_timings index_ref
+    rc3=$?
+fi
+echo  "art-result: $rc3 comparison"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_SCT.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_SCT.sh
index 3df2bda92321dc7d157e333cd8f49ad2c808cf02..2bd7e73d2fee296bbde3677a6c1576538aef5f20 100755
--- a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_SCT.sh
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_SCT.sh
@@ -10,6 +10,10 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 # art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
 
 events=2
 
@@ -33,6 +37,7 @@ Overlay_tf.py \
 --conditionsTag OFLCOND-MC16-SDR-20 \
 --geometryVersion ATLAS-R2-2016-01-00-01 \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt");' \
 --preInclude 'Overlay:SimulationJobOptions/preInclude.SCTOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
 --imf False
 
@@ -43,7 +48,7 @@ mv log.Overlay log.OverlayLegacy
 rc2=-9999
 if [ $rc -eq 0 ]
 then
-    OverlayTest.py SCT -t 0 -n $events 2>&1 | tee log.OverlayTest
+    OverlayTest.py SCT -t 1 -n $events 2>&1 | tee log.OverlayTest
     rc2=$?
 fi
 echo  "art-result: $rc2 configNew"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_TRT.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_TRT.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1d06f36adcde9a386e4f29477927628adb74a58c
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_TRT.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# art-description: MC+MC Overlay with MT support, config test
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: legacyMcOverlayRDO.pool.root
+# art-output: mcOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+events=2
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v4/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile legacyMcOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--preInclude 'Overlay:SimulationJobOptions/preInclude.TRTOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--imf False \
+--athenaopts '"--config-only=ConfigLegacy.pkl"'
+
+Overlay_tf.py \
+--inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/HITS.10504490._000425.pool.root.1 \
+--inputRDO_BKGFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/OverlayMonitoringRTT/PileupPremixing/22.0/v4/RDO.merged-pileup-MT.100events.pool.root \
+--outputRDOFile legacyMcOverlayRDO.pool.root \
+--maxEvents $events \
+--conditionsTag OFLCOND-MC16-SDR-20 \
+--geometryVersion ATLAS-R2-2016-01-00-01 \
+--preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt");' \
+--preInclude 'Overlay:SimulationJobOptions/preInclude.TRTOnlyConfig.py,SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
+--imf False
+
+rc=$?
+echo "art-result: $rc configLegacy"
+mv log.Overlay log.OverlayLegacy
+
+rc2=-9999
+if [ $rc -eq 0 ]
+then
+    OverlayTest.py TRT -t 1 -n $events 2>&1 | tee log.OverlayTest
+    rc2=$?
+fi
+echo  "art-result: $rc2 configNew"
+
+rc3=-9999
+if [ $rc2 -eq 0 ]
+then
+    acmd.py diff-root legacyMcOverlayRDO.pool.root mcOverlayRDO.pool.root --error-mode resilient --mode=semi-detailed --ignore-leaves RecoTimingObj_p1_EVNTtoHITS_timings RecoTimingObj_p1_HITStoRDO_timings index_ref
+    rc3=$?
+fi
+echo  "art-result: $rc3 comparison"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Truth.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Truth.sh
index 9d989cb716ad2aaa44006eee33d9b039a6979700..220f7eccf2490a7bc539570a493daf7439ab32c0 100755
--- a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Truth.sh
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_Truth.sh
@@ -10,6 +10,10 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 # art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
 
 events=2
 
@@ -33,6 +37,7 @@ Overlay_tf.py \
 --conditionsTag OFLCOND-MC16-SDR-20 \
 --geometryVersion ATLAS-R2-2016-01-00-01 \
 --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True); from LArDigitization.LArDigitizationFlags import jobproperties;jobproperties.LArDigitizationFlags.useEmecIwHighGain.set_Value_and_Lock(False);' \
+--postExec 'job+=CfgMgr.JobOptsDumperAlg(FileName="OverlayLegacyConfig.txt");' \
 --preInclude 'Overlay:SimulationJobOptions/preInclude.TruthOnlyConfig.py' \
 --imf False
 
@@ -43,7 +48,7 @@ mv log.Overlay log.OverlayLegacy
 rc2=-9999
 if [ $rc -eq 0 ]
 then
-    OverlayTest.py Truth -t 0 -n $events 2>&1 | tee log.OverlayTest
+    OverlayTest.py Truth -t 1 -n $events 2>&1 | tee log.OverlayTest
     rc2=$?
 fi
 echo  "art-result: $rc2 configNew"
diff --git a/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_sequential.sh b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_sequential.sh
new file mode 100755
index 0000000000000000000000000000000000000000..87697bf644d760e7cc2ade4c7016df587b13f946
--- /dev/null
+++ b/Simulation/Tests/OverlayTests/test/test_MCOverlay_ConfigTest_ttbar_sequential.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# art-description: MC+MC Overlay with MT support, running sequentially, new config
+# art-type: grid
+# art-include: master/Athena
+
+# art-output: mcOverlayRDO.pool.root
+# art-output: log.*
+# art-output: mem.summary.*
+# art-output: mem.full.*
+# art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
+
+OverlayTest.py -n 10 -t 0 2>&1 | tee log.OverlayTest
+
+rc=$?
+echo "art-result: $rc overlay"
+
+# Regression disabled as many changes are planned
+# rc2=-9999
+# if [ $rc -eq 0 ]
+# then
+#     ArtPackage=$1
+#     ArtJobName=$2
+#     art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --error-mode resilient --mode=semi-detailed --order-trees
+#     rc2=$?
+# fi
+# echo  "art-result: $rc2 regression"
diff --git a/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh b/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh
index 0ad572c04249c1c5301e2c4ee317440084fa0c44..59e0a87d7c0dffdadcba260cd8a163544b19d30a 100755
--- a/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh
+++ b/Simulation/Tests/OverlayTestsMT/test/test_DataOverlay_MT_Zmumu_8threads_NewConfig.sh
@@ -10,6 +10,10 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 # art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
 
 OverlayTest.py -d -n 100 -t 8 2>&1 | tee log.OverlayTest
 
diff --git a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh
index 3a2edb032abffc3ec1f1a1b959fc2f0d54522a95..c624ff1ad0e7fe77a86227ce1f1ee45b2be99e9b 100755
--- a/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh
+++ b/Simulation/Tests/OverlayTestsMT/test/test_MCOverlay_MT_ttbar_8threads_NewConfig.sh
@@ -10,6 +10,10 @@
 # art-output: mem.summary.*
 # art-output: mem.full.*
 # art-output: runargs.*
+# art-output: *.pkl
+# art-output: *Config.txt
+
+set -o pipefail
 
 OverlayTest.py -n 100 -t 8 2>&1 | tee log.OverlayTest
 
diff --git a/TileCalorimeter/TileRecAlgs/src/TileCellSelector.cxx b/TileCalorimeter/TileRecAlgs/src/TileCellSelector.cxx
index 170bce5460015652372a4b5d376af23b56d0ea30..5d23980a9334b6c38959d6384ba5db29c7c910ca 100644
--- a/TileCalorimeter/TileRecAlgs/src/TileCellSelector.cxx
+++ b/TileCalorimeter/TileRecAlgs/src/TileCellSelector.cxx
@@ -88,6 +88,10 @@ TileCellSelector::TileCellSelector(const std::string& name, ISvcLocator* pSvcLoc
   declareProperty( "MaxTimeMBTS", m_maxTimeChan[2] =  100.);  // cut on channel time
   declareProperty( "PtnTimeMBTS", m_ptnTimeChan[2] =  10);  // channel time pattern
 
+  declareProperty( "SelectGain",  m_selectGain = 2); // 0 - select LG only,  1 - HG only, 2 - both gains
+  m_skipGain[TileID::LOWGAIN] = false;
+  m_skipGain[TileID::HIGHGAIN] = false;
+
   // pattern - decimal number with up to 5 digits
   // only values 1(=true) and 0(=false) for every digit are used
   // digit 0 set to 1  - accept event if value < min
@@ -218,6 +222,22 @@ StatusCode TileCellSelector::initialize() {
 
   }
 
+  switch (m_selectGain) {
+    case 0:
+      ATH_MSG_INFO( "Select Low gain channels only");
+      m_skipGain[TileID::LOWGAIN] = false;
+      m_skipGain[TileID::HIGHGAIN] = true;
+      break;
+    case 1:
+      ATH_MSG_INFO( "Select High gain channels only");
+      m_skipGain[TileID::LOWGAIN] = true;
+      m_skipGain[TileID::HIGHGAIN] = false;
+      break;
+    default:
+      ATH_MSG_INFO( "Select both gains");
+      break;
+  }
+
   if (!m_digitsContainerKey.key().empty()) {
     if (m_checkJumps) {
       ATH_MSG_INFO( "JumpDeltaHG " << m_jumpDeltaHG);
@@ -652,7 +672,7 @@ StatusCode TileCellSelector::execute() {
             bool ene1Ok = false;
             bool time1Ok = false;
 
-            if (!bad1) {
+            if ( !(bad1 || m_skipGain[tile_cell->gain1()]) ) {
               if (time1 < m_minTimeChan[ch_type] ) {
                 time1Ok = m_bitTimeChan[ch_type][0];
               } else if (time1 > m_maxTimeChan[ch_type] ) {
@@ -685,7 +705,7 @@ StatusCode TileCellSelector::execute() {
             bool ene2Ok = false;
             bool time2Ok = false;
 
-            if (!bad2) {
+            if ( !(bad2 || m_skipGain[tile_cell->gain2()]) ) {
               if (ene2 < m_minEneChan[ch_type] ) {
                 ene2Ok = m_bitEneChan[ch_type][0];
               } else if (ene2 > m_maxEneChan[ch_type] ) {
@@ -719,7 +739,7 @@ StatusCode TileCellSelector::execute() {
             bool over2=false;
             if (checkOver) {
               over1 = ( (!bad1) && (tile_cell->qbit1() & TileCell::MASK_OVER) && tile_cell->gain1()==TileID::LOWGAIN);
-              over2 = ( (!bad2) && (tile_cell->qbit2() & TileCell::MASK_OVER) && tile_cell->gain1()==TileID::LOWGAIN);
+              over2 = ( (!bad2) && (tile_cell->qbit2() & TileCell::MASK_OVER) && tile_cell->gain2()==TileID::LOWGAIN);
             }
             
             if ((ene1Ok && time1Ok) || over1) {
@@ -1191,6 +1211,7 @@ StatusCode TileCellSelector::execute() {
             HWIdentifier chId = m_tileHWID->channel_id(adcId);
             m_tileHWID->get_hash(chId, hash, &chan_context);
             if ( m_chanToSkip[hash] ) continue;
+            int adc = m_tileHWID->adc(adcId);
             int channel = m_tileHWID->channel(adcId);
             int ch_type = 0;
             if (channel == chMBTS) {
@@ -1200,7 +1221,6 @@ StatusCode TileCellSelector::execute() {
               ch_type = 1;
             }
             if (emptyBad  && !m_chanBad[hash] ) {
-              int adc = m_tileHWID->adc(adcId);
               m_chanBad[hash] = m_tileBadChanTool->getAdcStatus(drawerIdx,channel,adc).isBad() ||
                 (DQstatus && !DQstatus->isAdcDQgood(ros,drawer,channel,adc)) ||
                 (m_checkDCS && m_tileDCS->getDCSStatus(ros, drawer, channel) > TileDCSState::WARNING);
@@ -1221,7 +1241,8 @@ StatusCode TileCellSelector::execute() {
 
               if ( (m_skipMasked && m_chanBad[hash]) ||
                    (m_skipMBTS && channel == chMBTS) ||
-                   (m_skipEmpty && TileDQstatus::isChEmpty(ros, drawer, channel) > 0) )
+                   (m_skipEmpty && TileDQstatus::isChEmpty(ros, drawer, channel) > 0) ||
+                   m_skipGain[adc] )
                 continue;
 
               bool ampOk = false;
diff --git a/TileCalorimeter/TileRecAlgs/src/TileCellSelector.h b/TileCalorimeter/TileRecAlgs/src/TileCellSelector.h
index a65f16bbfcb6de174f149df9e13f62a824a24319..606998f652f857868a8e6406eb22aeccc5d06793 100644
--- a/TileCalorimeter/TileRecAlgs/src/TileCellSelector.h
+++ b/TileCalorimeter/TileRecAlgs/src/TileCellSelector.h
@@ -131,6 +131,8 @@ class TileCellSelector: public AthAlgorithm {
     int m_ptnEneChan[3];
     int m_ptnTimeCell;
     int m_ptnTimeChan[3];
+    int m_selectGain;
+    bool m_skipGain[2];
 #define ptnlength 5
     bool m_bitEneCell[ptnlength];
     bool m_bitTimeCell[ptnlength];
diff --git a/Tools/OnlineRecoTests/CMakeLists.txt b/Tools/OnlineRecoTests/CMakeLists.txt
index c5ef4b1321921542c51464d0aed7d8465b13b171..bf4a38eef91f22b2e5301ddf8d658841809d8a5f 100644
--- a/Tools/OnlineRecoTests/CMakeLists.txt
+++ b/Tools/OnlineRecoTests/CMakeLists.txt
@@ -13,3 +13,6 @@ atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_scripts( scripts/ort_*.py scripts/ort_*.sh )
 
+atlas_add_test( flake8_test_dir
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python
+                POST_EXEC_SCRIPT nopost.sh )
diff --git a/Tools/OnlineRecoTests/python/ort_interpretTimestamp.py b/Tools/OnlineRecoTests/python/ort_interpretTimestamp.py
index a6d97e0e7a08d08333988ab711928c51ec7ba9f5..8f9224d6080955c02bb6735840cabd4750f1a840 100755
--- a/Tools/OnlineRecoTests/python/ort_interpretTimestamp.py
+++ b/Tools/OnlineRecoTests/python/ort_interpretTimestamp.py
@@ -2,9 +2,15 @@
 
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-import os,sys,string,commands
+from __future__ import print_function
+
+import os,sys
 from datetime import datetime
 
+from future import standard_library
+standard_library.install_aliases()
+import subprocess
+
 
 def getFile(timestampfile):
   ## weblocation?
@@ -12,7 +18,7 @@ def getFile(timestampfile):
     tsfArr = timestampfile.split("/")
     tmpstampfile = tsfArr[len(tsfArr)-1]
     cmd = "export http_proxy=\"http://atlasgw.cern.ch:3128/\"; wget -O %s %s" % (tmpstampfile,timestampfile)
-    s,o = commands.getstatusoutput(cmd)
+    s,o = subprocess.getstatusoutput(cmd)
     timestampfile = tmpstampfile
 
   ## file exists?
@@ -55,7 +61,7 @@ def interpretNewTimestamp(newtimestampfile,prvtimestampfile=""):
 
 def updatePreviousTimestamp(newtimestampfile,prvtimestampfile):
   cpcmd = "cp -f %s %s" % (getFile(newtimestampfile),prvtimestampfile)
-  s,o = commands.getstatusoutput(cpcmd)
+  s,o = subprocess.getstatusoutput(cpcmd)
   return s
 
 
diff --git a/Tools/OnlineRecoTests/share/OnlineRecoTests_autoconfiguration.py b/Tools/OnlineRecoTests/share/OnlineRecoTests_autoconfiguration.py
index ff5a802bcd04d660a4ffe648f660dd0c142abb4f..0f6c85b1b11824c94d571e41e6d5921e71dfd917 100644
--- a/Tools/OnlineRecoTests/share/OnlineRecoTests_autoconfiguration.py
+++ b/Tools/OnlineRecoTests/share/OnlineRecoTests_autoconfiguration.py
@@ -1,4 +1,3 @@
-import os,sys,string,commands
 import pickle
 
 from AthenaCommon.GlobalFlags import globalflags
@@ -12,7 +11,7 @@ onlinegoodies['ConditionsTag'] = globalflags.ConditionsTag()
 onlinegoodies['beamType'] = jobproperties.Beam.beamType()
 onlinegoodies['DetDescrVersion'] = globalflags.DetDescrVersion()
 
-file = open("globalflags.pickle",'w')
+file = open("globalflags.pickle",'wb')
 pickle.dump(onlinegoodies,file)
 file.close()
 
diff --git a/Tools/PROCTools/python/CreateTierZeroArgdict.py b/Tools/PROCTools/python/CreateTierZeroArgdict.py
index 0a9e657f535684105463053b564f1a0479d22d76..b3710adbec739c78c8cd2d0a3421adf82312cef2 100755
--- a/Tools/PROCTools/python/CreateTierZeroArgdict.py
+++ b/Tools/PROCTools/python/CreateTierZeroArgdict.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # WriteTierZeroArgdict.py
 #
@@ -13,6 +13,8 @@
 #                     python CreateTierZeroArgdict.py --maxEvents 20 --jobnr 1 --ncores 4 --NoMergeTypeList AOD,ESD,DRAW_EGZ,DRAW_EMU,DRAW_TAUMUH,DRAW_ZMUMU f622 data15_13TeV.00284473.physics_Main.daq.RAW data15_13TeV.00284473.physics_Main.daq.RAW._lb0267._SFO-3._0001.data 
 
 
+from __future__ import print_function
+
 import os, sys, json, traceback, re, argparse
 from pprint import pprint as pp
 
@@ -53,7 +55,7 @@ args = parser.parse_args()
 
 import pyAMI.client 
 
-#print "args: ",args
+#print ("args: ",args)
 
 # positional arguments
 amitag= args.amitag 
@@ -124,7 +126,7 @@ def evalDatasetNameFion(dsname,dsfionstr):
             pairs = pairs[2:]
         newdsname = '.'.join(parts)
     else :
-        prnt("ERROR >>> unexpected dsnamefion syntax")
+        print("ERROR >>> unexpected dsnamefion syntax")
         raise Exception('error')
     return newdsname
 
@@ -143,7 +145,7 @@ if __name__ == '__main__':
             else:
                 pass
         else: 
-            prnt("WARNING >>> input file name does not have the expected format - no partition identifiers separated by '._' found in the inputfilename lbXXXX._SFO-X._XXXX, ._lb0000._SFO-0._0000.job,<jobnr>.log will be used instead for the log file name")
+            print("WARNING >>> input file name does not have the expected format - no partition identifiers separated by '._' found in the inputfilename lbXXXX._SFO-X._XXXX, ._lb0000._SFO-0._0000.job,<jobnr>.log will be used instead for the log file name")
             pass
     except:
         pass 
@@ -165,7 +167,7 @@ if __name__ == '__main__':
     # must be specified as a comma separated list of types (parameter to this script) 
     if ncores>1: 
         for mergetype in NoMergeTypeList.split(","):
-            if phconfig.has_key("athenaMPMergeTargetSize") : 
+            if "athenaMPMergeTargetSize" in phconfig: 
                 phconfig["athenaMPMergeTargetSize"].update({mergetype:0.0})
             else: 
                 phconfig["athenaMPMergeTargetSize"]={mergetype:0.0}
@@ -178,12 +180,12 @@ if __name__ == '__main__':
     jobargdict.update(phconfig)
     
     #checking if AMI tag contains empty 'inputBSFile' dictionary 
-    if ami_tag_content.get('inputs',{}).has_key('inputBSFile'):
+    if 'inputBSFile' in ami_tag_content.get('inputs',{}):
         # if yes - writing the inputfile into the argument dictionary according to the Tier-0 nomenclature
         if not ami_tag_content.get('inputs',{})['inputBSFile'] :
             jobargdict['inputBSFile']=[dsname+'#'+inputflname]
         else :
-            print "ERROR - not recognized inputs in AMI tag; script works only for the following AMI tag configuration of the inputs \n 'inputs': {'inputBSFile': {}}"
+            print ("ERROR - not recognized inputs in AMI tag; script works only for the following AMI tag configuration of the inputs \n 'inputs': {'inputBSFile': {}}")
             sys.exit(1)
     
     # starting translating the output dataset names form the ifMatch expressions specified in the AMI tag  
@@ -219,7 +221,7 @@ if __name__ == '__main__':
             # apply default nomenclature
             pcs=dsname.split('.')
             if len(pcs)<5 : 
-                print "Dataset name must have at least 5 parts separated by comma to comply with Tier-0 naming convention: <project>.<runnr>.<stream>.<granularity>.<type>"
+                print ("Dataset name must have at least 5 parts separated by comma to comply with Tier-0 naming convention: <project>.<runnr>.<stream>.<granularity>.<type>")
                 sys.exit(1)
             pcs[3]=taskstep
             pcs[4]=dstp
@@ -243,18 +245,18 @@ if __name__ == '__main__':
     jobargdictfile.close()
     
 
-    print "####################################################################" 
-    print "#\n# To run a local job:"
-    print "#\n# 1. Copy the following files into a directory from which you intend to run your job:\n#    %s\n#    %s " %(jsonflname,inputflname)
-    print "#\n# 2. Setup the environment: \n#    source "+ ami_tag_content.get('trfsetupcmd',{})   
-    print "#\n# 3. Run the job: \n#    python -u `which "+ami_tag_content.get('transformation',{})+"` --argJSON="+jsonflname+" &> "+logfilename 
-    print "#"
-    print "####################################################################" 
-    print "#\n# Note aside: to copy inputfiles from EOS (if still present there) one can usually use commands like:"
-    print "#    xrdcp -f --nopbar root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/%s/%s/%s/%s/%s %s" % (dsname.split(".")[0],dsname.split(".")[2],dsname.split(".")[1],dsname,inputflname,inputflname)
-    print "#\n# OR from castor disk - assuming the file is STAGED:"
-    print "#     export STAGE_SVCCLASS=t0atlas" 
-    print "#     rfcp /castor/cern.ch/grid/atlas/rucio/raw/%s/%s/%s/%s/%s ." % (dsname.split(".")[0],dsname.split(".")[2],dsname.split(".")[1],dsname,inputflname)
-    print "#"
-    print "####################################################################" 
+    print ("####################################################################" )
+    print ("#\n# To run a local job:")
+    print ("#\n# 1. Copy the following files into a directory from which you intend to run your job:\n#    %s\n#    %s " %(jsonflname,inputflname))
+    print ("#\n# 2. Setup the environment: \n#    source "+ ami_tag_content.get('trfsetupcmd',{})   )
+    print ("#\n# 3. Run the job: \n#    python -u `which "+ami_tag_content.get('transformation',{})+"` --argJSON="+jsonflname+" &> "+logfilename )
+    print ("#")
+    print ("####################################################################" )
+    print ("#\n# Note aside: to copy inputfiles from EOS (if still present there) one can usually use commands like:")
+    print ("#    xrdcp -f --nopbar root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/%s/%s/%s/%s/%s %s" % (dsname.split(".")[0],dsname.split(".")[2],dsname.split(".")[1],dsname,inputflname,inputflname))
+    print ("#\n# OR from castor disk - assuming the file is STAGED:")
+    print ("#     export STAGE_SVCCLASS=t0atlas" )
+    print ("#     rfcp /castor/cern.ch/grid/atlas/rucio/raw/%s/%s/%s/%s/%s ." % (dsname.split(".")[0],dsname.split(".")[2],dsname.split(".")[1],dsname,inputflname))
+    print ("#")
+    print ("####################################################################" )
     
diff --git a/Tools/PROCTools/python/DataFormatRates.py b/Tools/PROCTools/python/DataFormatRates.py
index 4480df903294035d45ea874b7de6376301842482..57be69e1d2c75aa107cdf7d448806f130e0135ba 100755
--- a/Tools/PROCTools/python/DataFormatRates.py
+++ b/Tools/PROCTools/python/DataFormatRates.py
@@ -1,7 +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
 
 # Script for checking the yield and skimming efficiency for derived data formats
 
+from __future__ import print_function
+
 # needed python imports
 import sys, os, argparse, subprocess
 
@@ -19,54 +21,54 @@ parser.add_argument('-v', '--verbose', action='store_true', default=False, help=
 parser.add_argument('-q', '--quick', action='store_true', default=False, help='Quick mode, skips ARQ call and uses local pickle file from previous query')
 
 args = parser.parse_args()
-#print args
+#print (args)
 
 if args.quick:
-    print "Quick mode: will use pickle file on disk from previous query, will not call ARQ"
+    print ("Quick mode: will use pickle file on disk from previous query, will not call ARQ")
 else:
     # run the query - all of the retrieved data is stored in a pickle file on disk
     cmd = "AtlRunQuery.py \"find run %s and ready and st %s 100k+ / show lumi\"" % (args.runs, args.stream)
     if args.verbose:
-        print "Will now execute the following ARQ query:"
-        print "   %s" % cmd
+        print ("Will now execute the following ARQ query:")
+        print ("   %s" % cmd)
     env = os.environ.copy()
     output = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
     if args.verbose:
         for line in output.stdout.readlines():
-            print "   %s" % line.rstrip()
-    print "Retrieved ARQ results"
+            print ("   %s" % line.rstrip())
+    print ("Retrieved ARQ results")
 
-print "Will now open the pickle file containing the needed lumi info"
+print ("Will now open the pickle file containing the needed lumi info")
 
 # read in the pickle file with the results
 import pickle
-f = open("data/atlrunquery.pickle")
+f = open("data/atlrunquery.pickle", 'rb')
 d = pickle.load(f)
 
-print "Loaded pickle file containing info for %d runs" % len(d['Run'])
+print ("Loaded pickle file containing info for %d runs" % len(d['Run']))
 
 lumiPerRun = {}
 eventsPerRun = {}
 selectedEventsPerRun = {}
 
 for run in d['Run']:
-    print "Will now sum up integrated luminosity for run %d" % run
+    print ("Will now sum up integrated luminosity for run %d" % run)
     # calculate the integrated luminosity based on the length of the LBs and the inst lumi per LB
     lbDict = d[run]['#LB']
     lumiTag = [key for key in d[run] if 'ofllumi:0:' in key][0]
-    print "  Using lumi tag: %s" % lumiTag
+    print ("  Using lumi tag: %s" % lumiTag)
     lumiDict = d[run][lumiTag]
-    print lumiDict
+    print (lumiDict)
     integratedLumi = 0
     for lb in range(1,len(lbDict)):
-        print "lb: %d" % lb
-        print "lumiDict[lb-1]:"
-        print lumiDict[lb-1]
-        #print "Will now add lumi for LB %d with length %f and lumi %f" % (lb, lbDict[1][lb]-lbDict[1][lb-1], lumiDict[lb-1]['value'])
+        print ("lb: %d" % lb)
+        print ("lumiDict[lb-1]:")
+        print (lumiDict[lb-1])
+        #print ("Will now add lumi for LB %d with length %f and lumi %f" % (lb, lbDict[1][lb]-lbDict[1][lb-1], lumiDict[lb-1]['value']))
         #integratedLumi += lumiDict[lb-1]['value']*(lbDict[1][lb]-lbDict[1][lb-1]) # this was good for online lumi which comes in std query.. /CO
         integratedLumi += float(lumiDict[lb-1]['value']) # this already has integrated lumi per LB, I guess? /CO
-        #print "  LB %d: integrated lumi = %f" % (lb, integratedLumi)
-    print " => Done: %f x 10^30 cm^-2" % (integratedLumi)
+        #print ("  LB %d: integrated lumi = %f" % (lb, integratedLumi))
+    print (" => Done: %f x 10^30 cm^-2" % (integratedLumi))
     lumiPerRun[run] = integratedLumi
 
 # now go to AMI to get the event yields for the datasets you're interested in
@@ -80,16 +82,16 @@ for run in d['Run']:
     pattern = "data15_13TeV.%08d.physics_Main.merge.DESDM_RPVLL" % run
     pattern += '.f%_m%'
     dslist = AtlasAPI.list_datasets(client, patterns = pattern, fields = ['events'], type = 'DESDM_RPVLL')
-    #print dslist
+    #print (dslist)
     if len(dslist) > 0:
-        print dslist[0]['events']
+        print (dslist[0]['events'])
         selectedEventsPerRun[run] = dslist[0]['events']
     pattern = "data15_13TeV.%08d.physics_Main.merge.AOD" % run
     pattern += '.f%_m%'
     dslist = AtlasAPI.list_datasets(client, patterns = pattern, fields = ['events'], type = 'AOD')
-    #print dslist
+    #print (dslist)
     if len(dslist) > 0:
-        print dslist[0]['events']
+        print (dslist[0]['events'])
         eventsPerRun[run] = dslist[0]['events']
 
 import ROOT as r
diff --git a/Tools/PROCTools/python/ExtractEvents.py b/Tools/PROCTools/python/ExtractEvents.py
index e0f9a0dbabfe5360e111620637c4d05def8dbffb..c8b4a2b58aa25b5de6c0d21a522d8553c90228e8 100755
--- a/Tools/PROCTools/python/ExtractEvents.py
+++ b/Tools/PROCTools/python/ExtractEvents.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ##############################################################
 #                                                            #
@@ -12,6 +12,8 @@
 #                                                            #
 ##############################################################
 
+from __future__ import print_function
+
 import sys, os, argparse, subprocess, fnmatch
 
 # This is a bit ugly, but seems to be the only way for now
@@ -60,25 +62,25 @@ def extractEvents(run, events, inputFiles, format, outputFile=""):
 
     # check that the output file does not already exist
     if os.path.isfile(outputFile):
-        print "Output file %s already exists - please remove it or choose a different name for the output file (-o/--outputfile)" % outputFile
+        print ("Output file %s already exists - please remove it or choose a different name for the output file (-o/--outputfile)" % outputFile)
 
     # execute the command
-    print "Will run the following command to start the extraction"
-    print "   %s" % cmd
+    print ("Will run the following command to start the extraction")
+    print ("   %s" % cmd)
     extraction = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     lines_iterator = iter(extraction.stdout.readline, b"")
     for line in lines_iterator:
-        print(line.rstrip())
+        print((line.rstrip()))
 
     # if the output file is less than 500 bytes, it's probably empty
     size = os.path.getsize(outputFile)
     if size < 500:
-        print "Size of output file only %d bytes, deleting it as most likely empty" % size
+        print ("Size of output file only %d bytes, deleting it as most likely empty" % size)
         os.remove(outputFile)
     else:
-        print "Done. Output saved to %s (%.1f kB)" % (outputFile, size/1024.)
+        print ("Done. Output saved to %s (%.1f kB)" % (outputFile, size/1024.))
     if len(events) > 1:
-        print "NB! You requested %d events, please check the log to see that all were found" % len(events)
+        print ("NB! You requested %d events, please check the log to see that all were found" % len(events))
 
 def main():
 
@@ -95,36 +97,36 @@ def main():
     parser.add_argument('-i', '--inputfile', nargs='+', type=str, default='', help='Local input file(s), to bypass search in EOS disk buffer')
 
     args = parser.parse_args()
-    print args
+    print (args)
 
     eventList = validEventList(args.events)
 
     # if the user provides input file(s), look for the event(s) in them!
     if args.inputfile != "":
-        print "Will look in specified input file(s)"
+        print ("Will look in specified input file(s)")
         extractEvents(args.run, eventList, args.inputfile, args.fileformat)
         sys.exit(0)
         
     if args.fileformat == False:
-        print "Unknown argument for -f/--fileformat - please provide a valid string describing the file format, i.e. one containing 'RAW', 'ESD' or 'AOD'"
+        print ("Unknown argument for -f/--fileformat - please provide a valid string describing the file format, i.e. one containing 'RAW', 'ESD' or 'AOD'")
         sys.exit(1)
 
-    print "Will try to extract event(s) %s in LB %d of run %d (project tag: %s, stream: %s, format: %s, matching string: \"%s\")" % (args.events, args.lumiblock, args.run, args.projecttag, args.stream, args.fileformat, args.matchingstring)
+    print ("Will try to extract event(s) %s in LB %d of run %d (project tag: %s, stream: %s, format: %s, matching string: \"%s\")" % (args.events, args.lumiblock, args.run, args.projecttag, args.stream, args.fileformat, args.matchingstring))
 
     filePath = "root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/%s/%s/%08d/" % (args.projecttag, args.stream, args.run)
-    #print filePath
+    #print (filePath)
     cmd = eospath+" ls "+filePath
     if args.verbose:
-        print "Will run the following command to get a list of datasets matching the provided info"
-        print "   %s" % cmd
+        print ("Will run the following command to get a list of datasets matching the provided info")
+        print ("   %s" % cmd)
     env = os.environ.copy()
     datasetListing = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
     datasetNames = []
     if args.verbose:
-        print "Datasets before requiring match with pattern (%s):" % args.matchingstring
+        print ("Datasets before requiring match with pattern (%s):" % args.matchingstring)
     for line in datasetListing.stdout.readlines():
         if args.verbose:
-            print "   %s" % line.rstrip()
+            print ("   %s" % line.rstrip())
         # skip log file tar balls
         if "LOGARC.tar" in line:
             continue
@@ -136,31 +138,31 @@ def main():
     datasetNames = [ds for ds in datasetNames if not ".LOGARC" in ds]
     if args.matchingstring != '':
         if args.verbose:
-            print "Removing datasets that don't match %s" % (args.matchingstring)
+            print ("Removing datasets that don't match %s" % (args.matchingstring))
         datasetNames = [ds for ds in datasetNames if fnmatch.fnmatch(ds, "*"+args.matchingstring+"*")]
     
     if len(datasetNames) > 1:
-        print "More than one dataset matching the provided info"
+        print ("More than one dataset matching the provided info")
         for ds in datasetNames:
-            print "   %s" % ds
-        print "Please provide tighter constraints, e.g. by using the -m/--matchingstring option"
+            print ("   %s" % ds)
+        print ("Please provide tighter constraints, e.g. by using the -m/--matchingstring option")
         sys.exit(1)
 
     if len(datasetNames) == 0:
-        print "No dataset matching the provided info - please provide looser constraints and or use the -v/--verbose switch to see more info about what datasets are available in EOS"
+        print ("No dataset matching the provided info - please provide looser constraints and or use the -v/--verbose switch to see more info about what datasets are available in EOS")
         sys.exit(1)
 
-    print "Will use the following dataset found in EOS: %s" % datasetNames[0]
+    print ("Will use the following dataset found in EOS: %s" % datasetNames[0])
 
     cmd = eospath+" ls "+filePath+datasetNames[0]+'/'
     if args.verbose:
-        print "Will run the following command to get a list of files in the selected dataset"
-        print "   %s" % cmd
+        print ("Will run the following command to get a list of files in the selected dataset")
+        print ("   %s" % cmd)
 
     fileListing = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     fileNames = []
     for line in fileListing.stdout.readlines():
-        print line
+        print (line)
         substrings = line.split('lb')
         lbs = []
         if line.count('lb') == 2:
@@ -170,14 +172,14 @@ def main():
         if args.lumiblock in lbs:
             fileNames.append(filePath+datasetNames[0]+"/"+line.rstrip())
     if args.verbose:
-        print "Will look for the sought event(s) in the following %d file(s):" % len(fileNames)
+        print ("Will look for the sought event(s) in the following %d file(s):" % len(fileNames))
         for file in fileNames:
-            print "   %s" % file
+            print ("   %s" % file)
 
     # if no files are found, tell the user and stop
     if len(fileNames) == 0:
-	print "No files available in %s - will exit" % (filePath+datasetNames[0]+'/')
-	sys.exit(1)
+        print ("No files available in %s - will exit" % (filePath+datasetNames[0]+'/'))
+        sys.exit(1)
 
     # actually extract the events
     extractEvents(args.run, eventList, fileNames, args.fileformat)
diff --git a/Tools/PROCTools/python/RunTier0TestsTools.py b/Tools/PROCTools/python/RunTier0TestsTools.py
index da458f5c6e8e541bbec676179e10b585c1f94872..3483331c3f0169f37e0f774d5832cf2c12f43124 100644
--- a/Tools/PROCTools/python/RunTier0TestsTools.py
+++ b/Tools/PROCTools/python/RunTier0TestsTools.py
@@ -28,7 +28,7 @@ ciRefFileMap = {
                 's3505-22.0'           : 'v2',
                 # OverlayTier0Test_required-test
                 'overlay-d1498-21.0'   : 'v2',
-                'overlay-d1498-22.0'   : 'v26',
+                'overlay-d1498-22.0'   : 'v27',
                 'overlay-bkg-21.0'     : 'v1',
                 'overlay-bkg-22.0'     : 'v4',
                }
diff --git a/Tools/PROCTools/python/UploadAMITag.py b/Tools/PROCTools/python/UploadAMITag.py
index 2f5c69a22e81015614761582b32e6b6620b584b5..326429b403b484fc05a3b5a912865c7ae567e6ee 100755
--- a/Tools/PROCTools/python/UploadAMITag.py
+++ b/Tools/PROCTools/python/UploadAMITag.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 
-# 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
+
 import sys,pickle,os
 
 HIProjTag="data[0-9][0-9]_hi" # Only for Pb-Pb and p-Pb collisions (this regular expression matches with both "data11_hi" and "data11_hip")
@@ -30,20 +33,20 @@ OutputsVsStreams={
 # Ntuples
     'outputNTUP_TRIGFile': {'dstype': 'NTUP_TRIG', 'ifMatch': '(?!.*DRAW.*)(.*express.*|.*physics_MinBias.*|.*physics_HardProbes.*|.*physics_UPC.*)',
                             'HumanOutputs': 'always produced for express. Produced for MinBias, HardProbes and UPC in early hip running'},
-    'outputNTUP_MUONCALIBFile': {'dstype': 'NTUP_MUONCALIB', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*EnhancedBias.*|.*MuonswBeam.*|.*physics_Muons\..*|.*physics_L1TT.*|.*physics_L1Muon\..*|.*physics_HLTPassthrough\..*|.*physics_IDCosmic\..*)',
+    'outputNTUP_MUONCALIBFile': {'dstype': 'NTUP_MUONCALIB', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*EnhancedBias.*|.*MuonswBeam.*|.*physics_Muons\\..*|.*physics_L1TT.*|.*physics_L1Muon\\..*|.*physics_HLTPassthrough\\..*|.*physics_IDCosmic\\..*)',
                                  'HumanOutputs': 'produced for EnhancedBias, Muon, L1TT and L1Muon, IDCosmic and HLTPassthrough streams, not for HI'},
-    'outputNTUP_TRIGMUFile': {'dstype': 'NTUP_TRIGMU', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_L1Muon\..*|.*physics_IDCosmic\..*|.*physics_HLTPassthrough\..*)',
+    'outputNTUP_TRIGMUFile': {'dstype': 'NTUP_TRIGMU', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_L1Muon\\..*|.*physics_IDCosmic\\..*|.*physics_HLTPassthrough\\..*)',
                                  'HumanOutputs': 'produced for L1Muon, IDCosmic and HLTPassthrough streams, not for HI'},
     'outputNTUP_SCTFile': {'dstype': 'NTUP_SCT', 'ifMatch': cphipProjTag+'(?!.*DRAW.*)(.*express.*|.*Background.*)',
                            'HumanOutputs': 'produced for express and Background stream'},
     'outputNTUP_BKGDFile': {'dstype': 'NTUP_BKGD', 'ifMatch': '(?!.*DRAW.*)(.*Background.*)',
                             'HumanOutputs': 'produced for Background stream'},
 
-    'outputNTUP_EGAMMAFile': {'dstype': 'NTUP_EGAMMA', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*|.*physics_Muons\..*|.*physics_JetTauEtmiss.*)',
+    'outputNTUP_EGAMMAFile': {'dstype': 'NTUP_EGAMMA', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*|.*physics_Muons\\..*|.*physics_JetTauEtmiss.*)',
                                  'HumanOutputs': 'produced for Egamma, Muons and physics_JetTauEtmiss streams, not for HI'},
-    'outputNTUP_PHYSICSFile': {'dstype': 'NTUP_PHYSICS', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*|.*physics_Muons\..*|.*physics_JetTauEtmiss.*)',
+    'outputNTUP_PHYSICSFile': {'dstype': 'NTUP_PHYSICS', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*|.*physics_Muons\\..*|.*physics_JetTauEtmiss.*)',
                                  'HumanOutputs': 'produced for Egamma, Muons and physics_JetTauEtmiss streams, not for HI'},
-    'outputNTUP_SUSYFile': {'dstype': 'NTUP_SUSY', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*|.*physics_Muons\..*|.*physics_JetTauEtmiss.*)',
+    'outputNTUP_SUSYFile': {'dstype': 'NTUP_SUSY', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*|.*physics_Muons\\..*|.*physics_JetTauEtmiss.*)',
                                  'HumanOutputs': 'produced for Egamma, Muons and physics_JetTauEtmiss streams, not for HI'},
 
 # Commissioning DESDs:    
@@ -51,7 +54,7 @@ OutputsVsStreams={
                                  'HumanOutputs': 'produced for cosmics runs, for CosmicMuons and MuonswBeam streams.'},
     'outputDESD_TILECOMMFile' : {'dstype': 'DESD_TILECOMM', 'ifMatch': cmProjTag+'(?!.*DRAW.*)(.*CosmicMuons.*)',
                                  'HumanOutputs': 'produced for cosmics runs, for CosmicMuons streams.'},
-    'outputDESD_CALOCOMMFile' : {'dstype': 'DESD_CALOCOMM', 'ifMatch': cmProjTag+'(?!.*DRAW.*)(.*L1Calo\..*|.*L1CaloEM.*)',
+    'outputDESD_CALOCOMMFile' : {'dstype': 'DESD_CALOCOMM', 'ifMatch': cmProjTag+'(?!.*DRAW.*)(.*L1Calo\\..*|.*L1CaloEM.*)',
                                  'HumanOutputs': 'produced for cosmics runs, for L1Calo and L1CaloEM'},
     'outputDESD_IDCOMMFile'   : {'dstype': 'DESD_IDCOMM', 'ifMatch': cmProjTag+'(?!.*DRAW.*)(.*IDCosmic.*|.*CosmicMuons.*)',
                                  'HumanOutputs': 'produced for cosmics runs, for IDCosmic and CosmicMuons streams.'},
@@ -70,21 +73,21 @@ OutputsVsStreams={
     'outputDESD_WENUFile'   : {'dstype': 'DESD_WENU',   'ifMatch': ppProjTag+'(.*DRAW_WENU.*)','HumanOutputs': 'produced when reconstructing DRAW_WENU'},
     'outputDAOD_WENUFile'   : {'dstype': 'DAOD_WENU',   'ifMatch': ppProjTag+'(.*DRAW_WENU.*)','HumanOutputs': 'produced when reconstructing DRAW_WENU'},
     #DESD production
-    'outputDESDM_RPVLLFile': {'dstype': 'DESDM_RPVLL','ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_JetTauEtmiss.*|.*physics_Egamma.*|.*physics_Muons\..*)',
+    'outputDESDM_RPVLLFile': {'dstype': 'DESDM_RPVLL','ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_JetTauEtmiss.*|.*physics_Egamma.*|.*physics_Muons\\..*)',
                               'HumanOutputs': 'produced for collision runs, for physics_JetTauEtMiss, physics_Egamma and physics_Muons streams.'},
     'outputDESDM_EGAMMAFile': {'dstype': 'DESDM_EGAMMA','ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*)', 'HumanOutputs': 'produced for collision runs, for physics_Egamma streams.'},
     'outputDESD_CALJETFile': {'dstype': 'DESD_CALJET',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_JetTauEtmiss.*)', 'HumanOutputs': 'produced for collision runs, for the physics_JetTauEtMiss stream.'},
     'outputDESDM_TRACKFile' : {'dstype': 'DESDM_TRACK', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_JetTauEtmiss.*)', 'HumanOutputs': 'produced for collision runs, for the physics_JetTauEtMiss stream.'},
     'outputDESD_SGLELFile'  : {'dstype': 'DESD_SGLEL',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*)', 'HumanOutputs': 'produced for collision runs, for the physics_Egamma stream.'},
-    'outputDESD_SGLMUFile'  : {'dstype': 'DESD_SGLMU',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Muons\..*)', 'HumanOutputs': 'produced for collision runs, for the physics_Muons streams.'},
+    'outputDESD_SGLMUFile'  : {'dstype': 'DESD_SGLMU',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Muons\\..*)', 'HumanOutputs': 'produced for collision runs, for the physics_Muons streams.'},
     #'outputDESDM_METFile'    : {'dstype': 'DESDM_MET',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_JetTauEtmiss.*)', 'HumanOutputs': 'produced for collision runs, for physics_JetETMiss stream'},
     'outputDESD_PHOJETFile' : {'dstype': 'DESD_PHOJET', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma.*)', 'HumanOutputs': 'produced for collision runs, for the physics_Egamma stream.'},
     'outputDESD_MBIASFile'  : {'dstype': 'DESD_MBIAS',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_MinBias.*)', 'HumanOutputs': 'produced for collision runs, for the physics_MinBias stream.'},
     #RAW skims 
-   'outputDRAW_ZMUMUFile'  : {'dstype': 'DRAW_ZMUMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Muons\..*)','HumanOutputs': 'produced for collision runs, for the physics_Muons stream.'},
-   'outputDRAW_ZEEFile'    : {'dstype': 'DRAW_ZEE',   'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma\..*)','HumanOutputs': 'produced for collision runs, for the physics_Egamma stream.'}, 
-   'outputDRAW_WMUNUFile'  : {'dstype': 'DRAW_WMUNU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Muons\..*)','HumanOutputs': 'produced for collision runs, for the physics_Muons stream.'},
-   'outputDRAW_WENUFile'   : {'dstype': 'DRAW_WENU',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma\..*)','HumanOutputs': 'produced for collision runs, for the physics_Egamma stream.'},
+   'outputDRAW_ZMUMUFile'  : {'dstype': 'DRAW_ZMUMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Muons\\..*)','HumanOutputs': 'produced for collision runs, for the physics_Muons stream.'},
+   'outputDRAW_ZEEFile'    : {'dstype': 'DRAW_ZEE',   'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma\\..*)','HumanOutputs': 'produced for collision runs, for the physics_Egamma stream.'}, 
+   'outputDRAW_WMUNUFile'  : {'dstype': 'DRAW_WMUNU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Muons\\..*)','HumanOutputs': 'produced for collision runs, for the physics_Muons stream.'},
+   'outputDRAW_WENUFile'   : {'dstype': 'DRAW_WENU',  'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Egamma\\..*)','HumanOutputs': 'produced for collision runs, for the physics_Egamma stream.'},
    
 
     #Special heavy ion outputs:
@@ -102,9 +105,9 @@ OutputsVsStreams={
 #Print for debugging...
 ## for outputKey in OutputsVsStreams.keys():
 ##     try:
-##         print outputKey,":",OutputsVsStreams[outputKey]['ifMatch']
+##         print (outputKey,":",OutputsVsStreams[outputKey]['ifMatch'])
 ##     except:
-##         print outputKey,": always produced"
+##         print (outputKey,": always produced")
 
 
 
@@ -112,8 +115,8 @@ OutputsVsStreams={
 def GetProcessConfigs(release,patcharea):
     rel=str(release)
     pa=str(patcharea)
-    #print "Got release",release
-    #print "Got Patch area",pa
+    #print ("Got release",release)
+    #print ("Got Patch area",pa)
     processConfigs = {}
 
     # HIST merging
@@ -196,17 +199,17 @@ def GetProcessConfigs(release,patcharea):
 
 if __name__ == '__main__':
     if len(sys.argv)<7 or len(sys.argv)>9:
-        print "##############"
-        print "Application to create or update AMI tags (for manager only)\n"
-        print "Usage:"
-        print "UploadAMITag.py <login> <password> inputDictionary.pickle create_AMITag <release> <description> [patcharea] [updateConditionsTag]"
-        print "or"
-        print "UploadAMITag.py <login> <password> inputDictionary.pickle update_AMITag <release> <description> [patcharea] [updateConditionsTag]"
-        print "\nTo create inputDictionary.pickle, execute:"
-        print "Reco_trf.py"
-        print "or"
-        print "CmdToPickledDic.py <command>"
-        print "##############"
+        print ("##############")
+        print ("Application to create or update AMI tags (for manager only)\n")
+        print ("Usage:")
+        print ("UploadAMITag.py <login> <password> inputDictionary.pickle create_AMITag <release> <description> [patcharea] [updateConditionsTag]")
+        print ("or")
+        print ("UploadAMITag.py <login> <password> inputDictionary.pickle update_AMITag <release> <description> [patcharea] [updateConditionsTag]")
+        print ("\nTo create inputDictionary.pickle, execute:")
+        print ("Reco_trf.py")
+        print ("or")
+        print ("CmdToPickledDic.py <command>")
+        print ("##############")
         sys.exit(0)
 
 
@@ -220,9 +223,9 @@ if __name__ == '__main__':
     if len(sys.argv)>7:
         patcharea=str(sys.argv[7])
         if not os.access(patcharea,os.R_OK):
-            print "WARNING Can't access patch area at",patcharea
+            print ("WARNING Can't access patch area at",patcharea)
         if not patcharea.startswith("/afs/cern.ch/"):
-            print "WARNING Patch area does not start with /afs/cern.ch/ ???"
+            print ("WARNING Patch area does not start with /afs/cern.ch/ ???")
         if len(sys.argv)>8:    
             try:
                 updateConditionsTag = int(sys.argv[8])
@@ -247,7 +250,7 @@ if __name__ == '__main__':
     if amiTag.startswith("f") or amiTag.startswith("v"):
         specialT0Setup=specialT0Setup_Frontier
         if amiTag.startswith("v"):
-            print "INFO: This v-tag is being created with specialT0Setup =",specialT0Setup
+            print ("INFO: This v-tag is being created with specialT0Setup =",specialT0Setup)
 
     process=None
     if inPickleFile.endswith('.pickle'): process='reco'
@@ -267,7 +270,7 @@ if __name__ == '__main__':
     #Check if release exists
     relSp=release.split("-")
     if len(relSp)!=2:
-        s="ERROR: Expected parameter 'release' in the form Project-number, got "+releases
+        s="ERROR: Expected parameter 'release' in the form Project-number, got "+release
         raise RuntimeError(s)
     relProj=relSp[0]
     relNbr=relSp[1]
@@ -279,20 +282,20 @@ if __name__ == '__main__':
             s="ERROR Release directory " + relPath + " does not exists"
             #raise RuntimeError(s)
         #else:
-        #    print "Found",relPath
+        #    print ("Found",relPath)
     #Release exists in both releases and builds area if we reach this point
 
     # Forcing histmerge to be in 64 bits
     if process=='histmerge':
         release=release+",64"
-        print "INFO: Enforcing histmerge tag to be in 64 bits"
+        print ("INFO: Enforcing histmerge tag to be in 64 bits")
         
 
     processConfigs=GetProcessConfigs(release,patcharea)
     humanReadableOutputs=""
 
     if process=='reco':
-        f = open(inPickleFile, 'r')
+        f = open(inPickleFile, 'rb')
         startingDic = pickle.load(f)
         f.close()
 
@@ -320,48 +323,48 @@ if __name__ == '__main__':
         from PATJobTransforms.Configuration import ConfigDic
         didConditionsUpdate=False
         for key in startingDic.keys():
-            if ConfigDic.has_key(key) and hasattr(ConfigDic[key],"isInput"):
+            if key in ConfigDic and hasattr(ConfigDic[key],"isInput"):
                 inputDic[key]={}
-            elif ConfigDic.has_key(key) and hasattr(ConfigDic[key],"isOutput") and (key!="tmpESD" and key!="tmpAOD"):
+            elif key in ConfigDic and hasattr(ConfigDic[key],"isOutput") and (key!="tmpESD" and key!="tmpAOD"):
                 try:
-                    #print "key: " , key , " isOutput"
+                    #print ("key: " , key , " isOutput")
                     outputDic[key]=OutputsVsStreams[key]
                 except:
-                    print "Known outputs defined in the OutputsVsStreams dictionnary are:"
-                    print OutputsVsStreams
+                    print ("Known outputs defined in the OutputsVsStreams dictionnary are:")
+                    print (OutputsVsStreams)
                     raise RuntimeError("Don't know what to do with out key %s, please add it to OutputsVsStreams to use it"%key)
             elif key=='autoConfiguration' and updateConditionsTag and 'Conditions' in currentConditionsTag: # legacy: used for autoconfiguration of conditions like COMCOND-ES1P*-005-04
                 if(startingDic[key].find(currentConditionsTag)>=0):
-                    print '*** autoConfiguration: %s (CURRENT) is already specified ***' % (currentConditionsTag)
+                    print ('*** autoConfiguration: %s (CURRENT) is already specified ***' % (currentConditionsTag))
                 elif(startingDic[key].find('ConditionsTag')>=0): # ConditionsTag is already defined.
                     autoConfs = startingDic[key].split(',')
                     for i in range(len(autoConfs)):
                         if(autoConfs[i][0:13]=='ConditionsTag'):
-                            print '*** autoConfiguration: %s is replaced by %s (CURRENT) ***' % (autoConfs[i], currentConditionsTag)
+                            print ('*** autoConfiguration: %s is replaced by %s (CURRENT) ***' % (autoConfs[i], currentConditionsTag))
                             autoConfs[i] = currentConditionsTag
                         if(i==0): startingDic[key] = autoConfs[i]
                         else: startingDic[key] += ','+autoConfs[i]
                 else: # ConditionsTag is not yet defined.
-                    print '*** autoConfiguration: %s (CURRENT) is appended ***' % (currentConditionsTag)
+                    print ('*** autoConfiguration: %s (CURRENT) is appended ***' % (currentConditionsTag))
                     startingDic[key] += ','+currentConditionsTag
                 configDic[key]=startingDic[key]
                 didConditionsUpdate=True
 
             elif key=='conditionsTag' and updateConditionsTag:
                 if(startingDic[key].find(currentConditionsTag)>=0):
-                    print '*** conditionsTag: %s (CURRENT) is already specified ***' % (currentConditionsTag)
+                    print ('*** conditionsTag: %s (CURRENT) is already specified ***' % (currentConditionsTag))
                 else:
-                    print '*** conditionsTag: %s is replaced by %s (CURRENT) ***' % (startingDic[key], currentConditionsTag)
+                    print ('*** conditionsTag: %s is replaced by %s (CURRENT) ***' % (startingDic[key], currentConditionsTag))
                     startingDic[key]=currentConditionsTag
                 configDic[key]=startingDic[key]
                 didConditionsUpdate=True
             else:
                 configDic[key]=startingDic[key]
-                #print "key: " , key , " is neiter input nor output..."
+                #print ("key: " , key , " is neiter input nor output...")
 
         if updateConditionsTag and not didConditionsUpdate:
             # update conditions
-            print '*** conditionsTag: %s (CURRENT) is appended ***' % (currentConditionsTag)
+            print ('*** conditionsTag: %s (CURRENT) is appended ***' % (currentConditionsTag))
             configDic['conditionsTag']=currentConditionsTag
     
         #Special treatment for maxEvents and AMITag, in configDic
@@ -398,13 +401,13 @@ if __name__ == '__main__':
 #    try:
 #        from pyAMI.pyAMI import AMI
 #    except ImportError:
-#        print "WARNING unable to import AMI from pyAMI with standard $PYTHONPATH."
-#        print "Will manually add ZSI and 4suite, then try again..."
+#        print ("WARNING unable to import AMI from pyAMI with standard $PYTHONPATH.")
+#        print ("Will manually add ZSI and 4suite, then try again...")
 #        import sys
 #        sys.path.insert(0,'/afs/cern.ch/atlas/offline/external/ZSI/2.1-a1/lib/python')
 #        sys.path.insert(0,'/afs/cern.ch/sw/lcg/external/4suite/1.0.2_python2.5/slc4_ia32_gcc34/lib/python2.5/site-packages')
 #        from pyAMI.pyAMI import AMI
-#    print "import pyAMI was succesful"
+#    print ("import pyAMI was succesful")
 #    amiclient=AMI(False)
 
 #    import setup_pyAMI
@@ -412,8 +415,8 @@ if __name__ == '__main__':
     try:
         from pyAMI.client import AMIClient
     except ImportError:
-        print "WARNING unable to import AMIClient from pyAMI"
-    print "import pyAMI4 was successful"    
+        print ("WARNING unable to import AMIClient from pyAMI")
+    print ("import pyAMI4 was successful"    )
     amiclient=AMIClient(False)
 
     #------------------------
@@ -438,7 +441,7 @@ if __name__ == '__main__':
         if not amiTag.startswith("x"):
             c['ConditionsTag']='Auto-config. See dataset info.'
 
-    #print c['Human-readable outputs']
+    #print (c['Human-readable outputs'])
 
     
     #Upload info to AMI
@@ -449,12 +452,12 @@ if __name__ == '__main__':
         for k in c.keys():
             l.append(k+'='+c[k])
 
-        #print "command is: "
-        #print "l=",l
+        #print ("command is: ")
+        #print ("l=",l)
         result=amiclient.execute(l)
-        print "\n\n###############################################"
-        print "#  Succesfully created new tag %s !!   :-)  #"%amiTag
-        print "###############################################\n\n"        
+        print ("\n\n###############################################")
+        print ("#  Succesfully created new tag %s !!   :-)  #"%amiTag)
+        print ("###############################################\n\n"        )
 
 
     elif doWhat=="update":
@@ -482,17 +485,17 @@ if __name__ == '__main__':
             if n<nKeys: tmp+=s
         l.append(tmp)
         
-        #print "l=",l
+        #print ("l=",l)
         result=amiclient.execute(l)
-        print "\n\n#####################################################"
-        print "#  Succesfully updated existing tag %s !!!   :-)  #"%amiTag
-        print "#####################################################\n\n"        
+        print ("\n\n#####################################################")
+        print ("#  Succesfully updated existing tag %s !!!   :-)  #"%amiTag)
+        print ("#####################################################\n\n"        )
 
     else:
         raise SyntaxError("Don't know what to do... amiTagTmp='%s'  doWhat='%s'"%(amiTagTmp,doWhat))
             
-    print "To see the corresponding command, do:"
-    print "GetCommand.py AMI=%s \n"%amiTag
-    print "or go to:"
-    print "http://ami.in2p3.fr/AMI/servlet/net.hep.atlas.Database.Bookkeeping.AMI.Servlet.Command?linkId=501"
-    print "\n"
+    print ("To see the corresponding command, do:")
+    print ("GetCommand.py AMI=%s \n"%amiTag)
+    print ("or go to:")
+    print ("http://ami.in2p3.fr/AMI/servlet/net.hep.atlas.Database.Bookkeeping.AMI.Servlet.Command?linkId=501")
+    print ("\n")
diff --git a/Tools/PROCTools/python/UploadTfAMITag.py b/Tools/PROCTools/python/UploadTfAMITag.py
index ef947eab0016cab974ecc116929f64bc72ba2edc..87306fc4b99db51a5058c2b438c688fdf36ace8d 100755
--- a/Tools/PROCTools/python/UploadTfAMITag.py
+++ b/Tools/PROCTools/python/UploadTfAMITag.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 
-# 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
+
 import sys,pickle,os
 
 ##############################################################
@@ -38,13 +41,13 @@ OutputsVsStreams = {
     #'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)(?!.*IDCosmic.*)', 'HumanOutputs': 'always produced, except for DRAW input and IDCosmic'},
     #'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)', 'HumanOutputs': 'always produced, except for DRAW'},
     #'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)(?!.*physics_Main.*)', 'HumanOutputs': 'always produced, except for DRAW input and physics_Main'},
-    'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)(?!.(.*physics_Main\..*|.*Background.*|.*L1Topo.*))', 'HumanOutputs': 'always produced, except for DRAW input and physics_Main'},
+    'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)(?!.(.*physics_Main\\..*|.*Background.*|.*L1Topo.*))', 'HumanOutputs': 'always produced, except for DRAW input and physics_Main'},
     'outputAODFile': {'dstype': '!replace RAW AOD', 'ifMatch': cphiProjTag+'(?!.*DRAW_RPVLL.*)(?!.*Background.*)', 'HumanOutputs': 'always produced except for DRAW_RPVLL.'},
-    'outputTAGFile': {'dstype': 'TAG', 'ifMatch': 'data[0-9][0-9]_(cos|1beam|.*eV|comm)(.*express_express\..*)(?!.(.*DRAW.*))', 'HumanOutputs': 'Produced in express stream'},
+    'outputTAGFile': {'dstype': 'TAG', 'ifMatch': 'data[0-9][0-9]_(cos|1beam|.*eV|comm)(.*express_express\\..*)(?!.(.*DRAW.*))', 'HumanOutputs': 'Produced in express stream'},
     'outputHISTFile': {'dstype': 'HIST', 'ifMatch': '(?!.(.*DRAW.*|.*debugrec.*))', 'HumanOutputs': 'always produced except for DRAW and debugrec'},  # note was disabled for Pb-Pb HardProbes
     'outputRDOFile': {'dstype': 'RDO', 'ifMatch': cphiProjTag, 'HumanOutputs': 'always produced.'},
 # NTuples
-#    'outputNTUP_MUONCALIBFile': {'dstype': 'NTUP_MUONCALIB', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_IDCosmic\..*|.*physics_CosmicMuons\..*)',
+#    'outputNTUP_MUONCALIBFile': {'dstype': 'NTUP_MUONCALIB', 'ifMatch': cpProjTag+'(?!.*DRAW.*)(.*physics_IDCosmic\\..*|.*physics_CosmicMuons\\..*)',
 #                                 'HumanOutputs': 'produced for IDCosmic and CosmicMuons streams'},
 
 ### put it to all streams for M10 tags
@@ -52,50 +55,50 @@ OutputsVsStreams = {
 #                                 'HumanOutputs': 'always produced except for DRAW'},
 
 # DRAW production 
-   'outputDRAW_ZMUMUFile': {'dstype': 'DRAW_ZMUMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+   'outputDRAW_ZMUMUFile': {'dstype': 'DRAW_ZMUMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                               'HumanOutputs': 'produced for collision runs, for the physics_Main stream.'},
-   'outputDRAW_TAUMUHFile' : {'dstype': 'DRAW_TAUMUH', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+   'outputDRAW_TAUMUHFile' : {'dstype': 'DRAW_TAUMUH', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                              'HumanOutputs': 'produced for collision runs, for the physics_Main stream.'},
     ### These don't work in 20.1.5.4, code updates from Paul coming soon
     ### Added three new outputs in 20.1.5.5 - DRAW_EGZ, DRAW_EGJPSI, DRAW_EMU
-   'outputDRAW_EGZFile'  : {'dstype': 'DRAW_EGZ', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+   'outputDRAW_EGZFile'  : {'dstype': 'DRAW_EGZ', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                             'HumanOutputs': 'produced for collision runs, for the physics_Main stream.'},
-   #'outputDRAW_EGJPSIFile'  : {'dstype': 'DRAW_EGJPSI', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+   #'outputDRAW_EGJPSIFile'  : {'dstype': 'DRAW_EGJPSI', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
    #                         'HumanOutputs': 'produced for collision runs, for the physics_Main stream.'},
-    'outputDRAW_EMUFile'  : {'dstype': 'DRAW_EMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+    'outputDRAW_EMUFile'  : {'dstype': 'DRAW_EMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                              'HumanOutputs': 'produced for collision runs, for the physics_Main stream.'},
 
-    'outputDRAW_RPVLLFile'  : {'dstype': 'DRAW_RPVLL', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+    'outputDRAW_RPVLLFile'  : {'dstype': 'DRAW_RPVLL', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                                'HumanOutputs': 'produced for collision runs, for the physics_Main stream.'},
 
-    'outputDRAW_BCID1File'  : {'dstype': 'DRAW_BCID1', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*|.*physics_EnhancedBias\..*)',
+    'outputDRAW_BCID1File'  : {'dstype': 'DRAW_BCID1', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*|.*physics_EnhancedBias\\..*)',
                              'HumanOutputs': 'produced for collision runs, for the physics_Main & EnhancedBias stream.'},
-    'outputDRAW_BCID2File'  : {'dstype': 'DRAW_BCID2', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*|.*physics_EnhancedBias\..*)',
+    'outputDRAW_BCID2File'  : {'dstype': 'DRAW_BCID2', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*|.*physics_EnhancedBias\\..*)',
                              'HumanOutputs': 'produced for collision runs, for the physics_Main & EnhancedBias stream.'},
 
-    'outputDRAW_TOPSLMUFile'  : {'dstype': 'DRAW_TOPSLMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+    'outputDRAW_TOPSLMUFile'  : {'dstype': 'DRAW_TOPSLMU', 'ifMatch': ppProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                              'HumanOutputs': 'produced for collision runs, for the physics_Main.'},
 
 # Special reconstruction outputs for DRAW
-#    'outputDESDM_MSPerfFile'  : {'dstype': '!replace RAW DESDM_MCP DDESDM_MCP_ZMUMU DESDM_ZMCP', 'ifMatch': pcProjTag+'(.*physics_Main\..*|.*CosmicMuons.*)(.*\.RAW\.*|.*DRAW_ZMUMU.*)',
+#    'outputDESDM_MSPerfFile'  : {'dstype': '!replace RAW DESDM_MCP DDESDM_MCP_ZMUMU DESDM_ZMCP', 'ifMatch': pcProjTag+'(.*physics_Main\\..*|.*CosmicMuons.*)(.*\\.RAW\\.*|.*DRAW_ZMUMU.*)',
 #                                 'HumanOutputs': 'produced when reconstructing DRAW_ZMUMU'},
 #    'outputDESDM_MSPerfFile'  : {'dstype': 'DESDM_ZMCP', 'ifMatch': pcProjTag+'(.*DRAW_ZMUMU.*)', 
 #                                 'HumanOutputs': 'produced when reconstructing DRAW_ZMUMU'},
     'outputDESDM_ALLCELLSFile': {'dstype': '!replace RAW ESDM', 'ifMatch': pcProjTag+'(?!.*DRAW_TAUMUH.*)(.*DRAW.*)', 
                                  'HumanOutputs': 'produced when reconstructing all DRAW formats'},
-    'outputDESDM_EOVERPFile'  : {'dstype': 'DESDM_EOVERP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_MinBias\..*)',
+    'outputDESDM_EOVERPFile'  : {'dstype': 'DESDM_EOVERP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_MinBias\\..*)',
                                  'HumanOutputs': 'produced when reconstructing RAW from MinBias'},
 
-#    'outputDESDM_MSPerfFile'  : {'dstype': 'DESDM_MCP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\..*|.*CosmicMuons.*)',
+#    'outputDESDM_MSPerfFile'  : {'dstype': 'DESDM_MCP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*|.*CosmicMuons.*)',
 #                                 'HumanOutputs': 'produced when reconstructing RAW'},
-    'outputDESDM_MCPFile'  : {'dstype': 'DESDM_MCP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\..*|.*CosmicMuons.*)',
+    'outputDESDM_MCPFile'  : {'dstype': 'DESDM_MCP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*|.*CosmicMuons.*)',
                                  'HumanOutputs': 'produced when reconstructing RAW'},
 
-    'outputDESDM_EXOTHIPFile'  : {'dstype': 'DESDM_EXOTHIP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\..*)',
+    'outputDESDM_EXOTHIPFile'  : {'dstype': 'DESDM_EXOTHIP', 'ifMatch': pcProjTag+'(?!.*DRAW.*)(.*physics_Main\\..*)',
                                  'HumanOutputs': 'produced when reconstructing RAW'},
 
-#    'outputDESDM_IDALIGNFile' : {'dstype': '!replace RAW ESDM', 'ifMatch': pcProjTag+'(.*\.DRAW_EGZ\.*|.*DRAW_ZMUMU.*)(.*physics_Main.*)',
-    'outputDESDM_IDALIGNFile' : {'dstype': '!replace RAW ESDM', 'ifMatch': pcProjTag+'(.*physics_Main.*)(.*\.DRAW_EGZ\.*|.*DRAW_ZMUMU.*)',
+#    'outputDESDM_IDALIGNFile' : {'dstype': '!replace RAW ESDM', 'ifMatch': pcProjTag+'(.*\\.DRAW_EGZ\\.*|.*DRAW_ZMUMU.*)(.*physics_Main.*)',
+    'outputDESDM_IDALIGNFile' : {'dstype': '!replace RAW ESDM', 'ifMatch': pcProjTag+'(.*physics_Main.*)(.*\\.DRAW_EGZ\\.*|.*DRAW_ZMUMU.*)',
                                  'HumanOutputs': 'produced when reconstructing DRAW_EGZ and DRAW_ZMUMU formats'},
 
 # DESDs made from full ESD files
@@ -146,15 +149,15 @@ OutputsVsStreams = {
 #Print for debugging...
 ## for outputKey in OutputsVsStreams.keys():
 ##     try:
-##         print outputKey,":",OutputsVsStreams[outputKey]['ifMatch']
+##         print (outputKey,":",OutputsVsStreams[outputKey]['ifMatch'])
 ##     except:
-##         print outputKey,": always produced"
+##         print (outputKey,": always produced")
 
 #-------------------------------------------------------------------------------------
 def GetProcessConfigs(release):
     rel = str(release)
-    #print "Got release",release
-    #print "Got Patch area",pa
+    #print ("Got release",release)
+    #print ("Got Patch area",pa)
     processConfigs = {}
 
     # HIST merging
@@ -247,20 +250,20 @@ def GetProcessConfigs(release):
 
 if __name__ == '__main__':
     if len(sys.argv) < 5 or len(sys.argv) > 8:
-        print "##############"
-        print "Application to create or update AMI tags (for manager only)\n"
-        print "Usage:"
-        print "UploadAMITag.py inputDictionary.pickle create_AMITag <release number> <description> [updateConditionsTag] [coolsource] [project] [patcharea]"
-        print "\nTo create inputDictionary.pickle, execute:"
-        print "Reco_tf.py --dumpPickle inputDictionary.pickle ..."
-        print "or"
-        print "CmdToPickledDic.py <command>"
-        print "\nMake sure you have stored your pyAMI credentials encrypted in ~/.pyami, if not, please do:"
-        print "\n setupATLAS"
-        print " localSetupPyAMI"
-        print " ami auth"
-        print "\n and enter your AMI username and password"
-        print "##############"
+        print ("##############")
+        print ("Application to create or update AMI tags (for manager only)\n")
+        print ("Usage:")
+        print ("UploadAMITag.py inputDictionary.pickle create_AMITag <release number> <description> [updateConditionsTag] [coolsource] [project] [patcharea]")
+        print ("\nTo create inputDictionary.pickle, execute:")
+        print ("Reco_tf.py --dumpPickle inputDictionary.pickle ...")
+        print ("or")
+        print ("CmdToPickledDic.py <command>")
+        print ("\nMake sure you have stored your pyAMI credentials encrypted in ~/.pyami, if not, please do:")
+        print ("\n setupATLAS")
+        print (" localSetupPyAMI")
+        print (" ami auth")
+        print ("\n and enter your AMI username and password")
+        print ("##############")
         sys.exit(0)
 
 
@@ -274,7 +277,7 @@ if __name__ == '__main__':
     project    = ""
     patchArea  = ""
     if len(sys.argv)>5:
-        print sys.argv
+        print (sys.argv)
         ### Update conditions
         try:
             updateConditionsTag = int(sys.argv[5])
@@ -285,17 +288,17 @@ if __name__ == '__main__':
         try:
             coolSource = sys.argv[6]
         except:
-            print "INFO: No coolSource specified -- this defaults to fronTier"
+            print ("INFO: No coolSource specified -- this defaults to fronTier")
         ### Release project
         try:
             project = sys.argv[7]
         except:
-            print "INFO: No project specified -- this defaults to Athena"
+            print ("INFO: No project specified -- this defaults to Athena")
         ### Patch Area
         try:
             patchArea = sys.argv[8]
         except:
-            print "INFO: No patch area specified -- this defaults to the default set by Tier0"
+            print ("INFO: No patch area specified -- this defaults to the default set by Tier0")
 
     doWhat="Dunno"
     amiTag=''
@@ -340,13 +343,13 @@ if __name__ == '__main__':
         s="ERROR Release directory " + relPath + " does not exists"
         #raise RuntimeError(s)
     else:
-        print "INFO: Found",relPath
+        print ("INFO: Found",relPath)
 
     processConfigs=GetProcessConfigs(release_number)
     humanReadableOutputs=""
 
     if process=='reco':
-        f = open(inPickleFile, 'r')
+        f = open(inPickleFile, 'rb')
         startingDic = pickle.load(f)
         f.close()
 
@@ -372,7 +375,7 @@ if __name__ == '__main__':
         outputDic={}
         configDic={}
 
-        print startingDic
+        print (startingDic)
 
         didConditionsUpdate = False
         for key in startingDic.keys():
@@ -381,48 +384,48 @@ if __name__ == '__main__':
                     inputDic[key]=startingDic[key]
                 else:
                     inputDic[key]={}
-                #print "inputDic[%s] = %s" % (key, inputDic[key])
+                #print ("inputDic[%s] = %s" % (key, inputDic[key]))
 
             elif key.startswith("output"):
                 try:
-                    #print "key: " , key , " isOutput"
+                    #print ("key: " , key , " isOutput")
                     outputDic[key]=OutputsVsStreams[key]
                 except:
-                    print "Known outputs defined in the OutputsVsStreams dictionary are:"
-                    print OutputsVsStreams
+                    print ("Known outputs defined in the OutputsVsStreams dictionary are:")
+                    print (OutputsVsStreams)
                     raise RuntimeError("Don't know what to do with out key %s, please add it to OutputsVsStreams to use it"%key)
             elif key=='autoConfiguration' and updateConditionsTag and 'Conditions' in currentConditionsTag: # legacy: used for autoconfiguration of conditions like COMCOND-ES1P*-005-04
                 if(startingDic[key].find(currentConditionsTag)>=0):
-                    print '*** autoConfiguration: %s (CURRENT) is already specified ***' % (currentConditionsTag)
+                    print ('*** autoConfiguration: %s (CURRENT) is already specified ***' % (currentConditionsTag))
                 elif(startingDic[key].find('ConditionsTag')>=0): # ConditionsTag is already defined.
                     autoConfs = startingDic[key].split(',')
                     for i in range(len(autoConfs)):
                         if(autoConfs[i][0:13]=='ConditionsTag'):
-                            print '*** autoConfiguration: %s is replaced by %s (CURRENT) ***' % (autoConfs[i], currentConditionsTag)
+                            print ('*** autoConfiguration: %s is replaced by %s (CURRENT) ***' % (autoConfs[i], currentConditionsTag))
                             autoConfs[i] = currentConditionsTag
                         if(i==0): startingDic[key] = autoConfs[i]
                         else: startingDic[key] += ','+autoConfs[i]
                 else: # ConditionsTag is not yet defined.
-                    print '*** autoConfiguration: %s (CURRENT) is appended ***' % (currentConditionsTag)
+                    print ('*** autoConfiguration: %s (CURRENT) is appended ***' % (currentConditionsTag))
                     startingDic[key] += ','+currentConditionsTag
                 configDic[key]=startingDic[key]
                 didConditionsUpdate=True
 
             elif key=='conditionsTag' and updateConditionsTag:
                 if(startingDic[key].find(currentConditionsTag)>=0):
-                    print '*** conditionsTag: %s (CURRENT) is already specified ***' % (currentConditionsTag)
+                    print ('*** conditionsTag: %s (CURRENT) is already specified ***' % (currentConditionsTag))
                 else:
-                    print '*** conditionsTag: %s is replaced by %s (CURRENT) ***' % (startingDic[key], currentConditionsTag)
+                    print ('*** conditionsTag: %s is replaced by %s (CURRENT) ***' % (startingDic[key], currentConditionsTag))
                     startingDic[key]=currentConditionsTag
                 configDic[key]=startingDic[key]
                 didConditionsUpdate=True
             else:
                 configDic[key]=startingDic[key]
-                #print "key: " , key , " is neiter input nor output..."
+                #print ("key: " , key , " is neiter input nor output...")
 
         if updateConditionsTag and not didConditionsUpdate:
             # update conditions
-            print '*** conditionsTag: %s (CURRENT) is appended ***' % (currentConditionsTag)
+            print ('*** conditionsTag: %s (CURRENT) is appended ***' % (currentConditionsTag))
             configDic['conditionsTag']=currentConditionsTag
     
         #Special treatment for maxEvents and AMITag, in configDic
@@ -463,7 +466,7 @@ if __name__ == '__main__':
     try:
         import pyAMI.client
     except ImportError:
-        print "WARNING unable to import pyAMI.client"
+        print ("WARNING unable to import pyAMI.client")
     amiclient=pyAMI.client.Client('atlas')
 
     #------------------------
@@ -490,7 +493,7 @@ if __name__ == '__main__':
         c['ConditionsTag']=configDic['conditionsTag']['all']
         #c['ConditionsTag']='Auto-config. See dataset info.'
 
-    #print c['Human-readable outputs']
+    #print (c['Human-readable outputs'])
 
     
     #Upload info to AMI
@@ -503,10 +506,10 @@ if __name__ == '__main__':
         for k in c.keys():
             l.append(k+'="'+c[k].replace('"','\\"')+'"')
 
-        print "\nThis is the command that will be sent to AMI:\n"
-        print "l=",l
+        print ("\nThis is the command that will be sent to AMI:\n")
+        print ("l=",l)
         result=amiclient.execute(l,format='text')
-        print "\nHere's what AMI replied:\n\n%s" % result
+        print ("\nHere's what AMI replied:\n\n%s" % result)
 
     elif doWhat=="update":
         s['amiTag']=amiTag
@@ -521,14 +524,14 @@ if __name__ == '__main__':
                 continue
             l.append(k+'="'+c[k].replace('"','\\"')+'"')
             
-        print "\nThis is the command that will be sent to AMI:\n"
-        print "l=",l
+        print ("\nThis is the command that will be sent to AMI:\n")
+        print ("l=",l)
         result=amiclient.execute(l)
-        print "\nHere's what AMI replied:\n\n%s" % result
+        print ("\nHere's what AMI replied:\n\n%s" % result)
 
     else:
         raise SyntaxError("Don't know what to do... amiTagTmp='%s'  doWhat='%s'"%(amiTagTmp,doWhat))
 
-    print "\nTo see the corresponding command, go to:\n"
-    print "https://ami.in2p3.fr/AMI/servlet/net.hep.atlas.Database.Bookkeeping.AMI.Servlet.Command?linkId=10226"
-    print "\n"
+    print ("\nTo see the corresponding command, go to:\n")
+    print ("https://ami.in2p3.fr/AMI/servlet/net.hep.atlas.Database.Bookkeeping.AMI.Servlet.Command?linkId=10226")
+    print ("\n")
diff --git a/Tools/PROCTools/python/checkUPD1.py b/Tools/PROCTools/python/checkUPD1.py
index a4aac25978162ce3521f3b6be33b64903e4aa101..daa49e1f830c00a79f26ae1800d5beb24096679b 100755
--- a/Tools/PROCTools/python/checkUPD1.py
+++ b/Tools/PROCTools/python/checkUPD1.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #COOLOFL_INDET /Indet/Align InDetAlign-RUN2-BLK-UPD4-13 
 #logging.debug( "%s, %s, %s, %s" %(pcaltag.tag,pcaltag.folder,pcaltag.schema,pcaltag.status) )
 #pcaltag.tag COOLOFL_INDET
@@ -8,6 +8,8 @@
 #pcaltag.schema InDetAlign-RUN2-BLK-UPD4-13 
 #pcaltag.status 1
 
+from __future__ import print_function
+
 import time
 from PyCool import cool
 from collections import OrderedDict
@@ -33,9 +35,9 @@ def getDBNumberFromUPD4(run, tag, foldername, connstr):
       payload = obj.payload()
       payload_string =  "%s" %( payload )
       DB_number =  payload_string.split()[-1].split("]")[0].split("[")[1] 
-      #print "since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']',
-      #print "payload  : %s" %(DB_number)
-      #print 
+      #print ("since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']',)
+      #print ("payload  : %s" %(DB_number))
+      #print ()
    return DB_number
 
 def getRunNumberFromUPD1(DB_number, tag, run, foldername, connstr):
@@ -54,15 +56,15 @@ def getRunNumberFromUPD1(DB_number, tag, run, foldername, connstr):
                               cool.ValidityKeyMax,
                               cool.ChannelSelection.all(),
                               tag)
-   print "ref", DB_number
+   print ("ref", DB_number)
    for obj in objs:
       payload = obj.payload()
       payload_string =  "%s" %( payload )
       test_number =  payload_string.split()[-1].split("]")[0].split("[")[1] 
-      #print test_number
+      #print (test_number)
       run_string = obj.since() >> 32,',',obj.since()%0x100000000
-      #print "since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']',
-      #print "payload  : %s" %(test_number)
+      #print ("since [r,l]: [", obj.since() >> 32,',',obj.since()%0x100000000,']', end='')
+      #print ("payload  : %s" %(test_number))
       if test_number == DB_number:
          return run_string 
    return 0
@@ -93,13 +95,13 @@ connstr = 'COOLOFL_INDET/CONDBR2'
 
 if foldername == '/TRT/Align':
    connstr = 'COOLOFL_TRT/CONDBR2'
-#print connstr
-#print foldername
+#print (connstr)
+#print (foldername)
 
 DB_number = getDBNumberFromUPD4(run, upd4_tag, foldername, connstr)
 run = getRunNumberFromUPD1(DB_number, upd1_tag, run,  foldername, connstr)
 if run:
-   print "first run in UPD1 tag with matching UPD4 conditions is run %i"  %(run[0])
+   print ("first run in UPD1 tag with matching UPD4 conditions is run %i"  %(run[0]))
 else:
-   print "no matching conditions found in UPD1 tag!!!"
+   print ("no matching conditions found in UPD1 tag!!!")
 
diff --git a/Tools/PROCTools/python/compareNtuple.py b/Tools/PROCTools/python/compareNtuple.py
index 83391e07fa95ceb367fa381d5eb40a9a1c0b56a3..6cca0b221330c82edb32aae97b46846ed7de0d77 100644
--- a/Tools/PROCTools/python/compareNtuple.py
+++ b/Tools/PROCTools/python/compareNtuple.py
@@ -1,6 +1,9 @@
 #!/bin/env python
 
-# 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
+
 import os,sys
 from PROCTools.getFileLists import *
 sys.argv += [ '-b' ] # tell ROOT to not use graphics
@@ -15,8 +18,8 @@ ignoreTrees=set(("CollectionMetadata",))
 
 if __name__ == "__main__":
     if len(sys.argv)<4 or sys.argv[1]=="-h" or sys.argv[1]=="--help":
-        print "Usage: compareNtuple.py ntuple1 ntuple2"
-        print "  Example: compareTCTs.py /castor/cern.ch/user/m/mlimper/ntuple1.root /castor/cern.ch/user/m/mlimper/ntuple2.root"
+        print ("Usage: compareNtuple.py ntuple1 ntuple2")
+        print ("  Example: compareTCTs.py /castor/cern.ch/user/m/mlimper/ntuple1.root /castor/cern.ch/user/m/mlimper/ntuple2.root")
         sys.exit(-1)
 
     rName = sys.argv[1]
@@ -33,10 +36,10 @@ if __name__ == "__main__":
         vFile=TFile.Open(vName)
 
     if rFile is None:
-        print "Failed to open reference file",rName
+        print ("Failed to open reference file",rName)
     
     if vFile is None:
-        print "Failed to open validation file",vName
+        print ("Failed to open validation file",vName)
 
     rKeys=set()
     for k in rFile.GetListOfKeys():
@@ -44,13 +47,13 @@ if __name__ == "__main__":
     vKeys=set()
     for k in vFile.GetListOfKeys():
         vKeys.add(k.GetName())
-    #print rKeys
-    #print vKeys
+    #print (rKeys)
+    #print (vKeys)
     keys=rKeys & vKeys
     keys -= ignoreTrees
         
     if len(keys)==0:
-        print "ERROR no common trees names found in files",rName,vName
+        print ("ERROR no common trees names found in files",rName,vName)
 
     nGood=0
     nBad=0
@@ -61,7 +64,7 @@ if __name__ == "__main__":
             continue
         if not isinstance(vTree,TTree):
             continue
-        print "Comparing TTree",k
+        print ("Comparing TTree",k)
         (good,bad)=diffTTree(rTree,vTree)
         nGood+=good
         nBad+=bad
diff --git a/Tools/PROCTools/python/compareTCTs.py b/Tools/PROCTools/python/compareTCTs.py
index dcc6360b425da61c2f539b47f062411f9f6064fe..18a1d2fbd0d595a1ddd67d34f3eaa3148083697b 100755
--- a/Tools/PROCTools/python/compareTCTs.py
+++ b/Tools/PROCTools/python/compareTCTs.py
@@ -1,11 +1,16 @@
 #!/bin/env python
 
-# 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
+
 import os,sys
+from PROCTools.getFileLists import tctPath, findTCTFiles
 from PROCTools.getFileLists import *
 sys.argv += [ '-b' ] # tell ROOT to not use graphics
 from ROOT import TFile,TTree
 from PROCTools.diffTAGTree import diffTTree
+import six
 
 os.environ['STAGE_SVCCLASS']="atlascerngroupdisk"
 os.environ['STAGE_HOST']="castoratlast3"
@@ -28,11 +33,11 @@ def compareTreeFiles(rName,vName,details):
         vFile=TFile.Open(vName)
 
     if rFile is None:
-        print "Failed to open reference file",rName
+        print ("Failed to open reference file",rName)
         return (0,1)
     
     if vFile is None:
-        print "Failed to open validation file",vName
+        print ("Failed to open validation file",vName)
         return (0,1)
 
     rKeys=set()
@@ -41,13 +46,13 @@ def compareTreeFiles(rName,vName,details):
     vKeys=set()
     for k in vFile.GetListOfKeys():
         vKeys.add(k.GetName())
-    #print rKeys
-    #print vKeys
+    #print (rKeys)
+    #print (vKeys)
     keys=rKeys & vKeys
     keys -= ignoreTrees
         
     if len(keys)==0:
-        print "ERROR no common trees names found in files",rName,vName
+        print ("ERROR no common trees names found in files",rName,vName)
         return 0
 
     nGood=0
@@ -59,7 +64,7 @@ def compareTreeFiles(rName,vName,details):
             continue
         if not isinstance(vTree,TTree):
             continue
-        print "Comparing TTree",k
+        print ("Comparing TTree",k)
         (good,bad)=diffTTree(rTree,vTree,details)
         nGood+=good
         nBad+=bad
@@ -76,7 +81,7 @@ def diffPoolFiles(ref,chk,details,toIgnore = ['RecoTimingObj_p1_RAWtoESD_timings
         stat=df.status()
         del df
     except:
-        print "Exception caught while diff'ing POOL files"
+        print ("Exception caught while diff'ing POOL files")
         stat=True
     return stat 
 
@@ -86,27 +91,27 @@ def diffPickleFiles(ref,chk,details):
         chk_nlines = open(chk).readlines()
         if len(ref_nlines) == len(chk_nlines):
             stat=False
-            print "same number of lines!"
+            print ("same number of lines!")
         else :
-            print ref," has ",len(ref_nlines)," lines." 
-            print chk," has ",len(chk_nlines)," lines."
+            print (ref," has ",len(ref_nlines)," lines." )
+            print (chk," has ",len(chk_nlines)," lines.")
             stat=True
-        #print ref," has ",len(ref_nlines)," lines." 
-        #print chk," has ",len(chk_nlines)," lines."
+        #print (ref," has ",len(ref_nlines)," lines." )
+        #print (chk," has ",len(chk_nlines)," lines.")
         #for refer, check in zip(ref_nlines,chk_nlines):
         #    if refer != check:
-        #        print "Expected %r; got %r " % (refer,check)
+        #        print ("Expected %r; got %r " % (refer,check))
         #stat=False
     except:
         stat=True
-        print "Exception caught while comparinging jobReport(_RecoTrf)?.gpickle files"
+        print ("Exception caught while comparinging jobReport(_RecoTrf)?.gpickle files")
     return stat 
 
 
 if __name__ == "__main__":
     if len(sys.argv)<3 or sys.argv[1]=="-h" or sys.argv[1]=="--help":
-        print "Usage: compareTCTs.py --nRef=<refernce nightly number> --nVal=<validation nightly number> --rRef=<reference nightly> --rVal=<validation nightly> --details=<text file> --file=<pattern> --sum=<summary file> --refPath=<path to ref-nightly> --valPath=<path to val-nightly>"
-        print "  Example: compareTCTs.py --nRef=15.6.X.Y --nVal=15.6.X.Y-VAL --rel=rel_4"
+        print ("Usage: compareTCTs.py --nRef=<refernce nightly number> --nVal=<validation nightly number> --rRef=<reference nightly> --rVal=<validation nightly> --details=<text file> --file=<pattern> --sum=<summary file> --refPath=<path to ref-nightly> --valPath=<path to val-nightly>")
+        print ("  Example: compareTCTs.py --nRef=15.6.X.Y --nVal=15.6.X.Y-VAL --rel=rel_4")
         sys.exit(-1)
     
     import getopt
@@ -133,24 +138,24 @@ if __name__ == "__main__":
         if o=="--sum": sumFileName=a
         if o=="--refPath": refPath=a
         if o=="--valPath": valPath=a
-	if o=="--diff-root":
-	    if a=="True": diffroot=True
+        if o=="--diff-root":
+            if a=="True": diffroot=True
         
     if refPath is None:
         if nRef is None:
-            print "Reference nightly not defined! Please use --nRef parameter!"
+            print ("Reference nightly not defined! Please use --nRef parameter!")
             sys.exit(-1)
 
         if rRef is None:
-            print "Reference nightly number not defined! Please use --rRef parameter!"
+            print ("Reference nightly number not defined! Please use --rRef parameter!")
             sys.exit(-1)
 
     if valPath is None:
         if nVal is None:
-            print "Validation nightly not defined! Please use --nVal parameter!"
+            print ("Validation nightly not defined! Please use --nVal parameter!")
             sys.exit(-1)
         if rVal is None:
-            print "Validation nightly number not defined! Please use --rVal parameter!"
+            print ("Validation nightly number not defined! Please use --rVal parameter!")
             sys.exit(-1)
 
     if len(filePattern)==0:
@@ -177,8 +182,8 @@ if __name__ == "__main__":
             else:
                 pass
             
-    print "Comparing files matching:" 
-    print filePattern
+    print ("Comparing files matching:" )
+    print (filePattern)
 
     #Hack to process POOL files first (otherwise inifite loop)
     allPatterns = []
@@ -195,11 +200,11 @@ if __name__ == "__main__":
         valPath = tctPath(nVal, rVal);
 
     if not os.access(refPath, os.R_OK):
-        print "Can't access output of reference TCT at",refPath
+        print ("Can't access output of reference TCT at",refPath)
         sys.exit(-1)
 
     if not os.access(valPath, os.R_OK):
-        print "Can't access output of validation TCT at",valPath
+        print ("Can't access output of validation TCT at",valPath)
         sys.exit(-1)
    
     msg = "Reference TCT:\n"
@@ -207,7 +212,7 @@ if __name__ == "__main__":
     msg += "Validation TCT:\n"
     msg += valPath + "\n"
 
-    print msg
+    print (msg)
     if detailsFN is not None:
         details = open(detailsFN, "w")
         details.write(msg)
@@ -216,8 +221,8 @@ if __name__ == "__main__":
 
     ff = findTCTFiles(refPath,valPath)
     tctlist=ff.getCommonChains()
-    print "Output from findTCTFile.getCommonChains():"
-    print tctlist
+    print ("Output from findTCTFile.getCommonChains():")
+    print (tctlist)
         
     statPerChain=dict()
     
@@ -226,24 +231,24 @@ if __name__ == "__main__":
         nIdenticalFiles = 0
         nDifferentFiles = 0
         filesToCompare = ff.findFiles(pattern)
-        print "Will now look for files matching pattern:", pattern
-        print "The found files to compare:", filesToCompare
-        print "Comparing files matching [%s]" % pattern
+        print ("Will now look for files matching pattern:", pattern)
+        print ("The found files to compare:", filesToCompare)
+        print ("Comparing files matching [%s]" % pattern)
         Summary += "Comparing files matching [%s]\n" % pattern
         #for (tctName,r,v) in filesToCompare:
-        for name,rv in filesToCompare.iteritems():
-            #print "TCT:",name,":",len(rv)
-            print "Chain %s: Found %i files matching [%s]" % (name,len(rv),pattern)
+        for name,rv in six.iteritems (filesToCompare):
+            #print ("TCT:",name,":",len(rv))
+            print ("Chain %s: Found %i files matching [%s]" % (name,len(rv),pattern))
             for (r,v) in rv:
                 fileName=r.split('/')[-1]
-                print "Comparing files",fileName,"of TCT",name
+                print ("Comparing files",fileName,"of TCT",name)
                 identical=False
                 if (fileName.endswith(".pool.root") and not fileName.startswith("myTAG")):
                     if(r.startswith("/eos")): r = "root://eosatlas.cern.ch/"+r
                     if(v.startswith("/eos")): v = "root://eosatlas.cern.ch/"+v
                     if not diffroot: stat=diffPoolFiles(r,v,details)
                     else: 
-		        stat=os.system("acmd.py diff-root "+r+" "+v+" --error-mode resilient --ignore-leaves HITStoRDO_timings RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings --entries 10 > tmp.txt")
+                        stat=os.system("acmd.py diff-root "+r+" "+v+" --error-mode resilient --ignore-leaves HITStoRDO_timings RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings --entries 10 > tmp.txt")
                         os.system("cat tmp.txt|grep -v sync")
                         os.system("rm -f tmp.txt")
                     identical=not stat
@@ -259,44 +264,44 @@ if __name__ == "__main__":
                     stat=diffPickleFiles(r,v,details)
                     identical=not stat
                 else:
-                    print "ERROR: Don't know how to compare",fileName
+                    print ("ERROR: Don't know how to compare",fileName)
                 
                 if (identical): 
                     nIdenticalFiles+=1 
-                    if not statPerChain.has_key(name):
+                    if name not in statPerChain:
                         statPerChain[name]=False
                     else:
                         statPerChain[name]|=False
-                    print "Files are identical"
+                    print ("Files are identical")
                 else:
                     statPerChain[name]=True
                     nDifferentFiles+=1
-                    print "Files are not identical"
+                    print ("Files are not identical")
             
         Summary+="Found %i identical files and %i different files\n" % (nIdenticalFiles, nDifferentFiles)
-        print "Found %i identical files and %i different files\n" % (nIdenticalFiles, nDifferentFiles)
+        print ("Found %i identical files and %i different files\n" % (nIdenticalFiles, nDifferentFiles))
         
     if details is not None:
         details.write(Summary)
         details.close()
 
-    #print Summary
+    #print (Summary)
 
-    #print tctlist
+    #print (tctlist)
     #Check log,mem & cpu,
     complain=""
-    for (name,info) in tctlist.iteritems():
-        #print name,info,len(info)
+    for (name,info) in six.iteritems (tctlist):
+        #print (name,info,len(info))
         if len(info)<2: continue
-        print "\n"+name+":"
+        print ("\n"+name+":")
         if (info[0].loglines>0 and info[1].loglines>0):
             ratio=100.0*(info[1].loglines-info[0].loglines)/info[0].loglines
             ln="\tLoglines: %i -> %i (%.2f)" %  (info[0].loglines,info[1].loglines,ratio)
             if abs(ratio)>5:
-                print ln+"***"
+                print (ln+"***")
                 complain+=name+" "+ln+"***\n"
             else:
-                print ln
+                print (ln)
         if len(info[0].cpulist)>4 and len(info[1].cpulist)>4:
             #ESD
             cpu_r=info[0].cpulist[1]
@@ -305,10 +310,10 @@ if __name__ == "__main__":
                 ratio=100.0*(cpu_v-cpu_r)/cpu_r;
                 ln="\tESD CPU: %i -> %i (%.2f%%)" %  (cpu_r,cpu_v,ratio)
                 if abs(ratio)>15:
-                    print ln+"***"
+                    print (ln+"***")
                     complain+=name+" "+ln+"***\n"
                 else:
-                    print ln
+                    print (ln)
 
             #AOD
             cpu_r=info[0].cpulist[4]
@@ -317,10 +322,10 @@ if __name__ == "__main__":
                 ratio=100.0*(cpu_v-cpu_r)/cpu_r;
                 ln="\tAOD CPU: %i -> %i (%.2f%%)" %  (cpu_r,cpu_v,ratio)
                 if abs(ratio)>15:
-                    print ln+"***"
+                    print (ln+"***")
                     complain+=name+" "+ln+"***\n"
                 else:
-                    print ln
+                    print (ln)
                     
         if len(info[0].memlist)>4 and len(info[1].memlist)>4:
             mem_r=info[0].memlist[1]
@@ -329,10 +334,10 @@ if __name__ == "__main__":
                 ratio=100.0*(mem_v-mem_r)/mem_r;
                 ln="\tESD MEM: %i -> %i (%.2f%%)" %  (mem_r,mem_v,ratio)
                 if abs(ratio)>15:
-                    print ln+"***"
+                    print (ln+"***")
                     complain+=name+" "+ln+"***\n"
                 else:
-                    print ln
+                    print (ln)
 
             mem_r=info[0].memlist[4]
             mem_v=info[1].memlist[4]
@@ -340,22 +345,22 @@ if __name__ == "__main__":
                 ratio=100.0*(mem_v-mem_r)/mem_r;
                 ln="\tAOD MEM: %i -> %i (%.2f%%)" %  (mem_r,mem_v,ratio)
                 if abs(ratio)>15:
-                    print ln+"***"
+                    print (ln+"***")
                     complain+=name+" "+ln+"***\n"
                 else:
-                    print ln
+                    print (ln)
     
     isok=True
-    for f,s in statPerChain.iteritems():
+    for f,s in six.iteritems (statPerChain):
         if s:
-            print "%-70s CHANGED" % f
+            print ("%-70s CHANGED" % f)
             isok=False
         else:
-            print "%-70s IDENTICAL" % f
+            print ("%-70s IDENTICAL" % f)
 
     if sumFileName is not None:
         sumFile=open(sumFileName,"w")
-        for f,s in statPerChain.iteritems():
+        for f,s in six.iteritems (statPerChain):
             line = "%-70s" % f
             if s:
                 line += "CHANGED\n"
@@ -367,7 +372,7 @@ if __name__ == "__main__":
         sumFile.write(complain)
         sumFile.close()
         
-    #print statPerChain
+    #print (statPerChain)
     del diffTTree
     if not isok:
         sys.exit(-1)        
diff --git a/Tools/PROCTools/python/copyTCTOutput.py b/Tools/PROCTools/python/copyTCTOutput.py
index 01ffd3958f4d302aba03a378cb37dc7569389678..defa11b9a7f9a72871dfd8a94b288d20c94a5395 100755
--- a/Tools/PROCTools/python/copyTCTOutput.py
+++ b/Tools/PROCTools/python/copyTCTOutput.py
@@ -1,9 +1,17 @@
 #!/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-import sys,os,shutil,commands,getFileLists
+from __future__ import print_function
+
+import sys,os,shutil,getFileLists
+from PROCTools.getFileLists import findTCTFiles
 from PROCTools.getFileLists import *
+import six
+
+from future import standard_library
+standard_library.install_aliases()
+import subprocess
 
 
 def getFileSize(pfn):
@@ -12,26 +20,26 @@ def getFileSize(pfn):
     pos=pfn.rfind(':')
     if pos!=-1:
         pfn=pfn[1+pos:]
-        #print "New pfn:",pfn
+        #print ("New pfn:",pfn)
     if pfn.startswith("/castor/"):
         cmd= "rfstat "+pfn
-        (stat,out)=commands.getstatusoutput(cmd)
+        (stat,out)=subprocess.getstatusoutput(cmd)
         if stat!=0:
-            print "ERROR: ",cmd,"failed."
+            print ("ERROR: ",cmd,"failed.")
             return None
         for l in out.split(os.linesep):
             if l.startswith("Size"):
                 colon=l.index(':')
-                size=long(l[1+colon:].strip())
+                size=int(l[1+colon:].strip())
                 return size
-        print "ERROR: Failed to interpret output of rfstat"
+        print ("ERROR: Failed to interpret output of rfstat")
         return None
     else: #Assume regular file
         try:
             statinfo=os.stat(pfn)
             size=statinfo[6]
         except:
-            print "Can't acess regular file: ",pfn
+            print ("Can't acess regular file: ",pfn)
         return size
 
 
@@ -44,8 +52,8 @@ def freeSpace(p):  #wont' work on afs ..
 
 if __name__=="__main__":
     def usage():
-        print "Copy a full TCT to a (local) disk"
-        print sys.argv[0],"tctpath destpath"
+        print ("Copy a full TCT to a (local) disk")
+        print (sys.argv[0],"tctpath destpath")
 
 
     if len(sys.argv)!=3:
@@ -60,15 +68,15 @@ if __name__=="__main__":
     os.environ['STAGE_HOST']="castoratlast3"
 
     if not os.access(sDir,os.R_OK):
-        print "Can't read from",sDir
+        print ("Can't read from",sDir)
         sys.exit(-1)
 
     if not os.access(dDir,os.W_OK):
         try:
             os.mkdir(dDir)
-        except OSError,why:
-            print "Can't write to",dDir
-            print why
+        except OSError as why:
+            print ("Can't write to",dDir)
+            print (why)
             sys.exit(-1)
 
 
@@ -77,8 +85,8 @@ if __name__=="__main__":
 
     allFilesToCopy=dict()
 
-    print "Searching for files to copy..."
-    for name,tci in ff._commonDirs.iteritems():
+    print ("Searching for files to copy...")
+    for name,tci in six.iteritems (ff._commonDirs):
         filesToCopy=[tci[0].logfile,]
         for p in patterns:
             filesToCopy+=ff.findFilesInDir(tci[0].directory,p)
@@ -87,61 +95,61 @@ if __name__=="__main__":
 
     totalSize=0
     nFiles=0
-    for n,fs in allFilesToCopy.iteritems():
-        #print n
+    for n,fs in six.iteritems (allFilesToCopy):
+        #print (n)
         nFiles+=len(fs)
         for f in fs:
-            #print "  ",f
+            #print ("  ",f)
             totalSize+=getFileSize(f)
 
-    print "Found %i files with a total Size of %.2f MB" % (nFiles, totalSize/(1024.0*1024.0))
-    print "Start Copying:"
+    print ("Found %i files with a total Size of %.2f MB" % (nFiles, totalSize/(1024.0*1024.0)))
+    print ("Start Copying:")
 
 
-    for n,fs in allFilesToCopy.iteritems():
+    for n,fs in six.iteritems (allFilesToCopy):
         if len(fs)>1:
-            print "Working on ",n
+            print ("Working on ",n)
             logpath=fs[0]
             if not logpath.startswith(sDir):
-                print "ERROR, log file path",logpath,"does not start with",sDir
+                print ("ERROR, log file path",logpath,"does not start with",sDir)
                 sys.exit(-1)
             locDir="/".join(logpath[len(sDir):].split("/")[:-1])
-            #print locDir
+            #print (locDir)
             destdir=dDir+locDir
             try:
                 os.makedirs(destdir)
-            except OSError,why:
-                print "Failed to create directory",destdir
-                print why
+            except OSError as why:
+                print ("Failed to create directory",destdir)
+                print (why)
                 sys.exit(-1)
 
             try:
                 shutil.copy2(logpath,destdir+"/"+os.path.basename(logpath))
-            except Exception, why:
-                print "Can't copy log-file to",os.path.basename(logpath)
-                print why
+            except Exception as why:
+                print ("Can't copy log-file to",os.path.basename(logpath))
+                print (why)
                 sys.exit(-1)
 
             for f in fs[1:]:
                 destfile=destdir+"/"+os.path.basename(f)
                 if f. startswith("/castor/"):
-                    #print "Castor copying",f,"to",destfile
+                    #print ("Castor copying",f,"to",destfile)
                     cmd="rfcp "+f+" "+destfile
-                    #print cmd
-                    (stat,out)=commands.getstatusoutput(cmd)
+                    #print (cmd)
+                    (stat,out)=subprocess.getstatusoutput(cmd)
                     if stat!=0:
-                        print out
-                        print "ERROR: ",cmd,"failed."
+                        print (out)
+                        print ("ERROR: ",cmd,"failed.")
                         sys.exit(-1)
                 else: # Regular file
-                    #print "Copying",f,"to",destfile
+                    #print ("Copying",f,"to",destfile)
                     try:
                         shutil.copy2(f,destfile)
-                    except Exception, why:
-                        print "Can't copy file to",os.path.basename(logpath)
-                        print why
+                    except Exception as why:
+                        print ("Can't copy file to",os.path.basename(logpath))
+                        print (why)
                         sys.exit(-1) 
             
-    print "Finished."
+    print ("Finished.")
     
             
diff --git a/Tools/PROCTools/python/diffTAGTree.py b/Tools/PROCTools/python/diffTAGTree.py
index f5ee3943656eb04e1b6f0c42530aa7cf6b5f5919..cd7f98d197745cedd7c7ffdaff29a80e9cbf28d7 100755
--- a/Tools/PROCTools/python/diffTAGTree.py
+++ b/Tools/PROCTools/python/diffTAGTree.py
@@ -1,6 +1,8 @@
 #!/bin/env python
 
-# 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
 
 import sys,os
 sys.argv += [ '-b' ] # tell ROOT to not use graphics
@@ -106,7 +108,7 @@ def diffTTree(tOld,tNew,details=None):
                 else:
                     print(diffmsg)
 
-                if diffSummary.has_key(name):
+                if name in diffSummary:
                     diffSummary[name]+=1
                 else:
                     diffSummary[name]=1
diff --git a/Tools/PROCTools/python/evaluateDiffRoot.py b/Tools/PROCTools/python/evaluateDiffRoot.py
index 4957a8ea081c39bb0a3e7a480aea70dc1d512b12..0b277d1d92709961748c78837914f6d4828c072b 100755
--- a/Tools/PROCTools/python/evaluateDiffRoot.py
+++ b/Tools/PROCTools/python/evaluateDiffRoot.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 
-# 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
+
 from optparse import OptionParser    
 
 
@@ -26,7 +29,7 @@ def getResults(infile, test_dict):
                         test_dict[test][ftype].append(line.split('\n')[0])
                 ## Print line with line number for debug
                 if debugmode and doRead:
-                    print "DEBUG: %s: %s" %(linenr,line.split('\n')[0])
+                    print ("DEBUG: %s: %s" %(linenr,line.split('\n')[0]))
 
     return  test_dict
 
@@ -54,8 +57,8 @@ def getTests(infile, selected_test):
 def reportOverview(test_dict): 
     list_sorted = sorted(test_dict.keys())
     for test in list_sorted:
-        #print "%20s %s" %(test, test_dict[test]['status'])
-        print '{0:50}  {1:10}'.format(test, test_dict[test]['status'])
+        #print ("%20s %s" %(test, test_dict[test]['status']))
+        print ('{0:50}  {1:10}'.format(test, test_dict[test]['status']))
 
 
 """
@@ -66,27 +69,27 @@ def reportDiffs(test_dict):
     for test in list_sorted:
         if test_dict[test]['status'] == 'IDENTICAL':
             continue      
-        print test, test_dict[test]['status']
+        print (test, test_dict[test]['status'])
         for item in ['ESD','AOD']:
-            print item
+            print (item)
             for line in test_dict[test][item]:
-                print line
-            print
-        print
+                print (line)
+            print()
+        print()
 
 
 """
   print all
 """
 def printDict(test_dict):
-    print "Overview:"
-    print "=========="
+    print ("Overview:")
+    print ("==========")
     reportOverview(test_dict)
-    print
-    print
-    print
-    print "Details"
-    print "========"
+    print()
+    print()
+    print()
+    print ("Details")
+    print ("========")
     reportDiffs(test_dict)
 
 
diff --git a/Tools/PROCTools/python/getCurrentCOMCONDTag.py b/Tools/PROCTools/python/getCurrentCOMCONDTag.py
index ef786d7f4736278af9cebe5f86d3f59fe5e0b27e..a4585634bc4aaba3cca959a1edde682a8ed1d017 100755
--- a/Tools/PROCTools/python/getCurrentCOMCONDTag.py
+++ b/Tools/PROCTools/python/getCurrentCOMCONDTag.py
@@ -1,16 +1,18 @@
 #!/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # To know the CURRENT COMCOND tag.
 
+from __future__ import print_function
+
 import sys
 from PyCool import cool
 sys.path.append('/afs/cern.ch/user/a/atlcond/utils/python/')
 from AtlCoolBKLib import resolveAlias
 
 currentBLKP = resolveAlias.getCurrent()
-print currentBLKP
+print (currentBLKP)
 
 currentES1P = resolveAlias.getCurrentES()
-print currentES1P
+print (currentES1P)
diff --git a/Tools/PROCTools/python/getFileLists.py b/Tools/PROCTools/python/getFileLists.py
index 0329c2214d6663391795521fe4279090fe25de9b..66aee20c85fe11e43d5bf9e4ebc4012623c2cda6 100644
--- a/Tools/PROCTools/python/getFileLists.py
+++ b/Tools/PROCTools/python/getFileLists.py
@@ -1,4 +1,6 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
 
 import os,sys
 from xml.dom.minidom import parse
@@ -6,6 +8,7 @@ from time import time
 import re
 from string import *
 import json
+import six
 
 def tctPath(build,rel):
     if not rel.startswith("rel_"):
@@ -45,26 +48,26 @@ class findTCTFiles:
         age = time() - fileTime
 
         if age > 86400: #More than 24h
-            print "WARNING! File %s is more than %d day(s) old" % (path, int(age/86400.))
+            print ("WARNING! File %s is more than %d day(s) old" % (path, int(age/86400.)))
         return
 
 
     def hasLogfile(self,ref,p,fl):
-        #print "Checking",p
+        #print ("Checking",p)
         for f in fl:
             logpath=p+'/'+f
-            #print "\t",f
+            #print ("\t",f)
             if os.path.isfile(logpath) and f.endswith("_log") and not f.endswith("_script_log"):
                 #name=f[:-4].rstrip(digits) #Was needed for old rtt version, job index number appended
                 name=f[:-4]
                 tci=TCTChainInfo(p,logpath)
                 if ref: #Reference TCT (the first one)
-                    if self._commonDirs.has_key(name):
-                        print "ERROR: Duplicate directory name",name
+                    if name in self._commonDirs:
+                        print ("ERROR: Duplicate directory name",name)
                     else:
                         self._commonDirs[name]=(tci,)
                 else: #validation (the second one)
-                    if self._commonDirs.has_key(name): #exits also in reference set
+                    if name in self._commonDirs: #exits also in reference set
                         self._commonDirs[name]+=(tci,)
                 return
                   
@@ -77,7 +80,7 @@ class findTCTFiles:
             oldSplit=old.split("/")
             if oldSplit[-1]==newFile and oldSplit[-3]==newStream:
                 return
-        #print "Adding",file
+        #print ("Adding",file)
         fileList+=[file,]
         return
 
@@ -114,22 +117,22 @@ class findTCTFiles:
             elif nextLineHasEventCount:
                 tci.outputDict[lastOutputFileName] = int(self.findBetween(l, "Event counting test passed (", " events)."))
                 nextLineHasEventCount = False
-        #print "Done parsing %s, found the following output files:" % tci.logfile
+        #print ("Done parsing %s, found the following output files:" % tci.logfile)
         #for file in tci.outputDict:
-        #    print "  %s : %d events" % (file, tci.outputDict[format])
+        #    print ("  %s : %d events" % (file, tci.outputDict[format]))
         lf.close()
         return tci.outputDict
 
     def getChains(self):
-        print "Input directory:",self._rDir
-        print "Searching for TCT sub-directories"
+        print ("Input directory:",self._rDir)
+        print ("Searching for TCT sub-directories")
         os.path.walk(self._rDir,self.hasLogfile,True)
-        print "Found ",len(self._commonDirs),"directories"
+        print ("Found ",len(self._commonDirs),"directories")
         return self._commonDirs
               
         
     def getCommonChains(self):
-        print "Searching for compatible TCT directories ..." 
+        print ("Searching for compatible TCT directories ..." )
         allEvents=0
         
         os.path.walk(self._rDir, self.hasLogfile, True)   # Reference directory
@@ -138,7 +141,7 @@ class findTCTFiles:
         names = self._commonDirs.keys()
         for tctname in names:
             if (tctname.startswith("LatestRun") or tctname.endswith("_MP") or tctname.endswith("IDCosmic0") or tctname.endswith("_PHYSVAL") or tctname.endswith("Derived_Outputs")):
-                print "skipping "+tctname
+                print ("skipping "+tctname)
                 self._commonDirs.pop(tctname)
                 continue
 
@@ -155,62 +158,62 @@ class findTCTFiles:
             
             refEvents = self.getTCTChainInfo(ref)
             if refEvents is None or len(refEvents) == 0:
-                print "No events found in",ref.logfile
+                print ("No events found in",ref.logfile)
                 self._commonDirs.pop(tctname)
                 continue
             
             valEvents = self.getTCTChainInfo(val)
             if valEvents is None or len(valEvents) == 0:
-                print "No events found in", val.logfile
+                print ("No events found in", val.logfile)
                 continue
 
             if (valEvents == refEvents):
                 for file in refEvents:
                     allEvents += refEvents[file]
-                print "TCT %s output seems compatible for ref and chk:" % (tctname)
+                print ("TCT %s output seems compatible for ref and chk:" % (tctname))
                 for format in refEvents:
-                    print "%-70s: ref: %d events, val: %d events" % (format, refEvents[format], valEvents[format])
+                    print ("%-70s: ref: %d events, val: %d events" % (format, refEvents[format], valEvents[format]))
             else:
                 # workaround for when names of test output files change between two rels 
-                print "The (names of the) output files differ in some way:"
-                print refEvents
-                print valEvents
-                print "Will now attempt to match the files by type"
+                print ("The (names of the) output files differ in some way:")
+                print (refEvents)
+                print (valEvents)
+                print ("Will now attempt to match the files by type")
                 matchFound = False
                 for refFormat in refEvents:
                     if matchFound:
                         break # exit loop if a match was found
                     valFormat = "MOCK"
                     for vFormat in valEvents:
-                        #print vFormat
+                        #print (vFormat)
                         for f in formats:
                             if matchFound:
                                 break
                             if f in refFormat and f in vFormat:
                                 valFormat = vFormat
-                                print "Both are %s: %s, %s" % (f, refFormat, valFormat)
+                                print ("Both are %s: %s, %s" % (f, refFormat, valFormat))
                                 matchFound = True
-                    print "  %s, ref: %d, val: %d" % (format, refEvents[refFormat], valEvents[valFormat])
+                    print ("  %s, ref: %d, val: %d" % (format, refEvents[refFormat], valEvents[valFormat]))
                 if not matchFound:
                     # don't compare the files for this then!
                     self._commonDirs.pop(tctname)
-                    print "TCT %s is NOT compatible, outputs different number of events for at least one format:" % tctname
-                    print 
+                    print ("TCT %s is NOT compatible, outputs different number of events for at least one format:" % tctname)
+                    print ()
                 
-        print "Found %i compatible TCT chains with at total of %i events" % (len(self._commonDirs), allEvents)
+        print ("Found %i compatible TCT chains with at total of %i events" % (len(self._commonDirs), allEvents))
         #rint "Done"
         #sys.exit(0)
         return self._commonDirs
             
 
     def findFilesInDir(self,dir,filename):
-        #print "Searching dir",dir
+        #print ("Searching dir",dir)
         pattern=re.compile(filename)
         result=[]
         ls=os.listdir(dir)
         for f in ls:
             if len(pattern.findall(f)):
-                #print "Found",f
+                #print ("Found",f)
                 self.addNew(result,dir+"/"+f)
         if "rttjobinfo.xml" in ls:
             castorfiles=self.extractCastorPath(dir+"/rttjobinfo.xml",pattern)
@@ -222,9 +225,9 @@ class findTCTFiles:
         result=dict()
         if len(self._commonDirs)==0:
             self.getCommonChains()
-        #print self._commonDirs
+        #print (self._commonDirs)
         
-        for (name,(ref,val)) in self._commonDirs.iteritems():
+        for (name,(ref,val)) in six.iteritems (self._commonDirs):
             reffiles=self.findFilesInDir(ref.directory,pattern)
             valfiles=self.findFilesInDir(val.directory,pattern)
 
@@ -232,7 +235,7 @@ class findTCTFiles:
             #Find pairs:
             for rf in reffiles:
                 rfN=rf.split("/")[-1]
-                #print "Checking:",rfN
+                #print ("Checking:",rfN)
                 for vf in valfiles:
                     vfN=vf.split("/")[-1]
                     if (vfN == rfN):
@@ -257,7 +260,7 @@ class findTCTFiles:
                 castorpath=d['src']
             else:
                 castorpath=cpEle[0].childNodes[0].data.strip()
-            #print castorpath
+            #print (castorpath)
             if len(pattern.findall(castorpath)):
                 res+=[castorpath,]
         del dom
@@ -267,9 +270,9 @@ class findTCTFiles:
 
 if __name__=="__main__":
     def usage():
-        print "Find compatible pairs of TCT files"
-        print "Usage example"
-        print sys.argv[0],"15.6.X.Y rel_1 15.6.X.Y-VAL rel_2  'myTAGCOMM.*root'"
+        print ("Find compatible pairs of TCT files")
+        print ("Usage example")
+        print (sys.argv[0],"15.6.X.Y rel_1 15.6.X.Y-VAL rel_2  'myTAGCOMM.*root'")
 
     if len(sys.argv) != 6:
         usage()
@@ -279,11 +282,11 @@ if __name__=="__main__":
     vPath=tctPath(sys.argv[3],sys.argv[4])
 
     if not os.access(rPath,os.R_OK):
-        print "Can't access output of reference TCT at",rPath
+        print ("Can't access output of reference TCT at",rPath)
         sys.exit(-1)
 
     if not os.access(vPath,os.R_OK):
-        print "Can't access output of reference TCT at",vPath
+        print ("Can't access output of reference TCT at",vPath)
         sys.exit(-1)
 
     pattern=re.compile(sys.argv[5])
@@ -292,11 +295,11 @@ if __name__=="__main__":
     tctlist=ff.getCommonChains()
     
     res=ff.findFiles(pattern)
-    for name,fl in res.iteritems():
-        print name
+    for name,fl in six.iteritmes (res):
+        print (name)
         for (r,v) in fl:
-            print "Ref:",r
-            print "Val:",v
+            print ("Ref:",r)
+            print ("Val:",v)
         
     
         
diff --git a/Tools/PROCTools/python/outputTest_v2.py b/Tools/PROCTools/python/outputTest_v2.py
index 6dc5841576fc096015bc8bece058fc8a87294961..3def3286d2dac653bc69b2f0346efea9b26b5f83 100755
--- a/Tools/PROCTools/python/outputTest_v2.py
+++ b/Tools/PROCTools/python/outputTest_v2.py
@@ -1,8 +1,10 @@
 #!/usr/bin/env python
 
-# 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
+
 import os
-import commands
 from optparse import OptionParser
 
 
@@ -24,14 +26,14 @@ def readJson(filename):
     import json
     s = open(filename, 'r').read()
     outputs =  eval(s)
-    #print outputs
+    #print (outputs)
     return outputs
     
 import re
 
 #Dictionary
 
-def_outputs = {'outputDESDM_CALJETFile': {'dstype': 'DESDM_CALJET', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)(?!.*physics_Main.*)'}, 'outputDESDM_SGLELFile': {'dstype': 'DESDM_SGLEL', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDESDM_SLTTMUFile': {'dstype': 'DESDM_SLTTMU', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDESDM_RPVLLFile': {'dstype': 'DESDM_RPVLL', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDAOD_IDTRKVALIDFile': {'dstype': 'DAOD_IDTRKVALID', 'ifMatch': 'data[0-9][0-9]_(cos|1beam|.*eV|comm)(?!.*DRAW.*)(.*MinBias.*|.*IDCosmic.*)'}, 'outputDRAW_ZMUMUFile': {'dstype': 'DRAW_ZMUMU', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\..*)'}, 'outputDAOD_IDTIDEFile': {'dstype': 'DAOD_IDTIDE', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDRAW_TAUMUHFile': {'dstype': 'DRAW_TAUMUH', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\..*)'}, 'outputDESDM_MSPerfFile': {'dstype': '!replace RAW DESDM_MCP DDESDM_MCP_ZMUMU DESDM_ZMCP', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(.*physics_Main\..*)(.*\.RAW\.*|.*DRAW_ZMUMU.*)'}, 'outputDESDM_EGAMMAFile': {'dstype': 'DESDM_EGAMMA', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDRAW_EMUFile': {'dstype': 'DRAW_EMU', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\..*)'}, 'outputDRAW_EGZFile': {'dstype': 'DRAW_EGZ', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\..*)'}, 'outputDESDM_PHOJETFile': {'dstype': 'DESDM_PHOJET', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputAODFile': {'dstype': '!replace RAW AOD', 'ifMatch': 'data[0-9][0-9]_(cos|1beam|.*eV|comm)'}, 'outputDESDM_EOVERPFile': {'dstype': 'DESDM_EOVERP', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_MinBias.*)'}, 'outputDESDM_ALLCELLSFile': {'dstype': '!replace RAW ESDM', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW_TAUMUH.*)(.*DRAW.*)'}, 'outputHISTFile': {'dstype': 'HIST', 'ifMatch': '(?!.(.*DRAW.*|.*debugrec.*))'}}
+def_outputs = {'outputDESDM_CALJETFile': {'dstype': 'DESDM_CALJET', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputESDFile': {'dstype': '!replace RAW ESD', 'ifMatch': '(?!.*DRAW.*)(?!.*physics_Main.*)'}, 'outputDESDM_SGLELFile': {'dstype': 'DESDM_SGLEL', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDESDM_SLTTMUFile': {'dstype': 'DESDM_SLTTMU', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDESDM_RPVLLFile': {'dstype': 'DESDM_RPVLL', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDAOD_IDTRKVALIDFile': {'dstype': 'DAOD_IDTRKVALID', 'ifMatch': 'data[0-9][0-9]_(cos|1beam|.*eV|comm)(?!.*DRAW.*)(.*MinBias.*|.*IDCosmic.*)'}, 'outputDRAW_ZMUMUFile': {'dstype': 'DRAW_ZMUMU', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\\..*)'}, 'outputDAOD_IDTIDEFile': {'dstype': 'DAOD_IDTIDE', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDRAW_TAUMUHFile': {'dstype': 'DRAW_TAUMUH', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\\..*)'}, 'outputDESDM_MSPerfFile': {'dstype': '!replace RAW DESDM_MCP DDESDM_MCP_ZMUMU DESDM_ZMCP', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(.*physics_Main\\..*)(.*\\.RAW\\.*|.*DRAW_ZMUMU.*)'}, 'outputDESDM_EGAMMAFile': {'dstype': 'DESDM_EGAMMA', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputDRAW_EMUFile': {'dstype': 'DRAW_EMU', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\\..*)'}, 'outputDRAW_EGZFile': {'dstype': 'DRAW_EGZ', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW.*)(.*physics_Main\\..*)'}, 'outputDESDM_PHOJETFile': {'dstype': 'DESDM_PHOJET', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_Main.*)'}, 'outputAODFile': {'dstype': '!replace RAW AOD', 'ifMatch': 'data[0-9][0-9]_(cos|1beam|.*eV|comm)'}, 'outputDESDM_EOVERPFile': {'dstype': 'DESDM_EOVERP', 'ifMatch': 'data[0-9][0-9]_.*eV(?!.*DRAW.*)(.*physics_MinBias.*)'}, 'outputDESDM_ALLCELLSFile': {'dstype': '!replace RAW ESDM', 'ifMatch': 'data[0-9][0-9]_(1beam|.*eV|comm)(?!.*DRAW_TAUMUH.*)(.*DRAW.*)'}, 'outputHISTFile': {'dstype': 'HIST', 'ifMatch': '(?!.(.*DRAW.*|.*debugrec.*))'}}
 
 
 
@@ -48,9 +50,9 @@ if options.filename:
     try:
         outputs = readJson(options.filename)
     except:
-        print
-        print "WARNING: file with dict %s not available... using default outputs dict" %(options.filename)
-        print
+        print()
+        print ("WARNING: file with dict %s not available... using default outputs dict" %(options.filename))
+        print()
 else:   
     outputs = def_outputs
 
@@ -85,18 +87,18 @@ if  inStreams:
         if stream in physicsStreams or stream in monitoringStreams or stream in otherStream:
             streams.append(stream)
         else:
-            print "WARNING: %s is not defined in known stream" %(stream)
+            print ("WARNING: %s is not defined in known stream" %(stream))
 
 
 
 """
-  print output types per stream
+  print (output types per stream)
 """
 for stream in streams:
     inputds = project+"."+runnumber+"."+stream+".merge.RAW"
-    print "Primary outputs %s RAW \n" %(stream)
-    print "\t inputDS: %s \n" %(inputds) 
+    print ("Primary outputs %s RAW \n" %(stream))
+    print ("\t inputDS: %s \n" %(inputds) )
     for k in outputs.keys() :
         if re.match(outputs[k]['ifMatch'], inputds) :
-            print "- %s" %(k)
-    print 
+            print ("- %s" %(k))
+    print ()
diff --git a/Tools/PROCTools/python/provideTwikiSummary.py b/Tools/PROCTools/python/provideTwikiSummary.py
index b653c01ed7c1699886206b3d6264d380149a6bc0..af0a6d22d20a9d6874dd4cb348caab65acb3e4c1 100755
--- a/Tools/PROCTools/python/provideTwikiSummary.py
+++ b/Tools/PROCTools/python/provideTwikiSummary.py
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
 
-# 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
+
 import os
 
 def readReleaseList():
@@ -20,8 +23,8 @@ def cleanDiffRoot(ref, val,q, ftype, path):
     outfile = "%s_vs_%s_diff-root-%s.%s.txt" %(ref,val,q,ftype)
     if path:
         outfile = "%s/%s_vs_%s/%s" %(path,ref,val,outfile)
-    command = 'cat %s  | grep -v "diff= \[" | grep -v "::sync-" > %s' %(logfile,outfile)
-    #print command
+    command = 'cat %s  | grep -v "diff= \\[" | grep -v "::sync-" > %s' %(logfile,outfile)
+    #print (command)
     os.system(command)
 
 
@@ -32,14 +35,14 @@ def cleanLog(ref, val, path, log):
     if path:
         outfile = "%s/%s_vs_%s/%s" %(path,ref,val,outfile)
     command = 'cat  %s  > %s' %(logfile,outfile)
-    #print command
+    #print (command)
     os.system(command)
 
 
 def execDiffs(ref, val, path=None):
     filename = "%s_vs_%s_tag-diff.txt" %(ref,val)
     command1 = "get-tag-diff.py --ref=%s --chk=%s > %s/%s_vs_%s/%s" %(ref,val,path,ref,val,filename)
-    print command1
+    print (command1)
     os.system(command1)
 
 
@@ -67,7 +70,7 @@ def PrintTwiki(ref, chk, q221, q431):
     path = "https://twiki.cern.ch/twiki/pub/Atlas/Tier0CacheReleases"
 
     twiki = "| [[%s/%s_vs_%s_tag-diff.txt][%s vs %s]] | [[%s/%s_vs_%s_diff-root-q221.ESD.txt][ESD diff]] [[%s/%s_vs_%s_diff-root-q221.AOD.txt][AOD diff]] | [[%s/%s_vs_%s_diff-root-q431.ESD.txt][ESD diff]] [[%s/%s_vs_%s_diff-root-q431.AOD.txt][AOD diff]] | [[%s/%s_vs_%s_RunTier0Test.txt][%s/%s]] | %s |  |" %(path,ref,chk,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,path,ref,chk,q221,q431,status)
-    print twiki
+    print (twiki)
     return 0
 
 
@@ -80,17 +83,17 @@ def execute_all_steps(ref,val,path,log):
     #path = "%s_vs_%s" %(ref,val)
 
     os.system("mkdir %s/%s_vs_%s" %(path,ref,val)) 
-    print "INFO getting Tag diff of %s and %s" %(ref,val)
+    print ("INFO getting Tag diff of %s and %s" %(ref,val))
     execDiffs(ref, val, path)
-    print "INFO providing RunTier0Test log summary"
+    print ("INFO providing RunTier0Test log summary")
     cleanLog(ref,val, path,log)
-    print "INFO providing short q221 ESD diff-root summary"
+    print ("INFO providing short q221 ESD diff-root summary")
     cleanDiffRoot(ref,val,"q221","ESD", path)
-    print "INFO providing short q221 AOD diff-root summary"
+    print ("INFO providing short q221 AOD diff-root summary")
     cleanDiffRoot(ref,val,"q221","AOD", path)
-    print "INFO providing short q431 ESD diff-root summary"
+    print ("INFO providing short q431 ESD diff-root summary")
     cleanDiffRoot(ref,val,"q431","ESD", path)
-    print "INFO providing short q431 AOD diff-root summary"
+    print ("INFO providing short q431 AOD diff-root summary")
     cleanDiffRoot(ref,val,"q431","AOD", path)
 
     q221, q431 = readLogFile(path,log)
@@ -106,7 +109,7 @@ def writeManyFiles(release_list):
             val = release_list[idx+1]
         except:
             return 0
-        #print rel, val
+        #print (rel, val)
         execute_all_steps(ref,val)
 
 from optparse import OptionParser
@@ -122,7 +125,7 @@ parser.add_option("-f","--file" ,type="string"     ,dest="file"  ,default=None
 
 if options.file:
     release_list = readReleaseList()
-    #print release_list
+    #print (release_list)
     writeManyFiles(release_list)
 
 if options.ref and options.val:
diff --git a/Tools/PROCTools/python/root_lsr_rank.py b/Tools/PROCTools/python/root_lsr_rank.py
index 4749b44d8def69c992c3aa92428c13967c22ab7a..61a417cb9ca76c4e7b5ef4a8c5a25a15721bb866 100644
--- a/Tools/PROCTools/python/root_lsr_rank.py
+++ b/Tools/PROCTools/python/root_lsr_rank.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ## root_lsr_rank.py - Brief description of the purpose of this script (Has to be in PROC tools)
 # When run as
@@ -8,7 +8,8 @@
 #
 # it produces a listing of all objects in the HIST file and a hash value for each of them.  This output can then be compared between the clean and patched runs to look 
 # for any changes in HIST output.  Since it's entirely possible to change the HIST output unintentionally without changing the AOD/ESD etc., this catches a new class of potential errors.
-# $Id$
+
+from __future__ import print_function
 
 import ROOT
 import sys, os, operator
@@ -42,7 +43,7 @@ def dumpdir(d):
     thispath = d.GetPath()
     if ':' in thispath:
         thispath = thispath.split(':', 1)[1]
-    #print thispath
+    #print (thispath)
     subdirs = []
     for k in d.GetListOfKeys():
         if not args.metadata and k.GetName() == 'metadata' and k.GetClassName() == 'TTree':
@@ -53,9 +54,9 @@ def dumpdir(d):
             if args.hash:
                 #lhash = ROOT.bufferhash(k)
                 #objsize = (k.GetNbytes()-k.GetKeylen())/8
-                #print (k.GetNbytes()-k.GetKeylen())/8.
+                #print ((k.GetNbytes()-k.GetKeylen())/8.)
                 #buf = ROOT.getbuffer(k); buf.SetSize(objsize)
-                #print buf[objsize-1], objsize
+                #print (buf[objsize-1], objsize)
                 #lhash = zlib.adler32(str(buf))
                 #k.DeleteBuffer()
                 #obj=k.ReadObj(); 
@@ -70,9 +71,9 @@ def dumpdir(d):
             accounting[idxname] = (k.GetObjlen(), k.GetNbytes()-k.GetKeylen())
             hashes[idxname] = lhash
             types[idxname] = k.GetClassName()
-            #print '%s,' % os.path.join(thispath, k.GetName()),
+            #print ('%s,' % os.path.join(thispath, k.GetName()), end='')
             #obj = k.ReadObj(); obj.IsA().Destructor(obj)
-            #print 'OK'
+            #print ('OK')
     for k in subdirs:
         dumpdir(k.ReadObj())
 
@@ -80,7 +81,7 @@ f = ROOT.TFile.Open(args.filename)
 if args.path:
     d = f.Get(args.path.rstrip('/'))
     if not d:
-        print "Can't access path", args.path, "- exiting"
+        print ("Can't access path", args.path, "- exiting")
         sys.exit(1)
 else:
     d = f
@@ -95,7 +96,7 @@ else:
     key=lambda x: (x[0], x[1][1], x[1][0])
 sortedl = sorted(accounting.items(), key=key, reverse=True)
 if args.hash:
-    print '\n'.join('%s %s: %d uncompressed, %d on file (hash %s)' % (types[a], a, b, c, hashes[a]) for a, (b, c) in  sortedl)
+    print ('\n'.join('%s %s: %d uncompressed, %d on file (hash %s)' % (types[a], a, b, c, hashes[a]) for a, (b, c) in  sortedl))
 else:
-    print '\n'.join('%s %s: %d uncompressed, %d on file' % (types[a], a, b, c) for a, (b, c) in  sortedl)
+    print ('\n'.join('%s %s: %d uncompressed, %d on file' % (types[a], a, b, c) for a, (b, c) in  sortedl))
 
diff --git a/Tools/PROCTools/python/runDiffRootOnChanged.py b/Tools/PROCTools/python/runDiffRootOnChanged.py
index 135a766abb3af9ac7331b110d83dde762ecaa0ef..fb0487aa7554aa8f03635648bf16b3013c9487e3 100755
--- a/Tools/PROCTools/python/runDiffRootOnChanged.py
+++ b/Tools/PROCTools/python/runDiffRootOnChanged.py
@@ -1,8 +1,10 @@
 #!/usr/bin/env python
 
-# 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
+
 import os
-import commands
 from optparse import OptionParser
 
 """
@@ -42,7 +44,7 @@ def diff_root(pool_list,test,ftype):
     outfile = "%s_%s.log" %(test, ftype)
     command =  "acmd.py diff-root %s %s --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings  --entries 10  >> %s" %(pool_list[0], pool_list[1], outfile)
     if options.dryrun:
-        print command
+        print (command)
     else:
         os.system(command)
 
@@ -70,9 +72,9 @@ def get_test_pool_files(logfile, tests):
     for test in tests:
         AOD_list = []
         ESD_list = []
-        print 
-        print
-        print test
+        print()
+        print()
+        print (test)
         f = open(logfile, 'r')
         for line in f:
             if ".pool.root" in line and "open" in line and test in line:
@@ -89,15 +91,15 @@ def get_test_pool_files(logfile, tests):
             AOD_list = guessSecond(AOD_list)
 
         if len(ESD_list) < 2:
-            print "ERROR missing ESD file for diff-root comparison"           
+            print ("ERROR missing ESD file for diff-root comparison"           )
         else:
-            print "INFO evaluate ESD diff-root"
+            print ("INFO evaluate ESD diff-root")
             diff_root(ESD_list, test, "ESD")
 
         if len(AOD_list) < 2:
-            print "ERROR missing AOD file for diff-root comparison"
+            print ("ERROR missing AOD file for diff-root comparison")
         else:  
-            print "INFO evaluate AOD diff-root"
+            print ("INFO evaluate AOD diff-root")
             diff_root(AOD_list, test, "AOD")
 
 
@@ -108,9 +110,9 @@ def test_pool_files(logfile, tests):
         path = "/afs/cern.ch/atlas/project/RTT/prod/Results/tct/REL/20.1.X.Y-VAL/build/x86_64-slc6-gcc48-opt/offline/Tier0ChainTests/%s/" %(test)
         AOD_list = []
         ESD_list = []
-        print 
-        print
-        print test
+        print()
+        print()
+        print (test)
         for rel in rels:
             aod = path.replace("REL",rel)+"myAOD.pool.root"
             esd = path.replace("REL",rel)+"myESD.pool.root"
@@ -121,15 +123,15 @@ def test_pool_files(logfile, tests):
         AOD_list = list(set(AOD_list))
         ESD_list = list(set(ESD_list))
         if len(ESD_list) < 2:
-            print "ERROR missing ESD file for diff-root comparison"           
+            print ("ERROR missing ESD file for diff-root comparison"           )
         else:
-            print "INFO evaluate ESD diff-root"
+            print ("INFO evaluate ESD diff-root")
             diff_root(ESD_list, test, "ESD")
 
         if len(AOD_list) < 2:
-            print "ERROR missing AOD file for diff-root comparison"
+            print ("ERROR missing AOD file for diff-root comparison")
         else:  
-            print "INFO evaluate AOD diff-root"
+            print ("INFO evaluate AOD diff-root")
             diff_root(AOD_list, test, "AOD")
 
 parser=OptionParser(usage="\n ./runDiffRootOnChanged.py --file <file name with full diff-pool log > \n")
@@ -142,10 +144,10 @@ logfile = options.filename
 tests = read_diff_pool_log(logfile)
 
 
-print "INFO following tests changed"
+print ("INFO following tests changed")
 for test in tests:
-    print "    ",test
+    print ("    ",test)
 if tests:
     get_test_pool_files(logfile, tests)
 else:
-    print "All Tests are identical no further checks needed"
+    print ("All Tests are identical no further checks needed")
diff --git a/Tools/PROCTools/python/showOutput.py b/Tools/PROCTools/python/showOutput.py
index 5240f879cde63d2c0c95b5a821865f34c86099db..c4ac2f91e270980910dc792a6cb8f1d5d1e868eb 100755
--- a/Tools/PROCTools/python/showOutput.py
+++ b/Tools/PROCTools/python/showOutput.py
@@ -1,8 +1,12 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-import re,sys,commands,os
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
+
+import re,sys,os
 from string import *
+import six
 
 def getOutputDictFromAMI(tag):
     try:
@@ -10,30 +14,30 @@ def getOutputDictFromAMI(tag):
         amires = AMI().execute(["ListConfigurationTag","-configTag=%s" % tag])
         d = amires.getDict()['rowset_%s'%tag][tag]
         outDict = eval(d.get('outputs','None'))
-    except Exception,e:
-        print "Failed to get OutputDict from AMI"
-        print e
+    except Exception as e:
+        print ("Failed to get OutputDict from AMI")
+        print (e)
         return None
     return outDict
 
 
 if __name__=='__main__':
     if len(sys.argv)!=3:
-        print "Syntax:"
-        print sys.argv[0],"<ami-tag> <input dataset name>"
+        print ("Syntax:")
+        print (sys.argv[0],"<ami-tag> <input dataset name>")
         sys.exit(-1)
 
     tag=sys.argv[1]
     dsname=sys.argv[2]
-    print "Getting output for",dsname,"with AMI configuration tag",tag 
+    print ("Getting output for",dsname,"with AMI configuration tag",tag )
 
     outDict=getOutputDictFromAMI(tag) 
     if outDict is None:
         sys.exit(-1)
 
-    print "Outputs:"
+    print ("Outputs:")
 
-    for name,outDef in outDict.iteritems():
-        if outDef.has_key('ifMatch'):
+    for name,outDef in six.iteritems (outDict):
+        if 'ifMatch' in outDef:
             if re.match(outDef['ifMatch'],dsname):
-                print "\t",name
+                print ("\t",name)
diff --git a/Tools/PROCTools/python/testIfMatch.py b/Tools/PROCTools/python/testIfMatch.py
index 321a9224fb4beafee5429a2e3e4ffe718c5e87ed..34a51e38316ee1fa893d2ee1126ca6be60790359 100755
--- a/Tools/PROCTools/python/testIfMatch.py
+++ b/Tools/PROCTools/python/testIfMatch.py
@@ -1,8 +1,16 @@
 #!/usr/bin/env python
 
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-import re,sys,commands,os
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
+
+import re,sys,os
 from string import *
+import six
+
+from future import standard_library
+standard_library.install_aliases()
+import subprocess
 
 
 def getOutputDictFromAMI(tag):
@@ -11,9 +19,9 @@ def getOutputDictFromAMI(tag):
         amires = AMI().execute(["ListConfigurationTag","-configTag=%s" % tag])
         d = amires.getDict()['rowset_%s'%tag][tag]
         outDict = eval(d.get('outputs','None'))
-    except Exception,e:
-        print "Failed to get OutputDict from AMI"
-        print e
+    except Exception as e:
+        print ("Failed to get OutputDict from AMI")
+        print (e)
         return None
     return outDict
 
@@ -26,10 +34,10 @@ def getTaskNamesFromCastor():
     for d in cdirs:
         proj=d.split("/")[-1]
         cmd="nsls "+d
-        (stat,out)=commands.getstatusoutput(cmd)
+        (stat,out)=subprocess.getstatusoutput(cmd)
         if stat!=0:
-            print "ERROR, could not get list of streams from castor directory",d
-            print out
+            print ("ERROR, could not get list of streams from castor directory",d)
+            print (out)
             return None
         for stream in out.split(os.linesep):
             tasknames.add(proj+".00000000."+stream+".merge.RAW")
@@ -39,50 +47,50 @@ def getTaskNamesFromCastor():
 
 if __name__=='__main__':
     if len(sys.argv)!=2:
-        print "Syntax:"
-        print sys.argv[0],"<ami-tag>"
+        print ("Syntax:")
+        print (sys.argv[0],"<ami-tag>")
         sys.exit(-1)
 
     tag=sys.argv[1]
-    print "ifmatch matrix for AMI configuration tag",tag
+    print ("ifmatch matrix for AMI configuration tag",tag)
 
     outDict=getOutputDictFromAMI(tag) 
     if outDict is None:
         sys.exit(-1)
 
-    #print outDict
+    #print (outDict)
 
     taskNames=getTaskNamesFromCastor()
     if taskNames is None:
         sys.exit(-1)
 
-    #print streamList
+    #print (streamList)
 
     matrix=dict()
     for taskname in taskNames:
         matrix[taskname]=dict()
 
-    for name,outDef in outDict.iteritems():
-        if outDef.has_key('ifMatch'):
-            print "\n"+name+" ["+ outDef['ifMatch'] +"]"
+    for name,outDef in six.iteritems (outDict):
+        if 'ifMatch' in outDef:
+            print ("\n"+name+" ["+ outDef['ifMatch'] +"]")
             for taskname in taskNames:
                 if re.match(outDef['ifMatch'],taskname):
-                    print "\t",taskname," MATCH"
+                    print ("\t",taskname," MATCH")
                     matrix[taskname][name]=True
                 else:
                     matrix[taskname][name]=False
 
 
  
-    print "Inverse Matrix:"
-    for tn,ops in matrix.iteritems():
-        print tn[:-9]+": ",
-        #print " %30s :" % tn[:-9],
-        for nm,s in ops.iteritems():
+    print ("Inverse Matrix:")
+    for tn,ops in six.iteritems (matrix):
+        print (tn[:-9]+": ", end='')
+        #print (" %30s :" % tn[:-9], end='')
+        for nm,s in six.iteritems (ops):
             if s:
-                print nm[6:-4]+" ",
-                #print "%8s " % nm[6:-4],
+                print (nm[6:-4]+" ", end='')
+                #print ("%8s " % nm[6:-4], end='')
             #else:
-            #    print "        ",
-        print ""
+            #    print ("        ", end='')
+        print ("")
         
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
index fa7b1d0276784e06acccd2440b9a45dbc7b7fd0f..5c1bfb76238637f12754e90ad00644f6d3a9784e 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
@@ -59,12 +59,14 @@ constexpr int32_t alignment =32;
 //find the  index of the smaller value
 
 #if HAVE_FUNCTION_MULTIVERSIONING
+#if defined(__x86_64__)
 __attribute__((target("avx2"))) 
 int32_t findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
 __attribute__((target("sse4.2,sse2"))) 
 int32_t findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
+#endif //x86_64 specific targets
 __attribute__((target("default"))) 
-#endif
+#endif// function multiversioning
 int32_t findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
 //find the index of the smaller value STL style
 int32_t findMinimumIndexSTL(const floatPtrRestrict distancesIn, const int n);
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
index 984d5e31bb1f065f7c6c925c900a4f71cadbf96b..40d0ce8899689d47c0c8e52e978c4d3396518a79 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
@@ -5,7 +5,7 @@
 #include <algorithm>
 #include <limits>
 #include "CxxUtils/features.h"
-#include <immintrin.h>
+#include "CxxUtils/vectorize.h"
 
 #if !defined(__GNUC__)
 #define __builtin_assume_aligned(X, N) X
@@ -17,33 +17,35 @@
 #endif
 #endif
 
+ATH_ENABLE_VECTORIZATION;
+
 namespace GSFUtils {
 /*
  * findMinimumIndex
- */
-/* Here we have 4 implementations
- * - Using AVX2 instructions
- * - using SSE4.1 / SSE2 instruction
- * - One "scalar"
- *-  One using STL
  *
+ * For FindMinimumIndex at x86_64 we have
+ * AVX2 and SSE versions
+ * These assume that the number of elements is a multiple
+ * of 8 and are to be used for sizeable inputs.
+ *
+ * We also provide a default "scalar" implementation
+ *
+ * FindMinimumSTL 
  * One of the issues we have see in that gcc8.3 and clang8 (02/2020)
  * optimise differently the STL version. See also
  * https://its.cern.ch/jira/projects/ATLASRECTS/issues/ATLASRECTS-5244
- * Ideally the "STL" version should work the same or better than
- * the "scalar" but seems to be slower in gcc
  *
- * The method FindMinimumIndex assumes that the number of elements is multiple
- * of 8.
+ * We also provide FindMinimumPair that returns the two smallest values
+ *
  */
 #if HAVE_FUNCTION_MULTIVERSIONING
+#if defined(__x86_64__)
+#include <immintrin.h>
 /*
  *
- * AVX2
- * list of AVX2 intrinsics used
- *
- *
- *  _mm256_set1_epi32
+ * AVX2 intrinsics used :
+ * 
+ * _mm256_set1_epi32
  *  Broadcast 32-bit integer a to all elements of dst. This intrinsic may generate the vpbroadcastd.
  *  https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_set1_epi32&expand=4657,4949
  *
@@ -111,19 +113,15 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
   }
   return minIndex;
 }
-
 /*
  * SSE
- *
  * SSE2 does not have a blend/select instruction.
  * Instruction describes in
  * https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_b&expand=431,452&techs=SSE4_1
- *
  * We AND &
  * - a with the NOT of the mask
  * - b with the mask
- * The result is the OR
- *
+ * - The we OR the above 2
  */
 #if defined(__SSE4_1__)
 static const auto mm_blendv_epi8 = _mm_blendv_epi8;
@@ -136,7 +134,7 @@ SSE2_mm_blendv_epi8(__m128i a, __m128i b, __m128i mask)
 static const auto mm_blendv_epi8 = SSE2_mm_blendv_epi8;
 #endif /* on SSE4.1 vs SSE2 for the blend instructions*/
 /*
- * list of SSE intrinsics used
+ * SSE intrinsics used
  *
  *  _mm_set1_epi32
  *  Broadcast 32-bit integer a to all elements of dst.
@@ -219,10 +217,13 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
   }
   return minIndex;
 }
-/* Fall back to a simple scalar version*/
-__attribute__((target("default")))
+#endif //end of x86_64 versions
 
+
+/* Always fall back to a simple default version with no intrinsics */
+__attribute__((target("default")))
 #endif // HAVE_FUNCTION_MULTIVERSIONING
+
 int32_t
 findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
 {
@@ -251,6 +252,9 @@ findMinimumIndexSTL(const floatPtrRestrict distancesIn, const int n)
   return std::distance(array, std::min_element(array, array + n));
 }
 
+/*
+ * Find the index of the 2 smaller values
+ */ 
 std::pair<int32_t, int32_t>
 findMinimumIndexPair(const floatPtrRestrict distancesIn, const int n)
 {
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx
index d6dfe792f7da9c890efac61823e335f241d6547c..01e97d166c0e46196e4541eb858750f518332062 100644
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx
+++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx
@@ -51,11 +51,15 @@ StatusCode TrigSignatureMoniMT::start() {
     }
 
     if( gotL1Menu && !chain.l1item().empty() ) {
-      TrigConf::L1Item item = l1MenuHandle->item(chain.l1item());
-      for ( const std::string & group : item.bunchgroups() ) {
-        if ( group != "BGRP0" ) {
-          m_chainIDToBunchMap[HLT::Identifier(chain.name())].insert(group);
-        }
+      try {
+	TrigConf::L1Item item = l1MenuHandle->item(chain.l1item());
+	for ( const std::string & group : item.bunchgroups() ) {
+	  if ( group != "BGRP0" ) {
+	    m_chainIDToBunchMap[HLT::Identifier(chain.name())].insert(group);
+	  }
+	}
+      } catch(...) {
+	ATH_MSG_WARNING("The item " << chain.l1item() << " is not part of the L1 menu" );
       }
     }
   }
diff --git a/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py b/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py
index 468899edd32684386894dc05342aef02d8ebd3ac..d80985cfec43541b0c05f7f3c2f3e51af9fba58b 100644
--- a/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py
+++ b/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py
@@ -7,14 +7,12 @@ def setupFilterMonitoring( filterAlg ):
     monTool = GenericMonitoringTool('MonTool')
     
     inputKeys = filterAlg.Input
-    
-    nbins = 2+len(inputKeys)
+
     monTool.HistPath="HLTFramework/Filters"
-    monTool.defineHistogram( 'counts;'+filterAlg.name(),  path='EXPERT', type='TH1I', title='Count of calls and inputs',
-                             xbins=nbins, xmin=0, xmax=nbins,
-                             xlabels=['n_execs', 'n_valid'] + inputKeys )
-    monTool.defineHistogram( 'inputPresent,inputName;'+filterAlg.name()+"_InputEff",  path='EXPERT', type='TEfficiency', title='Input activity fraction;collection name;presence fraction',
-                             xbins=len(inputKeys), xmin=0, xmax=len(inputKeys), xlabels=inputKeys )
+    monTool.defineHistogram( 'name,stat;'+filterAlg.name(),  path='EXPERT', type='TH2I',
+                             title='Input activity fraction;;presence',
+                             xbins=len(inputKeys), xmin=0, xmax=len(inputKeys)+2, xlabels=['exec', 'anyvalid']+inputKeys,
+                             ybins=2, ymin=-0.5, ymax=1.5, ylabels=['no', 'yes'] )
 
     filterAlg.MonTool = monTool
 
diff --git a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx
index a4d05fcce7da991f09c211e3b3c03d5a920ec234..a5775365246c8f1726071837f5f7c752df58f1ce 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/RoRSeqFilter.cxx
@@ -73,33 +73,25 @@ StatusCode RoRSeqFilter::initialize()
 
 StatusCode RoRSeqFilter::execute() {  
   ATH_MSG_DEBUG ( "Executing " << name() << "..." );
-
-  auto inputStat = Monitored::Scalar("counts", 0 ); // n-inputs + 1 for execution counter
-  auto inputName = Monitored::Scalar<std::string>("inputName", "");
-  auto inputPresent = Monitored::Scalar("inputPresent", 0);
-  auto mon = Monitored::Group( m_monTool, inputStat, inputPresent, inputName );
-  mon.fill();
   auto inputHandles  = m_inputKeys.makeHandles();
   auto outputHandles = m_outputKeys.makeHandles();
-  bool validInputs=false;
-  int counter = 1; // entries from 2 (note ++ below) used for inputs
+
+  std::vector<std::string> inputNames({"exec", "anyvalid"});
+  std::vector<bool> inputStats({true, false}); // position 0 for number of execs, always true, bool at position 1 is set later
+  bool validInputs = false;
   for ( auto inputHandle: inputHandles ) {
-    counter++;
-    inputName = inputHandle.name();
-    inputPresent = 0;
+    inputNames.push_back(inputHandle.name());
     if( inputHandle.isValid() ) {// this is because input is implicit
       validInputs = true;
-      inputStat = counter;
-      inputPresent = 1;
-      mon.fill();
+      inputStats.push_back(true);
+    } else {
+      inputStats.push_back(false);
     }
   }
-  if ( validInputs ) {
-    inputStat = 1;
-    mon.fill();
-  }
-  
-    
+  inputStats[1] = validInputs; // position 1 for number of execes with any collection valid
+  auto inputName = Monitored::Collection<std::vector<std::string>>("name", inputNames );
+  auto inputStat = Monitored::Collection<std::vector<bool>>("stat", inputStats );
+  Monitored::Group( m_monTool, inputStat, inputName );
   
   if (!validInputs) {
     setFilterPassed(false);
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt b/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt
index 1b6d33e2290827f5a77e05fe99ba57cb65e4ac1d..b3c066388dd2956c29aadb78cfbfda10cbe969d4 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt
+++ b/Trigger/TrigSteer/TrigCompositeUtils/CMakeLists.txt
@@ -1,52 +1,50 @@
-################################################################################
-# Package: TrigCompositeUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
 
-# Declare the package name:
+# Declare the package name.
 atlas_subdir( TrigCompositeUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODTrigger
-                          GaudiKernel
-                          Control/AthContainers
-                          Control/AthLinks 
-                          PRIVATE
-                          Control/StoreGate
-                          Control/AthenaBaseComps
-                          Control/CxxUtils
-                          Event/xAOD/xAODBase
-                          Event/xAOD/xAODMuon
-                          Event/xAOD/xAODEgamma
-                          AtlasTest/TestTools
-                          Control/StoreGate
-                          )
+# Set up the (non-)standalone compilation.
+set( extra_srcs )
+set( extra_libs )
+if( NOT XAOD_STANDALONE )
+  set( extra_srcs src/*.cxx )
+  set( extra_libs GaudiKernel AthenaKernel AthLinks StoreGateLib AthContainers
+    xAODTrigger )
+endif()
 
+# Add the package's library.
 atlas_add_library( TrigCompositeUtilsLib
-                   Root/*.cxx
-                   PUBLIC_HEADERS TrigCompositeUtils
-                   PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils GaudiKernel xAODTrigger )
+  TrigCompositeUtils/*.h TrigCompositeUtils/*.icc Root/*.cxx ${extra_srcs}
+  PUBLIC_HEADERS TrigCompositeUtils
+  LINK_LIBRARIES CxxUtils AsgMessagingLib ${extra_libs} )
 
+# Install files from the package.
 atlas_install_python_modules( python/*.py )
 
+# Executable(s).
 atlas_add_executable( trigconf_string2hash
-   util/trigconf_string2hash.cxx
-   LINK_LIBRARIES TrigCompositeUtilsLib )
-
-# Unit tests:
-atlas_add_test( TrigCompositeUtils_test
-                SOURCES test/TrigCompositeUtils_test.cxx
-                LINK_LIBRARIES TestTools xAODTrigger TrigCompositeUtilsLib AthContainers )
-
-atlas_add_test( TrigTraversal_test
-                SOURCES test/TrigTraversal_test.cxx
-                LINK_LIBRARIES  TestTools xAODTrigger xAODEgamma xAODMuon xAODBase TrigCompositeUtilsLib
-                AthContainers )
+  util/trigconf_string2hash.cxx
+  LINK_LIBRARIES TrigCompositeUtilsLib )
+
+# Unit test(s).
+if( NOT XAOD_STANDALONE )
+  atlas_add_test( TrigCompositeUtils_test
+    SOURCES test/TrigCompositeUtils_test.cxx
+    LINK_LIBRARIES TestTools AthenaKernel GaudiKernel SGTools StoreGateLib
+    CxxUtils xAODTrigger TrigCompositeUtilsLib AthContainers )
+
+  atlas_add_test( TrigTraversal_test
+    SOURCES test/TrigTraversal_test.cxx
+    LINK_LIBRARIES TestTools StoreGateLib AthenaKernel GaudiKernel SGTools
+    CxxUtils xAODTrigger xAODEgamma xAODMuon xAODBase TrigCompositeUtilsLib )
+endif()
 
 atlas_add_test( Combinators_test
-                SOURCES test/Combinators_test.cxx
-                LINK_LIBRARIES TestTools xAODTrigger TrigCompositeUtilsLib AthContainers )
-
-atlas_add_test( flake8
-   SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/*.py
-   POST_EXEC_SCRIPT nopost.sh )
+  SOURCES test/Combinators_test.cxx
+  LINK_LIBRARIES TestTools TrigCompositeUtilsLib )
+
+if( NOT XAOD_STANDALONE )
+  atlas_add_test( flake8
+    SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/*.py
+    POST_EXEC_SCRIPT nopost.sh )
+endif()
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h
index d7305dbc84e4c1f712efcc855b6c303587536bba..f4a384933c38c94e6939534dd68d02bc80614755 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h
@@ -10,7 +10,7 @@
 #include <set>
 #include <map>
 
-#include "GaudiKernel/MsgStream.h"
+#include "AsgMessaging/MsgStream.h"
 #include "CxxUtils/checker_macros.h"
 
 /**
diff --git a/Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtils.cxx b/Trigger/TrigSteer/TrigCompositeUtils/src/TrigCompositeUtils.cxx
similarity index 100%
rename from Trigger/TrigSteer/TrigCompositeUtils/Root/TrigCompositeUtils.cxx
rename to Trigger/TrigSteer/TrigCompositeUtils/src/TrigCompositeUtils.cxx
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx
index 2918d71d770e0341feed35e4e7f6a65556066411..a5385a792e9633a215b47047ee47ae9ca8a00714 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMCPHitsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMMCPHitsCollection * CMMCPHitsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMMCPHitsCollection_PERS > pers_ref( poolReadObject< CMMCPHitsCollection_PERS >() );
+      std::unique_ptr< CMMCPHitsCollection_PERS > pers_ref( poolReadObject< CMMCPHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of CMMCPHitsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx
index b9edeb443ea560be2b83465712f7f32b39fde359..e0d4328842393f5003eb1e263d089cf1d554e365 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMEtSumsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMMEtSumsCollection * CMMEtSumsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMMEtSumsCollection_PERS > pers_ref( poolReadObject< CMMEtSumsCollection_PERS >() );
+      std::unique_ptr< CMMEtSumsCollection_PERS > pers_ref( poolReadObject< CMMEtSumsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of CMMEtSumsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx
index 9a5f04fde4feb9ebb53d002bd975af7a5261bc7b..7a4b3c4a0c0592b8dc42d880011bdfd70c182827 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMJetHitsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMMJetHitsCollection * CMMJetHitsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMMJetHitsCollection_PERS > pers_ref( poolReadObject< CMMJetHitsCollection_PERS >() );
+      std::unique_ptr< CMMJetHitsCollection_PERS > pers_ref( poolReadObject< CMMJetHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
     }else  throw std::runtime_error( "Unsupported persistent version of CMMJetHitsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx
index c735340621f275aa16f4896c3a91c1c62574782f..f58352f6b11ac48a12a30903c6271f096fcfae59 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMMRoICnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -39,7 +39,7 @@ CMMRoI * CMMRoICnv::createTransient()
   
   if ( compareClassGuid(p1_guid) ) {
      // using auto_ptr ensures deletion of the persistent object
-     std::auto_ptr< CMMRoI_p1 > pers_ref( poolReadObject< CMMRoI_p1 >() );
+     std::unique_ptr< CMMRoI_p1 > pers_ref( poolReadObject< CMMRoI_p1 >() );
      return m_TPConverter_p1.createTransient( pers_ref.get(), mlog );
   }
   throw std::runtime_error("Unsupported persistent version of CMMRoI");
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx
index 818fd2825e0d87d25b0fdb88e173d5ddbe3e4d59..6b50a52d2c0b244967f3fc3c113915fc5c99180b 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPHitsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMXCPHitsCollection * CMXCPHitsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMXCPHitsCollection_PERS > pers_ref( poolReadObject< CMXCPHitsCollection_PERS >() );
+      std::unique_ptr< CMXCPHitsCollection_PERS > pers_ref( poolReadObject< CMXCPHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of CMXCPHitsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx
index fc9e17b348e7b2cbaa6539ff004e33ee99d5916e..5ee9f45dac21ba94b71d3c69dc634223f71bc8dd 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXCPTobCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMXCPTobCollection * CMXCPTobCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMXCPTobCollection_PERS > pers_ref( poolReadObject< CMXCPTobCollection_PERS >() );
+      std::unique_ptr< CMXCPTobCollection_PERS > pers_ref( poolReadObject< CMXCPTobCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of CMXCPTobCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx
index 3a59d61506fa3a92b72491307b3e35d7919b5c0a..42f58566e0929257b8f2a157ef740f46837efe49 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXEtSumsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMXEtSumsCollection * CMXEtSumsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMXEtSumsCollection_PERS > pers_ref( poolReadObject< CMXEtSumsCollection_PERS >() );
+      std::unique_ptr< CMXEtSumsCollection_PERS > pers_ref( poolReadObject< CMXEtSumsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of CMXEtSumsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx
index 2c0c9b4d2947f46bc4f5bb6626d1744427a9c6d6..d03f1381c06f5950f40d0bc89294cbd23ca92609 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetHitsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMXJetHitsCollection * CMXJetHitsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMXJetHitsCollection_PERS > pers_ref( poolReadObject< CMXJetHitsCollection_PERS >() );
+      std::unique_ptr< CMXJetHitsCollection_PERS > pers_ref( poolReadObject< CMXJetHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
     }else  throw std::runtime_error( "Unsupported persistent version of CMXJetHitsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx
index 1cc4b8f3c158d63c3102c11d4b5bc823699b28ef..2cc54b3bb5ea7fa5d7ce7908cf4b229aa3753f86 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXJetTobCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CMXJetTobCollection * CMXJetTobCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CMXJetTobCollection_PERS > pers_ref( poolReadObject< CMXJetTobCollection_PERS >() );
+      std::unique_ptr< CMXJetTobCollection_PERS > pers_ref( poolReadObject< CMXJetTobCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
     }else  throw std::runtime_error( "Unsupported persistent version of CMXJetTobCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
index 34de049b3f897d401c0b544fdda2221ce6b962f6..334529ba6fd496a4b4d3fcf3a6288906108272dd 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -41,7 +41,7 @@ CMXRoI * CMXRoICnv::createTransient()
   
   if ( compareClassGuid(p1_guid) ) {
      // using auto_ptr ensures deletion of the persistent object
-     std::auto_ptr< CMXRoI_p1 > pers_ref( poolReadObject< CMXRoI_p1 >() );
+     std::unique_ptr< CMXRoI_p1 > pers_ref( poolReadObject< CMXRoI_p1 >() );
      return m_TPConverter_p1.createTransient( pers_ref.get(), mlog );
   }
   throw std::runtime_error("Unsupported persistent version of CMXRoI");
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx
index 53da59042cf9a3852b69b892c140133366fc2e93..e51967b65c3ac76ea417c93467f930336688f028 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMHitsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CPMHitsCollection * CPMHitsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CPMHitsCollection_PERS > pers_ref( poolReadObject< CPMHitsCollection_PERS >() );
+      std::unique_ptr< CPMHitsCollection_PERS > pers_ref( poolReadObject< CPMHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
     }else  throw std::runtime_error( "Unsupported persistent version of CPMHitsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx
index 2e1509922ad14d9b1046539dd58c604da1999b30..454134848a1c69eab95fb8a68bc2e00dd6630166 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMRoICollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CPMRoICollection * CPMRoICollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
            // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CPMRoICollection_PERS > pers_ref( poolReadObject< CPMRoICollection_PERS >() );
+      std::unique_ptr< CPMRoICollection_PERS > pers_ref( poolReadObject< CPMRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
 
     }else  throw std::runtime_error( "Unsupported persistent version of CPMRoICollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx
index 1526ec5792d1a2b638cddb576ade23410ce4e37c..8f85b06a455d6a68a8d33c27b3bc8d6e14ed8bb5 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTobRoICollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CPMTobRoICollection * CPMTobRoICollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
            // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CPMTobRoICollection_PERS > pers_ref( poolReadObject< CPMTobRoICollection_PERS >() );
+      std::unique_ptr< CPMTobRoICollection_PERS > pers_ref( poolReadObject< CPMTobRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
 
     }else  throw std::runtime_error( "Unsupported persistent version of CPMTobRoICollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx
index 96fb207c3278b6efe382f8f55abbd1f8d5069257..2fe2e83544eb253cd90375827d58c91063d31b4b 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CPMTowerCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ CPMTowerCollection * CPMTowerCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< CPMTowerCollection_PERS > pers_ref( poolReadObject< CPMTowerCollection_PERS >() );
+      std::unique_ptr< CPMTowerCollection_PERS > pers_ref( poolReadObject< CPMTowerCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of CPMTowerCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CTP_RDOCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CTP_RDOCnv.cxx
index ca4ff0f73ee4c30f27c3e534f510e2d24b0eb35c..74dad229b89238ba5b72ef8e54c1f8e73911979b 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/CTP_RDOCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/CTP_RDOCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -41,13 +41,13 @@ CTP_RDO* CTP_RDOCnv::createTransient() {
 
    if( this->compareClassGuid( p2_guid ) ) {
 
-      std::auto_ptr< CTP_RDO_p2 > pers_ref( this->poolReadObject< CTP_RDO_p2 >() );
+      std::unique_ptr< CTP_RDO_p2 > pers_ref( this->poolReadObject< CTP_RDO_p2 >() );
       MsgStream log( this->msgSvc(), "CTP_RDOCnv" );
       return TPConverter.createTransient( pers_ref.get(), log );
 
    } else if( this->compareClassGuid( p1_guid ) ) {
 
-      std::auto_ptr< CTP_RDO_p1 > pers_ref( this->poolReadObject< CTP_RDO_p1 >() );
+      std::unique_ptr< CTP_RDO_p1 > pers_ref( this->poolReadObject< CTP_RDO_p1 >() );
       MsgStream log( this->msgSvc(), "CTP_RDOCnv" );
       return TPConverter_p1.createTransient( pers_ref.get(), log );
 
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx
index 3f28f7530ba2b84e1286cd44c4597cb6688bbe97..976fe2697c1ade5cd3cc880f4a5850a36b1c5c23 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMEtSumsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ JEMEtSumsCollection * JEMEtSumsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< JEMEtSumsCollection_PERS > pers_ref( poolReadObject< JEMEtSumsCollection_PERS >() );
+      std::unique_ptr< JEMEtSumsCollection_PERS > pers_ref( poolReadObject< JEMEtSumsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of JEMEtSumsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx
index 473aaa19fa8a3bf9c639d533db6c4a86b7b9461f..e92fb38cbf1b3c1d684ee63e546f15d5e1c4d7c6 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMHitsCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ JEMHitsCollection * JEMHitsCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< JEMHitsCollection_PERS > pers_ref( poolReadObject< JEMHitsCollection_PERS >() );
+      std::unique_ptr< JEMHitsCollection_PERS > pers_ref( poolReadObject< JEMHitsCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
     }else  throw std::runtime_error( "Unsupported persistent version of JEMHitsCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx
index 1fe3e548caafbd5a0307e817f260f5f039783c46..55218c5743781fb6306f7ac5b921aa878da3e6e4 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMRoICollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ JEMRoICollection * JEMRoICollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< JEMRoICollection_PERS > pers_ref( poolReadObject< JEMRoICollection_PERS >() );
+      std::unique_ptr< JEMRoICollection_PERS > pers_ref( poolReadObject< JEMRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of JEMRoICollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx
index 15208fd44d506720dfd56e61329b84edf49b5ad1..318eba8fd59260ccf80bac6949519425200f6a66 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JEMTobRoICollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ JEMTobRoICollection * JEMTobRoICollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< JEMTobRoICollection_PERS > pers_ref( poolReadObject< JEMTobRoICollection_PERS >() );
+      std::unique_ptr< JEMTobRoICollection_PERS > pers_ref( poolReadObject< JEMTobRoICollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of JEMTobRoICollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx
index 3b7baa1cb70953d8a0547e3d31817c6dba6e6991..565355e61f6c2998fbd3a9031951d1b3fef79df2 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/JetElementCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -39,7 +39,7 @@ JetElementCollection * JetElementCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< JetElementCollection_PERS > pers_ref( poolReadObject< JetElementCollection_PERS >() );
+      std::unique_ptr< JetElementCollection_PERS > pers_ref( poolReadObject< JetElementCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else if( compareClassGuid( p0_guid ) ){
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/MuCTPI_RDOCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/MuCTPI_RDOCnv.cxx
index c98ef284f0bb96eaf4b86ca5370d81bdc95dab15..09071fbcb2c1b6377b5ee898a64dee7605137455 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/MuCTPI_RDOCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/MuCTPI_RDOCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -38,7 +38,7 @@ MuCTPI_RDO* MuCTPI_RDOCnv::createTransient() {
 
    if( this->compareClassGuid( p1_guid ) ) {
 
-      std::auto_ptr< MuCTPI_RDO_p1 > pers_ref( this->poolReadObject< MuCTPI_RDO_p1 >() );
+      std::unique_ptr< MuCTPI_RDO_p1 > pers_ref( this->poolReadObject< MuCTPI_RDO_p1 >() );
       MsgStream log( this->msgSvc(), "MuCTPI_RDOCnv" );
       return TPConverter.createTransient( pers_ref.get(), log );
 
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx
index ce70c5d27c7ac4dc6fdee2dc61167e9e8931972f..d8421974776ade70c26ed78458a1105f8d21c4bf 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RODHeaderCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -38,7 +38,7 @@ RODHeaderCollection * RODHeaderCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< RODHeaderCollection_PERS > pers_ref( poolReadObject< RODHeaderCollection_PERS >() );
+      std::unique_ptr< RODHeaderCollection_PERS > pers_ref( poolReadObject< RODHeaderCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
    
     }else  throw std::runtime_error( "Unsupported persistent version of RODHeaderCollection" );
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RoIBResultCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RoIBResultCnv.cxx
index dcdbdf56d803f711ddfc165888c6967ff1fa2983..819e000104635ca4685353fe005b106ae5108619 100755
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/RoIBResultCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/RoIBResultCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 
@@ -38,7 +38,7 @@ ROIB::RoIBResult* RoIBResultCnv::createTransient() {
 
    if( this->compareClassGuid( p1_guid ) ) {
 
-      std::auto_ptr< RoIBResult_p1 > pers_ref( this->poolReadObject< RoIBResult_p1 >() );
+      std::unique_ptr< RoIBResult_p1 > pers_ref( this->poolReadObject< RoIBResult_p1 >() );
       MsgStream log( this->msgSvc(), "RoIBResultCnv" );
       return TPConverter.createTransient( pers_ref.get(), log );
 
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx b/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx
index c18aa0a81641ea2d9ad1039b7a2670518a53caff..dfe5ee20bdca4e23ed2a7acdf5253e1d1528ded9 100644
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx
+++ b/Trigger/TrigT1/TrigT1EventAthenaPool/src/TriggerTowerCollectionCnv.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -39,7 +39,7 @@ TriggerTowerCollection * TriggerTowerCollectionCnv::createTransient()
   if( compareClassGuid( tlp1_guid ) )     
     {
      // using auto_ptr ensures deletion of the persistent object
-      std::auto_ptr< TriggerTowerCollection_PERS > pers_ref( poolReadObject< TriggerTowerCollection_PERS >() );
+      std::unique_ptr< TriggerTowerCollection_PERS > pers_ref( poolReadObject< TriggerTowerCollection_PERS >() );
       p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
       
     }else if( compareClassGuid( p0_guid ) ){
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index a37d2b35589f574d1692fa026f95d6ca52fc8ba4..1bbda8cb6b1175f650cea1482174f51ca64167ee 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -50,7 +50,6 @@ function( _add_test name )
 endfunction( _add_test )
 
 
-_add_test( emu_step_processing LOG_SELECT_PATTERN "TrigSignatureMoniMT.*INFO HLT_.*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*|TriggerSummaryStep.*+++ leg.*") # should be moved to TriggerMenuMT
 
 # Unit tests of the test scripts
 atlas_add_test( flake8_test_dir
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh
deleted file mode 100755
index 935cd8a961df4b59c0d96f106d6e3a3ed9715a83..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_step_processing.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# This is not an ART test, but a unit test
-
-# This is a unit test of HLT Control Flow and should be moved to TriggerMenuMT
-
-athena.py -l DEBUG --imf --threads=1 TrigUpgradeTest/EmuStepProcessingTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_step_processing_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_step_processing_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..95bbda52a4c6c001b1a4b5ec3f17f33d0b767f6f
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_emu_step_processing_build.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# art-description: athenaMT HLT emulation test
+# art-type: build
+# art-include: master/Athena
+
+# This is a unit test of HLT Control Flow and should be moved to TriggerMenuMT
+
+export THREADS=1
+export EVENTS=4
+export SLOTS=1
+export JOBOPTION="TrigUpgradeTest/EmuStepProcessingTest.py"
+export REGTESTEXP="TrigSignatureMoniMT.*INFO HLT_.*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*|TriggerSummaryStep.*+++ leg.*"
+export DOPERFMON=0
+export ATHENAOPTS=" -l DEBUG"
+export REGTESTREF=`find_data.py TrigUpgradeTest/emu_step_processing.ref`
+
+
+source exec_TrigUpgradeTest_art_athenaMT.sh
+source exec_TrigUpgradeTest_art_post.sh
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index f3cffa15028cea4203249f3f62c8fbc4daad4a6d..67891a9ecbded0a4734f434085d6de909d305657 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -270,7 +270,7 @@ TriggerHLTListRun3 = [
     ('xAOD::TrigMissingETAuxContainer#HLT_MET_trkmhtAux.',                 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
 
     ('xAOD::TrigMissingETContainer#HLT_MET_pfsum',                         'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
-    ('xAOD::TrigMissingETContainer#HLT_MET_pfsumAux.',                     'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
+    ('xAOD::TrigMissingETAuxContainer#HLT_MET_pfsumAux.',                  'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
 
     ('xAOD::CaloClusterContainer#HLT_TopoCaloClustersFS',                  'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
     ('xAOD::CaloClusterTrigAuxContainer#HLT_TopoCaloClustersFSAux.nCells', 'BS ESD AODFULL AODSLIM AODVERYSLIM', 'MET'),
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
index 56bf439a61eaeb0f341d9e09a0030b6c8a273806..de2edbfb475587220984b75fab14a2181389b564 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
@@ -577,9 +577,6 @@ def triggerIDCCacheCreatorsCfg(flags):
     from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg
     acc.merge( MuonCacheCfg() )
 
-    from MuonConfig.MuonRdoDecodeConfig import MuonPrdCacheCfg
-    acc.merge( MuonPrdCacheCfg() )
-
     from TrigInDetConfig.InDetConfig import InDetIDCCacheCreatorCfg
     acc.merge( InDetIDCCacheCreatorCfg() )
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index 7024c3f25384fb59dfc53c0c0cb1c736424873fe..667bcc2b90493732dc16cabb83812d0310ad185b 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -10,7 +10,6 @@ log = logging.getLogger('MuonSetup')
 ### Output data name ###
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheNames
-from MuonConfig.MuonRdoDecodeConfig import MuonPrdCacheNames
 
 TrackParticlesName = recordable("HLT_xAODTracks_Muon")
 theFTF_name = "FTFTracks_Muons"
@@ -79,10 +78,9 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
                                                                Decoder     = CSCRodDecoder )
   ToolSvc += MuonCscRawDataProviderTool
 
-  from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataToolMT
-  CscRdoToCscPrepDataTool = Muon__CscRdoToCscPrepDataToolMT(name           = "CscRdoToCscPrepDataTool",
-                                                            CscStripPrdContainerCacheKey = MuonPrdCacheNames.CscStripCache)
-  
+  from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CscRdoToCscPrepDataTool
+  CscRdoToCscPrepDataTool = Muon__CscRdoToCscPrepDataTool(name                = "CscRdoToCscPrepDataTool")
+
   ToolSvc += CscRdoToCscPrepDataTool
 
   from MuonRdoToPrepData.MuonRdoToPrepDataConf import CscRdoToCscPrepData
@@ -125,9 +123,8 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
                                                                Decoder     = MDTRodDecoder )
   ToolSvc += MuonMdtRawDataProviderTool
 
-  from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataToolMT
-  MdtRdoToMdtPrepDataTool = Muon__MdtRdoToPrepDataToolMT(name                     = "MdtRdoToPrepDataTool",
-                                                         MdtPrdContainerCacheKey = MuonPrdCacheNames.MdtCache)
+  from MuonMDT_CnvTools.MuonMDT_CnvToolsConf import Muon__MdtRdoToPrepDataTool
+  MdtRdoToMdtPrepDataTool = Muon__MdtRdoToPrepDataTool(name                = "MdtRdoToPrepDataTool")
 
   ToolSvc += MdtRdoToMdtPrepDataTool
 
@@ -165,13 +162,6 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
 
   from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataTool
   RpcRdoToRpcPrepDataTool = Muon__RpcRdoToPrepDataTool(name                = "RpcRdoToPrepDataTool")
-
-  #from MuonRPC_CnvTools.MuonRPC_CnvToolsConf import Muon__RpcRdoToPrepDataToolMT
-  #RpcRdoToRpcPrepDataTool = Muon__RpcRdoToPrepDataToolMT(name                = "RpcRdoToPrepDataTool",
-  #                                                       RpcPrdContainerCacheKey = MuonPrdCacheNames.RpcCache,
-  #                                                       RpcCoinContainerCacheKey = MuonPrdCacheNames.RpcCoinCache)
-  #RpcRdoToRpcPrepDataTool.OutputLevel = DEBUG
-
   if athenaCommonFlags.isOnline: 
       RpcRdoToRpcPrepDataTool.ReadKey = ""