diff --git a/Calorimeter/CaloMonitoring/CMakeLists.txt b/Calorimeter/CaloMonitoring/CMakeLists.txt
index 3b2a13241d5868141e674cf951d7a0abca7552d4..4ab7bc3fe1932a8d0de31b4382210e973b0e12fe 100644
--- a/Calorimeter/CaloMonitoring/CMakeLists.txt
+++ b/Calorimeter/CaloMonitoring/CMakeLists.txt
@@ -56,6 +56,14 @@ atlas_install_joboptions( share/*.py )
 atlas_install_python_modules( python/*.py 
   POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+atlas_add_test( flake8_share
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 --ignore=F401,F821,ATL900 ${CMAKE_CURRENT_SOURCE_DIR}/share
+                POST_EXEC_SCRIPT nopost.sh )
+
+atlas_add_test( flake8_rootMacros
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/rootMacros
+                POST_EXEC_SCRIPT nopost.sh )
+
 atlas_add_test( TileCaloCellMonAlg_test
                 SCRIPT python -m CaloMonitoring.TileCalCellMonAlg
                 PROPERTIES TIMEOUT 300
diff --git a/Calorimeter/CaloMonitoring/python/LArCellBinning.py b/Calorimeter/CaloMonitoring/python/LArCellBinning.py
index b6d148341dcbdecd15695d5372ea687f8b70bb6c..8c293827851baddffc86428e112f7d8c97020287 100644
--- a/Calorimeter/CaloMonitoring/python/LArCellBinning.py
+++ b/Calorimeter/CaloMonitoring/python/LArCellBinning.py
@@ -75,9 +75,9 @@ lArCellBinningScheme.phiRange={}
 for Part in lArCellBinningScheme.PartitionLayers:
       for Layer in lArCellBinningScheme.PartitionLayers[Part]:
             if Part=="FCAL": 
-                  lArCellBinningScheme.phiRange[Part+Layer+"A"]=[-0.5+x for x in xrange(lArCellBinningScheme.phiNbin[Part][Layer]+1)]
+                  lArCellBinningScheme.phiRange[Part+Layer+"A"]=[-0.5+x for x in range(lArCellBinningScheme.phiNbin[Part][Layer]+1)]
             else: #all other partitions
-                  lArCellBinningScheme.phiRange[Part+Layer+"A"]=[-TMath.Pi()+ x*2*TMath.Pi()/lArCellBinningScheme.phiNbin[Part][Layer] for x in xrange(lArCellBinningScheme.phiNbin[Part][Layer]+1)]
+                  lArCellBinningScheme.phiRange[Part+Layer+"A"]=[-TMath.Pi()+ x*2*TMath.Pi()/lArCellBinningScheme.phiNbin[Part][Layer] for x in range(lArCellBinningScheme.phiNbin[Part][Layer]+1)]
                   pass
             lArCellBinningScheme.phiRange[Part+Layer+"C"]=lArCellBinningScheme.phiRange[Part+Layer+"A"]
                   
@@ -97,8 +97,8 @@ for Part in lArCellBinningScheme.PartitionLayers:
                   #exit(1)
             etamin=lArCellBinningScheme.etaMin[Part][Lay]
             currange=[etamin]
-            for k in xrange(len(Ranges)-1) :
-                  currange+=[round(currange[-1] + x * Sizes[k],5) for x in xrange(1,Ranges[k+1]-Ranges[k]+1)]
+            for k in range(len(Ranges)-1) :
+                  currange+=[round(currange[-1] + x * Sizes[k],5) for x in range(1,Ranges[k+1]-Ranges[k]+1)]
                   pass
             lArCellBinningScheme.etaRange[Part+Lay+"A"]=currange
             #The C side is just the symmeteric of the A side
@@ -146,7 +146,7 @@ cted for Noise Plots"]}
 
 if __name__ =="__main__":
 
-    print lArCellBinningScheme.PartLayerNames
-    print lArCellBinningScheme.etaRange
+    print (lArCellBinningScheme.PartLayerNames)
+    print (lArCellBinningScheme.etaRange)
     for k in lArCellBinningScheme.etaRange: 
-          print k
+          print (k)
diff --git a/Calorimeter/CaloMonitoring/rootMacros/extractSporadic.py b/Calorimeter/CaloMonitoring/rootMacros/extractSporadic.py
index c615d50a784aa0d3dce33e9c60fcc841ec10dc11..8bf075944427eeb924ea79af53e95db839e6c9d4 100644
--- a/Calorimeter/CaloMonitoring/rootMacros/extractSporadic.py
+++ b/Calorimeter/CaloMonitoring/rootMacros/extractSporadic.py
@@ -1,12 +1,14 @@
 #!/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
 
 # ======================================================================
 def printProperties(h,q,hLB):
 
-   print "=======================Harware coordinates :",h.GetName()[0:h.GetName().find("Phi")-1]
-   print "Coordinates : Eta = ",h.GetName()[h.GetName().find("Eta")+3:h.GetName().find("Eta")+7]," Phi = ",h.GetName()[h.GetName().find("Phi")+3:h.GetName().find("Phi")+7]
+   print ("=======================Harware coordinates :",h.GetName()[0:h.GetName().find("Phi")-1])
+   print ("Coordinates : Eta = ",h.GetName()[h.GetName().find("Eta")+3:h.GetName().find("Eta")+7]," Phi = ",h.GetName()[h.GetName().find("Phi")+3:h.GetName().find("Phi")+7])
    
    
    # Nb of events with E>20GeV and mean energy
@@ -34,9 +36,9 @@ def printProperties(h,q,hLB):
          nbLB20GeV = nbLB20GeV+1
          allLBs = allLBs + " %d"%ix
 
-   print "# of events: E>20GeV / E>20GeV && q>4000 : %d / %d"%(nbEvts4000,nbEvts20GeV)
-   print "Mean energy above 20geV: %.2f GeV"%meanE
-   print nbLB20GeV," LBs contains energetic events: ", allLBs 
+   print ("# of events: E>20GeV / E>20GeV && q>4000 : %d / %d"%(nbEvts4000,nbEvts20GeV))
+   print ("Mean energy above 20geV: %.2f GeV"%meanE)
+   print (nbLB20GeV," LBs contains energetic events: ", allLBs )
    return
 
 # ======================================================================
@@ -62,22 +64,19 @@ def displayHistos(h,q,hLB,canvas):
 
 
 # Main =================================================================
-import os, sys  
-import string
+import sys  
 
 if len(sys.argv)<4:
-   print "python -i extractSporadic.py 159041 x29_m545 EMBA [FT29Sl2Ch68]"
-   print "If no channel is specified, displays all with more than 20 events above 20 GeV"
+   print ("python -i extractSporadic.py 159041 x29_m545 EMBA [FT29Sl2Ch68]")
+   print ("If no channel is specified, displays all with more than 20 events above 20 GeV")
    sys.exit()
 
 #os.system("nsls /castor/cern.ch/grid/atlas/tzero/prod1/perm/data10_7TeV/physics_CosmicCalo/0"+sys.argv[1])
 
 import ROOT
 from ROOT import gROOT, gDirectory
-from ROOT import gStyle, TCanvas, TString, TPad
-from ROOT import TFile, TTree, TRFIOFile, TStyle
-from ROOT import TH1F,TH2F,TBrowser,TPaveStats
-from ROOT import TPaveText
+from ROOT import gStyle, TCanvas
+from ROOT import TRFIOFile
 
 gROOT.Reset()
 gStyle.SetPalette(1)
@@ -89,7 +88,7 @@ myFile = TRFIOFile(nameFile)
 
 # General numbers
 hNbEvts = myFile.Get("run_"+sys.argv[1]+"/LAr/FEBMon/perPartitionData/Eventtype")
-print "This stream contains %d events"%hNbEvts.GetEntries()
+print ("This stream contains %d events"%hNbEvts.GetEntries())
 
 myFile.cd(nameDir)
 
@@ -110,7 +109,7 @@ if len(sys.argv) == 4:
          hLB.append(myFile.Get(nameDir+"/"+name))
 
    nhists = len(h)
-   print "retrieved %i histos"%nhists
+   print ("retrieved %i histos"%nhists)
 
    for i in range(0, nhists):
       if h[i].Integral(61,h[i].GetNbinsX()+1) >= 20:
diff --git a/Calorimeter/CaloMonitoring/share/CaloBaselineMon_jobOpt.py b/Calorimeter/CaloMonitoring/share/CaloBaselineMon_jobOpt.py
index b786efe6f99b9a1de5d32d680b301409ba123cfd..54a1691b1cfa0099bcd28a16fe84cf49b5381836 100644
--- a/Calorimeter/CaloMonitoring/share/CaloBaselineMon_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/CaloBaselineMon_jobOpt.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #---------------------------------------------------------
 # Author      : B.Trocme (LPSC Grenoble) 
 # Description : JO steering CaloBaselineMon
@@ -9,7 +9,7 @@ from CaloMonitoring.CaloMonitoringConf import CaloBaselineMon
  
 from AthenaMonitoring.DQMonFlags import DQMonFlags
 from AthenaCommon.GlobalFlags  import globalflags
-if not 'rec' in dir():
+if 'rec' not in dir():
    from RecExConfig.RecFlags import rec
 
 from AthenaMonitoring.BadLBFilterTool import GetLArBadLBFilterTool
diff --git a/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py b/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py
index 1073a1c101c35ab2ccf0d8a08f049df139a13540..8457d36d85a208b2b20b8f7bacbf3fc4e7a2cb4f 100644
--- a/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCollisions_jobOpt.py
@@ -12,7 +12,7 @@
 
 from CaloMonitoring.CaloMonitoringConf import CaloClusterVecMon
 
-if not 'rec' in dir():
+if 'rec' not in dir():
    from RecExConfig.RecFlags import rec
 
 from AthenaMonitoring.DQMonFlags import DQMonFlags
diff --git a/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCosmics_jobOpt.py b/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCosmics_jobOpt.py
index ec0d7138550614206c05f901339d0748f62508d5..1863b29a56cbc01dc9d77a0847baceeb30319f14 100755
--- a/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCosmics_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/CaloClusterVecMonCosmics_jobOpt.py
@@ -13,7 +13,7 @@
 # to change: 1) a jet trigger, a min bias trigger, an em trigger, a very much biased etmiss trigger
 from CaloMonitoring.CaloMonitoringConf import CaloClusterVecMon
 
-if not 'rec' in dir():
+if 'rec' not in dir():
    from RecExConfig.RecFlags import rec
  
 from AthenaMonitoring.DQMonFlags import DQMonFlags
diff --git a/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py b/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py
index 16fade49bda99b483e65533a832c4f6b1ab38491..5da34fc72f3910b62444fd20c6ede58b741582c0 100644
--- a/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/EMClusterVecMonCollisions_jobOpt.py
@@ -14,7 +14,7 @@
 # to change: 1) a jet trigger, a min bias trigger, an em trigger, a very much biased etmiss trigger
 from CaloMonitoring.CaloMonitoringConf import CaloClusterVecMon
 
-if not 'rec' in dir():
+if 'rec' not in dir():
    from RecExConfig.RecFlags import rec
 
 from AthenaMonitoring.DQMonFlags import DQMonFlags
diff --git a/Calorimeter/CaloMonitoring/share/EMClusterVecMonCosmics_jobOpt.py b/Calorimeter/CaloMonitoring/share/EMClusterVecMonCosmics_jobOpt.py
index 5de4b605c147286c09ab64f6c424596305f407c2..eeae17b3a6093cd61c831dfa4828b99620a9b785 100755
--- a/Calorimeter/CaloMonitoring/share/EMClusterVecMonCosmics_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/EMClusterVecMonCosmics_jobOpt.py
@@ -14,7 +14,7 @@
 # to change: 1) a jet trigger, a min bias trigger, an em trigger, a very much biased etmiss trigger
 from CaloMonitoring.CaloMonitoringConf import CaloClusterVecMon
 
-if not 'rec' in dir():
+if 'rec' not in dir():
    from RecExConfig.RecFlags import rec
 
 from AthenaMonitoring.DQMonFlags import DQMonFlags
diff --git a/Calorimeter/CaloMonitoring/share/LArMuIDClusterVecMonCosmics_jobOpt.py b/Calorimeter/CaloMonitoring/share/LArMuIDClusterVecMonCosmics_jobOpt.py
index 7d656e52be6314ea6d8652d41f5ab0cb61748f2d..9e91b189c29efc0f83945a3878fd5ffd0e094f62 100755
--- a/Calorimeter/CaloMonitoring/share/LArMuIDClusterVecMonCosmics_jobOpt.py
+++ b/Calorimeter/CaloMonitoring/share/LArMuIDClusterVecMonCosmics_jobOpt.py
@@ -5,7 +5,7 @@
 # plots for CaloCluster 'LArMuID clusters' momentum vector monitoring
 from CaloMonitoring.CaloMonitoringConf import CaloClusterVecMon
 
-if not 'rec' in dir():
+if 'rec' not in dir():
    from RecExConfig.RecFlags import rec
 
 from AthenaCommon.GlobalFlags  import globalflags
diff --git a/Control/StoreGate/StoreGate/WriteCondHandle.h b/Control/StoreGate/StoreGate/WriteCondHandle.h
index d0cc3fec19ef210c357e3e64134a9b35b44610c2..546d2edda15ec281ec5602ffab3c6bde00bc36de 100644
--- a/Control/StoreGate/StoreGate/WriteCondHandle.h
+++ b/Control/StoreGate/StoreGate/WriteCondHandle.h
@@ -40,9 +40,12 @@ namespace SG {
     const std::string& key() const { return m_hkey.key(); }
     const DataObjID& fullKey() const { return m_hkey.fullKey(); }
 
-    bool isValid();
+    bool isValid() const;
     bool isValid(const EventIDBase& t) const;
 
+    bool isValid(EventIDRange& range) const;
+    bool isValid(const EventIDBase& t, EventIDRange& range) const;
+
     template <typename R>
     void addDependency(SG::ReadCondHandle<R>& rch);
 
@@ -243,13 +246,32 @@ namespace SG {
 
   template <typename T>
   bool 
-  WriteCondHandle<T>::isValid() {
+  WriteCondHandle<T>::isValid() const {
 
     return (m_cc->valid(m_ctx.eventID()));
   }
 
   //---------------------------------------------------------------------------
 
+  template <typename T>
+  bool 
+  WriteCondHandle<T>::isValid(const EventIDBase& t, EventIDRange& range) const {
+
+    return (m_cc->range(t, range));
+  }
+
+
+  //---------------------------------------------------------------------------
+
+  template <typename T>
+  bool 
+  WriteCondHandle<T>::isValid (EventIDRange& range) const {
+
+    return (m_cc->range(m_ctx.eventID(), range));
+  }
+
+  //---------------------------------------------------------------------------
+
   // Can't take a const RCH, as RCH.range() can load the ptr.
   template <typename T>
   template< typename R>
diff --git a/Control/xAODRootAccess/CMakeLists.txt b/Control/xAODRootAccess/CMakeLists.txt
index d772046da7ec7ad7b05feb4b5920a9fc231a851e..e4824995c3d5b17ee2d05ca59705cc6f46632884 100644
--- a/Control/xAODRootAccess/CMakeLists.txt
+++ b/Control/xAODRootAccess/CMakeLists.txt
@@ -100,6 +100,6 @@ if( XAOD_ANALYSIS )
       PROPERTIES TIMEOUT 600 )
 endif()
 
-if( NOT XAOD_STANDALONE )
+if( NOT XAOD_STANDALONE AND NOT GENERATIONBASE )
    _add_test( ut_xaodrootaccess_proxydict_test )
 endif()
diff --git a/Control/xAODRootAccess/xAODRootAccess/TEvent.h b/Control/xAODRootAccess/xAODRootAccess/TEvent.h
index aecf5186928f2ad24435b1441f6144872cdba5bd..f3c03591ae2a673035d730bdf2800bec41cc0a79 100644
--- a/Control/xAODRootAccess/xAODRootAccess/TEvent.h
+++ b/Control/xAODRootAccess/xAODRootAccess/TEvent.h
@@ -267,6 +267,14 @@ namespace xAOD {
       /// Function returning the key describing a known object
       const std::string& getName( uint32_t hash ) const override;
 
+      /// Internal function for recording an object into the output
+      // Declared public so we can call it from python.
+      TReturnCode record( void* obj, const std::string& typeName,
+                          const std::string& key,
+                          ::Int_t basketSize, ::Int_t splitLevel,
+                          ::Bool_t overwrite = kFALSE,
+                          ::Bool_t metadata = kFALSE,
+                          ::Bool_t isOwner = kTRUE );
    protected:
       /// Function for retrieving an output object in a non-template way
       void* getOutputObject( uint32_t key,
@@ -344,13 +352,6 @@ namespace xAOD {
                                   const std::type_info& ti,
                                   ::Bool_t silent = kFALSE,
                                   ::Bool_t metadata = kFALSE );
-      /// Internal function for recording an object into the output
-      TReturnCode record( void* obj, const std::string& typeName,
-                          const std::string& key,
-                          ::Int_t basketSize, ::Int_t splitLevel,
-                          ::Bool_t overwrite = kFALSE,
-                          ::Bool_t metadata = kFALSE,
-                          ::Bool_t isOwner = kTRUE );
       /// Internal function for adding an auxiliary store object to the output
       TReturnCode record( TAuxStore* store, const std::string& key,
                           ::Int_t basketSize, ::Int_t splitLevel,
diff --git a/DataQuality/DataQualityUtils/CMakeLists.txt b/DataQuality/DataQualityUtils/CMakeLists.txt
index 13af04a7b6739bc75b0af2214cd882818b704059..0d9432883b47279fb499b8784d737d0612164f0a 100644
--- a/DataQuality/DataQualityUtils/CMakeLists.txt
+++ b/DataQuality/DataQualityUtils/CMakeLists.txt
@@ -14,7 +14,7 @@ atlas_depends_on_subdirs( PRIVATE
 find_package( Boost COMPONENTS regex filesystem thread system )
 find_package( COOL COMPONENTS CoolKernel CoolApplication )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Graf Gpad MathCore RooFit RooFitCore Minuit Cint Core Tree Hist RIO pthread MathMore Minuit2 Matrix Physics HistPainter Rint Graf3d Html Postscript Gui GX11TTF GX11 )
+find_package( ROOT COMPONENTS Graf Gpad MathCore RooFit RooFitCore Minuit Cint Core Tree TreePlayer Hist RIO pthread MathMore Minuit2 Matrix Physics HistPainter Rint Graf3d Html Postscript Gui GX11TTF GX11 )
 
 # Component(s) in the package:
 atlas_add_root_dictionary( DataQualityUtils
diff --git a/DataQuality/DataQualityUtils/DataQualityUtils/MonitoringFile.h b/DataQuality/DataQualityUtils/DataQualityUtils/MonitoringFile.h
index aaafe1f15ea44f3e7c24eb1a9853d9dd93325cbc..6c6d949605b1fd3ea6723fdb5ceafcd7361d5bbe 100644
--- a/DataQuality/DataQualityUtils/DataQualityUtils/MonitoringFile.h
+++ b/DataQuality/DataQualityUtils/DataQualityUtils/MonitoringFile.h
@@ -65,7 +65,7 @@ namespace dqutils {
     class OutputMetadata {
     public:
       OutputMetadata(TTree* metadata);
-      virtual ~OutputMetadata();
+      virtual ~OutputMetadata() = default;
 
       virtual void fill(std::string name, 
 			 std::string interval, 
@@ -73,14 +73,8 @@ namespace dqutils {
 			 std::string merge);
 
     protected:
-      void copyString(char* to, const std::string& from);
-      void adjustAddresses(const char* branchName, void* ptr, const char* branchstr);
-      const int m_charArrSize;
+      void makeBranch(const char* branchName, const char* branchstr);
       TTree* m_metadata;
-      char* m_nameData;
-      char* m_intervalData;
-      char* m_chainData;
-      char* m_mergeData;
     };
 
 
@@ -410,15 +404,10 @@ namespace dqutils {
       virtual bool executeMD(TEfficiency* eff, const MetaData& md);
 
     protected:
-      void copyString(char* to, const std::string& from);
+      void fillMD(const MetaData& md);
       TDirectory*  m_target;
       std::string  m_dirName;
-      const int m_charArrSize;
       TTree* m_metadata;
-      char* m_nameData;
-      char* m_intervalData;
-      char* m_chainData;
-      char* m_mergeData;
     };
 
     class GatherStatistics : public HistogramOperation {
diff --git a/DataQuality/DataQualityUtils/src/MonitoringFile.cxx b/DataQuality/DataQualityUtils/src/MonitoringFile.cxx
index d65077faf2f03e4d7ddd75ae64989bfd94c82a15..ec4e7881e75dad9e619e7d948ba2db6275b73534 100644
--- a/DataQuality/DataQualityUtils/src/MonitoringFile.cxx
+++ b/DataQuality/DataQualityUtils/src/MonitoringFile.cxx
@@ -38,6 +38,8 @@
 #include <TROOT.h>
 #include <TTree.h>
 #include <TEfficiency.h>
+#include "TTreeReader.h"
+#include "TTreeReaderArray.h"
 
 ClassImp(dqutils::MonitoringFile)
 
@@ -78,45 +80,23 @@ bool histOKToMerge(TH1* h) {
 
 MonitoringFile::OutputMetadata::
 OutputMetadata( TTree* metadata )
-	: m_charArrSize(100)
-	, m_metadata(metadata)
-	, m_nameData(0)
-	, m_intervalData(0)
-	, m_chainData(0)
-  , m_mergeData(0)
+	: m_metadata(metadata)
 {
-  m_nameData = new char[m_charArrSize];
-  m_intervalData = new char[m_charArrSize];
-  m_chainData = new char[m_charArrSize];
-  m_mergeData = new char[m_charArrSize];
-  adjustAddresses( "Name", m_nameData, "Name/C" );
-  adjustAddresses( "Interval", m_intervalData, "Interval/C" );
-  adjustAddresses( "TriggerChain", m_chainData, "TriggerChain/C" );
-  adjustAddresses( "MergeMethod", m_mergeData, "MergeMethod/C" );
+  makeBranch( "Name", "Name/C" );
+  makeBranch( "Interval", "Interval/C" );
+  makeBranch( "TriggerChain", "TriggerChain/C" );
+  makeBranch( "MergeMethod", "MergeMethod/C" );
 }
 
 void
 MonitoringFile::OutputMetadata::
-adjustAddresses(const char* branchName, void* ptr, const char* branchstr) 
+makeBranch(const char* branchName, const char* branchstr) 
 {
-  if (m_metadata->GetBranch(branchName)) {
-    m_metadata->SetBranchAddress(branchName, ptr);
-  } else {
-    m_metadata->Branch(branchName, ptr, branchstr);
+  if (!m_metadata->GetBranch(branchName)) {
+    m_metadata->Branch(branchName, (void*) nullptr, branchstr);
   }
 }
 
-
-MonitoringFile::OutputMetadata::
-~OutputMetadata()
-{
-  delete [] m_mergeData;
-	delete [] m_chainData;
-	delete [] m_intervalData;
-	delete [] m_nameData;
-}
-
-
 void
 MonitoringFile::OutputMetadata::
 fill( std::string name,
@@ -124,28 +104,14 @@ fill( std::string name,
       std::string chain,
       std::string merge )
 {
-	copyString( m_nameData, name );
-	copyString( m_intervalData, interval );
-	copyString( m_chainData, chain );
-	copyString( m_mergeData, merge );
+  m_metadata->SetBranchAddress("Name", name.data());
+	m_metadata->SetBranchAddress("Interval", interval.data());
+  m_metadata->SetBranchAddress("TriggerChain", chain.data());
+  m_metadata->SetBranchAddress("MergeMethod", merge.data());
 	m_metadata->Fill();
 }
 
 
-void
-MonitoringFile::OutputMetadata::
-copyString( char* to, const std::string& from )
-{
-	int i = 0;
-	const char* f = from.c_str();
-	while( ++i < m_charArrSize && (*to++ = *f++) != 0 )
-	  ;
-	if( i == m_charArrSize ) {
-		*to = 0;
-	}
-}
-
-
 MonitoringFile::
 MonitoringFile()
   : m_file(0),m_mergeMatchHistoRE(0),m_mergeMatchDirRE(0),
@@ -173,13 +139,10 @@ MonitoringFile::
 ~MonitoringFile()
 {
   dqi::DisableMustClean disabled;
-  //  bool useRecursiveDelete = gROOT->MustClean();
-  //  gROOT->SetMustClean(false);
   
   delete m_file;
   delete m_mergeMatchDirRE;
   delete m_mergeMatchHistoRE;
-  //  gROOT->SetMustClean(useRecursiveDelete);
 }
 
 bool MonitoringFile::setHistogramRegEx(const std::string& re){
@@ -700,50 +663,27 @@ MonitoringFile::
 fillMetaDataMap( std::map<std::string,dqutils::MonitoringFile::MetaData>& mdMap, TDirectory* dir )
 {
   if (dir == 0) return;
-  //  TKey *mdKey = dynamic_cast<TKey*>(dir->GetListOfKeys()->FindObject("metadata"));
-  //if (mdKey == 0) return;
-  //TTree *md = dynamic_cast<TTree*>(mdKey->ReadObj());
   TTree *md = dynamic_cast<TTree*>(dir->Get("metadata"));
   if (md == 0) return;
 
-  char* i_name = new char[100];
-  char* i_interval = new char[100];
-  char* i_chain = new char[100];
-  char* i_merge = new char[100];
-
-  md->SetBranchStatus( "Name", 1 );
-  md->SetBranchAddress( "Name", i_name );
-  md->SetBranchStatus( "Interval", 1 );
-  md->SetBranchAddress( "Interval", i_interval );
-  md->SetBranchStatus( "TriggerChain", 1 );
-  md->SetBranchAddress( "TriggerChain", i_chain );
-  md->SetBranchStatus( "MergeMethod", 1 );
-  md->SetBranchAddress( "MergeMethod", i_merge );
-  int counter = 0;
-  int nEntries = int( md->GetEntries() );
-
-  while( counter < nEntries ) {
-    try {
-      md->GetEntry(counter);
-    }
-    catch( const std::exception& e ) {
-      std::cerr << "Exception: \"" << e.what() << "\" in directory \""
-                << dir->GetName() << "\"\n" << std::flush;
-      return;
-    }
+  TTreeReader reader(md);
+  TTreeReaderArray<char> i_name(reader, "Name");
+  TTreeReaderArray<char> i_interval(reader, "Interval");
+  TTreeReaderArray<char> i_chain(reader, "TriggerChain");
+  TTreeReaderArray<char> i_merge(reader, "MergeMethod");
 
-    std::string nameStr(i_name);
+  while (reader.Next()) {
+    const std::string nameStr(static_cast<char*>(i_name.GetAddress()));
     if( mdMap.find(nameStr) == mdMap.end() ) {
-      MetaData md( i_name, i_interval, i_chain, i_merge );
+      MetaData md( nameStr, 
+                   static_cast<char*>(i_interval.GetAddress()),
+                   static_cast<char*>(i_chain.GetAddress()),
+                   static_cast<char*>(i_merge.GetAddress()) );
       std::map<std::string,MetaData>::value_type mdVal( nameStr, md );
       mdMap.insert( mdVal );
     }
-    ++counter;
   }
-  delete [] i_name;
-  delete [] i_interval;
-  delete [] i_chain;
-  delete [] i_merge;
+
   delete md;
 }
 
@@ -1357,23 +1297,14 @@ MonitoringFile::CopyHistogram::
 CopyHistogram( TDirectory* target, std::string dirName )
   : m_target(target)
   , m_dirName(dirName)
-  , m_charArrSize(1000)
   , m_metadata(0)
-  , m_nameData(0)
-  , m_intervalData(0)
-  , m_chainData(0)
-  , m_mergeData(0)
 {
   m_metadata = new TTree( "metadata", "Monitoring Metadata" );
   m_metadata->SetDirectory(0);
-  m_nameData = new char[m_charArrSize];
-  m_intervalData = new char[m_charArrSize];
-  m_chainData = new char[m_charArrSize];
-  m_mergeData = new char[m_charArrSize];
-  m_metadata->Branch( "Name", m_nameData, "Name/C" );
-  m_metadata->Branch( "Interval", m_intervalData, "Interval/C" );
-  m_metadata->Branch( "TriggerChain", m_chainData, "TriggerChain/C" );
-  m_metadata->Branch( "MergeMethod", m_mergeData, "MergeMethod/C" );
+  m_metadata->Branch( "Name", (void*) nullptr, "Name/C" );
+  m_metadata->Branch( "Interval", (void*) nullptr, "Interval/C" );
+  m_metadata->Branch( "TriggerChain", (void*) nullptr, "TriggerChain/C" );
+  m_metadata->Branch( "MergeMethod", (void*) nullptr, "MergeMethod/C" );
 }
 
 
@@ -1384,10 +1315,6 @@ MonitoringFile::CopyHistogram::
   m_metadata->SetDirectory(m_target);
   m_metadata->Write();
   delete m_metadata;
-  delete [] m_nameData;
-  delete [] m_intervalData;
-  delete [] m_chainData;
-  delete [] m_mergeData;
 }
 
 
@@ -1419,6 +1346,20 @@ bool MonitoringFile::CopyHistogram::execute( TEfficiency* eff ) {
   return true;
 }
 
+void
+MonitoringFile::CopyHistogram::
+fillMD( const MetaData& md )
+{
+  std::string name(md.name);
+  std::string interval(md.interval);
+  std::string chain(md.chain);
+  std::string merge(md.merge);
+  m_metadata->SetBranchAddress( "Name", name.data() );
+  m_metadata->SetBranchAddress( "Interval", interval.data() );
+  m_metadata->SetBranchAddress( "TriggerChain", chain.data() );
+  m_metadata->SetBranchAddress( "MergeMethod", merge.data() );
+  m_metadata->Fill();
+}
 
 bool
 MonitoringFile::CopyHistogram::
@@ -1428,11 +1369,7 @@ executeMD( TH1* hist, const MetaData& md )
   hist->SetDirectory(m_target);
   hist->Write();
   
-  copyString( m_nameData, md.name );
-  copyString( m_intervalData, md.interval );
-  copyString( m_chainData, md.chain );
-  copyString( m_mergeData, md.merge );
-  m_metadata->Fill();
+  fillMD( md );
   
   return true;
 }
@@ -1445,11 +1382,7 @@ executeMD( TGraph* graph, const MetaData& md )
   m_target->cd();
   graph->Write();
   
-  copyString( m_nameData, md.name );
-  copyString( m_intervalData, md.interval );
-  copyString( m_chainData, md.chain );
-  copyString( m_mergeData, md.merge );
-  m_metadata->Fill();
+  fillMD( md );
   
   return true;
 }
@@ -1458,29 +1391,11 @@ executeMD( TGraph* graph, const MetaData& md )
 bool MonitoringFile::CopyHistogram::executeMD( TEfficiency* eff, const MetaData& md ) {
   m_target->cd();
   eff->Write();
-  copyString( m_nameData, md.name );
-  copyString( m_intervalData, md.interval );
-  copyString( m_chainData, md.chain );
-  copyString( m_mergeData, md.merge );
-  m_metadata->Fill();
+  fillMD( md );
   return true;
 }
 
 
-void
-MonitoringFile::CopyHistogram::
-copyString( char* to, const std::string& from )
-{
-  int i = 0;
-	const char* f = from.c_str();
-	while( ++i < m_charArrSize && (*to++ = *f++) != 0 )
-	  ;
-	if( i == m_charArrSize ) {
-		*to = 0;
-	}
-}
-
-
 MonitoringFile::GatherStatistics::
 GatherStatistics( std::string dirName )
   : m_dirName(dirName)
@@ -1571,9 +1486,7 @@ MonitoringFile::
 clearData()
 {
   dqi::DisableMustClean disabled;
-  //  bool useRecursiveDelete = gROOT->MustClean();
-  //  gROOT->SetMustClean(false);
-  
+
   delete m_file;
   m_file = 0;
   m_debugLevel=0;
@@ -1585,7 +1498,6 @@ clearData()
   m_mergeMatchHistoRE=new boost::regex(m_mergeMatchHistoREString);
   m_mergeMatchDirRE=new boost::regex(m_mergeMatchDirREString);
   m_useRE=false;
-  //  gROOT->SetMustClean(useRecursiveDelete);
 }
 
 
@@ -1656,8 +1568,6 @@ loopOnHistogramsInMetadata( HistogramOperation& fcn, TDirectory* dir )
   dir->cd();
   TKey* mdKey = dir->FindKey( "metadata" );
   if( mdKey == 0 ) {
-    //std::cerr << "MonitoringFile::loopOnHistogramsInMetadata(): "
-    //          << "No \'metadata\' object found in directory \"" << dir->GetName() << "\"\n";
     return false;
   }
   
@@ -1666,42 +1576,27 @@ loopOnHistogramsInMetadata( HistogramOperation& fcn, TDirectory* dir )
     return false;
   }
   
-  char* i_name = new char[100];
-  char* i_interval = new char[100];
-  char* i_chain = new char[100];
-  char* i_merge = new char[100];
   TKey* i_key;
   
-  md->SetBranchStatus( "Name", 1 );
-  md->SetBranchAddress( "Name", i_name );
-  md->SetBranchStatus( "Interval", 1 );
-  md->SetBranchAddress( "Interval", i_interval );
-  md->SetBranchStatus( "TriggerChain", 1 );
-  md->SetBranchAddress( "TriggerChain", i_chain );
-  md->SetBranchStatus( "MergeMethod", 1 );
-  md->SetBranchAddress( "MergeMethod", i_merge );
-  
-  int counter = 0;
-  int nEntries = int( md->GetEntries() );
-  
-  while( counter < nEntries ) {
+  TTreeReader reader(md);
+  TTreeReaderArray<char> i_name(reader, "Name");
+  TTreeReaderArray<char> i_interval(reader, "Interval");
+  TTreeReaderArray<char> i_chain(reader, "TriggerChain");
+  TTreeReaderArray<char> i_merge(reader, "MergeMethod");
+
+  while (reader.Next()) {
+    const std::string nameStr(static_cast<char*>(i_name.GetAddress()));
     dir->cd();
-    try {
-      md->GetEntry(counter);
-    }
-    catch( const std::exception& e ) {
-      std::cerr << "Exception: \"" << e.what() << "\" in directory \""
-                << dir->GetName() << "\"\n" << std::flush;
-      return false;
-    }
-    
-    i_key = dir->FindKey( i_name );
+    i_key = dir->FindKey( static_cast<char*>(i_name.GetAddress()) );
     if( i_key == 0 ) {
       std::cerr << "MonitoringFile::loopOnHistogramsInMetadata(): "
-		<< "No \'" << i_name << "\' object found\n";
+		            << "No \'" << nameStr << "\' object found\n";
       return false;
     }
-    MetaData md( i_name, i_interval, i_chain, i_merge );
+      MetaData md( nameStr, 
+                   static_cast<char*>(i_interval.GetAddress()),
+                   static_cast<char*>(i_chain.GetAddress()),
+                   static_cast<char*>(i_merge.GetAddress()) );
     TObject* obj = i_key->ReadObj();
     TH1* h = dynamic_cast<TH1*>( obj );
     if( h != 0 ) {
@@ -1710,17 +1605,12 @@ loopOnHistogramsInMetadata( HistogramOperation& fcn, TDirectory* dir )
     else {
       TGraph* g = dynamic_cast<TGraph*>( obj );
       if( g != 0 ) {
-	fcn.executeMD( g, md );
+        fcn.executeMD( g, md );
       }
     }
     delete obj; 
-    ++counter;
   }
   
-  delete [] i_name;
-  delete [] i_interval;
-  delete [] i_chain;
-  delete [] i_merge;
   delete md;
   
   return true;
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
index 06db1927fef3574bd7b91cb108c22672b8d6c9fd..f6220d92acb5c908156fa344777f30cd328f836a 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.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
 */
 
 /** @file MakeEventStreamInfo.cxx
@@ -41,7 +41,7 @@ MakeEventStreamInfo::~MakeEventStreamInfo() {
 //___________________________________________________________________________
 StatusCode MakeEventStreamInfo::initialize() {
    ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION);
-   // Locate the MetaDataStore and InputMetaDataStore
+   // Locate the MetaDataStore
    if (!m_metaDataStore.retrieve().isSuccess()) {
       ATH_MSG_FATAL("Could not find MetaDataStore");
       return(StatusCode::FAILURE);
@@ -142,7 +142,7 @@ StatusCode MakeEventStreamInfo::preFinalize() {
 //___________________________________________________________________________
 StatusCode MakeEventStreamInfo::finalize() {
    ATH_MSG_DEBUG("in finalize()");
-   // release the MetaDataStore and InputMetaDataStore
+   // release the MetaDataStore
    if (!m_metaDataStore.release().isSuccess()) {
       ATH_MSG_WARNING("Could not release MetaDataStore");
    }
diff --git a/DetectorDescription/IRegionSelector/IRegionSelector/IRegSelLUT.h b/DetectorDescription/IRegionSelector/IRegionSelector/IRegSelLUT.h
index 5b5547ae6bb2e6ab68ba78ce758320e612814312..f1a73230ac8def4bdd30548908a130668099a24a 100644
--- a/DetectorDescription/IRegionSelector/IRegionSelector/IRegSelLUT.h
+++ b/DetectorDescription/IRegionSelector/IRegionSelector/IRegSelLUT.h
@@ -67,6 +67,7 @@ public:
   
   virtual void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const = 0;   
    
+  virtual ~IRegSelLUT(){};
 };
 
 
diff --git a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelSiLUT.h b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelSiLUT.h
index 37c922f9ac141314031bd93d9cc58ec3d18b7041..acbd6bb82ee1fef9e6efb1c36576e00ae43b585e 100644
--- a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelSiLUT.h
+++ b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelSiLUT.h
@@ -51,19 +51,19 @@ public:
   RegSelSiLUT(const RegSelSiLUT& r);
   RegSelSiLUT(const std::string& s);
 
-  virtual ~RegSelSiLUT() { } 
+  virtual ~RegSelSiLUT() override { } 
 
 
   /// implementation of the IRegSelUT interface                                                                                                                                        
   /// hash id methods                                                                                                                                                                 
-  void HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
+  virtual void HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
 
-  void HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
+  virtual void HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
 
   /// rob methods                                                                                                                                                                      
-  void ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
+  virtual void ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
 
-  void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
+  virtual void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
    
 
 public:
diff --git a/DetectorDescription/RegSelLUT/src/RegSelTimer.cxx b/DetectorDescription/RegSelLUT/src/RegSelTimer.cxx
index 26884b26c299a42fad2ac99cd5a9c80e8169990a..813c2ed19b7159d274d77aa44b693da57718fd4b 100644
--- a/DetectorDescription/RegSelLUT/src/RegSelTimer.cxx
+++ b/DetectorDescription/RegSelLUT/src/RegSelTimer.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
 */
 
 /**************************************************************************
@@ -45,7 +45,7 @@ int Timersub(struct timeval* , struct timeval* , struct timeval* );
 
 
 /** destructor **/
-void __free_timer(void* t) {  if ( t!=NULL ) free((__gtttimer*)t); }
+void __free_timer(void* t) {  if ( t!=nullptr ) free((__gtttimer*)t); }
 
 /** initialiser **/
 // void gtttimer_initkey(void) {  pthread_key_create(&time_key, (void*)__free_timer); }
@@ -70,7 +70,7 @@ void __free_timer(void* t) {  if ( t!=NULL ) free((__gtttimer*)t); }
 void __gtt_gettime(struct timeval* t)
 {
   //  pthread_mutex_lock(&time_lock);
-  gettimeofday (t, NULL);            
+  gettimeofday (t, nullptr);            
   //  pthread_mutex_unlock(&time_lock);
 }
 
diff --git a/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h b/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h
index f9d9aac71dc680ca59fa8a08a7e0d82cdf2df3e7..0bb8bdcf1f0bf7601a5c5c8a230512422ccb0588 100755
--- a/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h
+++ b/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h
@@ -45,16 +45,17 @@ public:
   
   /// hash id methods
 
-  void HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
+  virtual void HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
 
-  void HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
+  virtual void HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
 
   /// rob methods
   
-  void ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
-  
-  void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;  
+  virtual void ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
   
+  virtual void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;  
+
+  virtual ~RegSelectorHashMap() override = default;  
 public:
 
   double etaminValue() const ;
@@ -143,7 +144,7 @@ public:
   void populateMatrix(int iPage,IdentifierHash value);
   void populateMatrixRobId(int iPage, uint32_t value);
   void initMatrix(void);
-  void writeLine(const int& layer, const IdentifierHash& hashId, std::vector<uint32_t> robId, const double& emin,
+  void writeLine(const int& layer, const IdentifierHash& hashId, const std::vector<uint32_t>& robId, const double& emin,
 				    const double& emax, const double& pmin, const double& pmax, const int& samp);					
   int MyRound(double pdValue);
   void regionSelectorIN(const int& sampling, const double& etaminIn, 
diff --git a/DetectorDescription/RegionSelector/RegionSelector/RegSelectorMap.h b/DetectorDescription/RegionSelector/RegionSelector/RegSelectorMap.h
index bdd519441912a04ee8b619df935e236bf95f90c2..98f624d189ff5ddc9fa715fe948c07de093ca823 100644
--- a/DetectorDescription/RegionSelector/RegionSelector/RegSelectorMap.h
+++ b/DetectorDescription/RegionSelector/RegionSelector/RegSelectorMap.h
@@ -34,17 +34,17 @@ public:
   
   /// hash id methods
 
-  void HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
+  virtual void HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
   
-  void HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
+  virtual void HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const override;
 
   /// Rob identifier methods
   
-  void ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
+  virtual void ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
   
-  void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
+  virtual void ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const override;
   
-    
+  virtual ~RegSelectorMap() override = default;
 
 public:
 
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
index 779f215d48af03c1a2b91580c83e58b9ab5e712d..42a4efa18f7d414dac2fdde78bc0410ebdea9096 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.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
 */
 
 
@@ -223,9 +223,9 @@ StatusCode RegSelSvc::initialize() {
      
   bool errorFlag=false; // true indicates an error occured somewhere
   
-  m_newpixel = NULL;
-  m_newsct   = NULL;
-  m_newtrt   = NULL;
+  m_newpixel = nullptr;
+  m_newsct   = nullptr;
+  m_newtrt   = nullptr;
 
 
 
@@ -513,7 +513,7 @@ bool RegSelSvc::handleID() {
     ATH_MSG_WARNING( " could not disable requested detector elements " );
   }
 
-  m_enabledDetectors.push_back("Inner");
+  m_enabledDetectors.emplace_back("Inner");
   
   m_errorFlag |= errorFlag; 
 
@@ -651,7 +651,7 @@ bool RegSelSvc::handleMuon() {
 
 
   
-  m_enabledDetectors.push_back("Muon");
+  m_enabledDetectors.emplace_back("Muon");
 
   m_errorFlag |= errorFlag; 
 
@@ -759,7 +759,7 @@ bool RegSelSvc::handleCalo() {
       errorFlag = true;
     }
   }
-  m_enabledDetectors.push_back("Calorimeter");
+  m_enabledDetectors.emplace_back("Calorimeter");
   
   
   if (m_dumpTable) {
@@ -1653,7 +1653,8 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
 // Some internal helper methods
 //
 
-StatusCode RegSelSvc::readFromSG( ToolHandle<IRegionLUT_Creator> p_lutCreatorTool, const RegionSelectorLUT*& detRSlut, const std::string lutName){
+StatusCode RegSelSvc::readFromSG( ToolHandle<IRegionLUT_Creator> p_lutCreatorTool, const RegionSelectorLUT*& detRSlut, const std::string& lutName )
+{
   // Use generic tool to create LUT - instance set via ToolHandle property
   if (!p_lutCreatorTool) {
     ATH_MSG_INFO( "LUT creator tool not configured " << p_lutCreatorTool );
@@ -1677,8 +1678,6 @@ StatusCode RegSelSvc::readFromSG( ToolHandle<IRegionLUT_Creator> p_lutCreatorToo
   return StatusCode::SUCCESS;
 }
 
-
-
 StatusCode RegSelSvc::readFromSG( ToolHandle<IRegionIDLUT_Creator> p_lutCreatorTool,  RegSelSiLUT*& detRSlut){
   // Use generic tool to create LUT - instance set via ToolHandle property
   // NB: this is *very* misleading, the test !p_lutCreatorTool *isn't* just a test, 
@@ -2046,7 +2045,7 @@ void RegSelSvc::getFilenames(const std::string& detTypeStr, std::vector<std::str
   std::string tmp;
   unsigned int i;
   
-  std::string::size_type pos = m_roiFileName.value().find (".",0);
+  std::string::size_type pos = m_roiFileName.value().find ('.',0);
   getDetname(detTypeStr, detName);
   if( pos != 0 ){
     for( i = 0; i < detName.size(); i++){
@@ -2067,25 +2066,25 @@ void RegSelSvc::getFilenames(const std::string& detTypeStr, std::vector<std::str
 void RegSelSvc::getDetname(const std::string& detTypeStr, std::vector<std::string>& detName){
   
   if(detTypeStr == "Inner"){
-    detName.push_back("PIXEL");
-    detName.push_back("SCT");
-    detName.push_back("TRT");
+    detName.emplace_back("PIXEL");
+    detName.emplace_back("SCT");
+    detName.emplace_back("TRT");
   }
   else if(detTypeStr == "Calorimeter"){
-    detName.push_back("LAR");
-    detName.push_back("TTEM");
-    detName.push_back("TTHEC");
-    detName.push_back("FCALEM");
-    detName.push_back("FCALHAD");
-    detName.push_back("Tile");
+    detName.emplace_back("LAR");
+    detName.emplace_back("TTEM");
+    detName.emplace_back("TTHEC");
+    detName.emplace_back("FCALEM");
+    detName.emplace_back("FCALHAD");
+    detName.emplace_back("Tile");
   }
   else if(detTypeStr == "Muon"){
-    detName.push_back("MDT");
-    detName.push_back("RPC");
-    detName.push_back("TGC");
-    detName.push_back("CSC");
-    detName.push_back("MM");
-    detName.push_back("sTGC");
+    detName.emplace_back("MDT");
+    detName.emplace_back("RPC");
+    detName.emplace_back("TGC");
+    detName.emplace_back("CSC");
+    detName.emplace_back("MM");
+    detName.emplace_back("sTGC");
   }
 }
 
@@ -2188,7 +2187,7 @@ void RegSelSvc::DisablePixelHashList(const std::vector<unsigned int>& HashList)
     
     std::vector<IdentifierHash> hashlist;
     for ( std::vector<unsigned int>::const_iterator hptr(HashList.begin()) ; 
-	  hptr!=HashList.end() ; hptr ++ ) hashlist.push_back(*hptr);
+	  hptr!=HashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
 
     if ( m_newpixel ) m_newpixel->disableModuleList(hashlist);
   } 
@@ -2201,7 +2200,7 @@ void RegSelSvc::DisableSCTHashList(const std::vector<unsigned int>& HashList) {
     // trying to disable the modules from them
     std::vector<IdentifierHash> hashlist;
     for ( std::vector<unsigned int>::const_iterator hptr(HashList.begin()) ; 
-	  hptr!=HashList.end() ; hptr ++ ) hashlist.push_back(*hptr);
+	  hptr!=HashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
     if ( m_newsct )   m_newsct->disableModuleList(hashlist);
   } 
 }
@@ -2214,7 +2213,7 @@ void RegSelSvc::DisableTRTHashList(const std::vector<unsigned int>& HashList) {
     // trying to disable the modules from them
     std::vector<IdentifierHash> hashlist;
     for ( std::vector<unsigned int>::const_iterator hptr(HashList.begin()) ; 
-	  hptr!=HashList.end() ; hptr ++ ) hashlist.push_back(*hptr);
+	  hptr!=HashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
     if ( m_newtrt )   m_newtrt->disableModuleList(hashlist);
   } 
 }
@@ -2296,7 +2295,7 @@ bool RegSelSvc::reinitialiseInternal() {
     // have to convert the std::vector<unsigned int> into std::vector<IdentifierHash>  
     std::vector<IdentifierHash> hashlist;
     for ( std::vector<unsigned int>::const_iterator hptr(m_deletePixelHashList.begin()) ; 
-	  hptr!=m_deletePixelHashList.end() ; hptr ++ ) hashlist.push_back(*hptr);
+	  hptr!=m_deletePixelHashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
     
     if ( m_deletePixelHashList.size() ) m_newpixel->disableModuleList(hashlist);    
   }
@@ -2314,7 +2313,7 @@ bool RegSelSvc::reinitialiseInternal() {
     // have to convert the std::vector<unsigned int> into std::vector<IdentifierHash>  
     std::vector<IdentifierHash> hashlist;
     for ( std::vector<unsigned int>::const_iterator hptr(m_deleteSCTHashList.begin()) ; 
-	  hptr!=m_deleteSCTHashList.end() ; hptr ++ ) hashlist.push_back(*hptr);
+	  hptr!=m_deleteSCTHashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
     
     if ( m_deleteSCTHashList.size() ) m_newsct->disableModuleList(hashlist);
   }
@@ -2333,7 +2332,7 @@ bool RegSelSvc::reinitialiseInternal() {
     // have to convert the std::vector<unsigned int> into std::vector<IdentifierHash>  
     std::vector<IdentifierHash> hashlist;
     for ( std::vector<unsigned int>::const_iterator hptr(m_deleteTRTHashList.begin()) ; 
-	  hptr!=m_deleteTRTHashList.end() ; hptr ++ ) hashlist.push_back(*hptr);
+	  hptr!=m_deleteTRTHashList.end() ; hptr ++ ) hashlist.emplace_back(*hptr);
     
     if ( m_deleteTRTHashList.size() ) m_newtrt->disableModuleList(hashlist);
   }
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.h b/DetectorDescription/RegionSelector/src/RegSelSvc.h
index e71fe3da12b20e69b737a834de5d021e2f91b143..2a4a2b5bb553dd594e963b906e9025900ea21e43 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.h
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.h
@@ -1,7 +1,7 @@
 // emacs: this is -*- 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
 */
 
 
@@ -215,7 +215,7 @@ private:
      \param const std::string \c \b lutName, parameter to be passed to lutCreatorTool.getLUT() if needed, optional
      \return const RegionSelectorLUT* \c \b detRSlut, the detector data LUT
   */
-  StatusCode readFromSG( ToolHandle<IRegionLUT_Creator> p_lutCreatorTool, const RegionSelectorLUT*& detRSlut, const std::string lutName=""); 
+  StatusCode readFromSG( ToolHandle<IRegionLUT_Creator> p_lutCreatorTool, const RegionSelectorLUT*& detRSlut, const std::string& lutName=""); 
 
   //! Initialise lookup tables using tools provided for the inner detector tables
   /*!
diff --git a/DetectorDescription/RegionSelector/src/RegSelectorHashMap.cxx b/DetectorDescription/RegionSelector/src/RegSelectorHashMap.cxx
index 0826370cc77df004bdf3c53bd3d262503017484e..a3e6666a51bdbae34d45fba73857f0d80598aee8 100755
--- a/DetectorDescription/RegionSelector/src/RegSelectorHashMap.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelectorHashMap.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 "RegionSelector/RegSelectorHashMap.h"
@@ -250,7 +250,7 @@ void RegSelectorHashMap::initMatrix(void){
 }
 
 void RegSelectorHashMap::writeLine(const int& layer, const IdentifierHash& hashId, 
-			std::vector<uint32_t> robId, const double& emin,
+			const std::vector<uint32_t>& robId, const double& emin,
 			const double& emax, const double& pmin,
 			const double& pmax, const int& samp){
 
@@ -561,9 +561,9 @@ StatusCode RegSelectorHashMap::read(const char *filename){
       robId.clear();
       pch = strchr(buffer,' ');
       int test = sscanf(pch, " %u %d %d %lf %lf %lf %lf %s %s",  &hashId, &layer, &samp, &emin, &emax, &pmin, &pmax, robIdStr, robIdStr2);
-      robId.push_back(strtol(robIdStr,0,16));
+      robId.push_back(strtol(robIdStr,nullptr,16));
       if ( test == 9 ) // this means that there are 2 ROBs in 1 TT
-        robId.push_back(strtol(robIdStr2,0,16));
+        robId.push_back(strtol(robIdStr2,nullptr,16));
       pch=strchr(buffer,' ');
       stepPhi = std::fabs(pmax-pmin);// initial value for phi and eta step
       stepEta = std::fabs(emin-emax);
diff --git a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/IByteStreamSingleEventInputSvc.h b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/IByteStreamSingleEventInputSvc.h
deleted file mode 100644
index 70b573792bec4d0f8a7c1e020b31fa7113c47ca4..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/IByteStreamSingleEventInputSvc.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef BYTESTREAMCNVSVC_IBYTESTREAMSINGLEEVENTINPUTSVC_H
-#define BYTESTREAMCNVSVC_IBYTESTREAMSINGLEEVENTINPUTSVC_H
-
-/**
-   @class     IByteStreamSingleEventInputSvc
-   @brief     Interface read a single event from ByteStream file given
-              a file name and event position in that file
-
-   @author:      Sergey Panitkin
-*/
-
-// FrameWork includes
-//#include "GaudiKernel/IService.h"
-#include "GaudiKernel/IInterface.h"
-
-#include <string>
-
-// Raw event definition here
-#include "ByteStreamData/RawEvent.h"
-
-
-/// Declaration of the interface ID ( interface id, major version, minor version)
-static const InterfaceID IID_IByteStreamSingleEventInputSvc("IByteStreamSingleEventInputSvc",1,0);
-
-//Gaudi style interface to Athena
-
-class IByteStreamSingleEventInputSvc : virtual public IInterface
-{
-
- public:
-
-
-  virtual ~IByteStreamSingleEventInputSvc(){};
-  
-  /// Retrieve interface ID
-  static const InterfaceID& interfaceID();
-
- 
-  /// get event for a given filename and event position
-  virtual const RawEvent* getEvent(const std::string& filename, const long long pos)= 0 ;
-
- protected:
-  // /standard constructor
-    IByteStreamSingleEventInputSvc(){};
-  
-};
-
-inline const InterfaceID& IByteStreamSingleEventInputSvc::interfaceID()
-{
-  return IID_IByteStreamSingleEventInputSvc;
-}
-
-#endif
diff --git a/Event/ByteStreamCnvSvc/python/ReadByteStreamTag.py b/Event/ByteStreamCnvSvc/python/ReadByteStreamTag.py
deleted file mode 100644
index 026359231d64bf99b2628df756d0a6a9821e860c..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/python/ReadByteStreamTag.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-
-###############################################################
-#
-# module for reading EventStorage BS input file.
-#==============================================================
-
-from AthenaCommon.AppMgr import theApp
-
-# get a handle on the ServiceManager
-svcMgr = theApp.serviceMgr()
-
-# Need Pool to read TAG in Pool format
-import AthenaPoolCnvSvc.ReadAthenaPool # noqa: F401
-
-# Services
-#from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ROBDataProviderSvc
-#svcMgr += ROBDataProviderSvc()
-
-# for EventType
-from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamCnvSvc
-svcMgr += ByteStreamCnvSvc()
-svcMgr.EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ]
-
-# ByteStreamAddressProviderSvc
-from ByteStreamCnvSvcBase. ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc
-svcMgr += ByteStreamAddressProviderSvc()
-ByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
-
-# specific for tag
-from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamNavigationProviderSvc
-svcMgr += ByteStreamNavigationProviderSvc( "ByteStreamNavigationProviderSvc" )
-svcMgr.ProxyProviderSvc.ProviderNames += [ "ByteStreamNavigationProviderSvc" ]
-
-# Basic metadata
-svcMgr.MetaDataSvc.MetaDataTools += [ "ByteStreamMetadataTool" ]
-
-# User metadata in FMD
-from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamAttListMetadataSvc
-svcMgr += ByteStreamAttListMetadataSvc("ByteStreamAttListMetadataSvc")
-
diff --git a/Event/ByteStreamCnvSvc/share/BSNavigationProvider_jobOptions.py b/Event/ByteStreamCnvSvc/share/BSNavigationProvider_jobOptions.py
deleted file mode 100644
index 1fe4c65e08681ade715c415fabcfca3e3918eb94..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/share/BSNavigationProvider_jobOptions.py
+++ /dev/null
@@ -1,35 +0,0 @@
-###############################################################
-#
-# Job options file for navigating to BS input file.
-#==============================================================
-
-"""
- -+- 19 330 A           svcMgr.ProxyProviderSvc.ProviderNames += [ "ByteStreamNavigationProviderSvc" ]
- -+- 19 331
- -+- 19 332 A           EventPersistencySvc = svcMgr.EventPersistencySvc
- -+- 19 333 A           EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ]
- -+- 19 334 A           svcMgr += Service("ByteStreamCnvSvc")
-"""
-# get a handle on the ServiceManager
-svcMgr = theApp.serviceMgr()
-
-# Services
-
-# for EventType
-from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamCnvSvc
-svcMgr += ByteStreamCnvSvc()
-
-# Properties 
-EventPersistencySvc = svcMgr.EventPersistencySvc
-EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ]
-
-# ByteStreamNavigationProviderSvc
-from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamNavigationProviderSvc
-svcMgr += ByteStreamNavigationProviderSvc()
-ByteStreamNavigationProviderSvc = svcMgr.ByteStreamNavigationProviderSvc
-
-# proxy provider
-from SGComps.SGCompsConf import ProxyProviderSvc
-svcMgr += ProxyProviderSvc()
-ProxyProviderSvc = svcMgr.ProxyProviderSvc
-ProxyProviderSvc.ProviderNames += [ "ByteStreamNavigationProviderSvc" ]
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
deleted file mode 100644
index 2f88663659625d3b3c12f2183fbd1519e0ca6aac..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Include files
-#include "ByteStreamNavigationProviderSvc.h"
-
-#include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
-#include "ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h"
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-
-#include "ByteStreamCnvSvc/IByteStreamSingleEventInputSvc.h"
-
-#include "EventInfo/EventInfo.h"
-
-#include "StoreGate/StoreGate.h"
-#include "StoreGate/ActiveStoreSvc.h"
-#include "SGTools/TransientAddress.h"
-
-#include "PersistentDataModel/DataHeader.h"
-
-//------------------------------------------------------------------------------------
-/// Standard constructor
-ByteStreamNavigationProviderSvc::ByteStreamNavigationProviderSvc(const std::string& name, ISvcLocator* svc) :
-	::AthService(name, svc),
-        m_rawEvent(0),
-	m_activeStoreSvc("ActiveStoreSvc", name),
-	m_addressProvider(0),
-	m_singleEventInputSvc("ByteStreamSingleEventInputSvc", name),
-	m_robDataProviderSvc("ROBDataProviderSvc", name) {
-   declareProperty("TypeNames", m_typeNames);
-}
-
-//------------------------------------------------------------------------------------
-/// Standard Destructor
-ByteStreamNavigationProviderSvc::~ByteStreamNavigationProviderSvc() {}
-//------------------------------------------------------------------------------------
-/// Initialize the service.
-StatusCode ByteStreamNavigationProviderSvc::initialize() {
-   ATH_MSG_INFO("Initializing " << name() << " - package version " << PACKAGE_VERSION);
-   if (!::AthService::initialize().isSuccess()) {
-      ATH_MSG_FATAL("Cannot initialize AthService base class.");
-      return(StatusCode::FAILURE);
-   }
-
-   if (!m_singleEventInputSvc.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Cannot get ByteStreamSingleEventInputSvc");
-      return(StatusCode::FAILURE);
-   }
-   if (!m_robDataProviderSvc.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Cannot get ROBDataProviderSvc");
-      return(StatusCode::FAILURE);
-   }
-   IService *pIS(0);
-   StatusCode status = service("ByteStreamAddressProviderSvc", "ByteStreamAddressProviderSvc", pIS);
-   if (status != StatusCode::SUCCESS || 0 == (m_addressProvider = dynamic_cast<IAddressProvider*>(pIS))) {
-      ATH_MSG_FATAL("Cannot get ByteStreamAddressProviderSvc");
-      return(StatusCode::FAILURE);
-   }
-   return(StatusCode::SUCCESS);
-}
-//------------------------------------------------------------------------------------
-/// Finalize the service.
-StatusCode ByteStreamNavigationProviderSvc::finalize() {
-   if (!m_robDataProviderSvc.release().isSuccess()) {
-      ATH_MSG_WARNING("Cannot release ROBDataProviderSvc");
-   }
-   return(::AthService::finalize());
-}
-//------------------------------------------------------------------------------------
-StoreGateSvc* ByteStreamNavigationProviderSvc::eventStore() {
-   if (m_activeStoreSvc == 0) {
-      if (!m_activeStoreSvc.retrieve().isSuccess()) {
-         ATH_MSG_ERROR("Cannot get ActiveStoreSvc");
-         throw GaudiException("Cannot get ActiveStoreSvc", name(), StatusCode::FAILURE);
-      }
-   }
-   return m_activeStoreSvc->operator->();
-}
-//------------------------------------------------------------------------------------
-StatusCode ByteStreamNavigationProviderSvc::loadAddresses(StoreID::type storeId, tadList& tlist) {
-   if (storeId != StoreID::EVENT_STORE) {
-      return(StatusCode::SUCCESS);
-   }
-   // Read bytestream event
-   StatusCode sc_re = readEvent();
-   if (!sc_re.isSuccess()) {
-      if (sc_re.isRecoverable()) {
-         // Recoverable error if header(s) was not found. Keep going
-         ATH_MSG_DEBUG("loadAddress: Cannot get ByteStream header");
-         return(StatusCode::SUCCESS);
-      } else {
-         ATH_MSG_ERROR("loadAddress: Cannot get ByteStream event");
-         return(StatusCode::FAILURE);
-      }
-   }
-   // Set event address for ROBDataProviderService
-   m_robDataProviderSvc->setNextEvent(m_rawEvent);
-   // Create new transient address from iop
-   IOpaqueAddress* iop = new ByteStreamAddress(ClassID_traits<EventInfo>::ID(), "", "");
-   SG::TransientAddress* tad = new SG::TransientAddress(ClassID_traits<EventInfo>::ID(), "ByteStreamEventInfo", iop, true);
-   tlist.push_back(tad);
-   StatusCode sc_pLA = m_addressProvider->preLoadAddresses(storeId, tlist);
-   return(sc_pLA);
-}
-//------------------------------------------------------------------------------------
-StatusCode ByteStreamNavigationProviderSvc::updateAddress(StoreID::type storeId,
-                                                          SG::TransientAddress* tad,
-                                                          const EventContext& ctx) {
-   ATH_MSG_DEBUG("In updateAddress for: " << tad->clID() << " / " << tad->name());
-   if (storeId != StoreID::EVENT_STORE) {
-      return(StatusCode::FAILURE);
-   }
-   // Check if tad is DataHeader
-   if (tad->clID() == ClassID_traits<DataHeader>::ID()) {
-      ATH_MSG_DEBUG("pdateAddress: tad is DataHeader");
-      return(StatusCode::FAILURE);
-   }
-   // If there is no Bytestream event, read one in
-   if (m_rawEvent == 0) {
-      StatusCode sc_re = readEvent();
-      // Exit with failure on hard read event error
-      if (!sc_re.isSuccess()) {
-         ATH_MSG_DEBUG("updateAddress: Cannot get ByteStream event");
-         return(StatusCode::FAILURE);
-      }
-      // Set event address for ROBDataProviderService
-      m_robDataProviderSvc->setNextEvent(m_rawEvent);
-   }
-   // Do Update address like in ByteStreamAddressProviderSvc
-   StatusCode sc_dUA = m_addressProvider->updateAddress(storeId, tad, ctx);
-   return(sc_dUA);
-}
-//------------------------------------------------------------------------------------
-//
-// Read one Bytestream event
-// File name and event offset are encoded in a Header token
-// with TECH signature 1000
-//
-StatusCode ByteStreamNavigationProviderSvc::readEvent() {
-   SG::ConstIterator<DataHeader> dataHeader, dataHeaderLast;
-   // Get all headers
-   StatusCode status = eventStore()->retrieve(dataHeader, dataHeaderLast);
-   if (!status.isSuccess()) {
-      m_rawEvent = 0;
-      ATH_MSG_DEBUG("readEvent: Cannot find any DataHeader in StoreGate");
-      return(StatusCode::RECOVERABLE);
-   }
-   std::string file;
-   const Token* token = 0;
-   // Find a header which has a token with Bytestrean attributes (TECH=1000)
-   for (; dataHeader != dataHeaderLast; dataHeader++) {
-      if (dataHeader->begin()->getToken() != 0
-	      && dataHeader->begin()->getToken()->technology() == 0x00001000) {
-          // Key hold file name
-         file  = dataHeader->getProcessTag();
-         token = dataHeader->begin()->getToken();
-      } else if (token == 0 && dataHeader->isInput()) {
-         for (std::vector<DataHeaderElement>::const_iterator i = dataHeader->beginProvenance(),
-		         iEnd = dataHeader->endProvenance(); i != iEnd; i++) {
-            if (i->getToken() != 0 && i->getToken()->technology() == 0x00001000) {
-               token = i->getToken();
-            }
-         }
-      }
-   }
-   // If there is no such header then return
-   if (file.empty()) {
-      if (token == 0) {
-         //set pointer to BS event to null
-         m_rawEvent = 0;
-         ATH_MSG_DEBUG("readEvent: Cannot find BS DataHeader in StoreGate");
-         return(StatusCode::RECOVERABLE);
-      } else {
-         const DataHeader* dh = nullptr;
-         StatusCode status = eventStore()->retrieve(dh, token->toString());
-         if (!status.isSuccess()) {
-            m_rawEvent = 0;
-            ATH_MSG_DEBUG("readEvent: Cannot retrieve BS DataHeader from StoreGate");
-            return(StatusCode::RECOVERABLE);
-         }
-         file  = dh->getProcessTag();
-         token = dh->begin()->getToken();
-      }
-   }
-   if (token == 0) {
-      ATH_MSG_ERROR("readEvent: Cannot get RawEvent Token");
-      return(StatusCode::FAILURE);
-   }
-   // Get event offset from the token
-   long long int offset = token->oid().second; 
-   if (!token->contID().empty()) {
-      unsigned long long int cntID;
-      sscanf(token->contID().c_str(), "%08llX", &cntID);
-      offset += (long long int)(cntID<<32);
-   }
-   ATH_MSG_DEBUG("readEvent: File name    : " << file);
-   ATH_MSG_DEBUG("readEvent: Ev. Offset   : " << offset);
-   // read one event and return pointer to it
-   m_rawEvent = m_singleEventInputSvc->getEvent(file, offset);
-   // Check if something is wrong
-   if (m_rawEvent == 0) {
-      ATH_MSG_ERROR("readEvent: Cannot retrieve RawEvent");
-      return(StatusCode::FAILURE);
-   }
-   return(StatusCode::SUCCESS);
-}
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h
deleted file mode 100644
index de863b6e74565592f475d30637cbf17aeca00a8a..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef BYTESTREAMNAVIGATIONPROVIDERSVC_H
-#define BYTESTREAMNAVIGATIONPROVIDERSVC_H
-
-/** @file ByteStreamNavigationProviderSvc.h
- *  @brief This file contains the class definition for the ByteStreamNavigationProviderSvc class.
- *  @author Peter van Gemmeren <gemmeren@anl.gov>
- **/
-
-#include "AthenaKernel/IAddressProvider.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "AthenaBaseComps/AthService.h"
-
-#include "ByteStreamData/RawEvent.h"
-
-#include <map>
-
-// Forward declarations
-class ActiveStoreSvc;
-class StoreGateSvc;
-class IByteStreamSingleEventInputSvc;
-class IROBDataProviderSvc;
-
-template <class TYPE> class SvcFactory;
-
-/** @class ByteStreamNavigationProviderSvc
- *  @brief This class implements IAddressProvider for ByteStream Back navigation.
- **/
-class ByteStreamNavigationProviderSvc : public ::AthService, public virtual IAddressProvider {
-
-   /// Allow the factory class access to the constructor
-   friend class SvcFactory<ByteStreamNavigationProviderSvc>;
-
-public:
-   ByteStreamNavigationProviderSvc(const std::string& name, ISvcLocator* svcloc);
-   virtual ~ByteStreamNavigationProviderSvc();
-
-   /// Service initialize
-   virtual StatusCode initialize();
-   /// Service finalize
-   virtual StatusCode finalize();
-
-   /// IAddressProvider interface.
-   /// Load the address
-   virtual StatusCode loadAddresses(StoreID::type id, tadList& tlist);
-
-   /// Update an existing transient Address
-   virtual StatusCode updateAddress(StoreID::type id,
-                                    SG::TransientAddress* tad,
-                                    const EventContext& ctx);
-
-private:
-   /// Return pointer to active event SG
-   StoreGateSvc* eventStore();
-
-   const RawEvent* m_rawEvent;
-
-   /// type and name of the objects to create the address for.
-   Gaudi::Property<std::vector<std::string>> m_typeNames;
-
-   typedef ServiceHandle<ActiveStoreSvc> ActiveStoreSvc_t;
-   ActiveStoreSvc_t m_activeStoreSvc;
-
-   typedef ServiceHandle<IAddressProvider> IAddressProvider_t;
-   //IAddressProvider_t m_addressProvider;
-   IAddressProvider* m_addressProvider;
-
-   ServiceHandle<IByteStreamSingleEventInputSvc> m_singleEventInputSvc;
-   ServiceHandle<IROBDataProviderSvc> m_robDataProviderSvc;
-
-   /// Read one BytestreamEvent
-   StatusCode readEvent();
-};
-
-#endif
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.cxx
deleted file mode 100644
index f91cb17eef1a87737c53495af7b07eff6fa02aad..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.cxx
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/** @file ByteStreamSingleEventInputSvc.cxx
- *  @brief This file contains the implementation for the ByteStreamSingleEventInputSvc class.
- *  @author Peter van Gemmeren <gemmeren@anl.gov>
- **/
-
-#include "ByteStreamSingleEventInputSvc.h"
-#include "DumpFrags.h"
-#include "ByteStreamData/ByteStreamMetadata.h"
-#include "EventStorage/pickDataReader.h"
-#include "EventStorage/EventStorageRecords.h"
-
-#include "GaudiKernel/GenericAddress.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/IIncidentSvc.h"
-#include "GaudiKernel/FileIncident.h"
-
-#include <unistd.h>
-
-#include "eformat/HeaderMarker.h"
-#include "eformat/Version.h"
-#include "eformat/old/util.h"
-
-#include "StoreGate/StoreGateSvc.h"
-
-//----------------------------------------------------------------------------------------
-ByteStreamSingleEventInputSvc::ByteStreamSingleEventInputSvc(const std::string& name, ISvcLocator* svcloc) :
-	::AthService(name, svcloc),
-	m_re(0),
-	m_reader(0),
-	m_mdSvc("StoreGateSvc/InputMetaDataStore", name),
-	m_incidentSvc("IncidentSvc", name),
-	m_currentFilename() {
-   declareProperty("DumpFlag", m_dump = false);
-}
-//----------------------------------------------------------------------------------------
-ByteStreamSingleEventInputSvc::~ByteStreamSingleEventInputSvc() {
-   delete m_re; m_re = 0;
-   delete m_reader; m_reader = 0;
-}
-//----------------------------------------------------------------------------------------
-StatusCode ByteStreamSingleEventInputSvc::initialize() {
-   if (!::AthService::initialize().isSuccess()) {
-      ATH_MSG_FATAL("Cannot initialize AthService base class.");
-      return(StatusCode::FAILURE);
-   }
-   if (!m_incidentSvc.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Cannot get IncidentSvc.");
-      return(StatusCode::FAILURE);
-   }
-   if (!m_mdSvc.retrieve().isSuccess()) {
-      ATH_MSG_FATAL("Cannot get InputMetaDataStore.");
-      return(StatusCode::FAILURE);
-   }
-   return(StatusCode::SUCCESS);
-}
-//________________________________________________________________________________
-StatusCode ByteStreamSingleEventInputSvc::stop() {
-   return(StatusCode::SUCCESS);
-}
-//----------------------------------------------------------------------------------------
-StatusCode ByteStreamSingleEventInputSvc::finalize() {
-   if (!m_mdSvc.release().isSuccess()) {
-      ATH_MSG_WARNING("Cannot release InputMetaDataStore.");
-   }
-   if (!m_incidentSvc.release().isSuccess()) {
-      ATH_MSG_WARNING("Cannot release IncidentSvc.");
-   }
-   return(::AthService::finalize());
-}
-//----------------------------------------------------------------------------------------
-const RawEvent* ByteStreamSingleEventInputSvc::getEvent(const std::string& filename, const long long pos) {
-   // Some sanity check here. Is the filename empty?
-   if (filename.empty()) {
-      ATH_MSG_ERROR("ByteStreamSingleEventInputSvc: Empty filename recieved for ByteStream " << filename);
-      return(0);
-   }
-   // Check if the file with given name is already opened
-   if (filename != m_currentFilename) {
-      if (!m_currentFilename.empty()) {
-         FileIncident endInputFileIncident(name(), "EndInputFile", "FID:" + m_reader->GUID(), m_reader->GUID());
-         m_incidentSvc->fireIncident(endInputFileIncident);
-      }
-      if (!m_mdSvc->clearStore().isSuccess()) {
-         ATH_MSG_WARNING("Unable to clear Input MetaData Proxies");
-      }
-      // Delete old reader if exists
-      delete m_reader; m_reader = 0;
-      // Pick up new reader
-      m_reader = pickDataReader(filename);
-      // Check if reader pick up was successful. Sanity check mostly.
-      if (m_reader == 0){
-         ATH_MSG_ERROR("Cannot pick up valid reader for the file : " << filename);
-         return(0);
-      }
-      if (m_currentFilename.empty()) {
-         FileIncident firstInputFileIncident(name(), "FirstInputFile", "BSF:" + m_reader->GUID(), m_reader->GUID());
-         m_incidentSvc->fireIncident(firstInputFileIncident);
-      }
-      // Double check of a sort here. Interrogate reader for a file name.
-      // Remove later for efficiency and use  just filename?
-      ATH_MSG_DEBUG("Picked valid file: " << m_reader->fileName());
-      // All was good and a new reader is picked up
-      // Call new file as "currently open file"
-      m_currentFilename = filename;
-
-      // Get ByteStream Metadata into Input MetaData Store
-      std::bitset<64> word1;
-      std::bitset<64> word2;
-      for (unsigned int i=0; i<64; ++i) {
-         word1[i] = m_reader->detectorMask()[i];
-         word2[i] = m_reader->detectorMask()[i+64];
-      }
-      ByteStreamMetadata* metadata = new ByteStreamMetadata(m_reader->runNumber(), m_reader->eventsInFile(),
-	      m_reader->maxEvents(), m_reader->recEnable(), m_reader->triggerType(), word1.to_ulong(), word2.to_ulong(),
-	      m_reader->beamType(), m_reader->beamEnergy(), m_reader->GUID(), m_reader->stream(),
-	      m_reader->projectTag(), m_reader->lumiblockNumber(), m_reader->freeMetaDataStrings());
-      if (!m_mdSvc->record(metadata, "ByteStreamMetadata").isSuccess()) {
-         delete metadata; metadata = 0;
-         ATH_MSG_WARNING("Unable to record Input MetaData for ByteStream");
-      }
-      FileIncident beginInputFileIncident(name(), "BeginInputFile", "BSF:" + m_reader->GUID(), m_reader->GUID());
-      m_incidentSvc->fireIncident(beginInputFileIncident);
-   } // current filename check
-   char *buf;
-   unsigned int eventSize;
-
-   // Temporarily, until tdaq-common switches to "long long int" for event position
-   long int tmppos;
-   tmppos = (long)pos;
-   // Another sanity check for truncation error of conversion of "long long" to "long".
-   // Probably never needed after tdaq update, mildly useful before that.
-   long long int check_pos;
-   check_pos = (long long)tmppos;
-   if (check_pos != pos) {
-      // Truncation error here
-      ATH_MSG_ERROR("Truncation error for event position in file " << pos << ": " << check_pos);
-      return(0);
-   }
-   DRError ecode = m_reader->getData(eventSize, &buf, tmppos);
-   if (DROK != ecode) {
-      ATH_MSG_ERROR("Error reading event in position: " << pos);
-      return(0);
-   }
-   // Delete the old event
-   if (m_re) {
-      OFFLINE_FRAGMENTS_NAMESPACE::PointerType st = 0;
-      m_re->start(st);
-      delete [] st;
-      delete m_re; m_re = 0;
-   }
-   OFFLINE_FRAGMENTS_NAMESPACE::DataType* fragment = reinterpret_cast<OFFLINE_FRAGMENTS_NAMESPACE::DataType*>(buf);
-   // Check fragment type
-   const uint32_t headWord = fragment[0];
-   ATH_MSG_DEBUG("First word of the fragment " << MSG::hex << headWord << MSG::dec);
-   // Format version
-   const uint32_t formatVersion = eformat::helper::Version(fragment[3]).major_version();
-   ATH_MSG_DEBUG("Format version " << MSG::hex << formatVersion << MSG::dec);
-   // Error message
-   if ((formatVersion != eformat::MAJOR_DEFAULT_VERSION)
-	   && (formatVersion != eformat::MAJOR_V24_VERSION)
-	   && (formatVersion != eformat::MAJOR_V30_VERSION)
-	   && (formatVersion != eformat::MAJOR_V31_VERSION)) {
-      ATH_MSG_ERROR("Unsupported Format Version: " << MSG::hex << formatVersion << MSG::dec);
-   }
-   if (eformat::FULL_EVENT == headWord || 0xcc1234cc == headWord) {// ROS = 0xcc1234cc
-      // Convert old ROS fragment
-      if (formatVersion != eformat::MAJOR_DEFAULT_VERSION) {
-         // 100 for increase of data-size due to header conversion
-         uint32_t newRosSize = eventSize + 100;
-         OFFLINE_FRAGMENTS_NAMESPACE::DataType* newFragment = new OFFLINE_FRAGMENTS_NAMESPACE::DataType[newRosSize];
-         eformat::old::convert(fragment, newFragment, newRosSize);
-         // Delete old fragment
-         delete [] fragment;
-         // Set new pointer
-         fragment = newFragment;
-      }
-      // This is a FullEventFragment make a new FEFrag in memory from it
-      m_re = new RawEvent(fragment);
-      ATH_MSG_DEBUG("Made an FullEventFragment from ES");
-      // Check validity
-      try {
-         m_re->check_tree();
-      } catch (...) {
-         // Bad event
-         ATH_MSG_ERROR("Failed to create FullEventFragment");
-         delete m_re; m_re = 0;
-         delete [] fragment;
-         return(0);
-      }
-   } else {
-      // Unknown fragment
-      ATH_MSG_ERROR("Unknown Header word in input fragment" << MSG::hex << headWord);
-      return(0);
-   }
-   if (m_dump) {
-      DumpFrags::dump(m_re);
-   }
-   return(m_re);
-}
-//----------------------------------------------------------------------------------------
-StatusCode ByteStreamSingleEventInputSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
-   if (IByteStreamSingleEventInputSvc::interfaceID().versionMatch(riid)) {
-      *ppvInterface = dynamic_cast<IByteStreamSingleEventInputSvc*>(this);
-   } else {
-      // Interface is not directly available: try out a base class
-      return(::AthService::queryInterface(riid, ppvInterface));
-   }
-   addRef();
-   return(StatusCode::SUCCESS);
-}
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h
deleted file mode 100644
index bf6e749dd9f0b0bdf63670135889ca1979ca6a08..0000000000000000000000000000000000000000
--- a/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef BYTESTREAMSINGLEEVENTINPUTSVC_H
-#define BYTESTREAMSINGLEEVENTINPUTSVC_H
-
-/** @file ByteStreamSingleEventInputSvc.h
- *  @brief This file contains the class definition for the ByteStreamSingleEventInputSvc class.
- *  @author Peter van Gemmeren <gemmeren@anl.gov>
- **/
-
-#include "EventStorage/DataReader.h"
-
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/Property.h"  // no forward decl: typedef
-#include "AthenaBaseComps/AthService.h"
-
-#include "ByteStreamCnvSvc/IByteStreamSingleEventInputSvc.h"
-
-#include "ByteStreamData/RawEvent.h"
-
-class StoreGateSvc;
-class IIncidentSvc;
-
-/** @class ByteStreamSingleEventInputSvc
- *  @brief This class implements the interface to the ByteStreamInputSvc for reading a single event
- *  from ByteStream file given a file name and event position in that file.
- **/
-class ByteStreamSingleEventInputSvc : public ::AthService, virtual public IByteStreamSingleEventInputSvc {
-public:
-   /// Standard Service Constructor
-   ByteStreamSingleEventInputSvc(const std::string& name, ISvcLocator* pSvcLocator);
-   /// Destructor
-   virtual ~ByteStreamSingleEventInputSvc();
-
-   /// Required of all Gaudi Services
-   StatusCode initialize();
-   StatusCode stop();
-   StatusCode finalize();
-   /// Required of all Gaudi services:  see Gaudi documentation for details
-   StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
-
-   /// get event for a given filename and event position
-   const RawEvent* getEvent(const std::string& filename, const long long pos);
-
-private: // data
-   RawEvent*          m_re;            //!< current event
-   DataReader*        m_reader;        //!< DataReader from EventStorage
-   ServiceHandle<StoreGateSvc> m_mdSvc; //!< StoreGateSvc
-   ServiceHandle<IIncidentSvc> m_incidentSvc; //!< IncidentSvc
-   std::string        m_currentFilename; //!< name of the currently opened file
-
-private: // properties
-   Gaudi::Property<bool>    m_dump;	      //!< Dump fragments
-};
-
-#endif
diff --git a/Event/ByteStreamCnvSvc/src/components/ByteStreamCnvSvc_entries.cxx b/Event/ByteStreamCnvSvc/src/components/ByteStreamCnvSvc_entries.cxx
index a1dbb13243f4bb0172a9bd982896f5684a86e4c7..eba4f795afbad8af58bf0a80e66735af094663cd 100644
--- a/Event/ByteStreamCnvSvc/src/components/ByteStreamCnvSvc_entries.cxx
+++ b/Event/ByteStreamCnvSvc/src/components/ByteStreamCnvSvc_entries.cxx
@@ -6,8 +6,6 @@
 #include "../ByteStreamRDP_OutputSvc.h"
 #include "../ByteStreamEventStorageInputSvc.h"
 #include "../ByteStreamEventStorageOutputSvc.h"
-#include "../ByteStreamSingleEventInputSvc.h"
-#include "../ByteStreamNavigationProviderSvc.h"
 #include "../ByteStreamOutputStreamCopyTool.h"
 #include "../ByteStreamMetadataTool.h"
 #include "../ByteStreamAttListMetadataSvc.h"
@@ -20,8 +18,6 @@ DECLARE_COMPONENT( ByteStreamMergeOutputSvc )
 DECLARE_COMPONENT( ByteStreamRDP_OutputSvc )
 DECLARE_COMPONENT( ByteStreamEventStorageInputSvc )
 DECLARE_COMPONENT( ByteStreamEventStorageOutputSvc )
-DECLARE_COMPONENT( ByteStreamSingleEventInputSvc )
-DECLARE_COMPONENT( ByteStreamNavigationProviderSvc )
 DECLARE_COMPONENT( ByteStreamAttListMetadataSvc )
 
 DECLARE_COMPONENT( ByteStreamOutputStreamCopyTool )
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_CLinkEventCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_CLinkEventCnv.cxx
index 498c3f18610fb154db29292f3afd49bf70f3f36f..fc25d2510e0a5bc0c702f164973f4ffcd4cb82b2 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_CLinkEventCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_CLinkEventCnv.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 "ALFA_EventTPCnv/ALFA_CLinkEventCnv_p1.h"
@@ -28,7 +28,7 @@ ALFA_CLinkEvent* ALFA_CLinkEventCnv::createTransient()
 	static const pool::Guid p1_guid ("D8FCB0A1-3B3E-4536-B590-1A48347B6E1A");
 
 	if( this->compareClassGuid(p1_guid)){
-		std::auto_ptr< ALFA_CLinkEvent_p1 >   col_vect( this->poolReadObject< ALFA_CLinkEvent_p1 >() );
+		std::unique_ptr< ALFA_CLinkEvent_p1 >   col_vect( this->poolReadObject< ALFA_CLinkEvent_p1 >() );
 		trans_cont = TPConverter_p1.createTransient( col_vect.get(), LogStream );
 	}
 	else {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_DigitCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_DigitCollectionCnv.cxx
index 711996b8f116f11a310351aeadb7c4d71dab4db4..fbfee1926f689730a60818055837541be4edb1b0 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_DigitCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_DigitCollectionCnv.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 "ALFA_EventTPCnv/ALFA_DigitCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_DigitCollection* ALFA_DigitCollectionCnv::createTransient() {
     static const pool::Guid p1_guid ("0F21F6BB-6719-41D3-8219-3ABF523826CD");   
  
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_DigitCollection_p1 >   col_vect( this->poolReadObject< ALFA_DigitCollection_p1 >() );
+         std::unique_ptr< ALFA_DigitCollection_p1 >   col_vect( this->poolReadObject< ALFA_DigitCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_GloRecEvCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_GloRecEvCollectionCnv.cxx
index 0108c9c0ae6a915fe25f948b39c16cceccf013bd..4179eebc7414e4ea82d59af895539cca3bf2e914 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_GloRecEvCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_GloRecEvCollectionCnv.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 "ALFA_EventTPCnv/ALFA_GloRecEvCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_GloRecEvCollection* ALFA_GloRecEvCollectionCnv::createTransient() {
     static const pool::Guid p1_guid ("210D255A-F94F-4009-9A9B-2122597330D5");
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_GloRecEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_GloRecEvCollection_p1 >() );
+         std::unique_ptr< ALFA_GloRecEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_GloRecEvCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_HitCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_HitCollectionCnv.cxx
index 946ed8d5098e4b86fe4b10829d293da98f0662f5..0fb61b0dba19dc4de72c2698532e914e48d8ec12 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_HitCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_HitCollectionCnv.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 "ALFA_EventTPCnv/ALFA_HitCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_HitCollection* ALFA_HitCollectionCnv::createTransient() {
     static const pool::Guid   p1_guid("96320556-17C7-4E8D-9D15-DF955193F002");
 
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_HitCollection_p1 >   col_vect( this->poolReadObject< ALFA_HitCollection_p1 >() );
+         std::unique_ptr< ALFA_HitCollection_p1 >   col_vect( this->poolReadObject< ALFA_HitCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrEvCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrEvCollectionCnv.cxx
index 71268a415db68f5428ab83adcdcbf63a45b641c5..c421878295b079e1090c33481b941126d079a0bf 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrEvCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrEvCollectionCnv.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 "ALFA_EventTPCnv/ALFA_LocRecCorrEvCollectionCnv_p1.h"
@@ -25,7 +25,7 @@ ALFA_LocRecCorrEvCollection* ALFA_LocRecCorrEvCollectionCnv::createTransient() {
 
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_LocRecCorrEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecCorrEvCollection_p1 >() );
+         std::unique_ptr< ALFA_LocRecCorrEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecCorrEvCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrODEvCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrODEvCollectionCnv.cxx
index 81f6817760e0e9656ffda924754ea7801e46d128..32ca3eb71278977b75c2cb3b5ddbbd1e618a949a 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrODEvCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecCorrODEvCollectionCnv.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 "ALFA_EventTPCnv/ALFA_LocRecCorrODEvCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_LocRecCorrODEvCollection* ALFA_LocRecCorrODEvCollectionCnv::createTransient
     static const pool::Guid p1_guid ("5EB65543-BEC9-4920-B545-F1C6AB88C289");
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_LocRecCorrODEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecCorrODEvCollection_p1 >() );
+         std::unique_ptr< ALFA_LocRecCorrODEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecCorrODEvCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecEvCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecEvCollectionCnv.cxx
index cfd1fc2c7d1aa31d1c83fb8a707d82fdf7adece3..c4f018a4564ecb53c4283fd05a1d538fb747b5ce 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecEvCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecEvCollectionCnv.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 "ALFA_EventTPCnv/ALFA_LocRecEvCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_LocRecEvCollection* ALFA_LocRecEvCollectionCnv::createTransient() {
     static const pool::Guid p1_guid ("C392157A-4519-44B5-A472-16D1F74F4CAD");
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_LocRecEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecEvCollection_p1 >() );
+         std::unique_ptr< ALFA_LocRecEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecEvCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecODEvCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecODEvCollectionCnv.cxx
index eb9050093978970aa330ae912ff64a5be97fad64..34873026595394b9058a811efcda24e967f027a6 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecODEvCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_LocRecODEvCollectionCnv.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 "ALFA_EventTPCnv/ALFA_LocRecODEvCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_LocRecODEvCollection* ALFA_LocRecODEvCollectionCnv::createTransient() {
     static const pool::Guid p1_guid ("D6688847-9903-4FDE-B709-879B0E470073");
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_LocRecODEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecODEvCollection_p1 >() );
+         std::unique_ptr< ALFA_LocRecODEvCollection_p1 >   col_vect( this->poolReadObject< ALFA_LocRecODEvCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODDigitCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODDigitCollectionCnv.cxx
index 43473fd9b3ef26034aaf91154999d626e35cc982..7d0223f5d249a09337f7d519b1fb78a50de3b624 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODDigitCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODDigitCollectionCnv.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 "ALFA_EventTPCnv/ALFA_ODDigitCollectionCnv_p1.h"
@@ -25,7 +25,7 @@ ALFA_ODDigitCollection* ALFA_ODDigitCollectionCnv::createTransient() {
 
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_ODDigitCollection_p1 >   col_vect( this->poolReadObject< ALFA_ODDigitCollection_p1 >() );
+         std::unique_ptr< ALFA_ODDigitCollection_p1 >   col_vect( this->poolReadObject< ALFA_ODDigitCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODHitCollectionCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODHitCollectionCnv.cxx
index f487986037bca1b978d9a7f8d56040b9c175b746..a0ec1ca2ab73f5c4de006836be94def03f47b088 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODHitCollectionCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_ODHitCollectionCnv.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 "ALFA_EventTPCnv/ALFA_ODHitCollectionCnv_p1.h"
@@ -24,7 +24,7 @@ ALFA_ODHitCollection* ALFA_ODHitCollectionCnv::createTransient() {
     static const pool::Guid   p1_guid("11D7B0C9-54FF-44BF-A673-E9691004488B");
     
     if( this->compareClassGuid(p1_guid)) {
-         std::auto_ptr< ALFA_ODHitCollection_p1 >   col_vect( this->poolReadObject< ALFA_ODHitCollection_p1 >() );
+         std::unique_ptr< ALFA_ODHitCollection_p1 >   col_vect( this->poolReadObject< ALFA_ODHitCollection_p1 >() );
         trans_cont = TPConverter_p1.createTransient( col_vect.get(), mlog );
     }
 //    else if( m_token.find("CLID=35722E01-C4E3-420E-8A7E-E375C5E7989D") != std::string::npos) {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv.cxx
index 582b3655672a5af4f0ae5ad54e5d06d3a2a300d9..18076c4549b9d37a9d82cf1ec21bf46f99d35908 100755
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv.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 "ALFA_RawDataContainerCnv.h"
@@ -33,7 +33,7 @@ static const pool::Guid p1_guid("0C023583-E3D4-4C7D-9B20-B6B2A1018D2F");
 
 if (this->compareClassGuid(p1_guid)) {
 
-     std::auto_ptr< ALFA_RawDataContainer_p1 > persCont(poolReadObject< ALFA_RawDataContainer_p1 >());
+     std::unique_ptr< ALFA_RawDataContainer_p1 > persCont(poolReadObject< ALFA_RawDataContainer_p1 >());
 
      transCont = TPConverter_p1.createTransient(persCont.get(), log);
   }
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv_charge.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv_charge.cxx
index 7d43870dc661cc14b045a39d02f0481495a2c45b..d55c8b63c60d138f4e111ba59571309c5ecc66b8 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv_charge.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_EventAthenaPool/src/ALFA_RawDataContainerCnv_charge.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 "ALFA_RawDataContainerCnv_charge.h"
@@ -29,7 +29,7 @@ static const pool::Guid p1_guid("0C023583-E3D4-4C7D-9B20-B6B2A1018D2F");
 
 if (this->compareClassGuid(p1_guid)) {
 
-     std::auto_ptr< ALFA_RawDataContainer_charge_p1 > persCont(poolReadObject< ALFA_RawDataContainer_charge_p1 >());
+     std::unique_ptr< ALFA_RawDataContainer_charge_p1 > persCont(poolReadObject< ALFA_RawDataContainer_charge_p1 >());
 
      transCont = TPConverter_p1.createTransient(persCont.get(), log);
   }
diff --git a/Generators/AtlasHepMC/AtlasHepMC/Flow.h b/Generators/AtlasHepMC/AtlasHepMC/Flow.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb686562d48f0bdebc76dd8b0b98fa2e65a97523
--- /dev/null
+++ b/Generators/AtlasHepMC/AtlasHepMC/Flow.h
@@ -0,0 +1,11 @@
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+   Author: Andrii Verbytskyi andrii.verbytskyi@mpp.mpg.de
+*/
+#ifndef ATLASHEPMC_FLOW_H
+#define ATLASHEPMC_FLOW_H
+#include "HepMC/Flow.h"
+namespace HepMC
+{
+template <class T> int flow(T a,int i=0){return a->flow(i);}
+}
+#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
index 188191ed095c45f07400dc2001dc7211d7df3819..82e8a52dee3ae6ce6a2ae502dde495094b19b47f 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/GenEvent.h
@@ -11,13 +11,13 @@ inline int signal_process_id(const GenEvent e) {
 inline int signal_process_id(const GenEvent* e) {
     return e->signal_process_id();
 }
-inline void set_signal_process_id(const GenEvent* e, const int i) {
+inline void set_signal_process_id(GenEvent* e, const int i) {
     e->set_signal_process_id(i);
 }
-template <class T> void set_random_states(const GenEvent* e, std::vector<T> a) {
+template <class T> void set_random_states(GenEvent* e, std::vector<T> a) {
     e->set_random_states(a);
 }
-template <class T> void set_signal_process_vertex(const GenEvent* e, T v) {
+template <class T> void set_signal_process_vertex(GenEvent* e, T v) {
     e->set_signal_process_vertex(v);
 }
 }
diff --git a/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h b/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h
index ca0546e00b310dcc73deed1efac78ad622cd7c37..95152b32ebc554585b71daefb2cb957261a980cd 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/IO_HEPEVT.h
@@ -5,4 +5,3 @@
 #define ATLASHEPMC_IOHEPEVT_H
 #include "HepMC/IO_HEPEVT.h"
 #endif
-#endif
diff --git a/Generators/AtlasHepMC/AtlasHepMC/Polarization.h b/Generators/AtlasHepMC/AtlasHepMC/Polarization.h
index 43f15800e6647461d108c68b12eb6daa4383ac4d..65033c4dff71973bc28b9e8a489bedaeec155b5c 100644
--- a/Generators/AtlasHepMC/AtlasHepMC/Polarization.h
+++ b/Generators/AtlasHepMC/AtlasHepMC/Polarization.h
@@ -6,10 +6,10 @@
 #include "HepMC/Polarization.h"
 namespace HepMC
 {
-void template<class T> set_polarization( T a,  Polarization b) {
+template<class T> void set_polarization( T a,  Polarization b) {
     a->set_polarization(b);
 }
-template<class T> Polarization polarization(T a) {
+template<class T>  Polarization polarization(T a) {
     return a->polarization();
 }
 }
diff --git a/Generators/BeamHaloGenerator/BeamHaloGenerator/BeamHaloParticle.h b/Generators/BeamHaloGenerator/BeamHaloGenerator/BeamHaloParticle.h
index 705af75eb11775e30d0b8bd031ffcaa7bbd926a9..dc06be312c3fbeee703a78724a25bf9a1fd83699 100644
--- a/Generators/BeamHaloGenerator/BeamHaloGenerator/BeamHaloParticle.h
+++ b/Generators/BeamHaloGenerator/BeamHaloGenerator/BeamHaloParticle.h
@@ -5,7 +5,7 @@
 #ifndef BEAMHALOPARTICLE_H
 #define BEAMHALOPARTICLE_H
 
-#include "HepMC/SimpleVector.h"
+#include "AtlasHepMC/SimpleVector.h"
 
 class MarsParticle;
 class FlukaParticle;
diff --git a/Generators/BeamHaloGenerator/BeamHaloGenerator/FlukaParticle.h b/Generators/BeamHaloGenerator/BeamHaloGenerator/FlukaParticle.h
index 75b9c650230dffe225b6a562d5e70f0aaacf58b1..1a3c8f0b6bc2f9dfd23c7ecfbc0e0dfc1d1d71fb 100644
--- a/Generators/BeamHaloGenerator/BeamHaloGenerator/FlukaParticle.h
+++ b/Generators/BeamHaloGenerator/BeamHaloGenerator/FlukaParticle.h
@@ -5,7 +5,7 @@
 #ifndef FLUKAPARTICLE_H
 #define FLUKAPARTICLE_H
 
-#include "HepMC/SimpleVector.h"
+#include "AtlasHepMC/SimpleVector.h"
 #include <string>
 #include <vector>
 
diff --git a/Generators/BeamHaloGenerator/BeamHaloGenerator/MarsParticle.h b/Generators/BeamHaloGenerator/BeamHaloGenerator/MarsParticle.h
index fe917e9222d1cbc1a939e631a2f517939260246e..fa3c4765d19af6b2116a2204523380c3024f7936 100644
--- a/Generators/BeamHaloGenerator/BeamHaloGenerator/MarsParticle.h
+++ b/Generators/BeamHaloGenerator/BeamHaloGenerator/MarsParticle.h
@@ -5,7 +5,7 @@
 #ifndef MARSPARTICLE_H
 #define MARSPARTICLE_H
 
-#include "HepMC/SimpleVector.h"
+#include "AtlasHepMC/SimpleVector.h"
 #include <vector>
 #include <string>
 
diff --git a/Generators/BeamHaloGenerator/CMakeLists.txt b/Generators/BeamHaloGenerator/CMakeLists.txt
index 89013188628dbe80b906a2a7063ee434509c9212..a7c3698d566f60d0ed91f0f29fb2f495c3a5fe46 100644
--- a/Generators/BeamHaloGenerator/CMakeLists.txt
+++ b/Generators/BeamHaloGenerator/CMakeLists.txt
@@ -8,13 +8,13 @@ atlas_subdir( BeamHaloGenerator )
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
+                          Generators/AtlasHepMC
                           Generators/GeneratorModules
                           PRIVATE
                           Control/AthenaKernel )
 
 # External dependencies:
 find_package( CLHEP )
-find_package( HepMC )
 find_package( HepPDT )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -22,16 +22,16 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 atlas_add_library( BeamHaloGeneratorLib
                    src/*.cxx
                    PUBLIC_HEADERS BeamHaloGenerator
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
                    PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel GeneratorModulesLib
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} AtlasHepMCLib GaudiKernel GeneratorModulesLib
                    PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel )
 
 atlas_add_component( BeamHaloGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel GeneratorModulesLib AthenaKernel BeamHaloGeneratorLib )
+                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib GaudiKernel GeneratorModulesLib AthenaKernel BeamHaloGeneratorLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/BeamHaloGenerator/src/BeamHaloGenerator.cxx b/Generators/BeamHaloGenerator/src/BeamHaloGenerator.cxx
index 5c62cc5041e843ba0524cbf04265155ef843fb6f..2bef9d36dacbaaa7f3fcdc23b6a674b1fcafb528 100644
--- a/Generators/BeamHaloGenerator/src/BeamHaloGenerator.cxx
+++ b/Generators/BeamHaloGenerator/src/BeamHaloGenerator.cxx
@@ -7,7 +7,7 @@
 #include "BeamHaloGenerator/BeamHaloGeneratorAlg.h"
 #include "BeamHaloGenerator/AsciiInput.h"
 #include "BeamHaloGenerator/BeamHaloGeneratorSettings.h"
-#include "HepMC/GenEvent.h"
+#include "AtlasHepMC/GenEvent.h"
 #include "CLHEP/Random/RandFlat.h"
 #include "CLHEP/Units/PhysicalConstants.h"
 #include "TMath.h"
diff --git a/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx b/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
index 24eb69ae94d8f26546fbc3d8e01c70f307d9c46c..ded853cd5fa22dd667028c5524d87435de87a531 100644
--- a/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
+++ b/Generators/BeamHaloGenerator/src/BeamHaloGeneratorAlg.cxx
@@ -9,7 +9,7 @@
 
 #include "GaudiKernel/MsgStream.h"
 #include "AthenaKernel/IAtRndmGenSvc.h"
-#include "HepMC/GenEvent.h"
+#include "AtlasHepMC/GenEvent.h"
 #include <cmath>
 
 //--------------------------------------------------------------------------
diff --git a/Generators/BeamHaloGenerator/src/FlukaHaloGenerator.cxx b/Generators/BeamHaloGenerator/src/FlukaHaloGenerator.cxx
index d25049a54e998c8bdc1c504c840b82c516715b48..6b77219f6caf50858923c99188352be3716482c0 100644
--- a/Generators/BeamHaloGenerator/src/FlukaHaloGenerator.cxx
+++ b/Generators/BeamHaloGenerator/src/FlukaHaloGenerator.cxx
@@ -8,7 +8,7 @@
 #include "BeamHaloGenerator/BeamHaloGeneratorAlg.h"
 #include "BeamHaloGenerator/BeamHaloGeneratorSettings.h"
 
-#include "HepMC/GenEvent.h"
+#include "AtlasHepMC/GenEvent.h"
 #include "CLHEP/Random/RandFlat.h"
 #include <cmath>
 
diff --git a/Generators/CavernBkgGenerator/CMakeLists.txt b/Generators/CavernBkgGenerator/CMakeLists.txt
index 31982a0859ca8f9109c92a93687c9b01457dac48..9e03eb960fa5d1c98f7437617e8e614821f7ecc6 100644
--- a/Generators/CavernBkgGenerator/CMakeLists.txt
+++ b/Generators/CavernBkgGenerator/CMakeLists.txt
@@ -9,11 +9,11 @@ atlas_subdir( CavernBkgGenerator )
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaKernel
                           GaudiKernel
+                          Generators/AtlasHepMC
                           Generators/GeneratorModules )
 
 # External dependencies:
 find_package( CLHEP )
-find_package( HepMC )
 find_package( HepPDT )
 find_package( ROOT COMPONENTS minicern )
 
@@ -29,14 +29,14 @@ atlas_add_library( CavernBkgGeneratorLib
                    src/atlrgeom.F
                    src/vdist.F
                    PUBLIC_HEADERS CavernBkgGenerator
-                   INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}  ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaKernel GaudiKernel ${ROOT_LIBRARIES} GeneratorModulesLib )
+                   LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GaudiKernel ${ROOT_LIBRARIES} GeneratorModulesLib )
 
 atlas_add_component( CavernBkgGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaKernel GaudiKernel GeneratorModulesLib CavernBkgGeneratorLib )
+                     INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GaudiKernel GeneratorModulesLib CavernBkgGeneratorLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Generators/CavernBkgGenerator/CavernBkgGenerator/MuonBackgroundConverter.h b/Generators/CavernBkgGenerator/CavernBkgGenerator/MuonBackgroundConverter.h
index 002e7f0c2c5a8a2f70e5a2672713ac382940d1c6..65b3c197e0e833b3acedbb453826791ef5ad7ea1 100644
--- a/Generators/CavernBkgGenerator/CavernBkgGenerator/MuonBackgroundConverter.h
+++ b/Generators/CavernBkgGenerator/CavernBkgGenerator/MuonBackgroundConverter.h
@@ -36,7 +36,7 @@
 #include "CLHEP/Random/RandomEngine.h"
 
 #include "CLHEP/Vector/LorentzVector.h"
-#include "HepMC/Polarization.h"
+#include "AtlasHepMC/Polarization.h"
 
 #include <iostream>
 #include <fstream>
diff --git a/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx b/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx
index e1c95a009713a336a776679ef53cb584e6dbfb15..d08bd2fb92a77c5ae61eea4caafd1ea9632ac050 100644
--- a/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx
+++ b/Generators/CavernBkgGenerator/src/MuonBackgroundConverter.cxx
@@ -34,8 +34,8 @@
 #include "CLHEP/Units/SystemOfUnits.h"
 #include "CLHEP/Units/PhysicalConstants.h"
 
-#include "HepMC/GenEvent.h"
-#include "HepMC/Polarization.h"
+#include "AtlasHepMC/GenEvent.h"
+#include "AtlasHepMC/Polarization.h"
 
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
diff --git a/Generators/CosmicGenerator/CMakeLists.txt b/Generators/CosmicGenerator/CMakeLists.txt
index 16ffa7ba363eaea5590c83150e11a0498f6e7162..76563e250d8f2890f71a7b13829aaedcbdd2af7b 100644
--- a/Generators/CosmicGenerator/CMakeLists.txt
+++ b/Generators/CosmicGenerator/CMakeLists.txt
@@ -8,13 +8,13 @@ atlas_subdir( CosmicGenerator )
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaKernel
+                          Generators/AtlasHepMC
                           Generators/GeneratorModules
                           PRIVATE
                           GaudiKernel )
 
 # External dependencies:
 find_package( CLHEP )
-find_package( HepMC )
 
 # Component(s) in the package:
 atlas_add_library( CosmicGeneratorLib
@@ -22,15 +22,15 @@ atlas_add_library( CosmicGeneratorLib
                    src/CosmicGun.cxx
                    src/CosmicGenerator.cxx
                    PUBLIC_HEADERS CosmicGenerator
-                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaKernel GeneratorModulesLib
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib
                    PRIVATE_LINK_LIBRARIES GaudiKernel )
 
 atlas_add_component( CosmicGenerator
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthenaKernel GeneratorModulesLib GaudiKernel CosmicGeneratorLib )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorModulesLib GaudiKernel CosmicGeneratorLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Generators/CosmicGenerator/CosmicGenerator/CosmicGenerator.h b/Generators/CosmicGenerator/CosmicGenerator/CosmicGenerator.h
index ba8b7d983f1260b524ea81687970fb7c1d6a3714..cc60c6fec1e8e1e4540a07deb24644d75018664d 100644
--- a/Generators/CosmicGenerator/CosmicGenerator/CosmicGenerator.h
+++ b/Generators/CosmicGenerator/CosmicGenerator/CosmicGenerator.h
@@ -62,7 +62,7 @@ in the vertical position (the way it is positioned in the ATLAS detector)
 #include "AthenaKernel/IAtRndmGenSvc.h"
 
 #include "CLHEP/Vector/LorentzVector.h"
-#include "HepMC/Polarization.h"
+#include "AtlasHepMC/Polarization.h"
 
 #include <iostream>
 #include <fstream>
diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt
index 3273be6c85f44b70b68ccc717d82527232060e32..83b7d47ade407cf7e9eafb31e8653a0ce3f406ee 100644
--- a/Generators/EvgenProdTools/CMakeLists.txt
+++ b/Generators/EvgenProdTools/CMakeLists.txt
@@ -35,7 +35,15 @@ atlas_add_component( EvgenProdTools
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps TruthHelper GeneratorModulesLib AthenaKernel EventInfo GaudiKernel TruthUtils EvgenProdToolsLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/common/*.py )
 atlas_install_runtime( share/file/*.txt )
 atlas_install_scripts( scripts/simple_lhe_plotter.py )
+
+atlas_add_test( flake8_share
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 --ignore=F401,F821,ATL900 ${CMAKE_CURRENT_SOURCE_DIR}/share
+                POST_EXEC_SCRIPT nopost.sh )
+
+atlas_add_test( flake8_scripts
+                SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/scripts
+                POST_EXEC_SCRIPT nopost.sh )
diff --git a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
index 8cd3cf537fa0dd3d80dcb38bbbd67266e6c37dc4..3000e69bb6a1fdc58c13839d81ec0b70791ce156 100644
--- a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
+++ b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
@@ -1,4 +1,4 @@
-#  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 ##==============================================================================
 ## Name:        LogicalExpressionFilter.py
 ##
@@ -18,9 +18,6 @@ __author__  = "Will Buttinger <will@cern.ch>"
 
 import AthenaPython.PyAthena as PyAthena
 from AthenaPython.PyAthena import StatusCode
-from GaudiKernel.GaudiHandles import *
-from AthenaCommon.AlgSequence import AlgSequence
-from AthenaCommon.Logging import logging
 
 import tokenize, random
 from cStringIO import StringIO
@@ -156,7 +153,7 @@ class LogicalExpressionFilter( PyAthena.Alg ):
 
             #execute command once to validate
             #response = bool(eval(self.cmd))
-        except Exception, e:
+        except Exception as e:
             self.msg.fatal("%s is not a valid Python expression string. Exception: %s" % (self.Expression,e))
             return StatusCode.Failure
 
@@ -197,7 +194,7 @@ class LogicalExpressionFilter( PyAthena.Alg ):
         response = bool(eval(self.cmd)) if self.cmd else True
 
         if self.Sampling>0 and self.Sampling<=1 and not response:
-            for a in xrange(len(mc[0].weights())): mc[0].weights()[a] /= self.Sampling
+            for a in range(len(mc[0].weights())): mc[0].weights()[a] /= self.Sampling
             mc[0].weights().push_back( int(response) )
             event_weight /= self.Sampling
             response = random.random()<self.Sampling
@@ -219,7 +216,7 @@ class LogicalExpressionFilter( PyAthena.Alg ):
                 self.nEventsPassedPosWeighted+=event_weight
             else :
                 self.nEventsPassedNegWeighted+=abs(event_weight)
-        self.msg.debug("My decision is: %s" % response)
+        self.msg.debug("My decision is: %s", response)
         self.setFilterPassed(response)
         return StatusCode.Success
 
@@ -232,8 +229,8 @@ class LogicalExpressionFilter( PyAthena.Alg ):
         self.msg.info("Filter Expression = " + self.Expression)
         efficiency = float(self.nEventsPassed)/float(self.nEventsProcessed) if self.nEventsProcessed!=0 else 0.0
         efficiencyWeighted = float(self.nEventsPassedWeighted)/float(self.nEventsProcessedWeighted) if self.nEventsProcessedWeighted!=0 else 0.0
-        self.msg.info("Filter Efficiency = %f [%s / %s]" % (efficiency,self.nEventsPassed,self.nEventsProcessed))
-        self.msg.info("Weighted Filter Efficiency = %f [%f / %f]" % (efficiencyWeighted,self.nEventsPassedWeighted,self.nEventsProcessedWeighted))
+        self.msg.info("Filter Efficiency = %f [%s / %s]", efficiency,self.nEventsPassed,self.nEventsProcessed)
+        self.msg.info("Weighted Filter Efficiency = %f [%f / %f]", efficiencyWeighted,self.nEventsPassedWeighted,self.nEventsProcessedWeighted)
         print("MetaData: GenFiltEff = %e" % (efficiencyWeighted if self.UseEventWeight else efficiency))
 
         print("MetaData: sumOfPosWeights = %e" % (self.nEventsPassedPosWeighted if self.UseEventWeight else self.nEventsPassed))
diff --git a/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py b/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py
index b969e10d686b81ab823464ccef921370717c11a1..beb6280bd8020f66562e52c5b92eecb8729e4a67 100755
--- a/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py
+++ b/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py
@@ -1,7 +1,10 @@
 #!/usr/bin/env python
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
 
 # Basic ROOT setup
-import ROOT,sys,os,math,glob,array
+import ROOT,sys,math,glob
 ROOT.SetSignalPolicy( ROOT.kSignalFast )
 ROOT.gROOT.SetBatch(True)
 ROOT.gErrorIgnoreLevel = ROOT.kError
@@ -9,9 +12,10 @@ ROOT.gErrorIgnoreLevel = ROOT.kError
 # Check for the right input files
 if len(sys.argv)>1:
     inputfilenames = []
-    for a in sys.argv[1].split(','): inputfilenames+=glob.glob(a)
+    for a in sys.argv[1].split(','):
+        inputfilenames+=glob.glob(a)
 else:
-    print 'Please specify an input LHE file (or comma-separated lists of them)'
+    print ('Please specify an input LHE file (or comma-separated lists of them)')
     sys.exit(1)
 
 # Set up histograms
@@ -48,12 +52,13 @@ for inputfilename in inputfilenames:
             # Check for the ktdurham cut
             if 'ktdurham' in line and '=' in line:
                 # Print the matching cut for info
-                print 'Matching cut:',float(line.split()[0])
+                print ('Matching cut:',float(line.split()[0]))
                 continue
             # Check for a comment
-            if len(line.split('#')[0].strip())==0: continue
+            if len(line.split('#')[0].strip())==0:
+                continue
             # Check if we have entered an event
-            if not event and not '<event>' in line:
+            if not event and '<event>' not in line:
                 continue
             # Check if we are just starting an event
             if not event and '<event>' in line:
@@ -74,8 +79,10 @@ for inputfilename in inputfilenames:
                 continue
             # Deal with the inital state partons first
             if npartons>extras+2:
-                if npartons>extras+3: e_init_0.Fill( float(line.split()[9]) )
-                else:                 e_init_1.Fill( float(line.split()[9]) )
+                if npartons>extras+3:
+                    e_init_0.Fill( float(line.split()[9]) )
+                else:
+                    e_init_1.Fill( float(line.split()[9]) )
                 pdg_init.Fill( abs(int(line.split()[0])) )
                 npartons -= 1
                 continue
@@ -84,17 +91,25 @@ for inputfilename in inputfilenames:
             pt = math.sqrt(momentum_x*momentum_x+momentum_y*momentum_y)
             # Now deal with hard scatter partons
             if npartons>extras:
-                if npartons>extras+1: pt_hard_0.Fill(pt)
-                else:                 pt_hard_1.Fill(pt)
+                if npartons>extras+1:
+                    pt_hard_0.Fill(pt)
+                else:
+                    pt_hard_1.Fill(pt)
                 npartons -= 1
                 continue
             # Now we are into the extras
-            if extras==npartons: pt_extra_0.Fill(pt)
-            elif extras-1==npartons: pt_extra_1.Fill(pt)
-            elif extras-2==npartons: pt_extra_2.Fill(pt)
-            elif extras-3==npartons: pt_extra_3.Fill(pt)
-            elif extras-4==npartons: pt_extra_4.Fill(pt)
-            elif extras-5==npartons: pt_extra_5.Fill(pt)
+            if extras==npartons:
+                pt_extra_0.Fill(pt)
+            elif extras-1==npartons:
+                pt_extra_1.Fill(pt)
+            elif extras-2==npartons:
+                pt_extra_2.Fill(pt)
+            elif extras-3==npartons:
+                pt_extra_3.Fill(pt)
+            elif extras-4==npartons:
+                pt_extra_4.Fill(pt)
+            elif extras-5==npartons:
+                pt_extra_5.Fill(pt)
             pdg_extras.Fill( abs(int(line.split()[0])) )
             npartons-=1
         # End of loop over input file lines
diff --git a/Generators/EvgenProdTools/share/EnableFixHepMC.py b/Generators/EvgenProdTools/share/EnableFixHepMC.py
index 169e35bf7ab5e32e7c58cec01cd7ec06a8a352aa..1cc5bf3853c5d6de6f05b55e2d435ca6af770b07 100644
--- a/Generators/EvgenProdTools/share/EnableFixHepMC.py
+++ b/Generators/EvgenProdTools/share/EnableFixHepMC.py
@@ -1,7 +1,8 @@
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # This fragment turns on the FixHepMC algorithm
 from AthenaCommon.AlgSequence import AlgSequence
 topAlg = AlgSequence()
-print "Running FixHepMC"
+printfunc ("Running FixHepMC")
 if not hasattr(topAlg, "FixHepMC"):
     # TODO: what if it exists but at the wrong point in the sequence? Move to the end?
     from EvgenProdTools.EvgenProdToolsConf import FixHepMC
diff --git a/Generators/EvgenProdTools/share/common/EnableFixHepMC.py b/Generators/EvgenProdTools/share/common/EnableFixHepMC.py
index 169e35bf7ab5e32e7c58cec01cd7ec06a8a352aa..1cc5bf3853c5d6de6f05b55e2d435ca6af770b07 100644
--- a/Generators/EvgenProdTools/share/common/EnableFixHepMC.py
+++ b/Generators/EvgenProdTools/share/common/EnableFixHepMC.py
@@ -1,7 +1,8 @@
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # This fragment turns on the FixHepMC algorithm
 from AthenaCommon.AlgSequence import AlgSequence
 topAlg = AlgSequence()
-print "Running FixHepMC"
+printfunc ("Running FixHepMC")
 if not hasattr(topAlg, "FixHepMC"):
     # TODO: what if it exists but at the wrong point in the sequence? Move to the end?
     from EvgenProdTools.EvgenProdToolsConf import FixHepMC
diff --git a/Generators/EvgenProdTools/share/common/find_unique_file.py b/Generators/EvgenProdTools/share/common/find_unique_file.py
index dc37297d4569fb14a79168f110c216be5d60c8d8..88d9f26206770c710e3950defa764a0b6373a9c2 100644
--- a/Generators/EvgenProdTools/share/common/find_unique_file.py
+++ b/Generators/EvgenProdTools/share/common/find_unique_file.py
@@ -1,3 +1,4 @@
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 ## Helper functions for input file handling
 def find_unique_file(pattern):
     "Return a matching file, provided it is unique"
diff --git a/Generators/EvgenProdTools/share/common/merge_lhe_files.py b/Generators/EvgenProdTools/share/common/merge_lhe_files.py
index c91c809a17315c03c3e6a119841a636fe40c8232..e9e2f2628d06a01ad5d8a70d2a5bb88c9dc7f54c 100644
--- a/Generators/EvgenProdTools/share/common/merge_lhe_files.py
+++ b/Generators/EvgenProdTools/share/common/merge_lhe_files.py
@@ -1,8 +1,9 @@
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # This function merges a list of input LHE file to make one outputFile.  The header is taken from the first
 # file, but the number of events is updated to equal the total number of events in all the input files
 def merge_lhe_files(listOfFiles,outputFile):
     if(os.path.exists(outputFile)):
-      print "outputFile ",outputFile," already exists.  Will rename to ",outputFile,".OLD"
+      printfunc ("outputFile ",outputFile," already exists.  Will rename to ",outputFile,".OLD")
       os.rename(outputFile,outputFile+".OLD")
     output = open(outputFile,'w')
     holdHeader = ""
@@ -14,7 +15,7 @@ def merge_lhe_files(listOfFiles,outputFile):
     for file in listOfFiles:
        inHeader = True
        header = ""
-       print "*** Starting file ",file
+       printfunc ("*** Starting file ",file)
        for line in open(file,"r"):
 ##        Reading first event signals that we are done with all the header information
 ##        Using this approach means the script will properly handle any metadata stored
diff --git a/Generators/EvgenProdTools/share/common/mult_lhe_input.py b/Generators/EvgenProdTools/share/common/mult_lhe_input.py
index d07f4e42b01e06487379c026c24e179aae984e9b..6302b243c1926dd5148bb406a4ca774c6563f066 100644
--- a/Generators/EvgenProdTools/share/common/mult_lhe_input.py
+++ b/Generators/EvgenProdTools/share/common/mult_lhe_input.py
@@ -1,3 +1,4 @@
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 include("EvgenProdTools/merge_lhe_files.py")
 include("EvgenProdTools/find_unique_file.py")
 
@@ -8,7 +9,7 @@ numberOfFiles = len(genInputFiles)
 if numberOfFiles > 1:
     allFiles = []
     for file in genInputFiles:
-              print "input file name ",file
+              printfunc ("input file name ",file)
 #             Since we can have multiple files from the same task, inputroot must include more of the filename
 #             to make it unique
               if ".tar" in os.path.basename(file):
@@ -17,7 +18,7 @@ if numberOfFiles > 1:
                 input0 = os.path.basename(file).split("._")[0]
                 input1 = (os.path.basename(file).split("._")[1]).split(".")[0]
                 inputroot = input0+"._"+input1
-#              print "inputroot ",inputroot
+#              printfunc ("inputroot ",inputroot)
               realEventsFile = find_unique_file('*%s.*ev*ts' % inputroot)
 #             The only input format where merging is permitted is LHE
               with open(realEventsFile, 'r') as f:
@@ -26,13 +27,13 @@ if numberOfFiles > 1:
                     raise RuntimeError("%s is NOT a LesHouche file" % realEventsFile)
                  allFiles.append(realEventsFile)
                  
-    print ("Found more than one LHE file: {}".format(numberOfFiles))
+    printfunc (("Found more than one LHE file: {}".format(numberOfFiles)))
 #    my_lhe_file = "merged_lhef.events"
 # skeleton.GENtoEVGEN splits the file name on "._" (in rel. 20.7.9.9.6,MCProd,
 # so insert this in the merged file name - to make it run also for this release)
     my_lhe_file = "merged_lhef._0.events"
     merge_lhe_files(allFiles, my_lhe_file )
-    print ("Using uncompressed LHE file '{}' as inputGeneratorFile".format(my_lhe_file))
+    printfunc (("Using uncompressed LHE file '{}' as inputGeneratorFile".format(my_lhe_file)))
     runArgs.inputGeneratorFile = my_lhe_file
 
     
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h
index fb26d0994e8fb60f149348e2187a839179795bcc..acbc9e3b4b0d58e3b100f2cfd9fbfce3088d9740 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h
@@ -37,7 +37,7 @@ class ITRT_StrawStatusSummaryTool: virtual public IAlgTool
   virtual int getStatusHT(const Identifier) const =0;
   virtual bool get_status(const Identifier) const =0;
   virtual bool get_statusHT(const Identifier) const =0;
-
+  virtual const StrawStatusContainer* getStrawStatusHTContainer() const =0;
 
   virtual int getStatus(const Identifier, const EventContext&  ) const =0;
   virtual int getStatusPermanent(const Identifier, const EventContext& ) const =0;
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx
index f5bbf5a2bbe110232b23c64e218bc843b97cd993..88d92074eb6a3912f93fdc9c007105b24e71272f 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.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
 */
 
 /** @file TRT_StrawStatusSummaryTool.cxx
@@ -56,7 +56,7 @@ StatusCode TRT_StrawStatusSummaryTool::initialize()
 
 StatusCode TRT_StrawStatusSummaryTool::finalize()
 {
-  msg(MSG::INFO) << " in finalize() " << endmsg;
+  ATH_MSG_INFO(" in finalize() ");
   return StatusCode::SUCCESS;
 }
 
@@ -108,6 +108,20 @@ int TRT_StrawStatusSummaryTool::getStatusHT(Identifier offlineID, const EventCon
  return int((*strawstatusHTcontainer).get(id).getstatus());
 }
 
+const TRTCond::StrawStatusMultChanContainer* TRT_StrawStatusSummaryTool::getStrawStatusHTContainer() const{
+
+  const StrawStatusContainer* strawstatusHTcontainer;
+  if(m_isGEANT4) {
+     strawstatusHTcontainer=m_strawstatusHTG4.cptr();
+  }
+  else {
+    SG::ReadCondHandle<StrawStatusContainer> rht(m_statHTReadKey,Gaudi::Hive::currentContext());
+    strawstatusHTcontainer=(*rht);
+  }
+
+ return strawstatusHTcontainer;
+}
+
 
 ///////////////////////////////////////////////////
 
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.h
index a2dc72bf9bf50b72b41543a594f4ccd5c3fc9368..5d6bfc71a79ade996856b25891b3b122f081e612 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawStatusSummaryTool.h
@@ -1,6 +1,7 @@
+
 //Dear emacs this is -*-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
 */
 
 #ifndef TRT_STRAWSTATUSSUMMARYTOOL_H
@@ -63,6 +64,7 @@ class TRT_StrawStatusSummaryTool: public extends<AthAlgTool, ITRT_StrawStatusSum
   virtual bool get_statusHT(Identifier offlineId) const override {
     return get_statusHT(offlineId,Gaudi::Hive::currentContext());
   }
+  virtual const StrawStatusContainer* getStrawStatusHTContainer() const override;
 
   virtual int getStatus(Identifier offlineId,const EventContext& ) const override;
   virtual int getStatusPermanent(Identifier offlineId, const EventContext&) const override;
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
index 8fb9718e74a269b502cb2e30ace53a1d219de2e0..63ae8c42e0d8ae214182f37065f9a4256232a264 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.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 "GeoPrimitives/GeoPrimitives.h"
@@ -83,7 +83,7 @@ double magn(GeoTrf::Vector2D& vector)
 /////////////////////////////////// Constructor //////////////////////////////////
 //
 TRTDetectorFactory_Full::TRTDetectorFactory_Full(const InDetDD::AthenaComps * athenaComps,
-						 ServiceHandle<ITRT_StrawStatusSummarySvc> summarySvc, // added for Argon
+						 const ITRT_StrawStatusSummaryTool* sumTool, // added for Argon
 						 bool useOldActiveGasMixture,
 						 bool DC2CompatibleBarrelCoordinates,
 						 int overridedigversion,
@@ -99,13 +99,12 @@ TRTDetectorFactory_Full::TRTDetectorFactory_Full(const InDetDD::AthenaComps * at
     m_DC2CompatibleBarrelCoordinates(DC2CompatibleBarrelCoordinates),
     m_overridedigversion(overridedigversion),
     m_alignable(alignable),
-    m_sumSvc("TRT_StrawStatusSummarySvc","InDetTRTStrawStatusSummarySvc"),
+    m_sumTool(sumTool),
     m_strawsvcavailable(0),
     m_doArgon(doArgon),
     m_doKrypton(doKrypton),
     m_useDynamicAlignFolders(useDynamicAlignmentFolders)
 { 
-  m_sumSvc=summarySvc;
 }
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -153,7 +152,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 
   //---------------------- Initialize the parameter interface ------------------------//
 
-  msg(MSG::DEBUG) << " Getting primary numbers from the Detector Description Database " << endmsg;  
+  ATH_MSG_DEBUG( " Getting primary numbers from the Detector Description Database " );  
   TRT_DetDescrDB_ParameterInterface * parameterInterface = new TRT_DetDescrDB_ParameterInterface(getAthenaComps());
   m_data = parameterInterface;
 
@@ -165,13 +164,14 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   //---------------------- Check if the folder TRT/Cond/StatusHT is in place ------------------------//
   m_strawsvcavailable = false;
   if (m_doArgon || m_doKrypton){
-  	m_strawsvcavailable = detStore()->contains<TRTCond::StrawStatusMultChanContainer>("/TRT/Cond/StatusHT");
-	m_strawsvcavailable &= (m_sumSvc->getStrawStatusHTContainer() != nullptr);
+    m_strawsvcavailable = detStore()->contains<TRTCond::StrawStatusMultChanContainer>("/TRT/Cond/StatusHT") &&
+                          m_sumTool->getStrawStatusHTContainer() != nullptr;
   }
-  msg(MSG::DEBUG) << "The folder of /TRT/Cond/StatusHT is available? " << m_strawsvcavailable << endmsg ;
-  if (!m_strawsvcavailable) msg(MSG::WARNING) << "The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON" << endmsg;
-  if (!m_doArgon  )	msg(MSG::WARNING) << "Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION" << endmsg;
-  if (!m_doKrypton)	msg(MSG::WARNING) << "Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION" << endmsg;
+  // --------------------- In a normal reconstruction or digitization job, the folder will not be available at this point. No reason for warnings here.
+  ATH_MSG_DEBUG( "The folder of /TRT/Cond/StatusHT is available? " << m_strawsvcavailable) ;
+  if (!m_strawsvcavailable) ATH_MSG_DEBUG("The folder of /TRT/Cond/StatusHT is NOT available, WHOLE TRT RUNNING XENON" );
+  if (!m_doArgon  )	ATH_MSG_DEBUG("Tool setup will force to NOT to use ARGON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION");
+  if (!m_doKrypton)	ATH_MSG_DEBUG( "Tool setup will force to NOT to use KRYPTON. Ignore this warning if you are running RECONSTRUCTION or DIGI, but cross-check if you are running SIMULATION");
   
  
   //---------------------- Initialize ID Helper ------------------------------------//
@@ -182,10 +182,9 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   const TRT_ID *idHelper = 0;
 
   if (detStore()->retrieve(idHelper, "TRT_ID").isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve TRT ID Helper" << endmsg;
-  } //else {
-    //idHelperInitialized = true;
-  //}
+    ATH_MSG_ERROR( "Could not retrieve TRT ID Helper");
+  }
+
   m_detectorManager->setIdHelper(idHelper,false);
 
   //---------------------- Set and Print Version Information ------------------------------------//
@@ -244,8 +243,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 
 
   // Print version information.
-  msg(MSG::INFO) << "In TRT Detector Factory (For DC2 and later geometries)" << endmsg;
-  msg(MSG::INFO) << " " << version.fullDescription() << endmsg;
+  ATH_MSG_INFO( "In TRT Detector Factory (For DC2 and later geometries)" );
+  ATH_MSG_INFO( " " << version.fullDescription() );
 
 
   //---------- Set flags for which parts of the detector are built -----------//
@@ -356,11 +355,10 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
     m_detectorManager->setDigitizationVersion(m_data->digversion,m_data->digversionname);
   } else {
     m_detectorManager->setDigitizationVersion(m_overridedigversion,"CUSTOMOVERRIDDEN");
-    msg(MSG::INFO) << "Digversion overridden via joboptions from " 
-		      << m_data->digversion << " ('" << m_data->digversionname << "') to " 
-		      << m_detectorManager->digitizationVersion()<< " ('" 
-		      << m_detectorManager->digitizationVersionName()<<"')" 
-		      << endmsg;
+    ATH_MSG_INFO( "Digversion overridden via joboptions from " 
+		  << m_data->digversion << " ('" << m_data->digversionname << "') to " 
+		  << m_detectorManager->digitizationVersion()<< " ('" 
+		  << m_detectorManager->digitizationVersionName()<<"')" );
   }
 
 
@@ -418,8 +416,8 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
     GeoLogVol  *lBarrelVol = new GeoLogVol("TRTBarrel", sBarrelVol, m_materialManager->getMaterial("trt::CO2"));
     pBarrelVol = new GeoFullPhysVol(lBarrelVol);
 
-    msg(MSG::DEBUG) << "Virtual TRT Barrel volume defined by RMin = "<<m_data->virtualBarrelInnerRadius 
-		    <<", Rmax = "<<m_data->virtualBarrelOuterRadius<<" Zmax = "<<m_data->virtualBarrelVolumeLength  << endmsg;
+    ATH_MSG_DEBUG( "Virtual TRT Barrel volume defined by RMin = "<<m_data->virtualBarrelInnerRadius 
+		   <<", Rmax = "<<m_data->virtualBarrelOuterRadius<<" Zmax = "<<m_data->virtualBarrelVolumeLength );
 
     // Common Endcap volumes (one for forward, one for backward):
     //GeoPhysVol *pCommonEndcapVolume[2];
@@ -720,10 +718,10 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
       GeoTrf::Vector2D shellCorner3(m_data->shellCornerXPosition[iABC][2],m_data->shellCornerYPosition[iABC][2]);
       GeoTrf::Vector2D shellCorner4(m_data->shellCornerXPosition[iABC][3],m_data->shellCornerYPosition[iABC][3]);
       GeoTrf::Transform3D shellPosition(GeoTrf::Transform3D::Identity());
-      if ( shellCorner1.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner1 is <= 0 (" << shellCorner1 << ")" << endmsg; }
-      if ( shellCorner2.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner2 is <= 0 (" << shellCorner2 << ")" << endmsg; }
-      if ( shellCorner3.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner3 is <= 0 (" << shellCorner3 << ")" << endmsg; }
-      if ( shellCorner4.y() <= 0 ) { msg(MSG::DEBUG) << "shellCorner4 is <= 0 (" << shellCorner4 << ")" << endmsg; }
+      if ( shellCorner1.y() <= 0 ) { ATH_MSG_DEBUG( "shellCorner1 is <= 0 (" << shellCorner1 << ")"); }
+      if ( shellCorner2.y() <= 0 ) { ATH_MSG_DEBUG( "shellCorner2 is <= 0 (" << shellCorner2 << ")"); }
+      if ( shellCorner3.y() <= 0 ) { ATH_MSG_DEBUG( "shellCorner3 is <= 0 (" << shellCorner3 << ")" ); }
+      if ( shellCorner4.y() <= 0 ) { ATH_MSG_DEBUG( "shellCorner4 is <= 0 (" << shellCorner4 << ")"); }
       const GeoShape * sShell = makeModule(m_data->lengthOfBarrelVolume,
 					   shellCorner1,shellCorner2,shellCorner3,shellCorner4,shellPosition);
 
@@ -978,7 +976,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
 	pShell->add(new GeoIdentifierTag(iABC));
   TRT_Identifier = idHelper->straw_id(1, iMod, iABC, 1, 1);
   int strawStatusHT = TRTCond::StrawStatus::Good;
-  if (m_strawsvcavailable && (m_doArgon || m_doKrypton)) strawStatusHT = m_sumSvc->getStatusHT(TRT_Identifier);
+  if (m_strawsvcavailable && (m_doArgon || m_doKrypton)) strawStatusHT = m_sumTool->getStatusHT(TRT_Identifier);
   ActiveGasMixture agm = DecideGasMixture(strawStatusHT);
 
   // Ruslan: insert radiators with Ar-straws
@@ -986,22 +984,22 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
   switch (agm)
     {
     case GM_ARGON:
-      msg(MSG::DEBUG) << "Marking Argon straws from /TRT/Cond/StatusHT:\t"
-                      << idHelper->print_to_string(TRT_Identifier) << endmsg; 
+      ATH_MSG_DEBUG( "Marking Argon straws from /TRT/Cond/StatusHT:\t"
+		     << idHelper->print_to_string(TRT_Identifier)); 
       pShell->add(pRadAR);
       break;
     case GM_KRYPTON:
-      msg(MSG::DEBUG) << "Marking Krypton straws from /TRT/Cond/StatusHT:\t"
-                      << idHelper->print_to_string(TRT_Identifier) << endmsg;
+      ATH_MSG_DEBUG( "Marking Krypton straws from /TRT/Cond/StatusHT:\t"
+		     << idHelper->print_to_string(TRT_Identifier));
       pShell->add(pRadKR);
       break;
     case GM_XENON:
-      msg(MSG::DEBUG) << "Marking Xenon straws from /TRT/Cond/StatusHT:\t"
-                      << idHelper->print_to_string(TRT_Identifier) << endmsg;
+      ATH_MSG_DEBUG( "Marking Xenon straws from /TRT/Cond/StatusHT:\t"
+		     << idHelper->print_to_string(TRT_Identifier) );
       pShell->add(pRad);
       break;
     default:
-      msg(MSG::FATAL) << "Unexpected gas mixture: " << agm << endmsg; 
+      ATH_MSG_FATAL( "Unexpected gas mixture: " << agm ); 
       throw std::runtime_error("Unexpected gas mixture");
       return;
     }
@@ -1292,7 +1290,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
     int bar_ec = (iiSide) ? -2 : +2;
     TRT_Identifier = idHelper->straw_id(bar_ec, 1, iiWheel, 1, 1);
     int strawStatusHT = TRTCond::StrawStatus::Good;
-    if (m_strawsvcavailable && (m_doArgon || m_doKrypton)) strawStatusHT = m_sumSvc->getStatusHT(TRT_Identifier);
+    if (m_strawsvcavailable && (m_doArgon || m_doKrypton)) strawStatusHT = m_sumTool->getStatusHT(TRT_Identifier);
     ActiveGasMixture agm = DecideGasMixture(strawStatusHT);
 
     // Ruslan: insert plane with Ar-straws
@@ -1300,22 +1298,22 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
     switch (agm)
       {
       case GM_ARGON:
-        msg(MSG::DEBUG) << "Marking Argon straws from /TRT/Cond/StatusHT:\t"
-                        << idHelper->print_to_string(TRT_Identifier) << endmsg;
+        ATH_MSG_DEBUG( "Marking Argon straws from /TRT/Cond/StatusHT:\t"
+		       << idHelper->print_to_string(TRT_Identifier) );
         childPlane = pStrawPlaneA_Ar->clone(); 
         break;
       case GM_KRYPTON:
-        msg(MSG::DEBUG) << "Marking Krypton straws from /TRT/Cond/StatusHT:\t"
-                        << idHelper->print_to_string(TRT_Identifier) << endmsg;
+        ATH_MSG_DEBUG( "Marking Krypton straws from /TRT/Cond/StatusHT:\t"
+		       << idHelper->print_to_string(TRT_Identifier) );
         childPlane = pStrawPlaneA_Kr->clone();
         break;
       case GM_XENON:
-        msg(MSG::DEBUG) << "Marking Xenon straws from /TRT/Cond/StatusHT:\t"
-                        << idHelper->print_to_string(TRT_Identifier) << endmsg;
+        ATH_MSG_DEBUG( "Marking Xenon straws from /TRT/Cond/StatusHT:\t"
+		       << idHelper->print_to_string(TRT_Identifier) );
         childPlane = pStrawPlaneA->clone();
         break;
       default:
-        msg(MSG::FATAL) << "Unexpected gas mixture: " << agm << endmsg; 
+        ATH_MSG_FATAL( "Unexpected gas mixture: " << agm ); 
         throw std::runtime_error("Unexpected gas mixture");
         return;
       }
@@ -1601,7 +1599,7 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
     int bar_ec = (iiSide) ? -2 : +2;
     TRT_Identifier = idHelper->straw_id(bar_ec, 1, iiWheel, 1, 1);
     int strawStatusHT = TRTCond::StrawStatus::Good;
-    if (m_strawsvcavailable && (m_doArgon || m_doKrypton)) strawStatusHT = m_sumSvc->getStatusHT(TRT_Identifier);
+    if (m_strawsvcavailable && (m_doArgon || m_doKrypton)) strawStatusHT = m_sumTool->getStatusHT(TRT_Identifier);
     ActiveGasMixture agm = DecideGasMixture(strawStatusHT);
 
     //Ruslan: insert plane with Ar-straws
@@ -1609,22 +1607,22 @@ void TRTDetectorFactory_Full::create(GeoPhysVol *world)
     switch (agm)
       {
       case GM_ARGON:
-        msg(MSG::DEBUG) << "Marking Argon straws from /TRT/Cond/StatusHT:\t"
-                        << idHelper->print_to_string(TRT_Identifier) << endmsg;
+        ATH_MSG_DEBUG( "Marking Argon straws from /TRT/Cond/StatusHT:\t"
+		       << idHelper->print_to_string(TRT_Identifier) );
         childPlane = pStrawPlaneB_Ar->clone();
         break;
       case GM_KRYPTON:
-        msg(MSG::DEBUG) << "Marking Krypton straws from /TRT/Cond/StatusHT:\t"
-                        << idHelper->print_to_string(TRT_Identifier) << endmsg;
+        ATH_MSG_DEBUG( "Marking Krypton straws from /TRT/Cond/StatusHT:\t"
+		       << idHelper->print_to_string(TRT_Identifier));
         childPlane = pStrawPlaneB_Kr->clone();
         break;
       case GM_XENON:
-        msg(MSG::DEBUG) << "Marking Xenon straws from /TRT/Cond/StatusHT:\t"
-                        << idHelper->print_to_string(TRT_Identifier) << endmsg;
+        ATH_MSG_DEBUG( "Marking Xenon straws from /TRT/Cond/StatusHT:\t"
+		       << idHelper->print_to_string(TRT_Identifier));
         childPlane = pStrawPlaneB->clone();
         break;
       default:
-        msg(MSG::FATAL) << "Unexpected gas mixture: " << agm << endmsg; 
+        ATH_MSG_FATAL( "Unexpected gas mixture: " << agm); 
         throw std::runtime_error("Unexpected gas mixture");
         return;
       }
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h
index 85a19e3a42cb5abf37080d7a98413506d52f2312..f7230ed439b3f98bd8551e46415aee0da7fba8a6 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRTDetectorFactory_Full.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //-----------------------------------------------------------------------------//
@@ -17,8 +17,7 @@
 #include "InDetGeoModelUtils/InDetDetectorFactoryBase.h"
 #include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
 
-#include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" //for Argon
-#include "GaudiKernel/ServiceHandle.h"
+#include "TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h" //for Argon
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "GeoModelKernel/GeoDefinitions.h"
 
@@ -37,7 +36,7 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
   //                                                                           //
   // Constructor:                                                              //
   TRTDetectorFactory_Full(const InDetDD::AthenaComps * athenaComps,            //
-			  ServiceHandle<ITRT_StrawStatusSummarySvc> m_sumSvc,  //
+			  const ITRT_StrawStatusSummaryTool * sumTool,         //
 			  bool useOldActiveGasMixture,                         //
 			  bool DC2CompatibleBarrelCoordinates,                 //
 			  int overridedigversion,                              //
@@ -62,7 +61,7 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
     return n;
   }
 
-
+ typedef TRTCond::StrawStatusMultChanContainer StrawStatusContainer;
  private:  
 
   //---------------------------Illegal operations:---------------------------------//
@@ -99,11 +98,12 @@ class TRTDetectorFactory_Full : public InDetDD::DetectorFactoryBase  {
   bool m_DC2CompatibleBarrelCoordinates;
   int m_overridedigversion;
   bool m_alignable;
-  ServiceHandle<ITRT_StrawStatusSummarySvc> m_sumSvc; // added for Argon
+  const ITRT_StrawStatusSummaryTool* m_sumTool; // added for Argon
   bool m_strawsvcavailable;
   bool m_doArgon;
   bool m_doKrypton;
   bool m_useDynamicAlignFolders;
+
 };
 
 #endif // TRTDetectorFactory_Full_h
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
index 7cc90cc93356ecc87b5f5cfcbe9b5da1ee20d62b..c01f2c5266e9ad2624a8267fc0d67869f39f279f 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.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 "TRT_DetectorTool.h"
@@ -34,7 +34,7 @@ TRT_DetectorTool::TRT_DetectorTool( const std::string& type, const std::string&
     m_geoDbTagSvc("GeoDbTagSvc",name),
     m_rdbAccessSvc("RDBAccessSvc",name),
     m_geometryDBSvc("InDetGeometryDBSvc",name),
-    m_sumSvc("TRT_StrawStatusSummarySvc", name),
+    m_sumTool("TRT_StrawStatusSummaryTool", this),
     m_doArgonMixture(1),
     m_doKryptonMixture(1),
     m_useDynamicAlignFolders(false),
@@ -48,7 +48,6 @@ TRT_DetectorTool::TRT_DetectorTool( const std::string& type, const std::string&
   declareProperty("RDBAccessSvc", m_rdbAccessSvc);
   declareProperty("GeoDbTagSvc", m_geoDbTagSvc);
   declareProperty("GeometryDBSvc", m_geometryDBSvc);
-  declareProperty("InDetTRTStrawStatusSummarySvc", m_sumSvc);  // need for Argon
   declareProperty("DoXenonArgonMixture", m_doArgonMixture); // Set to 1 to use argon. DEFAULT VALUE is 1. Overridden by DOARGONMIXTURE switch
   declareProperty("DoKryptonMixture", m_doKryptonMixture); // Set to 1 to use krypton. DEFAULT VALUE is 1. Overridden by DOKRYPTONMIXTURE switch
   declareProperty("useDynamicAlignFolders", m_useDynamicAlignFolders);
@@ -69,58 +68,50 @@ TRT_DetectorTool::~TRT_DetectorTool()
 //
 StatusCode TRT_DetectorTool::create()
 { 
-  //MsgStream log(msgSvc(), name()); 
-  //msg(MSG::INFO) << " hello " << endmsg;
-
 
   // Get the detector configuration.
-  StatusCode sc = m_geoDbTagSvc.retrieve();
-  if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not locate GeoDbTagSvc" << endmsg;
-    return (StatusCode::FAILURE);
-  } 
+  ATH_CHECK( m_geoDbTagSvc.retrieve());
+
+  // Get the straw status tool
+  ATH_CHECK(m_sumTool.retrieve());
   
   DecodeVersionKey versionKey(&*m_geoDbTagSvc, "TRT");
 
   // Unless we are using custom trt, the switch positions are going to
   // come from the database:
-  msg(MSG::INFO) << "Building TRT with Version Tag: "<< versionKey.tag() << " at Node: " << versionKey.node() << endmsg;
+  ATH_MSG_INFO( "Building TRT with Version Tag: "<< versionKey.tag() << " at Node: " << versionKey.node() );
 
   
-  sc = m_rdbAccessSvc.retrieve();
-  if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not locate RDBAccessSvc" << endmsg;
-    return (StatusCode::FAILURE); 
-  }  
+  ATH_CHECK( m_rdbAccessSvc.retrieve());
  
   // Print the TRT version tag:
   std::string trtVersionTag = m_rdbAccessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node());
-  msg(MSG::INFO) << "TRT Version: " << trtVersionTag << "  Package Version: " << PACKAGE_VERSION << endmsg;
+  ATH_MSG_INFO("TRT Version: " << trtVersionTag << "  Package Version: " << PACKAGE_VERSION );
  
 
   // Check if version is empty. If so, then the TRT cannot be built. This may or may not be intentional. We
   // just issue an INFO message. 
   if (trtVersionTag.empty()) { 
-     msg(MSG::INFO) << "No TRT Version. TRT will not be built." << endmsg;
+    ATH_MSG_INFO("No TRT Version. TRT will not be built." );
      return StatusCode::SUCCESS;
   }
 
   std::string versionName;
   if (versionKey.custom()) {
     
-    msg(MSG::WARNING) << "TRT_DetectorTool:  Detector Information coming from a custom configuration!!" << endmsg;
+    ATH_MSG_WARNING( "TRT_DetectorTool:  Detector Information coming from a custom configuration!!" );
  
   } else {
-    msg(MSG::DEBUG) << "TRT_DetectorTool:  Detector Information coming from the database and job options IGNORED." << endmsg;
+    ATH_MSG_DEBUG( "TRT_DetectorTool:  Detector Information coming from the database and job options IGNORED.");
     
-    msg(MSG::DEBUG) << "Keys for TRT Switches are "  << versionKey.tag()  << "  " << versionKey.node() << endmsg;
+    ATH_MSG_DEBUG( "Keys for TRT Switches are "  << versionKey.tag()  << "  " << versionKey.node() );
     IRDBRecordset_ptr switchSet =  m_rdbAccessSvc->getRecordsetPtr("TRTSwitches", versionKey.tag(), versionKey.node());
     const IRDBRecord    *switches   = (*switchSet)[0];
     
     //Should be stored as booleans?
     if (switches->getInt("DC1COMPATIBLE")) {
-      msg(MSG::ERROR) << "DC1COMPATIBLE flag set in database,"
-	  << " but DC1 is no longer supported in the code!!" << endmsg;
+      ATH_MSG_ERROR( "DC1COMPATIBLE flag set in database,"
+		     << " but DC1 is no longer supported in the code!!");
     }
     m_DC2CompatibleBarrelCoordinates = switches->getInt("DC2COMPATIBLE");
     m_useOldActiveGasMixture         	= ( switches->getInt("GASVERSION") == 0 );
@@ -135,19 +126,18 @@ StatusCode TRT_DetectorTool::create()
         if      ( switches->getInt("DOARGONMIXTURE") == 0) m_doArgonMixture = 0;
         else if ( switches->getInt("DOARGONMIXTURE") == 1) m_doArgonMixture = 1;
       } else {
-        if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Parameter DOARGONMIXTURE not available, m_doArgonMixture= " << m_doArgonMixture << endmsg;
+        ATH_MSG_INFO( "Parameter DOARGONMIXTURE not available, m_doArgonMixture= " << m_doArgonMixture );
       }
 
       if(!switches->isFieldNull( "DOKRYPTONMIXTURE")) {
         if      ( switches->getInt("DOKRYPTONMIXTURE") == 0) m_doKryptonMixture = 0;
         else if ( switches->getInt("DOKRYPTONMIXTURE") == 1) m_doKryptonMixture = 1;
       } else {
-        if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Parameter DOKRYPTONMIXTURE not available, m_doKryptonMixture= " << m_doKryptonMixture << endmsg;
+        ATH_MSG_INFO( "Parameter DOKRYPTONMIXTURE not available, m_doKryptonMixture= " << m_doKryptonMixture );
       }
      }
       catch(std::runtime_error& ex) {
-       if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Exception caught: " << ex.what() << endmsg;
-       // result = false;
+        ATH_MSG_INFO( "Exception caught: " << ex.what() );
       }
     }
     if (!switches->isFieldNull("VERSIONNAME")) {
@@ -163,22 +153,18 @@ StatusCode TRT_DetectorTool::create()
       versionName = "Rome";
     }
   }
-  msg(MSG::INFO)  << "Creating the TRT" << endmsg;
-  msg(MSG::INFO)  << "TRT Geometry Options:" << endmsg;
-  msg(MSG::INFO)  << "  UseOldActiveGasMixture         = " << (m_useOldActiveGasMixture 	? "true" : "false") <<endmsg;
-  msg(MSG::INFO)  << "  Do Argon    = " << (m_doArgonMixture   ? "true" : "false") <<endmsg;
-  msg(MSG::INFO)  << "  Do Krypton  = " << (m_doKryptonMixture ? "true" : "false") <<endmsg;
-  msg(MSG::INFO)  << "  DC2CompatibleBarrelCoordinates = " << (m_DC2CompatibleBarrelCoordinates ? "true" : "false") <<endmsg;
-  msg(MSG::INFO)  << "  InitialLayout                  = " << (m_initialLayout ? "true" : "false") <<endmsg;
-  msg(MSG::INFO)  << "  Alignable                      = " << (m_alignable ? "true" : "false") <<endmsg;
-  msg(MSG::INFO)  << "  VersioName                     = " << versionName  <<endmsg;
+  ATH_MSG_INFO( "Creating the TRT" );
+  ATH_MSG_INFO( "TRT Geometry Options:" );
+  ATH_MSG_INFO( "  UseOldActiveGasMixture         = " << (m_useOldActiveGasMixture 	? "true" : "false") );
+  ATH_MSG_INFO( "  Do Argon    = " << (m_doArgonMixture   ? "true" : "false") );
+  ATH_MSG_INFO( "  Do Krypton  = " << (m_doKryptonMixture ? "true" : "false") );
+  ATH_MSG_INFO( "  DC2CompatibleBarrelCoordinates = " << (m_DC2CompatibleBarrelCoordinates ? "true" : "false"));
+  ATH_MSG_INFO( "  InitialLayout                  = " << (m_initialLayout ? "true" : "false") );
+  ATH_MSG_INFO( "  Alignable                      = " << (m_alignable ? "true" : "false") );
+  ATH_MSG_INFO( "  VersioName                     = " << versionName  );
    
   // Retrieve the Geometry DB Interface
-  sc = m_geometryDBSvc.retrieve();
-  if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not locate Geometry DB Interface: " << m_geometryDBSvc.name() << endmsg;
-    return (StatusCode::FAILURE);
-  } 
+  ATH_CHECK( m_geometryDBSvc.retrieve() );
 
   // Pass athena services to factory, etc
   m_athenaComps = new InDetDD::AthenaComps("TRT_GeoModel");
@@ -193,19 +179,17 @@ StatusCode TRT_DetectorTool::create()
   // 
   GeoModelExperiment * theExpt; 
   if (StatusCode::SUCCESS != detStore()->retrieve( theExpt, "ATLAS" )) { 
-    msg(MSG::ERROR) 
-	<< "Could not find GeoModelExperiment ATLAS" 
-	<< endmsg; 
+    ATH_MSG_ERROR(  "Could not find GeoModelExperiment ATLAS" ); 
     return (StatusCode::FAILURE); 
   } 
 
   if ( 0 == m_detector ) {
     GeoPhysVol *world = theExpt->getPhysVol();
 
-    msg(MSG::INFO) << " Building TRT geometry from GeoModel factory TRTDetectorFactory_Full" << endmsg;
+    ATH_MSG_INFO( " Building TRT geometry from GeoModel factory TRTDetectorFactory_Full" );
 
     TRTDetectorFactory_Full theTRTFactory(m_athenaComps, 
-					  m_sumSvc,
+					  m_sumTool.get(),
 					  m_useOldActiveGasMixture,
 					  m_DC2CompatibleBarrelCoordinates,
 					  m_overridedigversion,
@@ -221,9 +205,9 @@ StatusCode TRT_DetectorTool::create()
     if (m_manager) {
       theExpt->addManager(m_manager);
       
-      sc = detStore()->record(m_manager,m_manager->getName());
+      StatusCode sc = detStore()->record(m_manager,m_manager->getName());
       if (sc.isFailure() ) {
-	msg(MSG::ERROR) << "Could not register TRT_DetectorManager" << endmsg;
+	ATH_MSG_ERROR("Could not register TRT_DetectorManager");
 	return( StatusCode::FAILURE );
       }
       
@@ -355,4 +339,3 @@ TRT_DetectorTool::align(IOVSVC_CALLBACK_ARGS_P(I,keys))
     return StatusCode::SUCCESS;
   }
 }
-
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.h
index 051281e5df4b3da85ccfdcf27aa8f2e7a6696b5c..f79c7b2da6a544a7a791216a788e8d11fc0fd864 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.h
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef TRT_GEOMODEL_TRTDETECTORTOOL_H
@@ -8,7 +8,7 @@
 #include "GeoModelUtilities/GeoModelTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "TRT_ConditionsServices/ITRT_StrawStatusSummarySvc.h" //for Argon
+#include "TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h" //for Argon
 #include <string>
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ public:
     ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc;
     ServiceHandle< IRDBAccessSvc > m_rdbAccessSvc;
     ServiceHandle< IGeometryDBSvc > m_geometryDBSvc;
-    ServiceHandle<ITRT_StrawStatusSummarySvc> m_sumSvc; // added for Argon
+    ToolHandle<ITRT_StrawStatusSummaryTool> m_sumTool; // added for Argon
  
     bool m_doArgonMixture;
     bool m_doKryptonMixture;
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
index 8e00ddc558ad31c9d27c7d09bb84a29c70a17c7c..7835d99dfe6e360e2abcb6b61b0355fe1ad5de0f 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
@@ -150,6 +150,9 @@ StatusCode TRTDigitizationTool::initialize()
   //Retrieve TRT_StrawNeighbourService.
   ATH_CHECK(m_TRTStrawNeighbourSvc.retrieve());
 
+  //Retrieve TRT_CalDbTool
+  ATH_CHECK(m_calDbTool.retrieve());
+
   // Get the magnetic field service
   ATH_CHECK(m_magneticfieldsvc.retrieve());
 
@@ -313,7 +316,7 @@ StatusCode TRTDigitizationTool::lateInitialize() {
   ITRT_SimDriftTimeTool *pTRTsimdrifttimetool = &(*m_TRTsimdrifttimetool);
 
   MagField::IMagFieldSvc *pMagfieldsvc = &(*m_magneticfieldsvc);
-
+  const ITRT_CalDbTool* calDbTool=m_calDbTool.get();
   m_pProcessingOfStraw =
     new TRTProcessingOfStraw( m_settings,
                               m_manager,
@@ -326,7 +329,8 @@ StatusCode TRTDigitizationTool::lateInitialize() {
                               m_particleTable,
                               m_trt_id,
                               TRTpaiToolAr,
-                              TRTpaiToolKr);
+                              TRTpaiToolKr,
+                              calDbTool);
 
   ATH_MSG_INFO ( "Gas Property:             UseGasMix is " << m_UseGasMix );
 
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h
index 9441b4b89765034acc1b013e16c65fe7aff9e944..0c6d4b06c7dcf2b0416a52aa0283e94663932405 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.h
@@ -20,6 +20,7 @@
 #include "ITRT_SimDriftTimeTool.h"
 #include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h"
 #include "TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h"
+#include "TRT_ConditionsServices/ITRT_CalDbTool.h"
 
 #include "InDetRawData/TRT_RDO_Container.h"
 #include "InDetSimData/InDetSimDataCollection.h"
@@ -124,6 +125,7 @@ private:
   ToolHandle<ITRT_PAITool> m_TRTpaiToolKr{this, "PAI_Tool_Kr", "TRT_PAI_Process_Kr", "The PAI model for ionisation in the TRT Kr gas"};
   ToolHandle<ITRT_SimDriftTimeTool> m_TRTsimdrifttimetool{this, "SimDriftTimeTool", "TRT_SimDriftTimeTool", "Drift time versus distance (r-t-relation) for TRT straws"};
   ToolHandle<ITRT_StrawStatusSummaryTool> m_sumTool{this, "InDetTRTStrawStatusSummaryTool", "TRT_StrawStatusSummaryTool", ""};
+  ToolHandle<ITRT_CalDbTool> m_calDbTool{this, "InDetTRTCalDbTool", "TRT_CalDbTool", ""};
   ServiceHandle<PileUpMergeSvc> m_mergeSvc{this, "MergeSvc", "PileUpMergeSvc", "Merge service"};
   ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};  //!< Random number service
   ServiceHandle<ITRT_StrawNeighbourSvc> m_TRTStrawNeighbourSvc{this, "TRT_StrawNeighbourSvc", "TRT_StrawNeighbourSvc", ""};
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
index 6dd02e15ff2db5041eceb0c046069c29f52341e1..4f1f17d365e93c25880e1da53630d4cee13ab58f 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.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 "TRTProcessingOfStraw.h"
@@ -24,7 +24,6 @@
 #include "InDetSimEvent/TRTHitIdHelper.h"
 
 #include "GeoPrimitives/GeoPrimitives.h"
-//#include "CLHEP/Geometry/Point3D.h"
 
 // Units & Constants
 #include "CLHEP/Units/SystemOfUnits.h"
@@ -32,7 +31,6 @@
 
 // Particle data table
 #include "HepPDT/ParticleData.hh"
-//#include "HepPDT/ParticleDataTable.hh"
 
 // For the Athena-based random numbers.
 #include "CLHEP/Random/RandPoisson.h"//randpoissonq? (fixme)
@@ -61,7 +59,8 @@ TRTProcessingOfStraw::TRTProcessingOfStraw(const TRTDigSettings* digset,
                                            const HepPDT::ParticleDataTable* pdt,
                                            const TRT_ID* trt_id,
                                            ITRT_PAITool* paitoolAr,
-                                           ITRT_PAITool* paitoolKr)
+                                           ITRT_PAITool* paitoolKr,
+                                           const ITRT_CalDbTool* calDbTool)
 
 : m_settings(digset),
   m_detmgr(detmgr),
@@ -83,7 +82,7 @@ TRTProcessingOfStraw::TRTProcessingOfStraw(const TRTDigSettings* digset,
 
 {
   ATH_MSG_VERBOSE ( "TRTProcessingOfStraw::Constructor begin" );
-  Initialize();
+  Initialize(calDbTool);
   ATH_MSG_VERBOSE ( "Constructor done" );
 }
 
@@ -96,7 +95,7 @@ TRTProcessingOfStraw::~TRTProcessingOfStraw()
 }
 
 //________________________________________________________________________________
-void TRTProcessingOfStraw::Initialize()
+void TRTProcessingOfStraw::Initialize(const ITRT_CalDbTool* calDbTool)
 {
 
   m_useMagneticFieldMap    = m_settings->useMagneticFieldMap();
@@ -131,7 +130,7 @@ void TRTProcessingOfStraw::Initialize()
   ATH_MSG_INFO ( "Kr barrel drift-time at r = 2 mm is " << m_pSimDriftTimeTool->getAverageDriftTime(2.0, 0.002*0.002, 1) << " ns." );
   ATH_MSG_INFO ( "Ar barrel drift-time at r = 2 mm is " << m_pSimDriftTimeTool->getAverageDriftTime(2.0, 0.002*0.002, 2) << " ns." );
 
-  m_pTimeCorrection = new TRTTimeCorrection("TRTTimeCorrection", m_settings, m_detmgr, m_id_helper);
+  m_pTimeCorrection = new TRTTimeCorrection(m_settings, m_detmgr, m_id_helper, calDbTool);
 
   const double intervalBetweenCrossings(m_settings->timeInterval() / 3.);
   m_minCrossingTime = - (intervalBetweenCrossings * 2. + 1.*CLHEP::ns);
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.h
index 39859182a85a5fe5a34697401889e79c70a71d2a..3f44e18342643be4123775d768a49f8ee2e0f379 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.h
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTProcessingOfStraw.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 TRT_DIGITIZATION_TRTPROCESSINGOFSTRAW_H
@@ -15,17 +15,14 @@
 
 #include "TRTElectronicsProcessing.h"
 
-// #include "CommissionEvent/ComTime.h"
-
-#include "GaudiKernel/ServiceHandle.h"
 #include "CLHEP/Random/RandomEngine.h"
-//#include "CLHEP/Geometry/Point3D.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 
 #include "AthenaKernel/MsgStreamMember.h"
 
 #include "InDetIdentifier/TRT_ID.h"
 #include "TRT_ConditionsServices/ITRT_StrawStatusSummaryTool.h"
+#include "TRT_ConditionsServices/ITRT_CalDbTool.h"
 
 class TRTDigit;
 class TRTTimeCorrection;
@@ -61,7 +58,8 @@ public:
                         const HepPDT::ParticleDataTable*,
                         const TRT_ID*,
                         ITRT_PAITool* = NULL,
-                        ITRT_PAITool* = NULL);
+                        ITRT_PAITool* = NULL,
+                        const ITRT_CalDbTool* = NULL);
   /** Destructor */
   ~TRTProcessingOfStraw();
 
@@ -110,7 +108,7 @@ private:
   TRTProcessingOfStraw& operator= (const TRTProcessingOfStraw&);
 
   /** Initialize */
-  void Initialize();
+  void Initialize(const ITRT_CalDbTool *);
 
   const TRTDigSettings* m_settings;
   const InDetDD::TRT_DetectorManager* m_detmgr;
@@ -138,14 +136,12 @@ private:
   double m_maxCrossingTime;
   double m_minCrossingTime;
   double m_shiftOfZeroPoint;
-  // double m_time_y_eq_zero;
 
   double m_innerRadiusOfStraw;
   double m_outerRadiusOfWire;
 
   double m_solenoidFieldStrength;
 
-  // const ComTime* m_ComTime;
 
   TRTTimeCorrection*        m_pTimeCorrection;
   TRTElectronicsProcessing* m_pElectronicsProcessing;
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.cxx
index f59b471db90faef5e4a87af5d91ec4dbb602d603..9d8d328cafd2ba47791ef1c554d62a548507a6ed 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.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 "TRTTimeCorrection.h"
@@ -17,15 +17,15 @@
 #include "Identifier/Identifier.h"
 #include "GaudiKernel/IService.h"
 
-#include "TRT_ConditionsServices/ITRT_CalDbSvc.h"
+
 //__________________________________________________________________________________________________________
-TRTTimeCorrection::TRTTimeCorrection(const std::string& name,
-                                     const TRTDigSettings* digset,
+TRTTimeCorrection::TRTTimeCorrection(const TRTDigSettings* digset,
                                      const InDetDD::TRT_DetectorManager* detmgr,
-                                     const TRT_ID* trt_id)
+                                     const TRT_ID* trt_id,
+                                     const ITRT_CalDbTool* calDbTool)
   : m_settings(digset), m_detmgr(detmgr), m_trt_id(trt_id),
     m_subdetectorMask(0x00200000), m_right5Bits(0x0000001F),
-    m_shift5Bits(5), m_shift10Bits(10), m_shift15Bits(15), m_notInitVal(-999999.0), m_trtcaldbsvc("TRT_CalDbSvc",name), m_msg("TRTTimeCorrection")
+    m_shift5Bits(5), m_shift10Bits(10), m_shift15Bits(15), m_notInitVal(-999999.0), m_trtcaldbtool(calDbTool), m_msg("TRTTimeCorrection")
 {
   Initialize();
 }
@@ -45,7 +45,7 @@ void TRTTimeCorrection::Initialize() {
 
   if (msgLevel(MSG::VERBOSE)) msg(MSG::VERBOSE) << "TRTTimeCorrection::Initialize()" << endmsg;
 
-  if ( (m_getT0FromData) && (m_trtcaldbsvc.retrieve().isFailure()) ) {
+  if ( m_getT0FromData && !m_trtcaldbtool ) {
     if (msgLevel(MSG::ERROR)) msg(MSG::ERROR) << "Could not find TRT_CalDbTool => cannot use t0 of data." << endmsg;
     m_getT0FromData=false;
   }
@@ -270,7 +270,7 @@ double TRTTimeCorrection::calculateTimeShiftFromStrawEnds( const Amg::Vector3D&
     bool identifierOK;
     const Identifier idStraw(getIdentifier(strawID, identifierOK));
     if (identifierOK) {
-      shift = m_trtcaldbsvc->getT0(idStraw);
+      shift = m_trtcaldbtool->getT0(idStraw);
     } else {
       if (msgLevel(MSG::ERROR)) msg(MSG::ERROR)
                                   << "Attempt to use t0 from data failed: TRTCalDbSvc was not able to supply t0 for straw with identifier: "
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.h
index 1921e3ad58bc666af1f0e596ee789dc27c99e7cb..c4c2dd98a61d803ea1fe9e5923c4928bbef0f83d 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.h
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTTimeCorrection.h
@@ -6,8 +6,7 @@
 #define TRT_DIGITIZATION_TRTTIMECORRECTION_H
 
 #include <vector>
-#include "GaudiKernel/ServiceHandle.h"
-
+#include "TRT_ConditionsServices/ITRT_CalDbTool.h"
 #include "AthenaKernel/MsgStreamMember.h"
 #include "Identifier/Identifier.h"
 
@@ -17,7 +16,6 @@ namespace InDetDD {
 }
 
 class TRTDigSettings;
-class ITRT_CalDbSvc;
 class TRT_ID;
 
 #include "GeoPrimitives/GeoPrimitives.h"
@@ -29,10 +27,10 @@ class TRTTimeCorrection {
 
 public:
 
-  TRTTimeCorrection(const std::string& name,
-                    const TRTDigSettings* digset,
+  TRTTimeCorrection(const TRTDigSettings* digset,
                     const InDetDD::TRT_DetectorManager* detmgr,
-                    const TRT_ID*);
+                    const TRT_ID*,
+                    const ITRT_CalDbTool*);
 
   ~TRTTimeCorrection();
 
@@ -145,7 +143,7 @@ private:
   bool m_timeShiftPhiSectSymmetry;
   bool m_getT0FromData;
 
-  ServiceHandle< ITRT_CalDbSvc > m_trtcaldbsvc;
+  const ITRT_CalDbTool* m_trtcaldbtool;
 
   mutable Athena::MsgStreamMember m_msg;
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCT_MonitoringNumbers.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCT_MonitoringNumbers.h
index c1ce3e6aa6d7a5d8eb884ed296522d17fabbdb00..27fa7ec02ea21a2a3ca636686c2a82801c19fae8 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCT_MonitoringNumbers.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCT_MonitoringNumbers.h
@@ -99,7 +99,7 @@ namespace SCT_Monitoring{
   //                          SCTErrMonTool :: getNumModules, Daniel Damiani 16/8/2010
   //====================================================================================================
   inline int getNumModules(const int reg,const int layer) {
-    if (reg==0) {
+    if (reg==BARREL) {
       if (layer<2) return 384;
       else if (layer<4) return 480;
       else if (layer<6) return 576;
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
index 289386b064b5be4b6f13d73f3d1077daaec573ad..c73dc2589d59eb38fca2aa07e023c1fe7239408f 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.cxx
@@ -42,26 +42,6 @@ StatusCode SCTErrMonAlg::initialize() {
     m_geo[i] = moduleGeo;
   }
 
-  // Fill existing wafers
-  m_indicesVector.reserve(maxHash);
-  SCT_ID::const_id_iterator waferIterator{m_pSCTHelper->wafer_begin()};
-  SCT_ID::const_id_iterator waferEnd{m_pSCTHelper->wafer_end()};
-  for (; waferIterator not_eq waferEnd; ++waferIterator) {
-    const Identifier waferId{*waferIterator};
-    int layer{m_pSCTHelper->layer_disk(waferId)};
-    int side{m_pSCTHelper->side(waferId)};
-    int barrel_ec{m_pSCTHelper->barrel_ec(waferId)};
-    int ieta{m_pSCTHelper->eta_module(waferId)};
-    int iphi{m_pSCTHelper->phi_module(waferId)};
-    layer = layer * 2 + side;
-    int regionIndex{GENERAL_INDEX};
-    if ((barrel_ec == BARREL) and (layer >= 0) and (layer < N_BARRELSx2)) regionIndex = BARREL_INDEX;
-    else if (barrel_ec == ENDCAP_A) regionIndex = ENDCAP_A_INDEX;
-    else if (barrel_ec == ENDCAP_C) regionIndex = ENDCAP_C_INDEX;
-    else continue;
-    m_indicesVector.push_back(indices_t{regionIndex, layer, ieta, iphi});
-  }
-
   return AthMonitorAlgorithm::initialize();
 }
 
@@ -218,22 +198,42 @@ SCTErrMonAlg::fillByteStreamErrors(const EventContext& ctx) const {
     total_errors += fillByteStreamErrorsHelper(m_byteStreamErrTool->getErrorSet(errType), errType, categoryErrorMap);
   }
   /// Fill /SCT/GENERAL/errors/SCT_LinksWith*VsLbs ///
+  std::vector<int> vEta;
+  std::vector<int> vPhi;
+  std::vector<bool> vHasError;
   for (int errCate{0}; errCate < CategoryErrors::N_ERRCATEGORY; ++errCate) {
     auto lumiBlockAcc{Monitored::Scalar<int>("lumiBlock", pEvent->lumiBlock())};
     auto nCategoryErrorsAcc{Monitored::Scalar<int>("n_"+CategoryErrorsNames[errCate],
                                                    categoryErrorMap.count(errCate))};
     fill("SCTErrMonitor", lumiBlockAcc, nCategoryErrorsAcc);
 
-    for (const indices_t& indices : m_indicesVector) {
-      const int region{indices[REGIONINDEX]};
-      const int layer{indices[LAYERINDEX]};
-      const int eta{indices[ETAINDEX]};
-      const int phi{indices[PHIINDEX]};
-      auto etaAcc{Monitored::Scalar<int>("eta", eta)};
-      auto phiAcc{Monitored::Scalar<int>("phi", phi)};
-      auto hasErrorAcc{Monitored::Scalar<bool>("hasError_"+CategoryErrorsNames[errCate]+"_"+subDetNameShort[region].Data()+"_"+to_string(layer/2)+"_"+to_string(layer%2),
-                                               categoryErrorMap[errCate][region][layer][eta][phi])};
-      fill("SCTErrMonitor", etaAcc, phiAcc, hasErrorAcc);
+    for (int iReg{0}; iReg<N_REGIONS; iReg++) {
+      const int maxLayer{iReg==BARREL_INDEX ? N_BARRELSx2 : N_ENDCAPSx2};
+      const int firstEta{iReg==BARREL_INDEX ? FIRST_ETA_BIN : FIRST_ETA_BIN_EC};
+      const int lastEta{iReg==BARREL_INDEX ? LAST_ETA_BIN : LAST_ETA_BIN_EC};
+      const int firstPhi{iReg==BARREL_INDEX ? FIRST_PHI_BIN : FIRST_PHI_BIN_EC};
+      const int lastPhi{iReg==BARREL_INDEX ? LAST_PHI_BIN : LAST_PHI_BIN_EC};
+      const size_t size{static_cast<size_t>((lastEta-firstEta+1)*(lastPhi-firstPhi+1))};
+      for (int iLay{0}; iLay<maxLayer; iLay++) {
+        vEta.resize(size);
+        vPhi.resize(size);
+        vHasError.resize(size);
+        for (int eta{firstEta}; eta<=lastEta; eta++) {
+          const int iEta{eta-firstEta};
+          for (int phi{firstPhi}; phi<=lastPhi; phi++) {
+            const int iPhi{phi-firstPhi};
+            size_t index{static_cast<size_t>(iEta*(lastPhi-firstPhi+1)+iPhi)};
+            vEta[index] = eta;
+            vPhi[index] = phi;
+            vHasError[index] = categoryErrorMap[errCate][iReg][iLay][iEta][iPhi];
+          }
+        }
+        auto etaAcc{Monitored::Collection("eta", vEta)};
+        auto phiAcc{Monitored::Collection("phi", vPhi)};
+        auto hasErrorAcc{Monitored::Collection("hasError_"+CategoryErrorsNames[errCate]+"_"+subDetNameShort[iReg].Data()+"_"+to_string(iLay/2)+"_"+to_string(iLay%2),
+                                               vHasError)};
+        fill("SCTErrMonitor", etaAcc, phiAcc, hasErrorAcc);
+      }
     }
   }
   
@@ -370,6 +370,10 @@ SCTErrMonAlg::fillByteStreamErrorsHelper(const set<IdentifierHash>& errors,
     else if (barrel_ec == ENDCAP_A) regionIndex = ENDCAP_A_INDEX;
     else if (barrel_ec == ENDCAP_C) regionIndex = ENDCAP_C_INDEX;
 
+    // Take into account offsets
+    ieta -= ((regionIndex==BARREL_INDEX) ? FIRST_ETA_BIN : FIRST_ETA_BIN_EC);
+    iphi -= ((regionIndex==BARREL_INDEX) ? FIRST_PHI_BIN : FIRST_PHI_BIN_EC);
+
     if (b_category[CategoryErrors::MASKEDLINKALL]) {
       nMaskedLinks[GENERAL_INDEX]++;
       if (regionIndex!=GENERAL_INDEX) {
@@ -398,7 +402,7 @@ SCTErrMonAlg::fillByteStreamErrorsHelper(const set<IdentifierHash>& errors,
     for (int reg{0}; reg<N_REGIONS; reg++) {
       const int nLayers{n_layers[reg]*2};
       for (int layerSide{0}; layerSide<nLayers; layerSide++) {
-        float num_modules{static_cast<float>(getNumModules(reg, layerSide))};
+        float num_modules{static_cast<float>(getNumModules(index2Bec(reg), layerSide))};
         /// Fill /run_x/lb_y/SCT/SCT*/RateErrorsPerLumi ///
         auto errorTypeAcc{Monitored::Scalar<int>("errorType", err_type)};
         auto layerSideAcc{Monitored::Scalar<int>("layerSide", layerSide)};
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h
index 0050bd2f25e9e5444fa81838196929218eb4a30b..46ae93799e0c49b14e43d2449c95cb5fb1afe382 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonAlg.h
@@ -65,16 +65,12 @@ class SCTErrMonAlg : public AthMonitorAlgorithm {
       return cnt;
     }
   };
-  enum {REGIONINDEX, LAYERINDEX, ETAINDEX, PHIINDEX, NINDICES};
-  typedef std::array<int, NINDICES> indices_t;
-  typedef std::vector<indices_t> indicesVector_t;
 
   static const unsigned int s_nBinsEta;
   static const double s_rangeEta;
   static const unsigned int s_nBinsPhi;
   static const double s_wafersThreshold;
 
-  indicesVector_t m_indicesVector{};
   std::vector<moduleGeo_t> m_geo{};
 
   mutable std::atomic_bool m_isFirstConfigurationDetails{true};
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
index 7f5dc970447bd36ba2060325820bf6914043d778..6ae23ec79e92b49a9e99e3b46bb13f657b4cd676 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
@@ -373,7 +373,7 @@ SCTErrMonTool::checkRateHists() {
             cxb = m_numErrorsPerLumi[reg]->GetXaxis()->GetBinCenter(xb);
             for (unsigned int yb{1}; yb < ybins; ++yb) {
               cyb = m_numErrorsPerLumi[reg]->GetYaxis()->GetBinCenter(yb);
-              int num_modules{getNumModules(reg, yb - 1)};
+              int num_modules{getNumModules(index2Bec(reg), yb - 1)};
               content = m_numErrorsPerLumi[reg]->GetBinContent(xb, yb);
               if (num_modules > 0) {
                 m_rateErrorsPerLumi[reg]->Fill(cxb, cyb, 1, content);
diff --git a/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx b/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx
index 0989f3db91fa56c9276c3c1a33d4058b5ec612e0..cfc5a9f8f34a175cbce7a7b24a3880716536fc20 100644
--- a/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx
+++ b/LArCalorimeter/LArMonitoring/src/LArAffectedRegionsAlg.cxx
@@ -130,12 +130,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_embpsName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_embpsName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_embpsName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_embpsName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/32);
@@ -147,12 +147,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<TMath::Pi()){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_embpsName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_embpsName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_embpsName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_embpsName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/32);
@@ -162,12 +162,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_embpsName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_embpsName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_embpsName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_embpsName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/32);
@@ -189,12 +189,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta >=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_embName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_embName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta <0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_embName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_embName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/128);
@@ -206,12 +206,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<TMath::Pi()){
 	    if(eta >=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_embName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_embName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta <0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_embName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_embName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/128);
@@ -221,12 +221,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta >=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_embName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_embName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta <0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_embName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_embName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMBC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/128);
@@ -248,12 +248,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_emecpsName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecpsName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECAPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_emecpsName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecpsName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECCPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/64);
@@ -265,12 +265,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<TMath::Pi()){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_emecpsName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecpsName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECAPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_emecpsName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecpsName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECCPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/64);
@@ -280,12 +280,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_emecpsName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecpsName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_emecpsName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecpsName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/64);
@@ -308,12 +308,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_emecName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_emecName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/256);
@@ -325,12 +325,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<TMath::Pi()){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_emecName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_emecName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/256);
@@ -340,12 +340,12 @@ LArAffectedRegionsAlg::fillHistograms( const EventContext& ctx ) const
 	  while(phi<phimax){
 	    if(eta>=0){
 	      etaPOS=eta;
-	      fill(m_MonGroupName+m_emecName,etaPOS,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecName,etaPOS,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      etaNEG=eta;
-	      fill(m_MonGroupName+m_emecName,etaNEG,phi,problem);
+	      fill(m_MonGroupName.value()+m_emecName,etaNEG,phi,problem);
 	      ATH_MSG_DEBUG(  "EMECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    }
 	    phi+=(2*TMath::Pi()/256);
diff --git a/LArCalorimeter/LArMonitoring/src/LArDigitMonAlg.h b/LArCalorimeter/LArMonitoring/src/LArDigitMonAlg.h
index 21a5a4d7e1ef6ef5c342f4f8e1ccd1b12e1eaca3..380805d2dccbe6828ddf4ab21da91661c09305e4 100755
--- a/LArCalorimeter/LArMonitoring/src/LArDigitMonAlg.h
+++ b/LArCalorimeter/LArMonitoring/src/LArDigitMonAlg.h
@@ -67,7 +67,6 @@ private:
   Gaudi::Property<int>         m_NumberBadFebs     {this, "NumberBadFebs", 5};
   /**bool use to mask the bad channels*/
   Gaudi::Property<bool>        m_ignoreKnownBadChannels{this, "IgnoreBadChannels", false};
-  bool m_PercComputed;
   /** Switch to online/offline mode*/
   Gaudi::Property<bool>        m_IsOnline      {this, "IsOnline", false}; 
   /** Treshold to declare a bad event*/
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
index f570bfbe7826b0fe06eb0666735c1baf39d6c236..a5bdab2fd641473e62f9f2f7764229ba8e543d1d 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataToolMT.cxx
@@ -163,6 +163,9 @@ StatusCode CscRdoToCscPrepDataToolMT::decode(const CscRawDataContainer* rdoConta
 
   const CscRawDataCollection * rawCollection = *it_coll;
   ATH_MSG_DEBUG ( "Retrieved " << rawCollection->size() << " CSC RDOs.");
+  //return if the input raw collection is empty (can happen for seeded decoding in trigger)
+  if(rawCollection->size()==0) return StatusCode::SUCCESS;
+
   //************************************************
   IdentifierHash cscHashId;
 
@@ -503,4 +506,4 @@ StatusCode CscRdoToCscPrepDataToolMT::decode(const CscRawDataContainer* rdoConta
     }
   }
   return  StatusCode::SUCCESS;
-}
\ No newline at end of file
+}
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx
index cfc680b900ee6b2987b750815550764019cc1067..55e500ccf13d4400081f549417406a310f838096 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.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 "MuonDigitContainer/MmDigit.h"
@@ -220,7 +220,7 @@ MmDigitContainer* Muon::MM_DigitContainerCnv_p1::createTransient(const Muon::MM_
       return 0;
     } 
   }
-  std::auto_ptr<MmDigitContainer> trans(new MmDigitContainer(m_MMId->detectorElement_hash_max()));
+  std::unique_ptr<MmDigitContainer> trans(new MmDigitContainer(m_MMId->detectorElement_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return trans.release();
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx
index 13ac093f3d95defb4a5f0df3c07b125fa87d9e81..416ecf6c1207b92fd2336bab72fc9d39b1795891 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.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 "MuonDigitContainer/MmDigit.h"
@@ -219,7 +219,7 @@ MmDigitContainer* Muon::MM_DigitContainerCnv_p2::createTransient(const Muon::MM_
       return 0;
     } 
   }
-  std::auto_ptr<MmDigitContainer> trans(new MmDigitContainer(m_MMId->detectorElement_hash_max()));
+  std::unique_ptr<MmDigitContainer> trans(new MmDigitContainer(m_MMId->detectorElement_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return trans.release();
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx
index 108c56acee6377a32c3e2ec75ad29c83e8312daa..5b6cfc50782c85e5771676650829b9602d468d84 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.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 "MuonDigitContainer/sTgcDigit.h"
@@ -222,7 +222,7 @@ sTgcDigitContainer* Muon::STGC_DigitContainerCnv_p1::createTransient(const Muon:
       return 0;
     } 
   }
-  std::auto_ptr<sTgcDigitContainer> trans(new sTgcDigitContainer(m_sTgcId->detectorElement_hash_max()));
+  std::unique_ptr<sTgcDigitContainer> trans(new sTgcDigitContainer(m_sTgcId->detectorElement_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return trans.release();
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx
index 977a29a6530152922cb65fd1da253aa2595cdeb9..cce0059ad66a20bfb008edab65732facba25cbc3 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.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 "MuonPrepRawData/CscPrepData.h"
@@ -205,7 +205,7 @@ Muon::CscPrepDataContainer* Muon::CscPrepDataContainerCnv_p1::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::CscPrepDataContainer> trans(new Muon::CscPrepDataContainer(m_cscId->module_hash_max()));
+    std::unique_ptr<Muon::CscPrepDataContainer> trans(new Muon::CscPrepDataContainer(m_cscId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx
index af158c00617dc2c7298faf2d13339c445edd1933..a30f365aa12915466e95af5b561eb095688878b2 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.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 "MuonPrepRawData/CscPrepData.h"
@@ -257,7 +257,7 @@ Muon::CscPrepDataContainer* Muon::CscPrepDataContainerCnv_p2::createTransient(co
       return 0;
     } 
   }
-  std::auto_ptr<Muon::CscPrepDataContainer> trans(new Muon::CscPrepDataContainer(m_CscId->module_hash_max()));
+  std::unique_ptr<Muon::CscPrepDataContainer> trans(new Muon::CscPrepDataContainer(m_CscId->module_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx
index 230a3de46102aef4aefe2fe6478a6fe5debfdfc3..c31a8f3a798e9a4836f612b59d90fe37931947bd 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.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 "MuonPrepRawData/CscStripPrepData.h"
@@ -194,7 +194,7 @@ Muon::CscStripPrepDataContainer* Muon::CscStripPrepDataContainerCnv_p1::createTr
             return 0;
         } 
     }
-    std::auto_ptr<Muon::CscStripPrepDataContainer> trans(new Muon::CscStripPrepDataContainer(m_cscStripId->module_hash_max()));
+    std::unique_ptr<Muon::CscStripPrepDataContainer> trans(new Muon::CscStripPrepDataContainer(m_cscStripId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx
index e0b12beed44b0443be35b7d11e1185ec5602d50d..1d7347b33851e2cc500c4d7e18f90734bcdeca10 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.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 "MuonPrepRawData/MMPrepData.h"
@@ -224,7 +224,7 @@ Muon::MMPrepDataContainer* Muon::MMPrepDataContainerCnv_p1::createTransient(cons
       return 0;
     } 
   }
-  std::auto_ptr<Muon::MMPrepDataContainer> trans(new Muon::MMPrepDataContainer(m_MMId->module_hash_max()));
+  std::unique_ptr<Muon::MMPrepDataContainer> trans(new Muon::MMPrepDataContainer(m_MMId->module_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx
index 175b6af368d0234da619b1ddeb75b4227d8ff756..b156db0256612d361404b70750e123d82a54ca8e 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.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 "MuonPrepRawData/MdtPrepData.h"
@@ -201,7 +201,7 @@ Muon::MdtPrepDataContainer* Muon::MdtPrepDataContainerCnv_p1::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::MdtPrepDataContainer> trans(new Muon::MdtPrepDataContainer(m_MdtId->module_hash_max()));
+    std::unique_ptr<Muon::MdtPrepDataContainer> trans(new Muon::MdtPrepDataContainer(m_MdtId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx
index c0e4cebee90d12e97867f527be9c7d413fc034ff..a1411eea676115e6ccf0e24b0dd1f81ed187800f 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.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 "MuonPrepRawData/MdtPrepData.h"
@@ -229,7 +229,7 @@ Muon::MdtPrepDataContainer* Muon::MdtPrepDataContainerCnv_p2::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::MdtPrepDataContainer> trans(new Muon::MdtPrepDataContainer(m_MdtId->module_hash_max()));
+    std::unique_ptr<Muon::MdtPrepDataContainer> trans(new Muon::MdtPrepDataContainer(m_MdtId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx
index e67e0e5fb37def8677c5e36904a8e4c33297bcae..7610044769b19defeaa9d85b953d275416efe31e 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.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 "MuonPrepRawData/RpcPrepData.h"
@@ -216,7 +216,7 @@ Muon::RpcPrepDataContainer* Muon::RpcPrepDataContainerCnv_p1::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::RpcPrepDataContainer> trans(new Muon::RpcPrepDataContainer(m_RpcId->module_hash_max()));
+    std::unique_ptr<Muon::RpcPrepDataContainer> trans(new Muon::RpcPrepDataContainer(m_RpcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx
index 1d52a40a8a319c7641458d301f3a02527e8afb1a..cad7a43328fc059822c0567cb1d900da02c6ee3c 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.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 "MuonPrepRawData/RpcPrepData.h"
@@ -200,7 +200,7 @@ Muon::RpcPrepDataContainer* Muon::RpcPrepDataContainerCnv_p2::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::RpcPrepDataContainer> trans(new Muon::RpcPrepDataContainer(m_RpcId->module_hash_max()));
+    std::unique_ptr<Muon::RpcPrepDataContainer> trans(new Muon::RpcPrepDataContainer(m_RpcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx
index 524d40c6957c6b7691e4e9daeaa308e17ecdc412..8488ca3e5e4049fab8c849b80822cc2cf5f0849a 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.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 "MuonPrepRawData/RpcPrepData.h"
@@ -254,7 +254,7 @@ Muon::RpcPrepDataContainer* Muon::RpcPrepDataContainerCnv_p3::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::RpcPrepDataContainer> trans(new Muon::RpcPrepDataContainer(m_RpcId->module_hash_max()));
+    std::unique_ptr<Muon::RpcPrepDataContainer> trans(new Muon::RpcPrepDataContainer(m_RpcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx
index f17f5fb5a0982c03631616d3c0e2ec8f3c3c29ce..4c5e7d40469287af978ba46f29747d635c51169b 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.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 "MuonPrepRawData/TgcPrepData.h"
@@ -199,7 +199,7 @@ Muon::TgcPrepDataContainer* Muon::TgcPrepDataContainerCnv_p1::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::TgcPrepDataContainer> trans(new Muon::TgcPrepDataContainer(m_TgcId->module_hash_max()));
+    std::unique_ptr<Muon::TgcPrepDataContainer> trans(new Muon::TgcPrepDataContainer(m_TgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx
index d04a5c181106a0df4a569fbbc80d9724d9069876..408819c168234805fc19bca813d97461d38afb50 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.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 "MuonPrepRawData/TgcPrepData.h"
@@ -250,7 +250,7 @@ Muon::TgcPrepDataContainer* Muon::TgcPrepDataContainerCnv_p2::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::TgcPrepDataContainer> trans(new Muon::TgcPrepDataContainer(m_TgcId->module_hash_max()));
+    std::unique_ptr<Muon::TgcPrepDataContainer> trans(new Muon::TgcPrepDataContainer(m_TgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx
index 19cc53d5658f5932456cd43be6f4977b850f83d2..adf2346dc71fe410bf91b991be78a06056ba6b1f 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.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 "MuonPrepRawData/TgcPrepData.h"
@@ -248,7 +248,7 @@ Muon::TgcPrepDataContainer* Muon::TgcPrepDataContainerCnv_p3::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::TgcPrepDataContainer> trans(new Muon::TgcPrepDataContainer(m_TgcId->module_hash_max()));
+    std::unique_ptr<Muon::TgcPrepDataContainer> trans(new Muon::TgcPrepDataContainer(m_TgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx
index 6a4204d75b0a3834a6ca8919ecd19cd82e23dcf9..d45f100957a1b55b9796d26c477d1d22045062cd 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.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 "MuonPrepRawData/sTgcPrepData.h"
@@ -276,7 +276,7 @@ Muon::sTgcPrepDataContainer* Muon::sTgcPrepDataContainerCnv_p1::createTransient(
             return 0;
         } 
     }
-    std::auto_ptr<Muon::sTgcPrepDataContainer> trans(new Muon::sTgcPrepDataContainer(m_sTgcId->module_hash_max()));
+    std::unique_ptr<Muon::sTgcPrepDataContainer> trans(new Muon::sTgcPrepDataContainer(m_sTgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx
index 66063d1248641e55b993575b8df79fe267aea2a1..d1e289f217c83510a151bc2f67a18993ec4661bb 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.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
 */
 
 /* Takashi Kubota - June 30, 2008 */
@@ -204,7 +204,7 @@ Muon::RpcCoinDataContainerCnv_p1::TRANS* Muon::RpcCoinDataContainerCnv_p1::creat
             return 0;
         } 
     }
-    std::auto_ptr<Muon::RpcCoinDataContainer> trans(new Muon::RpcCoinDataContainer(m_RpcId->module_hash_max()));
+    std::unique_ptr<Muon::RpcCoinDataContainer> trans(new Muon::RpcCoinDataContainer(m_RpcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx
index d66b6ad1229a2b0402810b6957d70ed078ec6a00..07a52479dad33fdf4f28f5592f6d7f0fac34575f 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.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
 */
 
 /* Takashi Kubota - June 30, 2008 */
@@ -207,7 +207,7 @@ Muon::TgcCoinDataContainer* Muon::TgcCoinDataContainerCnv_p1::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::TgcCoinDataContainer> trans(new Muon::TgcCoinDataContainer(m_TgcId->module_hash_max()));
+    std::unique_ptr<Muon::TgcCoinDataContainer> trans(new Muon::TgcCoinDataContainer(m_TgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx
index 3f0de3a8d5bd41d86f660a473108022d0668a782..06a89ad6aaae1cf034ca679f7248eecd7215830a 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.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
 */
 
 /* Takashi Kubota - June 30, 2008 */
@@ -207,7 +207,7 @@ Muon::TgcCoinDataContainer* Muon::TgcCoinDataContainerCnv_p2::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::TgcCoinDataContainer> trans(new Muon::TgcCoinDataContainer(m_TgcId->module_hash_max()));
+    std::unique_ptr<Muon::TgcCoinDataContainer> trans(new Muon::TgcCoinDataContainer(m_TgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx
index a0f090efc0fb5daa26efa2dba47afac5cbedbf38..fc4a1a3c2cb5c4995a7db2dacbb1fe9e4612ae55 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.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 "MuonTrigCoinData/TgcCoinData.h"
@@ -206,7 +206,7 @@ Muon::TgcCoinDataContainer* Muon::TgcCoinDataContainerCnv_p3::createTransient(co
             return 0;
         } 
     }
-    std::auto_ptr<Muon::TgcCoinDataContainer> trans(new Muon::TgcCoinDataContainer(m_TgcId->module_hash_max()));
+    std::unique_ptr<Muon::TgcCoinDataContainer> trans(new Muon::TgcCoinDataContainer(m_TgcId->module_hash_max()));
     persToTrans(persObj, trans.get(), log);
     return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
index 45340a3ee88ba1da65b75512dc40adc77568abe0..2b3cc6d12166caa257f92b0dec7bfb0940bcf9be 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
@@ -206,7 +206,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::decode( const std::vector<IdentifierH
 void Muon::MdtRdoToPrepDataToolCore::processPRDHashes( const std::vector<IdentifierHash>& chamberHashInRobs, std::vector<IdentifierHash>& idWithDataVect ){
   // get RDO container
   const MdtCsmContainer* rdoContainer = getRdoContainer();
-  if(!rdoContainer) {
+  if(!rdoContainer || rdoContainer->size()==0) {
     return;
   }                 
 
@@ -221,7 +221,7 @@ void Muon::MdtRdoToPrepDataToolCore::processRDOContainer( std::vector<Identifier
   
   // get RDO container
   const MdtCsmContainer* rdoContainer = getRdoContainer();
-  if(!rdoContainer) {
+  if(!rdoContainer || rdoContainer->size()==0) {
     return;                                        
   }    
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.cxx
index 0c9bb804c9a401244634b4885214e7e5da8a4518..c66cbd719ebbc8051c63e1035a35d0084fdb7e36 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RPC_RawDataProviderTool.cxx
@@ -73,10 +73,6 @@ StatusCode Muon::RPC_RawDataProviderTool::initialize()
       return StatusCode::FAILURE;  
     }
     
-    const std::vector<const Property*>* byteStreamNavProps
-        = (jobOptionsSvc)?  jobOptionsSvc->getProperties("ByteStreamNavigationProviderSvc") : 0;
-
-    
     const std::vector<const Property*>* dataFlowProps 
         = (jobOptionsSvc)?  jobOptionsSvc->getProperties("DataFlowConfig") : 0;
 
@@ -85,7 +81,6 @@ StatusCode Muon::RPC_RawDataProviderTool::initialize()
                      TrigConfSvc->getProperties("EventSelector"); 
     
     if     ( dataFlowProps != 0 ) has_bytestream = true;
-        if( byteStreamNavProps != 0 ) has_bytestream = true;
     else if( eventSelProps != 0 )
     {
         for (std::vector<const Property*>::const_iterator 
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p1.cxx
index ce1b930ac155899c6483c37abeeef3b5ae11f9a1..a108e59c5cd25f5b382048d0a578c1bbf1c24590 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p1.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 "MuonSimEvent/CSCSimHit.h"
@@ -58,7 +58,7 @@ void CSCSimHitCollectionCnv_p1::transToPers(const CSCSimHitCollection* transCont
 
 
 CSCSimHitCollection* CSCSimHitCollectionCnv_p1::createTransient(const Muon::CSCSimHitCollection_p1* persObj, MsgStream &log) {
-   std::auto_ptr<CSCSimHitCollection> trans(new CSCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<CSCSimHitCollection> trans(new CSCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p2.cxx
index 740030214a34b588b96d63c0d8b251036ce6b2c7..d788b1979ab86834fafc1d35b519853f99d6c060 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p2.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 "MuonSimEvent/CSCSimHit.h"
@@ -59,7 +59,7 @@ void CSCSimHitCollectionCnv_p2::transToPers(const CSCSimHitCollection* transCont
 
 
 CSCSimHitCollection* CSCSimHitCollectionCnv_p2::createTransient(const Muon::CSCSimHitCollection_p2* persObj, MsgStream &log) {
-   std::auto_ptr<CSCSimHitCollection> trans(new CSCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<CSCSimHitCollection> trans(new CSCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p3.cxx
index 2c555a7a34e5df059476229d9448ab23c97685c6..402dc9a5bbec5b4dc85595deeb668d234c87202f 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/CSCSimHitCollectionCnv_p3.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 "MuonSimEvent/CSCSimHit.h"
@@ -59,7 +59,7 @@ void CSCSimHitCollectionCnv_p3::transToPers(const CSCSimHitCollection* transCont
 
 
 CSCSimHitCollection* CSCSimHitCollectionCnv_p3::createTransient(const Muon::CSCSimHitCollection_p3* persObj, MsgStream &log) {
-  std::auto_ptr<CSCSimHitCollection> trans(new CSCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<CSCSimHitCollection> trans(new CSCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p1.cxx
index 0734fefec8eb2a075093e82a6588d891179aa20b..b3620eba6a9d52ff11e524acb61cbc8d6b987442 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p1.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 "MuonSimEvent/GenericMuonSimHit.h"
@@ -89,7 +89,7 @@ void GenericMuonSimHitCollectionCnv_p1::transToPers(const GenericMuonSimHitColle
 
 
 GenericMuonSimHitCollection* GenericMuonSimHitCollectionCnv_p1::createTransient(const Muon::GenericMuonSimHitCollection_p1* persObj, MsgStream &log) {
-  std::auto_ptr<GenericMuonSimHitCollection> trans(new GenericMuonSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<GenericMuonSimHitCollection> trans(new GenericMuonSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p2.cxx
index 7fa22e0904bb4f480f2e36953024f437a47ac2ea..5ae9907192036dcf890e6495d7771f05eea3e86d 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/GenericMuonSimHitCollectionCnv_p2.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 "MuonSimEvent/GenericMuonSimHit.h"
@@ -89,7 +89,7 @@ void GenericMuonSimHitCollectionCnv_p2::transToPers(const GenericMuonSimHitColle
 
 
 GenericMuonSimHitCollection* GenericMuonSimHitCollectionCnv_p2::createTransient(const Muon::GenericMuonSimHitCollection_p2* persObj, MsgStream &log) {
-  std::auto_ptr<GenericMuonSimHitCollection> trans(new GenericMuonSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<GenericMuonSimHitCollection> trans(new GenericMuonSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p1.cxx
index 8c3c1758e9c1a92a0f531e43b01e3d2ac187ddf5..d7b1fa8a0971033292c4ee261320fe5ee0510740 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p1.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 "MuonSimEvent/MDTSimHit.h"
@@ -50,7 +50,7 @@ void MDTSimHitCollectionCnv_p1::transToPers(const MDTSimHitCollection* transCont
 
 
 MDTSimHitCollection* MDTSimHitCollectionCnv_p1::createTransient(const Muon::MDTSimHitCollection_p1* persObj, MsgStream &log) {
-   std::auto_ptr<MDTSimHitCollection> trans(new MDTSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<MDTSimHitCollection> trans(new MDTSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p2.cxx
index 1ecd7e78c48f170df2f473774290fec4cf860b65..2670085602a46e64b15a5a83e02c38d571cb610e 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p2.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 "MuonSimEvent/MDTSimHit.h"
@@ -59,7 +59,7 @@ void MDTSimHitCollectionCnv_p2::transToPers(const MDTSimHitCollection* transCont
 
 
 MDTSimHitCollection* MDTSimHitCollectionCnv_p2::createTransient(const Muon::MDTSimHitCollection_p2* persObj, MsgStream &log) {
-   std::auto_ptr<MDTSimHitCollection> trans(new MDTSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<MDTSimHitCollection> trans(new MDTSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p3.cxx
index b1ffe1bfa37c6d70ac4cb5cf9ec75780da4f17f3..0ae463979cd38a05726b663e7f2d343504c0eaa4 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/MDTSimHitCollectionCnv_p3.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 "MuonSimEvent/MDTSimHit.h"
@@ -59,7 +59,7 @@ void MDTSimHitCollectionCnv_p3::transToPers(const MDTSimHitCollection* transCont
 
 
 MDTSimHitCollection* MDTSimHitCollectionCnv_p3::createTransient(const Muon::MDTSimHitCollection_p3* persObj, MsgStream &log) {
-  std::auto_ptr<MDTSimHitCollection> trans(new MDTSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<MDTSimHitCollection> trans(new MDTSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p1.cxx
index d6c12b83a6f9257d305514d9b9d06116f1c07d15..0e9bfee723c353400ea3a91e8d6bbe2e51765e29 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p1.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 "MuonSimEvent/RPCSimHit.h"
@@ -49,7 +49,7 @@ void RPCSimHitCollectionCnv_p1::transToPers(const RPCSimHitCollection* transCont
 
 
 RPCSimHitCollection* RPCSimHitCollectionCnv_p1::createTransient(const Muon::RPCSimHitCollection_p1* persObj, MsgStream &log) {
-   std::auto_ptr<RPCSimHitCollection> trans(new RPCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<RPCSimHitCollection> trans(new RPCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p2.cxx
index 9cdaa9e1864435b6e7a0d4e28a7ccec060ff60b3..43105390175bd2c33262636588590699dcea1027 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p2.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 "MuonSimEvent/RPCSimHit.h"
@@ -60,7 +60,7 @@ void RPCSimHitCollectionCnv_p2::transToPers(const RPCSimHitCollection* transCont
 
 
 RPCSimHitCollection* RPCSimHitCollectionCnv_p2::createTransient(const Muon::RPCSimHitCollection_p2* persObj, MsgStream &log) {
-   std::auto_ptr<RPCSimHitCollection> trans(new RPCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<RPCSimHitCollection> trans(new RPCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p3.cxx
index c0157c2dc802f731ff9222e13b1ca0831f5a4a7a..9781b2546d82883f96e987695b47bbdd788cdf7c 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/RPCSimHitCollectionCnv_p3.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 "MuonSimEvent/RPCSimHit.h"
@@ -60,7 +60,7 @@ void RPCSimHitCollectionCnv_p3::transToPers(const RPCSimHitCollection* transCont
 
 
 RPCSimHitCollection* RPCSimHitCollectionCnv_p3::createTransient(const Muon::RPCSimHitCollection_p3* persObj, MsgStream &log) {
-  std::auto_ptr<RPCSimHitCollection> trans(new RPCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<RPCSimHitCollection> trans(new RPCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p1.cxx
index 66247ed31e8642a94d0fdc3f537f0efeec162e7c..5b3d1cce17f587343b7b079b1c044a888613c170 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p1.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 "MuonSimEvent/TGCSimHit.h"
@@ -52,7 +52,7 @@ void TGCSimHitCollectionCnv_p1::transToPers(const TGCSimHitCollection* transCont
 
 
 TGCSimHitCollection* TGCSimHitCollectionCnv_p1::createTransient(const Muon::TGCSimHitCollection_p1* persObj, MsgStream &log) {
-   std::auto_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p2.cxx
index 878a29b72b0da91e3fbf8b9f61aae64ff2b5b51e..d87c8804a33d8f73dc51969e79bab7c75cd9f5b6 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p2.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 "MuonSimEvent/TGCSimHit.h"
@@ -56,7 +56,7 @@ void TGCSimHitCollectionCnv_p2::transToPers(const TGCSimHitCollection* transCont
 
 
 TGCSimHitCollection* TGCSimHitCollectionCnv_p2::createTransient(const Muon::TGCSimHitCollection_p2* persObj, MsgStream &log) {
-   std::auto_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p3.cxx
index 836e412617c38b3196d24b9281f78789ac66b4ff..c0e94066256e8f22ce6da155fde95894d0f61ac8 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p3.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 "MuonSimEvent/TGCSimHit.h"
@@ -60,7 +60,7 @@ void TGCSimHitCollectionCnv_p3::transToPers(const TGCSimHitCollection* transCont
 
 
 TGCSimHitCollection* TGCSimHitCollectionCnv_p3::createTransient(const Muon::TGCSimHitCollection_p3* persObj, MsgStream &log) {
-   std::auto_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+   std::unique_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
    persToTrans(persObj, trans.get(), log);
    return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p4.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p4.cxx
index 48eb4f732c79c0afffe240d052570461a240f853..41d86b78ddad443d6c3ef07c7ce83d6a88d899db 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p4.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/TGCSimHitCollectionCnv_p4.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 "MuonSimEvent/TGCSimHit.h"
@@ -60,7 +60,7 @@ void TGCSimHitCollectionCnv_p4::transToPers(const TGCSimHitCollection* transCont
 
 
 TGCSimHitCollection* TGCSimHitCollectionCnv_p4::createTransient(const Muon::TGCSimHitCollection_p4* persObj, MsgStream &log) {
-  std::auto_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<TGCSimHitCollection> trans(new TGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p1.cxx
index 1742c906ccbf0f6e80b41e2ea2a7f7f38753da7a..c511c313fbbabde5f2eac38bc1e1d0ee4847d63f 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p1.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
 */
 
 #include "MuonSimEvent/sTGCSimHit.h"
@@ -61,7 +61,7 @@ void sTGCSimHitCollectionCnv_p1::transToPers(const sTGCSimHitCollection* transCo
 
 
 sTGCSimHitCollection* sTGCSimHitCollectionCnv_p1::createTransient(const Muon::sTGCSimHitCollection_p1* persObj, MsgStream &log) {
-  std::auto_ptr<sTGCSimHitCollection> trans(new sTGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<sTGCSimHitCollection> trans(new sTGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p2.cxx
index f25704dca5b9f88b9f1c2e3c8c9bf2913ce2da36..e70b4126d6e928210895d95560e401e268e1e682 100644
--- a/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonSimEventTPCnv/src/sTGCSimHitCollectionCnv_p2.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
 */
 
 #include "MuonSimEvent/sTGCSimHit.h"
@@ -62,7 +62,7 @@ void sTGCSimHitCollectionCnv_p2::transToPers(const sTGCSimHitCollection* transCo
 
 
 sTGCSimHitCollection* sTGCSimHitCollectionCnv_p2::createTransient(const Muon::sTGCSimHitCollection_p2* persObj, MsgStream &log) {
-  std::auto_ptr<sTGCSimHitCollection> trans(new sTGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
+  std::unique_ptr<sTGCSimHitCollection> trans(new sTGCSimHitCollection("DefaultCollectionName",persObj->m_globalTime.size()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MmIdHelper.h b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MmIdHelper.h
index a6448228ec2cb8336e12f7980b6b5231060e641e..fea3aa6966aa9348177fc01a116af832fe900cc2 100644
--- a/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MmIdHelper.h
+++ b/MuonSpectrometer/MuonIdHelpers/MuonIdHelpers/MmIdHelper.h
@@ -93,7 +93,8 @@ class MmIdHelper : public MuonIdHelper {
   int gasGap(const Identifier& id) const;
   int multilayer(const Identifier& id) const;
   int channel(const Identifier& id) const;
-  bool measuresPhi(const Identifier& id) const; //Returns true for stereo layers
+  bool isStereo(const Identifier& id) const;
+  bool measuresPhi(const Identifier& id) const; //Returns false
 
   int numberOfMultilayers(const Identifier& id) const;
 
@@ -301,12 +302,16 @@ inline int MmIdHelper::gasGapMin() const {
   return GasGapMin;
 }
 /*******************************************************************************/ 
-inline bool MmIdHelper::measuresPhi(const Identifier& id) const{
-  bool measPhi = false;
+inline bool MmIdHelper::isStereo(const Identifier& id) const{
+  bool isStereo = false;
   int ml = multilayer(id);
   int gg = gasGap(id);
-  if ( (ml==1 && gg>2) || (ml==2 && gg<3) ) measPhi = true;
-  return measPhi;                                                                                               
+  if ( (ml==1 && gg>2) || (ml==2 && gg<3) ) isStereo = true;
+  return isStereo;                                                                                               
+}
+/*******************************************************************************/ 
+inline bool MmIdHelper::measuresPhi(const Identifier& /*id*/) const{
+  return false; 
 }
 /*******************************************************************************/ 
 inline int MmIdHelper::gasGapMax() const {
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
index 32893ceda66f9e6129f2cf1e93cf82f69d9f41ff..6a129bcb9b7769ffb290bff627e4bb6c523efb9c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
@@ -14,7 +14,7 @@ Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string&
   AthAlgTool(t,n,p)
 {
   declareInterface<IMMClusterBuilderTool>(this);
-  declareProperty("useErrorParametrization",m_useErrorParametrization=false);
+  declareProperty("useErrorParametrization",m_useErrorParametrization=true);
 
 }
 
@@ -117,8 +117,8 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
 	    MMflag[j] = 1;
 	    mergeIndices.push_back(j);
 	    mergeStrips.push_back(stripN);
-      mergeStripsTime.push_back(MMprds[j].time()-MMprds[j].globalPosition().norm()/299.792);
-      mergeStripsCharge.push_back(MMprds[j].charge());
+	    mergeStripsTime.push_back(MMprds[j].time()-MMprds[j].globalPosition().norm()/299.792);
+	    mergeStripsCharge.push_back(MMprds[j].charge());
 	    nmergeStrips++;
 	  }
 	}
@@ -178,6 +178,9 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
       if(nmerge<=1) (*covN)(0,0) = covX;
     } else {
       double localUncertainty = 0.074+0.66*theta-0.15*theta*theta;
+      if ( m_idHelperSvc->mmIdHelper().isStereo(MMprds[i].identify()) ) {
+      	localUncertainty = 10.;
+      } 
       (*covN)(0,0) = localUncertainty * localUncertainty;
     }
     ATH_MSG_VERBOSE(" make merged prepData at strip " << m_idHelperSvc->mmIdHelper().channel(MMprds[j].identify()) << " nmerge " << nmerge << " sqrt covX " << sqrt((*covN)(0,0)));
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx
index b261f2aba8b47df20a3f85b7890e031c2a9fd9dd..524d17be55948119ef8444e5f4f9d2a639f5661d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx
@@ -411,7 +411,7 @@ return (fabs(i.z()) < fabs(j.z()));}
     unsigned int barcodeCounter(0);
     int barcodeVal(0);
 
-    for(auto sit : sPoints){
+    for(const std::vector<ClusterSeg::SpacePoint>& sit : sPoints){
       if (sit.size() < 2) continue;
       std::vector<const MuonClusterOnTrack*> vec1;
       std::vector<const Trk::MeasurementBase*> vec2;
diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h
index 7f1bf53b31387080bd190916b381fc1f0359de01..78808cc220c523db5cc61a2522adedecd8971e34 100755
--- a/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h
+++ b/PhysicsAnalysis/EventTag/EventTagUtils/EventTagUtils/RegistrationStreamTrig.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef REGISTRATIONSVC_REGSTREAMDEFMETA_H
@@ -54,7 +54,6 @@ public:
 protected:
 
   ServiceHandle<StoreGateSvc> m_pOutputStore;
-  ServiceHandle<StoreGateSvc> m_pInputStore;
   StringProperty  m_LBColl_name;
   StringProperty  m_incompleteLBColl_name;
 
diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx b/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx
index c78c67087ff57b4ba5c74254ab464f3a3343d844..442bbaa8d06991a53b70fe92600b44674fbd043e 100755
--- a/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.cxx
+++ b/PhysicsAnalysis/EventTag/EventTagUtils/src/RegistrationStreamTrig.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 "EventTagUtils/RegistrationStreamTrig.h"
@@ -42,7 +42,6 @@ RegistrationStreamTrig::RegistrationStreamTrig(const std::string& name,
     :
     AthAlgorithm(name,pSvcLocator),
     m_pOutputStore("StoreGateSvc/MetaDataStore", name),
-    m_pInputStore("StoreGateSvc/InputMetaDataStore", name),
     m_trigConfSvc("TrigConf::TrigConfigSvc/TrigConfigSvc", name ),
     m_run(0),
     m_lb(0)
@@ -63,12 +62,6 @@ RegistrationStreamTrig::initialize()
      return(sc);
    }
 
-   sc = m_pInputStore.retrieve();
-   if (0 == m_pInputStore || sc.isFailure()) {
-      ATH_MSG_ERROR("Could not find InputMetaDataStore");
-      return(sc);
-   }
-
    if ( m_gettriggerconf ) {
      sc= m_trigConfSvc.retrieve();
      if (0 == m_trigConfSvc || sc.isFailure()) {
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h
index 66b0930ea6a047f54d190379535ab521b086b105..64969d14122d060ea30af5c100cabddb2cb3cb05 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h
@@ -47,12 +47,11 @@ class  JetBTaggingAlg:
     //SG::ReadHandleKey<xAOD::VertexContainer> m_VertexCollectionName {this, "vxPrimaryCollectionName", "", "Input primary vertex container"};
     SG::ReadHandleKey<xAOD::VertexContainer> m_BTagSVCollectionName {this, "BTagSVCollectionName", "", "Input BTagging secondary vertex container"};
     SG::ReadHandleKey<xAOD::BTagVertexContainer> m_BTagJFVtxCollectionName {this, "BTagJFVtxCollectionName", "", "Input BTagging Jet Fitter container"};
-    Gaudi::Property<SG::WriteDecorHandleKey<xAOD::JetContainer> >m_jetBTaggingLinkName {this, "BTaggingLinkName", "", "Element link from jet to BTagging container"};
+    SG::WriteDecorHandleKey<xAOD::JetContainer> m_jetBTaggingLinkName {this, "BTaggingLinkName", "", "Element link from jet to BTagging container"};
     SG::WriteHandleKey<xAOD::BTaggingContainer> m_BTaggingCollectionName {this, "BTaggingCollectionName", "", "Output BTagging container"};
     SG::WriteDecorHandleKey<xAOD::BTaggingContainer> m_bTagJetDecorLinkName {this, "JetLinkName", "", "Element Link from BTagging to Jet container"};
 
     std::string m_JetName;
-    std::string m_BTagLink;
 
     ToolHandle< IBTagTool > m_bTagTool;
     ToolHandle< IBTagLightSecVertexing > m_bTagSecVtxTool;
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py
index dda2e8c05784e896c8a1f7dec24301776510e994..2428dd7b017c627fc50f64b8a483029cae98dd78 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py
@@ -53,17 +53,22 @@ def JetTagCalibCfg(ConfigFlags, scheme="", TaggerList = []):
 
     return result
 
+def registerJetCollectionEL(flags, JetCollection, TimeStamp):
+    ItemList = []
+    # btaggingLink
+    suffix = ".".join(['btaggingLink'+ ts for ts in TimeStamp])
+    ItemList.append('xAOD::JetContainer#'+JetCollection+'Jets.' + suffix)
+    ItemList.append('xAOD::JetAuxContainer#'+JetCollection+'JetsAux.'+ suffix)
 
-def registerOutputContainersForJetCollection(flags, JetCollection, suffix = ''):
+    return ItemList
+
+def registerOutputBTaggingContainers(flags, JetCollection, suffix = ''):
       """Registers the jet collection to various containers in BTaggingFlags which govern which
       containers will be parsed to the output xAOD and ESD files. This used to happen in
       ./share/BTagging_jobOptions.py.
 
       input: JetCollection:       The name of the jet collection."""
       ItemList = []
-      # btaggingLink
-      ItemList.append('xAOD::JetContainer#'+JetCollection+'Jets.btaggingLink' + suffix)
-      ItemList.append('xAOD::JetAuxContainer#'+JetCollection+'JetsAux.btaggingLink'+ suffix)
 
       OutputFilesSVname = "SecVtx"
       OutputFilesJFVxname = "JFVtx"
@@ -74,10 +79,17 @@ def registerOutputContainersForJetCollection(flags, JetCollection, suffix = ''):
       OutputFilesBaseNameJFSecVtx = "xAOD::BTagVertexContainer#"
       OutputFilesBaseAuxNameJFSecVtx= "xAOD::BTagVertexAuxContainer#"
 
+      author = flags.BTagging.OutputFiles.Prefix + JetCollection
+      # SecVert
+      ItemList.append(OutputFilesBaseNameSecVtx + author + OutputFilesSVname)
+      ItemList.append(OutputFilesBaseAuxNameSecVtx + author + OutputFilesSVname + 'Aux.-vxTrackAtVertex')
+      # JFSeCVert
+      ItemList.append(OutputFilesBaseNameJFSecVtx + author + OutputFilesJFVxname)
+      ItemList.append(OutputFilesBaseAuxNameJFSecVtx + author + OutputFilesJFVxname + 'Aux.')
+
       if suffix:
-          suffix = '_' + suffix
+          author += '_' + suffix
 
-      author = flags.BTagging.OutputFiles.Prefix + JetCollection + suffix
       ItemList.append(OutputFilesBaseName + author)
       # jetLink
       jetLink = '.jetLink'
@@ -85,44 +97,51 @@ def registerOutputContainersForJetCollection(flags, JetCollection, suffix = ''):
       ItemList.append(OutputFilesBaseAuxName+author+jetLink)
 
       ItemList.append(OutputFilesBaseAuxName + author + 'Aux.-BTagTrackToJetAssociatorBB')
-      # SecVert
-      ItemList.append(OutputFilesBaseNameSecVtx + author + OutputFilesSVname)
-      ItemList.append(OutputFilesBaseAuxNameSecVtx + author + OutputFilesSVname + 'Aux.-vxTrackAtVertex')
-      # JFSeCVert
-      ItemList.append(OutputFilesBaseNameJFSecVtx + author + OutputFilesJFVxname)
-      ItemList.append(OutputFilesBaseAuxNameJFSecVtx + author + OutputFilesJFVxname + 'Aux.')
 
       return ItemList
 
 def BTagRedoESDCfg(flags, jet, extraContainers=[]):
     acc=ComponentAccumulator()
 
-    #Delete BTagging container read from input ESD
-    AddressRemappingSvc, ProxyProviderSvc=CompFactory.getComps("AddressRemappingSvc","ProxyProviderSvc",)
-    AddressRemappingSvc = AddressRemappingSvc("AddressRemappingSvc")
-    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::JetAuxContainer#AntiKt4EMTopoJets.btaggingLink->AntiKt4EMTopoJets.btaggingLink_old']
-    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::BTaggingContainer#BTagging_AntiKt4EMTopo->BTagging_AntiKt4EMTopo_old']
-    acc.addService(AddressRemappingSvc)
-    acc.addService(ProxyProviderSvc(ProviderNames = [ "AddressRemappingSvc" ]))
+    acc.merge(RenameInputContainerCfg("old"))
 
     #Register input ESD container in output
-    ESDItemList = registerOutputContainersForJetCollection(flags, jet)
+    ESDItemList = registerOutputBTaggingContainers(flags, jet)
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
     acc.merge(OutputStreamCfg(flags,"ESD", ItemList=ESDItemList+extraContainers))
 
     return acc
 
-def BTagESDtoESDCfg(flags, jet, new):
+def BTagESDtoESDCfg(flags, jet, timestamp):
     acc=ComponentAccumulator()
 
-    #Register input ESD container in output
-    ESDItemList = registerOutputContainersForJetCollection(flags, jet)
-
+    ESDItemList = []
     #Register new ouput ESD container
-    ESDnewItemList = registerOutputContainersForJetCollection(flags, jet, new)
+    for ts in timestamp:
+        ESDItemList += registerOutputBTaggingContainers(flags, jet, ts)
+
+    ESDItemList += registerJetCollectionEL(flags, jet, timestamp)
 
     from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
-    acc.merge(OutputStreamCfg(flags,"ESD", ItemList=ESDItemList+ESDnewItemList))
+    acc.merge(OutputStreamCfg(flags,"ESD", ItemList=ESDItemList))
+
+    return acc
+
+def RenameInputContainerCfg(suffix):
+    acc=ComponentAccumulator()
+
+    #Delete BTagging container read from input ESD
+    AddressRemappingSvc, ProxyProviderSvc=CompFactory.getComps("AddressRemappingSvc","ProxyProviderSvc",)
+    AddressRemappingSvc = AddressRemappingSvc("AddressRemappingSvc")
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::JetAuxContainer#AntiKt4EMTopoJets.btaggingLink->AntiKt4EMTopoJets.btaggingLink_' + suffix]
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::BTaggingContainer#BTagging_AntiKt4EMTopo->BTagging_AntiKt4EMTopo_' + suffix]
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::BTaggingAuxContainer#BTagging_AntiKt4EMTopoAux.->BTagging_AntiKt4EMTopo_' + suffix+"Aux."]
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::VertexContainer#BTagging_AntiKt4EMTopoSecVtx->BTagging_AntiKt4EMTopoSecVtx_' + suffix]
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::VertexAuxContainer#BTagging_AntiKt4EMTopoSecVtxAux.->BTagging_AntiKt4EMTopoSecVtx_' + suffix+"Aux."]
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::BTagVertexContainer#BTagging_AntiKt4EMTopoJFVtx->BTagging_AntiKt4EMTopoJFVtx_' + suffix]
+    AddressRemappingSvc.TypeKeyRenameMaps += ['xAOD::BTagVertexAuxContainer#BTagging_AntiKt4EMTopoJFVtxAux.->BTagging_AntiKt4EMTopoJFVtx_' + suffix+"Aux."]
+    acc.addService(AddressRemappingSvc)
+    acc.addService(ProxyProviderSvc(ProviderNames = [ "AddressRemappingSvc" ]))
 
     return acc
 
@@ -153,16 +172,6 @@ def BTagCfg(inputFlags,**kwargs):
     result.getService("GeoModelSvc").DetectorTools += [ CfgGetter.getPrivateTool("PixelDetectorTool", checkType=True) ]
 
     from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline
-    result.merge(addFolders(inputFlags,['/GLOBAL/BField/Maps <noover/>'],'GLOBAL_OFL'))
-    #result.merge(addFolders(inputFlags,['/GLOBAL/BField/Maps <noover/>'],'GLOBAL_ONL'))
-    #result.merge(addFolders(inputFlags,['/GLOBAL/TrackingGeo/LayerMaterialV2'],'GLOBAL_ONL'))
-    result.merge(addFolders(inputFlags,['/EXT/DCS/MAGNETS/SENSORDATA'],'DCS_OFL'))
-    
-    MagField__AtlasFieldSvc=CompFactory.MagField__AtlasFieldSvc
-    kwargs.setdefault( "UseDCS", True )
-    result.addService(MagField__AtlasFieldSvc("AtlasFieldSvc",**kwargs))
-    del kwargs['UseDCS']
-
     #load folders needed for Run2 ID alignment
     result.merge(addFoldersSplitOnline(inputFlags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
     result.merge(addFolders(inputFlags,['/TRT/Align'],'TRT_OFL'))
@@ -181,9 +190,9 @@ def BTagCfg(inputFlags,**kwargs):
         taggerList += ['MultiSVbb1','MultiSVbb2']
         if timestamp:
             #Time-stamped BTagging container (21.2)
-            for ts in timestamp:
-              result.merge(BTagESDtoESDCfg(inputFlags, jet, ts))
+            result.merge(BTagESDtoESDCfg(inputFlags, jet, timestamp))
             kwargs['TimeStamp'] = timestamp
+            result.merge(RenameInputContainerCfg("old"))
         else:
             extraCont = []
             if splitAlg:
@@ -203,6 +212,12 @@ def BTagCfg(inputFlags,**kwargs):
             result.merge(BTagRedoESDCfg(inputFlags, jet, extraCont))
 
         if splitAlg:
+            timestamp = kwargs.get('TimeStamp', None)
+            if not timestamp:
+                timestamp = ['']
+            else:
+                del kwargs['TimeStamp']
+
             postTagDL2JetToTrainingMap={
                 'AntiKt4EMPFlow': [
                 #'BTagging/201903/smt/antikt4empflow/network.json',
@@ -241,24 +256,33 @@ def BTagCfg(inputFlags,**kwargs):
             #result.merge(JetSecVertexingAlgCfg(inputFlags, jet, "InDetTrackParticles", 'MSV', 'BTagTrackToJetAssociatorBB'))
 
             #BTagging
-            result.merge(JetBTaggingAlgCfg(inputFlags, JetCollection = jet, TaggerList = taggerList, SVandAssoc = SecVertexingAndAssociators, **kwargs))
+            for ts in timestamp:
+                result.merge(JetBTaggingAlgCfg(inputFlags, JetCollection = jet, TaggerList = taggerList, SVandAssoc = SecVertexingAndAssociators, TimeStamp = ts, **kwargs))
 
             if jet in postTagDL2JetToTrainingMap:
-                result.merge(RunHighLevelTaggersCfg(inputFlags, jet, 'BTagTrackToJetAssociator', postTagDL2JetToTrainingMap[jet]))
+                #Track Augmenter
+                result.merge(BTagTrackAugmenterAlgCfg(inputFlags))
+
+                for ts in timestamp:
+                    #HighLevel taggers can not be run with time stamped containers
+                    if ts == "":
+                        result.merge(RunHighLevelTaggersCfg(inputFlags, jet, 'BTagTrackToJetAssociator', postTagDL2JetToTrainingMap[jet], ts))
 
         else:
             result.merge(JetBTaggerAlgCfg(inputFlags, JetCollection = jet, TaggerList = taggerList, **kwargs))
 
     return result
 
-def RunHighLevelTaggersCfg(inputFlags, JetCollection, Associator, TrainingMaps):
+def RunHighLevelTaggersCfg(inputFlags, JetCollection, Associator, TrainingMaps, TimeStamp):
     result = ComponentAccumulator()
-    #Track Augmenter
-    result.merge(BTagTrackAugmenterAlgCfg(inputFlags))
 
     from AthenaCommon.AlgSequence import AthSequencer
+
     BTagCollection = 'BTagging_'+JetCollection
     sequenceName = BTagCollection + "_HLTaggers"
+    if TimeStamp:
+            BTagCollection += '_' + TimeStamp
+            sequenceName += '_' + TimeStamp
 
     HLBTagSeq = AthSequencer(sequenceName)
     HLBTagSeq.Sequential = True
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py
index 24a087b056b45f989f4f4a91127a004dbf077def..ec7b5264b68aa4a2c88d220f7b84d44e4aba678d 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py
@@ -37,6 +37,7 @@ def JetBTaggingAlgCfg(ConfigFlags, JetCollection="", TaggerList=[], SetupScheme=
     else:
         options['BTagSVCollectionName'] = btagname + 'SecVtx'
         options['BTagJFVtxCollectionName'] = btagname + 'JFVtx'
+
     options['BTaggingLinkName'] = '.btaggingLink'+ts
     if ts:
         btagname += '_'+ts
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
index a0c71a3d03b6300ae196062e6d6ebd3ea6af81f6..b381bcd2383a8a4632a9e20651cb511222d454a6 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx
@@ -28,13 +28,11 @@ namespace Analysis {
   JetBTaggingAlg::JetBTaggingAlg(const std::string& n, ISvcLocator *p) : 
     AthAlgorithm(n,p),
     m_JetName(""),
-    m_BTagLink(".btaggingLink"),
     m_bTagTool("Analysis::BTagTool",this),
     m_bTagSecVtxTool("Analysis::BTagSecVertexing",this),
     m_magFieldSvc("AtlasFieldSvc",n)
   {
     declareProperty("JetCalibrationName", m_JetName);
-    declareProperty("BTaggingLink", m_BTagLink);
     declareProperty("BTagTool", m_bTagTool);
     declareProperty("BTagSecVertexing", m_bTagSecVtxTool);
     declareProperty("MagFieldSvc",    m_magFieldSvc );
@@ -55,9 +53,15 @@ namespace Analysis {
     ATH_CHECK( m_BTagSVCollectionName.initialize() );
     ATH_CHECK( m_BTagJFVtxCollectionName.initialize() );
     ATH_CHECK( m_BTaggingCollectionName.initialize() );
-    m_jetBTaggingLinkName = m_JetCollectionName.key() + m_BTagLink;
     ATH_CHECK( m_jetBTaggingLinkName.initialize() );
     ATH_CHECK( m_bTagJetDecorLinkName.initialize() );
+
+    ATH_MSG_DEBUG("#BTAG# Jet container name: " << m_JetCollectionName.key());
+    ATH_MSG_DEBUG("#BTAG# BTagging container name: " << m_BTaggingCollectionName.key());
+    ATH_MSG_DEBUG("#BTAG# EL from Jet to BTagging: " << m_jetBTaggingLinkName.key());
+    ATH_MSG_DEBUG("#BTAG# EL from BTagging to Jet: " << m_bTagJetDecorLinkName.key());
+    ATH_MSG_DEBUG("#BTAG# BTagging Secondary Vertex container name: " << m_BTagSVCollectionName.key());
+    ATH_MSG_DEBUG("#BTAG# BTagging JF Vertex container name: " << m_BTagJFVtxCollectionName.key());
    
     /// retrieve the main BTagTool
     if ( m_bTagTool.retrieve().isFailure() ) {
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/python/IP2DTagConfig.py b/PhysicsAnalysis/JetTagging/JetTagTools/python/IP2DTagConfig.py
index ff0fc1762e0420748b9c6e2c4c9e8d20f092c8f4..201c308ae119cc8987aba9aa66ed2896cc93529b 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/python/IP2DTagConfig.py
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/python/IP2DTagConfig.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
@@ -55,7 +55,7 @@ def IP2DTagCfg( flags, name = 'IP2DTag', scheme = '', useBTagFlagsDefaults = Tru
                      'impactParameterView'              : '2D',
                      'trackGradePartitions'             : grades,
                      'RejectBadTracks'                  : True,
-                     'jetCollectionList'                : BTaggingFlags.Jets,
+                     'jetCollectionList'                : [], #used only in reference mode
                      'unbiasIPEstimation'               : False,
                      'UseCHypo'                         : True,
                      'SecVxFinderName'                  : 'SV1',
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/python/IP3DTagConfig.py b/PhysicsAnalysis/JetTagging/JetTagTools/python/IP3DTagConfig.py
index 29265f1e83371f2c37d3c5498e715569639a0c43..c6f630fa38f3f480c4a7faeffdac1beb6728a0cd 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/python/IP3DTagConfig.py
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/python/IP3DTagConfig.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
@@ -60,7 +60,7 @@ def IP3DTagCfg( flags, name = 'IP3DTag', scheme = '', useBTagFlagsDefaults = Tru
                      'impactParameterView'              : '3D',
                      'trackGradePartitions'             : grades,
                      'RejectBadTracks'                  : True,
-                     'jetCollectionList'                : BTaggingFlags.Jets,
+                     'jetCollectionList'                : [], #used only in reference mode
                      'unbiasIPEstimation'               : False,
                      'UseCHypo'                         : True,
                      'SecVxFinderName'                  : 'SV1',
diff --git a/Reconstruction/RecExample/RecExCommission/share/Collisions_ATN.py b/Reconstruction/RecExample/RecExCommission/share/Collisions_ATN.py
index a51d8c385ea663a0b940e043c3857246c8965add..8423966e91b09f75ee425f8ee39be7aa8a8a52d8 100644
--- a/Reconstruction/RecExample/RecExCommission/share/Collisions_ATN.py
+++ b/Reconstruction/RecExample/RecExCommission/share/Collisions_ATN.py
@@ -310,6 +310,3 @@ include("RecExCommon/RecExCommon_topOptions.py")
 if Debug:
     from IOVDbSvc.CondDB import conddb
     conddb.dumpFolderTags('iovfolderlist.txt',True)
-
-
-# svcMgr.ByteStreamNavigationProviderSvc.OutputLevel = DEBUG
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 9ab81808af4789f5a575867d5a3ae3e0882854e7..b6147aa38b79a2a7fe6f05ec37618b8ac899f51e 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -477,51 +477,13 @@ if globalflags.InputFormat.is_bytestream():
         # --> AK
     else:
         logRecExCommon_topOptions.info("Read ByteStream file(s)")
-        if rec.readTAG():
-            # FIXME need cleaner merger between ReadAthenaPool.py and ReadByteStream.py
-
-            # for EventType
-            from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamCnvSvc
-            svcMgr += ByteStreamCnvSvc()
-            #EventPersistencySvc = svcMgr.EventPersistencySvc
-            svcMgr.EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ]
-
-            # ByteStreamAddressProviderSvc
-            from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc
-            svcMgr += ByteStreamAddressProviderSvc()
-            ByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
-
-            # proxy provider
-            from SGComps.SGCompsConf import ProxyProviderSvc
-            svcMgr += ProxyProviderSvc()
-
-            #specific for tag
-            from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamNavigationProviderSvc
-            svcMgr += ByteStreamNavigationProviderSvc( "ByteStreamNavigationProviderSvc" )
-
-            import AthenaPoolCnvSvc.ReadAthenaPool
-
-            svcMgr.ProxyProviderSvc.ProviderNames += [ "ByteStreamNavigationProviderSvc" ]
-
-            EventSelector = svcMgr.EventSelector
-            # List of input collections:
-            EventSelector.InputCollections = athenaCommonFlags.FilesInput()
-            # Type of input collections:
-            EventSelector.CollectionType = "ExplicitROOT"
-            # Query applied to event tag collection metadata:
-            EventSelector.Query = athenaCommonFlags.PoolInputQuery()
-            EventSelector.RefName = "StreamRAW"
-
+        from ByteStreamCnvSvc import ReadByteStream
 
-        else: #Regular offline case:
-            from ByteStreamCnvSvc import ReadByteStream
-
-
-            # Specify input file
-            if len(athenaCommonFlags.FilesInput())>0:
-                svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.FilesInput()
-            elif len(athenaCommonFlags.BSRDOInput())>0:
-                svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
+        # Specify input file
+        if len(athenaCommonFlags.FilesInput())>0:
+            svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.FilesInput()
+        elif len(athenaCommonFlags.BSRDOInput())>0:
+            svcMgr.ByteStreamInputSvc.FullFileName=athenaCommonFlags.BSRDOInput()
 
     if globalflags.DataSource()=='geant4':
         logRecExCommon_topOptions.info("DataSource is 'geant4'")
diff --git a/Reconstruction/eflowRec/src/eflowCaloObject.cxx b/Reconstruction/eflowRec/src/eflowCaloObject.cxx
index 87562af22e6859d223a848247a84549abd0c7e11..63b395f66af80d47f0dc70c86abfcb766a5003b5 100644
--- a/Reconstruction/eflowRec/src/eflowCaloObject.cxx
+++ b/Reconstruction/eflowRec/src/eflowCaloObject.cxx
@@ -111,27 +111,30 @@ void eflowCaloObject::simulateShower(eflowLayerIntegrator *integrator, eflowEEta
       }
     }//if vector of 0.15 clusters exists
     
-    double pull_015 = (totalE_015-expectedEnergy)/expectedEnergySigma;
+    double pull_015 = NAN;
+    if (expectedEnergySigma > 1e-6 ) pull_015 = (totalE_015-expectedEnergy)/expectedEnergySigma;
     thisEfRecTrack->setpull15(pull_015);
 
     double trackPt = thisEfRecTrack->getTrack()->pt();
-    //We use a 2D cut in the pull_015 and log10 of track pt plane to define a dense environment - if too dense then we disable the charged shower subtraction
-    if (pull_015 > 0.0 + (log10(40000)-log10(trackPt))*33.2 && 0.0 != expectedEnergySigma && bestClusters_015 && bestClusters_02 && useUpdated2015ChargedShowerSubtraction){
-      thisEfRecTrack->setSubtracted(); //this tricks eflowRec into thinking this track was subtracted, and hence no further subtraction will be done
-      thisEfRecTrack->setIsInDenseEnvironment();
-      //recalculate the LHED and the ordering  and find the new  expected E + sigma of expected E (the new LHED can change the latter two values we find in the look up tables)
-      //we use a larger cone of 0.2 for this
-      std::vector<eflowRecCluster*> theBestEfRecClusters_02;
-      for (eflowTrackClusterLink* thisLink : *bestClusters_02) if (thisLink->getCluster()->getCluster()->e() > 0.0) theBestEfRecClusters_02.push_back(thisLink->getCluster());
-      integrator->measureNewClus(theBestEfRecClusters_02, thisEfRecTrack);
-      j1st = integrator->getFirstIntLayer();
-      cellSubtractionManager.getOrdering(binnedParameters, trackE, trackEM1eta, j1st);
-      thisEfRecTrack->setEExpect(cellSubtractionManager.fudgeMean() * trackE, fabs(cellSubtractionManager.fudgeStdDev()*trackE)*fabs(cellSubtractionManager.fudgeStdDev()*trackE));
+    //If the looked up expected energy deposit was 0.0, then pull_015 is NAN. In that case we should not try to apply the 2D cut described below.
+    if (!std::isnan(pull_015)){
+      //We use a 2D cut in the pull_015 and log10 of track pt plane to define a dense environment - if too dense then we disable the charged shower subtraction
+      if (pull_015 > 0.0 + (log10(40000)-log10(trackPt))*33.2 && 0.0 != expectedEnergySigma && bestClusters_015 && bestClusters_02 && useUpdated2015ChargedShowerSubtraction){
+        thisEfRecTrack->setSubtracted(); //this tricks eflowRec into thinking this track was subtracted, and hence no further subtraction will be done
+        thisEfRecTrack->setIsInDenseEnvironment();
+        //recalculate the LHED and the ordering  and find the new  expected E + sigma of expected E (the new LHED can change the latter two values we find in the look up tables)
+        //we use a larger cone of 0.2 for this
+        std::vector<eflowRecCluster*> theBestEfRecClusters_02;
+        for (eflowTrackClusterLink* thisLink : *bestClusters_02) if (thisLink->getCluster()->getCluster()->e() > 0.0) theBestEfRecClusters_02.push_back(thisLink->getCluster());
+        integrator->measureNewClus(theBestEfRecClusters_02, thisEfRecTrack);
+        j1st = integrator->getFirstIntLayer();
+        cellSubtractionManager.getOrdering(binnedParameters, trackE, trackEM1eta, j1st);
+        thisEfRecTrack->setEExpect(cellSubtractionManager.fudgeMean() * trackE, fabs(cellSubtractionManager.fudgeStdDev()*trackE)*fabs(cellSubtractionManager.fudgeStdDev()*trackE));
+      }
+      else {
+        thisEfRecTrack->setEExpect(expectedEnergy, expectedEnergySigma*expectedEnergySigma);
+      }//ok to do subtraction, and so we just set the usual expected E + sigma of expected E needed for subtraction	
     }
-    else {
-      thisEfRecTrack->setEExpect(expectedEnergy, expectedEnergySigma*expectedEnergySigma);
-    }//ok to do subtraction, and so we just set the usual expected E + sigma of expected E needed for subtraction	
-    
   }
 }
 
diff --git a/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py b/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py
index c90c4dc6cf7682ef03909e0174abb76e653bb11a..dcb5d39110b2ddf27422b6c68c3a109b2ce5c9a6 100644
--- a/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py
+++ b/Reconstruction/tauMonitoring/python/tauMonitorAlgorithm.py
@@ -65,7 +65,6 @@ def tauMonitoringConfig(inputFlags):
     tauMonAlgEleTrig.etaMax = 100
     tauMonAlgJetTrig.etaMin = -100
     tauMonAlgJetTrig.etaMax = 100
-
     tauMonAlgHighPt.etaMin = -100
     tauMonAlgHighPt.etaMax = 100
     tauMonAlgHighPtBDTLoose.etaMin = -100
@@ -226,7 +225,7 @@ def tauMonitoringConfig(inputFlags):
             igroup.defineHistogram(namer('tauEtEt15BDTLoose','et','Identification_BDTLoose15GeV',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
                                    xbins=60, xmin=0., xmax=300.,path=folder+"Identification/BDTLoose15GeV")
 
-            igroup.defineHistogram(namer('PanModeEt15BDTLoose','PanMode','Identification_BDTLoose15GeV',postfix), title='tau decay mode from PanTau upon JetBDTSigMedium;mode',
+            igroup.defineHistogram(namer('panModeEt15BDTLoose','panMode','Identification_BDTLoose15GeV',postfix), title='tau decay mode from panTau upon JetBDTSigMedium;mode',
                                    xbins=5, xmin=0., xmax=5., path=folder+"Identification/BDTLoose15GeV", labels=["1p0n","1p1n","1pXn","3p0n","3pXn"])
 
             igroup.defineHistogram(namer('jetSeedEta','jetSeedEta','Calo',postfix), title='Calorimeter eta of tau candidates;Eta;Numbers of Candidates',path=folder+"Calo",
@@ -311,7 +310,7 @@ def tauMonitoringConfig(inputFlags):
             xbins=20, xmin=0., xmax=2. )
 
             #Substructure Histograms
-            igroup.defineHistogram(namer('PanModeSubstructure','PanMode','SubStructure',postfix), title='tau decay mode from PanTau upon JetBDTSigMedium;mode',
+            igroup.defineHistogram(namer('panModeSubstructure','panMode','SubStructure',postfix), title='tau decay mode from PanTau upon JetBDTSigMedium;mode',
             xbins=8, xmin=0., xmax=8., path=folder+"SubStructure")
 
             igroup.defineHistogram(namer('BDTScoreAsP0','BDTScoreAsP0','SubStructure',postfix), title='BDT score indentifying pion zero ; BDT score',path=folder+"SubStructure",
@@ -363,11 +362,17 @@ def tauMonitoringConfig(inputFlags):
             igroup.defineHistogram(namer('dRJetSeedAxis','dRJetSeedAxis','Track',postfix), title='DeltaR from Track to JetSeedAxis; dR ',path=folder+"Track",
             xbins=30, xmin=0.0, xmax=1.5 )
 
-            igroup.defineHistogram(namer('z0TJVA','z0TJVA','Track',postfix), title='0 respected to Tau vertex , Z0SinTheta (mm)',path=folder+"Track",
+            igroup.defineHistogram(namer('z0TJVA','z0TJVA','Track',postfix), title='z0 respected to Tau vertex , Z0SinTheta (mm)',path=folder+"Track",
+            xbins=50, xmin=-35.0, xmax=35.0 )
+
+            igroup.defineHistogram(namer('z0PriVtx','z0PriVtx','Track',postfix), title=' z0 respected to primary vertex ; Z0 SinTheta (mm)',path=folder+"Track",
             xbins=50, xmin=-35.0, xmax=35.0 )
 
+            igroup.defineHistogram(namer('LB2,z0PriVtx','z0VsLB','Calo',postfix), type='TH2F', title='Track z0 vs Lumiblock;Longitudinal Impact Parameter (mm) );Lumiblock', path=folder+"Track", 
+            xbins=1200,xmin=0,xmax=1200,ybins=50,ymin=-35.,ymax=35)
+
 
-            igroup.defineHistogram(namer('eta_track','eta','Track',postfix), title='Track Eta;Eta',path=folder+"Track",
+            igroup.defineHistogram(namer('etaTrack','eta','Track',postfix), title='Track Eta;Eta',path=folder+"Track",
             xbins=51, xmin=-2.55, xmax=2.55 )
 
             igroup.defineHistogram(namer('leadTrkPt','leadTrkPt','Track',postfix), title='Pt of Leading track;Transverse Momentum (GeV)',path=folder+"Track",
@@ -389,10 +394,10 @@ def tauMonitoringConfig(inputFlags):
             igroup.defineHistogram(namer('numberOfTRTOutliers','numberOfTRTOutliers','Track',postfix), title="Number of TRT Low Threshold Outliers;Number of TRT Low Threshold Outliers",path=folder+"Track",
             xbins=31, xmin=-0.5, xmax=25.5)
             
-            igroup.defineHistogram(namer('pT_track','pT_track','Track',postfix), title='Track pT;Transverse Momentum (GeV)',path=folder+"Track",
+            igroup.defineHistogram(namer('ptTrack','pT','Track',postfix), title='Track pT;Transverse Momentum (GeV)',path=folder+"Track",
             xbins=60, xmin=0, xmax=300 )
 
-            igroup.defineHistogram(namer('phi_track','phi_track','Track',postfix), title='Track Phi;Phi',path=folder+"Track",
+            igroup.defineHistogram(namer('phiTrack','phi','Track',postfix), title='Track Phi;Phi',path=folder+"Track",
             xbins=64, xmin=PHIMIN, xmax=PHIMAX )
 
             igroup.defineHistogram(namer('rConv','rConv','Track',postfix), title='rConv;rConv',path=folder+"Track",
@@ -495,9 +500,12 @@ if __name__=='__main__':
 
     # Set the Athena configuration flags
     from AthenaConfiguration.AllConfigFlags import ConfigFlags
+
+
     nightly = '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/'
     file = 'data16_13TeV.00311321.physics_Main.recon.AOD.r9264/AOD.11038520._000001.pool.root.1'
     ConfigFlags.Input.Files = [nightly+file]
+
     ConfigFlags.Input.isMC = False
     ConfigFlags.Output.HISTFileName = 'tauRegions.root'
     
diff --git a/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx b/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
index 0951ca97e90da6f7198bcb8c6598cf4148c9c3fa..b96ea0c30b183d29ab1ae00a589f8ddd30105f18 100644
--- a/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
+++ b/Reconstruction/tauMonitoring/src/tauMonitorAlgorithm.cxx
@@ -5,6 +5,7 @@
 #include "tauMonitoring/tauMonitorAlgorithm.h"
 
 #include "GaudiKernel/SystemOfUnits.h"
+#include "xAODCore/ShallowCopy.h"
 
 using Gaudi::Units::GeV;
 
@@ -24,13 +25,22 @@ StatusCode tauMonitorAlgorithm::initialize() {
 }
 
 StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
+
+
     using namespace Monitored;
+
     SG::ReadHandle<xAOD::TauJetContainer> taus(m_TauContainerKey, ctx);
+
     if (! taus.isValid() ) {
       ATH_MSG_ERROR("evtStore() does not contain tau Collection with name "<< m_TauContainerKey);
       return StatusCode::FAILURE;
     }
 
+    auto shallowCopy = xAOD::shallowCopyContainer (*taus);
+    std::unique_ptr<xAOD::TauJetContainer> shallowTaus (shallowCopy.first);
+
+
+
     
     //In tauMonTool these values are chosen as Et cuts for different Histograms
     const int lowerEtThreshold = 15;
@@ -42,8 +52,8 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto tauPhi = Monitored::Scalar<float>("tauPhi",0.0);
     auto tauEt = Monitored::Scalar<float>("tauEt",0.0);
     auto tauEtEt15BDTLoose = Monitored::Scalar<float>("tauEtEt15BDTLoose",0.0);
-    auto PanModeEt15BDTLoose = Monitored::Scalar<float>("PanModeEt15BDTLoose",0.0);
-    auto PanModeSubstructure = Monitored::Scalar<float>("PanModeSubstructure",0.0);
+    auto panModeEt15BDTLoose = Monitored::Scalar<float>("panModeEt15BDTLoose",0.0);
+    auto panModeSubstructure = Monitored::Scalar<float>("panModeSubstructure",0.0);
     auto coreTrk = Monitored::Scalar<float>("coreTrk",0.0);
     auto PtTESMVA = Monitored::Scalar<float>("PtTESMVA",0.0);
     auto PtCombined = Monitored::Scalar<float>("PtCombined",0.0);
@@ -66,6 +76,7 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto nClustersEt15BDTLoose = Monitored::Scalar<int>("nClustersEt15BDTLoose",0.0);
 
     auto LB = Monitored::Scalar<int>("LB",0.0);
+    auto LB2 = Monitored::Scalar<int>("LB2",0.0);
 
     auto EMRadius = Monitored::Scalar<float>("EMRadius",0.0);
     auto hadRadius = Monitored::Scalar<float>("hadRadius",0.0);
@@ -111,7 +122,7 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto mEflowApprox = Monitored::Scalar<float>("mEflowApprox",0.0);
     auto ptIntermediateAxis = Monitored::Scalar<float>("ptIntermediateAxis",0.0);
 
-    auto absipSigLeadTrk = Monitored::Scalar<float>("absipSigLeadTrk",0.0);
+    auto ipSigLeadTrk = Monitored::Scalar<float>("ipSigLeadTrk",0.0);
     auto etOverPtLeadTrk = Monitored::Scalar<float>("etOverPtLeadTrk",0.0);
     auto massTrkSys = Monitored::Scalar<float>("massTrkSys",0.0);
     auto ptRatioEflowApprox = Monitored::Scalar<float>("ptRatioEflowApprox",0.0);
@@ -129,9 +140,9 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto z0TJVA  = Monitored::Scalar<float>("z0TJVA",0.0);
     auto z0PriVtx  = Monitored::Scalar<float>("z0PriVtx",0.0);
 
-    auto eta_track  = Monitored::Scalar<float>("eta_track",0.0);
-    auto pT_track  = Monitored::Scalar<float>("pT_track",0.0);
-    auto phi_track  = Monitored::Scalar<float>("phi_track",0.0);
+    auto etaTrack  = Monitored::Scalar<float>("etaTrack",0.0);
+    auto ptTrack  = Monitored::Scalar<float>("ptTrack",0.0);
+    auto phiTrack  = Monitored::Scalar<float>("phiTrack",0.0);
     auto leadTrkPt  = Monitored::Scalar<float>("leadTrkPt",0.0);
     auto nHighPtTaus = Monitored::Scalar<float>("nHighPtTaus",0.0);
     auto numberOfTRTHighThresholdHits  = Monitored::Scalar<float>("numberOfTRTHighThresholdHits",0.0);
@@ -149,335 +160,307 @@ StatusCode tauMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const
     auto rConvII  = Monitored::Scalar<float>("rConvII",0.0);
 
     nTauCandidates = 0;
+
     
-    for (const auto& tau : *taus) {
-      //Global and tauB/CR/EC
-      tauEta = tau->eta();
-      tauPhi = tau->phi();
-      tauEt = tau->pt()/GeV;
-      tauCharge = tau->charge();
-      NumTracks = tau->nTracks();
-      nClusters = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
-      LB = GetEventInfo(ctx)->lumiBlock();
-      lumiPerBCID = lbAverageInteractionsPerCrossing(ctx);
-      coreTrk = tau->nTracks( xAOD::TauJetParameters::coreTrack ) ;
-      PtTESMVA = tau->ptFinalCalib() /GeV; 
-      PtCombined = tau->auxdata<float>( "pt_combined" )/GeV; 
-
-      //calo
-      EMRadius =  tau->detail<float>(xAOD::TauJetParameters::EMRadius);
-      hadRadius = tau->detail<float>(xAOD::TauJetParameters::hadRadius);
-      isolFrac = tau->detail<float>(xAOD::TauJetParameters::isolFrac) ;
-      stripWidth2 = tau->detail<float>(xAOD::TauJetParameters::stripWidth2) ;
-      nStrip = tau->detail<int>(xAOD::TauJetParameters::nStrip) ;
-      etEMAtEMScale = tau->detail<float>(xAOD::TauJetParameters::etEMAtEMScale);
-      etHadAtEMScale = tau->detail<float>(xAOD::TauJetParameters::etHadAtEMScale);
-      centFrac = tau->detail<float>(xAOD::TauJetParameters::centFrac) ;
-      jetSeedEta = tau->etaJetSeed(); 
-      jetSeedPhi = tau->phiJetSeed(); 
-      jetSeedPt = tau->ptJetSeed()/GeV; 
-      ptIntermediateAxis     =    tau->ptIntermediateAxis()/GeV;
-
-      //identification
-      BDTJetScore = tau->discriminant(xAOD::TauJetParameters::BDTJetScore);
-      BDTJetScoreSigTrans = tau->discriminant(xAOD::TauJetParameters::BDTJetScoreSigTrans);
-      JetBDTBkgMedium = tau->isTau(xAOD::TauJetParameters::JetBDTBkgMedium);
-
-      BDTEleScoreSigTrans = tau->auxdata<float>("BDTEleScoreSigTrans"); 
-
-      eleBDTMedium =       tau->isTau(xAOD::TauJetParameters::EleBDTMedium);
-      eleBDTTight  =       tau->isTau(xAOD::TauJetParameters::EleBDTTight);
-      muonVeto     =       tau->isTau(xAOD::TauJetParameters::MuonVeto);
-      tauBDTLoose  =       tau->isTau(xAOD::TauJetParameters::JetBDTSigLoose);
-      tauBDTMedium =       tau->isTau(xAOD::TauJetParameters::JetBDTSigMedium);
-      tauBDTTight  =       tau->isTau(xAOD::TauJetParameters::JetBDTSigTight);
-
-	  dRmax           =    tau->detail<float>(xAOD::TauJetParameters::dRmax);
-	  EMPOverTrkSysP  =    tau->detail<float>(xAOD::TauJetParameters::EMPOverTrkSysP);
-	  SumPtTrkFracCorrected =    tau->detail<float>(xAOD::TauJetParameters::SumPtTrkFracCorrected);
-	  mEflowApprox           =    tau->detail<float>(xAOD::TauJetParameters::mEflowApprox)/GeV;
-
-      float ipSigLeadTrk    =    tau->detail<float>(xAOD::TauJetParameters::ipSigLeadTrk);
-      absipSigLeadTrk =    fabs(ipSigLeadTrk);
-      etOverPtLeadTrk = tau->detail<float>(xAOD::TauJetParameters::etOverPtLeadTrk);
-      massTrkSys = tau->detail<float>(xAOD::TauJetParameters::massTrkSys) / GeV; //GeV
-      ptRatioEflowApprox = tau->detail<float>( xAOD::TauJetParameters::ptRatioEflowApprox );
-      trFlightPathSig = tau->detail<float>(xAOD::TauJetParameters::trFlightPathSig);
-      trkAvgDist = tau->detail<float>(xAOD::TauJetParameters::trkAvgDist);
-
-      panEta = tau->etaPanTauCellBased();
-      panPhi = tau->phiPanTauCellBased() ;
-      panPt = tau->ptPanTauCellBased()/GeV; //GeV ;
-
-      //TauB/Identification/EleVetoBDTinputs
-      PSSFrac = tau->detail<float>(xAOD::TauJetParameters::PSSFraction ) ;
-      EMFrac = tau->auxdata<float>( "EMFracFixed" );
-
-     if ( tau->isAvailable<float>("hadLeakFracFixed"))
-        hadLeakFracFixed = tau->auxdata<float>( "hadLeakFracFixed" ); 
-
-
-      if ( tau->isAvailable<float>( "etHotShotWinOverPtLeadTrk" ) ){
-        etHotShotWinOverPtLeadTrk = tau->auxdata<float>( "etHotShotWinOverPtLeadTrk" );
-      }
-
-      //TauB/SubStructure
-      EMFracTrk = tau->detail<float>( xAOD::TauJetParameters::ChPiEMEOverCaloEME ) ;
-      EfracL2EffCluster = tau->detail<float>( xAOD::TauJetParameters::lead2ClusterEOverAllClusterE );
-      EisoEffCluster = tau->detail<float>( xAOD::TauJetParameters::caloIsoCorrected)/GeV;
-      InvMassEffClusters =  tau->detail<float>( xAOD::TauJetParameters::effTopoInvMass )/GeV ; //puts it in GeV
-      nNeutPFO = tau->nProtoNeutralPFOs();
-      nShot = tau->nShotPFOs() ;
-
-      int panmode = -1 ;
-      int panmodeSubstructure = -1 ;
-
-      const auto& trigDecTool = getTrigDecisionTool();
-
-      if (m_etaMin < fabs(tauEta) && fabs(tauEta) < m_etaMax){
-         nTauCandidates +=1;
-
-         if(tauEt > higherEtThreshold){
-            nHighPtTauCandidates +=1;
-            nHighPtTaus +=1;
-
-         }
-
-         if (m_kinGroupName != "tauMonKinGroupHighPt"&& m_kinGroupName!="tauMonKinGroupHighPtBDTLoose"){
-
-             if (
-                     (m_kinGroupName != "tauMonKinGroupTauTrig"  && m_kinGroupName != "tauMonKinGroupEleTrig" && m_kinGroupName != "tauMonKinGroupJetTrig") || 
-                     (m_kinGroupName == "tauMonKinGroupTauTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_tau[2-9][0-9]_.*")) ||
-                     (m_kinGroupName == "tauMonKinGroupEleTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_e[2-9][0-9]_.*")) ||
-                     (m_kinGroupName == "tauMonKinGroupJetTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_j[2-9][0-9]_.*"))
-                ){
+    for (const auto& tau : *shallowTaus) {
+        TLorentzVector calibratedVec = tau->p4(xAOD::TauJetParameters::FinalCalib);
+        tau->setP4(calibratedVec.Pt(), calibratedVec.Eta(), calibratedVec.Phi(), calibratedVec.M());
+
+        tauEta = tau->eta();
+        tauPhi = tau->phi();
+        tauEt = tau->pt()/GeV;
+        tauCharge = tau->charge();
+        NumTracks = tau->nTracks();
+        nClusters = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
+        LB = GetEventInfo(ctx)->lumiBlock();
+        lumiPerBCID = lbAverageInteractionsPerCrossing(ctx);
+        coreTrk = tau->nTracks( xAOD::TauJetParameters::coreTrack ) ;
+        PtTESMVA = tau->ptFinalCalib() /GeV; 
+        PtCombined = tau->auxdata<float>( "pt_combined" )/GeV; 
+
+        //calo
+        EMRadius =  tau->detail<float>(xAOD::TauJetParameters::EMRadius);
+        hadRadius = tau->detail<float>(xAOD::TauJetParameters::hadRadius);
+        isolFrac = tau->detail<float>(xAOD::TauJetParameters::isolFrac) ;
+        stripWidth2 = tau->detail<float>(xAOD::TauJetParameters::stripWidth2) ;
+        nStrip = tau->detail<int>(xAOD::TauJetParameters::nStrip) ;
+        etEMAtEMScale = tau->detail<float>(xAOD::TauJetParameters::etEMAtEMScale);
+        etHadAtEMScale = tau->detail<float>(xAOD::TauJetParameters::etHadAtEMScale);
+        centFrac = tau->detail<float>(xAOD::TauJetParameters::centFrac) ;
+        jetSeedEta = tau->etaJetSeed(); 
+        jetSeedPhi = tau->phiJetSeed(); 
+        jetSeedPt = tau->ptJetSeed()/GeV; 
+        ptIntermediateAxis     =    tau->ptIntermediateAxis()/GeV;
+
+        //identification
+        BDTJetScore = tau->discriminant(xAOD::TauJetParameters::BDTJetScore);
+        BDTJetScoreSigTrans = tau->discriminant(xAOD::TauJetParameters::BDTJetScoreSigTrans);
+        JetBDTBkgMedium = tau->isTau(xAOD::TauJetParameters::JetBDTBkgMedium);
+
+        BDTEleScoreSigTrans = tau->auxdata<float>("BDTEleScoreSigTrans"); 
+
+        eleBDTMedium =       tau->isTau(xAOD::TauJetParameters::EleBDTMedium);
+        eleBDTTight  =       tau->isTau(xAOD::TauJetParameters::EleBDTTight);
+        muonVeto     =       tau->isTau(xAOD::TauJetParameters::MuonVeto);
+        tauBDTLoose  =       tau->isTau(xAOD::TauJetParameters::JetBDTSigLoose);
+        tauBDTMedium =       tau->isTau(xAOD::TauJetParameters::JetBDTSigMedium);
+        tauBDTTight  =       tau->isTau(xAOD::TauJetParameters::JetBDTSigTight);
+
+        dRmax           =    tau->detail<float>(xAOD::TauJetParameters::dRmax);
+        EMPOverTrkSysP  =    tau->detail<float>(xAOD::TauJetParameters::EMPOverTrkSysP);
+        SumPtTrkFracCorrected =    tau->detail<float>(xAOD::TauJetParameters::SumPtTrkFracCorrected);
+        mEflowApprox           =    tau->detail<float>(xAOD::TauJetParameters::mEflowApprox)/GeV;
+
+        etOverPtLeadTrk = tau->detail<float>(xAOD::TauJetParameters::etOverPtLeadTrk);
+        ptRatioEflowApprox = tau->detail<float>( xAOD::TauJetParameters::ptRatioEflowApprox );
+        trFlightPathSig = tau->detail<float>(xAOD::TauJetParameters::trFlightPathSig);
+        trkAvgDist = tau->detail<float>(xAOD::TauJetParameters::trkAvgDist);
+
+        panEta = tau->etaPanTauCellBased();
+        panPhi = tau->phiPanTauCellBased() ;
+        panPt = tau->ptPanTauCellBased()/GeV; //GeV ;
+
+        //TauB/Identification/EleVetoBDTinputs
+        PSSFrac = tau->detail<float>(xAOD::TauJetParameters::PSSFraction ) ;
+        EMFrac = tau->auxdata<float>( "EMFracFixed" );
+
+        if ( tau->isAvailable<float>("hadLeakFracFixed")){
+            hadLeakFracFixed = tau->auxdata<float>( "hadLeakFracFixed" ); 
+        }
 
 
+        if ( tau->isAvailable<float>( "etHotShotWinOverPtLeadTrk" ) ){
+            etHotShotWinOverPtLeadTrk = tau->auxdata<float>( "etHotShotWinOverPtLeadTrk" );
+        }
 
-                 if(m_kinGroupName != "tauMonKinGroupGlobal" && tauEt > lowerEtThreshold && tauBDTLoose){
-                     tauPhiEt15BDTLoose = tau->phi();
-                     tauEtaEt15BDTLoose = tau->eta();
-                     tauEtEt15BDTLoose = tau->pt()/GeV;
-                     nClustersEt15BDTLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
-                     NumTracksEt15BDTLoose = tau->nTracks();
+        //TauB/SubStructure
+        EMFracTrk = tau->detail<float>( xAOD::TauJetParameters::ChPiEMEOverCaloEME ) ;
+        EfracL2EffCluster = tau->detail<float>( xAOD::TauJetParameters::lead2ClusterEOverAllClusterE );
+        EisoEffCluster = tau->detail<float>( xAOD::TauJetParameters::caloIsoCorrected)/GeV;
+        InvMassEffClusters =  tau->detail<float>( xAOD::TauJetParameters::effTopoInvMass )/GeV ; //puts it in GeV
+        nNeutPFO = tau->nProtoNeutralPFOs();
+        nShot = tau->nShotPFOs() ;
 
-                     tau->panTauDetail(xAOD::TauJetParameters::PanTau_DecayMode, panmode); 
-                     PanModeEt15BDTLoose = panmode;
+        int panModeDummy = -1 ;
+        int panModeSubstructureDummy = -1 ;
 
-                     fill(tool,tauPhiEt15BDTLoose);
-                     fill(tool,tauEtaEt15BDTLoose);
-                     fill(tool,nClustersEt15BDTLoose);
-                     fill(tool,NumTracksEt15BDTLoose);
-                     fill(tool,tauEtEt15BDTLoose);
-                     fill(tool,PanModeEt15BDTLoose);
-                 }
+        const auto& trigDecTool = getTrigDecisionTool();
 
+        if (m_etaMin < std::abs(tauEta) && std::abs(tauEta) < m_etaMax){
+            nTauCandidates +=1;
 
-                float maxpt = -9.9;
-                for( ElementLink< xAOD::TauTrackContainer > link : tau->allTauTrackLinks() ){
-                    if ( ! link.isValid() ) continue ;  
+            if(tauEt > higherEtThreshold){
+                nHighPtTauCandidates +=1;
+                nHighPtTaus +=1;
+            }
 
-                    if ( (*link)->pt() > maxpt ){
-                        leadTrackDeltaEta = (*link)->eta() - tau->etaJetSeed() ;
-                        leadTrackDeltaPhi  = (*link)->phi() - tau->phiJetSeed() ;
-                    }
+            if (m_kinGroupName != "tauMonKinGroupHighPt"&& m_kinGroupName!="tauMonKinGroupHighPtBDTLoose"){
 
-                    const xAOD::TrackParticle* track = (*link)->track() ;
+                if (
+                     (m_kinGroupName != "tauMonKinGroupTauTrig"  && m_kinGroupName != "tauMonKinGroupEleTrig" && m_kinGroupName != "tauMonKinGroupJetTrig") || 
+                     (m_kinGroupName == "tauMonKinGroupTauTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_tau[2-9][0-9]_.*")) ||
+                     (m_kinGroupName == "tauMonKinGroupEleTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_e[2-9][0-9]_.*")) ||
+                     (m_kinGroupName == "tauMonKinGroupJetTrig" && trigDecTool !=0 && trigDecTool->isPassed("HLT_j[2-9][0-9]_.*"))
+                ){
 
-                    dRJetSeedAxis = (*link)->dRJetSeedAxis( *tau );
-                    fill(tool,dRJetSeedAxis);
+                    if(m_kinGroupName != "tauMonKinGroupGlobal" && tauEt > lowerEtThreshold && tauBDTLoose){
+                        tauPhiEt15BDTLoose = tau->phi();
+                        tauEtaEt15BDTLoose = tau->eta();
+                        tauEtEt15BDTLoose = tau->pt()/GeV;
+                        nClustersEt15BDTLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
+                        NumTracksEt15BDTLoose = tau->nTracks();
+
+                        tau->panTauDetail(xAOD::TauJetParameters::PanTau_DecayMode, panModeDummy); 
+                        panModeEt15BDTLoose = panModeDummy;
+                        fill(tool,tauPhiEt15BDTLoose);
+                        fill(tool,tauEtaEt15BDTLoose);
+                        fill(tool,nClustersEt15BDTLoose);
+                        fill(tool,NumTracksEt15BDTLoose);
+                        fill(tool,tauEtEt15BDTLoose);
+                        fill(tool,panModeEt15BDTLoose);
+                    }
+                    if (tau->nTracks()!= 0){
 
+                        massTrkSys = tau->detail<float>(xAOD::TauJetParameters::massTrkSys) / GeV; //GeV
+                        trkWidth2  = tau->detail<float>(xAOD::TauJetParameters::trkWidth2);
+                        trFlightPathSig = tau->detail<float>(xAOD::TauJetParameters::trFlightPathSig);
+                        ipSigLeadTrk    =    tau->detail<float>(xAOD::TauJetParameters::ipSigLeadTrk);
+                        ipZ0SinThetaSigLeadTrk = tau->detail<float>(xAOD::TauJetParameters::ipZ0SinThetaSigLeadTrk);
 
-                    z0TJVA = (*link)->z0sinThetaTJVA( *tau ) ;
-                    fill(tool,z0TJVA);
+                        leadTrkPt =tau->detail<float>(xAOD::TauJetParameters::leadTrkPt)/GeV;
 
+                        fill(tool,massTrkSys);
+                        fill(tool,trkWidth2);
+                        fill(tool,trFlightPathSig);
+                        fill(tool,ipSigLeadTrk);
+                        fill(tool,ipZ0SinThetaSigLeadTrk);
+                        fill(tool,leadTrkPt);
 
-                    float ePht = 0. ;
-                    if (track->summaryValue( ePht, xAOD::eProbabilityHT )){
-                        eProbabilityHT = ePht;
-                        fill(tool,eProbabilityHT);
-                    }
 
-                 if ( tau->nTracks() != 0){
-                    const xAOD::TrackParticle* track = tau->track(0)->track();
-                    const Trk::Perigee perigee = track->perigeeParameters();
-                    d0 = perigee.parameters()[Trk::d0];
-
-                    eta_track= perigee.eta();
-                    leadTrkPt =tau->detail<float>(xAOD::TauJetParameters::leadTrkPt)/GeV;
-                    pT_track = perigee.pT()/GeV;
-                    phi_track = perigee.parameters()[Trk::phi];
-                    trkWidth2  = tau->detail<float>(xAOD::TauJetParameters::trkWidth2);
-                    ipZ0SinThetaSigLeadTrk = tau->detail<float>(xAOD::TauJetParameters::ipZ0SinThetaSigLeadTrk);
-
-                    rConv = sqrt(fabs(d0)*tau->pt()/(0.15*2.));
-                    double auxprod= d0 * perigee.parameters()[Trk::qOverP];
-                    rConvII= auxprod > 0 ? rConv : -rConv;
+                        const xAOD::TrackParticle* track = tau->track(0)->track();
+                        const Trk::Perigee perigee = track->perigeeParameters();
+
+                        uint8_t dummy(0);
                     
-	                uint8_t dummy(0);
+                        if (track->summaryValue(dummy, xAOD::numberOfSCTSharedHits)){
+                            numberOfSCTSharedHits = dummy;
+                            fill(tool,numberOfSCTSharedHits);
+                        }
+
+                        if (track->summaryValue(dummy, xAOD::numberOfSCTHits)){
+                            numberOfSCTHits = dummy;
+                            fill(tool,numberOfSCTHits);
+                        }
+
+                        if (track->summaryValue(dummy, xAOD::numberOfPixelSharedHits)){
+                            numberOfPixelSharedHits = dummy;
+                            fill(tool,numberOfPixelSharedHits);
+                        }
+                        
+                        if (track->summaryValue(dummy, xAOD::numberOfInnermostPixelLayerHits)){
+                            numberOfInnermostPixelLayerHits = dummy;
+                            fill(tool,numberOfInnermostPixelLayerHits);
+                        }
+                       
+                        if (track->summaryValue(dummy, xAOD::numberOfPixelHits)){
+                            numberOfPixelHits = dummy;
+                            fill(tool,numberOfPixelHits);
+                        }
+                        if (track->summaryValue(dummy, xAOD::numberOfTRTHighThresholdHits)){
+                            numberOfTRTHighThresholdHits = dummy;
+                            fill(tool,numberOfTRTHighThresholdHits);
+                        }
+                        if (track->summaryValue(dummy, xAOD::numberOfTRTHighThresholdOutliers)){
+                            numberOfTRTHighThresholdOutliers = dummy;
+                            fill(tool,numberOfTRTHighThresholdOutliers);
+                        }
+                        if (track->summaryValue(dummy, xAOD::numberOfTRTHits)){
+                            numberOfTRTHits = dummy;
+                            fill(tool,numberOfTRTHits);
+                        }
+                        if (track->summaryValue(dummy, xAOD::numberOfTRTOutliers)){
+                            numberOfTRTOutliers = dummy;
+                            fill(tool,numberOfTRTOutliers);
+                        }
                     
-                    if (track->summaryValue(dummy, xAOD::numberOfSCTSharedHits)){
-                        numberOfSCTSharedHits = dummy;
-                        fill(tool,numberOfSCTSharedHits);
-                    }
 
-                    if (track->summaryValue(dummy, xAOD::numberOfSCTHits)){
-                        numberOfSCTHits = dummy;
-                        fill(tool,numberOfSCTHits);
-                    }
-
-                    if (track->summaryValue(dummy, xAOD::numberOfPixelSharedHits)){
-                        numberOfPixelSharedHits = dummy;
-                        fill(tool,numberOfPixelSharedHits);
-                    }
-                    
-                    if (track->summaryValue(dummy, xAOD::numberOfInnermostPixelLayerHits)){
-                        numberOfInnermostPixelLayerHits = dummy;
-                        fill(tool,numberOfInnermostPixelLayerHits);
-                    }
-                   
-                    if (track->summaryValue(dummy, xAOD::numberOfPixelHits)){
-                        numberOfPixelHits = dummy;
-                        fill(tool,numberOfPixelHits);
+                        d0 = perigee.parameters()[Trk::d0];
+                        fill(tool,d0);
+                        //z0 missing
+                        phiTrack = perigee.parameters()[Trk::phi];
+                        fill(tool,phiTrack);
+                        etaTrack = perigee.eta();
+                        fill(tool,etaTrack);
+                        ptTrack = perigee.pT()/GeV;
+                        fill(tool,ptTrack);
                     }
-                    if (track->summaryValue(dummy, xAOD::numberOfTRTHighThresholdHits)){
-                        numberOfTRTHighThresholdHits = dummy;
-                        fill(tool,numberOfTRTHighThresholdHits);
+                    //this else can be removed, but it sets any track variable to 0 if there are no tracks
+                    //this solution makes entry numbers match calo which is desired but there are too many zeros. 
+                    else{
+                        leadTrkPt = 0;
+                        fill(tool,leadTrkPt);
                     }
-                    if (track->summaryValue(dummy, xAOD::numberOfTRTHighThresholdOutliers)){
-                        numberOfTRTHighThresholdOutliers = dummy;
-                        fill(tool,numberOfTRTHighThresholdOutliers);
+
+                    for ( int s = 0 ; s < nShot ; s++ ) 
+                    {
+                        const xAOD::PFO* shot = tau->shotPFO( s ) ;
+                        if ( shot != NULL ) 
+                        {
+                            float pt3Temp = -9.0 ;
+                            shot->attribute(xAOD::PFODetails::PFOAttributes::tauShots_pt3, pt3Temp ) ;
+                            pt3 = pt3Temp /GeV; //GeV
+                            fill(tool,pt3);
+                        }
                     }
-                    if (track->summaryValue(dummy, xAOD::numberOfTRTHits)){
-                        numberOfTRTHits = dummy;
-                        fill(tool,numberOfTRTHits);
+
+                    for ( unsigned int np = 0 ; np < nNeutPFO ; np ++ ) 
+                    {
+                      const xAOD::PFO* npfo = tau->protoNeutralPFO( np ) ;
+                      BDTScoreAsP0 = npfo->bdtPi0Score();
+                      fill(tool,BDTScoreAsP0);
                     }
-                    if (track->summaryValue(dummy, xAOD::numberOfTRTOutliers)){
-                        numberOfTRTOutliers = dummy;
-                        fill(tool,numberOfTRTOutliers);
+
+                    fill(tool,tauPhi,tauEta,LB,tauEt,centFrac, isolFrac,coreTrk); //for all 2d Histograms
+                    fill(tool,PtTESMVA);
+                    fill(tool,PtCombined);
+                    fill(tool,EMRadius);
+                    fill(tool,hadRadius);
+                    fill(tool,stripWidth2);
+                    fill(tool,nStrip);
+                    fill(tool,etEMAtEMScale);
+                    fill(tool,etHadAtEMScale);
+                    fill(tool,tauCharge);
+                    fill(tool,BDTEleScoreSigTrans);
+                    fill(tool,BDTJetScore);
+                    fill(tool,BDTJetScoreSigTrans);
+                    fill(tool,JetBDTBkgMedium);
+                    fill(tool,BDTEleScoreSigTrans);
+                    fill(tool,eleBDTMedium);
+                    fill(tool,eleBDTTight);
+                    fill(tool,muonVeto);
+                    fill(tool,tauBDTLoose);
+                    fill(tool,tauBDTMedium);
+                    fill(tool,tauBDTTight);
+                    fill(tool,BDTJetScore);
+                    fill(tool,PSSFrac);
+                    fill(tool,hadLeakFracFixed);
+                    fill(tool,etHotShotWinOverPtLeadTrk);
+                    fill(tool,EMFrac);
+                    fill(tool,EMFracTrk);
+                    fill(tool,EfracL2EffCluster);
+                    fill(tool,EisoEffCluster);
+                    fill(tool,InvMassEffClusters);
+                    fill(tool,nNeutPFO);
+                    fill(tool,nShot);
+                    fill(tool,NumTracks);
+                    fill(tool,nClusters);
+                    fill(tool,jetSeedEta);
+                    fill(tool,jetSeedPhi);
+                    fill(tool,jetSeedPt);
+                    fill(tool,dRmax);
+                    fill(tool,EMPOverTrkSysP);
+                    fill(tool,SumPtTrkFracCorrected);
+                    fill(tool,mEflowApprox);
+                    fill(tool,ptIntermediateAxis);
+                    fill(tool,etOverPtLeadTrk);
+                    fill(tool,ptRatioEflowApprox);
+                    fill(tool,trkAvgDist);
+                    fill(tool,lumiPerBCID);
+
+                    tau->panTauDetail(xAOD::TauJetParameters::PanTau_DecayMode, panModeSubstructureDummy); 
+
+                    panModeSubstructure = panModeSubstructureDummy;
+
+                    fill(tool,panModeSubstructure);
+                    if ( panPhi > -100 ){
+                        fill(tool,panEta);
+                        fill(tool,panPhi);
+                        fill(tool,panPt);
                     }
-                    
-                    fill(tool,d0);
-                    fill(tool,leadTrackDeltaEta);
-                    fill(tool,leadTrackDeltaPhi);
-                    fill(tool,eta_track);
-                    fill(tool,leadTrkPt);
-                    fill(tool,nHighPtTaus);
-                    fill(tool,pT_track);
-                    fill(tool,phi_track);
-                    fill(tool,trkWidth2);
-                    fill(tool,ipZ0SinThetaSigLeadTrk);
-                    fill(tool,rConv);
-                    fill(tool,rConvII);
-                    fill(tool,numberOfSCTHits);
-                 }
-                
-                }
-                
-                for ( int s = 0 ; s < nShot ; s++ ) 
-                {
-                  const xAOD::PFO* shot = tau->shotPFO( s ) ;
-                  if ( shot != NULL ) 
-                  {
-                    float pt3Temp = -9.0 ;
-                    shot->attribute(xAOD::PFODetails::PFOAttributes::tauShots_pt3, pt3Temp ) ;
-                    pt3 = pt3Temp /GeV; //GeV
-                    fill(tool,pt3);
-                  }
                 }
+            }
 
-                for ( unsigned int np = 0 ; np < nNeutPFO ; np ++ ) 
-                {
-                  const xAOD::PFO* npfo = tau->protoNeutralPFO( np ) ;
-                  BDTScoreAsP0 = npfo->bdtPi0Score();
-                  fill(tool,BDTScoreAsP0);
-                }
+            if ((m_kinGroupName == "tauMonKinGroupHighPt") && tauEt > lowerEtThreshold){
+                tauPhiEt15 = tau->phi();
+                tauEtaEt15 = tau->eta();
+                fill(tool,LB,tauPhiEt15,tauEtaEt15);
+            }
 
-                 fill(tool,tauPhi,tauEta,LB,tauEt,centFrac, isolFrac,coreTrk); //for all 2d Histograms
-                 fill(tool,PtTESMVA);
-                 fill(tool,PtCombined);
-                 fill(tool,EMRadius);
-                 fill(tool,hadRadius);
-                 fill(tool,stripWidth2);
-                 fill(tool,nStrip);
-                 fill(tool,etEMAtEMScale);
-                 fill(tool,etHadAtEMScale);
-                 fill(tool,tauCharge);
-                 fill(tool,BDTEleScoreSigTrans);
-                 fill(tool,BDTJetScore);
-                 fill(tool,BDTJetScoreSigTrans);
-                 fill(tool,JetBDTBkgMedium);
-                 fill(tool,BDTEleScoreSigTrans);
-                 fill(tool,eleBDTMedium);
-                 fill(tool,eleBDTTight);
-                 fill(tool,muonVeto);
-                 fill(tool,tauBDTLoose);
-                 fill(tool,tauBDTMedium);
-                 fill(tool,tauBDTTight);
-                 fill(tool,BDTJetScore);
-                 fill(tool,PSSFrac);
-                 fill(tool,hadLeakFracFixed);
-                 fill(tool,etHotShotWinOverPtLeadTrk);
-                 fill(tool,EMFrac);
-                 fill(tool,EMFracTrk);
-                 fill(tool,EfracL2EffCluster);
-                 fill(tool,EisoEffCluster);
-                 fill(tool,InvMassEffClusters);
-                 fill(tool,nNeutPFO);
-                 fill(tool,nShot);
-                 fill(tool,NumTracks);
-                 fill(tool,nClusters);
-                 fill(tool,jetSeedEta);
-                 fill(tool,jetSeedPhi);
-                 fill(tool,jetSeedPt);
-                 fill(tool,dRmax);
-                 fill(tool,EMPOverTrkSysP);
-                 fill(tool,SumPtTrkFracCorrected);
-                 fill(tool,mEflowApprox);
-                 fill(tool,ptIntermediateAxis);
-                 fill(tool,absipSigLeadTrk);
-                 fill(tool,etOverPtLeadTrk);
-                 fill(tool,massTrkSys);
-                 fill(tool,ptRatioEflowApprox);
-                 fill(tool,trFlightPathSig);
-                 fill(tool,trkAvgDist);
-                 fill(tool,lumiPerBCID);
-
-                 tau->panTauDetail(xAOD::TauJetParameters::PanTau_DecayMode, panmodeSubstructure); 
-                 PanModeSubstructure = panmodeSubstructure;
-                 fill(tool,PanModeSubstructure);
-
-                
-                 if ( panPhi > -100 ){
-                    fill(tool,panEta);
-                    fill(tool,panPhi);
-                    fill(tool,panPt);
-                 }
+            if ((m_kinGroupName == "tauMonKinGroupHighPtBDTLoose") && tauEt > lowerEtThreshold &&tauBDTLoose){
+                tauPhiEt15BDTLoose = tau->phi();
+                tauEtaEt15BDTLoose = tau->eta();
+                tauEtEt15BDTLoose = tau->pt()/GeV; //GeV
+
+                nClustersEt15BDTLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
+                NumTracksEt15BDTLoose = tau->nTracks();
+                fill(tool,LB,tauPhiEt15BDTLoose,tauEtaEt15BDTLoose);
+                fill(tool,nClustersEt15BDTLoose);
+                fill(tool,NumTracksEt15BDTLoose);
+                fill(tool,tauEtEt15BDTLoose);
             }
         }
-
-         if ((m_kinGroupName == "tauMonKinGroupHighPt") && tauEt > lowerEtThreshold){
-             tauPhiEt15 = tau->phi();
-             tauEtaEt15 = tau->eta();
-             fill(tool,LB,tauPhiEt15,tauEtaEt15);
-         }
-
-         if ((m_kinGroupName == "tauMonKinGroupHighPtBDTLoose") && tauEt > lowerEtThreshold &&tauBDTLoose){
-             tauPhiEt15BDTLoose = tau->phi();
-             tauEtaEt15BDTLoose = tau->eta();
-             tauEtEt15BDTLoose = tau->pt()/GeV; //GeV
-
-             nClustersEt15BDTLoose = tau->detail<int>(xAOD::TauJetParameters::numTopoClusters) ;
-             NumTracksEt15BDTLoose = tau->nTracks();
-             fill(tool,LB,tauPhiEt15BDTLoose,tauEtaEt15BDTLoose);
-             fill(tool,nClustersEt15BDTLoose);
-             fill(tool,NumTracksEt15BDTLoose);
-             fill(tool,tauEtEt15BDTLoose);
-         }
-
-      }
-   }
-   fill(tool,nHighPtTauCandidates);
-   fill(tool,nTauCandidates);
-   return StatusCode::SUCCESS;
+    }
+    fill(tool,nHighPtTauCandidates);
+    fill(tool,nTauCandidates);
+    return StatusCode::SUCCESS;
 }
diff --git a/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py b/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py
index 56306fdf8b8666a0d56601c511141e5a17388ae9..6a26d0e5cc85d9b8f77a680e867e1d63353d660c 100644
--- a/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py
+++ b/Simulation/G4Atlas/G4AtlasTools/python/G4GeometryToolConfig.py
@@ -1,4 +1,7 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
+
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 
@@ -362,7 +365,7 @@ def ATLASEnvelopeCfg(ConfigFlags, name="Atlas", **kwargs):
 
     #leave a check in for WorldRrange and WorldZrange?
     if ConfigFlags.Sim.WorldZRange:
-        print ConfigFlags.Sim.WorldZRange
+        print (ConfigFlags.Sim.WorldZRange)
         if ConfigFlags.Sim.WorldZRange < 26046.:
               raise RuntimeError('getATLASEnvelope: ERROR ConfigFlags.Sim.WorldZRange must be > 26046. Current value: %f' % ConfigFlags.Sim.WorldZRange)
         zSurfaces[17] =  ConfigFlags.Sim.WorldZRange + 100.
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
index 37065e9b16628df7057158dbcea0531efc53efe8..7fac942845dd71d4a412af3dd78c9a96dd21e040 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
@@ -288,7 +288,7 @@ TEST_F(CollectionMerger_test, nonexisting_input_collection___expect_SG_exception
   ASSERT_TRUE( m_alg->setProperty( "OutputPixelHits", outputPropertyValue).isSuccess() );
 
   ASSERT_TRUE( m_alg->initialize().isSuccess() );
-  ASSERT_THROW( m_alg->execute(ctx), SG::ExcNullReadHandle );
+  ASSERT_THROW( m_alg->execute(ctx).ignore(), SG::ExcNullReadHandle );
 }
 
 
diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/src/KinematicParticleFilter.cxx b/Simulation/ISF/ISF_Core/ISF_Tools/src/KinematicParticleFilter.cxx
index 27b60cd8bb49652adb1704439945a9fd2fc2de0d..54e8ee969a5dee2a9e8022e49994d10e19036e50 100644
--- a/Simulation/ISF/ISF_Core/ISF_Tools/src/KinematicParticleFilter.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Tools/src/KinematicParticleFilter.cxx
@@ -12,6 +12,9 @@
 // ISF includes
 #include "ISF_Event/ISFParticle.h"
 
+// CLHEP includes
+#include "CLHEP/Units/SystemOfUnits.h"
+
 /** Constructor **/
 ISF::KinematicParticleFilter::KinematicParticleFilter(const std::string& t, const std::string& n, const IInterface* p) :
   base_class(t,n,p),
@@ -22,7 +25,7 @@ ISF::KinematicParticleFilter::KinematicParticleFilter(const std::string& t, cons
                    m_maxEtaSym=3.0,
                    "Particle momentum pseudorapidity cut");
   declareProperty( "MinMomentum",
-                   m_cut_minMom2=100.,
+                   m_cut_minMom2=50.*CLHEP::MeV,
                    "Momentum cut");
 }
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p1.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p1.cxx
index cd1a7f8692c15b257eb6fa980191986ecf56232c..ab1535e60b83a615e231b5c842a2c293aede548b 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p1.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p1.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 "ISF_FatrasEvent/PlanarCluster.h"
@@ -169,7 +169,7 @@ iFatras::PlanarClusterContainer* PlanarClusterContainerCnv_p1::createTransient(c
       log << MSG::FATAL << "Could not initialize PlanarClusterContainerCnv_p1 " << endmsg;
     }
   }
-  std::auto_ptr<iFatras::PlanarClusterContainer> trans(new iFatras::PlanarClusterContainer(m_pixId->wafer_hash_max()));
+  std::unique_ptr<iFatras::PlanarClusterContainer> trans(new iFatras::PlanarClusterContainer(m_pixId->wafer_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p2.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p2.cxx
index 707d125e7b13784f5b66f5760052a8d2fa5e2005..64eb6148a5304f804a13e8661ea14399cbdb0595 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p2.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/src/PlanarClusterContainerCnv_p2.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 "ISF_FatrasEvent/PlanarCluster.h"
@@ -174,7 +174,7 @@ iFatras::PlanarClusterContainer* PlanarClusterContainerCnv_p2::createTransient(c
       log << MSG::FATAL << "Could not initialize PlanarClusterContainerCnv_p2 " << endmsg;
     }
   }
-  std::auto_ptr<iFatras::PlanarClusterContainer> trans(new iFatras::PlanarClusterContainer(m_pixId->wafer_hash_max()+m_sctId->wafer_hash_max()));
+  std::unique_ptr<iFatras::PlanarClusterContainer> trans(new iFatras::PlanarClusterContainer(m_pixId->wafer_hash_max()+m_sctId->wafer_hash_max()));
   persToTrans(persObj, trans.get(), log);
   return(trans.release());
 }
diff --git a/TileCalorimeter/TileCoolDcs/python/ProgressBar.py b/TileCalorimeter/TileCoolDcs/python/ProgressBar.py
index 04d8480af3e590d5a95b880cba742dbe8e9ae760..5921a45dab8689d81ac3088399a4bc805533ef9c 100755
--- a/TileCalorimeter/TileCoolDcs/python/ProgressBar.py
+++ b/TileCalorimeter/TileCoolDcs/python/ProgressBar.py
@@ -46,7 +46,7 @@ class progressBar:
         self.progBar = self.prefix + '#'*numHashes + ' '*(self.width-numHashes) + self.suffix
 
         # figure out where to put the percentage, roughly centered
-        percentPlace = (len(self.progBar) / 2) - len(str(percentDone))
+        percentPlace = (len(self.progBar) // 2) - len(str(percentDone))
         percentString = str(percentDone) + "%"
 
         # slice the percentage into the bar
diff --git a/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py b/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
index ce33d6cdbaed55389b090cf431f314aceec1b07f..31a420c1329fa360354bd1b8020d3ec26356af52 100755
--- a/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
+++ b/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
@@ -9,9 +9,9 @@ from PyCool import cool
 import ROOT
 from array import array
 import copy
-import TileDCSDataInfo
 from CoolConvUtilities.AtlCoolTool import connect
-from ProgressBar import progressBar
+from TileCoolDcs.TileDCSDataInfo import TileDCSDataInfo
+from TileCoolDcs.ProgressBar import progressBar
 
 #====================================================================================================
 class IOVDict:
@@ -66,7 +66,7 @@ class IOVDict:
         if search < seq[0]:
             return -1
         while True:
-            center = (left + right) / 2
+            center = (left + right) // 2
             candidate = seq[center]
             if search == candidate:
                 return center
@@ -125,7 +125,7 @@ class FolderVarSet:
 
         #=== check if all variables have been set
         notSet = []
-        for var, stat in self.index.items():
+        for var, stat in list(self.index.items()):
             mod = stat[1]
             if mod is False:
                 notSet.append(var)
@@ -141,7 +141,7 @@ class FolderVarSet:
         self.iovDictStore[drawer].addData(iovSince, valueCopy)
 
         #=== reset all values and modification flags
-        for var in self.index.iterkeys():
+        for var in self.index.keys():
             self.index[var][1] = False
             self.val[ self.index[var][0] ] = 0
 
@@ -157,23 +157,23 @@ class FolderVarSet:
     def getUniqueIOVs(self):
 
         uniqueIOVList = []
-        for iovDict in self.iovDictStore.values():
+        for iovDict in list(self.iovDictStore.values()):
             uniqueIOVList.extend( iovDict.iovList )
         return list(set(uniqueIOVList))
 
     def getUniqueVariables(self):
 
         uniqueVariableList = []
-        for drawer in self.iovDictStore.iterkeys():
-            for variable in self.index.iterkeys():
+        for drawer in self.iovDictStore.keys():
+            for variable in self.index.keys():
                 uniqueVariableList.append( (drawer,variable) )
         return uniqueVariableList
 
     def getVariables(self):
-        return self.index.keys()
+        return list(self.index.keys())
 
     def getDrawers(self):
-        return self.iovDictStore.keys()
+        return list(self.iovDictStore.keys())
 
 
 
@@ -198,7 +198,7 @@ class TileDCSDataGrabber:
         #=== connect to DB, depending on technology
         self.db = 0
         self.dbV = []
-        self.info = TileDCSDataInfo.TileDCSDataInfo(dbstring)
+        self.info = TileDCSDataInfo(dbstring)
         if dbSource=="COOL":
             if dbstring is None:
                 self.dbV.append(0)
@@ -238,8 +238,6 @@ class TileDCSDataGrabber:
         #
         #     TileDCSDataGrabber   --   Access to TileCal DCS data in COOL / ORACLE
         #
-        #         problems, suggestions, etc... :  andrey.ryzhov@cern.ch
-        #
         ##############################################################################
 
         """)
@@ -349,7 +347,7 @@ class TileDCSDataGrabber:
             if evTime[0]!=timeEnd:
                 timeEnd=evTime[0]
                 valKey = cool.ValidityKey(evTime[0]*self.unix2cool)
-                for folder, varlist in folders.items():
+                for folder, varlist in list(folders.items()):
                     coolFolder = self.db.getFolder(folder)
                     channel = self.info.get_channel(folder,drawer)
                     obj = coolFolder.findObject(valKey,channel)
@@ -567,7 +565,7 @@ class TileDCSDataGrabber:
         folderVarSetList = []
 
         #=== loop over all different folders and build list of FolderVarSets
-        for folder, channels in folderChannelDict.items():
+        for folder, channels in list(folderChannelDict.items()):
             logging.debug( "treating folder: %s", folder )
             varsInFolder =  folderVariableDict[folder]
             logging.debug( "---> variables in this folder: %s", varsInFolder )
@@ -634,13 +632,13 @@ class TileDCSDataGrabber:
 
         #=== get all tables spanned by query
         tableRange = self.getEventHistoryTables( iovStart, iovEnd)
-        tables = tableRange.keys()
+        tables = list(tableRange.keys())
         tables.sort()
         print ("===> Going to access the following oracle table(s):")
         for table in tables:
             print ("     * ", table, " ---> validity range: ", tableRange[table])
 
-        for folder, channels in folderChannelDict.items():
+        for folder, channels in list(folderChannelDict.items()):
             logging.debug( "treating folder: %s", folder )
             varsInFolder = folderVariableDict[folder]
             logging.debug( "---> variables in this folder: %s", varsInFolder )
@@ -726,7 +724,7 @@ class TileDCSDataGrabber:
         key = ( folder , drawer)
         if key not in self.info.folderDrawer_to_oracleId:
             logging.error( "Can not resolve key: %s , known keys are:", key )
-            for key, val in self.info.folderDrawer_to_oracleId.items():
+            for key, val in list(self.info.folderDrawer_to_oracleId.items()):
                 logging.error( "%s %s", key, val)
             return None
         oracleId = self.info.folderDrawer_to_oracleId[key]
diff --git a/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py b/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
index 9a9d8e55380031bd9e0a6b343385567c5ee4607b..4601127c4eb35224a1ec548bd7a0f2ea3ebf0ea8 100755
--- a/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
+++ b/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
@@ -116,15 +116,15 @@ class TileDCSDataInfo:
     def __init__( self, dbstring=None ):
 
         self.vars = {}
-        for var, info in self.vars_LVPS_AI.items():
+        for var, info in list(self.vars_LVPS_AI.items()):
             self.vars[var] = info
-        for var, info in self.vars_LVPS_STATES.items():
+        for var, info in list(self.vars_LVPS_STATES.items()):
             self.vars[var] = info
-        for var, info in self.vars_HV.items():
+        for var, info in list(self.vars_HV.items()):
             self.vars[var] = info
-        for var, info in self.vars_HVSET.items():
+        for var, info in list(self.vars_HVSET.items()):
             self.vars[var] = info
-        for var, info in self.vars_DAQ.items():
+        for var, info in list(self.vars_DAQ.items()):
             self.vars[var] = info
 
         self.folderDrawer_to_channel = {}
@@ -215,7 +215,7 @@ class TileDCSDataInfo:
         return self.vars[variable][1]
 
     def get_all_variables(self):
-        return self.vars.keys()
+        return list(self.vars.keys())
 
     def check_drawer_syntax(self, drawer):
         partition = drawer[0:3]
diff --git a/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py b/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py
index e7bb393c9af9cea72315a2cbca00b577233f30a7..75330be70d06a64a6ffd629d7bcbb2b119fef9d0 100755
--- a/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py
+++ b/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py
@@ -9,8 +9,8 @@ import time
 import ROOT
 import logging
 from ROOT import TCanvas, TH1D, TH2D, TArrayD, TLegend
-from TileCoolDcs import TileDCSDataGrabber
-from TileCoolDcs import ProgressBar
+from TileCoolDcs.TileDCSDataGrabber import TileDCSDataGrabber
+from TileCoolDcs.ProgressBar import progressBar
 
 
 class TileDCSDataPlotter (object):
@@ -29,7 +29,7 @@ class TileDCSDataPlotter (object):
         if verbose:
             logLvl = logging.DEBUG
 
-#        self.dataGrabber = TileDCSDataGrabber.TileDCSDataGrabber(dbSource, logLvl, dbstring, putDuplicates)
+#        self.dataGrabber = TileDCSDataGrabber(dbSource, logLvl, dbstring, putDuplicates)
 #        self.info = self.dataGrabber.info
 
         self.cmd     = argv[1]
@@ -40,7 +40,7 @@ class TileDCSDataPlotter (object):
         self.iovBeg  = int(time.mktime(time.strptime(beg,"%Y-%m-%d %H:%M:%S")))
         self.iovEnd  = int(time.mktime(time.strptime(end,"%Y-%m-%d %H:%M:%S")))
 
-        self.dataGrabber = TileDCSDataGrabber.TileDCSDataGrabber(dbSource, logLvl, dbstring, putDuplicates, self.iovBeg)
+        self.dataGrabber = TileDCSDataGrabber(dbSource, logLvl, dbstring, putDuplicates, self.iovBeg)
         self.info = self.dataGrabber.info
 
         self.cutExp  = ""
@@ -96,7 +96,7 @@ class TileDCSDataPlotter (object):
                 if oldVar!="":
                     #=== check if shorter variable is also present at another place
                     varExpr = varExpression
-                    for v in varDict.values():
+                    for v in list(varDict.values()):
                         varExpr=varExpr.replace(v," "*len(v))
                     oldPos = varExpr.find(oldVar)
                     if oldPos>-1:
@@ -115,13 +115,13 @@ class TileDCSDataPlotter (object):
                 else:
                     iPos+=1
 
-        varList = varDict.values()
+        varList = list(varDict.values())
         if "ALL_LVPS_AI" in varExpression:
-            varList.extend(self.info.vars_LVPS_AI.keys())
+            varList.extend(list(self.info.vars_LVPS_AI.keys()))
         if "ALL_LVPS_STATES" in varExpression:
-            varList.extend(self.info.vars_LVPS_STATES.keys())
+            varList.extend(list(self.info.vars_LVPS_STATES.keys()))
         if "ALL_HVSET" in varExpression or "ALL_SETHV" in varExpression:
-            varList.extend(self.info.vars_HVSET.keys())
+            varList.extend(list(self.info.vars_HVSET.keys()))
             if self.useCool or ("ALL_HV-ALL_SETHV" in varExpression or "ALL_HV-ALL_HVSET" in varExpression):
                 for i in range(2):
                     if "Set.vFix1%d" % (i+1) in varList:
@@ -133,7 +133,7 @@ class TileDCSDataPlotter (object):
                 for i in range(7):
                     varList.remove("Set.temp%d" % (i+1))
         if ("ALL_HV" in varExpression and "ALL_HVSET" not in varExpression) or "ALL_HV-ALL_HVSET" in varExpression:
-            varList.extend(self.info.vars_HV.keys())
+            varList.extend(list(self.info.vars_HV.keys()))
             if self.useCool or ("ALL_HV-ALL_SETHV" in varExpression or "ALL_HV-ALL_HVSET" in varExpression):
                 for i in range(4):
                     varList.remove("hvIn%d" % (i+1))
@@ -198,21 +198,21 @@ class TileDCSDataPlotter (object):
             if "ALL_LVPS_AI" in self.varExp:
                 newvar=""
                 for dr in self.drawer.split(","):
-                    for var in self.info.vars_LVPS_AI.keys():
+                    for var in list(self.info.vars_LVPS_AI.keys()):
                         newvar += dr+"."+var+","
                 self.varExp = self.varExp.replace("ALL_LVPS_AI",newvar[:-1])
 
             if "ALL_LVPS_STATES" in self.varExp:
                 newvar=""
                 for dr in self.drawer.split(","):
-                    for var in self.info.vars_LVPS_STATES.keys():
+                    for var in list(self.info.vars_LVPS_STATES.keys()):
                         newvar += dr+"."+var+","
                 self.varExp = self.varExp.replace("ALL_LVPS_STATES",newvar[:-1])
 
             if "ALL_HV-ALL_SETHV" in self.varExp or "ALL_HV-ALL_HVSET" in self.varExp:
                 newvar=""
                 for dr in self.drawer.split(","):
-                    for var in self.info.vars_HVSET.keys():
+                    for var in list(self.info.vars_HVSET.keys()):
                         if not ("Set.vFix" in var or "Set.hvIn" in var or "Set.volt" in var or "Set.temp" in var):
                             newvar += dr+"."+var.replace("Set.","")+"-"+dr+"."+var+","
                 self.varExp = self.varExp.replace("ALL_HV-ALL_SETHV",newvar[:-1])
@@ -220,7 +220,7 @@ class TileDCSDataPlotter (object):
             if "ALL_HVSET" in self.varExp or "ALL_SETHV" in self.varExp:
                 newvar=""
                 for dr in self.drawer.split(","):
-                    for var in self.info.vars_HVSET.keys():
+                    for var in list(self.info.vars_HVSET.keys()):
                         if not self.useCool or not ("Set.vFix" in var or "Set.hvIn" in var or "Set.volt" in var or "Set.temp" in var):
                             newvar += dr+"."+var+","
                 self.varExp = self.varExp.replace("ALL_HVSET",newvar[:-1])
@@ -228,7 +228,7 @@ class TileDCSDataPlotter (object):
             if "ALL_HV" in self.varExp and "ALL_HVSET" not in self.varExp :
                 newvar=""
                 for dr in self.drawer.split(","):
-                    for var in self.info.vars_HV.keys():
+                    for var in list(self.info.vars_HV.keys()):
                         if not self.useCool or not ("hvIn" in var or "volt" in var or "temp" in var):
                             newvar += dr+"."+var+","
                 self.varExp = self.varExp.replace("ALL_HV",newvar[:-1])
@@ -447,7 +447,7 @@ class TileDCSDataPlotter (object):
             n1=1
         else:
             n1=0
-        bar = ProgressBar.progressBar(n1,ne, 78)
+        bar = progressBar(n1,ne, 78)
         for n in range(n1,ne):
             tree.GetEntry(n)
             bar.update(n)
@@ -640,13 +640,13 @@ class TileDCSDataPlotter (object):
             self.varExp = self.varExp.replace("ALL_LVPS_STATES",",".join(sorted(self.info.vars_LVPS_STATES.keys())))
         if "ALL_HV-ALL_SETHV" in self.varExp or "ALL_HV-ALL_HVSET" in self.varExp:
             vlist = []
-            for var in self.info.vars_HVSET.keys():
+            for var in list(self.info.vars_HVSET.keys()):
                 if not ("Set.vFix" in var or "Set.hvIn" in var or "Set.volt" in var or "Set.temp" in var):
                     vlist += [var.replace("Set.","")+"-"+var]
             self.varExp = self.varExp.replace("ALL_HV-ALL_SETHV",",".join(sorted(vlist)))
             self.varExp = self.varExp.replace("ALL_HV-ALL_HVSET",",".join(sorted(vlist)))
         if "ALL_HVSET" in self.varExp or "ALL_SETHV" in self.varExp:
-            vlist = self.info.vars_HVSET.keys()
+            vlist = list(self.info.vars_HVSET.keys())
             if self.useCool:
                 for i in range(2):
                     if "Set.vFix1%d" % (i+1) in vlist:
@@ -660,7 +660,7 @@ class TileDCSDataPlotter (object):
             self.varExp = self.varExp.replace("ALL_HVSET",",".join(sorted(vlist)))
             self.varExp = self.varExp.replace("ALL_SETHV",",".join(sorted(vlist)))
         if "ALL_HV" in self.varExp and "ALL_HVSET" not in self.varExp:
-            vlist = self.info.vars_HV.keys()
+            vlist = list(self.info.vars_HV.keys())
             if self.useCool:
                 for i in range(4):
                     vlist.remove("hvIn%d" % (i+1))
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h
index 4866c9c427485260e850378783c72a7c9adf9291..252f14dc602a61c1c95a685583ada0a301c0bc5d 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h
@@ -35,7 +35,6 @@ public:
   */ 
   TileHid2RESrcID(const TileHWID* tileHWID=0, uint32_t runnum=0); 
   void setTileHWID (const TileHWID* tileHWID, uint32_t runnum=0);
-  void setTileMuRcvHWID(const TileHWID* tileHWID, uint32_t runnum=0);
 
   void initialize(uint32_t runnum);
   void initializeMuRcv(uint32_t runnum);
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
index f24d1f2b8311561cee16591b1b362147e8e6a767..e7546dc75eba1c828dea4fda361ac34ab7cffcc3 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
@@ -194,29 +194,15 @@ class TileROD_Decoder: public AthAlgTool {
     int getWarningCounter();
 
     const TileHid2RESrcID * getHid2reHLT() {
-      if (!m_hid2reHLT) initHid2reHLT();
       return m_hid2reHLT;
     }
 
     const TileHid2RESrcID * getHid2re() {
+      std::lock_guard<std::mutex> lock (m_HidMutex);
       if (!m_hid2re) initHid2re();
       return m_hid2re;
     }
 
-    const TileHid2RESrcID * getHid2re(int swtRODId) {
-      if (!m_hid2re) {
-        switch (swtRODId) {
-          case 0:
-           initHid2re();
-           break;
-          case 1:
-           initTileMuRcvHid2re();
-           break;
-        }
-      }
-      return m_hid2re;
-    }
-
     void setUseFrag0 (bool f) { m_useFrag0 = f; }
     void setUseFrag1 (bool f) { m_useFrag1 = f; }
     void setUseFrag4 (bool f) { m_useFrag4 = f; }
@@ -561,6 +547,9 @@ class TileROD_Decoder: public AthAlgTool {
     // Mutex protecting access to weight vectors.
     mutable std::mutex m_OFWeightMutex;
 
+    // Mutex protecting access to m_hid2re.
+    mutable std::mutex m_HidMutex;
+
     // fast decoding
     std::vector<int> m_Rw2Cell[4];
     std::vector<int> m_Rw2Pmt[4];
@@ -585,7 +574,6 @@ class TileROD_Decoder: public AthAlgTool {
     std::vector<int> m_list_of_masked_drawers;
     void initHid2re();
     void initHid2reHLT();
-    void initTileMuRcvHid2re();
 
     unsigned int m_maxChannels;
     bool m_checkMaskedDrawers;
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx
index 9bbe84f8ea982e04075178caee373983cb085642..523bc3ba1d9e27cc37fb2605ee00384a1d3ff854 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx
@@ -46,17 +46,6 @@ void TileHid2RESrcID::setTileHWID(const TileHWID* tileHWID, uint32_t runnum)
   }
 }
 
-void TileHid2RESrcID::setTileMuRcvHWID(const TileHWID* tileHWID, uint32_t runnum)
-{
-  if ( m_tileHWID != tileHWID ||  m_TileMuRcvRunnum != runnum) {
-    m_tileHWID = tileHWID;
-    if (m_tileHWID) {
-      // make internal maps
-      initializeMuRcv(runnum);
-    }
-  }
-}
-
 void TileHid2RESrcID::initialize(uint32_t runnum)
 {
   m_runnum = runnum;
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
index 8e400d3617538fb8ed7fca004b2261b9522f64cb..2ba60c49c799641c5cffa7202658c8ababf9868e 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
@@ -153,6 +153,8 @@ StatusCode TileROD_Decoder::initialize() {
   // Initialize
   this->m_hashFunc.initialize(m_tileHWID);
   
+  this->initHid2reHLT();
+
   return StatusCode::SUCCESS;
 }
 
@@ -4027,11 +4029,6 @@ void TileROD_Decoder::initHid2reHLT() {
   m_hid2reHLT = new TileHid2RESrcID(m_tileHWID,m_fullTileRODs); // setting a frag2RODmap and map dedicated to TMDB
 }
 
-void TileROD_Decoder::initTileMuRcvHid2re() {
-  ATH_MSG_DEBUG( "initTileMuRcvHid2re() for run " << m_fullTileRODs );
-  initHid2re();
-}
-
 const uint32_t*
 TileROD_Decoder::getOFW(int fragId, int unit) const
 {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileBeamElemContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileBeamElemContainerCnv.cxx
index efab938611f6b9e8c09d7406f67c2877e0ca28df..27ec43f7b8e679a25d77328412d7c90b250f09c5 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileBeamElemContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileBeamElemContainerCnv.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 "TileTPCnv/TileBeamElemContainerCnv_p1.h"
@@ -24,7 +24,7 @@ TileBeamElemContainer* TileBeamElemContainerCnv::createTransient() {
     static const pool::Guid   p0_guid("7FCE8F30-B59E-41E6-9A66-0DCD6134552E");
 
     if( this->compareClassGuid(p1_guid)) {
-        std::auto_ptr< TileBeamElemContainer_p1 >   cont( this->poolReadObject< TileBeamElemContainer_p1 >() );
+        std::unique_ptr< TileBeamElemContainer_p1 >   cont( this->poolReadObject< TileBeamElemContainer_p1 >() );
         trans_cont = converter_p1.createTransient( cont.get(), mlog );
     }
     else if( this->compareClassGuid(p0_guid)) {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx
index 256172ad5938dacb7b35eaaa9e01dc7085a756e7..94815edb8a4829c93d558fd706281b573b41a415 100644
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileCosmicMuonContainerCnv.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
 */
 
 // TileCosmicMuonContainerCnv.cxx 
@@ -53,13 +53,13 @@ TileCosmicMuonContainer* TileCosmicMuonContainerCnv::createTransient() {
   } else if ( compareClassGuid(p1_guid) ) {
 
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileCosmicMuonContainer_p1> persObj( poolReadObject<TileCosmicMuonContainer_p1>() );
+    std::unique_ptr<TileCosmicMuonContainer_p1> persObj( poolReadObject<TileCosmicMuonContainer_p1>() );
     TileCosmicMuonContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else if ( compareClassGuid(p2_guid) ) {
 
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileCosmicMuonContainer_p2> persObj( poolReadObject<TileCosmicMuonContainer_p2>() );
+    std::unique_ptr<TileCosmicMuonContainer_p2> persObj( poolReadObject<TileCosmicMuonContainer_p2>() );
     TileCosmicMuonContainerCnv_p2 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileDigitsContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileDigitsContainerCnv.cxx
index 274fcb018136d38bd12eb7e53d8d45b25866a588..4fc417c654426e2a8342b7d0ec6ed44e49c4104e 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileDigitsContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileDigitsContainerCnv.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 "TileTPCnv/TileDigitsContainerCnv_p1.h"
@@ -39,15 +39,15 @@ TileDigitsContainer* TileDigitsContainerCnv::createTransient() {
     static const pool::Guid   p0_guid("EB51ED70-5EC0-4F31-97D3-14453F77C88B");
 
     if( this->compareClassGuid(p3_guid)) {
-        std::auto_ptr< TileDigitsContainer_p3 >   cont( this->poolReadObject< TileDigitsContainer_p3 >() );
+        std::unique_ptr< TileDigitsContainer_p3 >   cont( this->poolReadObject< TileDigitsContainer_p3 >() );
         trans_cont = converter_p3.createTransient( cont.get(), mlog );
     }
     else if( this->compareClassGuid(p2_guid)) {
-        std::auto_ptr< TileDigitsContainer_p2 >   cont( this->poolReadObject< TileDigitsContainer_p2 >() );
+        std::unique_ptr< TileDigitsContainer_p2 >   cont( this->poolReadObject< TileDigitsContainer_p2 >() );
         trans_cont = converter_p2.createTransient( cont.get(), mlog );
     }
     else if( this->compareClassGuid(p1_guid)) {
-        std::auto_ptr< TileDigitsContainer_p1 >   cont( this->poolReadObject< TileDigitsContainer_p1 >() );
+        std::unique_ptr< TileDigitsContainer_p1 >   cont( this->poolReadObject< TileDigitsContainer_p1 >() );
         trans_cont = converter_p1.createTransient( cont.get(), mlog );
     }
     else if( this->compareClassGuid(p0_guid)) {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileHitContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileHitContainerCnv.cxx
index a0f29652c12ff0faa46ad793be6e3aace086eb2b..2f2d913556246a3858065a40d723765882e5b6c9 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileHitContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileHitContainerCnv.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 "TileTPCnv/TileHitContainerCnv_p1.h"
@@ -24,7 +24,7 @@ TileHitContainer* TileHitContainerCnv::createTransient() {
     static const pool::Guid   p0_guid("704A373C-EA65-4721-A9B8-F577B683699E");
 
     if( this->compareClassGuid(p1_guid)) {
-        std::auto_ptr< TileHitContainer_p1 >   cont( this->poolReadObject< TileHitContainer_p1 >() );
+        std::unique_ptr< TileHitContainer_p1 >   cont( this->poolReadObject< TileHitContainer_p1 >() );
         trans_cont = converter_p1.createTransient( cont.get(), mlog );
     }
     else if( this->compareClassGuid(p0_guid)) {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx
index 32761fbb18d0eae11d1146b7df732cbfe2d4c49e..fb32ec058dd98f2d9c0b9c447f9b3ab608fee374 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileL2ContainerCnv.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
 */
 
 // TileL2ContainerCnv.cxx 
@@ -51,13 +51,13 @@ TileL2Container* TileL2ContainerCnv::createTransient() {
   } else if ( compareClassGuid(p1_guid) ) {
 
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileL2Container_p1> persObj( poolReadObject<TileL2Container_p1>() );
+    std::unique_ptr<TileL2Container_p1> persObj( poolReadObject<TileL2Container_p1>() );
     TileL2ContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else if ( compareClassGuid(p2_guid) ) {
 
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileL2Container_p2> persObj( poolReadObject<TileL2Container_p2>() );
+    std::unique_ptr<TileL2Container_p2> persObj( poolReadObject<TileL2Container_p2>() );
     TileL2ContainerCnv_p2 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx
index bc64114622a95bed8886aedbd69e4e82ede90323..e0734ab26ff08630f02dcb188e1ebc23eb671793 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuContainerCnv.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
 */
 
 // TileMuContainerCnv.cxx 
@@ -49,7 +49,7 @@ TileMuContainer* TileMuContainerCnv::createTransient() {
   } else if ( compareClassGuid(p1_guid) ) {
 
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileMuContainer_p1> persObj( poolReadObject<TileMuContainer_p1>() );
+    std::unique_ptr<TileMuContainer_p1> persObj( poolReadObject<TileMuContainer_p1>() );
     TileMuContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx
index 9d9ef487545e8f168d32b5f91acd7565534e3e1d..aa58a82a14f7bafbb000a7291af89cad01d67bbb 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileMuonReceiverContainerCnv.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
 */
 
 // TileMuonReceveirContainerCnv.cxx 
@@ -48,7 +48,7 @@ TileMuonReceiverContainer* TileMuonReceiverContainerCnv::createTransient() {
 
   } else if ( compareClassGuid(p1_guid) ) {
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileMuonReceiverContainer_p1> persObj( poolReadObject<TileMuonReceiverContainer_p1>() );
+    std::unique_ptr<TileMuonReceiverContainer_p1> persObj( poolReadObject<TileMuonReceiverContainer_p1>() );
     TileMuonReceiverContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileRawChannelContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileRawChannelContainerCnv.cxx
index 5f1049b38f66bc59f39942b09a9f468f9a66aac7..4adab78ae7862b33c2a950c650b0dcf62ceeccb5 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileRawChannelContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileRawChannelContainerCnv.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 "TileTPCnv/TileRawChannelContainerCnv_p1.h"
@@ -24,7 +24,7 @@ TileRawChannelContainer* TileRawChannelContainerCnv::createTransient() {
     static const pool::Guid   p0_guid("E18095F6-01D9-4E8B-AD51-A8628F92E7FF");
 
     if( this->compareClassGuid(p1_guid)) {
-        std::auto_ptr< TileRawChannelContainer_p1 >   cont( this->poolReadObject< TileRawChannelContainer_p1 >() );
+        std::unique_ptr< TileRawChannelContainer_p1 >   cont( this->poolReadObject< TileRawChannelContainer_p1 >() );
         trans_cont = converter_p1.createTransient( cont.get(), mlog );
     }
     else if( this->compareClassGuid(p0_guid)) {
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx
index b6ced096e0c45f99ce365f2c2549885115a52d7f..1aec54f8d3b4073142fbb4d90891705be706acf3 100755
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/src/TileTTL1ContainerCnv.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
 */
 
 // TileTTL1ContainerCnv.cxx 
@@ -49,7 +49,7 @@ TileTTL1Container* TileTTL1ContainerCnv::createTransient() {
   } else if ( compareClassGuid(p1_guid) ) {
 
     // using auto_ptr ensures deletion of the persistent object
-    std::auto_ptr<TileTTL1Container_p1> persObj( poolReadObject<TileTTL1Container_p1>() );
+    std::unique_ptr<TileTTL1Container_p1> persObj( poolReadObject<TileTTL1Container_p1>() );
     TileTTL1ContainerCnv_p1 cnv;
     transObj = cnv.createTransient( persObj.get(), msg );
   } else {
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/TrackDensitySeedFinder.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/TrackDensitySeedFinder.cxx
index 4d868ebc90a765c1c810751ae3b18b2c3388bb8b..936f1c39e25c186c8075bb0124a52d2173048630 100755
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/TrackDensitySeedFinder.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/TrackDensitySeedFinder.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
 */
 
 /*********************************************************************
@@ -110,9 +110,13 @@ namespace Trk
       
       ATH_MSG_DEBUG("The vertex seed width is " << zResult.second);
      
-     // TODO: not sure what to do when no seed is found as width is NaN...
-      // if seed position is 0 then vertexing should stop anayways...
-      if(zResult.second!=zResult.second) covarianceMatrix.fillSymmetric(2,2,1); 
+     // if no seed is found, we get a NaN here. 
+     // This should not propagate through the vertex fit.
+     // The upstream code aborts if position[z] == 0, which we need to ensure.
+     // In this case, the cov matrix will not be used. 
+      if(std::isnan(zResult.second)){
+        positionVector[2] = 0.; 
+      }
       else covarianceMatrix.fillSymmetric(2,2,std::pow(zResult.second,2.));
 
       return std::make_pair(positionVector,covarianceMatrix) ;
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/GaussianTrackDensity.h b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/GaussianTrackDensity.h
index 35e9b2516bd90daa67ebf900563cfe1241aa4605..f4c564fc478f76baa82250cd73dc7793bc8d072b 100644
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/GaussianTrackDensity.h
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/TrkVertexSeedFinderUtils/GaussianTrackDensity.h
@@ -145,6 +145,26 @@ namespace Trk
       }
     };
 
+    // helper to handle the evaluation of the parametrised track density 
+    class TrackDensityEval{
+      public:
+        // initialise with the z coordinate at which the density is to be evaluated 
+        TrackDensityEval(double z_coordinate): m_z(z_coordinate){} 
+        // add the contribution for one track to the density. 
+        // will internally check if the z coordinate is within 
+        // the bounds of the track 
+        void addTrack (const TrackEntry & entry);
+        // retrieve the density and its derivatives
+        inline double density() const {return m_density;}
+        inline double firstDerivative() const {return m_firstDerivative;}
+        inline double secondDerivative() const {return m_secondDerivative;}
+      private: 
+        double m_z; 
+        double m_density{0};
+        double m_firstDerivative{0};
+        double m_secondDerivative{0}; 
+    }; 
+
     typedef std::map< Perigee, 
                       GaussianTrackDensity::TrackEntry, 
                       GaussianTrackDensity::pred_perigee > trackMap;
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx
index b86aaf40246bf38339f65f5df98eba3a322d7aac..7be55385a3cb8c6763de926c6767f5e23bc6af79 100644
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/src/GaussianTrackDensity.cxx
@@ -148,28 +148,11 @@ namespace Trk
    */
   double GaussianTrackDensity::TrackDensity::trackDensity (double z) const
   {
-    double sum = 0.0;
-    TrackEntry target(z);
-    trackMap overlaps;
-    lowerMapIterator left = m_lowerMap.lower_bound(target);  // first track whose UPPER bound is not less than z
-    if (left == m_lowerMap.end()) return sum;                // z is to the right of every track's range
-    upperMapIterator right = m_upperMap.upper_bound(target); // first track whose LOWER bound is greater than z
-    if (right == m_upperMap.begin()) return sum;             // z is to the left of every track's range
-    for (auto itrk = left; itrk != m_lowerMap.end(); itrk++)
-    {
-      if ( itrk->first.upperBound > z + m_maxRange ) break;
-      if ( z >= itrk->first.lowerBound && z <= itrk->first.upperBound ) overlaps[itrk->second] = itrk->first;
-    }
-    for (auto itrk = right; itrk-- != m_upperMap.begin(); )
-    {
-      if ( itrk->first.lowerBound < z - m_maxRange ) break;
-      if (z >= itrk->first.lowerBound && z <= itrk->first.upperBound ) overlaps[itrk->second] = itrk->first;
-    }
-    for (const auto& entry : overlaps)
-    {
-      sum += std::exp(entry.second.c_0+z*(entry.second.c_1 + z*entry.second.c_2));
-    }
-    return sum;
+    double firstDeriv, secondDeriv = 0;  // unused in this case
+    double density = 0; 
+    // use the existing trackDensity method to avoid duplication of logic
+    trackDensity(z,density,firstDeriv,secondDeriv); 
+    return density; 
   }
 
 
@@ -183,35 +166,13 @@ namespace Trk
                                                     double& firstDerivative,
                                                     double& secondDerivative) const
   {
-    density = 0.0;
-    firstDerivative = 0.0;
-    secondDerivative = 0.0;
-    TrackEntry target(z);
-    trackMap overlaps;
-    lowerMapIterator left = m_lowerMap.lower_bound(target);  // first track whose UPPER bound is not less than z
-    if (left == m_lowerMap.end()) return;                    // z is to the right of every track's range
-    upperMapIterator right = m_upperMap.upper_bound(target); // first track whose LOWER bound is greater than z
-    if (right == m_upperMap.begin()) return;                 // z is to the left of every track's range
-    for (auto itrk = left; itrk != m_lowerMap.end(); itrk++)
-    {
-      if ( itrk->first.upperBound > z + m_maxRange ) break;
-      if ( z >= itrk->first.lowerBound && z <= itrk->first.upperBound ) overlaps[itrk->second] = itrk->first;
-    }
-    for (auto itrk = right; itrk-- != m_upperMap.begin(); )
-    {
-      if ( itrk->first.lowerBound < z - m_maxRange ) break;
-      if (z >= itrk->first.lowerBound && z <= itrk->first.upperBound ) overlaps[itrk->second] = itrk->first;
-    }
-    for (const auto& entry : overlaps)
-    {
-      if (entry.second.lowerBound > z || entry.second.upperBound < z) continue;
-      double delta = std::exp(entry.second.c_0+z*(entry.second.c_1 + z*entry.second.c_2));
-      density += delta;
-      double qPrime = entry.second.c_1 + 2*z*entry.second.c_2;
-      double deltaPrime = delta * qPrime;
-      firstDerivative += deltaPrime;
-      secondDerivative += 2*entry.second.c_2*delta + qPrime*deltaPrime;
+    TrackDensityEval densityResult(z);
+    for (const auto & trackAndPerigeePair : m_lowerMap){
+      densityResult.addTrack(trackAndPerigeePair.first); 
     }
+    density = densityResult.density();
+    firstDerivative = densityResult.firstDerivative();
+    secondDerivative = densityResult.secondDerivative(); 
   }
 
   std::pair<double,double> 
@@ -313,4 +274,15 @@ namespace Trk
   }
 
 
+  void GaussianTrackDensity::TrackDensityEval::addTrack (const TrackEntry & entry){
+    if (entry.lowerBound < m_z && entry.upperBound > m_z) {
+      double delta = std::exp(entry.c_0+m_z*(entry.c_1 + m_z*entry.c_2));
+      double qPrime = entry.c_1 + 2*m_z*entry.c_2;
+      double deltaPrime = delta * qPrime;
+      m_density += delta;
+      m_firstDerivative += deltaPrime;
+      m_secondDerivative += 2*entry.c_2*delta + qPrime*deltaPrime;
+    }
+  }
+
 }
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py
index 52f02868325eef776134a724890d5d007e9b7818..adf8282a2dce6ea5340c261e3ff05cc478a45a88 100755
--- a/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/python/TrigCaloRecConfig.py
@@ -1726,15 +1726,19 @@ class HLTCaloCellMaker (_HLTCaloCellMaker):
         monTool = GenericMonitoringTool('MonTool')
         maxNumberOfCells=1600.0;
         maxProcTime=800.0;
+        monitorCells=True;
         if ( "FS" in name ):
           maxNumberOfCells=240000;
           maxProcTime=160000;
+          monitorCells=False;
         monTool.defineHistogram('Cells_N', path='EXPERT', type='TH1F',  title="Cells N; NCells; events", xbins=40, xmin=0.0, xmax=maxNumberOfCells)
-        monTool.defineHistogram('Cells_eT', path='EXPERT', type='TH1F',  title="Cells E_T; E_T [ GeV ] ; Nclusters", xbins=100, xmin=0.0, xmax=100.0)
-        monTool.defineHistogram('Cells_eta', path='EXPERT', type='TH1F', title="Cells #eta; #eta ; Nclusters", xbins=100, xmin=-2.5, xmax=2.5)
-        monTool.defineHistogram('Cells_phi', path='EXPERT', type='TH1F', title="Cells #phi; #phi ; Nclusters", xbins=128, xmin=-3.2, xmax=3.2)
         monTool.defineHistogram('TIME_exec', path='EXPERT', type='TH1F', title="Cells time; time [ us ] ; Nruns", xbins=80, xmin=0.0, xmax=maxProcTime)
+        if ( monitorCells ):
+          monTool.defineHistogram('Cells_eT', path='EXPERT', type='TH1F',  title="Cells E_T; E_T [ GeV ] ; Nclusters", xbins=100, xmin=0.0, xmax=100.0)
+          monTool.defineHistogram('Cells_eta', path='EXPERT', type='TH1F', title="Cells #eta; #eta ; Nclusters", xbins=100, xmin=-2.5, xmax=2.5)
+          monTool.defineHistogram('Cells_phi', path='EXPERT', type='TH1F', title="Cells #phi; #phi ; Nclusters", xbins=128, xmin=-3.2, xmax=3.2)
         self.MonTool = monTool
+        self.monitorCells = monitorCells
 
 
 
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
index 840d4626d198a5169b88ca9206a126abf5b15088..7966ff386d1a406159ef92cb20688a6308d64ea5 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.cxx
@@ -22,13 +22,15 @@ HLTCaloCellMaker::HLTCaloCellMaker(const std::string & name, ISvcLocator* pSvcLo
   : AthReentrantAlgorithm(name, pSvcLocator),
     m_tileEMScaleKey ("TileEMScale"),
     m_dataAccessSvc( "TrigCaloDataAccessSvc/TrigCaloDataAccessSvc", name ),
-    m_roiMode(true)
+    m_roiMode(true),
+    m_monCells(false)
 {
   declareProperty("RoIs", m_roiCollectionKey = std::string("OutputRoIs"), "RoIs to read in");
   declareProperty("CellsVName", m_cellContainerVKey = std::string("CellsVClusters"), "Calo cells container");
   declareProperty("CellsName", m_cellContainerKey = std::string("CellsClusters"), "Calo cells container");
   declareProperty("TrigDataAccessMT",m_dataAccessSvc,"Data Access for LVL2 Calo Algorithms in MT");
   declareProperty("roiMode",m_roiMode,"RoiMode roi->CaloCellCollection");
+  declareProperty("monitorCells",m_monCells,"monitorCells");
   declareProperty("TileEMSCaleKey", m_tileEMScaleKey);
 }
 
@@ -72,7 +74,6 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
     auto clET = Monitored::Collection ("Cells_eT",*cdv,getCellPt);
     auto clEta = Monitored::Collection ("Cells_eta",*cdv,&CaloCell::eta);
     auto clPhi = Monitored::Collection ("Cells_phi",*cdv,&CaloCell::phi);
-    auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
     for( const TrigRoiDescriptor* roiDescriptor : *roiCollection) {
       ATH_MSG_INFO ( "Running on RoI " << *roiDescriptor<< " FS="<<roiDescriptor->isFullscan());
       if ( roiDescriptor->isFullscan() ) {
@@ -83,6 +84,11 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
 	cdv->setHasCalo(CaloCell_ID::TILE);
 	cdv->updateCaloIterators();
         clN=cdv->size();
+        if ( m_monCells ){
+          auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
+        } else {
+          auto monitoring = Monitored::Group( m_monTool, timer, clN );
+        }
 	
       } else {
 	// TT EM PART
@@ -123,6 +129,12 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
 	cdv->updateCaloIterators();
       }
       ATH_MSG_DEBUG ("REGTEST: Producing "<<cdv->size()<<" cells");
+      clN=cdv->size();
+      if ( m_monCells ){
+        auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
+      } else {
+        auto monitoring = Monitored::Group( m_monTool, timer, clN );
+      }
       auto ss = cellContainer.record( std::move(cdv) );
       ATH_CHECK( ss );
 
@@ -139,16 +151,19 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
         auto clET = Monitored::Collection ("Cells_eT",*c,getCellPt);
         auto clEta = Monitored::Collection ("Cells_eta",*c,&CaloCell::eta);
         auto clPhi = Monitored::Collection ("Cells_phi",*c,&CaloCell::phi);
-        auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
 	ATH_CHECK(m_dataAccessSvc->loadFullCollections( context, *c ));
         clN=c->size();
+        if ( m_monCells ){
+          auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
+        } else {
+          auto monitoring = Monitored::Group( m_monTool, timer, clN );
+        }
 	cellContainerV->push_back( c.release()->asDataVector() );
       } else {
 	auto c = std::make_unique<CaloConstCellContainer >(SG::VIEW_ELEMENTS);
         auto clET = Monitored::Collection ("Cells_eT",*c,getCellPt);
         auto clEta = Monitored::Collection ("Cells_eta",*c,&CaloCell::eta);
         auto clPhi = Monitored::Collection ("Cells_phi",*c,&CaloCell::phi);
-        auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
 
         // TT EM PART
         for(int sampling=0;sampling<4;sampling++){
@@ -187,6 +202,11 @@ StatusCode HLTCaloCellMaker::execute( const EventContext& context ) const {
         c->setHasCalo(CaloCell_ID::LARFCAL);
         c->updateCaloIterators();
         clN=c->size();
+        if ( m_monCells ){
+          auto monitoring = Monitored::Group( m_monTool, timer, clN, clET, clEta, clPhi);
+        } else {
+          auto monitoring = Monitored::Group( m_monTool, timer, clN);
+        }
 	cellContainerV->push_back( c.release()->asDataVector() );
       }
     }
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
index a48dd454323219d3a1620429bae213d182d0f21e..0fdcd3f6ffc071426eaafb284d93fba0b2fd8c6c 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/HLTCaloCellMaker.h
@@ -58,6 +58,7 @@ class HLTCaloCellMaker: public AthReentrantAlgorithm {
 	ServiceHandle<ITrigCaloDataAccessSvc> m_dataAccessSvc;
 	ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
 	bool m_roiMode;
+        bool m_monCells;
 
         // just to help with monitoring
         static inline double getCellPt(const CaloCell* aCell){
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
index dd12fb6ee5595795e8cf5993e630965edd98b298..573d90f48f2354758bf787246e31aa4f775812de 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/python/TrigT2CaloEgammaConfig.py
@@ -266,7 +266,6 @@ class T2CaloEgamma_eGamma_NoHad (T2CaloEgamma):
        #self.TimerNtuple="T2CaloEgamma.T2CaEgtTot"
        self.TrigEMClusterKey="TrigT2CaloEgamma"
        #self.Monitoring=False
-       #self.OutputLevel = DEBUG
        #self.AthenaMonTools += [t2catime]
        self.AthenaMonTools = [ TrigT2CaloEgammaValMonitoring(),
                                TrigT2CaloEgammaCosmicMonitoring(),
@@ -428,10 +427,8 @@ class T2CaloEgamma_ReFastAlgo (T2CaloEgammaReFastAlgo):
        
        if doRinger:
          from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import RingerReFexConfig
-         from AthenaCommon.Constants import DEBUG
          ringer = RingerReFexConfig('ReFaAlgoRingerFexConfig')
          #ringer.RingsKey= recordable("L2CaloRinger")
-         ringer.OutputLevel = DEBUG
          ringer.RingerKey= RingerKey #"HLT_L2CaloRinger"
          ringer.trigDataAccessMT=svcMgr.TrigCaloDataAccessSvc
          ringer.ClustersName = ClustersName
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMTConfig.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMTConfig.py
index c5dcfcd2129b0b0960743ba22bc44f71e2e33a37..4ffff5512a5d2c709376d25e8c5524d6492e3697 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMTConfig.py
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBtagFexMTConfig.py
@@ -8,6 +8,9 @@ from AthenaCommon.AppMgr import ToolSvc
 from BTagging.BTaggingFlags import BTaggingFlags
 from BTagging.BTaggingConfiguration import getConfiguration
 
+#from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
+from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
+
 BTagConfig = getConfiguration("Trig")
 BTagConfig.PrefixxAODBaseName(False)
 BTagConfig.PrefixVertexFinderxAODBaseName(False)
@@ -22,6 +25,35 @@ def getBtagFexSplitInstance( instance, version, algo):
     return BtagFexSplit( instance=instance, version=version, algo=algo, name=instance+"BtagFexSplit_"+algo )
 
 
+class TrigBtagFexMT_OnlineMonitoring(GenericMonitoringTool):
+    def __init__ (self, name="TrigBtagFexMT_OnlineMonitoring"):
+        super(TrigBtagFexMT_OnlineMonitoring, self).__init__(name)
+        self.name = "TrigBtagFexMT_OnlineMonitoring"
+        self.HistPath = self.name
+        default_bin_count = 20
+        #self.defineTarget("Online")
+
+        # Event Histograms
+        self.defineHistogram('jet_count', path='EXPERT', type='TH1F', title="BtagFexMT Number of Jets", xbins = 20, xmin=0, xmax=20) 
+        self.defineHistogram('track_count', path='EXPERT', type='TH1F', title="BtagFexMT Number of Tracks", xbins = 50, xmin=0, xmax=50) 
+        self.defineHistogram('vertex_count', path='EXPERT', type='TH1F', title="BtagFexMT Number of Vertices", xbins = 50, xmin=0, xmax=50) 
+
+        # Jet Histograms
+        self.defineHistogram('jet_pt', path='EXPERT', type='TH1F', title="BtagFexMT Jet PT", xbins = default_bin_count, xmin=0, xmax=800000) 
+        self.defineHistogram('jet_eta', path='EXPERT', type='TH1F', title="BtagFexMT Jet Eta", xbins = default_bin_count, xmin=-5, xmax=5) 
+
+        # Track Histograms
+        self.defineHistogram('track_Et', path='EXPERT', type='TH1F', title="BtagFexMT Track Transverse Energy", xbins = default_bin_count, xmin=0, xmax=800000) 
+        self.defineHistogram('track_eta', path='EXPERT', type='TH1F', title="BtagFexMT Track Eta", xbins = default_bin_count, xmin=-5, xmax=5) 
+        self.defineHistogram('track_phi', path='EXPERT', type='TH1F', title="BtagFexMT Track Phi", xbins = default_bin_count, xmin=-4, xmax=4) 
+        self.defineHistogram('track_eta,track_phi', path='EXPERT', type='TH2F', title="BtagFexMT Track Eta vs Phi",
+                             xbins = default_bin_count, xmin=-5, xmax=5, ybins = default_bin_count, ymin=-4, ymax=4) 
+        self.defineHistogram('track_d0', path='EXPERT', type='TH1F', title="BtagFexMT Track D0", xbins = default_bin_count, xmin=0, xmax=10) 
+        self.defineHistogram('track_d0err', path='EXPERT', type='TH1F', title="BtagFexMT Track D0 Error", xbins = default_bin_count, xmin=0, xmax=10) 
+        self.defineHistogram('track_d0sig', path='EXPERT', type='TH1F', title="BtagFexMT Track D0 Significance", xbins = default_bin_count, xmin=0, xmax=1000) 
+        self.defineHistogram('track_z0', path='EXPERT', type='TH1F', title="BtagFexMT Track Z0", xbins = default_bin_count, xmin=0, xmax=100) 
+        self.defineHistogram('track_z0err', path='EXPERT', type='TH1F', title="BtagFexMT Track Z0 Error", xbins = default_bin_count, xmin=0, xmax=10) 
+        self.defineHistogram('track_z0sig', path='EXPERT', type='TH1F', title="BtagFexMT Track Z0 Significance", xbins = default_bin_count, xmin=0, xmax=10000) 
 
 
 class BtagFex (TrigBtagFexMT):
@@ -45,6 +77,7 @@ class BtagFex (TrigBtagFexMT):
         
         self.JetKey = "GSCJets"
         self.PriVtxKey = "EFHistoPrmVtx"
+
 #        self.TrackKey  = "InDetTrigTrackingxAODCnv_Bjet_EFID"
 
 #        # IMPORT OFFLINE TOOLS
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.cxx
index db44b62abf8a6a1ff46fd5e0d12326aa9b3ef961..8f4f929842d8b998bc3c611e1e0a0246d60c6346 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.cxx
@@ -39,14 +39,14 @@
 #include "BTagging/BTagSecVertexing.h"
 #include "BTagging/BTagTool.h"
 
-//Read Decorated properties (NEW)
 #include "StoreGate/ReadDecorHandle.h"
 #include "AthenaMonitoringKernel/Monitored.h"
 // ----------------------------------------------------------------------------------------------------------------- 
 
 
 TrigBtagFexMT::TrigBtagFexMT(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator) {}
+  AthAlgorithm(name, pSvcLocator) {
+}
 
 
 // ----------------------------------------------------------------------------------------------------------------- 
@@ -89,6 +89,8 @@ StatusCode TrigBtagFexMT::initialize() {
   //  ATH_CHECK( m_outputBtagVertexContainerKey.initialize() );
   //  ATH_CHECK( m_outputVertexContainerKey.initialize() );
 
+  if (!m_monTool.empty()) CHECK(m_monTool.retrieve());
+
   return StatusCode::SUCCESS;
 }
 
@@ -106,12 +108,16 @@ StatusCode TrigBtagFexMT::execute() {
   CHECK( jetContainerHandle.isValid() );
   const xAOD::JetContainer *jetContainer = jetContainerHandle.get();
   ATH_MSG_DEBUG( "Retrieved " << jetContainer->size() << " jets" );
+  auto monitor_for_jet_count = Monitored::Scalar( "jet_count", jetContainer->size() );
 
-  for ( const xAOD::Jet *jet : *jetContainer )
-    ATH_MSG_DEBUG( "    BTAGFEX:    ** pt=" << jet->p4().Et() * 1e-3 <<
-		   " eta=" << jet->eta() <<
-		   " phi=" << jet->phi() );
+  //auto monitor_for_jet_pt = Monitored::Collection( "jet_pt", *jetContainer, []( const xAOD::Jet *jet ) { return jet->pt(); } );
+  auto monitor_for_jet_pt = Monitored::Collection( "jet_pt", *jetContainer, &xAOD::Jet::pt );
+  auto monitor_for_jet_eta = Monitored::Collection( "jet_eta", *jetContainer, &xAOD::Jet::eta );
 
+  for ( const xAOD::Jet* jet : *jetContainer ) {
+    ATH_MSG_DEBUG( "    BTAGFEX:    ** pt=" << jet->pt() << " eta=" << jet->eta() << " phi=" << jet->phi() );
+  }
+  auto monitor_group_for_jets = Monitored::Group( m_monTool, monitor_for_jet_pt, monitor_for_jet_eta );
 
 
   // Test retrieval of Track Particles
@@ -176,19 +182,17 @@ StatusCode TrigBtagFexMT::execute() {
     }
   }
 
-
-
   // Test retrieval of VertexContainer
   ATH_MSG_DEBUG( "Attempting to retrieve VertexContainer with key " << m_VertexContainerKey.key() );
   SG::ReadHandle< xAOD::VertexContainer > vxContainerHandle = SG::makeHandle< xAOD::VertexContainer >( m_VertexContainerKey, ctx );
   CHECK( vxContainerHandle.isValid() );  
   const xAOD::VertexContainer* vxContainer = vxContainerHandle.get();
   ATH_MSG_DEBUG( "Retrieved " << vxContainer->size() <<" vertices..." );
+  auto monitor_for_vertex_count = Monitored::Scalar( "vertex_count", vxContainer->size() );
 
-  for ( const xAOD::Vertex *pv : *vxContainer )
-    ATH_MSG_DEBUG( "   ** PV x=" << pv->x()<<
-		   " y=" << pv->y() <<
-		   " z=" << pv->z() );
+  for ( const xAOD::Vertex *pv : *vxContainer ) {
+    ATH_MSG_DEBUG( "   ** PV x=" << pv->x()<< " y=" << pv->y() << " z=" << pv->z() );
+  }
 
 
   auto monitor_for_track_count = Monitored::Scalar( "track_count", trkContainer->size() );
@@ -234,6 +238,7 @@ StatusCode TrigBtagFexMT::execute() {
   CHECK( btaggingHandle.record( std::move( outputBtagging ),std::move( outputBtaggingAux ) ) );
   ATH_MSG_DEBUG( "Exiting with " << btaggingHandle->size() << " btagging objects" );
 
+  auto monitor_group_for_events = Monitored::Group( m_monTool, monitor_for_jet_count, monitor_for_track_count, monitor_for_vertex_count );
 
   return StatusCode::SUCCESS;
 }
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.h
index f0b89ca24c8fcd0b53aecb86cfb58ac96f6cafb3..1d852866c72beb29a65e0b9289b707f9fcd54d7d 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.h
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBtagFexMT.h
@@ -32,7 +32,6 @@
 
 #include "AthenaMonitoringKernel/GenericMonitoringTool.h"
 
-
 namespace Analysis {
   class IBTagTool;
   class IBTagTrackAssociation;
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/CMakeLists.txt b/Trigger/TrigMonitoring/TrigCaloMonitoring/CMakeLists.txt
index 26a8e1babdff8e13b2600be362189b47e515ab01..249e1e1a5e99fdb6c2bc2c8f4b73573706e93530 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/CMakeLists.txt
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/CMakeLists.txt
@@ -25,6 +25,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Trigger/TrigAlgorithms/TrigT2CaloCommon
                           Trigger/TrigEvent/TrigCaloEvent
                           Trigger/TrigEvent/TrigSteeringEvent 
+			  Trigger/TrigAnalysis/TrigAnalysisInterfaces
                           Control/AthenaMonitoring )
 
 # External dependencies:
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py
index d8e77c08c8d5f2cc9a571e771a269b1ab87a1d21..72edf14e3bf87f2b1c7b258c3976267c13ddd100 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/python/TrigCaloMonitorAlgorithm.py
@@ -24,6 +24,9 @@ def TrigCaloMonConfig(inputFlags):
     # any configuration other than the AthMonitorCfgHelper here, then we can 
     # just return directly (and not create "result" above)
 
+    # Get BunchCrossingTool
+    from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool
+
 
 
     ################################
@@ -45,6 +48,7 @@ def TrigCaloMonConfig(inputFlags):
     L2CaloEMClustersMonAlg.HLTMinET = -1.0
     L2CaloEMClustersMonAlg.OFFMinET = -1.0
     L2CaloEMClustersMonAlg.MaxDeltaR = 0.04
+    L2CaloEMClustersMonAlg.BunchCrossingTool = BunchCrossingTool("TrigConf" if not inputFlags.Input.isMC else "MC")
 
     # Add group
     L2CaloEMClustersMonGroup = helper.addGroup(L2CaloEMClustersMonAlg,'TrigCaloMonitor','HLT/HLTCalo')
@@ -67,6 +71,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
     L2CaloEMClustersMonGroup.defineHistogram('HLT_size',title='HLT Cluster Size; Number of Cells; Entries',
                                 path=hist_path,xbins=91,xmin=-10.0,xmax=1810.0)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,HLT_et;HLT_et_vs_BC',title='HLT Clusters E_{T} vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
     # Declare high-ET HLT histograms
     L2CaloEMClustersMonGroup.defineHistogram('HLT_barrel_high_et_num',title='Number of high-E_{T} HLT Clusters; Num Clusters; Entries',
@@ -81,6 +87,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
     L2CaloEMClustersMonGroup.defineHistogram('HLT_size;HLT_barrel_high_et_size',cutmask="HLT_barrel_high_et",title='high-E_{T} HLT Cluster Size; Number of Cells; Entries',
                                 path=hist_path,xbins=91,xmin=-10.0,xmax=1810.0)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,HLT_et;HLT_barrel_high_et_vs_BC',cutmask="HLT_barrel_high_et",title='hight-E_{T} HLT Clusters E_{T} vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
     ########################
     #     OFF_Clusters     #
@@ -100,6 +108,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
     L2CaloEMClustersMonGroup.defineHistogram('OFF_type',title='OFF Cluster Type; Size Enum; Entries',
                                 path=hist_path,xbins=16,xmin=0.5,xmax=16.5)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,OFF_et;OFF_et_vs_BC',title='OFF Clusters E_{T} vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
     ########################
     #  HLT matched to OFF  #
@@ -139,6 +149,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=50,xmin=-5.0,xmax=5.0)
     L2CaloEMClustersMonGroup.defineHistogram('HLT_phi;HLT_with_OFF_match_phi',cutmask='HLT_with_OFF_match',title='HLT Cluster #phi (With OFF Matches); #phi; Entries',
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,HLT_et;HLT_with_OFF_match_et_vs_BC',cutmask='HLT_with_OFF_match',title='HLT Clusters E_{T} (With OFF Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
     # Declare OFF histograms without HLT matches
     L2CaloEMClustersMonGroup.defineHistogram('HLT_no_OFF_match_num',title='Number of HLT Clusters (No OFF Matches); Num Clusters; Entries',
@@ -151,6 +163,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=50,xmin=-5.0,xmax=5.0)
     L2CaloEMClustersMonGroup.defineHistogram('HLT_phi;HLT_no_OFF_match_phi',cutmask='HLT_no_OFF_match',title='HLT Cluster #phi (No OFF Matches); #phi; Entries',
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,HLT_et;HLT_no_OFF_match_et_vs_BC',cutmask='HLT_no_OFF_match',title='HLT Clusters E_{T} (No OFF Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
     ########################
     #  OFF matched to HLT  #
@@ -192,6 +206,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
     L2CaloEMClustersMonGroup.defineHistogram('OFF_type;OFF_with_HLT_match_type',cutmask='OFF_with_HLT_match',title='OFF Cluster Type (With HLT Matches); Size Enum; Entries',
                                 path=hist_path,xbins=16,xmin=0.5,xmax=16.5)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,OFF_et;OFF_with_HLT_match_et_vs_BC',cutmask='OFF_with_HLT_match',title='OFF Clusters E_{T} (With HLT Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
     # Declare OFF histograms without HLT matches
     L2CaloEMClustersMonGroup.defineHistogram('OFF_no_HLT_match_num',title='Number of OFF Clusters (No HLT Matches); Num Clusters; Entries',
@@ -206,6 +222,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=hist_path,xbins=64,xmin=-math.pi,xmax=math.pi)
     L2CaloEMClustersMonGroup.defineHistogram('OFF_type;OFF_no_HLT_match_type',cutmask='OFF_no_HLT_match',title='OFF Cluster Type (No HLT Matches); Size Enum; Entries',
                                 path=hist_path,xbins=16,xmin=0.5,xmax=16.5)
+    L2CaloEMClustersMonGroup.defineHistogram('HLT_bc,OFF_et;OFF_no_HLT_match_et_vs_BC',cutmask='OFF_no_HLT_match',title='OFF Clusters E_{T} (No HLT Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=hist_path,xbins=21,xmin=-0.5,xmax=20.5)
 
 
 
@@ -240,6 +258,7 @@ def TrigCaloMonConfig(inputFlags):
         algs[i].OFFMinET = 500.0
         algs[i].MatchType = False
         algs[i].MaxDeltaR = 0.04
+	algs[i].BunchCrossingTool = BunchCrossingTool("TrigConf" if not inputFlags.Input.isMC else "MC")
 
         # Add group
         TopoCaloClustersMonGroup.append(helper.addGroup(algs[i], 'TrigCaloMonitor','HLT/HLTCalo'))
@@ -267,6 +286,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/HLT_Clusters',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('HLT_size',title='HLT Cluster Size; Number of Cells; Entries',
                                 path=path_names[i]+'/HLT_Clusters',xbins=91,xmin=-10.0,xmax=1810.0)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,HLT_et;HLT_et_vs_BC',title='HLT Clusters E_{T} vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/HLT_Clusters',xbins=21,xmin=-0.5,xmax=20.5)
 
         # Declare high-ET HLT histograms
         TopoCaloClustersMonGroup[i].defineHistogram('HLT_barrel_high_et_num',title='Number of high-E_{T} HLT Clusters; Num Clusters; Entries',
@@ -287,6 +308,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/HLT_Clusters',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('HLT_size;HLT_barrel_high_et_size',cutmask="HLT_barrel_high_et",title='high-E_{T} HLT Cluster Size; Number of Cells; Entries',
                                 path=path_names[i]+'/HLT_Clusters',xbins=91,xmin=-10.0,xmax=1810.0)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,HLT_et;HLT_barrel_high_et_vs_BC',cutmask="HLT_barrel_high_et",title='hight-E_{T} HLT Clusters E_{T} vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/HLT_Clusters',xbins=21,xmin=-0.5,xmax=20.5)
 
         ########################
         #     OFF_Clusters     #
@@ -309,6 +332,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/OFF_Clusters',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('OFF_type',title='HLT Cluster Type; Size Enum; Entries',
                                 path=path_names[i]+'/OFF_Clusters',xbins=16,xmin=0.5,xmax=16.5)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,OFF_et;OFF_et_vs_BC',title='OFF Clusters E_{T} vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/OFF_Clusters',xbins=21,xmin=-0.5,xmax=20.5)
 
         ########################
         #  HLT matched to OFF  #
@@ -355,6 +380,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/HLT_Matched_to_OFF',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('HLT_type;HLT_with_OFF_match_type',cutmask='HLT_with_OFF_match',title='HLT Cluster Type (With OFF Matches); Size Enum; Entries',
                                 path=path_names[i]+'/HLT_Matched_to_OFF',xbins=16,xmin=0.5,xmax=16.5)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,HLT_et;HLT_with_OFF_match_et_vs_BC',cutmask='HLT_with_OFF_match',title='HLT Clusters E_{T} (With OFF Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/HLT_Matched_to_OFF',xbins=21,xmin=-0.5,xmax=20.5)
 
         # Declare HLT histograms without OFF matches
         TopoCaloClustersMonGroup[i].defineHistogram('HLT_no_OFF_match_num',title='Number of HLT Clusters (No OFF Matches); Num Clusters; Entries',
@@ -373,6 +400,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/HLT_Matched_to_OFF',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('HLT_type;HLT_no_OFF_match_type',cutmask='HLT_no_OFF_match',title='HLT Cluster Type (No OFF Matches); Size Enum; Entries',
                                 path=path_names[i]+'/HLT_Matched_to_OFF',xbins=16,xmin=0.5,xmax=16.5)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,HLT_et;HLT_no_OFF_match_et_vs_BC',cutmask='HLT_no_OFF_match',title='HLT Clusters E_{T} (No OFF Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/HLT_Matched_to_OFF',xbins=21,xmin=-0.5,xmax=20.5)
 
         ########################
         #  OFF matched to HLT  #
@@ -419,6 +448,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/OFF_Matched_to_HLT',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('OFF_type;OFF_with_HLT_match_type',cutmask='OFF_with_HLT_match',title='OFF Cluster Type (With HLT Matches); Size Enum; Entries',
                                 path=path_names[i]+'/OFF_Matched_to_HLT',xbins=16,xmin=0.5,xmax=16.5)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,OFF_et;OFF_with_HLT_match_et_vs_BC',cutmask='OFF_with_HLT_match',title='OFF Clusters E_{T} (With HLT Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/OFF_Matched_to_HLT',xbins=21,xmin=-0.5,xmax=20.5)
 
         # Declare OFF histograms without HLT matches
         TopoCaloClustersMonGroup[i].defineHistogram('OFF_no_HLT_match_num',title='Number of OFF Clusters (No HLT Matches); Num Clusters; Entries',
@@ -437,6 +468,8 @@ def TrigCaloMonConfig(inputFlags):
                                 path=path_names[i]+'/OFF_Matched_to_HLT',xbins=50,xmin=0.0,xmax=100.0)
         TopoCaloClustersMonGroup[i].defineHistogram('OFF_type;OFF_no_HLT_match_type',cutmask='OFF_no_HLT_match',title='OFF Cluster Type (No HLT Matches); Size Enum; Entries',
                                 path=path_names[i]+'/OFF_Matched_to_HLT',xbins=16,xmin=0.5,xmax=16.5)
+        TopoCaloClustersMonGroup[i].defineHistogram('HLT_bc,OFF_et;OFF_no_HLT_match_et_vs_BC',cutmask='OFF_no_HLT_match',title='OFF Clusters E_{T} (No HLT Matches) vs BC; BCs from front of bunch train; <E_{T}> [GeV]', type='TProfile',
+                                path=path_names[i]+'/OFF_Matched_to_HLT',xbins=21,xmin=-0.5,xmax=20.5)
 
 
     return helper.result()
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx
index 83adc0fa61148791e5f7bf99ec327d21ab9c9025..58e964fd9331805e443ac9879415c64fcaabc733 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.cxx
@@ -12,8 +12,11 @@ template <typename T> struct clus_kin {
 };
 
 HLTCalo_L2CaloEMClustersMonitor::HLTCalo_L2CaloEMClustersMonitor( const std::string& name, ISvcLocator* pSvcLocator )
-  : AthMonitorAlgorithm(name,pSvcLocator)
+  : AthMonitorAlgorithm(name,pSvcLocator),
+    m_bunchCrossingTool("Trig::BunchCrossingTool/BunchCrossingTool", this)
 {
+  declareProperty("BunchCrossingTool", m_bunchCrossingTool);
+
   declareProperty("HLTContainer", m_HLT_cont_key = "HLT_L2CaloEMClusters");
   declareProperty("OFFContainer", m_OFF_cont_key = "egammaClusters");
   declareProperty("MonGroupName", m_mongroup_name = "TrigCaloMonitor");
@@ -33,6 +36,8 @@ StatusCode HLTCalo_L2CaloEMClustersMonitor::initialize() {
   ATH_CHECK(m_HLT_cont_key.initialize());
   ATH_CHECK(m_OFF_cont_key.initialize());
 
+  ATH_CHECK( m_bunchCrossingTool.retrieve() );
+
   return AthMonitorAlgorithm::initialize();
 }
 
@@ -54,6 +59,11 @@ StatusCode HLTCalo_L2CaloEMClustersMonitor::fillHistograms( const EventContext&
 	return StatusCode::FAILURE;
   }
 
+  // Bunch crossing
+  int bcid = ctx.eventID().bunch_crossing_id();
+  auto HLT_bc = Monitored::Scalar<int>("HLT_bc",-1);
+  HLT_bc = m_bunchCrossingTool->distanceFromFront(bcid) / m_bunchCrossingTool->bunchTrainSpacing();
+
   /////////////////////////////////////
   // Cache expensive et, eta and phi //
   // calculations for the clusters   //
@@ -291,7 +301,7 @@ StatusCode HLTCalo_L2CaloEMClustersMonitor::fillHistograms( const EventContext&
   // Fill everything
   fill(m_mongroup_name,
         // HLT clusters
-        HLT_num, HLT_et, HLT_eta, HLT_phi, HLT_size, HLT_barrel_high_et_num,
+        HLT_num, HLT_et, HLT_eta, HLT_phi, HLT_size, HLT_barrel_high_et_num, HLT_bc,
 
 	// HLT cutmasks
 	HLT_barrel_high_et, HLT_no_OFF_match, HLT_with_OFF_match,
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.h b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.h
index de484d02565a8d6dd7f4d0cbc3000b7211defdac..0a4f204dc6f442d22e78cf3ace79e1a383515a8d 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.h
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_L2CaloEMClustersMonitor.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 TRIGCALOMONITORING_HLTCALO_L2CALOEMCLUSTERSMONITOR_H
@@ -10,6 +10,7 @@
 #include "StoreGate/ReadHandleKey.h"
 #include "xAODTrigCalo/TrigEMClusterContainer.h"
 #include "xAODCaloEvent/CaloClusterContainer.h"
+#include "TrigAnalysisInterfaces/IBunchCrossingTool.h"
 
 class HLTCalo_L2CaloEMClustersMonitor : public AthMonitorAlgorithm {
 
@@ -24,6 +25,8 @@ public:
 
 private:
 
+  ToolHandle<Trig::IBunchCrossingTool> m_bunchCrossingTool;
+
   SG::ReadHandleKey<xAOD::TrigEMClusterContainer> m_HLT_cont_key;
   SG::ReadHandleKey<xAOD::CaloClusterContainer> m_OFF_cont_key;
   std::string m_HLT_cont_name;
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.cxx
index 35ba67b8e819847711cc475dfa76f3b88a919b8a..83c7bd7989bb546ec50092d3d23ebe0ffd797298 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.cxx
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.cxx
@@ -12,8 +12,11 @@ struct clus_kin {
 };
 
 HLTCalo_TopoCaloClustersMonitor::HLTCalo_TopoCaloClustersMonitor( const std::string& name, ISvcLocator* pSvcLocator )
-  : AthMonitorAlgorithm(name,pSvcLocator)
+  : AthMonitorAlgorithm(name,pSvcLocator),
+    m_bunchCrossingTool("Trig::BunchCrossingTool/BunchCrossingTool", this)
 {
+  declareProperty("BunchCrossingTool", m_bunchCrossingTool);
+
   declareProperty("HLTContainer", m_HLT_cont_key = "HLT_TopoCaloClustersFS");
   declareProperty("OFFContainer", m_OFF_cont_key = "CaloCalTopoClusters");
   declareProperty("MonGroupName", m_mongroup_name = "TrigCaloMonitor");
@@ -35,6 +38,8 @@ StatusCode HLTCalo_TopoCaloClustersMonitor::initialize() {
   ATH_CHECK(m_HLT_cont_key.initialize());
   ATH_CHECK(m_OFF_cont_key.initialize());
 
+  ATH_CHECK( m_bunchCrossingTool.retrieve() );
+
   return AthMonitorAlgorithm::initialize();
 }
 
@@ -56,8 +61,16 @@ StatusCode HLTCalo_TopoCaloClustersMonitor::fillHistograms( const EventContext&
 	return StatusCode::FAILURE;
   }
 
-  // Cache expensive et, eta, phi calculations for the clusters
-  // prepare HLT clusters
+  // Bunch crossing
+  int bcid = ctx.eventID().bunch_crossing_id();
+  auto HLT_bc = Monitored::Scalar<int>("HLT_bc",-1);
+  HLT_bc = m_bunchCrossingTool->distanceFromFront(bcid) / m_bunchCrossingTool->bunchTrainSpacing();
+
+  /////////////////////////////////////
+  // Cache expensive et, eta and phi //
+  // calculations for the clusters   //
+  /////////////////////////////////////
+
   std::vector<clus_kin> vec_hlt_clusters;
   for (const auto& hlt_cluster : *hltCluster_readHandle) {
 	auto hlt_clus_et = hlt_cluster->et();
@@ -312,7 +325,7 @@ StatusCode HLTCalo_TopoCaloClustersMonitor::fillHistograms( const EventContext&
   // Fill everything
   fill(m_mongroup_name, 
 	// HLT clusters
-	HLT_num, HLT_et, HLT_eta, HLT_phi, HLT_time, HLT_type, HLT_size, HLT_barrel_high_et_num, 
+	HLT_num, HLT_et, HLT_eta, HLT_phi, HLT_time, HLT_type, HLT_size, HLT_barrel_high_et_num, HLT_bc, 
 
 	// HLT cutmasks
 	HLT_barrel_high_et, HLT_no_OFF_match, HLT_with_OFF_match,
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.h b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.h
index f68faef5471d3b0f157c31f06c275ad191f4d9b5..681babe7db4cb66e79808032ebb4bde20eab8234 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.h
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCalo_TopoCaloClustersMonitor.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 TRIGCALOMONITORING_HLTCALO_TOPOCALOCLUSTERSMONITOR_H
@@ -9,6 +9,8 @@
 #include "AthenaMonitoringKernel/Monitored.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "xAODCaloEvent/CaloClusterContainer.h"
+#include "TrigAnalysisInterfaces/IBunchCrossingTool.h"
+#include "GaudiKernel/ToolHandle.h"
 
 class HLTCalo_TopoCaloClustersMonitor : public AthMonitorAlgorithm {
 
@@ -23,6 +25,8 @@ public:
 
 private:
 
+  ToolHandle<Trig::IBunchCrossingTool> m_bunchCrossingTool;
+
   SG::ReadHandleKey<xAOD::CaloClusterContainer> m_HLT_cont_key;
   SG::ReadHandleKey<xAOD::CaloClusterContainer> m_OFF_cont_key;
   std::string m_HLT_cont_name;
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py
index c6bac567b7aec9ede80e13324458f5e34c710021..eedfbce25f172727b2c8c6829fc6f36bf992d505 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py
@@ -5,9 +5,10 @@ from AthenaCommon.AlgScheduler import AlgScheduler
 from AthenaCommon.CFElements import parOR
 from AthenaCommon.Logging import logging
 from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool, L1Decoder
-
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import EmptyMenuSequence
 log = logging.getLogger('EmuStepProcessingConfig')
 
+
 def thresholdToChains( chains ):
     """
     Produces list "threshod : chain" for all chains passed. Uses the L1Thresholds/vseeds Chain property
@@ -53,7 +54,7 @@ def generateL1DecoderAndChains():
  
     # event 2: 2e+ 3mu : HLT_e5_e8_2mu6_L1EM3_EM5_L12MU6, HLT_mu6_e8_L1MU6_EM5
     data['ctp'] [2]      =  'HLT_mu6_L1MU6 HLT_mu8_L1MU10 HLT_mu10_L1MU10 HLT_mu8_1step_L1MU6 HLT_e20_L1EM10 HLT_e8_L1EM7 HLT_mu6_e8_L1MU6_EM5 HLT_mu6Comb_e8_L1MU6_EM5 HLT_e3_e5_L1EM3_EM5 HLT_2mu6_L12MU6 HLT_2mu6Comb_L12MU6 HLT_2mu4_bDimu_L12MU4 HLT_e5_e8_L1EM3_EM5 HLT_e5_e8_2mu6_L1EM3_EM5_L12MU6 HLT_mu6_mu6noL1_L1MU6'
-    data['l1emroi'][2]   =  '2,0.2,0,EM3,EM5, EM7,EM15,EM20,EM50,EM100; 1,-1.1,0,EM3,EM5,EM7,EM15,EM20,EM50;'
+    data['l1emroi'][2]   =  '2,0.2,0,EM3,EM5,EM7,EM15,EM20,EM50,EM100; 1,-1.1,0,EM3,EM5,EM7,EM15,EM20,EM50;'
     data['emclusters'][2]=  'eta:0.5,phi:0,et:120000; eta:1,phi:-1.2,et:65000;'
     data['l1muroi'][2]   =  '2,0.5,0,MU6,MU8; 3,0.5,0,MU6,MU8,MU10;2.2,0.6,0,MU6;'
     data['msmu'][2]      =  'eta:-1.2,phi:0.7,pt:6500,pt2:8500; eta:-1.1,phi:0.6,pt:8500,pt2:8500;eta:-1.1,phi:0.6,pt:8500,pt2:8500;'
@@ -167,6 +168,8 @@ def generateL1DecoderAndChains():
 
     # combined chain
     if doCombo:
+        emptySeq1 = EmptyMenuSequence("step1EmptySeqence")
+        emptySeq2 = EmptyMenuSequence("step2EmptySeqence")
         if not doElectron:
             from TrigUpgradeTest.HLTSignatureConfig import elMenuSequence        
             el11 = elMenuSequence(step="1",reconame="v1", hyponame="v1")    
@@ -185,7 +188,6 @@ def generateL1DecoderAndChains():
             mu32 = muMenuSequence(step="3",reconame="v2", hyponame="v2")
             #step4
             mu41 = muMenuSequence(step="4",reconame="v1", hyponame="v1")
-
            
            
         from TrigUpgradeTest.HLTSignatureHypoTools import dimuDrComboHypoTool
@@ -199,9 +201,9 @@ def generateL1DecoderAndChains():
 
      
         CombChains =[
-
-            makeChain(name='HLT_mu6_e8_L1MU6_EM5',  L1Thresholds=["MU6","EM5"], ChainSteps=[ ChainStep("Step1_mu_em", [mu11, el11], multiplicity=[1,1], comboToolConfs=[dimuDrComboHypoTool]),
-                                                                                             ChainStep("Step2_mu_em", [mu21, el21], multiplicity=[1,1])] ),
+            # This is an example of a chain running in "serial"
+            makeChain(name='HLT_mu6_e8_L1MU6_EM5',  L1Thresholds=["MU6","EM5"], ChainSteps=[ ChainStep("Step1_mu_em_serial", [mu11, emptySeq1], multiplicity=[1,1]),
+                                                                                             ChainStep("Step2_mu_em_serial", [emptySeq2, el21], multiplicity=[1,1])] ),
 
             makeChain(name='HLT_mu6Comb_e8_L1MU6_EM5', L1Thresholds=["MU6","EM5"], ChainSteps=[ ChainStep("Step1_mu2_em", [mu12, el11], multiplicity=[1,1]),
                                                                                                 ChainStep("Step2_mu_em", [mu21, el21], multiplicity=[1,1])] ),
@@ -238,7 +240,6 @@ def generateL1DecoderAndChains():
 
     l1Decoder = L1Decoder( RoIBResult="", L1TriggerResult="" )
     l1Decoder.L1DecoderSummaryKey = "L1DecoderSummary"
-    
     ctpUnpacker = CTPUnpackingEmulationTool( ForceEnableAllChains=False , InputFilename="ctp.dat" )
     l1Decoder.ctpUnpacker = ctpUnpacker
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py
index 0922cc1392923e757bcaf846f9116ef407aa467b..eb705d0050f8e8bbffd497220eeb1120e858438c 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTSignatureConfig.py
@@ -1,3 +1,4 @@
+
 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 
 from AthenaConfiguration.ComponentFactory import CompFactory
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py
index 58ca2512eac00785ceb87bd29d6ba276ae5308ad..aafeb979b0d73b70a94d86557571bf27cbcd1634 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py
@@ -12,7 +12,9 @@ ex = ExecStep.ExecStep()
 ex.type = 'athena'
 ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
-ex.args = '-c "isOnline=True;doWriteBS=False;doWriteRDOTrigger=True;"'
+#ex.args = '-c "isOnline=True;doWriteBS=False;doWriteRDOTrigger=True;"'
+ex.args = '-c "doEmptyMenu=True;doBjetSlice=True;isOnline=True;doWriteBS=False;doWriteRDOTrigger=True;"'
+ex.max_events = 1000
 
 test = Test.Test()
 test.art_type = 'build'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
index 0e5fab2a569f5456a2a31dde3b27c4b0a43367db..8e55dc677efe6e3496947775f3b841a07ed79cc2 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
@@ -27,6 +27,13 @@ test.art_type = 'build'
 test.exec_steps = [ex]
 test.check_steps = CheckSteps.default_check_steps(test)
 
+#Overwrite default msgcount steps
+msgcount = test.get_step("MessageCount")
+msgcount.info_threshold = 1200
+msgcount.other_threshold = 100
+msgcount.required = True # make the test exit code depend on this step
+
+
 # Overwrite default RegTest settings
 regtest = test.get_step('RegTest')
 regtest.regex = 'TrigSignatureMoniMT.*HLT_.*|TrigSignatureMoniMT.*-- #[0-9]+ (Events|Features).*'
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index 4b17ed1bf2497f6fc7d26714c16cc9baac90d8fa..ce03a70104ddcfd6879777ef3518ebdd2ab43eb4 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -58,6 +58,9 @@ AllowedOutputFormats.extend(EventBuildingInfo.getAllDataScoutingIdentifiers())
 JetVarsToKeep = ['ActiveArea', 'ActiveArea4vec_eta', 'ActiveArea4vec_m', 'ActiveArea4vec_phi', 'ActiveArea4vec_pt', 'AlgorithmType', 
                  'DetectorEta', 'DetectorPhi', 'EMFrac', 'EnergyPerSampling', 'GhostTrack', 'HECFrac', 'InputType', 
                  'JetConstitScaleMomentum_eta', 'JetConstitScaleMomentum_m', 'JetConstitScaleMomentum_phi', 'JetConstitScaleMomentum_pt', 
+                 'JetPileupScaleMomentum_eta', 'JetPileupScaleMomentum_m', 'JetPileupScaleMomentum_phi', 'JetPileupScaleMomentum_pt', 
+                 'JetEtaJESScaleMomentum_eta', 'JetEtaJESScaleMomentum_m', 'JetEtaJESScaleMomentum_phi', 'JetEtaJESScaleMomentum_pt', 
+                 'JetGSCScaleMomentum_eta', 'JetGSCScaleMomentum_m', 'JetGSCScaleMomentum_phi', 'JetGSCScaleMomentum_pt', 
                  'Jvt', 'JVFCorr', 'NumTrkPt500', 'NumTrkPt1000', 'SizeParameter', 'SumPtTrkPt500', 'SumPtTrkPt1000', 'TrackWidthPt1000',]
 JetVars = '.'.join(JetVarsToKeep)
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
index f24e9e05ac3913cec9b1e987931c9b65da525300..d9b38c02be58c63bfd59e6e8edc02131d08b221f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
@@ -4,20 +4,21 @@ from AthenaCommon.Logging import logging
 log = logging.getLogger( __name__ )
 
 
-from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep
+from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import Chain, ChainStep, EmptyMenuSequence
 from copy import deepcopy
 
 
-def mergeChainDefs(listOfChainDefs, chainDict, strategy="parallel", offset=-1):
+def mergeChainDefs(listOfChainDefs, chainDict):
 
-    log.debug("Combine by using %s merging", strategy)
+    strategy = chainDict["mergingStrategy"]
+    offset = chainDict["mergingOffset"]
+    log.info(chainDict['chainName'])
+    log.info("Combine by using %s merging", strategy)
 
     if strategy=="parallel":
         return mergeParallel(listOfChainDefs,  offset)
     elif strategy=="serial":
-        #return mergeSerial(listOfChainDefs,offset)
-        log.error("Serial mergin not yet implemented.")
-        return -1
+        return mergeSerial(listOfChainDefs)
     else:
         log.error("Merging failed for %s. Merging strategy '%s' not known.", (listOfChainDefs, strategy))
         return -1
@@ -54,9 +55,9 @@ def mergeParallel(chainDefList, offset):
     myOrderedSteps = deepcopy(orderedSteps)
 
     combChainSteps =[]
-    for steps in myOrderedSteps:
+    for step_index, steps in enumerate(myOrderedSteps):
         mySteps = list(steps)
-        combStep = makeChainSteps(mySteps)
+        combStep = makeChainSteps(mySteps, step_index+1)
         combChainSteps.append(combStep)
 
     # check if all chain parts have the same number of steps
@@ -68,24 +69,95 @@ def mergeParallel(chainDefList, offset):
                                   
     combinedChainDef = Chain(chainName, ChainSteps=combChainSteps, L1Thresholds=l1Thresholds)
 
-    log.debug("Merged chain %s with these steps:", chainName)
+    log.info("Parallel merged chain %s with these steps:", chainName)
     for step in combinedChainDef.steps:
         log.debug('   %s', step)
 
     return combinedChainDef
 
+def serial_zip(allSteps, chainName):
+    n_chains = len(allSteps)
+    newsteps = []
+    for chain_index, chainsteps in enumerate(allSteps):
+        for step_index, step in enumerate(chainsteps):
+            log.info('chain_index: ' + str(chain_index) + " step_index: " + str(step_index))
+            # create list of correct length
+            stepList = [None]*n_chains
+            
+            # put the step from the current sub-chain into the right place
+            stepList[chain_index] = step
+            log.info('Put step: ' + str(step))
+
+            # all other steps should contain an empty sequence
+            for step_index2, emptyStep in enumerate(stepList):
+                if emptyStep is None:
+                    seqName = chainName + 'EmptySeq' + str(chain_index) + '_' + str(step_index+1)
+                    emptySeq = EmptyMenuSequence(seqName)
+                    stepList[step_index2] = ChainStep('Step' + str(step_index+1) + "_" + seqName, Sequences=[emptySeq], chainDicts=step.chainDicts)
+
+            # first create a list of chain steps where each step is an empty sequence
+            #seqName = chainName + 'EmptySeq' + str(chain_index) + '_'
+            #emptySeqList = [EmptyMenuSequence(seqName + str(_x)) for _x in range(n_chains)]
+            #stepList = [ChainStep('Step_' + seqName, Sequences=[seq], chainDicts=step.chainDicts) for seq in emptySeqList]
+            # now overwrite one of these steps from the step in the current sub-chain
+            #stepList[chain_index] = step
+            
+            newsteps.append(stepList)
+    log.debug('After serial_zip')
+    for s in newsteps:
+        log.debug( s )
+    return newsteps
+
+def mergeSerial(chainDefList):
+    allSteps = []
+    nSteps = []
+    chainName = ''
+    l1Thresholds = []
+
+    log.info('Merge chainDefList:')
+    log.info(chainDefList)
 
+    for cConfig in chainDefList:
+        if chainName == '':
+            chainName = cConfig.name
+        elif chainName != cConfig.name:
+            log.error("Something is wrong with the combined chain name: cConfig.name = %s while chainName = %s", cConfig.name, chainName)
+            
+        allSteps.append(cConfig.steps)
+        nSteps.append(len(cConfig.steps))
+        l1Thresholds.extend(cConfig.vseeds)
+
+    serialSteps = serial_zip(allSteps, chainName)
+    mySerialSteps = deepcopy(serialSteps)
+    combChainSteps =[]
+    for step_index, steps in enumerate(mySerialSteps):
+        mySteps = list(steps)
+        combStep = makeChainSteps(mySteps, step_index+1)
+        combChainSteps.append(combStep)
+
+    # check if all chain parts have the same number of steps
+    sameNSteps = all(x==nSteps[0] for x in nSteps) 
+    if sameNSteps is True:
+        log.info("All chain parts have the same number of steps")
+    else:
+        log.info("Have to deal with uneven number of chain steps, there might be none's appearing in sequence list => to be fixed")
+                                  
+    combinedChainDef = Chain(chainName, ChainSteps=combChainSteps, L1Thresholds=l1Thresholds)
+
+    log.info("Serial merged chain %s with these steps:", chainName)
+    for step in combinedChainDef.steps:
+        log.info('   %s', step)
+
+    return combinedChainDef
 
 
-def makeChainSteps(steps):
+def makeChainSteps(steps, stepNumber):
     from copy import deepcopy
     from TrigCompositeUtils.TrigCompositeUtils import legName
-    stepName = ''
+    stepName = 'merged_Step' + str(stepNumber)
     stepSeq = []
     stepMult = []
-    stepNumber = ''
     log.verbose(" steps %s ", steps)
-    stepName = "merged"
     stepDicts = []
     count = 0
     comboHypoTools = []
@@ -93,9 +165,9 @@ def makeChainSteps(steps):
     for step in steps:
         if step is None:
             continue
-        log.debug("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
+        log.info("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
         if len(step.sequences):
-            log.debug("      with sequences = %s", ' '.join(map(str, [seq.name for seq in step.sequences])))
+            log.info("      with sequences = %s", ' '.join(map(str, [seq.name for seq in step.sequences])))
 
          # this function only works if the input chains are single-object chains (one menu seuqnce)
         if len(step.sequences) > 1:
@@ -103,12 +175,9 @@ def makeChainSteps(steps):
 
 
         currentStep = step.name
-        stepNameParts = currentStep.split('_')
-        if stepNumber == '':
-            stepNumber = stepNameParts[0]
 
         # the step naming for combined chains needs to be revisted!!
-        stepName += '_' +step.name
+        stepName += '_' + currentStep
         if len(step.sequences):
             seq = step.sequences[0]
             stepSeq.append(seq)
@@ -123,7 +192,7 @@ def makeChainSteps(steps):
         
     comboHypoTools = list(set(comboHypoTools))
     theChainStep = ChainStep(stepName, Sequences=stepSeq, multiplicity=stepMult, chainDicts=stepDicts, comboToolConfs=comboHypoTools) 
-    log.debug("Merged step: \n %s", theChainStep)
+    log.info("Merged step: \n %s", theChainStep)
   
     
     return theChainStep
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
index cd1cc1aa225bc8d3b3f4616913b6d9f231c73454..72387ca1dc292c2d1ec5a8398bf75764f6b5de3d 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/GenerateMenuMT.py
@@ -304,7 +304,7 @@ class GenerateMenuMT(object):
 
         elif len(listOfChainConfigs)>1:
                 log.debug("Merging strategy from dictionary: %s", mainChainDict["mergingStrategy"])
-                theChainConfig = mergeChainDefs(listOfChainConfigs, mainChainDict, mainChainDict["mergingStrategy"], mainChainDict["mergingOffset"])
+                theChainConfig = mergeChainDefs(listOfChainConfigs, mainChainDict)
 
                 # This needs to be added for topological chains - needs implementation
                 #doTopo = self.CheckIntraSignatureTopo(chainDicts) and chainDict["topo"]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
index 724347f48ebc3bfafb3746e91bb68a93f5c4f0fb..533f10f729b8d6d0ff7dfcd88140043ab47d5305 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
@@ -253,8 +253,10 @@ def matrixDisplay( allCFSeq ):
         for cfseq in cfseq_list:
             chains = __getHyposOfStep(cfseq.step)
             for seq in cfseq.step.sequences:
-                mx[stepNumber, seq.sequence.Alg.name()].extend(chains)
-
+                if seq.name == "Empty":
+                    mx[stepNumber, "Empty"].extend(chains)
+                else:
+                    mx[stepNumber, seq.sequence.Alg.name()].extend(chains)
 
     # sort dictionary by fist key=step
     from collections import  OrderedDict
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index dd1b29d9edd5f7964dfa8c1bc8d1c21fdb1bc531..2c88fd2e5dccf5ab3625f2984ec5f25dc6784d10 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -36,8 +36,10 @@ def setupMenu():
         ChainProp(name='HLT_mu6_idperf_L1MU6', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu24_idperf_L1MU20', groups=SingleMuonGroup),
 
-        #ATR-20049
+        # Test chain for di-muon with full-scan, not yet working due to problem with FS seeding
+        #ChainProp(name='HLT_mu6_mu6noL1_L1MU6', l1SeedThresholds=['MU6','FSNOSEED'], mergingStrategy='serial', groups=MultiMuonGroup),
 
+        #ATR-20049
         ChainProp(name='HLT_mu6fast_L1MU6', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu6Comb_L1MU6', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu6_L1MU6',     groups=SingleMuonGroup),
@@ -45,7 +47,7 @@ def setupMenu():
         ChainProp(name='HLT_mu20_ivar_L1MU6',      groups=SingleMuonGroup),
         ChainProp(name='HLT_mu6_ivarmedium_L1MU6', groups=SingleMuonGroup),
         ChainProp(name='HLT_mu6noL1_L1MU6', l1SeedThresholds=['FSNOSEED'], groups=SingleMuonGroup),
-#        ChainProp(name='HLT_mu6_mu6noL1_L1MU6', l1SeedThresholds=['MU6','FSNOSEED'], groups=MultiMuonGroup),
+
         ChainProp(name='HLT_mu6_msonly_L1MU6',     groups=SingleMuonGroup),
 
         ChainProp(name='HLT_2mu6_10invm70_L1MU6', groups=SingleMuonGroup),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index e3a954f71084993d73400fb3fb3bb0886d41f6d6..ec29d034335f69e294f946dec92ef43b99e0d001 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -1,4 +1,3 @@
-
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging
@@ -131,6 +130,8 @@ def algColor(alg):
         return "cyan3"
     if isFilterAlg(alg):
         return "chartreuse3"
+    if isEmptyAlg(alg):
+        return "peachpuff3"
     if isComboHypoAlg(alg):
         return "darkorange"
     return "cadetblue1"
@@ -294,7 +295,10 @@ def isHypoBase(alg):
     if  'HypoInputDecisions'  in alg.__class__.__dict__:
         return True
     prop = alg.__class__.__dict__.get('_properties')
-    return  ('HypoInputDecisions'  in prop)
+    if type(prop) is dict:
+        return  ('HypoInputDecisions'  in prop)
+    else:
+        return False
 
 def isInputMakerBase(alg):
     return  ('InputMakerInputDecisions'  in alg.__class__.__dict__)
@@ -302,13 +306,88 @@ def isInputMakerBase(alg):
 def isFilterAlg(alg):
     return isinstance(alg, RoRSeqFilter)
 
+def isEmptyAlg(alg):
+    if alg is None:
+        return True
+    else:
+        return False
+
 def isComboHypoAlg(alg):
     return isinstance(alg, ComboHypo)
 
 
+
 ##########################################################
-# NOW sequences and chains
+# Now sequences and chains
 ##########################################################
+from AthenaConfiguration.ComponentFactory import CompFactory
+
+class EmptyMenuSequence(object):
+    """ Class to emulate reco sequences with no Hypo"""
+    """ By construction it has no Hypo;"""
+    
+    def __init__(self, name):
+        Maker = CompFactory.HLTTest__TestInputMaker("IM"+name, RoIsLink="initialRoI", LinkName="initialRoI", Output = 'empty' + name)
+        self._name = name
+        self._maker       = InputMakerNode( Alg = Maker )
+        self._seed=''
+        self._sequence     = Node( Alg = seqAND(name, [Maker]))
+
+    @property
+    def sequence(self):
+        return self._sequence
+
+    @property
+    def seed(self):
+        return self._seed
+
+    @property
+    def name(self):
+        return self._name
+
+    @property
+    def __maker(self):
+        return self._maker
+
+    def getOutputList(self):
+        return self.__maker.readOutputList() # Only one since it's merged
+
+    def connectToFilter(self, outfilter):
+        """ Connect filter to the InputMaker"""
+        self.__maker.addInput(outfilter)
+
+    def createHypoTools(self, chainDict):
+        log.debug("This sequence is empty. No Hypo to conficure")
+
+    def addToSequencer(self, stepReco, seqAndView, already_connected):
+        # menu sequence empty do not add to athena sequencer
+        log.debug("This sequence is empty. Adding Maker node only to athena sequencer")
+        ath_sequence = self.sequence.Alg
+        name = ath_sequence.name()
+        if name in already_connected:
+            log.debug("AthSequencer %s already in the Tree, not added again",name)
+            return stepReco, seqAndView, already_connected
+        else:
+            already_connected.append(name)
+            stepReco += ath_sequence
+        return stepReco, seqAndView, already_connected        
+
+    def buildCFDot(self, cfseq_algs, all_hypos, isCombo, last_step_hypo_nodes, file):
+        file.write("    %s[fillcolor=%s]\n"%("none", algColor(None)))
+        return cfseq_algs, all_hypos, last_step_hypo_nodes
+
+    def getTools(self):
+        # No tools for empty sequences - needs to return empty list?
+        log.debug("No tools for empty menu sequences")
+
+    def setSeed( self, seed ):
+        self._seed = seed
+
+    def __repr__(self):
+        return "MenuSequence::%s \n Hypo::%s \n Maker::%s \n Sequence::%s \n HypoTool::%s\n"\
+            %("Empty", "Empty", "Empty", "Empty", None)
+
+
 
 class MenuSequence(object):
     """ Class to group reco sequences with the Hypo"""
@@ -366,18 +445,22 @@ class MenuSequence(object):
            HypoAlg::%s.output=%s",\
                            self.hypo.Alg.name(), input_maker_output, self.hypo.Alg.name(), self.hypo.readOutputList()[0])
 
+
     @property
     def seed(self):
         return self._seed
 
+
     @property
     def name(self):
         return self._name
 
+
     @property
     def sequence(self):
         return self._sequence
 
+
     @property
     def maker(self):
         return self._maker
@@ -556,7 +639,6 @@ class CAMenuSequence(MenuSequence):
         return self._hypo
 
 
-
 class Chain(object):
     """Basic class to define the trigger menu """
     __slots__='name','steps','vseeds','L1decisions'