diff --git a/Calorimeter/CaloEvent/CMakeLists.txt b/Calorimeter/CaloEvent/CMakeLists.txt
index 99ce249e55d536a966ac98cbbc2664c480fce28b..079332ac7f217334d49aac93980a85cd48096590 100644
--- a/Calorimeter/CaloEvent/CMakeLists.txt
+++ b/Calorimeter/CaloEvent/CMakeLists.txt
@@ -7,8 +7,10 @@ atlas_subdir( CaloEvent )
 
 # Extra dependencies, based on the environment:
 set( extra_deps )
+set( extra_libs )
 if( NOT GENERATIONBASE )
    set( extra_deps LArCalorimeter/LArRawConditions ) # not ideal... LAr should depend on Calo
+   set( extra_libs LArRawConditions )
 endif()
 
 # Declare the package's dependencies:
@@ -46,7 +48,7 @@ atlas_add_library( CaloEvent CaloEvent/*.h CaloEvent/*.icc src/*.cxx
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
    LINK_LIBRARIES CaloConditions CaloGeoHelpers CaloIdentifier AthAllocators
    AthContainers AthLinks CxxUtils Navigation GeoPrimitives
-   Identifier EventKernel FourMom NavFourMom CaloDetDescrLib
+   Identifier EventKernel FourMom NavFourMom CaloDetDescrLib ${extra_libs}
    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaKernel )
 
 atlas_add_dictionary( CaloEventDict
diff --git a/Calorimeter/CaloTools/CMakeLists.txt b/Calorimeter/CaloTools/CMakeLists.txt
index 4390b59b0abb22433dde51d057cec9008ad87fe4..c5ad29c9304cfb2d6111954455e8192fc81d58e3 100644
--- a/Calorimeter/CaloTools/CMakeLists.txt
+++ b/Calorimeter/CaloTools/CMakeLists.txt
@@ -57,7 +57,7 @@ atlas_add_component( CaloTools
    AthenaPoolUtilities AtlasDetDescr Identifier GaudiKernel LArIdentifier
    LArRecEvent LArToolsLib LumiBlockCompsLib TileConditionsLib TileEvent
    CxxUtils CaloCondBlobObjs AthAllocators IdDictParser xAODBase xAODEventInfo
-   TileIdentifier LArRawConditions )
+   TileIdentifier LArRawConditions CaloInterfaceLib )
 
 # Install files from the package:
 atlas_install_headers( CaloTools )
diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt
index 1e304aa3d71ab4c7c493cca8b4afb4f6122e74cf..fb1d8a2953cbf9b7843e7bc40e69f1e91307c54d 100644
--- a/Calorimeter/CaloUtils/CMakeLists.txt
+++ b/Calorimeter/CaloUtils/CMakeLists.txt
@@ -40,7 +40,7 @@ atlas_add_library( CaloUtilsLib CaloUtils/*.h CaloUtils/*.icc src/*.h src/*.cxx
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
    LINK_LIBRARIES CaloConditions CaloEvent CaloGeoHelpers CaloIdentifier
    AthenaBaseComps AthenaKernel Navigation FourMom xAODCaloEvent xAODCore GaudiKernel
-   CaloDetDescrLib StoreGateLib
+   CaloDetDescrLib StoreGateLib CaloInterfaceLib
    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CxxUtils
    SGTools IdDictParser Identifier )
 
diff --git a/Control/AthViews/src/ViewDataVerifier.cxx b/Control/AthViews/src/ViewDataVerifier.cxx
index 7c7505e2858e0f4934912638542beb3796b92511..7a60aed464a4dc8cad83e8050eed757b2b9c73e7 100644
--- a/Control/AthViews/src/ViewDataVerifier.cxx
+++ b/Control/AthViews/src/ViewDataVerifier.cxx
@@ -73,14 +73,14 @@ StatusCode ViewDataVerifier::execute()
     if ( dp ) { 
       ATH_MSG_DEBUG( "Found " << obj.key() << " in " << viewProxy->name() );
     } else {
-      ATH_MSG_ERROR( "Did not find " << obj.key() << " in " << viewProxy->name() );
+      ATH_MSG_DEBUG( "Did not find " << obj.key() << " in " << viewProxy->name() );
       const SG::View* view = dynamic_cast<const SG::View*>( viewProxy );
       if ( view != 0 ) {
-        ATH_MSG_ERROR( "Available content is: " << view->dump() );
+        ATH_MSG_DEBUG( "Available content is: " << view->dump() );
       } else {
-        ATH_MSG_ERROR( "Not a View" );
+        ATH_MSG_DEBUG( "Not a View" );
       }
-      return StatusCode::FAILURE;
+      //return StatusCode::FAILURE;
     }
   }
 
diff --git a/Control/AthenaConfiguration/python/CARunner.py b/Control/AthenaConfiguration/python/CARunner.py
index 90919e05addcf756d507ef202aaf9c2a3adaaf20..11113b82b67c66d7a9f684a862a9dba69ad0df74 100755
--- a/Control/AthenaConfiguration/python/CARunner.py
+++ b/Control/AthenaConfiguration/python/CARunner.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python 
+#!/usr/bin/env python 
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from __future__ import print_function
@@ -31,7 +31,7 @@ if __name__=="__main__":
             print("Failed to interpret nEvent, got",sys.arv[2])
             usage()
 
-    inFile=open(inputName)
+    inFile=open(inputName, 'rb')
     
     acc=pickle.load(inFile)
 
diff --git a/Control/AthenaMonitoring/python/AthenaMonitoringCfg.py b/Control/AthenaMonitoring/python/AthenaMonitoringCfg.py
index 3ce5d05613e1cd01729f36671ceac8fe7da8de03..de779c0d90647464e3ea69513e106b8ee8409560 100644
--- a/Control/AthenaMonitoring/python/AthenaMonitoringCfg.py
+++ b/Control/AthenaMonitoring/python/AthenaMonitoringCfg.py
@@ -78,4 +78,9 @@ def AthenaMonitoringCfg(flags):
         from tauMonitoring.TauMonitoringConfig import TauMonitoringConfig
         result.merge(TauMonitoringConfig(flags))
 
+    if flags.DQ.Steering.doAFPMon:
+        info('Set up AFP monitoring')
+        from Run3AFPMonitoring.Run3AFPExampleMonitorAlgorithm import Run3AFPExampleMonitoringConfig
+        result.merge(Run3AFPExampleMonitoringConfig(flags))
+        
     return result
diff --git a/Control/AthenaMonitoring/share/hist_file_dump.py b/Control/AthenaMonitoring/share/hist_file_dump.py
index 0ab7bcaaa5e6fbdc5fec09af8f275f4f9c9c48f1..527f62ec1bb67f05e63c0d2c7f6097406c3e0c82 100755
--- a/Control/AthenaMonitoring/share/hist_file_dump.py
+++ b/Control/AthenaMonitoring/share/hist_file_dump.py
@@ -7,6 +7,7 @@ import sys, os, operator
 import argparse
 import zlib
 import json
+from PyUtils.fprint import _formatFloat
 
 def fixprecision(x):
     import math
@@ -14,7 +15,8 @@ def fixprecision(x):
         return x
     else:
         mantissa, exponent = math.frexp(x)
-        return float(str(mantissa)[:16]) * 2**exponent
+        sm = '%.12g' % mantissa
+        return _formatFloat (float(sm[:16]) * 2**exponent)
 
 def jsonfixup(instr):
     instr = instr.Data()
@@ -32,7 +34,7 @@ def jsonfixup(instr):
     if 'fBranches' in j:
         for branch in j['fBranches']['arr']:
             branch['fBasketSeek'] = []
-    return json.dumps(j)
+    return json.dumps(j, sort_keys=True)
 
 parser=argparse.ArgumentParser()
 parser.add_argument('filename',
@@ -89,7 +91,9 @@ def dumpdir(d):
             if args.tree_entries and k.GetClassName() == 'TTree':
                 lhash = fuzzytreehash(k)
             elif args.hash:
-                lhash = zlib.adler32(jsonfixup(ROOT.getjson(k)))
+                lhash = zlib.adler32(jsonfixup(ROOT.getjson(k)).encode())
+                if lhash < 0:
+                    lhash += 2**32
             else:
                 lhash = 0
             idxname = os.path.join(thispath, k.GetName())
diff --git a/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref b/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref
index 83ea1ea17cfb6fa1742aeb6277c8bdee27dbbd3f..e7c989dbf079cc25e06c117a051b4fc94a49fc56 100644
--- a/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref
+++ b/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref
@@ -1,58 +1,58 @@
-TH1F /run_311321/top/run: 4000554 uncompressed, 17768 on file (hash -1637422341)
-TEfficiency /run_311321/OneRing/AndInTheDarkness/random_vs_pT_vs_pT_passed: 21034 uncompressed, 1551 on file (hash -1415546040)
-TTree /run_311321/OneRing/BindThem/testtree: 2979 uncompressed, 860 on file (hash -1367424522)
-TEfficiency /run_311321/OneRing/AndInTheDarkness/pT_vs_pT_passed: 2965 uncompressed, 684 on file (hash -94247922)
-TH2F /run_311321/OneRing/ToBringThemAll/pT_vs_random: 909 uncompressed, 426 on file (hash 151299293)
-TH1F /run_311321/OneRing/ToFindThem/lb: 12574 uncompressed, 387 on file (hash -1115607720)
-TH1F /run_311321/OneRing/AndInTheDarkness/pT_with_cut: 759 uncompressed, 356 on file (hash 1766687537)
-TH1F /run_311321/OneRing/ToBringThemAll/random: 667 uncompressed, 322 on file (hash -1985709482)
-TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID_merge: 748 uncompressed, 304 on file (hash 1780646662)
-TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID: 742 uncompressed, 297 on file (hash 1977778327)
-TH1F /run_311321/top/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 356947890)
-TH1F /run_311321/top/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 297768880)
-TH1F /run_311321/top/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash -953182330)
-TH1F /run_311321/top/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash -1012361340)
-TH1F /run_311321/OneRing/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 356947890)
-TH1F /run_311321/OneRing/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 297768880)
-TH1F /run_311321/OneRing/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash -953182330)
-TH1F /run_311321/OneRing/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash -1012361340)
-TH1F /run_311321/top/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash -9069961)
-TH1F /run_311321/top/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 1652922953)
-TH1F /run_311321/OneRing/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash -9069961)
-TH1F /run_311321/OneRing/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 1652922953)
-TH1F /run_311321/top/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1644728065)
-TH1F /run_311321/top/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1598131968)
-TH1F /run_311321/OneRing/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1644728065)
-TH1F /run_311321/OneRing/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1598131968)
-TH1F /run_311321/top/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash -1351655145)
-TH1F /run_311321/top/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 1925406977)
-TH1F /run_311321/top/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash -1398513386)
-TH1F /run_311321/top/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 1878548736)
-TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash -1351655145)
-TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 1925406977)
-TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash -1398513386)
-TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 1878548736)
-TH1F /run_311321/top/Keys/c_layer2: 952 uncompressed, 236 on file (hash -1735029423)
-TH1F /run_311321/top/Keys/c_layer1: 952 uncompressed, 236 on file (hash -1792438961)
-TH1F /run_311321/OneRing/Keys/c_layer2: 952 uncompressed, 236 on file (hash -1735029423)
-TH1F /run_311321/OneRing/Keys/c_layer1: 952 uncompressed, 236 on file (hash -1792438961)
-TH2F /run_311321/top/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1811263699)
-TH2F /run_311321/top/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1762701522)
-TH2F /run_311321/OneRing/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1811263699)
-TH2F /run_311321/OneRing/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1762701522)
-TH1F /run_311321/top/Layer/c_layer2: 581 uncompressed, 228 on file (hash 1180196190)
-TH1F /run_311321/top/Layer/c_layer1: 581 uncompressed, 228 on file (hash 1133927773)
-TH1F /run_311321/OneRing/Layer/c_layer2: 581 uncompressed, 228 on file (hash 1180196190)
-TH1F /run_311321/OneRing/Layer/c_layer1: 581 uncompressed, 228 on file (hash 1133927773)
-TH1F /run_311321/top/Eta/c_1: 576 uncompressed, 222 on file (hash 2129681261)
-TH1F /run_311321/top/Eta/c_0: 576 uncompressed, 222 on file (hash 2083412844)
-TH1F /run_311321/OneRing/Eta/c_1: 576 uncompressed, 222 on file (hash 2129681261)
-TH1F /run_311321/OneRing/Eta/c_0: 576 uncompressed, 222 on file (hash 2083412844)
-TH1F /run_311321/top/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1174035080)
-TH1F /run_311321/top/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1127766663)
-TH1F /run_311321/top/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1127635591)
-TH1F /run_311321/top/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1081367174)
-TH1F /run_311321/OneRing/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1174035080)
-TH1F /run_311321/OneRing/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1127766663)
-TH1F /run_311321/OneRing/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1127635591)
-TH1F /run_311321/OneRing/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1081367174)
+TH1F /run_311321/top/run: 4000554 uncompressed, 17768 on file (hash 2879974139)
+TEfficiency /run_311321/OneRing/AndInTheDarkness/random_vs_pT_vs_pT_passed: 21034 uncompressed, 1551 on file (hash 3769596744)
+TTree /run_311321/OneRing/BindThem/testtree: 2979 uncompressed, 860 on file (hash 3604726262)
+TEfficiency /run_311321/OneRing/AndInTheDarkness/pT_vs_pT_passed: 2965 uncompressed, 684 on file (hash 3294946318)
+TH2F /run_311321/OneRing/ToBringThemAll/pT_vs_random: 909 uncompressed, 426 on file (hash 552182390)
+TH1F /run_311321/OneRing/ToFindThem/lb: 12574 uncompressed, 387 on file (hash 3672452440)
+TH1F /run_311321/OneRing/AndInTheDarkness/pT_with_cut: 759 uncompressed, 356 on file (hash 3784147481)
+TH1F /run_311321/OneRing/ToBringThemAll/random: 667 uncompressed, 322 on file (hash 3343153471)
+TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID_merge: 748 uncompressed, 304 on file (hash 1181712869)
+TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID: 742 uncompressed, 297 on file (hash 3154673526)
+TH1F /run_311321/top/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 1589876658)
+TH1F /run_311321/top/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 1382455216)
+TH1F /run_311321/top/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash 1313380230)
+TH1F /run_311321/top/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash 1105958788)
+TH1F /run_311321/OneRing/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 1589876658)
+TH1F /run_311321/OneRing/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 1382455216)
+TH1F /run_311321/OneRing/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash 1313380230)
+TH1F /run_311321/OneRing/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash 1105958788)
+TH1F /run_311321/top/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash 255957623)
+TH1F /run_311321/top/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 457873993)
+TH1F /run_311321/OneRing/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash 255957623)
+TH1F /run_311321/OneRing/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 457873993)
+TH1F /run_311321/top/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1193447169)
+TH1F /run_311321/top/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1087475456)
+TH1F /run_311321/OneRing/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1193447169)
+TH1F /run_311321/OneRing/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1087475456)
+TH1F /run_311321/top/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash 2649579799)
+TH1F /run_311321/top/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 325411073)
+TH1F /run_311321/top/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash 2543345942)
+TH1F /run_311321/top/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 219177216)
+TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash 2649579799)
+TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 325411073)
+TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash 2543345942)
+TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 219177216)
+TH1F /run_311321/top/Keys/c_layer2: 952 uncompressed, 236 on file (hash 1161596241)
+TH1F /run_311321/top/Keys/c_layer1: 952 uncompressed, 236 on file (hash 955944271)
+TH1F /run_311321/OneRing/Keys/c_layer2: 952 uncompressed, 236 on file (hash 1161596241)
+TH1F /run_311321/OneRing/Keys/c_layer1: 952 uncompressed, 236 on file (hash 955944271)
+TH2F /run_311321/top/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1684713683)
+TH2F /run_311321/top/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1574678738)
+TH2F /run_311321/OneRing/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1684713683)
+TH2F /run_311321/OneRing/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1574678738)
+TH1F /run_311321/top/Layer/c_layer2: 581 uncompressed, 228 on file (hash 972643678)
+TH1F /run_311321/top/Layer/c_layer1: 581 uncompressed, 228 on file (hash 866999645)
+TH1F /run_311321/OneRing/Layer/c_layer2: 581 uncompressed, 228 on file (hash 972643678)
+TH1F /run_311321/OneRing/Layer/c_layer1: 581 uncompressed, 228 on file (hash 866999645)
+TH1F /run_311321/top/Eta/c_1: 576 uncompressed, 222 on file (hash 3689175917)
+TH1F /run_311321/top/Eta/c_0: 576 uncompressed, 222 on file (hash 3583466348)
+TH1F /run_311321/OneRing/Eta/c_1: 576 uncompressed, 222 on file (hash 3689175917)
+TH1F /run_311321/OneRing/Eta/c_0: 576 uncompressed, 222 on file (hash 3583466348)
+TH1F /run_311321/top/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1244158600)
+TH1F /run_311321/top/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1138907783)
+TH1F /run_311321/top/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1138776711)
+TH1F /run_311321/top/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1033525894)
+TH1F /run_311321/OneRing/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1244158600)
+TH1F /run_311321/OneRing/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1138907783)
+TH1F /run_311321/OneRing/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1138776711)
+TH1F /run_311321/OneRing/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1033525894)
diff --git a/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
index 00860339c6edbbfc7bc076938d9199fbb90cdf73..58266754b72a77ad7a9e4227a9c5775e495453de 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
@@ -32,12 +32,12 @@ atlas_add_library( DataModelTestDataCommonLib
                    PUBLIC_HEADERS DataModelTestDataCommon
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES AthContainers AthenaKernel xAODCore xAODTrigger EventInfo GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks StoreGateLib AthenaBaseComps AthenaPoolUtilities )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks StoreGateLib AthenaBaseComps AthenaPoolUtilities RegistrationServicesLib )
 
 atlas_add_component( DataModelTestDataCommon
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks DataModelAthenaPoolLib AthenaKernel xAODCore GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests TrigSteeringEvent DataModelTestDataCommonLib PersistentDataModel )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks DataModelAthenaPoolLib AthenaKernel xAODCore GaudiKernel AthenaBaseComps AthenaKernel CxxUtils StoreGateLib SGtests TrigSteeringEvent DataModelTestDataCommonLib PersistentDataModel RegistrationServicesLib )
 
 atlas_add_dictionary( DataModelTestDataCommonDict
                       DataModelTestDataCommon/DataModelTestDataCommonDict.h
diff --git a/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt
index b64d1aa21b442e66b47cf20a90a56befd97f63bc..6c2c91a569fb58012560c6911371f6f07c8e61b4 100644
--- a/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataWriteCnv/CMakeLists.txt
@@ -20,20 +20,20 @@ atlas_add_library( DataModelTestDataWriteCnv
                    DataModelTestDataWriteCnv/CLinksAOD_p1.h
                    INTERFACE
                    PUBLIC_HEADERS DataModelTestDataWriteCnv
-                   LINK_LIBRARIES DataModelAthenaPool )
+                   LINK_LIBRARIES DataModelAthenaPoolLib )
 
 # Component(s) in the package:
 atlas_add_poolcnv_library( DataModelTestDataWriteCnvPoolCnv
                            src/*.cxx
                            FILES DataModelTestDataWrite/BVec.h DataModelTestDataWrite/BDer.h DataModelTestDataWrite/DVec.h DataModelTestDataWrite/DDer.h DataModelTestDataWrite/ELVec.h DataModelTestDataWrite/G.h DataModelTestDataWrite/GVec.h DataModelTestDataWrite/GAuxContainer.h DataModelTestDataWrite/H.h DataModelTestDataWrite/HVec.h DataModelTestDataWrite/HAuxContainer.h DataModelTestDataWrite/HView.h DataModelTestDataCommon/BAux.h DataModelTestDataCommon/BAuxVec.h DataModelTestDataCommon/BAuxStandalone.h DataModelTestDataCommon/C.h DataModelTestDataCommon/CVec.h DataModelTestDataCommon/CAuxContainer.h DataModelTestDataCommon/CView.h DataModelTestDataCommon/CVecWithData.h DataModelTestDataCommon/CInfoAuxContainer.h DataModelTestDataCommon/CTrigAuxContainer.h DataModelTestDataCommon/S1.h DataModelTestDataCommon/S2.h DataModelTestDataCommon/CLinks.h DataModelTestDataCommon/CLinksContainer.h DataModelTestDataCommon/CLinksAuxInfo.h DataModelTestDataCommon/CLinksAuxContainer.h DataModelTestDataCommon/CLinksAOD.h
                            TYPES_WITH_NAMESPACE DMTest::BVec DMTest::DVec DMTest::DDer DMTest::BDer DMTest::ELVec DMTest::BAux DMTest::BAuxVec DMTest::BAuxStandalone DMTest::C DMTest::CVec DMTest::CAuxContainer DMTest::G DMTest::GVec DMTest::GAuxContainer DMTest::CVecWithData DMTest::CInfoAuxContainer DMTest::CTrigAuxContainer DMTest::CView DMTest::H DMTest::HVec DMTest::HAuxContainer DMTest::HView DMTest::S1 DMTest::S2 DMTest::CLinks DMTest::CLinksContainer DMTest::CLinksAuxInfo DMTest::CLinksAuxContainer DMTest::CLinksAOD
-                           LINK_LIBRARIES AthenaPoolUtilities DataModelTestDataCommonLib DataModelTestDataWriteLib AthenaPoolCnvSvcLib )
+                           LINK_LIBRARIES AthenaPoolUtilities DataModelTestDataCommonLib DataModelTestDataWriteLib AthenaPoolCnvSvcLib DataModelTestDataWriteCnv )
 
 
 atlas_add_dictionary( DataModelTestDataWriteCnvDict
                       DataModelTestDataWriteCnv/DataModelTestDataWriteCnvDict.h
                       DataModelTestDataWriteCnv/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelTestDataCommonLib
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModelTestDataCommonLib DataModelTestDataWriteCnv
                       NO_ROOTMAP_MERGE )
 
diff --git a/Control/SGComps/src/AddressRemappingSvc.cxx b/Control/SGComps/src/AddressRemappingSvc.cxx
index 7b32bc050eb9898af8e4f9d11c287ee6a2205e36..fcc927bb5579288dd146c75b1474e3b2f9836fda 100644
--- a/Control/SGComps/src/AddressRemappingSvc.cxx
+++ b/Control/SGComps/src/AddressRemappingSvc.cxx
@@ -465,6 +465,9 @@ void AddressRemappingSvc::initDeletes()
       // on everything being read.
       if (alg->name() == "SGInputLoader") continue;
 
+      // Also ignore ViewDataVerifier algs, since they have no real output
+      if (alg->type() == "AthViews::ViewDataVerifier" ) continue;
+
       for (const DataObjID& dobj : alg->outputDataObjs()) {
         static const std::string pref = "StoreGateSvc+";
         if (dobj.key().substr (0, pref.size()) == pref) {
diff --git a/DataQuality/DQDefects/python/ids.py b/DataQuality/DQDefects/python/ids.py
index 09cd0033388b9ccc4236518a0639ec9d7fbba630..6befeb8ddecc93be0a2381e0fe6ad2a63de2c53f 100644
--- a/DataQuality/DQDefects/python/ids.py
+++ b/DataQuality/DQDefects/python/ids.py
@@ -10,6 +10,10 @@ from .exceptions import (DefectUnknownError,
                          InvalidLogicTagError)
 
 import six
+if six.PY2:
+    def _decode (s): return s.decode('utf-8')
+else:
+    def _decode (s): return s
 
 
 class DefectIDBitfield(Structure):
@@ -229,7 +233,7 @@ class DefectsDBIDsNamesMixin(object):
         description
         """
         get_desc = self.defects_folder.channelDescription
-        return dict((channel, get_desc(self.defect_chan_as_id(channel)).decode('utf-8'))
+        return dict((channel, _decode (get_desc(self.defect_chan_as_id(channel))))
                      for channel in channels)
                      
     def get_virtual_channel_descriptions(self, channels):
@@ -238,7 +242,7 @@ class DefectsDBIDsNamesMixin(object):
         descriptiondefect_id
         """
         get_desc = self.defect_logic_folder.channelDescription
-        return dict((channel, get_desc(self.defect_chan_as_id(channel)).decode('utf-8'))
+        return dict((channel, _decode(get_desc(self.defect_chan_as_id(channel))))
                     for channel in channels)
 
     @property
diff --git a/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp b/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp
index 20db346963ba19f0260936ba1b3eac9672738408..ee5faecda20afd8df9e339679bfd944a124520fe 100644
--- a/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp
+++ b/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.cpp
@@ -14,10 +14,12 @@
 #include "TTree.h"
 #include "TBranch.h"
 
+#include <iostream>
+
 using namespace pool;
 using namespace std;
 
-RootTreeIndexContainer::RootTreeIndexContainer() : RootTreeContainer(), m_index_ref(nullptr), m_index_foreign(nullptr), m_index_multi(0), m_index(nullptr) {
+RootTreeIndexContainer::RootTreeIndexContainer() : RootTreeContainer(), m_index_ref(nullptr), m_index_entries(0), m_index_multi(0), m_index(nullptr) {
    m_index = new long long int;
    m_index_multi = getpid();
 }
@@ -31,17 +33,10 @@ RootTreeIndexContainer::~RootTreeIndexContainer() {
 long long int RootTreeIndexContainer::nextRecordId()    {
    long long int s = m_index_multi;
    s = s << 32;
-   if (m_tree != nullptr) {
-      if (m_index_foreign != nullptr) {
-         s += m_index_foreign->GetEntries();
-      } else {
-         m_index_foreign = (TBranch*)m_tree->GetBranch("index_ref");
-         if (m_index_foreign != nullptr) {
-            s += m_index_foreign->GetEntries();
-         } else {
-            s += RootTreeContainer::nextRecordId();
-         }
-      }
+   if (m_tree->GetBranch("index_ref") != nullptr) {
+      s += m_index_entries;
+   } else {
+      s += RootTreeContainer::nextRecordId();
    }
    return s;
 }
@@ -49,27 +44,30 @@ long long int RootTreeIndexContainer::nextRecordId()    {
 
 DbStatus RootTreeIndexContainer::writeObject(ActionList::value_type& action) {
    long long int s = 0;
-   if( isBranchContainer() ) {
+   if (isBranchContainer()) {
       TBranch * pBranch = m_tree->GetBranch(m_branchName.c_str());
       if (pBranch != nullptr) s = pBranch->GetEntries();
    } else {
       s = m_tree->GetEntries();
    }
-   if (m_index_ref  == nullptr && m_index_foreign == nullptr) {
-      if (m_tree->GetBranch("index_ref") == nullptr) {
-         m_index_ref = (TBranch*)m_tree->Branch("index_ref", m_index);
-      } else {
-         m_index_foreign = (TBranch*)m_tree->GetBranch("index_ref");
-      }
+   if (m_index_ref == nullptr && m_tree->GetBranch("index_ref") == nullptr) {
+      m_index_ref = (TBranch*)m_tree->Branch("index_ref", m_index);
    }
    if (m_index_ref != nullptr && s >= m_index_ref->GetEntries()) {
       *m_index = this->nextRecordId();
       m_index_ref->SetAddress(m_index);
-      if( isBranchContainer() && !m_treeFillMode ) m_index_ref->Fill();
+      if (isBranchContainer() && !m_treeFillMode) m_index_ref->Fill();
+   }
+   if (isBranchContainer() && !m_treeFillMode) {
+      m_tree->SetEntries(s);
+      m_index_entries++;
    }
-   if( isBranchContainer() && !m_treeFillMode ) m_tree->SetEntries(s);
    DbStatus status = RootTreeContainer::writeObject(action);
-   if( isBranchContainer() && !m_treeFillMode ) m_tree->SetEntries(s + 1);
+   if (isBranchContainer() && !m_treeFillMode) {
+      m_tree->SetEntries(s + 1);
+   } else {
+      m_index_entries++;
+   }
    return status;
 }
 
diff --git a/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.h b/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.h
index 736e52f3f8ad7fe8fa71e8764be155ca3a1afba5..158839e8223aa6aaf92f24fc7a132c67ee41afe0 100644
--- a/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.h
+++ b/Database/APR/RootStorageSvc/src/RootTreeIndexContainer.h
@@ -61,7 +61,7 @@ namespace pool {
    private:
       /// Pointer to index branch
       TBranch* m_index_ref;
-      TBranch* m_index_foreign;
+      long long int m_index_entries;
       /// Index multiplier (e.g. pid - ppid), fill in c'tor
       int m_index_multi;
       /// Index (64 bit)
diff --git a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
index 8a2bb85e48e594287bff31a7a754df7a35084069..43ee27d70338b8c48ea05aa061609c4240736097 100755
--- a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
+++ b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
@@ -427,11 +427,11 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 
   StatusCode sc = m_inputStore->retrieve(cont, contEnd);
   if (!sc.isSuccess()) {
-    ATH_MSG_DEBUG("Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data");
+    ATH_MSG_DEBUG("processInputFileMetaData: Could not retrieve IOVMetaDataContainer objects from InputMetaDataStore - cannot process input file meta data");
     return StatusCode::SUCCESS;
   }
 
-  ATH_MSG_DEBUG("Retrieved from IOVMetaDataContainer(s) from InputMetaDataStore");
+  ATH_MSG_DEBUG("processInputFileMetaData: Retrieved from IOVMetaDataContainer(s) from InputMetaDataStore");
 
   // For each container, merge its contents into the MetaDataStore 
   unsigned int ncolls    = 0;
@@ -457,7 +457,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
     for (SG::ObjectWithVersion<IOVMetaDataContainer>& obj : allVersions) {
       const IOVPayloadContainer*  payload = obj.dataObject->payloadContainer();
 
-      ATH_MSG_DEBUG("New container: payload size " << payload->size() << " version key " << obj.versionedKey);
+      ATH_MSG_DEBUG("processInputFileMetaData: New container: payload size " << payload->size() << " version key " << obj.versionedKey);
 
       // detailed printout before merge
       if (msgLvl(MSG::VERBOSE)) {
@@ -481,7 +481,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
         
     // Detailed printout
     if (msgLvl(MSG::DEBUG)) {
-      ATH_MSG_DEBUG("Current payload before merge " << contMaster->folderName());
+      ATH_MSG_DEBUG("processInputFileMetaData: Current payload before merge " << contMaster->folderName());
       IOVPayloadContainer::const_iterator itColl1    = contMaster->payloadContainer()->begin();
       IOVPayloadContainer::const_iterator itCollEnd1 = contMaster->payloadContainer()->end();
       std::ostringstream stream;
@@ -513,7 +513,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
           StatusCode sc ATLAS_THREAD_SAFE =
             modifyPayload (contMaster->folderName(), coll);
           if (!sc.isSuccess()) {
-            ATH_MSG_ERROR("Could not modify the payload for folder " << contMaster->folderName());
+            ATH_MSG_ERROR("processInputFileMetaData: Could not modify the payload for folder " << contMaster->folderName());
             return StatusCode::FAILURE;
           }
         }
@@ -524,7 +524,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
           StatusCode sc ATLAS_THREAD_SAFE =
             modifyPayload (newCont4Sid->folderName(), coll);
           if (!sc.isSuccess()) {
-            ATH_MSG_ERROR("Could not modify the payload for folder " << newCont4Sid->folderName());
+            ATH_MSG_ERROR("processInputFileMetaData: Could not modify the payload for folder " << newCont4Sid->folderName());
             return StatusCode::FAILURE;
           }
         }
@@ -532,7 +532,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 	// Before starting merging, make a copy for newCont4Sid
 	CondAttrListCollection* collCopy = new CondAttrListCollection(*coll);
 
-	ATH_MSG_VERBOSE(" merge minRange: " << coll->minRange());
+	ATH_MSG_VERBOSE("processInputFileMetaData: merge minRange: " << coll->minRange());
 	if (!contMaster->merge(coll)) {
 	  // Did not merge it in - was a duplicate, so we need to delete it 
 	  delete coll;
@@ -544,7 +544,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 	  ATH_MSG_VERBOSE(" => merged ");
 	}
 
-	ATH_MSG_VERBOSE(" merge for MetaCont minRange: " << collCopy->minRange());
+	ATH_MSG_VERBOSE("processInputFileMetaData:  merge for MetaCont minRange: " << collCopy->minRange());
 	if (!newCont4Sid->merge(collCopy)) {
 	  // Did not merge it in - was a duplicate, so we need to delete it 
 	  delete collCopy;
@@ -555,7 +555,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 	}
 
       }
-      ATH_MSG_DEBUG("Merged together containers for folder " << cont->folderName() << " ncoll/ndup " 
+      ATH_MSG_DEBUG("processInputFileMetaData: Merged together containers for folder " << cont->folderName() << " ncoll/ndup " 
 		    << ncolls << " " << ndupColls);
 
       // Check for consistency after merge
@@ -587,14 +587,14 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 
       // Insert the merged container into MetaCont
       if(fillMetaCont(fileName,newCont4Sid).isFailure()) {
-	ATH_MSG_ERROR("Failed to insert the merged IOVMetaDataContainer into MetaCont");
+	ATH_MSG_ERROR("processInputFileMetaData: Failed to insert the merged IOVMetaDataContainer into MetaCont");
 	return StatusCode::FAILURE;
       }
 
       // detailed printout after merge
       if (msgLvl(MSG::VERBOSE)) {
 	const IOVPayloadContainer*  payloadMaster = contMaster->payloadContainer();
-	ATH_MSG_VERBOSE("After merge, payload minRange ");
+	ATH_MSG_VERBOSE("processInputFileMetaData: After merge, payload minRange ");
 	if (payloadMaster) {
 	  // Loop over AttrColls and print out minRange
 	  IOVPayloadContainer::const_iterator itColl    = payloadMaster->begin();
@@ -610,13 +610,13 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
       
       // Detailed printout
       if (msgLvl(MSG::DEBUG)) {
-	ATH_MSG_DEBUG("Input payload " << cont->folderName());
+	ATH_MSG_DEBUG("processInputFileMetaData: Input payload " << cont->folderName());
 	std::ostringstream streamInp;
 	itColl    = payload->begin();
 	itCollEnd = payload->end();
 	for (; itColl != itCollEnd; ++itColl) (*itColl)->dump(streamInp);
 	ATH_MSG_DEBUG(streamInp.str());
-	ATH_MSG_DEBUG("Output payload " << contMaster->folderName());
+	ATH_MSG_DEBUG("processInputFileMetaData: Output payload " << contMaster->folderName());
 	std::ostringstream streamOut;
 	itColl    = contMaster->payloadContainer()->begin();
 	itCollEnd = contMaster->payloadContainer()->end();
@@ -626,7 +626,7 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
     }
   }
 
-  ATH_MSG_DEBUG("Total number of attribute collections  merged together " << ncolls
+  ATH_MSG_DEBUG("processInputFileMetaData: Total number of attribute collections  merged together " << ncolls
 		<< " Number of duplicate collections " << ndupColls);
   return StatusCode::SUCCESS;
 }
@@ -662,16 +662,25 @@ IOVDbMetaDataTool::overrideIOV (CondAttrListCollection*& coll) const
             ATH_MSG_ERROR("overrideIOV: old run number does not match. Old run number " << m_oldRunNumber << " IOVRange: " << testIOV);
             return StatusCode::SUCCESS;
         }
-        // Now over ride IOVs
-        if (iovSizeIsZero) { 
+
+        ATH_MSG_DEBUG("overrideIOV: overrideMinMaxRunNumber: " << (int)m_overrideMinMaxRunNumber
+                      << " overrideRunNumber " << (int)m_overrideRunNumber
+                      << " iovSizeIsZero: " << (int)iovSizeIsZero
+                      << " newRange " << newRange);
+        
+        // Now over ride IOVs - two cases: 1) single IOV for full collection, 2) IOVs for individual channels.
+        // Must treat the reset of collection IOV differently
+        if (iovSizeIsZero) {
             // Only add in overall range if channels do not have
             // IOVs - otherwise this is automatically calculated
+            coll->resetMinRange(); // must first reset to 'full range' and then reduce the IOVRange accordingly
             coll->addNewStart(newRange.start());
             coll->addNewStop (newRange.stop());
         }
         else {
             // Add in channels
             unsigned int nchans = coll->size();
+            ATH_MSG_DEBUG("overrideIOV: nchans " << nchans);
             for (unsigned int ichan = 0; ichan < nchans; ++ichan) {
                 // FIXME: O(N^2)!
                 CondAttrListCollection::ChanNum chan = coll->chanNum(ichan);
diff --git a/Event/xAOD/xAODJet/xAODJet/JetAttributes.h b/Event/xAOD/xAODJet/xAODJet/JetAttributes.h
index 564a3aca17d48790c2aa2de781f62a4ff7982160..36cc6d79cb1920a874dbff2238cd6a912da1ff6f 100644
--- a/Event/xAOD/xAODJet/xAODJet/JetAttributes.h
+++ b/Event/xAOD/xAODJet/xAODJet/JetAttributes.h
@@ -111,6 +111,7 @@ namespace xAOD {
 
       EMFrac,
       HECFrac,
+      PSFrac,
       EnergyPerSampling,
       FracSamplingMax,
       FracSamplingMaxIndex,
diff --git a/Event/xAOD/xAODJet/xAODJet/versions/JetAccessorMap_v1.h b/Event/xAOD/xAODJet/xAODJet/versions/JetAccessorMap_v1.h
index 41e41c0dd86f230e79f9d2b5d654d9dd26e41b8d..43e55aa791b92ad5c3dbc17ce7b6675a3ba9cd8b 100644
--- a/Event/xAOD/xAODJet/xAODJet/versions/JetAccessorMap_v1.h
+++ b/Event/xAOD/xAODJet/xAODJet/versions/JetAccessorMap_v1.h
@@ -118,6 +118,7 @@ namespace xAOD {
           JET_DEFINE_ATT_ACCESSOR( TrackWidthPt500 );
           JET_DEFINE_ATT_ACCESSOR( EMFrac );
           JET_DEFINE_ATT_ACCESSOR( HECFrac );
+          JET_DEFINE_ATT_ACCESSOR( PSFrac );
           JET_DEFINE_ATT_ACCESSOR( EnergyPerSampling );
           JET_DEFINE_ATT_ACCESSOR( FracSamplingMax );
           JET_DEFINE_ATT_ACCESSOR( FracSamplingMaxIndex );
diff --git a/ForwardDetectors/AFP/AFP_Monitoring/AFP_Monitoring/AFPSiLayerMonitor.h b/ForwardDetectors/AFP/AFP_Monitoring/AFP_Monitoring/AFPSiLayerMonitor.h
index ff4fd1da34af95271733ac9eb739a6a3bc0d4b3c..9ad3a50de13925165e916b9aabb49f3badc86567 100644
--- a/ForwardDetectors/AFP/AFP_Monitoring/AFP_Monitoring/AFPSiLayerMonitor.h
+++ b/ForwardDetectors/AFP/AFP_Monitoring/AFP_Monitoring/AFPSiLayerMonitor.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 AFP_MONITORING_AFPSILAYERMONITOR_H
@@ -103,7 +103,7 @@ public:
   /// * \f$ n_{\textrm{obs}} \f$ - is observed/measured number of hits i.e. NOT corrected for pile-up
   /// * \f$ a \f$ - is a correction factor #m_hitsScaleFactor
   /// * \f$ \mu \f$ - is an average number of interactions in a bunch crossing (pile-up)
-  double correctHitsForPileUp (double hits) const;
+  virtual double correctHitsForPileUp (double hits) const override;
 
   /// @copybrief IAFPSiLayerMonitor::hitsInEvent()
   ///
diff --git a/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py b/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py
index 639fda34aebf178850e73e54ba23f29fb94bf317..fc25b256205caef7e43bb62327b6a26cca63e545 100644
--- a/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py
+++ b/ForwardDetectors/AFP/Run3AFPMonitoring/python/Run3AFPExampleMonitorAlgorithm.py
@@ -48,9 +48,14 @@ def Run3AFPExampleMonitoringConfig(inputFlags):
     array.defineHistogram('timeOverThreshold', type='TH1F', title='1D Time over threshold for {0} Layer {1};timeOverThreshold', path='SiTimeOverThreshold', xbins=60, xmin=0, xmax=20)
     array.defineHistogram('clusterX,clusterY', title='Cluster position in station {0} Layer {1};clusterX;clusterY', type='TH2F', path='Cluster', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)
 
+
+    array = helper.addArray([combinedList], afpSiLayerAlgorithm, 'AFPSiLayerTool', topPath='AFP/Track/')
+    array.defineHistogram('trackX,trackY', title='Track posistion position in station {0};trackX;trackY', type='TH2F', path='Track', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)
+
+
+
     arrayOneList = helper.addArray([combinedList], afpToFAlgorithm, 'AFPToFTool', topPath='AFP/ToF/')
     arrayOneList.defineHistogram('trainID,barInTrainID', title='ToF hit bar vs train {0};trainID;barInTrainID', type='TH2F', path='HitBarvsTrain/',xbins=4,xmin=-0.5,xmax=3.5,ybins=4,ymin=-0.5,ymax=3.5)
-    arrayOneList.defineHistogram('trackX,trackY', title='Track posistion position in station {0};trackX;trackY', type='TH2F', path='Track', xbins=80, xmin=0.5, xmax=80.5, ybins=336, ymin=0.5, ymax=336.5)   
 
     # Finalize. The return value should be a tuple of the ComponentAccumulator
     return helper.result()
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/CMakeLists.txt b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/CMakeLists.txt
index de0398fd2c5e9b36673c323fa2e1a5468e2a9872..a3d5e516bb8d82507da6f2512ea551c3238324c2 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/CMakeLists.txt
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/CMakeLists.txt
@@ -28,7 +28,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Tools/PyJobTransformsCore )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( ROOT COMPONENTS MathCore Core Tree Hist RIO pthread )
 
@@ -36,8 +35,8 @@ find_package( ROOT COMPONENTS MathCore Core Tree Hist RIO pthread )
 atlas_add_component( SCT_CalibAlgs
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier EventInfo GaudiKernel SCT_ConditionsData InDetIdentifier SCT_CablingLib InDetRawData InDetReadoutGeometry SCT_ReadoutGeometry PathResolver )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests AthenaPoolUtilities Identifier EventInfo GaudiKernel SCT_ConditionsData InDetIdentifier SCT_CablingLib InDetRawData InDetReadoutGeometry SCT_ReadoutGeometry PathResolver )
 
 # Install files from the package:
 atlas_install_headers( SCT_CalibAlgs )
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h
index f56a6dd46cdacaf8269311e27cfb78ccd9831abd..0363bdc0a70bd95630dda21d8a39d23ec0090eef 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/ISCT_CalibModuleListTool.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
 */
 
 /**
@@ -17,7 +17,7 @@
 #include "GaudiKernel/IAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 
-// STL and boost headers
+// STL headers
 #include <string>
 #include <vector>
 #include <set>
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
index 62a4b02258629910d236063224992bc877292be2..42c3f20764746a82cbc2cab3f2d73d1c60eac2e7 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/SCT_CalibAlgs/SCTCalib.h
@@ -46,7 +46,7 @@
 // Gaudi
 #include "GaudiKernel/ToolHandle.h" //member
 
-// STL and boost headers
+// STL headers
 #include <string>
 #include <vector>
 #include <utility>
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
index ff7ca24e6f1bc80fde16c96cf28d107e1fcd8f80..1da9dd6b2b0b7c64a7389b8dbb7c6d5e49ac893d 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
@@ -48,8 +48,7 @@
 #include "TMath.h"
 #include "Math/ProbFuncMathCore.h"
 
-//STL, boost
-#include <boost/lexical_cast.hpp>
+#include <array>
 
 using namespace SCT_CalibAlgs;
 using namespace std;
@@ -1762,20 +1761,20 @@ StatusCode SCTCalib::getBSErrors ATLAS_NOT_THREAD_SAFE () {
    typedef std::map<int, std::string> IntStringMap;
    IntStringMap ErrMap_C, ErrMap;
    const int numberOfErrorTypes{12};
-   boost::array<std::string, numberOfErrorTypes> errorNames = {{
+   std::array<std::string, numberOfErrorTypes> errorNames = {{
          "ByteStreamParseError","TimeOutError","BCIDError","LVL1IDError","PreambleError","FormatterError",
          "ABCDError","RawError","MaskedLink","RODClockError",
          "TruncatedROD","ROBFragmentError"
       }
    };
    //
-   boost::array<std::string, numberOfErrorTypes> errorNames_C = {{
+   std::array<std::string, numberOfErrorTypes> errorNames_C = {{
          "ByteStreamParseError","TimeOutError","BCIDError","LVL1IDError","PreambleError","FormatterError",
          "ABCDError","RawError","MaskedLink","RODClockError",
          "TruncatedROD","ROBFragmentError"
       }
    };
-   boost::array<int, numberOfErrorTypes> errorValues = {{0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14}};
+   std::array<int, numberOfErrorTypes> errorValues = {{0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14}};
    //should do compile time check to ensure the sizes are equal.
    ErrMap_C.clear();
    for (int indx{0}; indx!=numberOfErrorTypes; ++indx) {
@@ -1788,10 +1787,10 @@ StatusCode SCTCalib::getBSErrors ATLAS_NOT_THREAD_SAFE () {
 
    //--- Directory in HIST
    const int N_ENDCAPS{2};
-   boost::array<std::string, N_ENDCAPS> detectorStems = {{"/run_" + std::to_string(m_runNumber.value()) + "/SCT/SCTEC/errors/", "/run_" + std::to_string(m_runNumber.value()) + "/SCT/SCTEA/errors/"}}; //barrel stem unused here
-   boost::array<IntStringMap::iterator, N_ENDCAPS> detectorIterators = {{ErrMap_C.begin(), ErrMap.begin()}};
-   boost::array<IntStringMap::iterator, N_ENDCAPS> detectorIteratorsE = {{ErrMap_C.end(), ErrMap.end()}};
-   boost::array<std::string, N_ENDCAPS> detectorParts = {{"EC", "EA"}};
+   std::array<std::string, N_ENDCAPS> detectorStems = {{"/run_" + std::to_string(m_runNumber.value()) + "/SCT/SCTEC/errors/", "/run_" + std::to_string(m_runNumber.value()) + "/SCT/SCTEA/errors/"}}; //barrel stem unused here
+   std::array<IntStringMap::iterator, N_ENDCAPS> detectorIterators = {{ErrMap_C.begin(), ErrMap.begin()}};
+   std::array<IntStringMap::iterator, N_ENDCAPS> detectorIteratorsE = {{ErrMap_C.end(), ErrMap.end()}};
+   std::array<std::string, N_ENDCAPS> detectorParts = {{"EC", "EA"}};
    std::string defecttype{""};
    std::string n_defect{""};
    int n_errorLink{0};
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
index 2e85c7d8972fe117ad04f300017982c0c2bce51e..2d2d35aeab173f81fcfa05ec49e95f9492c83510 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalibWriteTool.cxx
@@ -38,7 +38,6 @@
 #include <sstream>
 #include <iostream>
 #include <istream>
-#include <boost/lexical_cast.hpp>
 
 using std::string;
 /////////////////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx
index 58fc2d50e646deaae52bbc5b8a3807050eef45c9..08241145474404a5fb8f4183d51b87842ecef458 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibLbTool.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
 */
 
 
@@ -33,8 +33,6 @@
 #include "TFile.h"
 #include "TMath.h"
 
-#include <boost/lexical_cast.hpp>
-
 using namespace std;
 using namespace SCT_CalibAlgs;
 
@@ -131,7 +129,7 @@ SCT_CalibLbTool::book() {
       ////
       for (int iChip(0); iChip!=n_chipsPerSide; ++iChip) {
          int chipId{m_pSCTHelper->side(waferId)==0 ? iChip:iChip+n_chipsPerSide};
-         const string formattedChipPosition{formattedPosition + boost::lexical_cast<string>(chipId)};
+         const string formattedChipPosition{formattedPosition + std::to_string(chipId)};
          const string hname{pathRoot + detectorPaths[bec2Index(bec)] + "/" + formattedChipPosition};
          const string histTitle{string{"SCT"} + detectorNames[bec2Index(bec)] + string{" LB: chip "} + formattedChipPosition};
          TH1F* hist_tmp{new TH1F{TString{formattedChipPosition}, TString{histTitle}, m_LbRange, 0.5, m_LbRange+0.5}};
@@ -181,7 +179,7 @@ SCT_CalibLbTool::read(const std::string& fileName) {
       ////
       for (int iChip{0}; iChip!=n_chipsPerSide; ++iChip) {
          int chipId{m_pSCTHelper->side(waferId)==0 ? iChip : iChip+n_chipsPerSide};
-         const string hname{detectorPaths[bec2Index(bec)] + "/" + formattedPosition + boost::lexical_cast<string>(chipId)};
+         const string hname{detectorPaths[bec2Index(bec)] + "/" + formattedPosition + std::to_string(chipId)};
          TH1F* hist_tmp{static_cast<TH1F*>(fileLB->Get(hname.c_str()))};
          if (hist_tmp==nullptr) {
             ATH_MSG_ERROR("Error in reading LB histogram");
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h
index 72dc746509977169eb1db9dd243be58a29ce4eb3..8215af9fcd51fccebf00bfd55c71e6a8bccc2740 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibModuleListTool.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
 */
 
 /**
@@ -22,7 +22,7 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 
-// STL and boost headers
+// STL headers
 #include <string>
 #include <vector>
 #include <set>
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx
index 6dd9213a986786aca7f821747cdbddea8862fa65..7f770ba69ce50f1386b1d5d7b0f989ec2d3c9683 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.cxx
@@ -17,33 +17,28 @@
 #include "InDetIdentifier/SCT_ID.h"
 #include "Identifier/Identifier.h"
 
-//STL, boost
-#include <boost/lexical_cast.hpp>
-
 namespace SCT_CalibAlgs {
 std::string
 eventInfoAsString(const EventInfo* theEvent) {
-   using boost::lexical_cast;
    using std::string;
    const EventID* e{theEvent->event_ID()};
    string result{string("[ Run, Event, Time, Lumi, Bunch ] = [ " )+
-                 lexical_cast<string>(e->run_number()) + ", " +
-                 lexical_cast<string>(e->event_number()) + ", "+
-                 lexical_cast<string>(e->time_stamp()) + ", "+
-                 lexical_cast<string>(e->lumi_block()) + ", "+
-                 lexical_cast<string>(e->lumi_block()) + " ] "};
+                 std::to_string(e->run_number()) + ", " +
+                 std::to_string(e->event_number()) + ", "+
+                 std::to_string(e->time_stamp()) + ", "+
+                 std::to_string(e->lumi_block()) + ", "+
+                 std::to_string(e->lumi_block()) + " ] "};
    return result;
 }//function end
 
 std::string
 formatPosition(const Identifier& waferId, const SCT_ID* helper, const std::string& delimiter, const bool includeSide) {
-   using boost::lexical_cast;
    using std::string;
-   string result{lexical_cast<string>(helper->barrel_ec(waferId))+delimiter};
-   result += lexical_cast<string>(helper->layer_disk(waferId))+delimiter;
-   result += lexical_cast<string>(helper->phi_module(waferId))+delimiter;
-   result += lexical_cast<string>(helper->eta_module(waferId));
-   if (includeSide) result += (delimiter+lexical_cast<string>(helper->side(waferId)));
+   string result{std::to_string(helper->barrel_ec(waferId))+delimiter};
+   result += std::to_string(helper->layer_disk(waferId))+delimiter;
+   result += std::to_string(helper->phi_module(waferId))+delimiter;
+   result += std::to_string(helper->eta_module(waferId));
+   if (includeSide) result += (delimiter+std::to_string(helper->side(waferId)));
    return result;
 }//function end
 
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h
index 8e6e1e0053dfc05e2a4e63fd3a3758ee2db8b0a7..cac6d19058aab7d1a290f3a8cc9478c94d28f70f 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.h
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibUtilities.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
 */
 
 /**
@@ -12,8 +12,8 @@
 #ifndef SCT_CalibAlgs_SCT_CalibUtilities_h
 #define SCT_CalibAlgs_SCT_CalibUtilities_h
 
+#include <sstream>
 #include <string>
-#include <boost/lexical_cast.hpp>
 
 class Identifier;
 class SCT_ID;
@@ -35,9 +35,9 @@ std::string xmlValue(const std::string& name, const T value) {
 
 template <class T>
 std::string xmlOpenChannel(const long id, const T since, const T until) {
-   std::string opener=std::string{"  <channel id=\""}+boost::lexical_cast<std::string>(id)+"\"";
-   std::string sinceAttr=std::string{" since=\""}+boost::lexical_cast<std::string>(since)+"\"";
-   std::string untilAttr=std::string{" until=\""}+boost::lexical_cast<std::string>(until)+"\"";
+   std::string opener=std::string{"  <channel id=\""}+std::to_string(id)+"\"";
+   std::string sinceAttr=std::string{" since=\""}+std::to_string(since)+"\"";
+   std::string untilAttr=std::string{" until=\""}+std::to_string(until)+"\"";
    return opener+sinceAttr+untilAttr+">";
 }
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/IdentifierSet.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/IdentifierSet.h
index d1c357998e43a0da19fb4cadb3ef83c425d907ab..6b9069238d0a02ad93549c35801c89879554cd0b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/IdentifierSet.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/IdentifierSet.h
@@ -1,16 +1,23 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef IdentifierSet_h
 #define IdentifierSet_h
 
-#include <set>
 #include "Identifier/Identifier.h"
 
+/**
+ * @typedef IdentifierSet
+ * @brief IdentifierSet is std::set of Identifier and used in SCT_RODVetoCondAlg
+ * and SCT_RODVetoTool. CLASS_DEF is necessary to be recorded in StoreGate.
+ **/
+
 typedef std::set<Identifier> IdentifierSet;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( IdentifierSet , 229132278 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_AllGoodStripInfo.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_AllGoodStripInfo.h
index 86f399c95728f117666439c33d35f505b9bdec51..1cba446aae14f33502d84a3a1b0b85bf94944c35 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_AllGoodStripInfo.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_AllGoodStripInfo.h
@@ -1,11 +1,14 @@
+// -*- 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
 */
 
 /**
  * SCT_AllGoodStripInfo.h
  * @file header file for data object for good strips for all wafers
- * @author Susumu Oda - 24/11/2017
+ * @author Susumu Oda
+ * @date 24/11/2017
  **/
 
 #ifndef SCT_ALLGOODSTRIPINFO_H
@@ -16,12 +19,19 @@
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<SCT_WaferGoodStripInfo, SCT_ConditionsData::NUMBER_OF_WAFERS> SCT_AllGoodStripInfo;
+/**
+ * @typedef SCT_AllGoodStripInfo
+ * @brief SCT_AllGoodStripInfo is std::array of SCT_WaferGoodStripInfo
+ * and is used in SCT_ReadCalibDataCondAlg and SCT_ReadCalibDataTool.
+ **/
+
+typedef std::array<SCT_WaferGoodStripInfo, SCT_ConditionsData::NUMBER_OF_WAFERS> SCT_AllGoodStripInfo;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_AllGoodStripInfo , 140934533 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_AllGoodStripInfo, 7553175 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h
index a3d07330b30f8f6782935139b0b318257d9c1ab4..697c6b0e44f6aaae427c92588b5f03a1659811b6 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ByteStreamErrors.h
@@ -1,20 +1,26 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_ByteStreamErrors.h
- * Define SCT byte stream errors
+ * @brief Define SCT byte stream errors and utility methods.
  * @author Susumu.Oda@cern.ch
  **/
 
 #ifndef SCT_ByteStreamErrors_h
 #define SCT_ByteStreamErrors_h
 
-#include <vector>
 #include <array>
+#include <vector>
 
-// http://stackoverflow.com/questions/21456262/enum-to-string-in-c11
+/**
+ * @def SCT_ERRORTYPELIST
+ * @brief For enum to string conversion
+ * http://stackoverflow.com/questions/21456262/enum-to-string-in-c11
+ **/
 #ifndef SCT_ERRORTYPELIST
 #define SCT_ERRORTYPELIST(XYZ) \
   XYZ(ByteStreamParseError)    \
@@ -64,16 +70,26 @@
 #endif // SCT_DO_DESCRIPTION
 
 namespace SCT_ByteStreamErrors {
-  // Define enumerators
+  /**
+   * @enum ErrorType
+   * @brief SCT byte stream error type enums used in SCT_RodDecoder,
+   * SCT_ByteStreamErrorsTool, SCTErrMonAlg.
+   **/
   enum ErrorType {
     SCT_ERRORTYPELIST(SCT_DO_ENUM)
   };
-  // Define strings of enumerator
+  /**
+   * @var ErrorTypeDescription
+   * @brief SCT byte stream error type strings used in SCTErrMonAlg.
+   **/
   static const std::vector<std::string> ErrorTypeDescription = {
     SCT_ERRORTYPELIST(SCT_DO_DESCRIPTION)
   };
-
-  // Define bad errors to be used in reconstruction and monitoring
+  /**
+   * @var BadErrors
+   * @brief Bad error enums used in SCT_ByteStreamErrorsTool
+   * and SCTErrMonAlg.
+   **/
   static const std::vector<ErrorType> BadErrors = {
     TimeOutError,
     BCIDError,
@@ -85,8 +101,10 @@ namespace SCT_ByteStreamErrors {
     MissingLinkHeaderError,
     MaskedROD
   };
-
-  // Define bad errors in FE-link level to be used in monitoring
+  /**
+   * @var LinkLevelBadErrors
+   * @brief Bad error enums in FE-link level used in SCTErrMonAlg.
+   **/
   static const std::vector<ErrorType> LinkLevelBadErrors = {
     TimeOutError,
     BCIDError,
@@ -94,14 +112,20 @@ namespace SCT_ByteStreamErrors {
     HeaderTrailerLimitError,
     MaskedLink
   };
-  // Define bad errors in ROD level to be used in monitoring
+  /**
+   * @var RodLevelBadErrors
+   * @brief Bad error enums in ROD level used in SCTErrMonAlg.
+   **/
   static const std::vector<ErrorType> RodLevelBadErrors = {
     TruncatedROD,
     ROBFragmentError,
     MissingLinkHeaderError, // We cannot know which FE-link does not have header. We assign this error to all the FE-links of the ROD.
     MaskedROD
   };
-  // Define errors in FE-link level to be used in monitoring (assigned by SCT_RodDecoder::addSingleError)
+  /**
+   * @var LinkLevelErrors
+   * @brief Error enums in FE-link level used in SCTErrMonAlg (assigned by SCT_RodDecoder::addSingleError)
+   **/
   static const std::vector<ErrorType> LinkLevelErrors = {
     ByteStreamParseError,
     TimeOutError,
@@ -132,7 +156,10 @@ namespace SCT_ByteStreamErrors {
     TempMaskedChip5,
     ABCDError_Error7
   };
-  // Define errors in ROD level to be used in monitoring (assigned by SCT_RodDecoder::addRODError)
+  /**
+   * @var RodLevelErrors
+   * @brief Error enums in ROD level used in SCTErrMonAlg (assigned by SCT_RodDecoder::addRODError)
+   **/
   static const std::vector<ErrorType> RodLevelErrors = {
     RODClockError,
     TruncatedROD,
@@ -140,19 +167,22 @@ namespace SCT_ByteStreamErrors {
     MissingLinkHeaderError, // We cannot know which FE-link does not have header. We assign this error to all the FE-links of the ROD.
     MaskedROD
   };
-  template<ErrorType et>
-  static constexpr uint64_t maskUpTo() { return  ( uint64_t(1) << et ) - 1; }
+
+  template<ErrorType et> static constexpr uint64_t maskUpTo() { return  ( uint64_t(1) << et ) - 1; }
   static constexpr uint64_t ABCDErrorMask() { return maskUpTo<ABCDError_Error4>() & ~(maskUpTo<ABCDError_Chip0>()); }
   static constexpr uint64_t TempMaskedChipsMask() { return maskUpTo<TempMaskedChip5>() & ~(maskUpTo<TempMaskedChip0>()); }
   inline ErrorType TempMaskedChipToBit(int chip){ return std::array<ErrorType, 6>{{
-	  TempMaskedChip0,
-	  TempMaskedChip1,
-	  TempMaskedChip2,
-	  TempMaskedChip3,
-	  TempMaskedChip4,
-	  TempMaskedChip5}}[chip]; }
+         TempMaskedChip0,
+         TempMaskedChip1,
+         TempMaskedChip2,
+         TempMaskedChip3,
+         TempMaskedChip4,
+         TempMaskedChip5}}[chip]; }
 
-  // Ensure that the enums are available from ROOT
+  /**
+   * @struct ROOT6_NamespaceAutoloadHook
+   * @brief Ensure that the enums are available from ROOT
+   */
   struct ROOT6_NamespaceAutoloadHook{};
 }
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibDefectData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibDefectData.h
index 037b10456b2931072671c52fc3afef33b41b86b6..1442da0ee14b50746458d00c60144434a0a9d3b2 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibDefectData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibDefectData.h
@@ -1,24 +1,31 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_CalibDefectData.h
  * header file for data object
- * @author P. Johansson - 26/10/07
+ * @author P. Johansson
+ * @date 26/10/07
  **/
 
 #ifndef SCT_CALIBDEFECTDATA_H
 #define SCT_CALIBDEFECTDATA_H
 
-#include "AthenaKernel/CLASS_DEF.h"
-#include <map>
-#include <vector>
-#include <string>
-
 // Include Athena stuff
 #include "Identifier/Identifier.h"
 
+#include <map>
+#include <string>
+#include <vector>
+
+/**
+ * @class SCT_CalibDefectData
+ * @brief Container with a list of defects derived from calibration data
+ * and used in SCT_ReadCalibDataCondAlg and SCT_ReadCalibDataTool.
+ **/
 class SCT_CalibDefectData {
 public:
 
@@ -29,10 +36,10 @@ public:
     std::vector<float> parValue;
   } CalibModuleDefects;
 
-  // Constructor
+  /// Constructor
   SCT_CalibDefectData();
 
-  // Destructor
+  /// Destructor
   virtual ~SCT_CalibDefectData() = default;
 
   /// Add defects for a module
@@ -64,8 +71,11 @@ private:
 
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_CalibDefectData , 103608210, 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_CalibDefectData , 1073500 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ChargeTrappingCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ChargeTrappingCondData.h
index ca4fd1eaad845c3338581de9794fd921e055a3cd..ea3416c820df9c55d1c560ea66eac06a613bce22 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ChargeTrappingCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ChargeTrappingCondData.h
@@ -1,19 +1,26 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * SCT_ChargeTrappingCondData
- * @file header file for data object for SCT_ChargeTrappingTool
- * @author Susumu Oda - 14/05/2018
+ * @file header file for data object for SCT_ChargeTrappingTool, SCT_RadDamageSummaryTool, SCT_SurfaceChargesGenerator
+ * @author Susumu Oda
+ * @date 14/05/2018
  **/
 
 #ifndef SCT_CHARGETRAPPINGCONDDATA_H
 #define SCT_CHARGETRAPPINGCONDDATA_H
 
+/**
+ * @class SCT_ChargeTrappingCondData
+ * @brief Data object for SCT_ChargeTrappingTool, SCT_RadDamageSummaryTool, SCT_SurfaceChargesGenerator
+ **/
 class SCT_ChargeTrappingCondData
 {
- public:
+public:
   SCT_ChargeTrappingCondData();
   virtual ~SCT_ChargeTrappingCondData() = default;
 
@@ -39,7 +46,7 @@ class SCT_ChargeTrappingCondData
   void setTrappingPositionZ(const double trappingPosition);
   void setHoleDriftMobility(const double holeDriftMobility);
 
- private:
+private:
   double m_electricField;
   double m_meanFreePathElectrons;
   double m_meanFreePathHoles;
@@ -52,7 +59,7 @@ class SCT_ChargeTrappingCondData
   double m_holeDriftMobility;
 };
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_ChargeTrappingCondData , 70980446 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_Chip.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_Chip.h
index f00eee23fa5975e648bbc65deb5d877838382601..6c5dc9956c9d68bed964d5d999d084361bf016fa 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_Chip.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_Chip.h
@@ -1,32 +1,33 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_Chip.h
  * Header file storing infomration on the SCT chips: id, config, mask
  * @author Carl Gwilliam <gwilliam@mail.cern.ch>
-**/
+ **/
 
 #ifndef SCT_ConditionTools_SCT_Chip_h
 #define SCT_ConditionTools_SCT_Chip_h
 
-#include <iomanip>
-#include <cstdint>
-#include <vector>
-#include <string>
 #include <bitset>
+#include <cstdint>
+#include <iomanip>
 #include <iostream>
+#include <string>
+#include <vector>
 
 /**
  * @class SCT_Chip
- * Class which stores infomration on the SCT chips: id, config, mask
-**/
-
+ * @brief Class which stores infomration on the SCT chips: id, config, mask
+ **/
 class SCT_Chip {
 
-/** Outputstream operator for chip */
-friend std::ostream& operator<<(std::ostream& output, const SCT_Chip& chip);
+  /** Outputstream operator for chip */
+  friend std::ostream& operator<<(std::ostream& output, const SCT_Chip& chip);
  
 public:
 
@@ -81,7 +82,6 @@ private:
   bool                      m_end;         //!< Is chip an end
   bool                      m_master;      //!< Is chip a master
   std::bitset<nBitsMask>    m_mask;        //!< Chip strip mask 
-  //unsigned int              m_numMasked;   //!< Number of masked chips
 };
 
 /** Output stream for printing chip information*/
@@ -94,5 +94,4 @@ inline std::ostream& operator<<(std::ostream& output, const SCT_Chip& chip) {
   return output;
 }
 
-#endif
-
+#endif // SCT_ConditionTools_SCT_Chip_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CondParameterData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CondParameterData.h
index adfecbc59914f2d793a8dada632c8e1db6ede456..69159de1706ccb566a845d92ac4c91f8a362260d 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CondParameterData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CondParameterData.h
@@ -1,35 +1,43 @@
+// -*- 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
 */
 
 /**
- * SCT_CondParameterData.h
- * @file header file for data object
- * @author Susumu Oda - 2018-01-25
+ * @file SCT_CondParameterData.h
+ * @brief header file for data object for SCT_ConditionsParameterTool and SCT_ConditionsParameterCondAlg.
+ * @author Susumu Oda
+ * @date 2018-01-25
  **/
 
 #ifndef SCT_CONDPARAMETERDATA_H
 #define SCT_CONDPARAMETERDATA_H
 
-// STL include
-#include <vector>
-
-// boost include
-#include "boost/array.hpp"
+// Definition of the number of elements
+#include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
 // Athena includes
 #include "Identifier/IdentifierHash.h"
-#include "AthenaKernel/CLASS_DEF.h"
+
+// STL include
+#include <array>
+#include <vector>
+
+/**
+ * @class SCT_CondParameterData
+ * @brief Data object for SCT_ConditionsParameterTool and SCT_ConditionsParameterCondAlg
+ **/
 
 class SCT_CondParameterData {
 public:
-  // Parameters
+  /// Parameters
   enum ParameterIndex{AVG_THRESHOLD, N_PARAMETERS, INVALID_PARAMETER};
 
-  //constructor
+  /// Constructor
   SCT_CondParameterData();
 
-  //destructor
+  /// Destructor
   virtual ~SCT_CondParameterData() = default;
   //@name main methods
   //@{
@@ -60,9 +68,7 @@ public:
   //@}
   
 private:
-  enum {N_ELEMENTS=8176};
-
-  boost::array<boost::array<float, N_PARAMETERS>, N_ELEMENTS > m_values;
+  std::array<std::array<float, N_PARAMETERS>, SCT_ConditionsData::NUMBER_OF_WAFERS> m_values;
 
   float m_min[N_PARAMETERS];
   float m_max[N_PARAMETERS];
@@ -71,10 +77,12 @@ private:
   float m_sumsq[N_PARAMETERS];
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_CondParameterData , 34383719 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_CondParameterData, 3856939 );
 
-
 #endif // SCT_CONDPARAMETERDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsDataDict.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsDataDict.h
index 002e0b313d11725c805de2a24f8b9e8912fe5290..66cbdeca71961937cfed0dfe24575530a5f7171e 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsDataDict.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsDataDict.h
@@ -1,19 +1,23 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-/*
-  Usages in Python:
-
-  import ROOT, cppyy
-  cppyy.loadDictionary('SCT_ConditionsDataDict')
-  bsErrors = ROOT.SCT_ByteStreamErrors
-  bsErrors.NUM_ERROR_TYPES
-
-  from ROOT import SCT_ByteStreamErrors
-  for i in range(SCT_ByteStreamErrors.NUM_ERROR_TYPES):
-    print(SCT_ByteStreamErrors.ErrorTypeDescription[i])
- */
+/**
+ * @file SCT_ConditionsDataDict.h
+ * @brief ROOT dictionary file of SCT_ConditionsData package to
+ * use classes, enums, variables in Python.
+ * @note Usages in Python:
+ * import ROOT, cppyy
+ * cppyy.loadDictionary('SCT_ConditionsDataDict')
+ * bsErrors = ROOT.SCT_ByteStreamErrors
+ * bsErrors.NUM_ERROR_TYPES
+ *
+ * from ROOT import SCT_ByteStreamErrors
+ * for i in range(SCT_ByteStreamErrors.NUM_ERROR_TYPES):
+ *   print(SCT_ByteStreamErrors.ErrorTypeDescription[i])
+ **/
 
 #ifndef SCT_ConditionsDataDict_h
 #define SCT_ConditionsDataDict_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsParameters.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsParameters.h
index 7646a00da736fa90e2a98f2f41086a132c3e8e60..d5b3dd43dfd75353afb82c656d5a9749e7b836f7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsParameters.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConditionsParameters.h
@@ -1,21 +1,24 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_ConditionsParameters.h
- * header file containing enumerated type of parameters which may be retrieved
- * by the ISCT_ConditionsParameterSvc, and their string interpretation
+ * @brief header file containing the number of elements and enumerated type
+ * of parameters which may be retrieved by the ISCT_ConditionsParameterTool.
  * @author shaun.roe@cern.ch
-**/
+ **/
 
 #ifndef SCT_CONDITIONSDATA_SCT_CONDITIONSPARAMETERS_H
 #define SCT_CONDITIONSDATA_SCT_CONDITIONSPARAMETERS_H
 
-#include <string>
-
-namespace SCT_ConditionsData{
-  enum NumberOfElements{SIDES_PER_MODULE=2, CHIPS_PER_SIDE=6, CHIPS_PER_MODULE=12, NUMBER_OF_MODULES=4088, STRIPS_PER_WAFER=768, NUMBER_OF_WAFERS=8176, STRIPS_PER_CHIP=STRIPS_PER_WAFER/CHIPS_PER_SIDE};
+namespace SCT_ConditionsData {
+  enum NumberOfElements{SIDES_PER_MODULE=2, 
+                        NUMBER_OF_MODULES=4088, NUMBER_OF_WAFERS=NUMBER_OF_MODULES*SIDES_PER_MODULE,
+                        CHIPS_PER_SIDE=6, CHIPS_PER_MODULE=SIDES_PER_MODULE*CHIPS_PER_SIDE,
+                        STRIPS_PER_WAFER=768, STRIPS_PER_CHIP=STRIPS_PER_WAFER/CHIPS_PER_SIDE};
   enum NumberOfCalibrationData{N_NPTGAIN=6, N_NOISEOCC=4};
   enum MajorityParameters{HighAndLowVoltageOK=17, /* 17 = 0x11 -> majority state for both LV and HV. */
                           OVERALL=110,
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConfigurationCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConfigurationCondData.h
index b5be00a97c9b78a3ba36db2b97f5969113313a9c..b2f25618a0fa36be497484483493f61885d1d091 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConfigurationCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ConfigurationCondData.h
@@ -1,11 +1,14 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_ConfigurationCondData.h
- * header file for data object
- * @author Susumu Oda - 2017-10-10
+ * header file for data object for SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
+ * @author Susumu Oda
+ * @date 2017-10-10
  **/
 
 #ifndef SCT_CONFIGURATIONCONDDATA_H
@@ -17,65 +20,68 @@
 #include <set>
 
 // Include Athena stuff
-#include "AthenaKernel/CLASS_DEF.h"
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
 
+/**
+ * @class SCT_ConfigurationCondData
+ * @brief Class for data object used in SCT_ConfigurationCondAlg and SCT_ConfigurationConditionsTool.
+ **/
 class SCT_ConfigurationCondData {
 public:
 
-  // Constructor
+  /// Constructor
   SCT_ConfigurationCondData();
 
-  // Destructor
+  /// Destructor
   virtual ~SCT_ConfigurationCondData() = default;
 
-  // Set a bad strip identifier
+  /// Set a bad strip identifier
   void setBadStripId(const Identifier& badStripId, const IdentifierHash& hash, const int strip);
-  // Get all bad strip identifiers
+  /// Get all bad strip identifiers
   const std::set<Identifier>* getBadStripIds() const;
-  // Clear all bad strip identifiers
+  /// Clear all bad strip identifiers
   void clearBadStripIds();
-  // Check if a strip identifier is bad one
+  /// Check if a strip identifier is bad one
   bool isBadStrip(const IdentifierHash& hash, const int strip) const;
 
-  // Set a bad wafer identifier
+  /// Set a bad wafer identifier
   void setBadWaferId(const Identifier& badWaferId);
-  // Get all bad wafer identifiers
+  /// Get all bad wafer identifiers
   const std::set<Identifier>* getBadWaferIds() const;
-  // Clear all bad wafer identifiers
+  /// Clear all bad wafer identifiers
   void clearBadWaferIds();
-  // Check if a wafer identifier is bad one
+  /// Check if a wafer identifier is bad one
   bool isBadWaferId(const Identifier& waferId) const;
 
-  // Set a bad module identifier
+  /// Set a bad module identifier
   void setBadModuleId(const Identifier& badModuleId);
-  // Get all bad module identifiers
+  /// Get all bad module identifiers
   const std::set<Identifier>* getBadModuleIds() const;
-  // Clear all bad module identifiers
+  /// Clear all bad module identifiers
   void clearBadModuleIds();
-  // Check if a module identifier is bad one
+  /// Check if a module identifier is bad one
   bool isBadModuleId(const Identifier& moduleId) const;
 
-  // Set bad links for a module
+  /// Set bad links for a module
   void setBadLinks(const IdentifierHash& hash, const bool isBadLink0, const bool isBadLink1);
-  // Get all bad links
+  /// Get all bad links
   const std::map<IdentifierHash, std::pair<bool, bool>>* getBadLinks() const;
-  // Clear all bad links
+  /// Clear all bad links
   void clearBadLinks();
-  // Check if a module has bad links
+  /// Check if a module has bad links
   std::pair<bool, bool> areBadLinks(const IdentifierHash& hash) const;
 
-  // Set bad chips for a module
+  /// Set bad chips for a module
   void setBadChips(const Identifier& moduleId, const unsigned int chipStatus);
-  // Get bad chips for a module
+  /// Get bad chips for a module
   unsigned int getBadChips(const Identifier& moduleId) const;
-  // Get all bad chips
+  /// Get all bad chips
   const std::map<Identifier, unsigned int>* getBadChips() const;
-  // Clear all bad chips
+  /// Clear all bad chips
   void clearBadChips();
 
-  // Clear all bad information
+  /// Clear all bad information
   void clear();
 
 private:
@@ -90,10 +96,12 @@ private:
   std::map<Identifier, unsigned int> m_badChips;
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_ConfigurationCondData , 115061956 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_ConfigurationCondData, 23220694 );
 
-
 #endif // SCT_CONFIGURATIONDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h
index 89e7cb7128280ca491e0f6f0810497529b5c47d1..d8114bd06ee7dc9cefe5b8e040322d9d4ebcf566 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h
@@ -1,34 +1,46 @@
+// -*- 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
 */
 
 /**
- * SCT_DCSFloatCondData.h
- * @file header file for data object
- * @author Susumu Oda - 11/08/17
+ * @file SCT_DCSFloatCondData.h
+ * @brief header file for data object for SCT_DCSConditions{HV,Temp}CondAlg,
+ * SCT_DCSConditionsTool, SCT_SiliconConditions{HV,Temp}CondAlg,
+ * SCTSiPropertiesCondAlg, SCTSiLorentzAngleCondAlg.
+ * @author Susumu Oda
+ * @date 11/08/17
  **/
 
 #ifndef SCT_DCSFLOATCONDDATA_H
 #define SCT_DCSFLOATCONDDATA_H
 
-#include "AthenaKernel/CLASS_DEF.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
+
 #include <map>
 
+/**
+ * @class SCT_DCSFloatCondData
+ * @brief Class for data object used in
+ * SCT_DCSConditions{HV,Temp}CondAlg,
+ * SCT_DCSConditionsTool, SCT_SiliconConditions{HV,Temp}CondAlg,
+ * SCTSiPropertiesCondAlg, SCTSiLorentzAngleCondAlg.
+ **/
 class SCT_DCSFloatCondData {
 public:
-  //constructor
+  /// Constructor
   SCT_DCSFloatCondData();
 
-  //destructor
+  /// Destructor
   virtual ~SCT_DCSFloatCondData() = default;
   //@name main methods
   //@{
-  /// set a float value for a channel
+  /// Set a float value for a channel
   void setValue(const CondAttrListCollection::ChanNum& chanNum, const float value);
-  /// get the float value for a channel
+  /// Get the float value for a channel
   bool getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const;
-  /// clear the m_channelValues
+  /// Clear the m_channelValues
   void clear();
   //@}
   
@@ -37,8 +49,11 @@ private:
   FloatConditions m_channelValues;
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_DCSFloatCondData , 234553277 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_DCSFloatCondData, 257878639 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h
index 12200923d079d0f9849497273a3ae5dc09f242b1..dd47d9fe61c3cfd43e824e65750cb3d0492bba68 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h
@@ -1,38 +1,47 @@
+// -*- 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
 */
 
 /**
- * SCT_DCSStatCondData.h
- * @file header file for data object
- * @author A. Robichaud-Veronneau - 23/02/07
+ * @file SCT_DCSStatCondData.h
+ * @brief header file for data object for SCT_DCSConditionsStatCondAlg,
+ * SCT_DCSConditionsTool, SCT_Silicon{HV,Temp}CondAlg.
+ * @author A. Robichaud-Veronneau
+ * @date 23/02/07
  **/
 
 #ifndef SCT_DCSSTATCONDDATA_H
 #define SCT_DCSSTATCONDDATA_H
 
-#include "AthenaKernel/CLASS_DEF.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
+
 #include <map>
-#include <vector>
 #include <string>
+#include <vector>
 
+/**
+ * @class SCT_DCSStatCondData
+ * @brief Classs for data object used in SCT_DCSConditionsStatCondAlg,
+ * SCT_DCSConditionsTool, SCT_Silicon{HV,Temp}CondAlg.
+ **/
 class SCT_DCSStatCondData {
 public:
-  //constructor
+  /// Constructor
   SCT_DCSStatCondData();
 
-  //destructor
+  /// Destructor
   virtual ~SCT_DCSStatCondData() = default;
   //@name main methods
   //@{
-  /// add defect
+  /// Add defect
   void fill(const CondAttrListCollection::ChanNum& chanNum, const std::string param);
-  /// remove a defect
+  /// Remove a defect
   void remove(const CondAttrListCollection::ChanNum& chanNum, const std::string param);
-  /// copy all defects to a users vector, the return value is the size
+  /// Copy all defects to a users vector, the return value is the size
   int output(const CondAttrListCollection::ChanNum& chanNum, std::vector<std::string>& usersVector) const;
-  ///
+  /// Return the number of defects
   int output(const CondAttrListCollection::ChanNum & chanNum) const;
   //@}
   
@@ -41,10 +50,12 @@ private:
   DCSConditions m_bad_channels;
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_DCSStatCondData , 254074432 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_DCSStatCondData, 162792902 );
 
-
 #endif // SCT_DCSSTATCONDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_FlaggedCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_FlaggedCondData.h
index 2dddabf64b8e5e8272fe3b2ae8e439047a0320d0..acf60eecf8562d802c5f4201043deae76f73d131 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_FlaggedCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_FlaggedCondData.h
@@ -1,11 +1,14 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
- * SCT_FlaggedCondData.h
- * @file header file for data object for flagged conditions
- * @author Susumu Oda - 21/02/2018
+ * @file SCT_FlaggedCondData.h
+ * @brief header file for data object for SCT_Clusterization and SCT_FlaggedConditionTool.
+ * @author Susumu Oda
+ * @date 21/02/2018
  **/
 
 #ifndef SCT_FLAGGEDCONDDATA_H
@@ -16,9 +19,13 @@
 
 #include "Identifier/IdentifierHash.h"
 
+/**
+ * @typedef SCT_FlaggedCondData
+ * @brief Typedef for data object used in SCT_Clusterization and SCT_FlaggedConditionTool.
+ */
 typedef std::map<IdentifierHash, std::string> SCT_FlaggedCondData;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_FlaggedCondData , 188972386 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_GainCalibData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_GainCalibData.h
index 88e55ae42480deca2262db46b2026da59b76ee91..9f852e868386f2a7b3dbb1634750d0b627ff03f8 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_GainCalibData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_GainCalibData.h
@@ -1,11 +1,14 @@
+// -*- 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
 */
 
 /**
- * SCT_GainCalibData.h
- * @file header file for data object for gain parameters for all modules
- * @author Susumu Oda - 12/10/17
+ * @file SCT_GainCalibData.h
+ * @brief header file for data object for gain parameters for all modules
+ * @author Susumu Oda
+ * @date 12/10/17
  **/
 
 #ifndef SCT_GAINCALIBDATA_H
@@ -16,12 +19,17 @@
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<SCT_ModuleGainCalibData, SCT_ConditionsData::NUMBER_OF_MODULES> SCT_GainCalibData;
+/**
+ * @typedef SCT_GainCalibData
+ * @brief Typedef for data object used in SCT_ReadCalibChipGainCondAlg and SCT_ReadCalibChipDataTool.
+ **/
+typedef std::array<SCT_ModuleGainCalibData, SCT_ConditionsData::NUMBER_OF_MODULES> SCT_GainCalibData;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_GainCalibData , 221029672 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_GainCalibData, 46251018 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MajorityCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MajorityCondData.h
index 0af42802f1d2bd7333acc71924f9146bd3164581..5f5ab303efd60aa9940c8e0f094acd3a2eedad03 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MajorityCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MajorityCondData.h
@@ -1,11 +1,14 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_MajorityCondData.h
- * header file for data object
- * @author Susumu Oda - 2017-10-13
+ * @brief header file for data object for SCT_MajorityCondAlg and SCT_MajorityConditionsTool.
+ * @author Susumu Oda
+ * @date 2017-10-13
  **/
 
 #ifndef SCT_MAJORITYCONDDATA_H
@@ -13,46 +16,50 @@
 
 #include <map>
 
-// Include Athena stuff
-#include "AthenaKernel/CLASS_DEF.h"
-
+/**
+ * @class SCT_MajorityCondData
+ * @brief Class for data object used in SCT_MajorityCondAlg and SCT_MajorityConditionsTool.
+ **/
 class SCT_MajorityCondData {
 public:
-  // Constructor
+  /// Constructor
   SCT_MajorityCondData();
-  // Destructor
+  /// Destructor
   virtual ~SCT_MajorityCondData() = default;
 
-  // Set majority state for a region
+  /// Set majority state for a region
   void setMajorityState(const int& region, const bool& majorityState);
-  // Get majority state for a region
+  /// Get majority state for a region
   bool getMajorityState(const int& region) const;
-  // Clear majority state
+  /// Clear majority state
   void clearMajorityStates();
 
-  // Set HV fraction for a region
+  /// Set HV fraction for a region
   void setHVFraction(const int& region, const float& hvFraction);
-  // Get HV fraction for a region
+  /// Get HV fraction for a region
   float getHVFraction(const int& region) const;
-  // Clear HV fractions
+  /// Clear HV fractions
   void clearHVFractions();
 
-  // Set filled variable
+  /// Set filled variable
   void setFilled(const bool& filled);
-  // Get filled variable
+  /// Get filled variable
   bool isFilled() const;
 
 private:
-  // Map to store majority state
+  /// Map to store majority state
   std::map<int, bool> m_majorityState;
-  // Map to store HV fraction
+  /// Map to store HV fraction
   std::map<int, float> m_hvFraction;
-  // Flag to check data are filled or not
+  /// Flag to check data are filled or not
   bool m_filled;
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_MajorityCondData , 131714728 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_MajorityCondData, 80083480 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleCalibParameter.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleCalibParameter.h
index 523510fa8f25e51853195cbe9dc79cc4e9de7d14..f544733276154820a8ef2bbb9e57d17ef95c37e7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleCalibParameter.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleCalibParameter.h
@@ -1,25 +1,32 @@
+// -*- 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
 */
 
 /**
- * SCT_ModuleCalibParameter.h
- * @file header file for data object for a calibration parameter per chip of a module
- * @author Susumu Oda - 12/10/17
+ * @file SCT_ModuleCalibParameter.h
+ * @brief header file for data object for a calibration parameter per chip of a module
+ * @author Susumu Oda
+ * @date 12/10/17
  **/
 
 #ifndef SCT_MODULECALIBPARAMETER_H
 #define SCT_MODULECALIBPARAMETER_H
 
-// Include boost stuff
-#include "boost/array.hpp"
-
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<float, SCT_ConditionsData::CHIPS_PER_MODULE> SCT_ModuleCalibParameter;
+// Include STL stuff
+#include <array>
+
+/**
+ * @typedef SCT_ModuleCalibParameter
+ * @brief typedef for SCT_ReadCalibChipGainCondAlg, SCT_ReadCalibChipNoiseCondAlg, SCT_ReadCalibChipDataTool.
+ **/
+typedef std::array<float, SCT_ConditionsData::CHIPS_PER_MODULE> SCT_ModuleCalibParameter;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_ModuleCalibParameter , 119421667 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleGainCalibData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleGainCalibData.h
index 0ab9f91321b466a4ab73aafda15b5f63acf3eb28..483b4b2b0e4d91fa95c2465c469f1d7d9030b5f9 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleGainCalibData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleGainCalibData.h
@@ -1,11 +1,14 @@
+// -*- 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
 */
 
 /**
  * SCT_ModuleGainCalibData.h
  * @file header file for data object for gain parameters per module
- * @author Susumu Oda - 12/10/17
+ * @author Susumu Oda
+ * @date 12/10/17
  **/
 
 #ifndef SCT_MODULEGAINCALIBDATA_H
@@ -16,9 +19,13 @@
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<SCT_ModuleCalibParameter, SCT_ConditionsData::N_NPTGAIN> SCT_ModuleGainCalibData;
+/**
+ * @typedef SCT_ModuleGainCalibData
+ * @brief Typedef for data object used in SCT_ReadCalibChipGainCondAlg and SCT_ReadCalibChipDataTool.
+ **/
+typedef std::array<SCT_ModuleCalibParameter, SCT_ConditionsData::N_NPTGAIN> SCT_ModuleGainCalibData;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_ModuleGainCalibData , 48634490 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleNoiseCalibData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleNoiseCalibData.h
index 0af367813affa03e243116d73875aad657a199a8..770f89760550a5d6d1cc913c024711d2fa5c3176 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleNoiseCalibData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleNoiseCalibData.h
@@ -1,11 +1,14 @@
+// -*- 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
 */
 
 /**
  * SCT_ModuleNoiseCalibData.h
  * @file header file for data object for noise parameters per module
- * @author Susumu Oda - 12/10/17
+ * @author Susumu Oda
+ * @date 12/10/17
  **/
 
 #ifndef SCT_MODULENOISECALIBDATA_H
@@ -16,9 +19,13 @@
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<SCT_ModuleCalibParameter, SCT_ConditionsData::N_NOISEOCC> SCT_ModuleNoiseCalibData;
+/**
+ * @typedef SCT_ModuleNoiseCalibData
+ * @brief Typedef for data object used in SCT_ReadCalibChipNoiseCondAlg and SCT_ReadCalibChipDataTool.
+ **/
+typedef std::array<SCT_ModuleCalibParameter, SCT_ConditionsData::N_NOISEOCC> SCT_ModuleNoiseCalibData;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_ModuleNoiseCalibData , 59343966 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleVetoCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleVetoCondData.h
index aede22ea912e49280006c4e0783ca8fc43222a11..3d5e1a451b554e6fe3bbe3d0ef77aeab9a752053 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleVetoCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ModuleVetoCondData.h
@@ -1,36 +1,46 @@
+// -*- 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
 */
 
 /**
- * SCT_ModuleVetoCondData.h
- * @file header file for data object
- * @author Susumu Oda - 04/12/17
+ * @file SCT_ModuleVetoCondData.h
+ * @brief header file for data object for SCT_ModuleVetoCondAlg,
+ * SCT_LinkMaskingCondAlg, SCT_ModuleVetoTool, SCT_LinkMaskingTool.
+ * @author Susumu Oda
+ * @date 04/12/17
  **/
 
 #ifndef SCT_MODULEVETOCONDDATA_H
 #define SCT_MODULEVETOCONDDATA_H
 
 #include "Identifier/Identifier.h"
+
 #include <set>
 
+/**
+ * @class SCT_ModuleVetoCondData
+ * @brief Class for data object used in SCT_ModuleVetoCondAlg,
+ * SCT_LinkMaskingCondAlg, SCT_ModuleVetoTool, SCT_LinkMaskingTool.
+ **/
 class SCT_ModuleVetoCondData {
 public:
-  /// constructor
+  /// Constructor
   SCT_ModuleVetoCondData();
-  /// destructor
+  /// Destructor
   virtual ~SCT_ModuleVetoCondData() = default;
-  /// set a bad wafer ID
+  /// Set a bad wafer ID
   bool setBadWaferId(const Identifier waferId);
-  /// check if a wafer ID is bad or not
+  /// Check if a wafer ID is bad or not
   bool isBadWaferId(const Identifier waferId) const; 
-  /// clear
+  /// Clear
   void clear();
-  /// set data filled
+  /// Set data filled
   void setFilled();
-  /// check the data are filled or not
+  /// Check the data are filled or not
   bool filled() const;
-  /// get the number of bad wafers
+  /// Get the number of bad wafers
   long unsigned int size() const;
   
 private:
@@ -38,9 +48,11 @@ private:
   bool m_isFilled;
 };
 
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_ModuleVetoCondData , 100510855 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_ModuleVetoCondData, 46782241 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h
index 2d64837c3c1c532c04b28c3219fde80071f646dd..27b9b0b21c5f6b82cf3f2dd5cd3c940a58846b3d 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorCondData.h
@@ -1,18 +1,20 @@
+// -*- C++ -*-
+
 /*
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_MonitorCondData.h
- * header file for data object
- * @author Susumu Oda - 2017-07-26
+ * @brief header file for data object for SCT_MonitorCondAlg and SCT_MonitorConditionsTool.
+ * @author Susumu Oda
+ * @date 2017-07-26
  **/
 
 #ifndef SCT_MONITORCONDDATA_H
 #define SCT_MONITORCONDDATA_H
 
 // Include Athena stuff
-#include "AthenaKernel/CLASS_DEF.h"
 #include "Identifier/IdentifierHash.h"
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
@@ -20,38 +22,42 @@
 #include <bitset>
 #include <string>
 
+/**
+ * @class SCT_MonitorCondData
+ * @brief Class for data object used in SCT_MonitorCondAlg and SCT_MonitorConditionsTool.
+ **/
 class SCT_MonitorCondData {
 public:
 
-  // Constructor
+  /// Constructor
   SCT_MonitorCondData();
 
-  // Destructor
+  /// Destructor
   virtual ~SCT_MonitorCondData() = default;
 
-  // Check if a module has a defect (a list of bad strips). If it does not have defect return false.
+  /// Check if a module has a defect (a list of bad strips). If it does not have defect return false.
   bool find(const IdentifierHash& hash, std::string& defectList) const;
 
-  // Insert a new defect (a list of bad strips) for a module
+  /// Insert a new defect (a list of bad strips) for a module
   void insert(const IdentifierHash& hash, const std::string& defectList);
 
-  // Clear m_defectListArray
+  /// Clear m_defectListArray
   void clear();
 
-  // Get the number of bad strips for a module
+  /// Get the number of bad strips for a module
   std::size_t nBadStripsForModule(const IdentifierHash& moduleHash) const;
-  // Get the number of bad strips for a wafer
+  /// Get the number of bad strips for a wafer
   std::size_t nBadStripsForWafer(const IdentifierHash& waferHash) const;
-  // Get the number of bad strips for the chip, where a strip locates
+  /// Get the number of bad strips for the chip, where a strip locates
   std::size_t nBadStripsForChip(const IdentifierHash& waferHash, const int strip) const;
-  // Check if a strip is bad
+  /// Check if a strip is bad
   bool isBadStrip(const IdentifierHash& waferHash, const int strip) const;
 
 private:
   void clearModule(const std::size_t moduleIndex);
   void fillBadStrip(const std::size_t moduleIndex, const int strip);
 
-  // Store the relation between modules and defects (lists of bad strips).
+  /// Store the relation between modules and defects (lists of bad strips).
   std::array<std::string, SCT_ConditionsData::NUMBER_OF_MODULES> m_defectListArray;
   std::array<std::array<std::array<std::bitset<SCT_ConditionsData::STRIPS_PER_CHIP>,
     SCT_ConditionsData::CHIPS_PER_SIDE>,
@@ -70,10 +76,12 @@ private:
   static const std::string s_separator;
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_MonitorCondData , 190515334 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_MonitorCondData, 164599336 );
 
-
 #endif // SCT_MONITORCONDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_NoiseCalibData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_NoiseCalibData.h
index 80fc986c98f512d18e27f9a8faad71474fded530..a922c49160583a2437d4a617fa6400430e5cac96 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_NoiseCalibData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_NoiseCalibData.h
@@ -1,11 +1,14 @@
+// -*- 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
 */
 
 /**
- * SCT_NoiseCalibData.h
- * @file header file for data object for noise parameters for all modules
- * @author Susumu Oda - 12/10/17
+ * @file SCT_NoiseCalibData.h
+ * @brief header file for data object for noise parameters for all modules
+ * @author Susumu Oda
+ * @date 12/10/17
  **/
 
 #ifndef SCT_NOISECALIBDATA_H
@@ -16,12 +19,17 @@
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<SCT_ModuleNoiseCalibData, SCT_ConditionsData::NUMBER_OF_MODULES> SCT_NoiseCalibData;
+/**
+ * @typedef SCT_NoiseCalibData
+ * @brief Class for data object used in SCT_ReadCalibChipNoiseCondAlg and SCT_ReadCalibChipDataTool.
+ **/
+typedef std::array<SCT_ModuleNoiseCalibData, SCT_ConditionsData::NUMBER_OF_MODULES> SCT_NoiseCalibData;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_NoiseCalibData , 58952480 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_NoiseCalibData , 29066680 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h
index a4ce2772852031e19836204c8860fb1fc04e6f47..f6aa3c528b8235099af18b62b8c0db241b8a102b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_PortMap.h
@@ -1,10 +1,12 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_PortMap.h
- * Header file for the SCT_PortMap class
+ * @brief Header file for the SCT_PortMap class
  * @author Susumu Oda <Susumu.Oda@cern.ch>
  */
 
@@ -18,12 +20,12 @@ namespace SCT_Parameters {
 
 /**
  * @class SCT_PortMap
- * Helper class to map the input/output ports of a chip
+ * @brief Helper class to map the input/output ports of a chip
  **/
 
 class SCT_PortMap {
 
- public:
+public:
 
   /** Constuctor from input and output chip types*/
   SCT_PortMap(SCT_Parameters::ChipType in0, SCT_Parameters::ChipType in1, SCT_Parameters::ChipType out0, SCT_Parameters::ChipType out1) {
@@ -39,7 +41,7 @@ class SCT_PortMap {
   inline SCT_Parameters::ChipType input(int port) const  { return m_input[port]; }
   inline SCT_Parameters::ChipType output(int port) const { return m_output[port]; }
 
- private:
+private:
 
   SCT_Parameters::ChipType m_input[2];   //!<  Port type for the chip's two inputs
   SCT_Parameters::ChipType m_output[2];  //!<  Port type for the chip's two outputs
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
index efc44fbfba4c168109770c4a053e7710e35856da..6fa3f41e70d3d433322897999ac0832661caa1c7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_ReadoutData.h
@@ -1,5 +1,7 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
@@ -22,7 +24,10 @@
 
 class Identifier;
 
-/** Enums for module and chip type*/
+/** 
+ * @enum ModuleType
+ * @brief Enums for module and chip type
+ **/
 namespace SCT_Parameters {
   enum ModuleType {BARREL, MODIFIED_0, MODIFIED_1, ENDCAP};
 }
@@ -31,21 +36,20 @@ namespace SCT_Parameters {
  * @class SCT_ReadoutTool
  * Class to represent the SCT module readout
  **/
-
 class SCT_ReadoutData {
 
- public:
+public:
 
   SCT_ReadoutData(IMessageSvc* msgSvc=nullptr);
   virtual ~SCT_ReadoutData();
 
-  // Default copy constructor
+  /** Default copy constructor*/
   SCT_ReadoutData(const SCT_ReadoutData&) = default;
-  // Default assignment operator
+  /** Default assignment operator*/
   SCT_ReadoutData& operator=(const SCT_ReadoutData&) = default;
-  // Default move constructor
+  /** Default move constructor*/
   SCT_ReadoutData(SCT_ReadoutData&&) = default;
-  // Default move assignment operator
+  /** Default move assignment operator*/
   SCT_ReadoutData& operator=(SCT_ReadoutData&&) = default;
   
   /** Find the ID of the input chip for chip*/ 
@@ -117,7 +121,7 @@ class SCT_ReadoutData {
   /** Set all chips out of readout and clear both links to start */
   void clearChipReadout();
 
- private:
+private:
 
   /** Private data*/
   std::vector<SCT_Chip*>              m_chips;               //!< Vector of actual SCT Chips for that module
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorCondData.h
index 29e572cdfc570004fcec37a53fb0983c64ab40bd..d356e6ba079188be27f0c36a1d753f3f6e8681d9 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorCondData.h
@@ -1,47 +1,52 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_SensorCondData.h
- * header file for data object for SCT_SensorsSvc
- * @author Susumu Oda - 2017-12-04
+ * @brief header file for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
+ * @author Susumu Oda
+ * @date 2017-12-04
  **/
 
 #ifndef SCT_SENSORCONDDATA_H
 #define SCT_SENSORCONDDATA_H
 
-#include <string>
-
-// Include Athena stuff
-#include "AthenaKernel/CLASS_DEF.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 
+#include <string>
+
+/**
+ * @class SCT_SensorCondData
+ * @brief Class for data object used in SCT_SensorsCondAlg and SCT_SensorsTool.
+ **/
 class SCT_SensorCondData {
 public:
-  // Constructor
+  /// Constructor
   SCT_SensorCondData();
-  // Destructor
+  /// Destructor
   virtual ~SCT_SensorCondData() = default;
 
-  // Set truncated serial number
+  /// Set truncated serial number
   bool setTruncatedSerialNumber(const CondAttrListCollection::ChanNum truncatedSerialNumber);
-  // Get truncated serial number
+  /// Get truncated serial number
   CondAttrListCollection::ChanNum getTruncatedSerialNumber() const;
 
-  // Set manufacturer
+  /// Set manufacturer
   bool setManufacturer(const std::string& manufacturer);
-  // Get manufacturer
+  /// Get manufacturer
   std::string getManufacturer() const;
 
-  // Set depletion voltage
+  /// Set depletion voltage
   bool setDepletionVoltage(const unsigned int sensor, const float depletionVoltage);
-  // Get depletion voltage
+  /// Get depletion voltage
   float getDepletionVoltage(const unsigned int sensor) const;
 
-  // Set depletion voltage
+  /// Set depletion voltage
   bool setCrystalOrientation(const unsigned int sensor, const int crystalOrientation);
-  // Get depletion voltage
+  /// Get depletion voltage
   int getCrystalOrientation(const unsigned int sensor) const;
 
   enum {OFFSET=1, SENSOR1=1, SENSOR2=2, SENSOR3=3, SENSOR4=4, NUM_SENSORS=4};
@@ -53,6 +58,8 @@ private:
   int m_crystalOrientation[NUM_SENSORS];
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_SensorCondData , 144247573 , 1 )
 
 #endif // SCT_SENSORDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorsCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorsCondData.h
index c69e1b9be88861d250978da687e9deac6f5b0ffe..24a8e45e1eafd44830f17ec85b1e393d2ed383b6 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorsCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_SensorsCondData.h
@@ -1,11 +1,14 @@
+// -*- 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
 */
 
 /**
  * @file SCT_SensorsCondData.h
- * header file for data object for SCT_SensorsSvc
- * @author Susumu Oda - 2017-12-04
+ * @brief header file for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
+ * @author Susumu Oda
+ * @date 2017-12-04
  **/
 
 #ifndef SCT_SENSORSCONDDATA_H
@@ -18,12 +21,17 @@
 
 #include <map>
 
+/**
+ * @typedef SCT_SensorsCondData
+ * @brief Class for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
+ **/
 typedef std::map<CondAttrListCollection::ChanNum, SCT_SensorCondData> SCT_SensorsCondData;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_SensorsCondData , 198841041 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_SensorsCondData, 137294721 );
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_TdaqEnabledCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_TdaqEnabledCondData.h
index 5b11e5cf508ef0bc56ee167b2afbc61924033b52..245d63714f2f63a2129eac615ffab32c06de2a64 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_TdaqEnabledCondData.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_TdaqEnabledCondData.h
@@ -1,57 +1,63 @@
+// -*- C++ -*-
+
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * @file SCT_TdaqEnabledCondData.h
- * header file for data object
- * @author Susumu Oda - 2017-05-15
+ * @brief header file for data object for SCT_TdaqEnabledCondAlg and SCT_TdaqEnabledTool.
+ * @author Susumu Oda
+ * @date 2017-05-15
  **/
 
 #ifndef SCT_TDAQENABLEDCONDDATA_H
 #define SCT_TDAQENABLEDCONDDATA_H
 
-#include <set>
-#include <vector>
-
 // Include Athena stuff
-#include "AthenaKernel/CLASS_DEF.h"
 #include "Identifier/IdentifierHash.h"
 
+#include <set>
+#include <vector>
+
+/**
+ * @class SCT_TdaqEnabledCondData
+ * @brief Class for data object used in SCT_TdaqEnabledCondAlg and SCT_TdaqEnabledTool.
+ **/
 class SCT_TdaqEnabledCondData {
 public:
 
-  // Constructor
+  /// Constructor
   SCT_TdaqEnabledCondData();
 
-  // Destructor
+  /// Destructor
   virtual ~SCT_TdaqEnabledCondData() = default;
 
-  // Set a good ROD
+  /// Set a good ROD
   bool setGoodRod(const unsigned int rodNumber);
 
-  // Get good RODs
+  /// Get good RODs
   const std::set<unsigned int>& getGoodRods() const;
 
-  // Set a list of good modules
+  /// Set a list of good modules
   void setGoodModules(const std::vector<IdentifierHash>& idVec);
 
-  // Set filled variable
+  /// Set filled variable
   void setFilled(const bool filled);
 
-  // Get filled variable
+  /// Get filled variable
   bool isFilled() const;
 
-  // Set noneBad value
+  /// Set noneBad value
   void setNoneBad(const bool noneBad);
 
-  // Get noneBad value
+  /// Get noneBad value
   bool isNoneBad() const;
 
-  // Check if a module is good
+  /// Check if a module is good
   bool isGood(const IdentifierHash& hashId) const;
 
-  // Clear m_goodRods, m_goodIds, m_noneBad, m_filled
+  /// Clear m_goodRods, m_goodIds, m_noneBad, m_filled
   void clear();
 
 private:
@@ -63,10 +69,12 @@ private:
 
 };
 
+// Class definition for StoreGate
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_TdaqEnabledCondData , 137549585 , 1 )
 
+// Condition container definition for CondInputLoader
 #include "AthenaKernel/CondCont.h"
 CONDCONT_DEF( SCT_TdaqEnabledCondData , 31730865 );
 
-
 #endif // SCT_TDAQENABLEDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_WaferGoodStripInfo.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_WaferGoodStripInfo.h
index e73082f28133be516d54ac446cb744677aa2d258..5ede850666bde123e3a931110ef1bca0d702e75d 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_WaferGoodStripInfo.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_WaferGoodStripInfo.h
@@ -1,25 +1,32 @@
+// -*- 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
 */
 
 /**
- * SCT_WaferGoodStripInfo.h
- * @file header file for data object for good strip information of a wafer
- * @author Susumu Oda - 24/11/2017
+ * @file SCT_WaferGoodStripInfo.h
+ * @brief header file for data object for good strip information of a wafer
+ * @author Susumu Oda
+ * @date 24/11/2017
  **/
 
 #ifndef SCT_WAFERGOODSTRIPINFO_H
 #define SCT_WAFERGOODSTRIPINFO_H
 
-// Include boost stuff
-#include "boost/array.hpp"
-
 // Definition of the number of elements
 #include "SCT_ConditionsData/SCT_ConditionsParameters.h"
 
-typedef boost::array<bool, SCT_ConditionsData::STRIPS_PER_WAFER> SCT_WaferGoodStripInfo;
+// STL
+#include <array>
+
+/**
+ * @typedef SCT_WaferGoodStripInfo
+ * @brief Class for data object used in SCT_ReadCalibDataCondAlg and SCT_AllGoodStripInfo.
+ **/
+typedef std::array<bool, SCT_ConditionsData::STRIPS_PER_WAFER> SCT_WaferGoodStripInfo;
 
-// Class definition
+// Class definition for StoreGate
 #include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF( SCT_WaferGoodStripInfo , 3844565 , 1 )
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h b/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
index 6136abbd5283faacae4f92a436ddcc99be544832..f1a0fa25858cde14ce4efc1243e4226d40842e1f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
@@ -1,26 +1,89 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
 @page SCT_ConditionsData_page SCT_ConditionsData package
-@author Shaun.Roe@cern.ch, Jorgen.Dalmau@cern.ch
+@author Shaun.Roe@cern.ch, Jorgen.Dalmau@cern.ch, Susumu.Oda@cern.ch
 
 
 @section SCT_ConditionsData_SCT_ConditionsDataIntro Introduction
 This package provides data classes used to access data in the conditions
  database or derived from the datastream in some way. Access to these underlying data classes is
- provided by the AlgTools in SCT_ConditionsAlgs, and more documentation can be found there.
+ provided by the AlgTools in SCT_ConditionsTools, and more documentation can be found there.
   - SCT DAQ calibration data
+  - SCT DAQ configuration
   - SCT DCS conditions
+  - SCT byte stream errors
+  - SCT noisy strips
+  - SCT wafers with too many hits
+  - SCT sensors
+  - Veto some SCT elements
+  - etc.
 
+@section SCT_ConditionsData_SCT_ConditionsDataOverview Class overview
 
+@subsection File for SCT_ByteStreamErrorsTool
+  - SCT_ByteStreamErrors.h 
 
-@section SCT_ConditionsData_SCT_ConditionsDataOverview Class overview
- 
+@subsection File for SCT_ConditionsParameterTool
+  - SCT_ConditionsParameters.h: The several enums, which can be commonly used, are also defined.
+
+@subsection Files for ROOT dictionary 
+  - SCT_ConditionsDataDict.h
+  - selection.xml
+
+@subsection Class for SCT_ChargeTrappingTool
+  - SCT_ChargeTrappingCondData
+
+@subsection Class for SCT_ConditionsParameterTool, SCT_ConditionsParameterCondAlg
+  - SCT_CondParameterData
+
+@subsection Class for SCT_ConfigurationConditionsTool, SCT_ConfigurationCondAlg
+  - SCT_ConfigurationCondData
+
+@subsection Classes for SCT_DCSConditionsTool, SCT_DCSConditionsHVCondAlg, SCT_DCSConditionsStatCondAlg, SCT_DCSConditionsTempCondAlg
+  - SCT_DCSFloatCondData
+  - SCT_DCSStatCondData
+
+@subsection Class for SCT_FlaggedConditionTool
+  - SCT_FlaggedCondData
+
+@subsection Class for SCT_MajorityConditionsTool, SCT_MajorityCondAlg
+  - SCT_MajorityCondData
+
+@subsection Class for SCT_ModuleVetoTool, SCT_LinkMaskingTool, SCT_ModuleVetoCondAlg, SCT_LinkMaskingCondAlg
+  - SCT_ModuleVetoCondData
+
+@subsection Class for SCT_MonitorConditionsTool, SCT_MonitorCondAlg
+  - SCT_MonitorCondData
+
+@subsection Classes for SCT_ReadCalibChipDataTool, SCT_ReadCalibChipGainCondAlg, SCT_ReadCalibChipNoiseCondAlg
+  - SCT_GainCalibData
+  - SCT_ModuleCalibParameter
+  - SCT_ModuleGainCalibData
+  - SCT_ModuleNoiseCalibData
+  - SCT_NoiseCalibData
+
+@subsection Classes for SCT_ReadCalibDataTool, SCT_ReadCalibDataCondAlg
+  - SCT_AllGoodStripInfo: std::array of SCT_WaferGoodStripInfo to be used in SCT_ReadCalibDataCondAlg and SCT_ReadCalibDataTool.
   - SCT_CalibDefectData: Container with a list of defects derived from calibration data
-  
-  - StringifyVector: Local utility function to tokenise and stream a string to a vector.
+  - SCT_WaferGoodStripInfo
 
+@subsection Classes for SCT_ReadoutTool, SCT_ConditionsParameterCondAlg, SCT_ConfigurationCondAlg
+  - SCT_Chip
+  - SCT_PortMap
+  - SCT_ReadoutData
+
+@subsection Class for SCT_RODVetoTool, SCT_RODVetoCondAlg
+  - IdentifierSet: std::set of Identifier to be used in SCT_RODVetoCondAlg and SCT_RODVetoTool. 
+
+@subsection Classes for SCT_SensorsTool, SCT_SensorsCondAlg
+  - SCT_SensorCondData
+  - SCT_SensorsCondData
+
+@subsection Class for SCT_TdaqEnabledTool, SCT_TdaqEnabledCondAlg
+  - SCT_TdaqEnabledCondData
+  
 @section SCT_ConditionsData_SCT_ConditionsDataRefs Reference pages
 */
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibDefectData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibDefectData.cxx
index 16c948636e3552cead34be0c38715de2359c3237..05bbb3b8d42415d4ed719404d93b24bf3a261cb5 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibDefectData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibDefectData.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
 */
 
 //----------------------------------------------------------------------
@@ -8,10 +8,12 @@
 // P. Johansson
 //----------------------------------------------------------------------
 #include "SCT_ConditionsData/SCT_CalibDefectData.h"
-#include <utility>
-#include <sstream>
-#include <iostream>
+
 #include <iomanip>
+#include <iostream>
+#include <sstream>
+#include <utility>
+
 using namespace std;
 
 //----------------------------------------------------------------------
@@ -50,7 +52,7 @@ std::string SCT_CalibDefectData::str()
     txt << "No modules are in the SCT Calibration defect data map.\n";
   } else {
     CalibConditions::const_iterator itr(m_defectMap.begin());
-    for(; itr!=m_defectMap.end(); ++itr){
+    for (; itr!=m_defectMap.end(); ++itr){
       txt << itr->first << "  " << moduleText(itr->first);
     }
   }
@@ -70,12 +72,12 @@ std::string SCT_CalibDefectData::moduleText( const Identifier & moduleId ){
     txt << "\n" << left << setw(15) << "Bad strips" <<  setw(15) << "Defect type" << setw(15) << "Value:" << "\n";
     for ( unsigned int i = 0; i < thisModuleDefects.begDefects.size(); i++){
       if ( thisModuleDefects.begDefects[i] == thisModuleDefects.endDefects[i] ){
-	txt << left << setw(15) << thisModuleDefects.begDefects[i];
+        txt << left << setw(15) << thisModuleDefects.begDefects[i];
       }
       else{
-      	tmp << thisModuleDefects.begDefects[i] << " - " << thisModuleDefects.endDefects[i];
-	txt << left << setw(15) << tmp.str();
-      } 
+        tmp << thisModuleDefects.begDefects[i] << " - " << thisModuleDefects.endDefects[i];
+        txt << left << setw(15) << tmp.str();
+      }
       txt << left << setw(15) << thisModuleDefects.typeOfDefect[i];
       txt << left << setw(15) << thisModuleDefects.parValue[i] << "\n";
       tmp.str("");
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ChargeTrappingCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ChargeTrappingCondData.cxx
index cbfae1c6e2cd98a2bae0f4217ab4a600a9e29d68..0efa4406ea6aeb3c75b9df0af690e55471df81bf 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ChargeTrappingCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ChargeTrappingCondData.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
 */
 
 //----------------------------------------------------------------------
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_Chip.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_Chip.cxx
index b4807cfec42f811e2deafcf8ec9a7e99c4416546..41410501b58fda69b748de75026aa2dcef9f2fa2 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_Chip.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_Chip.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 "SCT_ConditionsData/SCT_Chip.h"
@@ -30,10 +30,10 @@ bool SCT_Chip::initializeMaskFromInts(uint32_t mask0, uint32_t mask1, uint32_t m
   uint32_t subWords[nSubwords]={mask0,mask1,mask2,mask3};
   // Put the integers into 32 bit bitsets
   std::bitset<lenSubword> subBinary;
-  for(unsigned int i{0}; i!=nSubwords; ++i) {
+  for (unsigned int i{0}; i!=nSubwords; ++i) {
     subBinary = subWords[i];
     // Put the four bitsets together in one 128 bit bitset (private member data)
-    for(unsigned int j{0}; j!=lenSubword; ++j) {
+    for (unsigned int j{0}; j!=lenSubword; ++j) {
       m_mask[i*lenSubword+j]=subBinary[j];
     }
   }
@@ -78,8 +78,7 @@ unsigned int SCT_Chip::numberOfMaskedChannels() const {
 
 // Add masked channels to the bad strip vector
 void SCT_Chip::appendBadStripsToVector(std::vector<int> & maskedChannelVector) const{  
-  for(unsigned int thisChann(0);thisChann != nBitsMask; ++thisChann){
+  for (unsigned int thisChann(0);thisChann != nBitsMask; ++thisChann){
     if (channelIsMasked(thisChann)) maskedChannelVector.push_back(thisChann);
   }
 }
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CondParameterData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CondParameterData.cxx
index 0161695e0ac08b153f7af86b767e4abadfc8a74b..40a75912de960d6ed27d2b2af351e33de2b8a743 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CondParameterData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CondParameterData.cxx
@@ -1,11 +1,11 @@
 /*
-  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 "SCT_ConditionsData/SCT_CondParameterData.h"
 
-#include <limits>
 #include <cmath>
+#include <limits>
 
 // constructor
 SCT_CondParameterData::SCT_CondParameterData() {
@@ -39,7 +39,7 @@ void SCT_CondParameterData::setValue(const IdentifierHash& idHash, const SCT_Con
 bool SCT_CondParameterData::insert(const IdentifierHash& idHash, const SCT_CondParameterData::ParameterIndex iparam, const float theValue) {
   // theValue must be valid
   if (not isValid(theValue, iparam)) return false;
-  boost::array<float,N_PARAMETERS>& paramArray = m_values[idHash];
+  std::array<float,N_PARAMETERS>& paramArray = m_values[idHash];
   // initial value should be invalid, only insert if this is the case
   if (not isValid(paramArray[iparam], iparam)) {
     paramArray[iparam] = theValue;
@@ -93,7 +93,7 @@ unsigned int SCT_CondParameterData::n(const SCT_CondParameterData::ParameterInde
 
 // Clear all data members
 void SCT_CondParameterData::clear() {
-  boost::array<float, N_PARAMETERS> init;
+  std::array<float, N_PARAMETERS> init;
   for (unsigned int i{0}; i!=N_PARAMETERS; ++i) {
     m_min[i] = std::numeric_limits<float>::max();
     m_max[i] = std::numeric_limits<float>::min();
@@ -103,8 +103,6 @@ void SCT_CondParameterData::clear() {
     init[i] = invalid(i);
   }
   
-  //initialize boost array
-  for (unsigned int i{0}; i!=N_ELEMENTS; ++i) {
-    m_values[i] = init;
-  }
+  //initialize array
+  m_values.fill(init);
 }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ConfigurationCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ConfigurationCondData.cxx
index ae7654ce10993641092de72fae455a1844576d88..e8280dbea5693657b8bd1e46830f8e682ffe4dcc 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ConfigurationCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ConfigurationCondData.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
 */
 
 //----------------------------------------------------------------------
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.cxx
index 77eb8eae0e2bef7525665e81d5b314167cc4c99c..ecadabc5b6f49e0985d71cc27038f4d9fcd2979b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.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
 */
 
 // Implementation file for the SCT DCS float data object class for HV and temperature
@@ -24,7 +24,7 @@ void SCT_DCSFloatCondData::setValue(const CondAttrListCollection::ChanNum& chanN
 // get the float value for a channel
 bool SCT_DCSFloatCondData::getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const {
   auto itr{m_channelValues.find(chanNum)};
-  if(itr!=m_channelValues.end()) {
+  if (itr!=m_channelValues.end()) {
     value = itr->second;
     return true;
   }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.cxx
index b35779ae462bcd18f17849ce9eaf226e308d661c..703cabed13e6235e88b76965d4435c7d62a4914a 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.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
 */
 
 //Implementation file for the data object class
@@ -10,6 +10,7 @@
 
 #include <iostream>
 #include <algorithm>
+
 using namespace std;
 
 //////////////////////////////////
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MajorityCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MajorityCondData.cxx
index 2f218748b99ef2cc63bf55f4012a7e1f5a54b445..c99c6a0050d6fe2ea99f986c41ac268a921b4bb5 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MajorityCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MajorityCondData.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
 */
 
 //----------------------------------------------------------------------
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ModuleVetoCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ModuleVetoCondData.cxx
index ee3b7e8331041effc1e7784999915839c9521857..d53ff6d6a2d910881d186b5b8a9576ddcd288f53 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ModuleVetoCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ModuleVetoCondData.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 "SCT_ConditionsData/SCT_ModuleVetoCondData.h"
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.cxx
index f0c2d485c9bcf79fc53b9a140160be37be1d7a46..34fc076f9207c3f7e4741d53d122b2831e30413b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_ReadoutData.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 "SCT_ConditionsData/SCT_ReadoutData.h"
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_SensorCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_SensorCondData.cxx
index 410e0f50b3015380ad3aba67dfe81d6a0bc484da..9fac11e049efc4c498db9f44738dd476daf5d811 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_SensorCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_SensorCondData.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
 */
 
 //----------------------------------------------------------------------
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx
index dca7cb6d2ba1ebe037ca25bcb3e5d815832b6a92..059500c8a4af7905b1f8d7143b1738a72c44c03b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.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
 */
 
 //----------------------------------------------------------------------
@@ -73,7 +73,7 @@ bool SCT_TdaqEnabledCondData::isNoneBad() const
 // Check if a module is good
 bool SCT_TdaqEnabledCondData::isGood(const IdentifierHash& hashId) const
 {
-  if(m_noneBad) return true;
+  if (m_noneBad) return true;
   return (m_goodIds.find(hashId)!=m_goodIds.end());
 }
 
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx
index 4cf75e1de7161c5c3ac76e9b45f1c11a4d380433..e11efe88f9d186c896124d01ebf8508ba9e63400 100644
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/SiRegSelCondAlg.cxx
@@ -65,9 +65,12 @@ StatusCode SiRegSelCondAlg::execute(const EventContext& ctx)  const
   SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
   // Do we have a valid Write Cond Handle for current time?
   if (lutCondData.isValid()) {
-    ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid."
-                  << ". In theory this should not be called, but may happen"
-                  << " if multiple concurrent events are being processed out of order.");
+    /// inpractice, this should never be called, although i serial athena, 
+    /// because the implementation of the conditions behaviour is flawed in 
+    /// the framework, this routine will be called every event (!) regardless 
+    /// of whether it should be called or not so we need this check to 
+    /// prevent unecessary code execution on out our side 
+    ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid." );
     return StatusCode::SUCCESS;
   }
  
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.cxx b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.cxx
index 7a369f29249a10760bab54f431e414c94747ce36..9b85c6fa0826915075ee41a12ed891d19d2d44b3 100644
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.cxx
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/src/TRT_RegSelCondAlg.cxx
@@ -79,6 +79,18 @@ StatusCode TRT_RegSelCondAlg::execute(const EventContext& ctx)  const
 
   ATH_MSG_DEBUG( "Creating region selector table" );
 
+  SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  if (lutCondData.isValid()) {
+    /// inpractice, this should never be called, although in serial athena,                                                                          
+    /// because the implementation of the conditions behaviour is flawed in                                                                         
+    /// the framework, this routine will be called every event (!) regardless                                                                       
+    /// of whether it should be called or not so we need this check to                                                                               
+    /// prevent unecessary code execution on out our side                                                                                            
+    ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid." );
+    return StatusCode::SUCCESS;
+  }
+
+
   StatusCode sc;
   // Retrieve manager
   const InDetDD::TRT_DetectorManager* manager;
@@ -232,7 +244,10 @@ StatusCode TRT_RegSelCondAlg::execute(const EventContext& ctx)  const
   IRegSelLUTCondData* rcd = new IRegSelLUTCondData( std::move(rd) );
   
   try { 
-    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+    /// leave this commented here since this is where it should really be,
+    /// but we had to move it up in the code to handle the flawed conditions 
+    /// handling in the serial athena use case
+    //    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
     if( lutCondData.record( id_range, rcd ).isFailure() ) {
       ATH_MSG_ERROR( "Could not record " << m_tableKey 
 		     << " " << lutCondData.key()
diff --git a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx
index 94b46cd3efe99bd7c4e23153f820f9eb663a06af..ca112a068a94deef85aae801e98735053f96814a 100644
--- a/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_Cabling/src/SCT_OnlineIdType.cxx
@@ -1,10 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "SCT_OnlineIdType.h"
 
-//STL or boost
+//STL
 #include <set>
 
 using namespace std;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt
index 29dbeae7e465188611b57c24b3989677c1755362..b52eaaf9cfc9a0b349df50d99cc94d4840805b31 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/CMakeLists.txt
@@ -26,7 +26,6 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetDetDescr/InDetIdentifier )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( Eigen )
 find_package( GeoModelCore )
@@ -35,8 +34,8 @@ find_package( GeoModelCore )
 atlas_add_component( SCT_GeoModel
 		     src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} 
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SCT_ReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier GeometryDBSvcLib )
+                     INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel InDetGeoModelUtils InDetReadoutGeometry SCT_ReadoutGeometry SGTools StoreGateLib SGtests AthenaPoolUtilities DetDescrConditions Identifier InDetIdentifier GeometryDBSvcLib )
 
 atlas_add_test( SCT_GMConfig_test
                 SCRIPT test/SCT_GMConfig_test.py
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt b/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt
index 3c14cb9820acd746a180fedcc87de0b3dca18b5f..9b54e68095ab818cd6eece1ca98e7df9c04db241 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/CMakeLists.txt
@@ -32,7 +32,6 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetRawEvent/InDetSimData )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -40,8 +39,8 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 atlas_add_component( SCT_Digitization
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CommissionEvent AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel SiDigitization InDetRawData InDetSimEvent HitManagement GeneratorObjects SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SCT_ReadoutGeometry InDetSimData )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CommissionEvent AthenaBaseComps AthenaKernel PileUpToolsLib Identifier xAODEventInfo GaudiKernel SiDigitization InDetRawData InDetSimEvent HitManagement GeneratorObjects SiPropertiesToolLib InDetIdentifier InDetReadoutGeometry SCT_ReadoutGeometry InDetSimData )
 
 atlas_add_test( SCT_DigitizationMT_test
                 SCRIPT Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --DataRunNumber 222525 --outputRDOFile mc15_2015_ttbar.RDO.pool.root --preInclude HITtoRDO:SimulationJobOptions/preInclude.SCTOnlyConfig.py,Digitization/ForceUseOfAlgorithms.py --postInclude Digitization/FixDataDependenciesForMT.py --skipEvents 0  --maxEvents 100 --athenaopts=--threads=10
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
index edd7786b7a3fdf274d0c10aeb44c50d30a1cfec9..cd5ec6f12eb9e356707a900e54a17ea593514a6f 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/TrackingCommon.py
@@ -1334,3 +1334,17 @@ def getInDetCosmicScoringTool_TRT(NewTrackingCuts, name='InDetCosmicExtenScoring
                                           **setDefaults(kwargs,
                                                         minTRTHits  = NewTrackingCuts.minSecondaryTRTonTrk(),
                                                         SummaryTool = getInDetTrackSummaryToolNoHoleSearch()))
+
+def getSolenoidParametrizationCondAlg(name='SolenoidParametrizationCondAlg',**kwargs) :
+    the_name=makeName(name,kwargs)
+    # @TODO require that the magnetid field is setup.
+    from TrkExSolenoidalIntersector.TrkExSolenoidalIntersectorConf import Trk__SolenoidParametrizationCondAlg
+    return Trk__SolenoidParametrizationCondAlg(the_name, **setDefaults(kwargs,
+                                                                       AtlasFieldCacheCondObj = 'fieldCondObj',
+                                                                       WriteKey               = 'SolenoidParametrization' ))
+
+def getSolenoidalIntersector(name="SolenoidalIntersector", **kwargs) :
+    the_name=makeName(name,kwargs)
+    createAndAddCondAlg(getSolenoidParametrizationCondAlg, "SolenoidParametrizationCondAlg")
+    from TrkExSolenoidalIntersector.TrkExSolenoidalIntersectorConf import Trk__SolenoidalIntersector
+    return Trk__SolenoidalIntersector(the_name, **setDefaults(kwargs, SolenoidParameterizationKey = 'SolenoidParametrization'))
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
index 42a525ed8a8caea777644d507cb54fb3aa6c3fdc..711e9f89e38ea6a3d83f3f3912e16d56be50b7cf 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/CMakeLists.txt
@@ -43,16 +43,15 @@ atlas_depends_on_subdirs( PUBLIC
                           MagneticField/MagFieldCondition )
 
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_component( SCT_Monitoring
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                      PUBLIC_HEADERS SCT_Monitoring
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetReadoutGeometry SCT_ReadoutGeometry InDetPrepRawData ITrackToVertex TrkTrack TrkToolInterfaces CommissionEvent AthenaKernel AthContainers Identifier InDetIdentifier InDetRawData InDetRIO_OnTrack LWHists PathResolver TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkRIO_OnTrack TrkSpacePoint TrkTrackSummary MagFieldElements MagFieldConditions )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib GaudiKernel InDetReadoutGeometry SCT_ReadoutGeometry InDetPrepRawData ITrackToVertex TrkTrack TrkToolInterfaces CommissionEvent AthenaKernel AthContainers Identifier InDetIdentifier InDetRawData InDetRIO_OnTrack LWHists PathResolver TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkRIO_OnTrack TrkSpacePoint TrkTrackSummary MagFieldElements MagFieldConditions )
 
 atlas_add_dictionary( SCT_MonitoringDict
                       SCT_Monitoring/SCT_MonitoringDict.h
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx
index 6f7285a31b93d637733273b3658ee048cf40ef26..b6922211bc134b4c4227a98d92d55f96bb2289bd 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/MergedPixelsTool.cxx
@@ -34,7 +34,6 @@
 
 using CLHEP::micrometer;
 
-constexpr double tolerance{0.001}; 
 
 namespace InDet {
   
diff --git a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h
index 1d627a9be0e638c1b8b09d809c3110905b10f823..d796ec9c561793bf18d15d5e1ba07fb441054b1f 100755
--- a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h
+++ b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadMaker_xk.h
@@ -21,7 +21,6 @@
 #include "AthenaKernel/SlotSpecificObj.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GeoModelInterfaces/IGeoModelSvc.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "GaudiKernel/AlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/MsgStream.h"
@@ -38,10 +37,9 @@
 #include "TRT_DetElementsRoadTool_xk/TRT_DetElementsLayer_xk.h"
 #include "TRT_DetElementsRoadTool_xk/TRT_DetElementsRoadData_xk.h"
 
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// MagField cache
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 #include "MagFieldElements/AtlasFieldCache.h"
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
 
 #include <atomic>
 #include <mutex>
@@ -59,23 +57,23 @@ namespace Trk {
 namespace InDet {
 
   /**
-  @class TRT_DetElementsRoadMaker_xk 
-  InDet::TRT_DetElementsRoadMaker_xk is algorithm which produce list of 
+  @class TRT_DetElementsRoadMaker_xk
+  InDet::TRT_DetElementsRoadMaker_xk is algorithm which produce list of
   InDetDD::TRT_BaseElement* sorted in propagation order.
-  @author Igor.Gavrilenko@cern.ch     
+  @author Igor.Gavrilenko@cern.ch
   */
 
 
-  class TRT_DetElementsRoadMaker_xk : 
+  class TRT_DetElementsRoadMaker_xk :
 
     virtual public ITRT_DetElementsRoadMaker, public AthAlgTool
     {
       ///////////////////////////////////////////////////////////////////
       // Public methods:
       ///////////////////////////////////////////////////////////////////
-      
+
     public:
-      
+
       ///////////////////////////////////////////////////////////////////
       // Standard tool methods
       ///////////////////////////////////////////////////////////////////
@@ -89,7 +87,7 @@ namespace InDet {
       ///////////////////////////////////////////////////////////////////
       // Main methods for road builder
       ///////////////////////////////////////////////////////////////////
-      
+
       virtual void detElementsRoad
 	(const EventContext& ctx,
          MagField::AtlasFieldCache& fieldCache,
@@ -112,11 +110,12 @@ namespace InDet {
 
     private :
 
-      SG::ReadCondHandleKey<TRT_DetElementsRoadData_xk> m_roadDataKey{this, "RoadDataKey",                       
-        "TRT_DetElementsRoadData_xk", "Key of TRT_DetElementsRoadData_xk"}; 
+      SG::ReadCondHandleKey<TRT_DetElementsRoadData_xk> m_roadDataKey{this, "RoadDataKey",
+        "TRT_DetElementsRoadData_xk", "Key of TRT_DetElementsRoadData_xk"};
+
+      SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this,"AtlasFieldCacheCondObj", "fieldCondObj",
+        "Name of the Magnetic Field conditions object key"}; // Necessary only for dumpConditions method
 
-      ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle;
-      MagField::IMagFieldSvc*               m_fieldService{}      ;
       ServiceHandle<IGeoModelSvc>           m_geoModelSvc{this, "GeoModelSvc", "GeoModelSvc"};
       ToolHandle<Trk::IPropagator>          m_proptool ;  // Propagator     tool
 
@@ -130,9 +129,9 @@ namespace InDet {
       // Methods
       ///////////////////////////////////////////////////////////////////
 
-      void detElementsRoadATL(std::list<Amg::Vector3D>&, 
+      void detElementsRoadATL(std::list<Amg::Vector3D>&,
 			      std::vector<const InDetDD::TRT_BaseElement*>&) const;
-      void detElementsRoadCTB(std::list<Amg::Vector3D>&, 
+      void detElementsRoadCTB(std::list<Amg::Vector3D>&,
 			      std::vector<const InDetDD::TRT_BaseElement*>&) const;
       double stepToDetElement
 	(const InDetDD::TRT_BaseElement*&,Amg::Vector3D&,Amg::Vector3D&) const;
@@ -176,4 +175,3 @@ namespace InDet {
 } // end of name space
 
 #endif // TRT_DetElementsRoadMaker_xk_H
-
diff --git a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/src/TRT_DetElementsRoadMaker_xk.cxx b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/src/TRT_DetElementsRoadMaker_xk.cxx
index 8d07b0435c15da2e272ce4d9fd34e4355f5c36ee..2ae0916db5cb3893dd5c6e4a499dfda724d03391 100755
--- a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/src/TRT_DetElementsRoadMaker_xk.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/src/TRT_DetElementsRoadMaker_xk.cxx
@@ -41,7 +41,6 @@
 InDet::TRT_DetElementsRoadMaker_xk::TRT_DetElementsRoadMaker_xk
 (const std::string& t,const std::string& n,const IInterface* p)
   : AthAlgTool(t,n,p)                                          ,
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
     m_proptool   ("Trk::RungeKuttaPropagator/InDetPropagator" )
 {
   m_width       = 10.                        ;
@@ -53,11 +52,10 @@ InDet::TRT_DetElementsRoadMaker_xk::TRT_DetElementsRoadMaker_xk
   declareProperty("MaxStep"              ,m_step       );
   declareProperty("PropagatorTool"       ,m_proptool   );
   declareProperty("MagneticFieldMode"    ,m_fieldmode  );
-  declareProperty("MagFieldSvc"          , m_fieldServiceHandle);
 }
 
 ///////////////////////////////////////////////////////////////////
-// Destructor  
+// Destructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::TRT_DetElementsRoadMaker_xk::~TRT_DetElementsRoadMaker_xk()
@@ -70,25 +68,13 @@ InDet::TRT_DetElementsRoadMaker_xk::~TRT_DetElementsRoadMaker_xk()
 
 StatusCode InDet::TRT_DetElementsRoadMaker_xk::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
- 
-  // Get magnetic field service
-  //
-  if(m_fieldmode != "NoField" ) {
-    
-    if( !m_fieldServiceHandle.retrieve() ){
-      ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
-      return StatusCode::FAILURE;
-    }    
-    ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-    m_fieldService = &*m_fieldServiceHandle;
-  }
+  StatusCode sc = AlgTool::initialize();
+
   if(m_fieldmode == "NoField") m_fieldModeEnum = Trk::NoField;
   else if(m_fieldmode == "MapSolenoid") m_fieldModeEnum = Trk::FastField;
   else m_fieldModeEnum = Trk::FullField;
-  
+
   // Get propagator tool
-  //
   if (m_proptool.retrieve().isFailure() ) {
     ATH_MSG_FATAL("Failed to retrieve tool " << m_proptool);
     return StatusCode::FAILURE;
@@ -97,6 +83,8 @@ StatusCode InDet::TRT_DetElementsRoadMaker_xk::initialize()
   }
 
   ATH_CHECK(m_roadDataKey.initialize());
+  ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
+  ATH_MSG_INFO("initialize() init key: " << m_fieldCacheCondObjInputKey.key());
 
   return sc;
 }
@@ -133,10 +121,16 @@ MsgStream& InDet::TRT_DetElementsRoadMaker_xk::dumpConditions( MsgStream& out )
 			     "UndefinedField","AthenaField"  , "?????"         };
 
   Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-  if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+  SG::ReadCondHandle<AtlasFieldCacheCondObj> fieldHandle(m_fieldCacheCondObjInputKey);
+  const AtlasFieldCacheCondObj* fieldCondObj{*fieldHandle};
+  if (fieldCondObj) {
+    MagField::AtlasFieldCache fieldCache;
+    fieldCondObj->getInitializedCache (fieldCache);
+    if(!fieldCache.solenoidOn()) fieldModeEnum = Trk::NoField;
+  }
   Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
   int mode = fieldprop.magneticFieldMode();
-  if(mode<0 || mode>8 ) mode = 8; 
+  if(mode<0 || mode>8 ) mode = 8;
 
   n     = 62-fieldmode[mode].size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
@@ -286,7 +280,7 @@ std::ostream& InDet::TRT_DetElementsRoadMaker_xk::dump( std::ostream& out ) cons
 }
 
 ///////////////////////////////////////////////////////////////////
-// Main methods for road builder 
+// Main methods for road builder
 ///////////////////////////////////////////////////////////////////
 
 void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
@@ -296,8 +290,8 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
  std::vector<const InDetDD::TRT_BaseElement*>& R) const
 {
 
-  double qp   = fabs(500.*Tp.parameters()[4]) ; if( qp < 1.e-10  ) qp = 1.e-10; 
-  double S    = m_step/qp                     ; if( S  > 200.    ) S  = 200.  ; if(D<0) S=-S; 
+  double qp   = fabs(500.*Tp.parameters()[4]) ; if( qp < 1.e-10  ) qp = 1.e-10;
+  double S    = m_step/qp                     ; if( S  > 200.    ) S  = 200.  ; if(D<0) S=-S;
 
   Trk::CylinderBounds CB = getBound(fieldCache, Tp);
 
@@ -305,7 +299,7 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
 
   if( CB.r() > rminTRT) {
     Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
-    if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+    if(!fieldCache.solenoidOn()) fieldModeEnum = Trk::NoField;
     Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
 
     std::list<Amg::Vector3D> G;
@@ -313,7 +307,7 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
 
     if(G.size() > 1 ) {
       detElementsRoadATL(G,R);
-    }  
+    }
   }
 
   if (msgLvl(MSG::VERBOSE)) {
@@ -324,7 +318,7 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
 }
 
 ///////////////////////////////////////////////////////////////////
-// Main methods for road builder 
+// Main methods for road builder
 ///////////////////////////////////////////////////////////////////
 
 void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
@@ -347,10 +341,10 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
  if(r==re) return;
 
  Trk::MagneticFieldMode fieldModeEnum(m_fieldModeEnum);
- if(!m_fieldService->solenoidOn()) fieldModeEnum = Trk::NoField;
+ if(!fieldCache.solenoidOn()) fieldModeEnum = Trk::NoField;
  Trk::MagneticFieldProperties fieldprop(fieldModeEnum);
 
- const Trk::TrackParameters* tp0 = 
+ const Trk::TrackParameters* tp0 =
    m_proptool->propagate(ctx, Tp,(*r)->surface(),D,false,fieldprop,Trk::pion);
  if(!tp0) return;
 
@@ -358,8 +352,8 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoad
  R.push_back(EP0);
 
  for(++r; r!=re; ++r) {
-   
-   const Trk::TrackParameters* tp = 
+
+   const Trk::TrackParameters* tp =
      m_proptool->propagate(ctx, (*tp0),(*r)->surface(),D,false,fieldprop,Trk::pion);
    if(!tp) return;
 
@@ -411,13 +405,13 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadATL
     float st = sqrt(dx*dx+dy*dy+dz*dz); if(st <=0.) continue;
     float ds = 1./st;
     float A[3]= {dx*ds,dy*ds,dz*ds};
-   
+
     // Barrel
     //
     if(Pn[3]>Po[3]) {
       for(; n1<(int)layer[1].size(); ++n1) {
 
-	if(Pn[3] < layer[1][n1].r()) break; 
+	if(Pn[3] < layer[1][n1].r()) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
 	layer[1][n1].getBarrelDetElementsATL(Po,A,lDE,used[1][n1]);
 
@@ -425,7 +419,7 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadATL
     }
     else     {
       for(--n1; n1>=0; --n1) {
-	if(Pn[3] > layer[1][n1].r()) break; 
+	if(Pn[3] > layer[1][n1].r()) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
 	layer[1][n1].getBarrelDetElementsATL(Po,A,lDE,used[1][n1]);
      }
@@ -437,36 +431,36 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadATL
     if(Pn[2]>Po[2]) {
 
       for(; n2<(int)layer[2].size(); ++n2) {
-	if(Pn[2] < layer[2][n2].z()) break; 
+	if(Pn[2] < layer[2][n2].z()) break;
         assert( used.at(2).size()> static_cast<unsigned int>(n2));
 	layer[2][n2].getEndcapDetElements(Po,A,lDE,used[2][n2]);
       }
     }
     else     {
       for(--n2; n2>=0; --n2) {
-	if(Pn[2] > layer[2][n2].z()) break; 
+	if(Pn[2] > layer[2][n2].z()) break;
         assert( used.at(2).size() > static_cast<unsigned int>(n2));
 	layer[2][n2].getEndcapDetElements(Po,A,lDE,used[2][n2]);
       }
       ++n2;
     }
-    
+
     // Negative endcap
     //
     if(Pn[2]<Po[2]) {
 
       for(; n0<(int)layer[0].size(); ++n0) {
-	if(Pn[2] > layer[0][n0].z()) break; 
+	if(Pn[2] > layer[0][n0].z()) break;
         assert( used.at(0).size() > static_cast<unsigned int>(n0));
 	layer[0][n0].getEndcapDetElements(Po,A,lDE,used[0][n0]);
       }
     }
      else   {
       for(--n0; n0>=0; --n0) {
-	if(Pn[2] < layer[0][n0].z()) break; 
+	if(Pn[2] < layer[0][n0].z()) break;
         assert( used.at(0).size() > static_cast<unsigned int>(n0));
 	layer[0][n0].getEndcapDetElements(Po,A,lDE,used[0][n0]);
-      } 
+      }
       ++n0;
     }
     Po[0] = Pn[0];
@@ -483,10 +477,10 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadATL
 
   bool nc =true;
   while(nc) {
- 
+
     nc =false; m=l; n=l;
     for(++n; n!=le; ++n) {
-   
+
       if( (*m).second > (*n).second ) {
          std::pair<const InDet::TRT_DetElementLink_xk*,float>  d=(*m); (*m)=(*n); (*n)=d; nc=true;
       }
@@ -545,14 +539,14 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadCTB
     //
     if(Pn[3]>Po[3]) {
       for(; n1<(int)layer[1].size(); ++n1) {
-	if(Pn[3] < layer[1][n1].r()) break; 
+	if(Pn[3] < layer[1][n1].r()) break;
         assert( used.at(1).size() > static_cast<unsigned int>(n1) );
 	layer[1][n1].getBarrelDetElementsCTB(Po,A,lDE,used[1][n1]);
       }
     }
     else     {
       for(--n1; n1>=0; --n1) {
-	if(Pn[3] > layer[1][n1].r()) break; 
+	if(Pn[3] > layer[1][n1].r()) break;
 	layer[1][n1].getBarrelDetElementsCTB(Po,A,lDE,used[1][n1]);
       }
       ++n1;
@@ -569,7 +563,7 @@ void InDet::TRT_DetElementsRoadMaker_xk::detElementsRoadCTB
 
     nc =false; n=l;
     for(++n; n!=le; ++n) {
-   
+
       if( (*l).second > (*n).second ) {
          std::pair<const InDet::TRT_DetElementLink_xk*,float> d = (*l); (*l) = (*n); (*n) = d;
          nc = true;
@@ -608,14 +602,10 @@ Trk::CylinderBounds InDet::TRT_DetElementsRoadMaker_xk::getBound
   const double cor = 0.8;
 
   double zfield = 0.;
-  if(m_fieldModeEnum!=Trk::NoField && m_fieldService->solenoidOn()) {
+  if(m_fieldModeEnum!=Trk::NoField && fieldCache.solenoidOn()) {
     const Amg::Vector3D& pos = Tp.position();
     double f[3], p[3] ={pos[Amg::x],pos[Amg::y],pos[Amg::z]};
-
-    //   MT version uses cache, temporarily keep old version
-    if (fieldCache.useNewBfieldCache()) fieldCache.getFieldZR  (p, f);
-    else                                m_fieldService->getFieldZR(p,f);
-
+    fieldCache.getFieldZR  (p, f);
     zfield =  299.7925*f[2];
   }
 
@@ -624,7 +614,7 @@ Trk::CylinderBounds InDet::TRT_DetElementsRoadMaker_xk::getBound
   if( fabs(zfield) < .0000001    ) return bounds;
 
   const AmgVector(5)&  Vp = Tp.parameters();
-  
+
   double cur  = zfield*Vp[4]/sin(Vp[3]);
 
   if( fabs(cur)*bounds.r() < cor ) return bounds;
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/CMakeLists.txt b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/CMakeLists.txt
index 614756b5db99af30169a6520d3d3c594bba2e3a5..f38d0d74a1896bd256212904020d901787ab0253 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/CMakeLists.txt
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/CMakeLists.txt
@@ -5,33 +5,6 @@
 # Declare the package name:
 atlas_subdir( TRT_ElectronPidTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          InnerDetector/InDetConditions/TRT_ConditionsServices
-                          InnerDetector/InDetRecEvent/InDetPrepRawData
-                          InnerDetector/InDetRecTools/TRT_DriftFunctionTool
-                          Tracking/TrkEvent/TrkEventPrimitives
-			  Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkTools/TrkToolInterfaces
-			  Tracking/TrkEvent/TrkTrack
-                          InnerDetector/InDetConditions/TRT_ConditionsData
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/Identifier
-			  Event/xAOD/xAODEventInfo
-                          InnerDetector/InDetDetDescr/InDetIdentifier
-                          InnerDetector/InDetRawEvent/InDetRawData
-			  InnerDetector/InDetDetDescr/InDetReadoutGeometry
-			  InnerDetector/InDetDetDescr/TRT_ReadoutGeometry
-                          InnerDetector/InDetRecEvent/InDetRIO_OnTrack
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkMeasurementBase
-                          Tracking/TrkEvent/TrkRIO_OnTrack )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
index 52f87cab93e42b59c8dbc586863c5e785e98bad0..3da3e2d41d60923316d2a840b9402cb7f9c7b950 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.cxx
@@ -5,7 +5,7 @@
 //
 //  !!!!!! Problem with calibration constants for mean ToT on the tracks (norm_ ...) !!!!!!!
 //
-#include "TRT_ElectronPidTools/TRT_ToT_dEdx.h"
+#include "TRT_ToT_dEdx.h"
 #include "TRT_ElectronPidTools/TRT_ToT_Corrections.h"
 
 
@@ -16,7 +16,6 @@
 #include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h"
 
 #include "TrkSurfaces/Surface.h"
-#include "xAODEventInfo/EventInfo.h"
 
 #include "GaudiKernel/IChronoStatSvc.h"
 
@@ -25,6 +24,7 @@
 #include "StoreGate/DataHandle.h"
 #include "StoreGate/ReadHandle.h"
 #include "StoreGate/ReadCondHandle.h"
+#include "StoreGate/ReadDecorHandle.h"
 #include <cmath>
 #include <limits>
 
@@ -123,7 +123,7 @@ StatusCode TRT_ToT_dEdx::initialize()
   }
  
   // Initialize ReadHandleKey and ReadCondHandleKey
-  ATH_CHECK(m_eventInfoKey.initialize());
+  ATH_CHECK(m_rdhkEvtInfo.initialize());
   ATH_CHECK(m_ReadKey.initialize());
   ATH_CHECK(m_trtDetEleContKey.initialize());
   //Get AssoTool
@@ -310,22 +310,21 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
   ATH_MSG_DEBUG("dEdx()");
 
   double nVtx=-1.;
-  // Event information 
-  SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey);
-  if (!eventInfo.isValid()){
-    REPORT_MESSAGE(MSG::FATAL) << "Cannot retrieve EventInfo";
+  // Event information
+  SG::ReadDecorHandle<xAOD::EventInfo,float> eventInfoDecor(m_rdhkEvtInfo);
+  if(!eventInfoDecor.isPresent()) {
+    REPORT_MESSAGE(MSG::FATAL) << "EventInfo decoration not available!";
     return 0;
   }
- 
+
   //    Average interactions per crossing for the current BCID
-  double mu = -1.;
-  mu = eventInfo->averageInteractionsPerCrossing();
+  double mu = eventInfoDecor(0);
   if(m_isData) {
     nVtx = 1.3129 + 0.716194*mu + (-0.00475074)*mu*mu;
   }
-  else
+  else {
     nVtx = 1.0897 + 0.748287*mu + (-0.00421788)*mu*mu;
-
+  }
 
   if (!track) {
     return 0;
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ToT_dEdx.h b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
similarity index 98%
rename from InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ToT_dEdx.h
rename to InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.h
index 918048516b5c82781dfa837b941111fe1f782582..0943dc20d1ff9adc0dd04d963a7b5016f4669fff 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/TRT_ElectronPidTools/TRT_ToT_dEdx.h
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ToT_dEdx.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_TOT_DEDX_H
@@ -10,8 +10,7 @@
 #include "AthenaBaseComps/AthAlgTool.h" //MJ
 #include "GaudiKernel/IToolSvc.h"  //MJ
 #include "TrkEventPrimitives/ParticleHypothesis.h"
-//#include "AthenaKernel/IIOVDbSvc.h"
-//#include "AthenaKernel/IIOVSvc.h"
+#include "StoreGate/ReadDecorHandleKey.h"
 
 #include "TRT_ElectronPidTools/ITRT_ToT_dEdx.h"
 
@@ -66,7 +65,10 @@ public:
   enum EToTEstimatorType {kToTLargerIsland,kToTHighOccupancy,kToTHighOccupancySmart};
 
 private:
-  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK to retrieve xAOD::EventInfo"};
+  SG::ReadDecorHandleKey<xAOD::EventInfo> m_rdhkEvtInfo {this
+      , "AveIntPerXKey"
+      , "EventInfo.AveIntPerXDecor"
+      , "Decoration for Average Interaction Per Crossing"};
   SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> m_trtDetEleContKey{this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer for TRT"};
   const TRT_ID* m_trtId;                                                // ID TRT helper 
   Trk::ParticleMasses        m_particlemasses;
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/components/TRT_ElectronPidTools_entries.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/components/TRT_ElectronPidTools_entries.cxx
index 8e958e5ff8c44497a4064b9f741f8f9969dd29ba..b72041c7bb86e14e0571fbd0fa3a39fee1ed245b 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/components/TRT_ElectronPidTools_entries.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/components/TRT_ElectronPidTools_entries.cxx
@@ -1,7 +1,7 @@
 #include "TRT_ElectronPidTools/BaseTRTPIDCalculator.h"
 #include "TRT_ElectronPidTools/TRT_ElectronPidToolRun2.h"
 #include "TRT_ElectronPidTools/TRT_LocalOccupancy.h"
-#include "TRT_ElectronPidTools/TRT_ToT_dEdx.h"
+#include "../TRT_ToT_dEdx.h"
 
 DECLARE_COMPONENT( InDet::TRT_ElectronPidToolRun2 )
 DECLARE_COMPONENT( InDet::TRT_LocalOccupancy )
diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h
index 04b9b2241a52aedf8dc1c003397cd8c967cc6f74..9b206371fbbdb6967b2b133d43d983bcc1559137 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h
+++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h
@@ -6,7 +6,7 @@
   Header file for class TRT_SeededSpacePointFinder_ATL
   (c) ATLAS Detector software
   Class for Si seed candidates generation using space point information
-  Version 1.0: 04/15/2006 
+  Version 1.0: 04/15/2006
   Authors: Thomas Koffas
   email  : Thomas.Koffas@cern.ch
 ********************************************************************************/
@@ -21,21 +21,19 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 
-#include "TrkSpacePoint/SpacePointContainer.h" 
-#include "TrkSpacePoint/SpacePointOverlapCollection.h" 
+#include "TrkSpacePoint/SpacePointContainer.h"
+#include "TrkSpacePoint/SpacePointOverlapCollection.h"
 
 #include "InDetRecToolInterfaces/ITRT_SeededSpacePointFinder.h"
 #include "TrkEventUtils/EventDataBase.h"
 
 #include "TrkGeometry/MagneticFieldProperties.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 
 #include "TrkEventUtils/PRDtoTrackMap.h"
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
 // MagField cache
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 #include "MagFieldElements/AtlasFieldCache.h"
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 #include <list>
 #include <vector>
@@ -58,22 +56,22 @@ namespace InDet{
 namespace InDet{
 
   /**
-  @class TRT_SeededSpacePointFinder_ATL 
-  
+  @class TRT_SeededSpacePointFinder_ATL
+
   InDet::TRT_SeededSpacePointFinderATL is a tool which produces Si track
   seeds using pairs of space points in the last 3 layers of the SCT.
-  @author Thomas.Koffas@cern.ch     
+  @author Thomas.Koffas@cern.ch
   */
 
-  class TRT_SeededSpacePointFinder_ATL : 
+  class TRT_SeededSpacePointFinder_ATL :
     virtual public ITRT_SeededSpacePointFinder, public AthAlgTool
     {
       ///////////////////////////////////////////////////////////////////
       // Public methods:
       ///////////////////////////////////////////////////////////////////
-      
+
     public:
-      
+
       ///////////////////////////////////////////////////////////////////
       /** Standard tool methods                                        */
       ///////////////////////////////////////////////////////////////////
@@ -92,7 +90,7 @@ namespace InDet{
       std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> newRegion
 	(const std::vector<IdentifierHash>&,
          const std::vector<IdentifierHash>&) const;
-      
+
       ///////////////////////////////////////////////////////////////////
       /** Main method of seed production                               */
       ///////////////////////////////////////////////////////////////////
@@ -104,9 +102,9 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       /** Iterator through seed collection.Not used in this implementation */
       ///////////////////////////////////////////////////////////////////
-      
+
       const SiSpacePointsSeed* next(ITRT_SeededSpacePointFinder::IEventData &event_data) const;
-      
+
       ///////////////////////////////////////////////////////////////////
       /** Print internal tool parameters and status                    */
       ///////////////////////////////////////////////////////////////////
@@ -115,15 +113,12 @@ namespace InDet{
       std::ostream& dump          (std::ostream& out) const;
 
     protected:
-      
+
       ///////////////////////////////////////////////////////////////////
       /** Protected data and methods                                   */
       ///////////////////////////////////////////////////////////////////
-      
-      std::string                            m_fieldmode             ;  /** Magnetic field mode  */
-      ServiceHandle<MagField::IMagFieldSvc>    m_fieldServiceHandle             ;  /** Magnetic field tool name  */
 
-      MagField::IMagFieldSvc*                m_fieldService;
+      std::string                            m_fieldmode             ;  /** Magnetic field mode  */
 
       Trk::MagneticFieldProperties           m_fieldprop             ;  /** Magnetic field properties  */
 
@@ -134,7 +129,7 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       /** Seed selection criteria                                      */
       ///////////////////////////////////////////////////////////////////
-     
+
       double                         m_ptmin                         ;  /** Minimum pT cut   */
       double                         m_r_rmin                        ;  /** Minimum SCT radius to be searched  */
       double                         m_r_rmax                        ;  /** Maximum STC radius to be searched  */
@@ -196,17 +191,16 @@ namespace InDet{
       /** Space points containers                                      */
       ///////////////////////////////////////////////////////////////////
 
-      SG::ReadHandleKey<SpacePointContainer>         m_spacepointsPixname {this,"SpacePointsPixelName","PixelSpacePoints","RHK to retrieve Pixel SpacePointContainer"}            ;  
-      SG::ReadHandleKey<SpacePointContainer>         m_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"}           ;         
-      SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapname {this,"SpacePointsOverlapName","OverlapSpacePoints","RHK to retrieve OverlapCollection"}        ; 
+      SG::ReadHandleKey<SpacePointContainer>         m_spacepointsPixname {this,"SpacePointsPixelName","PixelSpacePoints","RHK to retrieve Pixel SpacePointContainer"}            ;
+      SG::ReadHandleKey<SpacePointContainer>         m_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"}           ;
+      SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapname {this,"SpacePointsOverlapName","OverlapSpacePoints","RHK to retrieve OverlapCollection"}        ;
       SG::ReadHandleKey<Trk::PRDtoTrackMap>          m_prdToTrackMap
          {this,"PRDtoTrackMap",""};
 
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       // Read handle for conditions object to get the field cache
-      SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
-                                                                            "Name of the Magnetic Field conditions object key"};
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+      SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj",
+        "fieldCondObj", "Name of the Magnetic Field conditions object key"};
+
       ///////////////////////////////////////////////////////////////////
       /** Protected methods                                            */
       ///////////////////////////////////////////////////////////////////
@@ -247,13 +241,13 @@ namespace InDet{
 
       // place to keep scalar values needed for cuts, common to all seeds
       // updated only once per production2Sp call instead or each cutTPb
-      struct invar_bypass_struct { 
+      struct invar_bypass_struct {
 	  double min_theta, max_theta, min_phi, max_phi, invp_min, invp_max,
 	  invp_min2, invp_max2;
       };
-      
+
       /** Cut on chi2 based on TRT segment qOverP, theta and phi track parameters */
- 
+
       // // // // // // // // // // // // // // // // //
       bool cutTPb(const invar_bypass_struct &invar_bypass, const std::vector<bypass_struct> &prod_bypass,long, long, double) const;
       // // // // // // // // // // // // // // // // //
@@ -269,8 +263,7 @@ namespace InDet{
     {
       return 0;
     }
-  
+
 } // end of name space
 
 #endif // TRT_SeededSpacePointFinder_ATL_H
-
diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx
index 88bdb9da11bf66dd8205d7a1f76fa528d1ad8629..25b527c91cce00295583184864858a7c9ca70a45 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx
+++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/src/TRT_SeededSpacePointFinder_ATL.cxx
@@ -14,7 +14,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "CLHEP/Vector/ThreeVector.h"
-#include "TrkSpacePoint/SpacePointCLASS_DEF.h" 
+#include "TrkSpacePoint/SpacePointCLASS_DEF.h"
 #include "TRT_SeededSpacePointFinderTool/TRT_SeededSpacePointFinder_ATL.h"
 #include "SiSpacePointsSeed/SiSpacePointsSeed.h"
 
@@ -43,8 +43,6 @@ using namespace std;
 InDet::TRT_SeededSpacePointFinder_ATL::TRT_SeededSpacePointFinder_ATL
 (const std::string& t,const std::string& n,const IInterface* p)
   : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n),
-    m_fieldService(nullptr),
     m_sctId(nullptr)
 {
   m_fieldmode = "MapSolenoid"              ;
@@ -67,10 +65,9 @@ InDet::TRT_SeededSpacePointFinder_ATL::TRT_SeededSpacePointFinder_ATL
   m_loadFull  = true    ;  //Load all the Si space points, otherwise only from the last 3 SCT layers
   m_doCosmics = false   ;  //Disable seed selection cuts when reconstructing cosmics tracks
 
-  
+
   declareInterface<ITRT_SeededSpacePointFinder>(this);
 
-  declareProperty("MagneticTool"          ,m_fieldServiceHandle    );
   declareProperty("MagneticFieldMode"     ,m_fieldmode             );
   declareProperty("pTmin"                 ,m_ptmin                 );
   declareProperty("NeighborSearch"        ,m_search                );
@@ -83,7 +80,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::TRT_SeededSpacePointFinder_ATL
 }
 
 ///////////////////////////////////////////////////////////////////
-// Destructor  
+// Destructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::TRT_SeededSpacePointFinder_ATL::~TRT_SeededSpacePointFinder_ATL()
@@ -96,27 +93,11 @@ InDet::TRT_SeededSpacePointFinder_ATL::~TRT_SeededSpacePointFinder_ATL()
 
 StatusCode InDet::TRT_SeededSpacePointFinder_ATL::initialize()
 {
- 
-  
-  // Get magnetic field service
-  if(m_fieldmode != "NoField" ) {
-    
-    if( !m_fieldServiceHandle.retrieve() ){
-      ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
-      return StatusCode::FAILURE;
-    }   
-    ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-    m_fieldService = &*m_fieldServiceHandle;
-  }
-
-  magneticFieldInit(); 
+  magneticFieldInit();
 
   // PRD-to-track association (optional)
   ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty()));
-
-  ////////////////////////////////////////////////////////////////////////////////
   ATH_CHECK( m_fieldCondObjInputKey.initialize());
-  ////////////////////////////////////////////////////////////////////////////////
   StatusCode sc = detStore()->retrieve(m_sctId, "SCT_ID");
   if (sc.isFailure()){
     msg(MSG::FATAL) << "Could not get SCT_ID helper !" << endmsg;
@@ -132,7 +113,7 @@ StatusCode InDet::TRT_SeededSpacePointFinder_ATL::initialize()
 
   ATH_CHECK(m_spacepointsPixname.initialize());
   ATH_CHECK(m_spacepointsSCTname.initialize());
-  ATH_CHECK(m_spacepointsOverlapname.initialize()); 
+  ATH_CHECK(m_spacepointsOverlapname.initialize());
 
   return sc;
 }
@@ -148,7 +129,7 @@ StatusCode InDet::TRT_SeededSpacePointFinder_ATL::finalize()
 }
 
 ///////////////////////////////////////////////////////////////////
-// Initialize tool for new event 
+// Initialize tool for new event
 ///////////////////////////////////////////////////////////////////
 
 std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData>
@@ -164,11 +145,11 @@ InDet::TRT_SeededSpacePointFinder_ATL::newEvent () const
   r_Sorted.resize(event_data_p->m_r_size);
 
   if(m_loadFull){
-    // Get pixel space points containers from store gate 
+    // Get pixel space points containers from store gate
     //
     SG::ReadHandle<SpacePointContainer> spacepointsPix(m_spacepointsPixname);
     if (spacepointsPix.isValid()) {
-     SpacePointContainer::const_iterator spc =  spacepointsPix->begin  (); 
+     SpacePointContainer::const_iterator spc =  spacepointsPix->begin  ();
       SpacePointContainer::const_iterator spce =  spacepointsPix->end  ();
 
       for(; spc != spce; ++spc) {
@@ -178,8 +159,8 @@ InDet::TRT_SeededSpacePointFinder_ATL::newEvent () const
         for(; sp != spe; ++sp) {
 
 	  double r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  int   ir = int(r*irstep); 
-	  const Trk::SpacePoint* sps = (*sp); 
+	  int   ir = int(r*irstep);
+	  const Trk::SpacePoint* sps = (*sp);
           r_Sorted[ir].push_back(sps);
           ++event_data_p->m_r_map[ir];
 	  if(event_data_p->m_r_map[ir]==1) event_data_p->m_r_index[event_data_p->m_nr++] = ir;
@@ -219,8 +200,8 @@ InDet::TRT_SeededSpacePointFinder_ATL::newEvent () const
         }
 
         double r = (*sp)->r(); if(r<r_rmin || r>=m_r_rmax) continue;
-	int   ir = int(r*irstep); 
-	const Trk::SpacePoint* sps = (*sp); 
+	int   ir = int(r*irstep);
+	const Trk::SpacePoint* sps = (*sp);
         r_Sorted[ir].push_back(sps); ++event_data_p->m_r_map[ir];
 	if(event_data_p->m_r_map[ir]==1) event_data_p->m_r_index[event_data_p->m_nr++] = ir;
 	++event_data_p->m_ns;
@@ -228,7 +209,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::newEvent () const
     }
   }
 
-  // Get sct overlap space points containers from store gate 
+  // Get sct overlap space points containers from store gate
   //
   SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap(m_spacepointsOverlapname);
   if (spacepointsOverlap.isValid()) {
@@ -245,8 +226,8 @@ InDet::TRT_SeededSpacePointFinder_ATL::newEvent () const
       }
 
       double r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-      int   ir = int(r*irstep); 
-      const Trk::SpacePoint* sps = (*sp); 
+      int   ir = int(r*irstep);
+      const Trk::SpacePoint* sps = (*sp);
       r_Sorted[ir].push_back(sps); ++event_data_p->m_r_map[ir];
       if(event_data_p->m_r_map[ir]==1) event_data_p->m_r_index[event_data_p->m_nr++] = ir;
       ++event_data_p->m_ns;
@@ -273,7 +254,7 @@ std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> InDet::TRT_Seede
   double irstep = 1./m_r_rstep;
 
   if(m_loadFull && vPixel.size()){
-    // Get pixel space points containers from store gate 
+    // Get pixel space points containers from store gate
     //
     SG::ReadHandle<SpacePointContainer> spacepointsPix(m_spacepointsPixname);
     if (spacepointsPix.isValid()) {
@@ -284,7 +265,7 @@ std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> InDet::TRT_Seede
       // Loop through all trigger collections
       //
       for(; l!=le; ++l) {
-	
+
 	SpacePointContainer::const_iterator  w =  spacepointsPix->indexFind((*l));
 	if(w==spce) continue;
 
@@ -294,8 +275,8 @@ std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> InDet::TRT_Seede
         for(; sp != spe; ++sp) {
 
 	  double r = (*sp)->r(); if(r<0. || r>=m_r_rmax) continue;
-	  int   ir = int(r*irstep); 
-	  const Trk::SpacePoint* sps = (*sp); 
+	  int   ir = int(r*irstep);
+	  const Trk::SpacePoint* sps = (*sp);
           r_Sorted[ir].push_back(sps); ++event_data_p->m_r_map[ir];
 	  if(event_data_p->m_r_map[ir]==1) event_data_p->m_r_index[event_data_p->m_nr++] = ir;
 	  ++event_data_p->m_ns;
@@ -304,7 +285,7 @@ std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> InDet::TRT_Seede
     }
   }
 
-  // Get sct space points containers from store gate 
+  // Get sct space points containers from store gate
   //
   if(vSCT.size()) {
 
@@ -343,8 +324,8 @@ std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> InDet::TRT_Seede
           }
 
           double r = (*sp)->r(); if(r<r_rmin || r>=m_r_rmax) continue;
-	  int   ir = int(r*irstep); 
-	  const Trk::SpacePoint* sps = (*sp); 
+	  int   ir = int(r*irstep);
+	  const Trk::SpacePoint* sps = (*sp);
           r_Sorted[ir].push_back(sps); ++event_data_p->m_r_map[ir];
 	  if(event_data_p->m_r_map[ir]==1) event_data_p->m_r_index[event_data_p->m_nr++] = ir;
 	  ++event_data_p->m_ns;
@@ -405,7 +386,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::find2Sp(const EventContext& ctx,
 
 MsgStream& InDet::TRT_SeededSpacePointFinder_ATL::dumpConditions( MsgStream& out ) const
 {
-  int n = 42-m_fieldServiceHandle.type().size();
+  int n = 42-m_fieldCondObjInputKey.key().size();
   std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
   n     = 42-m_spacepointsSCTname.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
@@ -416,15 +397,15 @@ MsgStream& InDet::TRT_SeededSpacePointFinder_ATL::dumpConditions( MsgStream& out
 			     "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
 			     "UndefinedField","AthenaField"  , "?????"         };
 
-  int mode = m_fieldprop.magneticFieldMode(); 
-  if(mode<0 || mode>8 ) mode = 8; 
+  int mode = m_fieldprop.magneticFieldMode();
+  if(mode<0 || mode>8 ) mode = 8;
 
   n     = 62-fieldmode[mode].size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
-  out<<"| Tool for magentic field | "<<m_fieldServiceHandle.type()<<s1
+  out<<"| Key of magentic field condition Object | "<<m_fieldCondObjInputKey.key()<<s1
      <<std::endl;
   out<<"| SCT      space points   | "<<m_spacepointsSCTname.key()<<s3
      <<std::endl;
@@ -436,7 +417,7 @@ MsgStream& InDet::TRT_SeededSpacePointFinder_ATL::dumpConditions( MsgStream& out
      <<std::setw(12)<<std::setprecision(5)<<m_ptmin
      <<"                              |"<<std::endl;
   out<<"| max radius SP           | "
-     <<std::setw(12)<<std::setprecision(5)<<m_r_rmax 
+     <<std::setw(12)<<std::setprecision(5)<<m_r_rmax
      <<"                              |"<<std::endl;
   out<<"| radius step             | "
      <<std::setw(12)<<std::setprecision(5)<<m_r_rstep
@@ -504,7 +485,7 @@ MsgStream& InDet::TRT_SeededSpacePointFinder_ATL::dumpEvent( MsgStream& out, InD
   out<<"|---------------------------------------------------------------------|"
      <<"\n";
 
-  if(msgLvl(MSG::DEBUG)) return out; 
+  if(msgLvl(MSG::DEBUG)) return out;
 
   out<<"|-------------|--------|-------|-------|-------|-------|-------|";
   out<<"-------|-------|-------|-------|-------|-------|"
@@ -516,9 +497,9 @@ MsgStream& InDet::TRT_SeededSpacePointFinder_ATL::dumpEvent( MsgStream& out, InD
   out<<"|-------------|--------|-------|-------|-------|-------|-------|";
   out<<"-------|-------|-------|-------|-------|-------|"
      <<"\n";
-  
+
   double sF1 = pi2/double(event_data.m_fNmax+1);
-  
+
   //StreamState restore_precision(out);
   auto prec(out.precision());
   for(int f=0; f<=event_data.m_fNmax; ++f) {
@@ -562,7 +543,7 @@ void InDet::TRT_SeededSpacePointFinder_ATL::EventData::buildFrameWork(double r_r
   //
   m_r_size = int((r_rmax+.1)/r_rstep);
   m_r_index  = new int[m_r_size];
-  m_r_map    = new int[m_r_size];  
+  m_r_map    = new int[m_r_size];
   m_nr   = 0; for(int i=0; i!=m_r_size; ++i) {m_r_index[i]=0; m_r_map[i]=0;}
 
   // Build radius-azimuthal sorted containers
@@ -594,12 +575,12 @@ void InDet::TRT_SeededSpacePointFinder_ATL::fillLists(std::vector< std::vector<c
       //
       double F = space_point->phi(); if(F<0.) F+=pi2;
       int   f = int(F*event_data.m_sF);
-      if (f < 0) 
+      if (f < 0)
         f += event_data.m_fNmax;
       else if (f > event_data.m_fNmax)
         f -= event_data.m_fNmax;
       int isBRL = 1000; int isLYR = 1000; int DD = 1000;
- 
+
       geoInfo(space_point,isBRL,isLYR);
 
       // Use 4 lower bits (Mask ==  ((2^4 -1) == 15)) for isLYR
@@ -664,9 +645,9 @@ rollrating(double angle) {
 // checks for the angle to be within a specified region,
 // only the upper and the lower boundaries have to calculated,
 // once again, not in the inner loop but just once
-// The logic is: 
+// The logic is:
 // {lower <= angle <= upper_} necessary and sufficient for
-// {rollrating(lower) <= rollrating(angle) <= rollrating(upper)}  
+// {rollrating(lower) <= rollrating(angle) <= rollrating(upper)}
 void
 bracket_angle(double angle, double delta,
 	      double *min, double *max) {
@@ -702,18 +683,18 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
                                                       int phi,
                                                       std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> > &outputListBuffer,
                                                       InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const
-{ 
+{
   uint64_t spcount = 0;
   // // // // // // <Fill the invar_bypass // // // // // // //
 
-  //const Trk::MeasuredAtaStraightLine &ntP = 
+  //const Trk::MeasuredAtaStraightLine &ntP =
   //dynamic_cast<const Trk::MeasuredAtaStraightLine&>(tP);
   const AmgVector(5)& pTS=tP.parameters();
   double xiC = m_xiC; double xiTC = m_xiTC; double xiFC = m_xiFC;
 
 
   const AmgSymMatrix(5)* vCM = tP.covariance();
-  
+
   double sPhi = (*vCM)(2,2)  ; //Sigma on TRT segment azimuthal angle
   double sTheta = (*vCM)(3,3); //Sigma on TRT segment polar angle
   double sp = (*vCM)(4,4)    ; //Sigma on TRT segment inverse momentum estimate
@@ -740,26 +721,22 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 
   // // // // // // Fill the invar_bypass> // // // // // // //
 
-  ///Get the momentum information from the track parameters 
-  double x0=tP.position().x()  ; 
+  ///Get the momentum information from the track parameters
+  double x0=tP.position().x()  ;
   double y0=tP.position().y()  ;
   double z0=tP.position().z()  ;
   double H[3]; double gP[3] = {x0,y0,z0};
 
-  MagField::AtlasFieldCache    fieldCache;
-
   // Get field cache object
   SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
   const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
   if (fieldCondObj == nullptr) {
-    ATH_MSG_ERROR("production2Spb: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
+    ATH_MSG_ERROR("TRT_SeededSpacePointFinder_ATL: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
     return;
   }
+  MagField::AtlasFieldCache    fieldCache;
   fieldCondObj->getInitializedCache (fieldCache);
-
-  //   MT version uses cache, temporarily keep old version
-  if (fieldCache.useNewBfieldCache()) fieldCache.getField     (gP, H);
-  else                                m_fieldService->getField(gP, H);
+  fieldCache.getField (gP, H);
 
   //need conversion kilotesla -> kilogauss - Previously used getMagneticFiledKiloGauss, whereas new function returns value in kiloTesla...
   H[0] *= 10000;
@@ -785,12 +762,12 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 
     ///Fill a list with the SP in the azimouthal region indicated by the TRT track segment
     for(; r0!=r0e; ++r0){
-      if((((*r0).first)->r() > m_r1max) || 
+      if((((*r0).first)->r() > m_r1max) ||
 	 (((*r0).first)->r() < m_r2min)) {
 	continue; //Fill only the SCT SPs
       }
       event_data.m_newRfi_Sorted.push_back(*r0);
-      nri++;      
+      nri++;
     }
   }
 
@@ -804,14 +781,14 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
       }
       r0 = event_data.m_rf_Sorted[j].begin();
       r0e = event_data.m_rf_Sorted[j].end();
-      
+
       ///Fill a list with the SP in the azimouthal region indicated by the TRT track segment
       for(; r0!=r0e; ++r0){
 	if((((*r0).first)->r()>m_r1max) || (((*r0).first)->r()<m_r2min)) {
 	  continue; //Fill only the SCT SPs
 	}
 	event_data.m_newRfi_Sorted.push_back(*r0);
-	nri++;      
+	nri++;
       }
     }
   }
@@ -845,7 +822,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 	  geo_info.push_back((*r).second);
 	  vrp.push_back(vrpi);
 	  rk.push_back(vrpi->r());
-      
+
 	  double X = vrpi->globalPosition().x() - x0;
 	  double Y = vrpi->globalPosition().y() - y0;
 	  double zSPi = vrpi->globalPosition().z();
@@ -859,11 +836,11 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 	  double a = X*invR;
 	  double b = Y*invR;
 
-	  tmp_prod_bypass.push_back(bypass_struct()); 
+	  tmp_prod_bypass.push_back(bypass_struct());
 	  tmp_prod_bypass.back().X = X;
 	  tmp_prod_bypass.back().Y = Y;
 	  tmp_prod_bypass.back().Z = Z;
-      
+
 	  tmp_prod_bypass.back().R = R;
 	  tmp_prod_bypass.back().invR = invR;
 
@@ -872,7 +849,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
   }
 
   // // // // // // Fill m_prod_bypass and the local array> // // // //
-    
+
   ///////////////////////////////////////////////////////
 
   if (m_doCosmics) { // no need to check this every time in the loop
@@ -896,12 +873,12 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 		  double R = rk[i];
 		  if(R<m_r12min) {
 			  continue;
-		  }   
+		  }
 		  double Z = zSP[i];
 		  long geoi = geo_info[i];
 		  int isBU = (geoi >> 4)-3;
 		  int eleU = geoi & 15;
-    
+
 		  for (long j = i + 1; j < (long)spcount; j++) {
 			  const Trk::SpacePoint *bp = vrp[j];
 			  double Zb = zSP[j];
@@ -910,12 +887,12 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 			  int isBB = (geoj >> 4)-3;
 			  int eleB = geoj & 15;
 			  // // // // // // // // // // // // // // // // // // // // // //
-	
+
 			  // Equivalent to  {
 			  // if ((isBU == 0) && (isBB != isBU)) continue;
 			  // if((isBU == isBB) && (eleU <= eleB)) continue;
 			  // }
-			  // Rather cryptic but 2 to 3 times faster 
+			  // Rather cryptic but 2 to 3 times faster
 			  // than the 4 branches above...
 
 			  int Bd = (isBU - isBB) | (isBB - isBU);
@@ -924,8 +901,8 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 			  if (((BUzero | ~Bd) & (Bd | Ed) & (((unsigned)(-1) >> 1) + 1))
 			      == 0) {
 				  continue;
-			  }	
-	  
+			  }
+
 			  // // // // // // // // // // // // // // // // // // // // // //
 			  double dR = R - Rb;
 			  double dZ = Z - Zb;
@@ -934,7 +911,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::production2Spb(const EventContext& ctx,
 			  if (dZ < dz_min || dZ > dz_max) {
 				  continue;//Should be within the +-2.5 pseudorapidity range
 			  }
-			  if(m_fieldServiceHandle->solenoidOn()) {
+			  if(fieldCache.solenoidOn()) {
 				  if(!cutTPb(tmp_invar_bypass, tmp_prod_bypass,i, j, H[2])) {
 					  continue;
 				  }
@@ -984,7 +961,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::cutTPb(const invar_bypass_struct  &tmp_in
   double T = -z1/(r1*(1.0 + 0.04*rcrc));
 
   if(H==0.) return false;
-  
+
   double invpSignature = B*H;
 
   double invP2 = CC/(0.03*0.03*H*H*(1.0 + T*T));
@@ -998,7 +975,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::cutTPb(const invar_bypass_struct  &tmp_in
 
   double invp_min2 = tmp_invar_bypass.invp_min2;
   double invp_max2 = tmp_invar_bypass.invp_max2;
-  
+
   if (invp_min >= 0) {
     if (invpSignature < 0 || invP2 < invp_min2) {
       return false;
@@ -1019,7 +996,7 @@ InDet::TRT_SeededSpacePointFinder_ATL::cutTPb(const invar_bypass_struct  &tmp_in
       return false;
     }
   }
-  
+
   //Estimate the seed polar angle. Make a chi2 cut based on that suggested by the TRT segment
 
   double theta_rating = rotrating(1.0, T);
@@ -1030,14 +1007,14 @@ InDet::TRT_SeededSpacePointFinder_ATL::cutTPb(const invar_bypass_struct  &tmp_in
 #ifndef ANGLE_DISCO_COMPAT
   // correct math but incompatible with old version
     if (theta_rating >= 0) {
-      tmax += 4.0; 
+      tmax += 4.0;
     }
     else {
       tmin -= 4.0;
     }
 #else
   // compatibility mode
-    if (tmin + tmax <= 0) { 
+    if (tmin + tmax <= 0) {
       // center in "+" (YES, "+") range; any negative theta_rating => false
       tmax = 2.0; // forcing range into all positive
     }
@@ -1063,11 +1040,11 @@ InDet::TRT_SeededSpacePointFinder_ATL::cutTPb(const invar_bypass_struct  &tmp_in
       pmax += 4.0;
     }
     else {
-      pmin -= 4.0; 
+      pmin -= 4.0;
     }
 #else
     // compatibility mode
-    if (pmin + pmax <= 0) { 
+    if (pmin + pmax <= 0) {
       // center in "+" (YES, "+") range; any negative phi_rating => false
       pmax = 2.0; // forcing range into all positive
     }
@@ -1092,9 +1069,9 @@ InDet::TRT_SeededSpacePointFinder_ATL::cutTPb(const invar_bypass_struct  &tmp_in
 // Check whether the SP belongs to a barrel or an endcap element
 ///////////////////////////////////////////////////////////////////
 
-void 
+void
 InDet::TRT_SeededSpacePointFinder_ATL::geoInfo(const Trk::SpacePoint* SP,int& isB,int& ld) const
-{  
+{
   const Trk::PrepRawData* p1;
   const InDet::SCT_Cluster* c1;
   Identifier id;
diff --git a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/TRT_SeededTrackFinderTool/TRT_SeededTrackFinder_ATL.h b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/TRT_SeededTrackFinderTool/TRT_SeededTrackFinder_ATL.h
index c95f46bc8f5c919bf8cd8dd602fad81fa44b526e..81d1f91377588c25b8a26fdaf9f51b07a4da5b90 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/TRT_SeededTrackFinderTool/TRT_SeededTrackFinder_ATL.h
+++ b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/TRT_SeededTrackFinderTool/TRT_SeededTrackFinder_ATL.h
@@ -35,13 +35,10 @@
 //Magnetic field
 //
 #include "TrkGeometry/MagneticFieldProperties.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // MagField cache
 #include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 #include "MagFieldElements/AtlasFieldCache.h"
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 //Si Tools
 //
@@ -65,7 +62,6 @@ namespace Trk{
   class IUpdator;
   class IPropagator;
   class IRIO_OnTrackCreator;
-  class IMagFieldSvc;
 }
 
 namespace InDet{
@@ -73,14 +69,14 @@ namespace InDet{
   class SiCombinatorialTrackFinderData_xk;
 
   /**
-  @class TRT_SeededTrackFinder_ATL 
-  
+  @class TRT_SeededTrackFinder_ATL
+
   InDet::TRT_SeededTrackFinderATL is an algorithm which produces tracks
   along the road of InDetDD::SiDetectorElement* sorted in propagation order.
-  @author Thomas.Koffas@cern.ch     
+  @author Thomas.Koffas@cern.ch
   */
 
-  class TRT_SeededTrackFinder_ATL : 
+  class TRT_SeededTrackFinder_ATL :
 
     virtual public ITRT_SeededTrackFinder, public AthAlgTool
     {
@@ -89,7 +85,7 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
 
     public:
-            
+
       ///////////////////////////////////////////////////////////////////
       /** Standard tool methods                                        */
       ///////////////////////////////////////////////////////////////////
@@ -160,16 +156,12 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       /** Protected Data                                               */
       ///////////////////////////////////////////////////////////////////
-      
+
       std::string                         m_fieldmode     ;  /** Magnetic field mode       */
 
       Trk::MagneticFieldProperties        m_fieldprop     ;  /** Magnetic field properties */
 
       /** Tools used  */
-      ServiceHandle<MagField::IMagFieldSvc> m_fieldServiceHandle  ;  /** Magnetic field tool */
-      
-      MagField::IMagFieldSvc*                m_fieldService;
-
 
       ToolHandle<InDet::ISiDetElementsRoadMaker>     m_roadmaker  ;  /** Road maker tool     */
       ToolHandle<InDet::ITRT_SeededSpacePointFinder> m_seedmaker  ;  /** Seed maker tool     */
@@ -177,7 +169,8 @@ namespace InDet{
       ToolHandle<Trk::IUpdator>                      m_updatorTool;  /** Updator tool        */
       ToolHandle<InDet::ISiCombinatorialTrackFinder> m_tracksfinder; /** Combinatorial track finder tool */
 
-      SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
+      SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj",
+        "fieldCondObj", "Name of the Magnetic Field conditions object key"};
 
       /**ID TRT helper*/
       const TRT_ID* m_trtId;
@@ -192,29 +185,29 @@ namespace InDet{
       int                                                      m_nclusmin      ; /** Min number clusters */
       int                                                      m_nwclusmin     ; /** Min number weighted clusters */
       bool                                                     m_bremCorrect   ; /** Optional Brem correction */
-      bool                                                     m_propR         ; /** Check seed-TRT segment consistency at large etas */ 
+      bool                                                     m_propR         ; /** Check seed-TRT segment consistency at large etas */
       bool                                                     m_useassoTool   ; /** Use prd-track association tool */
-      InDet::TrackQualityCuts                                  m_trackquality  ; 
+      InDet::TrackQualityCuts                                  m_trackquality  ;
       std::vector<double>                                      m_errorScale    ; /** Optional error scaling of track parameters  */
       double                                                   m_outlierCut    ; /** Outlier chi2 cut when propagating through the seed */
       bool                                                     m_searchInCaloROI; /** Outlier chi2 cut when propagating through the seed */
-      SG::ReadHandleKey<CaloClusterROI_Collection> m_inputClusterContainerName {this,"InputClusterContainerName","InDetCaloClusterROIs", "RHK for CaloClusterROI_Collection"}; 
+      SG::ReadHandleKey<CaloClusterROI_Collection> m_inputClusterContainerName {this,"InputClusterContainerName","InDetCaloClusterROIs", "RHK for CaloClusterROI_Collection"};
 
       ///////////////////////////////////////////////////////////////////
       /** Private Methods                                              */
       ///////////////////////////////////////////////////////////////////
 
       /** Get Magnetic field properties  */
-      void magneticFieldInit(); 
+      void magneticFieldInit();
 
       /** Update track parameters through space point propagation  */
-       const Trk::TrackParameters*                            getTP(const Trk::SpacePoint*,
+       const Trk::TrackParameters*                            getTP(MagField::AtlasFieldCache& fieldCache, const Trk::SpacePoint*,
                                                                     const Trk::TrackParameters*,
                                                                     bool&,
                                                                     InDet::TRT_SeededTrackFinder_ATL::EventData &event_data) const;
 
       /** Find the corresponding list of Si tracks  */
-      std::list<Trk::Track*>                                 findTrack(const EventContext& ctx,
+      std::list<Trk::Track*>                                 findTrack(const EventContext& ctx, MagField::AtlasFieldCache& fieldCache,
                                                                        InDet::TRT_SeededTrackFinder_ATL::EventData &event_data,
                                                                        const Trk::TrackParameters*,const Trk::TrackSegment&) const;
 
@@ -252,7 +245,7 @@ namespace InDet{
 
       /** Eliminate spurious Pixel clusters in track  */
       std::list<Trk::Track*>                                 cleanTrack(std::list<Trk::Track*>) const;
-      
+
       /** aalonso: Only propagete to the Si if the TRT segment is compatible with a calo measurement */
       bool isCaloCompatible(const Trk::TrackParameters&, const InDet::TRT_SeededTrackFinder_ATL::EventData &event_data) const;
       double m_phiWidth                              ;
diff --git a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx
index 179148ec5ff184a63dc797a539d4e377a2ea0cbc..9ca0d9bea57dca9642685b7797f881ef1f0c3b99 100755
--- a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx
+++ b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/src/TRT_SeededTrackFinder_ATL.cxx
@@ -45,15 +45,11 @@
 #include "SiSPSeededTrackFinderData/SiCombinatorialTrackFinderData_xk.h"
 
 //Tool for getting the SiDetElements from geometry
-#include "InDetRecToolInterfaces/ISiDetElementsRoadMaker.h" 
+#include "InDetRecToolInterfaces/ISiDetElementsRoadMaker.h"
 
 //Needed for the RIO_OnTrackCreator
 #include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
 
-//Magnetic field tool
-//#include "TrkMagFieldInterfaces/IMagneticFieldTool.h"
-//#include "TrkMagFieldUtils/MagneticFieldMapSolenoid.h"
-
 //Space point seed finding tool
 
 #include "TrkEventPrimitives/FitQualityOnSurface.h"
@@ -76,8 +72,6 @@ using namespace std;
 InDet::TRT_SeededTrackFinder_ATL::TRT_SeededTrackFinder_ATL
 (const std::string& t,const std::string& n,const IInterface* p)
   : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n),
-    m_fieldService(nullptr),
     m_roadmaker("InDet::SiDetElementsRoadMaker_xk"),
     m_proptool("Trk::RungeKuttaPropagator/InDetPropagator"),
     m_updatorTool("Trk::KalmanUpdator_xk/InDetPatternUpdator"),
@@ -110,7 +104,6 @@ InDet::TRT_SeededTrackFinder_ATL::TRT_SeededTrackFinder_ATL
 
   declareInterface<ITRT_SeededTrackFinder>(this);
 
-  declareProperty("MagneticTool"            ,m_fieldServiceHandle  );
   declareProperty("PropagatorTool"          ,m_proptool      );
   declareProperty("UpdatorTool"             ,m_updatorTool   );
   declareProperty("RoadTool"                ,m_roadmaker     );
@@ -128,7 +121,7 @@ InDet::TRT_SeededTrackFinder_ATL::TRT_SeededTrackFinder_ATL
   declareProperty("ErrorScaling"            ,m_errorScale    );
   declareProperty("BremCorrection"          ,m_bremCorrect   );
   declareProperty("ConsistentSeeds"         ,m_propR         );
-  declareProperty("UseAssociationTool"      ,m_useassoTool   ); 
+  declareProperty("UseAssociationTool"      ,m_useassoTool   );
   declareProperty("OutlierCut"              ,m_outlierCut    );
   declareProperty("SearchInCaloROI"         ,m_searchInCaloROI);
   declareProperty("phiWidth"                ,m_phiWidth    );
@@ -138,7 +131,7 @@ InDet::TRT_SeededTrackFinder_ATL::TRT_SeededTrackFinder_ATL
 }
 
 ///////////////////////////////////////////////////////////////////
-// Destructor  
+// Destructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::TRT_SeededTrackFinder_ATL::~TRT_SeededTrackFinder_ATL()
@@ -151,28 +144,12 @@ InDet::TRT_SeededTrackFinder_ATL::~TRT_SeededTrackFinder_ATL()
 
 StatusCode InDet::TRT_SeededTrackFinder_ATL::initialize()
 {
-  StatusCode sc = AthAlgTool::initialize(); 
+  StatusCode sc = AthAlgTool::initialize();
 
   msg(MSG::DEBUG)<< "Initializing TRT_SeededTrackFinder_ATL" << endmsg;
-
-  // Get magnetic field service
-  if(m_fieldmode != "NoField" ) {
-    
-    if( !m_fieldServiceHandle.retrieve() ){
-      ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
-      return StatusCode::FAILURE;
-    }   
-    ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-    m_fieldService = &*m_fieldServiceHandle;
-  }
-  
   magneticFieldInit();
-
-  ////////////////////////////////////////////////////////////////////////////////
   ATH_CHECK( m_fieldCondObjInputKey.initialize());
-  ////////////////////////////////////////////////////////////////////////////////
 
-  
   // Get propagator tool
   //
   if(m_proptool.retrieve().isFailure()) {
@@ -270,8 +247,8 @@ MsgStream& InDet::TRT_SeededTrackFinder_ATL::dumpconditions( MsgStream& out ) co
 			     "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
 			     "UndefinedField","AthenaField"  , "?????"         };
 
-  int mode = m_fieldprop.magneticFieldMode(); 
-  if(mode<0 || mode>8 ) mode = 8; 
+  int mode = m_fieldprop.magneticFieldMode();
+  if(mode<0 || mode>8 ) mode = 8;
 
   n     = 62-fieldmode[mode].size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
@@ -345,7 +322,7 @@ InDet::TRT_SeededTrackFinder_ATL::newEvent(const EventContext& ctx, SiCombinator
   m_tracksfinder->newEvent(ctx, event_data_p->combinatorialData());
 
 
-  // Print event information 
+  // Print event information
   //
   if(msgLvl(MSG::DEBUG)) {
      dumpconditions(msg(MSG::DEBUG)); msg(MSG::DEBUG) << endmsg;
@@ -414,7 +391,7 @@ void InDet::TRT_SeededTrackFinder_ATL::endEvent(InDet::ITRT_SeededTrackFinder::I
 }
 
 ///////////////////////////////////////////////////////////////////
-// Main method for back tracking through the Si ID 
+// Main method for back tracking through the Si ID
 // starting from an intial track segment
 ///////////////////////////////////////////////////////////////////
 
@@ -468,8 +445,17 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::getTrack(const EventCon
 
   }
 
+  // Get AtlasFieldCache
+  SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
+  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
+  if (fieldCondObj == nullptr) {
+      ATH_MSG_ERROR("TRT_SeededTrackFinder_ATL::getTracks: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
+      return aSiTrack;
+  }
+  MagField::AtlasFieldCache fieldCache;
+  fieldCondObj->getInitializedCache (fieldCache);
 
-  aSiTrack = findTrack(ctx, event_data, newPerPar.get(), tS);
+  aSiTrack = findTrack(ctx, fieldCache, event_data, newPerPar.get(), tS);
   if((aSiTrack.size()==0)&&(m_bremCorrect)){
     if(msgLvl(MSG::DEBUG)) {
       msg(MSG::DEBUG) << "==============================================================" << endmsg;
@@ -480,7 +466,7 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::getTrack(const EventCon
       msg(MSG::VERBOSE) << "Modified TRT Track Parameters for brem. " << endmsg;
       msg(MSG::VERBOSE) << (*modTP) << endmsg;
     }
-    aSiTrack = findTrack(ctx, event_data, modTP, tS);
+    aSiTrack = findTrack(ctx, fieldCache, event_data, modTP, tS);
     delete modTP;
     if(aSiTrack.size()==0){
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"Could not create track states on surface for this track after all!"<<endmsg;
@@ -494,21 +480,21 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::getTrack(const EventCon
 }
 
 ///////////////////////////////////////////////////////////////////
-// Main method for back tracking through the Si ID 
+// Main method for back tracking through the Si ID
 // starting from initial track parameters
 ///////////////////////////////////////////////////////////////////
 
 std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
-(const EventContext& ctx,
+(const EventContext& ctx, MagField::AtlasFieldCache& fieldCache,
  InDet::TRT_SeededTrackFinder_ATL::EventData &event_data,
  const Trk::TrackParameters* initTP,
  const Trk::TrackSegment& tS) const
 {
   SiCombinatorialTrackFinderData_xk& combinatorialData=event_data.combinatorialData();
-  //Return list copied by value (fix!!) 
+  //Return list copied by value (fix!!)
   std::list<Trk::Track*> associatedSiTrack; // List of found tracks per TRT segment
   const double pi2 = 2.*M_PI, pi=M_PI;
-  
+
   //Get the seeds
   std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> >
       SpE = m_seedmaker->find2Sp(ctx, *initTP,event_data.spacePointFinderEventData());                //Get a list of SP pairs
@@ -516,18 +502,6 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "---------------> SP SEED LIST SIZE " << SpE.size() << endmsg;
   if(SpE.size()==0){return associatedSiTrack;}
 
-  // Get AtlasFieldCache
-  MagField::AtlasFieldCache fieldCache;
-
-  SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
-  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
-  if (fieldCondObj == nullptr) {
-      ATH_MSG_ERROR("InDet::SiTrackMaker_xk::getTracks: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
-      return associatedSiTrack;
-  }
-  fieldCondObj->getInitializedCache (fieldCache);
-  
-  
   //
   // --------------- loop over the found seeds
   //
@@ -551,9 +525,9 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
     }else {
       if(msgLvl(MSG::DEBUG)) {
 	msg(MSG::DEBUG) << "----> Seed Single: SP 1 " << (pSP.first)->r() << endmsg;
-	msg(MSG::DEBUG) << "      Will not process for the time being ! A special module is needed" << endmsg; 
-	msg(MSG::DEBUG) << "      to deal with late conversion (no search and stablized input fit )." << endmsg; 
-	msg(MSG::DEBUG) << "      Current version is unstable in the SP updates and gets unpredictable results." << endmsg; 
+	msg(MSG::DEBUG) << "      Will not process for the time being ! A special module is needed" << endmsg;
+	msg(MSG::DEBUG) << "      to deal with late conversion (no search and stablized input fit )." << endmsg;
+	msg(MSG::DEBUG) << "      Current version is unstable in the SP updates and gets unpredictable results." << endmsg;
       }
       continue;
     }
@@ -562,22 +536,21 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
     std::vector<const Trk::SpacePoint*> SpVec;
     SpVec.push_back(pSP.second); SpVec.push_back(pSP.first);
     if(!newClusters(SpVec,event_data)) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Seed SPs already used by a single track. Ignore..." << endmsg; 
+      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Seed SPs already used by a single track. Ignore..." << endmsg;
       continue;
     }
     if(!newSeed(SpVec,event_data)) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Seed SPs already used by other tracks. Ignore..." << endmsg; 
+      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Seed SPs already used by other tracks. Ignore..." << endmsg;
       continue;
     }
 
     //
     // ----------------Check the SP seed if field is ON
     //
-    //if(m_fieldtool->solenoidOn()){
-    if(m_fieldService->solenoidOn()){
+    if(fieldCache.solenoidOn()){
       bool seedGood = checkSeed(SpVec,tS,initTP);
       if(!seedGood && m_propR) {
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Seed not consistent with TRT segment. Ignore..." << endmsg; 
+	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Seed not consistent with TRT segment. Ignore..." << endmsg;
 	continue;
       }
     }
@@ -599,16 +572,10 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
     if     (newPhi > pi) newPhi = fmod(newPhi+pi,pi2)-pi;
     else if(newPhi <-pi) newPhi = fmod(newPhi-pi,pi2)+pi;
     if(newTheta<0.27) {
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Pseudorapidity greater than 2.Ignore" << endmsg; 
+      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Pseudorapidity greater than 2.Ignore" << endmsg;
       continue;
     }
 
-    //Get the intial Error matrix, associated surface
-    //Get the intial Error matrix, associated surface
-    //const Trk::TrackParameters *ivMAP = dynamic_cast<const Trk::MeasuredAtaStraightLine*>(initTP);
-    //if(!ivMAP) continue;
-    //const Trk::CovarianceMatrix& vCM = ivMAP->localErrorMatrix().covariance();
-
     const AmgSymMatrix(5) * vCM = initTP->covariance();
     AmgSymMatrix(5) * nvCM = new AmgSymMatrix(5);
 
@@ -631,19 +598,19 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Could not get initial TRT track parameters! " << endmsg;
       continue;
     }
-    
+
     //
     // ----------------Propagate through the SP seed
     //
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Propagating through the seed" << endmsg;
     bool outl = false;
-    
-    //update with first SP 
+
+    //update with first SP
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Update with 1st SP from seed" << endmsg;
-    const Trk::TrackParameters* upTP = getTP(pSP.first,niTP,outl,event_data);
+    const Trk::TrackParameters* upTP = getTP(fieldCache, pSP.first,niTP,outl,event_data);
     //If no track parameters are found, go to the next seed
     if(!upTP){
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Extrapolation through seed failed!Seed bogus.Move to next seed" << endmsg; 
+      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Extrapolation through seed failed!Seed bogus.Move to next seed" << endmsg;
       delete niTP; continue;
     }
     //Not good if SP pair has outliers. Clean up the memory and move to next seed
@@ -651,16 +618,16 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"Seed with outliers. Will not process!"<<endmsg;
       delete niTP; delete upTP; continue;
     }
-    
-    //update with second SP ? 
+
+    //update with second SP ?
     if (pSP.first != pSP.second) {
-      //update with second SP 
+      //update with second SP
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Update with 2nd SP from seed" << endmsg;
-      const Trk::TrackParameters* newTP = getTP(pSP.second,upTP,outl,event_data);
+      const Trk::TrackParameters* newTP = getTP(fieldCache, pSP.second,upTP,outl,event_data);
       delete upTP;
       //If no track parameters are found, go to the next seed
       if(!newTP){
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Extrapolation through seed failed!Seed bogus.Move to next seed" << endmsg; 
+	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Extrapolation through seed failed!Seed bogus.Move to next seed" << endmsg;
 	delete niTP; continue;
       }
       //Not good if SP pair has outliers. Clean up the memory and move to next seed
@@ -684,9 +651,9 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
     const Trk::PerigeeSurface persurf (Amg::Vector3D(0,0,0));
 
     //Get track parameters at the end of SCT to start backwards propagation
-    const Trk::TrackParameters* per   = m_proptool->propagate(*upTP,persurf,Trk::oppositeMomentum,false,m_fieldprop,Trk::nonInteracting); //Propagate 
+    const Trk::TrackParameters* per   = m_proptool->propagate(*upTP,persurf,Trk::oppositeMomentum,false,m_fieldprop,Trk::nonInteracting); //Propagate
     if(!per){
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"No extrapolated track parameters!"<<endmsg; 
+      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"No extrapolated track parameters!"<<endmsg;
       delete niTP; delete upTP; continue;
     }
 
@@ -703,13 +670,8 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Too few detector elements, not expected" << endmsg;
       delete niTP; delete upTP; continue;
     }
-    //std::list<const InDetDD::SiDetectorElement*>::iterator ir,ire=DE.end();
-    //for(ir=DE.begin(); ir!=ire; ++ir){
-    //  IdentifierHash id = (*ir)->identifyHash();  //Get the detElement id
-    //  cout << "DET ELEMENT ID " << id << " SCT? " << ((*ir)->isSCT()) << " POSITION " << (*ir)->center().perp() << endl;
-    //}
 
-    // 
+    //
     // --------------- Cast it to measured parameters at 2nd SP with diagonal error matrix
     //
     const AmgVector(5)& piv = upTP->parameters();
@@ -722,7 +684,7 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
 
       AmgSymMatrix(5)* pnvCM = new AmgSymMatrix(5);
 
-      (*pnvCM)<< 
+      (*pnvCM)<<
 	m_errorScale[0]*m_errorScale[0]*(*pvCM)(0,0),0.,0.,0.,0.,
 	0.,m_errorScale[1]*m_errorScale[1]*(*pvCM)(1,1),0.,0.,0.,
 	0.,0.,m_errorScale[2]*m_errorScale[2]*(*pvCM)(2,2),0.,0.,
@@ -766,8 +728,8 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
         associatedSiTrack.push_back((*t++));
       }
     }
-   
-    delete niTP; delete upTP; delete mesTP; 
+
+    delete niTP; delete upTP; delete mesTP;
 
   }  ///end of loop over seeds for this TRT segment
 
@@ -779,7 +741,7 @@ std::list<Trk::Track*> InDet::TRT_SeededTrackFinder_ATL::findTrack
 ///////////////////////////////////////////////////////////////////
 
 const Trk::TrackParameters*
-InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
+InDet::TRT_SeededTrackFinder_ATL::getTP(MagField::AtlasFieldCache& fieldCache, const Trk::SpacePoint* SP,
                                         const Trk::TrackParameters* startTP,
                                         bool& outl,
                                         InDet::TRT_SeededTrackFinder_ATL::EventData &event_data) const
@@ -791,9 +753,9 @@ InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
   const Trk::Surface&               surf  = SP->associatedSurface(); //Get the associated surface
   Trk::PropDirection                dir   = Trk::oppositeMomentum;   //Propagate backwards i.e. opposite momentum when filtering
   Trk::ParticleHypothesis           part  = Trk::nonInteracting;     //Choose a non interacting particle
-  const Trk::TrackParameters*       eTP   = m_proptool->propagate(*startTP,surf,dir,false,m_fieldprop,part); //Propagate 
+  const Trk::TrackParameters*       eTP   = m_proptool->propagate(*startTP,surf,dir,false,m_fieldprop,part); //Propagate
 
-  if(!eTP){  
+  if(!eTP){
 
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Extrapolation to Si element failed"<< endmsg;
     if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << surf << endmsg;
@@ -809,7 +771,7 @@ InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
 
     if(!uTP) { //The updator failed
       if (sct_fitChi2) {
-	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Updator returned no update, but a DitQuality object, a leak !"<< endmsg; 
+	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Updator returned no update, but a DitQuality object, a leak !"<< endmsg;
 	delete sct_fitChi2;
       }
       event_data.noise().production(-1,1,*eTP);
@@ -819,14 +781,14 @@ InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
       double corIMom=event_data.noise().correctionIMom();
       iTP = addNoise(covAzim,covPola,covIMom,corIMom,eTP,0);
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"The updator failed! Count an outlier "<<endmsg;
-      delete eTP; 
+      delete eTP;
       //if (uTP) {delete uTP; delete sct_fitChi2;}
       outl = true;
-      
+
     }else{
       //Keep as a measurement only if fit chi2 less than 25.Otherwise outlier
       float outlierCut = m_outlierCut;
-      if(!m_fieldServiceHandle->solenoidOn()) outlierCut = 1000000.; // Increase the outlier chi2 cut if solenoid field is OFF
+      if(!fieldCache.solenoidOn()) outlierCut = 1000000.; // Increase the outlier chi2 cut if solenoid field is OFF
       if( sct_fitChi2->chiSquared() < outlierCut && fabs(uTP->parameters()[Trk::theta]) > 0.17 ){
 	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"Update worked, will update return track parameters, chi2: "<<(sct_fitChi2->chiSquared())<<endmsg;
 	event_data.noise().production(-1,1,*uTP);
@@ -834,7 +796,7 @@ InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
 	double covPola=event_data.noise().covariancePola();
 	double covIMom=event_data.noise().covarianceIMom();
 	double corIMom=event_data.noise().correctionIMom();
-	iTP = addNoise(covAzim,covPola,covIMom,corIMom,uTP,0); 
+	iTP = addNoise(covAzim,covPola,covIMom,corIMom,uTP,0);
       }else{
 	if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"Outlier, did not satisfy cuts, chi2: "<<(sct_fitChi2->chiSquared())<<" "<<fabs(uTP->parameters()[Trk::theta])<<endmsg;
 	event_data.noise().production(-1,1,*eTP);
@@ -842,10 +804,10 @@ InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
 	double covPola=event_data.noise().covariancePola();
 	double covIMom=event_data.noise().covarianceIMom();
 	double corIMom=event_data.noise().correctionIMom();
-	iTP = addNoise(covAzim,covPola,covIMom,corIMom,eTP,0); 
+	iTP = addNoise(covAzim,covPola,covIMom,corIMom,eTP,0);
 	outl = true;
       }
-      
+
       // Clean up
       delete eTP; delete uTP; delete sct_fitChi2;
     }
@@ -857,8 +819,8 @@ InDet::TRT_SeededTrackFinder_ATL::getTP(const Trk::SpacePoint* SP,
 // Add noise to track parameters
 // 0-Filtering, 1-Smoothing
 ///////////////////////////////////////////////////////////////////
-  
-const Trk::TrackParameters* InDet::TRT_SeededTrackFinder_ATL::addNoise 
+
+const Trk::TrackParameters* InDet::TRT_SeededTrackFinder_ATL::addNoise
     (double covAzim, double covPola, double covIMom, double corIMom, const Trk::TrackParameters* P1, int isSmooth) const
 {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Adding noise to track parameters... " << endmsg;
@@ -981,17 +943,17 @@ bool InDet::TRT_SeededTrackFinder_ATL::checkSeed
 
 ///////////////////////////////////////////////////////////////////
 //  Calculate initial track parameters for back tracking
-//  using TRT New Tracking segments 
+//  using TRT New Tracking segments
 ///////////////////////////////////////////////////////////////////
 
-const Trk::TrackParameters* 
+const Trk::TrackParameters*
 InDet::TRT_SeededTrackFinder_ATL::modifyTrackParameters(const Trk::TrackParameters& TP, int mode) const
 {
   ///The mode corresponds to whether the track parameters are modified before the seed (0) or before the pixel propagation (1)
 
   double covarianceIMom = 0;
   double correctionIMom = 1.;
-  
+
   ///Get the track parameters
   const AmgVector(5)& pV = TP.parameters();
   double ip[5] = {pV[0], pV[1], pV[2], pV[3], pV[4]};
@@ -1013,7 +975,7 @@ InDet::TRT_SeededTrackFinder_ATL::modifyTrackParameters(const Trk::TrackParamete
 
     (*nM)(4,4)+=covarianceIMom;
   }
-  const Trk::TrackParameters* newInitTrackParameters = TP.associatedSurface().createTrackParameters(ip[0],ip[1],ip[2],ip[3],ip[4],nM); 
+  const Trk::TrackParameters* newInitTrackParameters = TP.associatedSurface().createTrackParameters(ip[0],ip[1],ip[2],ip[3],ip[4],nM);
   return newInitTrackParameters;
 }
 
@@ -1027,8 +989,8 @@ void  InDet::TRT_SeededTrackFinder_ATL::setTrackQualityCuts()
   //
   m_trackquality.setIntCut   ("MinNumberOfClusters",  m_nclusmin   );
   m_trackquality.setIntCut   ("MinNumberOfWClusters", m_nwclusmin  );
-  m_trackquality.setIntCut   ("MaxNumberOfHoles"   ,  m_nholesmax  ); 
-  m_trackquality.setIntCut   ("MaxHolesGae"        ,  m_dholesmax  ); 
+  m_trackquality.setIntCut   ("MaxNumberOfHoles"   ,  m_nholesmax  );
+  m_trackquality.setIntCut   ("MaxHolesGae"        ,  m_dholesmax  );
   if( m_useassoTool ) m_trackquality.setIntCut   ("UseAssociationTool",1);
   else                m_trackquality.setIntCut   ("UseAssociationTool",0);
 
@@ -1047,8 +1009,8 @@ void  InDet::TRT_SeededTrackFinder_ATL::setTrackQualityCuts()
 void  InDet::TRT_SeededTrackFinder_ATL::clusterTrackMap(Trk::Track* Tr,
                                                         InDet::TRT_SeededTrackFinder_ATL::EventData &event_data) const
 {
-  DataVector<const Trk::MeasurementBase>::const_iterator 
-    m  = Tr->measurementsOnTrack()->begin(), 
+  DataVector<const Trk::MeasurementBase>::const_iterator
+    m  = Tr->measurementsOnTrack()->begin(),
     me = Tr->measurementsOnTrack()->end  ();
 
   for(; m!=me; ++m) {
@@ -1056,7 +1018,7 @@ void  InDet::TRT_SeededTrackFinder_ATL::clusterTrackMap(Trk::Track* Tr,
     if(prd) event_data.clusterTrack().insert(std::make_pair(prd,Tr));
   }
 }
- 
+
 ///////////////////////////////////////////////////////////////////
 // New clusters comparison with clusters associated with track
 // Reject seeds that all SPs belong to one and the same track
@@ -1067,7 +1029,7 @@ bool InDet::TRT_SeededTrackFinder_ATL::newClusters(const std::vector<const Trk::
 {
   const Trk::PrepRawData* prd   [ 40];
   const Trk::Track*       trk[2][200];
-  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator 
+  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator
      t[40],te = event_data.clusterTrack().end();
   std::vector<const Trk::SpacePoint*>::const_iterator s=Sp.begin(),se=Sp.end();
   int n = 0;
@@ -1091,9 +1053,9 @@ bool InDet::TRT_SeededTrackFinder_ATL::newClusters(const std::vector<const Trk::
   for(; t[0]!=te; ++t[0]) {
     if (m==30) return false;
     if( (*t[0]).first != prd[0] ) break;
-    trk[0][m++] = (*t[0]).second; 
+    trk[0][m++] = (*t[0]).second;
     if(m==200) break;
-  } 
+  }
 
   //For a seed to be declared bad, all other clusters should belong to the same track as that of the first used cluster
   int in=0, ou=1;
@@ -1102,9 +1064,9 @@ bool InDet::TRT_SeededTrackFinder_ATL::newClusters(const std::vector<const Trk::
 
     int l = 0; //Number of tracks that share the same clusters
     for(; t[i]!=te; ++t[i]) {
-  
+
       if( (*t[i]).first != prd[i] ) break;
-  
+
       for(int j=0; j!=m; ++j) {
   	if((*t[i]).second == trk[in][j]) {trk[ou][l++]= trk[in][j]; break;}
       }
@@ -1126,7 +1088,7 @@ bool InDet::TRT_SeededTrackFinder_ATL::newClusters(const std::vector<const Trk::
 {
   const Trk::PrepRawData* prd   [ 40];
   const Trk::Track*       trk[2][200];
-  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator 
+  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator
      tt,t[40],te = event_data.clusterTrack().end();
 
   std::vector<const Trk::SpacePoint*>::const_iterator s=Sp.begin(),se=Sp.end();
@@ -1151,10 +1113,10 @@ bool InDet::TRT_SeededTrackFinder_ATL::newClusters(const std::vector<const Trk::
     int m = 0;
     for(tt=t[0]; tt!=te; ++tt) {
       if( (*tt).first != prd[0] ) break;
-      trk[0][m++] = (*tt).second; 
+      trk[0][m++] = (*tt).second;
       if(m==200) break;
-    } 
-    
+    }
+
     int in=0, ou=1, i=1;
 
     for(; i!=n; ++i) {
@@ -1173,10 +1135,10 @@ bool InDet::TRT_SeededTrackFinder_ATL::newClusters(const std::vector<const Trk::
   }
 
   //if(!(*Sp.rbegin())->clusterList().second) return true;
-  
+
   int h = 0;
   for(int i=0; i!=n; ++i) {
-  
+
     for(tt=t[i]; t[i]!=te; ++tt) {
       if( (*tt).first != prd[i] ) break;
       if((*tt).second->trackStateOnSurfaces()->size() >= 10) {++h; break;}
@@ -1195,17 +1157,17 @@ bool InDet::TRT_SeededTrackFinder_ATL::isNewTrack(Trk::Track* Tr,
 {
 
   const Trk::PrepRawData* prd   [100];
-  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator 
+  std::multimap<const Trk::PrepRawData*,const Trk::Track*>::const_iterator
      ti,t[100],te = event_data.clusterTrack().end();
 
   int     n   = 0    ;
 
-  DataVector<const Trk::MeasurementBase>::const_iterator 
-    m  = Tr->measurementsOnTrack()->begin(), 
+  DataVector<const Trk::MeasurementBase>::const_iterator
+    m  = Tr->measurementsOnTrack()->begin(),
     me = Tr->measurementsOnTrack()->end  ();
 
   for(; m!=me; ++m) {
-  
+
     const Trk::PrepRawData* pr = ((const Trk::RIO_OnTrack*)(*m))->prepRawData();
     if(pr) {
       prd[n] =pr;
@@ -1214,7 +1176,7 @@ bool InDet::TRT_SeededTrackFinder_ATL::isNewTrack(Trk::Track* Tr,
   }
 
   int nclt = n;
-  
+
   for(int i=0; i!=n; ++i) {
 
     int nclmax = 0;
@@ -1224,7 +1186,7 @@ bool InDet::TRT_SeededTrackFinder_ATL::isNewTrack(Trk::Track* Tr,
       if( (*ti).first != prd[i] ) break;
       int ncl = (*ti).second->trackStateOnSurfaces()->size();
       if(ncl > nclmax) nclmax = ncl;
-    }   
+    }
     if(nclt > nclmax) return true;
   }
   return false;
@@ -1308,9 +1270,9 @@ bool InDet::TRT_SeededTrackFinder_ATL::isCaloCompatible(const Trk::TrackParamete
   std::vector<double>::const_iterator f = event_data.caloF().begin(), fe = event_data.caloF().end();
   std::vector<double>::const_iterator e = event_data.caloE().begin();
 
-  const AmgVector(5)& Vp = Tp.parameters(); 
+  const AmgVector(5)& Vp = Tp.parameters();
 
-  double F = Vp[2]; 
+  double F = Vp[2];
 //    	msg(MSG::WARNING) << "CheckCal dedf \t" << F << "\t" << E << endmsg;
 
 
@@ -1320,10 +1282,7 @@ bool InDet::TRT_SeededTrackFinder_ATL::isCaloCompatible(const Trk::TrackParamete
   //  	msg(MSG::WARNING) << "CheckCal df \t" << df << endmsg;
 
     if(df < m_phiWidth) {
-   //   double de = fabs(E-(*e));
-    //	msg(MSG::WARNING) << "CheckCal de \t" << de << endmsg;
-//      if(de < m_etaWidth) return true;
-	return true;
+	     return true;
     }
     ++e;
   }
@@ -1337,19 +1296,7 @@ bool InDet::TRT_SeededTrackFinder_ATL::isCaloCompatible(const Trk::TrackParamete
 ///////////////////////////////////////////////////////////////////
 void  InDet::TRT_SeededTrackFinder_ATL::magneticFieldInit()
 {
- if(m_fieldmode == "NoField") m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField  ); 
- else if(m_fieldmode == "MapSolenoid") m_fieldprop = Trk::MagneticFieldProperties(Trk::FastField); 
- else m_fieldprop = Trk::MagneticFieldProperties(Trk::FullField); 
+ if(m_fieldmode == "NoField") m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField  );
+ else if(m_fieldmode == "MapSolenoid") m_fieldprop = Trk::MagneticFieldProperties(Trk::FastField);
+ else m_fieldprop = Trk::MagneticFieldProperties(Trk::FullField);
 }
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF.h b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF.h
index 43fff203a7791caf8554bf519be295223c542e7a..bd97d0ea30da0f3ea1f417439ad135399a7c1d11 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF/TRT_TrackExtensionTool_DAF.h
@@ -19,8 +19,8 @@
 #include <string>
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ServiceHandle.h" 
-    
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "TrkParameters/TrackParameters.h"  // typedef
 #include "InDetPrepRawData/TRT_DriftCircleContainer.h"  // typedef
 
@@ -35,10 +35,6 @@
 class MsgStream;
 class TRT_ID;
 
-namespace MagField {
-    class IMagFieldSvc;
-}
-
 namespace Trk {
     class Surface;
     //class MagneticFieldProperties;
@@ -50,10 +46,10 @@ namespace InDet {
     class ICompetingTRT_DriftCirclesOnTrackCreator;
 
 /**
-@class TRT_TrackExtensionTool_DAF 
+@class TRT_TrackExtensionTool_DAF
 The TRT_TrackExtensionTool_DAF produces an extension with Trk::CompetingRIOsOnTrack of
 silicon tracks into the TRT.
- 
+
 @author Sebastian.Fleischmann@cern.ch
 */
 
@@ -96,7 +92,7 @@ public:
 
     virtual std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData> newEvent(const EventContext& ctx) const override;
     ///////////////////////////////////////////////////////////////////
-    // TRT seed extension to TRT  
+    // TRT seed extension to TRT
     ///////////////////////////////////////////////////////////////////
 
     virtual Trk::TrackSegment* findSegment(const EventContext& ctx,
@@ -120,7 +116,7 @@ protected:
     SG::ReadHandleKey<TRT_DriftCircleContainer>     m_jo_trtcontainername; //!< jobOption: name of container with TRT RIOs
     double                           m_jo_roadwidth; //!< jobOption: Max width of the road
     bool                             m_jo_simpleExtension; //!< jobOption: do the simple TRT extension by putting all RIOs of one detector element within the road into one Trk::CompetingRIOsOnTrack
-    
+
     double                           m_jo_maxGroupDistance; //!< jobOption: Max distance of the RIO groups in the grouped barrel extension (distance in the x-y-plane)
     double                           m_jo_minGroupDistance; //!< jobOption: Min distance of the RIO groups in the grouped barrel extension (distance in the x-y-plane)
 
@@ -153,10 +149,8 @@ protected:
 
     ToolHandle< Trk::IPropagator >                                  m_propagator;           //!<  the Propagator tool
 
-    ServiceHandle<MagField::IMagFieldSvc>                           m_fieldServiceHandle; 
-
     SG::ReadCondHandleKey<AtlasFieldCacheCondObj>                   m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
-        
+
 
     std::string                                                     m_fieldmode;          //!< jobOption: Magnetic field mode
     Trk::MagneticFieldProperties                                    m_fieldprop;            //!< Magnetic field properties
@@ -166,7 +160,7 @@ protected:
     ///////////////////////////////////////////////////////////////////
     // Methods
     ///////////////////////////////////////////////////////////////////
-    
+
     /** find an element-wise extension (ie. the RIOs in a CompROT belong to one detElement) */
     StatusCode elementWiseExtension(int, int, InDet::TRT_TrackExtensionTool_DAF::EventData &event_data) const;
     /** find a barrel extension with RIOs grouped along the globalPositions of the track */
@@ -178,4 +172,3 @@ protected:
 } // end of name space
 
 #endif // TRT_TRACKEXTENSIONTOOL_DAF_H
-
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/src/TRT_TrackExtensionTool_DAF.cxx b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/src/TRT_TrackExtensionTool_DAF.cxx
index c7fa745fdcd02877344b53cfea0d0446c34bd0d1..f4333c6a26eccb09fe9c74dd6d933ed6fe145e65 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/src/TRT_TrackExtensionTool_DAF.cxx
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/src/TRT_TrackExtensionTool_DAF.cxx
@@ -14,11 +14,8 @@
 #include <iostream>
 #include <iomanip>
 #include <utility>
-//#include "GaudiKernel/MsgStream.h"
-//#include "GaudiKernel/ListItem.h"
 #include "TrkParameters/TrackParameters.h"
 
-#include "MagFieldInterfaces/IMagFieldSvc.h" 
 // tools:
 #include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
 #include "TrkExInterfaces/IPropagator.h"
@@ -32,9 +29,6 @@
 
 #include "TRT_ReadoutGeometry/TRT_BaseElement.h"
 #include "InDetIdentifier/TRT_ID.h"
-//#include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
-
-//#include "TrkPrepRawData/PrepRawData.h"
 
 //http://www-zeuthen.desy.de/geant4/clhep-2.0.4.3/BasicVector3D_8h-source.html
 double perp2( const Amg::Vector3D& v1, const Amg::Vector3D& v2 ) {
@@ -64,14 +58,12 @@ InDet::TRT_TrackExtensionTool_DAF::TRT_TrackExtensionTool_DAF
             m_jo_annealingFactor(81.),
             m_roadtool("InDet::TRT_DetElementsRoadMaker_xk/TRT_DetElementsRoadMaker"),
             m_propagator("Trk::RungeKuttaPropagator/Propagator"),
-            m_fieldServiceHandle("AtlasFieldSvc",n),
             m_fieldmode("MapSolenoid"),
             m_trtID(nullptr)
 {
 
     declareInterface<ITRT_TrackExtensionTool>(this);
 
-    declareProperty("MagFieldSvc",              m_fieldServiceHandle,   "magnetic filed service"); 
     declareProperty("MagneticFieldMode",        m_fieldmode,          "field mode of the field tool");
     declareProperty("PropagatorTool",           m_propagator,           "Propagator tool");
     declareProperty("CompetingDriftCircleTool", m_compROTcreator,       "Tool for the creation of CompetingTRT_DriftCirclesOnTrack");
@@ -81,7 +73,6 @@ InDet::TRT_TrackExtensionTool_DAF::TRT_TrackExtensionTool_DAF
     declareProperty("SimpleElementWiseExtension", m_jo_simpleExtension,  "Do simple element wise extension or do sophisticated grouping of measurements?");
     declareProperty("RoadWidth",                m_jo_roadwidth,          "Width of the road of measurements (the RoadTool uses its own road width!)");
     declareProperty("MaxGroupDistance",         m_jo_maxGroupDistance,   "Maximum distance of measurement groups in sophisticated grouping");
-//    declareProperty("MinGroupDistance", m_jo_minGroupDistance);
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -97,15 +88,6 @@ InDet::TRT_TrackExtensionTool_DAF::~TRT_TrackExtensionTool_DAF() {}
 StatusCode InDet::TRT_TrackExtensionTool_DAF::initialize() {
     StatusCode sc = AlgTool::initialize();
 
-    // -------------
-    // set the magnetic field properties:
-    // Get magnetic field service
-    if( !m_fieldServiceHandle.retrieve() ){ 
-        ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
-        return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle ); 
-
     // Build MagneticFieldProperties
     if     (m_fieldmode == "NoField"    ) m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField  );
     else if(m_fieldmode == "MapSolenoid") m_fieldprop = Trk::MagneticFieldProperties(Trk::FastField);
@@ -146,9 +128,7 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::initialize() {
 
     ATH_CHECK( m_jo_trtcontainername.initialize());
 
-    ////////////////////////////////////////////////////////////////////////////////
     ATH_CHECK( m_fieldCondObjInputKey.initialize());
-    ////////////////////////////////////////////////////////////////////////////////
 
     return StatusCode::SUCCESS;
 }
@@ -167,85 +147,10 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::finalize() {
 ///////////////////////////////////////////////////////////////////
 
 MsgStream& InDet::TRT_TrackExtensionTool_DAF::dump( MsgStream& out ) const {
-    //     out<<std::endl;
-    //     if(m_nprint)
-    //         return dumpEvent(out);
-    //     return dumpConditions(out);
     return out;
 }
 
 
-///////////////////////////////////////////////////////////////////
-// Dumps conditions information into the MsgStream
-///////////////////////////////////////////////////////////////////
-
-//MsgStream& InDet::TRT_TrackExtensionTool_DAF::dumpConditions( MsgStream& out ) const {
-//     int n = 62-m_propagator.size();
-//     std::string s1;
-//     for(int i=0; i<n; ++i)
-//         s1.append(" ");
-//     s1.append("|");
-//     n     = 62-m_field.size();
-//     std::string s2;
-//     for(int i=0; i<n; ++i)
-//         s2.append(" ");
-//     s2.append("|");
-//
-//     std::string fieldmode[9] ={"NoField"       ,"ConstantField","SolenoidalField",
-//                                "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
-//                                "UndefinedField","AthenaField"  , "?????"         };
-//
-//     int mode = m_fieldprop.magneticFieldMode();
-//     if(mode<0 || mode>8 )
-//         mode = 8;
-//
-//     n     = 62-fieldmode[mode].size();
-//     std::string s3;
-//     for(int i=0; i<n; ++i)
-//         s3.append(" ");
-//     s3.append("|");
-//     n     = 62-m_riontrack.size();
-//     std::string s5;
-//     for(int i=0; i<n; ++i)
-//         s5.append(" ");
-//     s5.append("|");
-//     n     = 62-m_roadmaker.size();
-//     std::string s6;
-//     for(int i=0; i<n; ++i)
-//         s6.append(" ");
-//     s6.append("|");
-//
-//     out<<"|----------------------------------------------------------------------"
-//     <<"-------------------|"
-//     <<std::endl;
-//     out<<"| Tool for propagation    | "<<m_propagator   <<s1<<std::endl;
-//     out<<"| Tool for rio  on track  | "<<m_riontrack    <<s5<<std::endl;
-//     out<<"| Tool for road builder   | "<<m_roadmaker    <<s6<<std::endl;
-//     out<<"| Tool for magnetic field | "<<m_field        <<s2<<std::endl;
-//     out<<"| Magnetic field mode     | "<<fieldmode[mode]<<s3<<std::endl;
-//     out<<"| TRT road half width (mm)| "
-//     <<std::setw(12)<<std::setprecision(5)<<m_roadwidth
-//     <<"                                                  |"<<std::endl;
-//     out<<"| Min number DriftCircles | "
-//     <<std::setw(12)<<m_minNumberDCs
-//     <<"                                                  |"<<std::endl;
-//     out<<"| Use drift time  ?       | "
-//     <<std::setw(12)<<m_usedriftrad
-//     <<"                                                  |"<<std::endl;
-//     out<<"|----------------------------------------------------------------------"
-//     <<"-------------------|"
-//     <<std::endl;
-//     return out;
-// }
-
-///////////////////////////////////////////////////////////////////
-// Dumps event information into the ostream
-///////////////////////////////////////////////////////////////////
-
-// MsgStream& InDet::TRT_TrackExtensionTool_DAF::dumpEvent( MsgStream& out ) const {
-//     return out;
-// }
-
 ///////////////////////////////////////////////////////////////////
 // Dumps relevant information into the ostream
 ///////////////////////////////////////////////////////////////////
@@ -254,23 +159,6 @@ std::ostream& InDet::TRT_TrackExtensionTool_DAF::dump( std::ostream& out ) const
     return out;
 }
 
-///////////////////////////////////////////////////////////////////
-// Overload of << operator MsgStream
-///////////////////////////////////////////////////////////////////
-
-// MsgStream& InDet::operator    <<
-// (MsgStream& sl,const InDet::TRT_TrackExtensionTool_DAF& se) {
-//     return se.dump(sl);
-// }
-
-///////////////////////////////////////////////////////////////////
-// Overload of << operator std::ostream
-///////////////////////////////////////////////////////////////////
-
-// std::ostream& InDet::operator <<
-// (std::ostream& sl,const InDet::TRT_TrackExtensionTool_DAF& se) {
-//     return se.dump(sl);
-// }
 
 ///////////////////////////////////////////////////////////////////
 // Track extension init for a new event
@@ -340,7 +228,6 @@ InDet::TRT_TrackExtensionTool_DAF::extendTrack(const EventContext& ctx,
     }
     // ------------
     // reset the output vector
-    //m_measurement.erase(m_measurement.begin(), m_measurement.end());
     event_data.m_measurement.clear();
     // reset the detElements vector
     event_data.m_detectorElements.clear();
@@ -360,17 +247,14 @@ InDet::TRT_TrackExtensionTool_DAF::extendTrack(const EventContext& ctx,
 
 
     // Get AtlasFieldCache
-    MagField::AtlasFieldCache fieldCache;
-
     SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
     const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
     if (fieldCondObj == nullptr) {
         ATH_MSG_ERROR("InDet::TRT_TrackExtensionTool_xk::findSegment: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
     }
+    MagField::AtlasFieldCache fieldCache;
     fieldCondObj->getInitializedCache (fieldCache);
 
-    
-
     // ----------------------------------
     // start the TRT detector elements road maker to get a list of possibly interesting detector elements
     std::vector<const InDetDD::TRT_BaseElement*> detElements;
@@ -382,7 +266,6 @@ InDet::TRT_TrackExtensionTool_DAF::extendTrack(const EventContext& ctx,
     // extrapolate to get a list of global track positions:
     // (extrapolate just parameters, not covariance)
 
-    //    m_proptool->globalPositions(G,Tp,m_fieldprop,m_bounds,S,Trk::pion);
     // the index of the detElement vector where the track changes from one sub type to another
     //   in the most general case the track crosses the TRT in the way: Endcap, Barrel, Encap (including cosmics)
     int beginBarrelRoad = 0;
@@ -400,7 +283,6 @@ InDet::TRT_TrackExtensionTool_DAF::extendTrack(const EventContext& ctx,
     }
     for(; detElIter!=detElements.end(); ++detElIter) {
         // propagate without boundary checks to detElement
-        //const Trk::TrackParameters* nextTrkPar = m_propagator->propagateParameters(*previousTrkPar, (*detElIter)->surface(), Trk::alongMomentum, false, m_fieldprop, Trk::pion);
         const Trk::TrackParameters* nextTrkPar = m_propagator->propagateParameters(*previousTrkPar, (*detElIter)->surface(), Trk::alongMomentum, false, m_fieldprop, Trk::nonInteracting);
         if(!nextTrkPar) {
             // propagate directly to this detElement and hope that the Fitter will do a better job:
@@ -435,7 +317,6 @@ InDet::TRT_TrackExtensionTool_DAF::extendTrack(const EventContext& ctx,
 
         // prepare for next propagation
         previousTrkPar = nextTrkPar;
-        //nDetElements++;
     } // end for loop over detElements
 
     ATH_MSG_DEBUG("Barrel Road starts at index "<< beginBarrelRoad << ",  second Encap Road at "<< beginSecondEndcapRoad << " with a total of "<< event_data.m_detectorElements.size()<< " detElements" );
@@ -527,9 +408,6 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::elementWiseExtension(int beginInde
         // global position of the track prediction
         // get the global position of the track prediction on the detElement
         Amg::Vector3D trkPos( event_data.m_propagatedTrackParameters[index]->position() );
-        //ATH_MSG_INFO("track prediction at: ("<< trkPos.x() <<", "<< trkPos.y() <<", "<< trkPos.z() << ")" );
-        //ATH_MSG_INFO("detElement surface: " );
-        //m_detectorElements[index]->surface().dump(log);
         // ignore the z coordinate:
         trkPos[Amg::z]=0.;
         // determine the subdetector type
@@ -561,7 +439,6 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::elementWiseExtension(int beginInde
             // RIOs were used in the CompetingROT, clear the list
             RIOlist.clear();
         }
-        //ATH_MSG_VERBOSE("detector type: " << m_detectorElements[index]->type() );
         // ------------
         // Driftcircle collection and contained RIOs
         ATH_MSG_VERBOSE("trying to get detElement for index "<< index );
@@ -574,9 +451,6 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::elementWiseExtension(int beginInde
             ATH_MSG_DEBUG("for the current detectorElement no DriftCircleContainer seems to exist");
             continue;
         }
-//        if ((*containerIterator)->begin()==(*containerIterator)->end()){
-//           ATH_MSG_DEBUG("containerIterator->begin == containerIterator->end");
-//        }
 
         ATH_MSG_DEBUG( "There are "  << (*containerIterator)->size() << " entries in the TRT_DriftCircleCollection" );
         // loop over RIOs in the collection
@@ -589,7 +463,6 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::elementWiseExtension(int beginInde
             if (isBarrel) {
                 // calc squared distance in the x-y-plane
                 double distance = (trkPos - strawGlobPos).squaredNorm();
-                //double distance = strawGlobPos.distance2(trkPos);
                 ATH_MSG_DEBUG("distance in the x-y-plane: " << sqrt(distance) );
                 // exclude RIOs too far from global track position on the detElement:
                 if ( distance > squaredMaxBarrelRIOdistance ) {
@@ -600,7 +473,6 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::elementWiseExtension(int beginInde
                 // get the straw number for the straw axis
                 int straw = m_trtID->straw( (*driftCircleIterator)->identify() );
                 // calc squared distance of straw and track prediction perpendicular to the straw axis
-                //double distance = (strawGlobPos - trkPos).perp2( m_detectorElements[index]->strawAxis(straw) );
                 double distance = perp2(strawGlobPos-trkPos, event_data.m_detectorElements[index]->strawAxis(straw));
                 ATH_MSG_DEBUG("distance perp. to straw axis: " << sqrt(distance) );
 
@@ -619,7 +491,6 @@ StatusCode InDet::TRT_TrackExtensionTool_DAF::elementWiseExtension(int beginInde
         if (!compROT) {
             ATH_MSG_WARNING("current CompetingTRT_DriftCirclesOnTrack could not be created:");
             ATH_MSG_WARNING("   the RIOs on this detElement will be skipped!");
-            //continue;
         } else {
             // ---------------
             // append the created compROT to the MeasurementBase vector:
@@ -639,7 +510,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
 {
 
 
-    //double squaredMaxGroupDistance = m_jo_maxGroupDistance * m_jo_maxGroupDistance;
     // the pre-cut for RIOs (use twice the real road width):
     const double squaredMaxRIOdistanceFromTrackOnDetElement = m_jo_roadwidth*m_jo_roadwidth*16;
 
@@ -650,14 +520,8 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
     std::vector<Amg::Vector3D*> trackGlobalPos;
     trackGlobalPos.reserve(200);
 
-    //     // (x,y) of global track positions
-    //     vector<double>  trackGlobalPosX;
-    //     vector<double>  trackGlobalPosY;
     // index of the last global position belonging to the detElement
     std::vector<int> detElementGlobPosIndex(event_data.m_propagatedTrackParameters.size(), 0);
-    //     trackGlobalPosX.reserve(200);
-    //     trackGlobalPosY.reserve(200);
-    //detElementIndex.reserve(200);
 
     // do the first iteration manually to get the
     //    last global position
@@ -682,7 +546,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
         // ignore z coordinate (along the straw)
         (*Pos)[Amg::z]=0.;
 
-        //if ( ((posX-lastPosX)*(posX-lastPosX) + (posY-lastPosY)*(posY-lastPosY)) > m_jo_maxGroupDistance * m_jo_maxGroupDistance ) {
         double distance = ((*Pos) - (*lastPos)).norm();
         ATH_MSG_VERBOSE("global position: ("<< Pos->x() <<", "<< Pos->y() << ") -> distance to previous: "<< distance );
         if ( distance > m_jo_maxGroupDistance ) {
@@ -693,8 +556,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
                 Amg::Vector3D* newPos = new Amg::Vector3D( (*lastPos) + ((i / double(numberOfPoints+1)) * diffVector) );
                 trackGlobalPos.push_back( newPos );
                 ATH_MSG_VERBOSE("insert point with global position: ("<< newPos->x() <<", "<< newPos->y() << ")" );
-
-                //detElementIndex.push_back( index );
             }
         }
         if (distance < m_jo_minGroupDistance){
@@ -718,7 +579,7 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
 
     ATH_MSG_DEBUG("looping over detElements to get the DriftCircles" );
     int createdGroupCounter=0;
-    
+
     // -----------------------
     // get all the RIOs on the detElements
     InDet::TRT_DriftCircleContainer::const_iterator containerIterator;
@@ -734,9 +595,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
             ATH_MSG_DEBUG("for the current detectorElement no DriftCircleContainer seems to exist");
             continue;
         }
-//         if ((*containerIterator)->begin()==(*containerIterator)->end()){
-//            ATH_MSG_DEBUG("containerIterator->begin == containerIterator->end");
-//         }
         ATH_MSG_DEBUG( "There are "  << (*containerIterator)->size() << " entries in the TRT_DriftCircleCollection" );
 
         InDet::TRT_DriftCircleCollection::const_iterator driftCircleIterator = (*containerIterator)->begin();
@@ -776,7 +634,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
             if (newDistance == -1.) {
                 // backward serach did not succeed in finding a closer global position, try forward search
                 for (unsigned int i = minDistIndex+1; i < trackGlobalPos.size(); i++) {
-                    //newDistance = strawGlobPos.distance2(*(trackGlobalPos[i]));
                     newDistance = (*(trackGlobalPos[i]) - strawGlobPos).squaredNorm();
                     if (newDistance < minDistance ) {
                         // new distance is smaller than the one we had before!
@@ -803,10 +660,8 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
                 groupIndex = trackGlobalPos.size()-2;
             } else {
                 // distance to the point before the minimum
-                //double distBeforeMin = strawGlobPos.distance2(*(trackGlobalPos[minDistIndex-1]));
                 double distBeforeMin = (*(trackGlobalPos[minDistIndex-1]) - strawGlobPos).squaredNorm();
                 // distance to the point after the minimum
-                //double distAfterMin = strawGlobPos.distance2(*(trackGlobalPos[minDistIndex+1]));
                 double distAfterMin = (*(trackGlobalPos[minDistIndex+1]) - strawGlobPos).squaredNorm();
                 if (distBeforeMin < distAfterMin) {
                     groupIndex = minDistIndex-1;
@@ -877,7 +732,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
         // get StraightLineSurface of the RIO closest to the prediction
         const Trk::Surface& RIOsurface = minDistanceRIO[groupIndex]->detectorElement()->surface(minDistanceRIO[groupIndex]->identify());
         // propagate to this surface
-        //const Trk::TrackParameters* TrkPar = m_propagator->propagateParameters(*m_siliconTrkParams, RIOsurface, Trk::alongMomentum, false, m_fieldprop, Trk::pion);
         const Trk::TrackParameters* TrkPar = m_propagator->propagateParameters(*event_data.m_siliconTrkParams, RIOsurface, Trk::alongMomentum, false, m_fieldprop, Trk::nonInteracting);
         if (!TrkPar) {
             ATH_MSG_WARNING("propagation of track parameters to the RIO surface failed:");
@@ -886,7 +740,6 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
         }
         ATH_MSG_DEBUG("try to create CompetingTRT_DriftCirclesOnTrackTool with " << groupedRIOs[groupIndex]->size() << " RIOs" );
 
-        //const InDet::CompetingTRT_DriftCirclesOnTrack* compROT = m_compROTcreator->createCompetingROT(*groupedRIOs[groupIndex], *TrkPar, m_jo_annealingFactor);
         const Trk::MeasurementBase* compROT = m_compROTcreator->createCompetingROT(*groupedRIOs[groupIndex], *TrkPar, m_jo_annealingFactor);
         if (!compROT) {
             ATH_MSG_WARNING("current CompetingTRT_DriftCirclesOnTrack could not be created:");
@@ -912,7 +765,7 @@ InDet::TRT_TrackExtensionTool_DAF::groupedBarrelExtension(int beginIndex,
         delete (*RIOlistIterator);
         (*RIOlistIterator) = 0;
     }
-    
+
     return StatusCode::SUCCESS;
 }
 
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk.h b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk.h
index 06db25aea0d98d76ff0811ef71310be9ed2e1d02..1ca1e733c1223aef76d11ee40ba2ebc3267ee928 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk.h
@@ -18,7 +18,6 @@
 
 
 #include "GaudiKernel/ServiceHandle.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetRecToolInterfaces/ITRT_TrackExtensionTool.h"
@@ -42,23 +41,23 @@ namespace InDet{
   class ITRT_DetElementsRoadMaker;
 
   /**
-  @class TRT_TrackExtensionTool_xk 
-  
+  @class TRT_TrackExtensionTool_xk
+
   InDet::TRT_TrackExtensionTool_xk is algorithm which produce track
   extension to TRT
-  @author Igor.Gavrilenko@cern.ch     
+  @author Igor.Gavrilenko@cern.ch
   */
 
-  class TRT_TrackExtensionTool_xk : 
+  class TRT_TrackExtensionTool_xk :
 
     virtual public ITRT_TrackExtensionTool, public AthAlgTool
     {
       ///////////////////////////////////////////////////////////////////
       // Public methods:
       ///////////////////////////////////////////////////////////////////
-      
+
     public:
-      
+
       ///////////////////////////////////////////////////////////////////
       // Standard tool methods
       ///////////////////////////////////////////////////////////////////
@@ -72,7 +71,7 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       // Main methods for track extension to TRT
       ///////////////////////////////////////////////////////////////////
-      
+
       virtual std::vector<const Trk::MeasurementBase*>& extendTrack
         (const EventContext& ctx, const Trk::Track&,InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data) const override;
       virtual std::vector<const Trk::MeasurementBase*>& extendTrack
@@ -120,7 +119,6 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
 
       const TRT_ID                          *m_trtid;
-      ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle;
       ToolHandle<ITRT_DetElementsRoadMaker>         m_roadtool   ; // TRT road maker tool
       ToolHandle<Trk::IPatternParametersPropagator> m_proptool   ; //
       ToolHandle<Trk::IPatternParametersUpdator>    m_updatortool; //
@@ -129,8 +127,8 @@ namespace InDet{
       ToolHandle<Trk::IRIO_OnTrackCreator>          m_riontrackN ; //
 
       SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
-        
-        
+
+
       int                              m_segmentFindMode; // Method of segment find
       int                              m_outputlevel    ; // Print level
       int                              m_nprint         ; // Kind of print
@@ -139,19 +137,19 @@ namespace InDet{
       int                              m_minNumberPIX   ; // Min. number SCT clusters for extension
       double                           m_roadwidth      ; // Max width of the road
       double                           m_maxslope       ; //
-      double                           m_zVertexWidth   ; // Z-vertex half width 
+      double                           m_zVertexWidth   ; // Z-vertex half width
       double                           m_impact         ; // max impact parameter
       bool                             m_usedriftrad    ; // Use drift time ?
       bool                             m_parameterization; // Use table of min number DCs
       double                           m_scale_error    ; // Scalefactor for hit uncertainty
       std::string                      m_fieldmode      ; // Mode of magnetic field
-      std::string                      m_trtmanager     ; // Name of TRT det. manager 
+      std::string                      m_trtmanager     ; // Name of TRT det. manager
 
       Trk::MagneticFieldProperties     m_fieldprop      ; // Magnetic field properties
       SG::ReadHandleKey<TRT_DriftCircleContainer> m_trtname {this,"TRT_ClustersContainer","TRT_DriftCircles","RHK to retrieve TRT_DriftCircleContainer"};
 
       ///////////////////////////////////////////////////////////////////
-      // Methods 
+      // Methods
       ///////////////////////////////////////////////////////////////////
 
       void       magneticFieldInit();
@@ -166,9 +164,8 @@ namespace InDet{
     };
 
   MsgStream&    operator << (MsgStream&   ,const TRT_TrackExtensionTool_xk&);
-  std::ostream& operator << (std::ostream&,const TRT_TrackExtensionTool_xk&); 
+  std::ostream& operator << (std::ostream&,const TRT_TrackExtensionTool_xk&);
 
 } // end of name space
 
 #endif // TRT_TrackExtensionTool_xk_H
-
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrajectoryElement_xk.h b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrajectoryElement_xk.h
index 989f761123436c7e9b6b790452b553a75e922d4a..277f9e6be1d547d81410719df74b7d59bff9e0fb 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrajectoryElement_xk.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_TrajectoryElement_xk.h
@@ -15,7 +15,6 @@
 #ifndef TRT_TrajectoryElement_xk_H
 #define TRT_TrajectoryElement_xk_H
 
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "InDetPrepRawData/TRT_DriftCircleContainer.h"
 #include "TRT_ReadoutGeometry/TRT_DetectorManager.h"
 #include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
@@ -37,9 +36,9 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       // Public methods:
       ///////////////////////////////////////////////////////////////////
-      
+
     public:
-      
+
       TRT_TrajectoryElement_xk();
       TRT_TrajectoryElement_xk(const TRT_TrajectoryElement_xk&);
       ~TRT_TrajectoryElement_xk();
@@ -56,9 +55,9 @@ namespace InDet{
       const double&  radiusMax()                    const {return m_radiusMax ;}
       const double&  dpositive()                    const {return m_dpositive ;}
       const double&  dnegative()                    const {return m_dnegative ;}
-      const InDetDD::TRT_BaseElement* detElement()  const {return m_detelement;}  
+      const InDetDD::TRT_BaseElement* detElement()  const {return m_detelement;}
       const TRT_ExtensionDriftCircleLink_xk&   link  (int i) const {return m_link[i]    ;}
- 
+
       ///////////////////////////////////////////////////////////////////
       // Main methods
       ///////////////////////////////////////////////////////////////////
@@ -71,7 +70,7 @@ namespace InDet{
          double                             );
 
       void set
-      (const Trk::MagneticFieldProperties&,const MagField::IMagFieldSvc*, const AtlasFieldCacheCondObj* );
+      (const Trk::MagneticFieldProperties&, const AtlasFieldCacheCondObj* );
 
       bool initiateForPrecisionSeed     (bool,const InDetDD::TRT_BaseElement*&,
 					 InDet::TRT_DriftCircleCollection::const_iterator&,
@@ -92,7 +91,7 @@ namespace InDet{
 					 InDet::TRT_DriftCircleCollection::const_iterator&,
 					 std::pair<Amg::Vector3D,double>&,
 					 const double*,double);
-      
+
       bool boundaryTest(double,std::pair<Amg::Vector3D,double>&);
 
       bool buildForPrecisionSeed(double,double,bool&,bool&);
@@ -120,14 +119,14 @@ namespace InDet{
 	(Trk::PatternTrackParameters&,Trk::PatternTrackParameters&);
 
     protected:
-      
+
       ///////////////////////////////////////////////////////////////////
       // Protected Data
       ///////////////////////////////////////////////////////////////////
 
       bool                                               m_barrel     ;
       bool                                               m_isCluster  ;
-      int                                                m_status     ;  
+      int                                                m_status     ;
       int                                                m_bestlink   ;
       int                                                m_nlinks     ;
       double                                             m_z          ;
@@ -144,10 +143,9 @@ namespace InDet{
       const TRT_ID                   *                   m_trtid      ;
       const Trk::IPatternParametersPropagator*           m_proptool   ;
       const Trk::IPatternParametersUpdator*              m_updatortool;
-      const Trk::IRIO_OnTrackCreator       *             m_riomakerD  ; 
-      const Trk::IRIO_OnTrackCreator       *             m_riomakerN  ; 
+      const Trk::IRIO_OnTrackCreator       *             m_riomakerD  ;
+      const Trk::IRIO_OnTrackCreator       *             m_riomakerN  ;
       Trk::MagneticFieldProperties                       m_fieldprop  ;
-      const MagField::IMagFieldSvc*                      m_fieldService;
       MagField::AtlasFieldCache                          m_fieldCache;
 
       ///////////////////////////////////////////////////////////////////
@@ -163,7 +161,7 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
 
     };
-  
+
   /////////////////////////////////////////////////////////////////////////////////
   // Inline methods
   /////////////////////////////////////////////////////////////////////////////////
@@ -172,8 +170,8 @@ namespace InDet{
     {
       m_isCluster   = false;
       m_status      =-1    ;
-      m_riomakerD   = 0    ; 
-      m_riomakerN   = 0    ; 
+      m_riomakerD   = 0    ;
+      m_riomakerN   = 0    ;
       m_proptool    = 0    ;
       m_updatortool = 0    ;
       m_trtid       = 0    ;
@@ -190,7 +188,6 @@ namespace InDet{
       m_dpositive   = 0.   ;
       m_dnegative   = 0.   ;
       m_detelement  = 0    ;
-      m_fieldService= 0    ;    
     }
 
   inline TRT_TrajectoryElement_xk::TRT_TrajectoryElement_xk
@@ -198,9 +195,9 @@ namespace InDet{
     {
       (*this) = E;
     }
-  
-  inline TRT_TrajectoryElement_xk& TRT_TrajectoryElement_xk::operator = 
-    (const TRT_TrajectoryElement_xk& E) 
+
+  inline TRT_TrajectoryElement_xk& TRT_TrajectoryElement_xk::operator =
+    (const TRT_TrajectoryElement_xk& E)
     {
       m_status      = E.m_status     ;
       m_isCluster   = E.m_isCluster  ;
@@ -237,5 +234,3 @@ namespace InDet{
 } // end of name space
 
 #endif // TRT_TrajectoryElement_xk
-
-
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_Trajectory_xk.h b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_Trajectory_xk.h
index ad95a509ecf617b7cc93019e2dd4a58dd78c1510..4b26d53d388adb14229c53ecc35dbb49d1b4cb19 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_Trajectory_xk.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk/TRT_Trajectory_xk.h
@@ -15,7 +15,6 @@
 #ifndef TRT_Trajectory_xk_H
 #define TRT_Trajectory_xk_H
 
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TrkSegment/TrackSegment.h"
 #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h"
 #include "TRT_TrackExtensionTool_xk/TRT_TrajectoryElement_xk.h"
@@ -39,9 +38,9 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       // Public methods:
       ///////////////////////////////////////////////////////////////////
-      
+
     public:
-      
+
       TRT_Trajectory_xk();
       TRT_Trajectory_xk(const TRT_Trajectory_xk&);
       ~TRT_Trajectory_xk();
@@ -73,7 +72,7 @@ namespace InDet{
 	       double,
                double);
 
-      void set(Trk::MagneticFieldProperties&,const MagField::IMagFieldSvc *, const AtlasFieldCacheCondObj*);
+      void set(Trk::MagneticFieldProperties&, const AtlasFieldCacheCondObj*);
 
       void initiateForPrecisionSeed
 	(std::list< std::pair<Amg::Vector3D,double> >&,
@@ -90,7 +89,7 @@ namespace InDet{
       void convert(std::vector<const Trk::MeasurementBase*>&);
       Trk::TrackSegment* convert();
       Trk::Track       * convert(const Trk::Track&);
-      void updateTrackParameters(Trk::PatternTrackParameters&); 
+      void updateTrackParameters(Trk::PatternTrackParameters&);
 
       ///////////////////////////////////////////////////////////////////
       // Track finding with and without drift time information
@@ -112,7 +111,7 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       // Trajectory correction for new polar angle
       ///////////////////////////////////////////////////////////////////
-      
+
       void radiusCorrection();
 
       ///////////////////////////////////////////////////////////////////
@@ -133,7 +132,7 @@ namespace InDet{
       std::ostream& dump(std::ostream& out) const;
 
     protected:
-      
+
       ///////////////////////////////////////////////////////////////////
       // Protected Data
       ///////////////////////////////////////////////////////////////////
@@ -142,13 +141,13 @@ namespace InDet{
       int                                 m_lastRoad       ; //
       int                                 m_firstTrajectory; //
       int                                 m_lastTrajectory ; //
-      int                                 m_nclusters      ; // 
-      int                                 m_ntclusters     ; // 
-      int                                 m_nholesb        ; // 
-      int                                 m_nholese        ; // 
-      int                                 m_nholes         ; // 
-      int                                 m_dholes         ; // 
-      int                                 m_naElements     ; // 
+      int                                 m_nclusters      ; //
+      int                                 m_ntclusters     ; //
+      int                                 m_nholesb        ; //
+      int                                 m_nholese        ; //
+      int                                 m_nholes         ; //
+      int                                 m_dholes         ; //
+      int                                 m_naElements     ; //
       int                                 m_nElements      ; // nindex
       int                                 m_ndf            ; //
       double                              m_xi2            ; //
@@ -156,7 +155,7 @@ namespace InDet{
       double                              m_zVertexWidth   ; // z-vertex half width
       double                              m_impact         ; // max impact parameters
       double                              m_scale_error    ; // scale factor for hit uncertainty
-      Trk::PatternTrackParameters         m_parameters     ; // Track parameters 
+      Trk::PatternTrackParameters         m_parameters     ; // Track parameters
       TRT_TrajectoryElement_xk            m_elements[400]  ; //
       Trk::MagneticFieldProperties        m_fieldprop      ; //
       const Trk::IPatternParametersPropagator*  m_proptool ; //
@@ -176,14 +175,14 @@ namespace InDet{
       ///////////////////////////////////////////////////////////////////
       // Methods
       ///////////////////////////////////////////////////////////////////
-      
+
       void stabline(int,double);
       void sort    (samiStruct*,int);
       void erase   (int);
-      std::pair<const Trk::PseudoMeasurementOnTrack*,const Trk::PseudoMeasurementOnTrack*>  
+      std::pair<const Trk::PseudoMeasurementOnTrack*,const Trk::PseudoMeasurementOnTrack*>
 	pseudoMeasurements(const Trk::Surface*,const Trk::Surface*,int bec);
     };
-  
+
   /////////////////////////////////////////////////////////////////////////////////
   // Inline methods
   /////////////////////////////////////////////////////////////////////////////////
@@ -199,12 +198,12 @@ namespace InDet{
       m_firstTrajectory = 0 ;
       m_lastTrajectory  = 0 ;
       m_nclusters       = 0 ;
-      m_ntclusters      = 0 ; 
-      m_nholesb         = 0 ; 
-      m_nholese         = 0 ; 
-      m_nholes          = 0 ; 
-      m_dholes          = 0 ; 
-      m_naElements      = 0 ; 
+      m_ntclusters      = 0 ;
+      m_nholesb         = 0 ;
+      m_nholese         = 0 ;
+      m_nholes          = 0 ;
+      m_dholes          = 0 ;
+      m_naElements      = 0 ;
       m_ndf             = 0 ;
       m_xi2             = 0.;
       m_roadwidth2      = 0.;
@@ -219,23 +218,23 @@ namespace InDet{
     {
       (*this) = T;
     }
-  
-  inline TRT_Trajectory_xk& TRT_Trajectory_xk::operator = 
-    (const TRT_Trajectory_xk& T) 
+
+  inline TRT_Trajectory_xk& TRT_Trajectory_xk::operator =
+    (const TRT_Trajectory_xk& T)
     {
       m_firstRoad        = T.m_firstRoad      ;
       m_lastRoad         = T.m_lastRoad       ;
       m_firstTrajectory  = T.m_firstTrajectory;
       m_lastTrajectory   = T.m_lastTrajectory ;
-      m_nclusters        = T.m_nclusters      ; 
-      m_ntclusters       = T.m_ntclusters     ; 
+      m_nclusters        = T.m_nclusters      ;
+      m_ntclusters       = T.m_ntclusters     ;
       m_nholesb          = T.m_nholesb        ;
       m_nholese          = T.m_nholese        ;
       m_nholes           = T.m_nholes         ;
       m_dholes           = T.m_dholes         ;
       m_naElements       = T.m_naElements     ;
       m_nElements        = T.m_nElements      ;
-      m_roadwidth2       = T.m_roadwidth2     ; 
+      m_roadwidth2       = T.m_roadwidth2     ;
       m_parameters       = T.m_parameters     ;
       m_fieldprop        = T.m_fieldprop      ;
       m_proptool         = T.m_proptool       ;
@@ -251,19 +250,17 @@ namespace InDet{
 
   inline TRT_Trajectory_xk::~TRT_Trajectory_xk() {}
 
-  std::ostream& operator << (std::ostream&,const TRT_Trajectory_xk&); 
+  std::ostream& operator << (std::ostream&,const TRT_Trajectory_xk&);
 
   inline bool TRT_Trajectory_xk::isFirstElementBarrel()
     {
-      return m_elements[m_firstTrajectory].isBarrel(); 
+      return m_elements[m_firstTrajectory].isBarrel();
     }
   inline bool TRT_Trajectory_xk::isLastElementBarrel()
     {
-      return m_elements[m_lastTrajectory].isBarrel(); 
+      return m_elements[m_lastTrajectory].isBarrel();
     }
 
 } // end of name space
 
 #endif // TRT_Trajectory_xk
-
-
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrackExtensionTool_xk.cxx b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrackExtensionTool_xk.cxx
index 1602715d330a5ade1aed85d007fc22fc44e16197..8023ad3a82e58c87c28b4990116d02b35c7bd6c5 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrackExtensionTool_xk.cxx
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrackExtensionTool_xk.cxx
@@ -13,7 +13,7 @@
 
 
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include "InDetRecToolInterfaces/ITRT_DetElementsRoadMaker.h" 
+#include "InDetRecToolInterfaces/ITRT_DetElementsRoadMaker.h"
 #include "TRT_TrackExtensionTool_xk/TRT_TrackExtensionTool_xk.h"
 #include "InDetRecToolInterfaces/ITrtDriftCircleCutTool.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
@@ -28,7 +28,6 @@
 InDet::TRT_TrackExtensionTool_xk::TRT_TrackExtensionTool_xk
 (const std::string& t,const std::string& n,const IInterface* p)
   : AthAlgTool(t,n,p),
-    m_fieldServiceHandle("AtlasFieldSvc",n), 
     m_roadtool  ("InDet::TRT_DetElementsRoadMaker_xk"                                                ),
     m_proptool    ("Trk::RungeKuttaPropagator"                                                       ),
     m_updatortool ("Trk::KalmanUpdator_xk"                                                           ),
@@ -47,7 +46,7 @@ InDet::TRT_TrackExtensionTool_xk::TRT_TrackExtensionTool_xk
   m_impact          = 50.                ;
   m_segmentFindMode = 3                  ;
   m_usedriftrad     = true               ;
-  m_parameterization= true               ; 
+  m_parameterization= true               ;
   m_scale_error     = 2.                 ;
 
   declareInterface<ITRT_TrackExtensionTool>(this);
@@ -71,11 +70,10 @@ InDet::TRT_TrackExtensionTool_xk::TRT_TrackExtensionTool_xk
   declareProperty("MagneticFieldMode"      ,m_fieldmode       );
   declareProperty("MinNumberSCTclusters"   ,m_minNumberSCT    );
   declareProperty("MinNumberPIXclusters"   ,m_minNumberPIX    );
-  declareProperty("MagFieldSvc"        , m_fieldServiceHandle);
 }
 
 ///////////////////////////////////////////////////////////////////
-// Destructor  
+// Destructor
 ///////////////////////////////////////////////////////////////////
 
 InDet::TRT_TrackExtensionTool_xk::~TRT_TrackExtensionTool_xk()
@@ -88,7 +86,7 @@ InDet::TRT_TrackExtensionTool_xk::~TRT_TrackExtensionTool_xk()
 
 StatusCode InDet::TRT_TrackExtensionTool_xk::initialize()
 {
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc = AlgTool::initialize();
 
   // Get tTools servise
   //
@@ -101,17 +99,7 @@ StatusCode InDet::TRT_TrackExtensionTool_xk::initialize()
   // Get magnetic field service
   //
   if(m_fieldmode != "NoField" ) {
-    
-    if( !m_fieldServiceHandle.retrieve() ){
-      ATH_MSG_FATAL("Failed to retrieve " << m_fieldServiceHandle );
-      return StatusCode::FAILURE;
-    }    
-    ATH_MSG_DEBUG("Retrieved " << m_fieldServiceHandle );
-
-    ////////////////////////////////////////////////////////////////////////////////
     ATH_CHECK( m_fieldCondObjInputKey.initialize());
-    ////////////////////////////////////////////////////////////////////////////////
-    
   }
 
   if     (m_fieldmode == "NoField"    ) m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField  );
@@ -172,7 +160,7 @@ StatusCode InDet::TRT_TrackExtensionTool_xk::initialize()
     msg(MSG::INFO) << "Retrieved tool " << m_selectortool << endmsg;
   }
 
- 
+
 
   // TRT
   if (detStore()->retrieve(m_trtid,"TRT_ID").isFailure()) {
@@ -226,8 +214,8 @@ MsgStream& InDet::TRT_TrackExtensionTool_xk::dumpConditions( MsgStream& out ) co
 			     "ToroidalField" ,"Grid3DField"  ,"RealisticField" ,
 			     "UndefinedField","AthenaField"  , "?????"         };
 
-  int mode = m_fieldprop.magneticFieldMode(); 
-  if(mode<0 || mode>8 ) mode = 8; 
+  int mode = m_fieldprop.magneticFieldMode();
+  if(mode<0 || mode>8 ) mode = 8;
 
   n     = 64-fieldmode[mode].size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
@@ -255,7 +243,7 @@ MsgStream& InDet::TRT_TrackExtensionTool_xk::dumpConditions( MsgStream& out ) co
      <<"                                                    |"<<std::endl;
   out<<"| TRT road half width (mm)| "
      <<std::setw(12)<<std::setprecision(5)<<m_roadwidth
-     <<"                                                    |"<<std::endl;     
+     <<"                                                    |"<<std::endl;
   out<<"| Min number DriftCircles | "
      <<std::setw(12)<<m_minNumberDCs
      <<"                                                    |"<<std::endl;
@@ -299,21 +287,21 @@ std::ostream& InDet::TRT_TrackExtensionTool_xk::dump( std::ostream& out ) const
 // Overload of << operator MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::operator    << 
+MsgStream& InDet::operator    <<
   (MsgStream& sl,const InDet::TRT_TrackExtensionTool_xk& se)
-{ 
-  return se.dump(sl); 
+{
+  return se.dump(sl);
 }
 
 ///////////////////////////////////////////////////////////////////
 // Overload of << operator std::ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::operator << 
+std::ostream& InDet::operator <<
   (std::ostream& sl,const InDet::TRT_TrackExtensionTool_xk& se)
 {
-  return se.dump(sl); 
-}   
+  return se.dump(sl);
+}
 
 ///////////////////////////////////////////////////////////////////
 // Track extension initiation
@@ -330,9 +318,8 @@ InDet::TRT_TrackExtensionTool_xk::newEvent(const EventContext& ctx) const
     throw std::runtime_error( msg.str() );
   }
 
-  Trk::MagneticFieldProperties     fieldprop =  ( m_fieldServiceHandle->solenoidOn()
-                                                  ? m_fieldprop
-                                                  : Trk::MagneticFieldProperties(Trk::NoField  ));
+  // Get AtlasFieldCache
+  MagField::AtlasFieldCache fieldCache;
 
   SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
   const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
@@ -340,9 +327,14 @@ InDet::TRT_TrackExtensionTool_xk::newEvent(const EventContext& ctx) const
       ATH_MSG_ERROR("InDet::TRT_TrackExtensionTool_xk::findSegment: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
       return 0;
   }
+  fieldCondObj->getInitializedCache (fieldCache);
+
+  Trk::MagneticFieldProperties     fieldprop =  ( fieldCache.solenoidOn()
+                                                  ? m_fieldprop
+                                                  : Trk::MagneticFieldProperties(Trk::NoField  ));
 
   std::unique_ptr<EventData> event_data(new EventData(trtcontainer.cptr(), m_maxslope));
-  event_data->m_trajectory.set(fieldprop, &(*m_fieldServiceHandle), fieldCondObj);
+  event_data->m_trajectory.set(fieldprop, fieldCondObj);
   event_data->m_trajectory.set (m_trtid,
                                 &(*m_proptool),
                                 &(*m_updatortool),
@@ -361,7 +353,7 @@ InDet::TRT_TrackExtensionTool_xk::newEvent(const EventContext& ctx) const
 // Main methods for track extension to TRT
 ///////////////////////////////////////////////////////////////////
 
-std::vector<const Trk::MeasurementBase*>& 
+std::vector<const Trk::MeasurementBase*>&
 InDet::TRT_TrackExtensionTool_xk::extendTrack(const EventContext& ctx,
                                               const Trk::Track& Tr,
                                               InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data) const
@@ -371,15 +363,15 @@ InDet::TRT_TrackExtensionTool_xk::extendTrack(const EventContext& ctx,
 
   event_data.m_measurement.clear();
 
-  const DataVector<const Trk::TrackStateOnSurface>* 
+  const DataVector<const Trk::TrackStateOnSurface>*
     tsos = Tr.trackStateOnSurfaces();
 
-  const Trk::TrackParameters* 
+  const Trk::TrackParameters*
     par = (*(tsos->rbegin()))->trackParameters(); if(!par ) return event_data.m_measurement;
-  const Trk::TrackParameters* 
+  const Trk::TrackParameters*
     parb = (*(tsos->begin()))->trackParameters();
 
-  
+
   if(parb && par!=parb) {
 
     const Amg::Vector3D& g1 = par ->position();
@@ -418,7 +410,7 @@ InDet::TRT_TrackExtensionTool_xk::extendTrackFromParameters(const EventContext&
 // Main methods for segment finding in TRT for TRT seeds
 ///////////////////////////////////////////////////////////////////
 
-Trk::TrackSegment* 
+Trk::TrackSegment*
 InDet::TRT_TrackExtensionTool_xk::findSegment(const EventContext& ctx,
                                               const Trk::TrackParameters& par,
                                               InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data) const
@@ -440,7 +432,7 @@ InDet::TRT_TrackExtensionTool_xk::findSegment(const EventContext& ctx,
       return 0;
   }
   fieldCondObj->getInitializedCache (fieldCache);
-  
+
 
   // TRT detector elements road builder
   //
@@ -448,7 +440,7 @@ InDet::TRT_TrackExtensionTool_xk::findSegment(const EventContext& ctx,
   m_roadtool->detElementsRoad(ctx, fieldCache, par, Trk::alongMomentum,DE);
 
   if(int(DE.size())< nCut) return 0;
-  
+
   // Array pointers to surface preparation
   //
   std::list<const Trk::Surface*> surfaces;
@@ -459,7 +451,7 @@ InDet::TRT_TrackExtensionTool_xk::findSegment(const EventContext& ctx,
   }
 
   // Global position on surfaces production
-  // 
+  //
   Trk::PatternTrackParameters Tp; if(!Tp.production(&par)) return 0;
   std::list< std::pair<Amg::Vector3D,double> > gpos;
   m_proptool->globalPositions(ctx, Tp, surfaces, gpos, m_fieldprop);
@@ -495,7 +487,7 @@ InDet::TRT_TrackExtensionTool_xk::findSegment(const EventContext& ctx,
   event_data.m_maxslope = m_maxslope;
 
   // Trajectory quality test
-  // 
+  //
   int nc = event_data.m_trajectory.nclusters();
   int nh = event_data.m_trajectory.nholes   ();
   if( nc < nCut  || (1000*nc) < (700*(nc+nh)) ) return 0;
@@ -532,7 +524,7 @@ bool InDet::TRT_TrackExtensionTool_xk::isGoodExtension(const EventContext& ctx,
                                                        const Trk::TrackParameters& par,
                                                        InDet::TRT_TrackExtensionTool_xk::EventData &event_data) const
 {
-    
+
   // Get AtlasFieldCache
   MagField::AtlasFieldCache fieldCache;
 
@@ -544,13 +536,13 @@ bool InDet::TRT_TrackExtensionTool_xk::isGoodExtension(const EventContext& ctx,
   }
   fieldCondObj->getInitializedCache (fieldCache);
 
-    
+
   // TRT detector elements road builder
   //
   std::vector<const InDetDD::TRT_BaseElement*> DE;
   m_roadtool->detElementsRoad(ctx, fieldCache, par,Trk::alongMomentum,DE);
   if(int(DE.size()) < m_minNumberDCs) return false;
-  
+
   // Array pointers to surface preparation
   //
   std::list<const Trk::Surface*> surfaces;
@@ -561,7 +553,7 @@ bool InDet::TRT_TrackExtensionTool_xk::isGoodExtension(const EventContext& ctx,
   }
 
   // Global position on surfaces production
-  // 
+  //
   Trk::PatternTrackParameters Tp; if(!Tp.production(&par)) return false;
   std::list< std::pair<Amg::Vector3D,double> > gpos;
   m_proptool->globalPositions(ctx, Tp,surfaces,gpos,m_fieldprop);
@@ -588,7 +580,7 @@ bool InDet::TRT_TrackExtensionTool_xk::isGoodExtension(const EventContext& ctx,
 }
 
 ///////////////////////////////////////////////////////////////////
-// Methods for track extension to TRT for pixles+sct tracks 
+// Methods for track extension to TRT for pixles+sct tracks
 // and new track production
 ///////////////////////////////////////////////////////////////////
 
@@ -599,14 +591,14 @@ Trk::Track* InDet::TRT_TrackExtensionTool_xk::newTrack(const EventContext& ctx,
   InDet::TRT_TrackExtensionTool_xk::EventData &
      event_data=InDet::TRT_TrackExtensionTool_xk::EventData::getPrivateEventData(virt_event_data);
 
-  const DataVector<const Trk::TrackStateOnSurface>* 
+  const DataVector<const Trk::TrackStateOnSurface>*
     tsos = Tr.trackStateOnSurfaces();
 
   // Test conditions to start track extension to TRT
   //
-  const Trk::TrackParameters* 
+  const Trk::TrackParameters*
     pe  = (*(tsos->rbegin()))->trackParameters(); if(!pe) return 0; if(!pe->covariance()) return 0;
-  const Trk::TrackParameters* 
+  const Trk::TrackParameters*
     pb  = (*(tsos->begin ()))->trackParameters(); if(!pb) return 0; if(!pb->covariance()) return 0;
 
   // Number PIX and SCT clusters cuts
@@ -626,11 +618,11 @@ Trk::Track* InDet::TRT_TrackExtensionTool_xk::newTrack(const EventContext& ctx,
 bool InDet::TRT_TrackExtensionTool_xk::numberPIXandSCTclustersCut(const Trk::Track& Tr) const
 {
   if(m_minNumberSCT <=0 && m_minNumberPIX <=0) return true;
-  
-  const DataVector<const Trk::TrackStateOnSurface>* 
+
+  const DataVector<const Trk::TrackStateOnSurface>*
     tsos = Tr.trackStateOnSurfaces();
 
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator 
+  DataVector<const Trk::TrackStateOnSurface>::const_iterator
     s = tsos->begin(), se = tsos->end();
 
   int npix = 0;
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrajectoryElement_xk.cxx b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrajectoryElement_xk.cxx
index a43616d70ea79b44a49e014403d94716cef1388e..67815fcfc2b2a085d7c2ebe1711a25ed44a4bc14 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrajectoryElement_xk.cxx
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_TrajectoryElement_xk.cxx
@@ -13,8 +13,8 @@
 
 void InDet::TRT_TrajectoryElement_xk::set
 (const TRT_ID                           *    m,
- const Trk::IPatternParametersPropagator*   pr, 
- const Trk::IPatternParametersUpdator   *   up, 
+ const Trk::IPatternParametersPropagator*   pr,
+ const Trk::IPatternParametersUpdator   *   up,
  const Trk::IRIO_OnTrackCreator               * riod,
  const Trk::IRIO_OnTrackCreator               * rion,
  double scale)
@@ -28,10 +28,9 @@ void InDet::TRT_TrajectoryElement_xk::set
 }
 
 void InDet::TRT_TrajectoryElement_xk::set
-(const Trk::MagneticFieldProperties &  mf, const MagField::IMagFieldSvc* ms, const AtlasFieldCacheCondObj* fieldCondObj)
+(const Trk::MagneticFieldProperties &  mf, const AtlasFieldCacheCondObj* fieldCondObj)
 {
   m_fieldprop    = mf;
-  m_fieldService = ms;
   fieldCondObj->getInitializedCache (m_fieldCache);
 }
 
@@ -107,7 +106,7 @@ bool InDet::TRT_TrajectoryElement_xk::boundaryTest
   if     ((rb=dynamic_cast<const Trk::RectangleBounds*>(&m_detelement->bounds()))) {
 
     // Barrel
-    //    
+    //
     m_barrel = true                   ;
     m_z      = z                      ;
     m_zMin   = C.z()-rb->halflengthY();
@@ -115,16 +114,16 @@ bool InDet::TRT_TrajectoryElement_xk::boundaryTest
     double d = fabs(z - C.z()); if( d > rb->halflengthY()+dw) return false;
   }
   else if((db=dynamic_cast<const Trk::DiscBounds*>     (&m_detelement->bounds()))) {
-   
+
     // Endcap
-    //    
+    //
     m_barrel    = false        ;
     m_radius    = sqrt(x*x+y*y);
     m_z         = z            ;
     m_radiusMin = db->rMin()   ;
     m_radiusMax = db->rMax()   ;
 
-    double d = m_radius-m_radiusMin;  if(d < -dw) return false; 
+    double d = m_radius-m_radiusMin;  if(d < -dw) return false;
     d        = m_radiusMax-m_radius;  if(d < -dw) return false;
   }
   return true;
@@ -134,7 +133,7 @@ bool InDet::TRT_TrajectoryElement_xk::boundaryTest
 // Initiate trajectory element links to straws for precision  seed
 ///////////////////////////////////////////////////////////////////
 
-void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed 
+void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed
 (InDet::TRT_DriftCircleCollection::const_iterator& sb,
  InDet::TRT_DriftCircleCollection::const_iterator& se,
  std::pair<Amg::Vector3D,double>&                  gp,
@@ -186,9 +185,9 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed
       double Bz    = Az[0]*dir[1]-Az[1]*dir[0];
       double im    =(dx*Bx+dy*By+dz*Bz)/sqrt(Bx*Bx+By*By+Bz*Bz);
       double zl    = dx*Az[0]+dy*Az[1]+dz*Az[2];
-      S           +=gp.second; 
+      S           +=gp.second;
       d            = fabs(im); if(y*xs-x*ys > 0.) d=-d;
-      m_link[m_nlinks].set(ns,d,im,zl,S); 
+      m_link[m_nlinks].set(ns,d,im,zl,S);
       if(++m_nlinks==24) break;
     }
   }
@@ -222,9 +221,9 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed
       double Bz    = Az[0]*dir[1]-Az[1]*dir[0];
       double im    =(dx*Bx+dy*By+dz*Bz)/sqrt(Bx*Bx+By*By+Bz*Bz);
       double zl    = dx*Az[0]+dy*Az[1]+dz*Az[2];
-      S           +=gp.second; 
+      S           +=gp.second;
       d            = fabs(im); if(y*xs-x*ys > 0.) d=-d;
-      m_link[m_nlinks].set(ns,d,im,zl,S); 
+      m_link[m_nlinks].set(ns,d,im,zl,S);
       if(++m_nlinks==24) break;
     }
   }
@@ -232,7 +231,7 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed
   m_dnegative =-1000.;
   if(m_isCluster && m_nlinks) {
 
-    bool nl = false; 
+    bool nl = false;
     for(; sb!=se; ++sb) {
 
       int  ns = m_trtid->straw((*sb)->identify());
@@ -240,7 +239,7 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed
       for(int l=0; l!=m_nlinks; ++l) {
 	if(ns!=m_link[l].number()) continue;
 	nl=true; m_link[l].set((*sb));
- 
+
 	double d = m_link[l].distance();
 	if(d >= 0.) {if(d < m_dpositive) m_dpositive = d;}
 	else        {if(d > m_dnegative) m_dnegative = d;}
@@ -255,7 +254,7 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForPrecisionSeed
 // Initiate trajectory element links to straws for TRT seed
 ///////////////////////////////////////////////////////////////////
 
-void InDet::TRT_TrajectoryElement_xk::initiateLinksForTRTSeed 
+void InDet::TRT_TrajectoryElement_xk::initiateLinksForTRTSeed
 (InDet::TRT_DriftCircleCollection::const_iterator& sb,
  InDet::TRT_DriftCircleCollection::const_iterator& se,
  std::pair<Amg::Vector3D,double>&                  gp,
@@ -306,9 +305,9 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForTRTSeed
       double Bz    = Az[0]*dir[1]-Az[1]*dir[0];
       double im    =(dx*Bx+dy*By+dz*Bz)/sqrt(Bx*Bx+By*By+Bz*Bz);
       double zl    = dx*Az[0]+dy*Az[1]+dz*Az[2];
-      S           +=gp.second; 
+      S           +=gp.second;
       d            = fabs(im); if(y*xs-x*ys > 0.) d=-d;
-      m_link[m_nlinks].set(ns,d,im,zl,S); 
+      m_link[m_nlinks].set(ns,d,im,zl,S);
       if(++m_nlinks==24) break;
     }
   }
@@ -357,7 +356,7 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForTRTSeed
       double sy    = ay+dir[1]*dS     ;
       double sd    =(sx*Bx+sy*By)*B   ;
       double sz    = sx*Az[0]+sy*Az[1];
-      S           +=gp.second; 
+      S           +=gp.second;
       if( y*xs-x*ys > 0.) {d =-fabs(im); sd =-fabs(im+sd)-d;}
       else                {d = fabs(im); sd = fabs(im+sd)-d;}
 
@@ -370,14 +369,14 @@ void InDet::TRT_TrajectoryElement_xk::initiateLinksForTRTSeed
   m_dnegative =-1000.;
   if(m_isCluster && m_nlinks) {
 
-    bool nl = false; 
+    bool nl = false;
     for(; sb!=se; ++sb) {
 
       int  ns = m_trtid->straw((*sb)->identify());
 
       for(int l=0; l!=m_nlinks; ++l) {
 	if(ns!=m_link[l].number()) continue;
-	nl=true; m_link[l].set((*sb)); 
+	nl=true; m_link[l].set((*sb));
 
 	double d = m_link[l].distance();
 	if(d >= 0.) {if(d < m_dpositive) m_dpositive = d;}
@@ -423,11 +422,11 @@ bool InDet::TRT_TrajectoryElement_xk::buildForPrecisionSeed
     double r = m_link[l].cluster()->localPosition()[Trk::driftRadius];
     double e = m_scale_error*sqrt(m_link[l].cluster()->localCovariance()(0,0));
 
-    if(r > 2.05) r = 2.05; 
+    if(r > 2.05) r = 2.05;
     double r2 = r+e; if(r2 > 2.05) r2 = 2.05;
     double r1 = r-e; if(r1 >= r2) r1 = r2-2.*e;
 
-    if(ad < r1 || ad > r2) useDriftTime = false; else m_status = 2; 
+    if(ad < r1 || ad > r2) useDriftTime = false; else m_status = 2;
 
     return true;
   }
@@ -450,7 +449,7 @@ bool InDet::TRT_TrajectoryElement_xk::buildForTRTSeed
   double v  = (a*m_link[l].way()+b)*m_link[l].way();
   double d  = m_link[l].distance()-v;
   double ad = fabs(d);
-  
+
   if(ad > 2.05) return false;
 
   if(!m_link[l].cluster()) {
@@ -462,14 +461,14 @@ bool InDet::TRT_TrajectoryElement_xk::buildForTRTSeed
   }
   m_status  = 1; m_link[l].newImpactParameter(d);
   if(!useDriftTime) return true;
-  
+
   double r = m_link[l].cluster()->localPosition()[Trk::driftRadius];
   double e = m_scale_error*sqrt(m_link[l].cluster()->localCovariance()(0,0));
-  
-  if(r > 2.05) r = 2.05; 
+
+  if(r > 2.05) r = 2.05;
   double r2 = r+e; if(r2 > 2.05) r2 = 2.05;
   double r1 = r-e; if(r1 >= r2) r1 = r2-2.*e;
-  if(ad < r1 || ad > r2) useDriftTime = false; else m_status = 2; 
+  if(ad < r1 || ad > r2) useDriftTime = false; else m_status = 2;
   return true;
 }
 
@@ -480,7 +479,7 @@ bool InDet::TRT_TrajectoryElement_xk::buildForTRTSeed
 double InDet::TRT_TrajectoryElement_xk::findCloseLink
 (double a,double b)
 {
-  m_bestlink =    -1; 
+  m_bestlink =    -1;
   double dm = 10000.;
 
   for(int l=0; l < m_nlinks; ++l) {
@@ -488,7 +487,7 @@ double InDet::TRT_TrajectoryElement_xk::findCloseLink
     double v  = (a*m_link[l].way()+b)*m_link[l].way();
     double d  = fabs(m_link[l].distance()-v);
 
-    if(d < dm) {dm=d;  m_bestlink=l;} 
+    if(d < dm) {dm=d;  m_bestlink=l;}
   }
   return dm;
 }
@@ -499,7 +498,7 @@ double InDet::TRT_TrajectoryElement_xk::findCloseLink
 
 const Trk::RIO_OnTrack* InDet::TRT_TrajectoryElement_xk::rioOnTrack()
 {
-  if(m_bestlink < 0 || m_status<=0) return 0; 
+  if(m_bestlink < 0 || m_status<=0) return 0;
 
   int l = m_bestlink;
 
@@ -518,8 +517,8 @@ const Trk::RIO_OnTrack* InDet::TRT_TrajectoryElement_xk::rioOnTrack()
 
 const Trk::RIO_OnTrack* InDet::TRT_TrajectoryElement_xk::rioOnTrackSimple()
 {
-  if(m_bestlink < 0 || m_status<=0) return 0; 
-  
+  if(m_bestlink < 0 || m_status<=0) return 0;
+
   int l = m_bestlink;
   Amg::Vector3D dir(1.,0.,0.);
   Trk::DefinedParameter radius(0.,Trk::locX);
@@ -545,7 +544,7 @@ bool InDet::TRT_TrajectoryElement_xk::propagate
 }
 
 ///////////////////////////////////////////////////////////////////
-// Add drift circles information to track parameters             
+// Add drift circles information to track parameters
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::TRT_TrajectoryElement_xk::addCluster
@@ -559,7 +558,7 @@ bool InDet::TRT_TrajectoryElement_xk::addCluster
 
     const TRT_DriftCircle* DS = m_link[m_bestlink].cluster();
     double dr = DS->localPosition().x(); if(m_link[m_bestlink].impact() < 0.) dr=-dr;
-    
+
     Trk::DefinedParameter radius(dr,Trk::locX);
     Trk::LocalParameters  lp(radius);
 
@@ -577,7 +576,7 @@ bool InDet::TRT_TrajectoryElement_xk::addCluster
 }
 
 ///////////////////////////////////////////////////////////////////
-// Global trajectory coordinates calculation            
+// Global trajectory coordinates calculation
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::TRT_TrajectoryElement_xk::trajectoryGlobalPosition
@@ -601,7 +600,7 @@ bool InDet::TRT_TrajectoryElement_xk::trajectoryGlobalPosition
   else if(Rc[2] > 0. ) {             // Positive endcap
 
     Bx = Az[1];          By =-Az[0];
-  } 
+  }
   else                 {             // Negative endcap
 
     Bx =-Az[1];          By = Az[0];
@@ -609,9 +608,9 @@ bool InDet::TRT_TrajectoryElement_xk::trajectoryGlobalPosition
   double zl = m_link[l].zlocal();
   double im = m_link[l].impact();
   G[0]      = zl*Az[0]+Bx*im+Rc[0];
-  G[1]      = zl*Az[1]+By*im+Rc[1]; 
-  G[2]      = zl*Az[2]      +Rc[2]; 
-  WAY       = m_link[l].way()     ; 
+  G[1]      = zl*Az[1]+By*im+Rc[1];
+  G[2]      = zl*Az[2]      +Rc[2];
+  WAY       = m_link[l].way()     ;
   return true;
 }
 
@@ -623,15 +622,15 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
 (TRT_TrajectoryElement_xk* E1,TRT_TrajectoryElement_xk* E2,Trk::PatternTrackParameters& Tp,
  double ZvHW)
 {
-  
+
   if(!E1) return false;
 
-  Amg::Vector3D Gp[3];  
-  double     Wa[3];  
+  Amg::Vector3D Gp[3];
+  double     Wa[3];
 
   if   (!    trajectoryGlobalPosition(Gp[0],Wa[0])) return false;
   if   (!E1->trajectoryGlobalPosition(Gp[1],Wa[1])) return false;
-  
+
   int mode; Wa[0] > Wa[1] ? mode=0 : mode=1;
 
   if(E2) {
@@ -650,7 +649,7 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   double x0 = Gp[0][0]               ;
   double y0 = Gp[0][1]               ;
   double x1 = Gp[1][0]-x0            ;
-  double y1 = Gp[1][1]-y0            ; 
+  double y1 = Gp[1][1]-y0            ;
   double x2 = Gp[2][0]-x0            ;
   double y2 = Gp[2][1]-y0            ;
   double r1 = sqrt(x1*x1+y1*y1)      ;
@@ -669,9 +668,9 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   if(mode==0) {
     f = atan2(-b-a*A,-a+b*A); C=-C; polarAngleEstimation(E2,Gp[0],Gp[2],C,ZvHW,TP);
   }
-  else if(mode==1) { 
-    f = atan2( b+a*A, a-b*A);       polarAngleEstimation(E2,Gp[0],Gp[2],C,ZvHW,TP); 
-  }  
+  else if(mode==1) {
+    f = atan2( b+a*A, a-b*A);       polarAngleEstimation(E2,Gp[0],Gp[2],C,ZvHW,TP);
+  }
   else             {
     f = atan2( b+a*A, a-b*A);       polarAngleEstimation(E1,Gp[0],Gp[1],C,ZvHW,TP);
   }
@@ -679,26 +678,17 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   // Track parameters estimation
   //
   double P[5] = {m_link[m_bestlink].impact(),m_link[m_bestlink].zlocal(),f,atan2(1.,TP[0]),.0001};
-  
+
   double pos0[3]; pos0[0]=Gp[0][0]; pos0[1]=Gp[0][1]; pos0[2]=Gp[0][2];
   double pos1[3]; pos1[0]=Gp[1][0]; pos1[1]=Gp[1][1]; pos1[2]=Gp[1][2];
   double pos2[3]; pos2[0]=Gp[2][0]; pos2[1]=Gp[2][1]; pos2[2]=Gp[2][2];
-  double H0  [3]; 
-  double H1  [3]; 
-  double H2  [3]; 
-  // MT version uses cache, temporarily keep old version
-  if (m_fieldCache.useNewBfieldCache()) {
-      m_fieldCache.getFieldZR    (pos0,H0);
-      m_fieldCache.getFieldZR    (pos1,H1);
-      m_fieldCache.getFieldZR    (pos2,H2);
-  }
-  else {
-      m_fieldService->getFieldZR (pos0,H0);
-      m_fieldService->getFieldZR (pos1,H1);
-      m_fieldService->getFieldZR (pos2,H2);      
-  }
-  
-  
+  double H0  [3];
+  double H1  [3];
+  double H2  [3];
+  m_fieldCache.getFieldZR    (pos0,H0);
+  m_fieldCache.getFieldZR    (pos1,H1);
+  m_fieldCache.getFieldZR    (pos2,H2);
+
   double Hz = .333333*(H0[2]+H1[2]+H2[2]);
 
   // If magnetic field exist
@@ -716,7 +706,7 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   double dp       = 8.*df*wa*Cm  ;
   double c0       = 4.           ;
   double c1       = TP[1]        ;
-  double c2       = df*df*(1.+T2); 
+  double c2       = df*df*(1.+T2);
   double c3       = TP[2]        ;
   double c4       = dp*dp        ;
   double V[15] ={c0,
@@ -724,7 +714,7 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
 		 0.,0.,c2,
 		 0.,0.,0.,c3,
 		 0.,0.,0.,0.,c4};
-  
+
   Tp.setParametersWithCovariance(&m_link[m_bestlink].surface(),P,V);
   return true;
 }
@@ -736,11 +726,11 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
 bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
 (TRT_TrajectoryElement_xk* E1,Trk::PatternTrackParameters& Tp,double ZvHW)
 {
-  
+
   if(!E1) return false;
 
-  Amg::Vector3D Gp[3];  
-  double     Wa[3];  
+  Amg::Vector3D Gp[3];
+  double     Wa[3];
   if   (!    trajectoryGlobalPosition(Gp[1],Wa[1])) return false;
   if   (!E1->trajectoryGlobalPosition(Gp[2],Wa[2])) return false;
 
@@ -754,7 +744,7 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   double x0 = Gp[0][0]               ;
   double y0 = Gp[0][1]               ;
   double x1 = Gp[1][0]-x0            ;
-  double y1 = Gp[1][1]-y0            ; 
+  double y1 = Gp[1][1]-y0            ;
   double x2 = Gp[2][0]-x0            ;
   double y2 = Gp[2][1]-y0            ;
   double r1 = sqrt(x1*x1+y1*y1)      ;
@@ -779,21 +769,13 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   double pos0[3]; pos0[0]=Gp[0][0]; pos0[1]=Gp[0][1]; pos0[2]=Gp[0][2];
   double pos1[3]; pos1[0]=Gp[1][0]; pos1[1]=Gp[1][1]; pos1[2]=Gp[1][2];
   double pos2[3]; pos2[0]=Gp[2][0]; pos2[1]=Gp[2][1]; pos2[2]=Gp[2][2];
-  double H0  [3]; 
-  double H1  [3]; 
-  double H2  [3]; 
-  // MT version uses cache, temporarily keep old version
-  if (m_fieldCache.useNewBfieldCache()) {
-      m_fieldCache.getFieldZR    (pos0,H0);
-      m_fieldCache.getFieldZR    (pos1,H1);
-      m_fieldCache.getFieldZR    (pos2,H2);
-  }
-  else {
-      m_fieldService->getFieldZR (pos0,H0);
-      m_fieldService->getFieldZR (pos1,H1);
-      m_fieldService->getFieldZR (pos2,H2);      
-  }
-  
+  double H0  [3];
+  double H1  [3];
+  double H2  [3];
+  m_fieldCache.getFieldZR    (pos0,H0);
+  m_fieldCache.getFieldZR    (pos1,H1);
+  m_fieldCache.getFieldZR    (pos2,H2);
+
   double Hz = .333333*(H0[2]+H1[2]+H2[2]);
 
   // If magnetic field exist
@@ -811,7 +793,7 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
   double dp       = 8.*df*wa*Cm  ;
   double c0       = .1           ;
   double c1       = ZvHW*ZvHW*.1 ;
-  double c2       = df*df*(1.+T2); 
+  double c2       = df*df*(1.+T2);
   double c3       = TP[2]        ;
   double c4       = dp*dp        ;
   double V[15] ={c0,
@@ -819,7 +801,7 @@ bool  InDet::TRT_TrajectoryElement_xk::trackParametersEstimation
 		 0.,0.,c2,
 		 0.,0.,0.,c3,
 		 0.,0.,0.,0.,c4};
-  
+
   Tp.setParametersWithCovariance(0,P,V);
   return true;
 }
@@ -851,19 +833,19 @@ void InDet::TRT_TrajectoryElement_xk::polarAngleEstimation
     if     (  m_barrel )   { //---------------------------->BB
 
       double dZ = m_zMax-m_zMin              ;
-      double dT = (dZ+2.*VZ)                 ;  
+      double dT = (dZ+2.*VZ)                 ;
       Tp[1]     = dZ*dZ*.1                   ;
       Tp[2]     = dT*dT*.1/r0                ;
     }
     else if(E->m_barrel)   { //---------------------------->EB
 
-      double T2 = Tp[0]*Tp[0]                ; 
+      double T2 = Tp[0]*Tp[0]                ;
       Tp[1]     = 400.                       ;
       Tp[2]     = (VZ*VZ)/((1.+T2)*r0)       ;
     }
     else                   { //---------------------------->EE
 
-      double T2 = Tp[0]*Tp[0]                ; 
+      double T2 = Tp[0]*Tp[0]                ;
       Tp[1]     = 400.                       ;
       Tp[2]     = (VZ*VZ)/((1.+T2)*r0)       ;
     }
@@ -871,8 +853,8 @@ void InDet::TRT_TrajectoryElement_xk::polarAngleEstimation
   else {
     if     (E->m_barrel)   { //---------------------------->BB
 
-      double dZ = m_zMax-m_zMin              ; 
-      double dT = (E->m_zMax-E->m_zMin+2.*VZ);  
+      double dZ = m_zMax-m_zMin              ;
+      double dT = (E->m_zMax-E->m_zMin+2.*VZ);
       Tp[1]     = dZ*dZ*.1                   ;
       Tp[2]     = dT*dT*.1/r1                ;
     }
@@ -881,14 +863,14 @@ void InDet::TRT_TrajectoryElement_xk::polarAngleEstimation
       double T2 = Tp[0]*Tp[0]                ;
       double dr = sqrt(r1)-sqrt(r0)          ;
       Tp[1]     = dr*dr*VZ*VZ/r1             ;
-      Tp[2]     = (VZ*VZ)/((1.+T2)*r1)       ;      
+      Tp[2]     = (VZ*VZ)/((1.+T2)*r1)       ;
 
-    }             
-    else                   { //---------------------------->EE 
+    }
+    else                   { //---------------------------->EE
 
-      double T2 = Tp[0]*Tp[0]                ; 
+      double T2 = Tp[0]*Tp[0]                ;
       Tp[1]     = 400.                       ;
       Tp[2]     = (VZ*VZ)/((1.+T2)*r1)       ;
-    } 
+    }
   }
 }
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_Trajectory_xk.cxx b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_Trajectory_xk.cxx
index abf8bf56d31f052fd5721f4e3468b17f4e38f2a4..9782931292006327cf06574dee2317929dbcf24d 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_Trajectory_xk.cxx
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/src/TRT_Trajectory_xk.cxx
@@ -32,19 +32,19 @@ void  InDet::TRT_Trajectory_xk::set
   m_zVertexWidth = fabs(zvertexwidth) ;
   m_impact       = fabs(impact      ) ;
   m_scale_error  = fabs(scale       ) ;
-  for(int i=0; i!=400; ++i) m_elements[i].set(m,pr,up,riod,rion,m_scale_error);  
+  for(int i=0; i!=400; ++i) m_elements[i].set(m,pr,up,riod,rion,m_scale_error);
 }
 
 void  InDet::TRT_Trajectory_xk::set
-(Trk::MagneticFieldProperties& mp,const MagField::IMagFieldSvc* ms, const AtlasFieldCacheCondObj* condObj )
+(Trk::MagneticFieldProperties& mp,const AtlasFieldCacheCondObj* condObj )
 
 {
   m_fieldprop    = mp;
-  for(int i=0; i!=400; ++i) m_elements[i].set(mp, ms, condObj);  
+  for(int i=0; i!=400; ++i) m_elements[i].set(mp, condObj);
 }
 
 ///////////////////////////////////////////////////////////////////
-// Initiate trajectory for precision seed 
+// Initiate trajectory for precision seed
 ///////////////////////////////////////////////////////////////////
 
 void InDet::TRT_Trajectory_xk::initiateForPrecisionSeed
@@ -72,24 +72,24 @@ void InDet::TRT_Trajectory_xk::initiateForPrecisionSeed
 
   std::list< std::pair<Amg::Vector3D,double> >::iterator i=Gp.begin(),i0=Gp.begin(),ie=Gp.end();
   if(i0==ie) return;
- 
+
   // Primary trajectory direction calculation
   //
   double A[4]; A[3]=Tp.par()[4];
 
   for(++i; i!=ie; ++i) {
     if( (*i).second-(*i0).second > 1.) {
-      
+
       A[0] = (*i).first.x()-(*i0).first.x();
       A[1] = (*i).first.y()-(*i0).first.y();
       A[2] = (*i).first.z()-(*i0).first.z();
       double As = 1./sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2]);
       A[0]*=As; A[1]*=As; A[2]*=As; i0=i; break;
-    } 
+    }
   }
 
   for(i=Gp.begin(); i!=ie; ++i) {
-    
+
     IdentifierHash id = (*d)->identifyHash(); w=(*TRTc).indexFind(id);
     bool q;
     if(w!=(*TRTc).end() && (*w)->begin()!=(*w)->end()) {
@@ -109,7 +109,7 @@ void InDet::TRT_Trajectory_xk::initiateForPrecisionSeed
     // New trajectory direction calculation
     //
     if( (*i).second-(*i0).second > 50.) {
-      
+
       A[0] = (*i).first.x()-(*i0).first.x();
       A[1] = (*i).first.y()-(*i0).first.y();
       A[2] = (*i).first.z()-(*i0).first.z();
@@ -124,7 +124,7 @@ void InDet::TRT_Trajectory_xk::initiateForPrecisionSeed
 }
 
 ///////////////////////////////////////////////////////////////////
-// Initiate trajectory for TRT seed 
+// Initiate trajectory for TRT seed
 ///////////////////////////////////////////////////////////////////
 
 void InDet::TRT_Trajectory_xk::initiateForTRTSeed
@@ -143,7 +143,7 @@ void InDet::TRT_Trajectory_xk::initiateForTRTSeed
   m_nElements       =  0;
   m_naElements      =  0;
   m_firstRoad       =  0;
-  m_lastRoad        = m_firstRoad; 
+  m_lastRoad        = m_firstRoad;
   m_firstTrajectory =  -1;
   m_xi2             = 0.;
   m_parameters      = Tp;
@@ -168,7 +168,7 @@ void InDet::TRT_Trajectory_xk::initiateForTRTSeed
       A[2] = (*i).first.z()-(*i0).first.z();
       double As = 1./sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2]);
       A[0]*=As; A[1]*=As; A[2]*=As; i0=i; break;
-    } 
+    }
   }
 
   for(i=Gp.begin(); i!=ie; ++i) {
@@ -199,7 +199,7 @@ void InDet::TRT_Trajectory_xk::initiateForTRTSeed
     // New trajectory direction calculation
     //
     if( (*i).second-(*i0).second > 50.) {
-      
+
       A[0] = (*i).first.x()-(*i0).first.x();
       A[1] = (*i).first.y()-(*i0).first.y();
       A[2] = (*i).first.z()-(*i0).first.z();
@@ -222,7 +222,7 @@ void InDet::TRT_Trajectory_xk::trackFindingWithDriftTime(double DA)
   int          n    = 0  ;
 
   for(int i=m_firstTrajectory; i<=m_lastTrajectory; ++i) {
-    
+
     if(!m_elements[i].isCluster()) continue;
     int nl = m_elements[i].nlinks();
 
@@ -233,29 +233,29 @@ void InDet::TRT_Trajectory_xk::trackFindingWithDriftTime(double DA)
     for(int j=0; j!=nl; ++j) {
 
       if(!m_elements[i].link(j).cluster()) continue;
-      double u = m_elements[i].link(j).way();      if(       u==0.        ) continue; 
+      double u = m_elements[i].link(j).way();      if(       u==0.        ) continue;
       double d = m_elements[i].link(j).distance(); if(d < dmin || d > dmax) continue;
       double ui= 1./u;
       double s = rs*ui;
       double v = d *ui;
       m_U[n] = u; m_V[n++] = v-s; m_U[n] = u; m_V[n++] = v+s;
-      
+
       double r = m_elements[i].link(j).cluster()->localPosition()(Trk::driftRadius);
       double e = .35;
 
-      if(r>rs) r=rs; 
-      
+      if(r>rs) r=rs;
+
       double r2 = r+e; if(r2 >  rs) r2 = rs;
       double r1 = r-e; if(r1 >= r2) r1 = r2-2.*e;
       r1       *= ui;
       r2       *= ui;
       if( r<e ) {
-	m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v+r2; 
+	m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v+r2;
       }
       else   {
-	m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v-r1; 
-	m_U[n] = u; m_V[n++] = v+r1;   m_U[n] = u; m_V[n++] = v+r2; 
-      }  
+	m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v-r1;
+	m_U[n] = u; m_V[n++] = v+r1;   m_U[n] = u; m_V[n++] = v+r2;
+      }
       if(n>4990) goto stab;
     }
   }
@@ -275,7 +275,7 @@ void InDet::TRT_Trajectory_xk::trackFindingWithoutDriftTime(double DA)
   int          n    = 0   ;
 
   for(int i=m_firstTrajectory; i<=m_lastTrajectory; ++i) {
-    
+
     if(!m_elements[i].isCluster()) continue;
     int nl = m_elements[i].nlinks();
 
@@ -288,9 +288,9 @@ void InDet::TRT_Trajectory_xk::trackFindingWithoutDriftTime(double DA)
       if(!m_elements[i].link(j).cluster()) continue;
 
       double u = m_elements[i].link(j).way(); if(u==0.) continue;  double ui = 1./u;
- 
+
       double di= m_elements[i].link(j).distance(); if(di < dmin || di > dmax) continue;
- 
+
       double d = rs+fabs(m_elements[i].link(j).sdistance()*sr);
       double s = d *ui;
       double v = di*ui;
@@ -312,7 +312,7 @@ void InDet::TRT_Trajectory_xk::trackFindingWithDriftTimeBL(double DA)
   int    n  = 0  ;
 
   for(int i=m_firstTrajectory; i<=m_lastTrajectory; ++i) {
-    
+
     int l = m_elements[i].bestlink();
     if( l<0 || !m_elements[i].link(l).cluster()) continue;
 
@@ -320,23 +320,23 @@ void InDet::TRT_Trajectory_xk::trackFindingWithDriftTimeBL(double DA)
     double s = rs*ui;
     double v = m_elements[i].link(l).distance()*ui;
     m_U[n] = u; m_V[n++] = v-s; m_U[n] = u; m_V[n++] = v+s;
-    
+
     double r = m_elements[i].link(l).cluster()->localPosition()(Trk::driftRadius);
     double e = .35;
-    
-    if(r>rs) r=rs; 
-    
+
+    if(r>rs) r=rs;
+
     double r2 = r+e; if(r2 >  rs) r2 = rs;
     double r1 = r-e; if(r1 >= r2) r1 = r2-2.*e;
     r1       *= ui;
     r2       *= ui;
     if( r<e ) {
-      m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v+r2; 
+      m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v+r2;
     }
     else   {
-      m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v-r1; 
-      m_U[n] = u; m_V[n++] = v+r1;   m_U[n] = u; m_V[n++] = v+r2; 
-    }  
+      m_U[n] = u; m_V[n++] = v-r2;   m_U[n] = u; m_V[n++] = v-r1;
+      m_U[n] = u; m_V[n++] = v+r1;   m_U[n] = u; m_V[n++] = v+r2;
+    }
     if(n>4990) break;
   }
   stabline(n,DA);
@@ -353,10 +353,10 @@ void InDet::TRT_Trajectory_xk::trackFindingWithoutDriftTimeBL(double DA)
   int          n  = 0   ;
 
   for(int i=m_firstTrajectory; i<=m_lastTrajectory; ++i) {
-    
+
     int l = m_elements[i].bestlink();
     if( l<0 || !m_elements[i].link(l).cluster()) continue;
-    
+
     double u = m_elements[i].link(l).way(); if(u==0.) continue; double ui = 1./u;
     double d = rs+fabs(m_elements[i].link(l).sdistance()*sr);
     double s = d*ui;
@@ -386,7 +386,7 @@ bool InDet::TRT_Trajectory_xk::searchStartStop()
 
       if     (m_elements[e].link(b).cluster())  w[e] = 1;
       else if(       D      <      rse       )  w[e] =-1;
-      
+
     }
     W+=w[e];
   }
@@ -397,7 +397,7 @@ bool InDet::TRT_Trajectory_xk::searchStartStop()
   m_firstTrajectory  = m_firstRoad;
   for(int e =  m_firstRoad; e < m_lastRoad; ++e ) {
     if(w[e]>0) {if(W>Wm) {Wm=W; m_firstTrajectory=e;} --W;} else if(w[e]<0) ++W;
-  } 
+  }
 
   // Search last element trajectory
   //
@@ -427,16 +427,16 @@ void  InDet::TRT_Trajectory_xk::buildTrajectoryForPrecisionSeed
     bool q =  useDritRadius;
     bool h = false         ;
     if     (m_elements[e].buildForPrecisionSeed(m_A,m_B,q,h)) { // Cluster
-      
+
       if(++m_nclusters==1) m_firstTrajectory=e;
-      m_lastTrajectory=e; 
+      m_lastTrajectory=e;
       if(q) ++m_ntclusters;
-      m_nholes = m_nholese; 
+      m_nholes = m_nholese;
     }
     else if(h)                                                  { // Hole
       m_nclusters ? ++m_nholese : ++m_nholesb;
     }
-  }  
+  }
   m_nholese-=m_nholes;
 }
 
@@ -447,7 +447,7 @@ void  InDet::TRT_Trajectory_xk::buildTrajectoryForPrecisionSeed
 void  InDet::TRT_Trajectory_xk::buildTrajectoryForTRTSeed
 (bool useDritRadius)
 {
-  
+
   m_nclusters = m_ntclusters = 0;
   int e       = m_firstTrajectory;
   int el      = m_lastTrajectory ;
@@ -457,16 +457,16 @@ void  InDet::TRT_Trajectory_xk::buildTrajectoryForTRTSeed
     bool q =  useDritRadius;
     bool h = false         ;
     if     (m_elements[e].buildForTRTSeed(m_A,m_B,q,h)) { // Cluster
-      
+
       if(++m_nclusters==1) m_firstTrajectory=e;
-      m_lastTrajectory=e; 
+      m_lastTrajectory=e;
       if(q) ++m_ntclusters;
-      m_nholes = m_nholese; 
+      m_nholes = m_nholese;
     }
     else if(h)                                                  { // Hole
       m_nclusters ? ++m_nholese : ++m_nholesb;
     }
-  }  
+  }
   m_nholese-=m_nholes;
 }
 
@@ -477,24 +477,24 @@ void  InDet::TRT_Trajectory_xk::buildTrajectoryForTRTSeed
 void  InDet::TRT_Trajectory_xk::radiusCorrection()
 {
   if(isFirstElementBarrel()) return;
-  
+
   int e     = m_firstTrajectory;
   int el    = m_lastTrajectory ;
   double r0 = m_elements[e ].radiusMin();
   double z0 = m_elements[e ].z        ();
   double r1 = m_elements[el].radiusMax();
   double z1 = m_elements[el].z        ();
-  double dz = z1-z0;  if(fabs(dz) < 1.) return;                     
-  double rz = (r1-r0)/dz; 
+  double dz = z1-z0;  if(fabs(dz) < 1.) return;
+  double rz = (r1-r0)/dz;
   double zv = z0 - r0/rz;
-  
+
   if     (zv >  m_zVertexWidth) zv = m_zVertexWidth;
   else if(zv < -m_zVertexWidth) zv =-m_zVertexWidth;
   rz  = r0/(z0-zv);
 
   for (; e<=el; ++e) {
     double dr = r0+(m_elements[e].z()-z0)*rz-m_elements[e].radius();
-    m_elements[e].radiusCorrection(dr);  
+    m_elements[e].radiusCorrection(dr);
   }
 }
 
@@ -509,7 +509,7 @@ void InDet::TRT_Trajectory_xk::convert
 
     const Trk::MeasurementBase* mb = m_elements[e].rioOnTrack();
     if(mb) MB.push_back(mb);
-  }  
+  }
 }
 
 ///////////////////////////////////////////////////////////////////
@@ -524,8 +524,8 @@ Trk::TrackSegment* InDet::TRT_Trajectory_xk::convert()
   if(fabs(m_parameters.pT()) < 300.) return 0;
 
   const Trk::Surface* sur = m_parameters.associatedSurface();
-  
-  DataVector<const Trk::MeasurementBase>* rio 
+
+  DataVector<const Trk::MeasurementBase>* rio
       = new DataVector<const Trk::MeasurementBase>;
 
   // Pseudo-measurement production
@@ -536,7 +536,7 @@ Trk::TrackSegment* InDet::TRT_Trajectory_xk::convert()
   //
   int nbarrel=0,nendcap=0;
   //const Trk::Surface *lastbarrelsurf=0;
-  
+
   for(int e = m_firstTrajectory; e<=m_lastTrajectory; ++e) {
 
     const Trk::MeasurementBase* r = m_elements[e].rioOnTrack();
@@ -546,10 +546,10 @@ Trk::TrackSegment* InDet::TRT_Trajectory_xk::convert()
         nbarrel++;
         //lastbarrelsurf=&r->associatedSurface();
       }
-      
+
       rio->push_back(r);
     }
-  }  
+  }
   if(rio->empty()) {delete rio; return 0;}
   int bec=0;
   if (nbarrel>0 && nendcap>0) bec=1;
@@ -567,7 +567,7 @@ Trk::TrackSegment* InDet::TRT_Trajectory_xk::convert()
 	       m_parameters.par()[2],
 	       m_parameters.par()[3],
 	       m_parameters.par()[4]};
-  
+
   if(!m_ndf) {m_ndf = rio->size()-5; m_xi2 = 0.;}
 
   if(!sur) {
@@ -592,7 +592,7 @@ InDet::TRT_Trajectory_xk::pseudoMeasurements(const Trk::Surface *firstsurf, cons
   if(!cylb) return std::make_pair(pmon,pmon2);
 
   double halfz=cylb->halflengthZ();
-  cylb=dynamic_cast<const Trk::CylinderBounds *>(&firstsurf->bounds());  
+  cylb=dynamic_cast<const Trk::CylinderBounds *>(&firstsurf->bounds());
   if(!cylb) return std::make_pair(pmon,pmon2);
 
   double halfzfirst=cylb->halflengthZ();
@@ -630,7 +630,7 @@ InDet::TRT_Trajectory_xk::pseudoMeasurements(const Trk::Surface *firstsurf, cons
   Amg::Transform3D*  T = new Amg::Transform3D(Amg::Translation3D(Amg::Vector3D::Zero())*Amg::RotationMatrix3D::Identity());
   Trk::StraightLineSurface surn(T,100.,1000.);
 
-  Trk::PatternTrackParameters P;  
+  Trk::PatternTrackParameters P;
   bool Q = m_proptool->propagateParameters
     (m_parameters,surn,P,Trk::anyDirection,m_fieldprop,Trk::pion);
   if(!Q) return std::make_pair(pmon,pmon2);
@@ -645,7 +645,7 @@ InDet::TRT_Trajectory_xk::pseudoMeasurements(const Trk::Surface *firstsurf, cons
   }
   Trk::LocalParameters par = (bec==0) ? Trk::LocalParameters(std::make_pair(0,Trk::locZ),std::make_pair(pseudotheta,Trk::theta)) : Trk::LocalParameters(std::make_pair(0,Trk::locZ));
 
-  pmon =  new Trk::PseudoMeasurementOnTrack(par,cov,surn);  
+  pmon =  new Trk::PseudoMeasurementOnTrack(par,cov,surn);
 
   if (bec==0) return std::make_pair(pmon,pmon2);
   cov = Amg::MatrixX(1,1);
@@ -666,7 +666,7 @@ InDet::TRT_Trajectory_xk::pseudoMeasurements(const Trk::Surface *firstsurf, cons
 
 bool InDet::TRT_Trajectory_xk::trackParametersEstimationForLastPoint()
 {
-  int n1 = 0; 
+  int n1 = 0;
 
   for(int e = (m_lastTrajectory+m_firstTrajectory)/2; e < m_lastTrajectory; ++e) {
     if(m_elements[e].status() >= 0) {n1=e; break;}
@@ -727,8 +727,8 @@ bool InDet::TRT_Trajectory_xk::fitter()
   if(!trackParametersEstimationForLastPoint() || fabs(m_parameters.pT()) < 300.) return false;
   double sin2 = 1./sin(m_parameters.par()[3]); sin2*= sin2        ;
   double P42  =        m_parameters.par()[4] ; P42  = P42*P42*134.;
-  
-  if(!m_elements[m_lastTrajectory].addCluster(m_parameters,m_parameters,m_xi2)) return false;  
+
+  if(!m_elements[m_lastTrajectory].addCluster(m_parameters,m_parameters,m_xi2)) return false;
 
 
   Trk::NoiseOnSurface  noise;
@@ -738,7 +738,7 @@ bool InDet::TRT_Trajectory_xk::fitter()
   for(int e = m_lastTrajectory-1; e>=m_firstTrajectory; --e) {
 
     rad+=trad;
-    bool br = m_elements[e].isBarrel(); 
+    bool br = m_elements[e].isBarrel();
     if( (br && !barrel) || (!br && barrel) ) rad+=.1;
     barrel = br;
 
@@ -746,10 +746,10 @@ bool InDet::TRT_Trajectory_xk::fitter()
 
       // Add noise contribution
       //
-      double covP = rad*P42; noise.set(covP*sin2,covP,0.,1.); 
+      double covP = rad*P42; noise.set(covP*sin2,covP,0.,1.);
+
+      m_parameters.addNoise(noise,Trk::oppositeMomentum);
 
-      m_parameters.addNoise(noise,Trk::oppositeMomentum); 
-    
       // Propagate to straw surface
       //
       if(!m_elements[e].propagate(m_parameters,m_parameters)) return false;
@@ -766,16 +766,16 @@ bool InDet::TRT_Trajectory_xk::fitter()
 }
 
 ///////////////////////////////////////////////////////////////////
-// Search a stright line Y = A*X+B crossed max number segments                 
+// Search a stright line Y = A*X+B crossed max number segments
 ///////////////////////////////////////////////////////////////////
 
 
 void InDet::TRT_Trajectory_xk::stabline(int Np,double DA) {
 
-  m_A=m_B=0; if(Np<2) return; 
+  m_A=m_B=0; if(Np<2) return;
   double Amax =fabs(DA);
 
-  int    i=0; 
+  int    i=0;
 
   while(i!=Np) {m_SS[i].m_NA=i; m_SS[i].m_F=m_V[i]; ++i; m_SS[i].m_NA=i; m_SS[i].m_F=m_V[i]; ++i;}
   sort(m_SS,Np);
@@ -784,9 +784,9 @@ void InDet::TRT_Trajectory_xk::stabline(int Np,double DA) {
   //
   i=0; int sm=0, s=0, l=0;
   while(i!=Np) {
-    if((m_SS[i  ].m_NA&1)==(m_MA[i  ]=0)) {if(++s>sm) {sm=s; l=  i;}} else --s; 
+    if((m_SS[i  ].m_NA&1)==(m_MA[i  ]=0)) {if(++s>sm) {sm=s; l=  i;}} else --s;
     if((m_SS[i+1].m_NA&1)==(m_MA[i+1]=0)) {if(++s>sm) {sm=s; l=1+i;}} else --s; i+=2;
-  } 
+  }
 
   m_B = .5*(m_V[m_SS[l].m_NA]+m_V[m_SS[l+1].m_NA]);
 
@@ -794,11 +794,11 @@ void InDet::TRT_Trajectory_xk::stabline(int Np,double DA) {
   //
   while(1) {
 
-    i=(l=m_SS[l].m_NA); double u0=m_U[l], v0=m_V[l]; 
+    i=(l=m_SS[l].m_NA); double u0=m_U[l], v0=m_V[l];
 
     // Vector slopes preparation
     //
-    while(++i!=Np)  {if(m_U[i]!=u0) {break;}} 
+    while(++i!=Np)  {if(m_U[i]!=u0) {break;}}
     double U1=-1000., d=0.; int m=0;
     while(i<Np-1) {
       if (m_U[i]==U1) {
@@ -806,12 +806,12 @@ void InDet::TRT_Trajectory_xk::stabline(int Np,double DA) {
         if(fabs(m_SS[m].m_F=(m_V[i+1]-v0)*d)<Amax) m_SS[m++].m_NA=i+1;
       }
       else          {
-	d=1./((U1=m_U[i])-u0); 
+	d=1./((U1=m_U[i])-u0);
 	if(fabs(m_SS[m].m_F=(m_V[i  ]-v0)*d)<Amax) m_SS[m++].m_NA=i;
         if(fabs(m_SS[m].m_F=(m_V[i+1]-v0)*d)<Amax) m_SS[m++].m_NA=i+1;
       }
       i+=2;
-    } 
+    }
     (i=l);  while(--i>0)  {if(m_U[i]!=u0) {break;}} U1=-1000.;
     while(i>0) {
       if (m_U[i]==U1) {
@@ -819,12 +819,12 @@ void InDet::TRT_Trajectory_xk::stabline(int Np,double DA) {
         if(fabs(m_SS[m].m_F=(m_V[i-1]-v0)*d)<Amax) m_SS[m++].m_NA=i-1;
       }
       else          {
-	d=1./((U1=m_U[i])-u0); 
+	d=1./((U1=m_U[i])-u0);
 	if(fabs(m_SS[m].m_F=(m_V[i  ]-v0)*d)<Amax) m_SS[m++].m_NA=i;
         if(fabs(m_SS[m].m_F=(m_V[i-1]-v0)*d)<Amax) m_SS[m++].m_NA=i-1;
       }
       i-=2;
-    } 
+    }
 
     if(m<=4) break;
     sort(m_SS,m);
@@ -841,7 +841,7 @@ void InDet::TRT_Trajectory_xk::stabline(int Np,double DA) {
     m_B = v0-(m_A=.5*(m_SS[nm].m_F+m_SS[nm+1].m_F))*u0;  m_MA[l]=1;
 
     if     (m_MA[m_SS[nm  ].m_NA]==0) l = nm;
-    else if(m_MA[m_SS[nm+1].m_NA]==0) l = nm+1; 
+    else if(m_MA[m_SS[nm+1].m_NA]==0) l = nm+1;
     else    break;
   }
 }
@@ -855,7 +855,7 @@ void InDet::TRT_Trajectory_xk::sort(samiStruct* s,int n) {
 }
 
 ///////////////////////////////////////////////////////////////////
-// Trajectory  conversion to track 
+// Trajectory  conversion to track
 ///////////////////////////////////////////////////////////////////
 
 Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
@@ -863,38 +863,38 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
   const double trad = .003;
   double        rad =  0. ;
 
-  const DataVector<const Trk::TrackStateOnSurface>* 
+  const DataVector<const Trk::TrackStateOnSurface>*
     tsos = Tr.trackStateOnSurfaces();
-  
+
   if(!m_parameters.production((*(tsos->rbegin()))->trackParameters())) return 0;
 
   double sin2 = 1./sin(m_parameters.par()[3]); sin2*= sin2        ;
   double P42  =        m_parameters.par()[4] ; P42  = P42*P42*134.;
 
   Trk::NoiseOnSurface  noise;
-  
+
   m_xi2              = 0.               ;
   m_ndf              = 0                ;
   bool barrel        = false            ;
   int  nworse        = 0                ;
   int lastTrajectory = m_firstTrajectory;
-  Trk::PatternTrackParameters Tp        ; 
+  Trk::PatternTrackParameters Tp        ;
   Trk::PatternTrackParameters Tpl = m_parameters;
 
   for(int e = m_firstTrajectory; e<=m_lastTrajectory; ++e) {
-    
+
     rad+=trad;
     bool br = m_elements[e].isBarrel();
     if( (br && !barrel) || (!br && barrel) ) rad+=.1;
     barrel = br;
- 
+
     if(m_elements[e].status() > 0) {
 
       // Add noise contribution
       //
-      double covP = rad*P42; noise.set(covP*sin2,covP,0.,1.); 
-      m_parameters.addNoise(noise,Trk::alongMomentum); 
-    
+      double covP = rad*P42; noise.set(covP*sin2,covP,0.,1.);
+      m_parameters.addNoise(noise,Trk::alongMomentum);
+
       // Propagate to straw surface
       //
       if(!m_elements[e].propagate(m_parameters,m_parameters)) break;
@@ -905,7 +905,7 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
       if(!m_elements[e].addCluster(m_parameters,Tp,xi)) break;
 
      if(xi < 5.) {
-	m_xi2+=xi; ++m_ndf ; 
+	m_xi2+=xi; ++m_ndf ;
 	lastTrajectory = e ;
  	m_parameters   = Tp;
 	Tpl            = Tp;
@@ -921,7 +921,7 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
   if(lastTrajectory == m_firstTrajectory || m_ndf < 5 || m_xi2 > 2.*double(m_ndf)) return 0;
   m_lastTrajectory = lastTrajectory;
 
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator 
+  DataVector<const Trk::TrackStateOnSurface>::const_iterator
     s = tsos->begin(), se = tsos->end();
 
   // Change first track parameters of the track
@@ -931,7 +931,7 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
 
   // Fill new track information
   //
-  DataVector<const Trk::TrackStateOnSurface>* 
+  DataVector<const Trk::TrackStateOnSurface>*
     tsosn = new DataVector<const Trk::TrackStateOnSurface>;
 
   tsosn->push_back(new Trk::TrackStateOnSurface(0,Tp.convert(true),0,0,(*s)->types()));
@@ -941,8 +941,8 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
   for(++s; s!=se; ++s) {
     tsosn->push_back(new Trk::TrackStateOnSurface(*(*s)));
   }
-  
-  // Add new information from TRT without parameters 
+
+  // Add new information from TRT without parameters
   //
   for(int e = m_firstTrajectory; e < m_lastTrajectory; ++e) {
     const Trk::MeasurementBase* mb = m_elements[e].rioOnTrackSimple();
@@ -952,7 +952,7 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
       tsosn->push_back(new Trk::TrackStateOnSurface(mb,0,0,0,typePattern));
     }
   }
- 
+
   // For last points add new information from TRT with parameters
   //
   const Trk::MeasurementBase* mb = m_elements[m_lastTrajectory].rioOnTrackSimple();
@@ -962,7 +962,7 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
     tsosn->push_back
       (new Trk::TrackStateOnSurface(mb,m_parameters.convert(true),0,0,typePattern));
   }
-  
+
   // New fit quality production
   //
   const Trk::FitQuality* fqo = Tr.fitQuality();
@@ -975,9 +975,9 @@ Trk::Track* InDet::TRT_Trajectory_xk::convert(const Trk::Track& Tr)
 }
 
 ///////////////////////////////////////////////////////////////////
-// Helix updating according new invert momentum information           
-// Pi      New               invert momentum      
-// CovPi   New covariance of invert momentum      
+// Helix updating according new invert momentum information
+// Pi      New               invert momentum
+// CovPi   New covariance of invert momentum
 ///////////////////////////////////////////////////////////////////
 
 void InDet::TRT_Trajectory_xk::updateTrackParameters(Trk::PatternTrackParameters& T)
@@ -986,7 +986,7 @@ void InDet::TRT_Trajectory_xk::updateTrackParameters(Trk::PatternTrackParameters
 
   double Pi    = m_parameters.par()[ 4];
   double CovPi = m_parameters.cov()[14];
- 
+
   const double* p = T.par();
   const double* v = T.cov();
 
@@ -996,7 +996,7 @@ void InDet::TRT_Trajectory_xk::updateTrackParameters(Trk::PatternTrackParameters
 		  v[ 6],v[ 7],v[ 8],v[ 9],
 		  v[10],v[11],v[12],v[13],v[14]};
   double P[ 5] = {p[ 0],p[ 1],p[ 2],p[ 3],p[ 4]};
-  
+
 
   double W  = (1./CovPi-1./V[14]), det = V[14]/CovPi, Wd = W/det;
   double a0 = -V[10]*Wd;
@@ -1005,14 +1005,14 @@ void InDet::TRT_Trajectory_xk::updateTrackParameters(Trk::PatternTrackParameters
   double a3 = -V[13]*Wd;
   double a4 = 1./det;
 
-  // New covariance matrix 
+  // New covariance matrix
   //
-  V[ 0]  +=V[10]*a0;     
+  V[ 0]  +=V[10]*a0;
   V[ 1]  +=V[10]*a1;
   V[ 2]  +=V[11]*a1;
   V[ 3]  +=V[10]*a2;
   V[ 4]  +=V[11]*a2;
-  V[ 5]  +=V[12]*a2; 
+  V[ 5]  +=V[12]*a2;
   V[ 6]  +=V[10]*a3;
   V[ 7]  +=V[11]*a3;
   V[ 8]  +=V[12]*a3;
@@ -1039,11 +1039,11 @@ void InDet::TRT_Trajectory_xk::updateTrackParameters(Trk::PatternTrackParameters
 // Overload of << operator std::ostream
 ///////////////////////////////////////////////////////////////////
 
-std::ostream& InDet::operator << 
+std::ostream& InDet::operator <<
   (std::ostream& sl,const InDet::TRT_Trajectory_xk& se)
-{ 
-  return se.dump(sl); 
-}   
+{
+  return se.dump(sl);
+}
 
 ///////////////////////////////////////////////////////////////////
 // Dumps relevant information into the ostream
@@ -1051,7 +1051,7 @@ std::ostream& InDet::operator <<
 
 std::ostream& InDet::TRT_Trajectory_xk::dump( std::ostream& out ) const
 {
-  
+
   if(m_nElements <=0 ) {
     out<<"Trajectory does not exist"<<std::endl;
   }
@@ -1081,7 +1081,7 @@ std::ostream& InDet::TRT_Trajectory_xk::dump( std::ostream& out ) const
      <<std::endl;
 
   out<<"| First and last elements of the trajectory "
-     <<std::setw(3)<<m_firstTrajectory<<" " 
+     <<std::setw(3)<<m_firstTrajectory<<" "
      <<std::setw(3)<<m_lastTrajectory
      <<"                       |"
      <<std::endl;
@@ -1093,11 +1093,11 @@ std::ostream& InDet::TRT_Trajectory_xk::dump( std::ostream& out ) const
      <<std::endl;
   out<<"|-------------------------------------------------------------------------|"
      <<std::endl;
-  
+
   for(int e = m_firstRoad; e<=m_lastRoad; ++e) {
 
     if(m_elements[e].status()<0) continue;
-    
+
     int    l  = m_elements[e].bestlink();
     double im = m_elements[e].link(l).impact();
     double zl = m_elements[e].link(l).zlocal();
@@ -1106,7 +1106,7 @@ std::ostream& InDet::TRT_Trajectory_xk::dump( std::ostream& out ) const
     if     (m_elements[e].status()< 0) ss ="         ";
     else if(m_elements[e].status()==1) ss ="      +- ";
     else if(m_elements[e].status()==2) ss ="      ++ ";
-    else                               ss ="      -- "; 
+    else                               ss ="      -- ";
 
     out<<"| "
        <<std::setw(3)<<e
@@ -1125,4 +1125,3 @@ std::ostream& InDet::TRT_Trajectory_xk::dump( std::ostream& out ) const
      <<std::endl;
   return out;
 }
-
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt b/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt
index 3fe99d5e3f0a3550c5e36a61d0009e990488b918..1e4b9df08845a6e04295e8005aef30be169a5944 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt
@@ -47,15 +47,16 @@ atlas_depends_on_subdirs( PUBLIC
 # External dependencies:
 find_package( Eigen )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread EG )
+find_package( Boost COMPONENTS unit_test_framework )
 find_package( XercesC )
-find_package( Boost )
+
 
 # Component(s) in the package:
 atlas_add_library( InDetPhysValMonitoringLib
                    src/*.cxx
                    PUBLIC_HEADERS InDetPhysValMonitoring
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} 
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS}   ${EIGEN_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES}  ${EIGEN_LIBRARIES} 
                    AthenaBaseComps AthenaMonitoringLib CxxUtils AtlasDetDescr xAODTracking xAODTruth GaudiKernel InDetIdentifier InDetReadoutGeometry TRT_ReadoutGeometry
                    InDetTrackSelectionToolLib PATCoreLib TrkValHistUtils
                    PRIVATE_LINK_LIBRARIES AsgTools AthenaKernel GeoPrimitives EventPrimitives 
@@ -65,13 +66,17 @@ atlas_add_library( InDetPhysValMonitoringLib
 
 atlas_add_component( InDetPhysValMonitoring
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} 
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES}  ${EIGEN_LIBRARIES} 
                      AthenaBaseComps AthenaMonitoringLib CxxUtils xAODTracking xAODTruth GaudiKernel PATCoreLib 
                      TrkValHistUtils AsgTools AthenaKernel AtlasDetDescr GeoPrimitives EventPrimitives 
                      xAODBase xAODEventInfo xAODJet InDetIdentifier InDetPrepRawData InDetRIO_OnTrack 
                      MCTruthClassifierLib PathResolver TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces InDetPhysValMonitoringLib)
 
+
+
+
+
 # Install files from the package:
 atlas_install_headers( InDetPhysValMonitoring )
 atlas_install_python_modules( python/*.py )
@@ -83,3 +88,14 @@ atlas_install_runtime( test/InDetPhysValMonitoring_TestConfiguration.xml )
 atlas_add_executable( postProcessIDPVMHistos util/postProcessIDPVMHistos.cxx 
         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
         LINK_LIBRARIES ${ROOT_LIBRARIES} InDetPhysValMonitoringLib )
+        
+atlas_add_test( SingleHistogramDefinition_test
+                SOURCES
+                test/SingleHistogramDefinition_test.cxx
+                INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+                LINK_LIBRARIES ${Boost_LIBRARIES} InDetPhysValMonitoringLib
+                POST_EXEC_SCRIPT "nopost.sh"
+)
+
+
+
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h
index 3a0eefa484e11a795d06ce4fdc616c3fe8fdfe8c..eeff1e8cbdbe7e79395a2c3302c02ab93886c28b 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.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
 */
 
 //
@@ -55,15 +55,23 @@ public:
     std::string zTitle;
     std::string allTitles;
     std::string folder;
+    /// Is the histogram definition empty?
     bool empty() const;
+    /// String representation of the histogram definition
     std::string str() const;
+    /// Does the histogram definition have a valid type (TH1, TH2 etc)?
     bool validType() const;
+    /// Is the histogram definition valid
     bool isValid() const;
+    /// add the folder path to produce the full histogram name e.g. myFolder/myHisto
     std::string stringIndex() const;
+    /// concatenate a sanitised folderName with the histogram name
     static std::string stringIndex(const std::string & thisname, const std::string & thisfolder);
+    /// produce single-line representation of the titles (titles separated by the ';' delimiter)
     std::string titleDigest() const;
 
     bool m_empty;
 };
 
+
 #endif
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/SingleHistogramDefinition_test.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/SingleHistogramDefinition_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7c2dc84b879e17fe5a10d46c3afb66ab03303d98
--- /dev/null
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/SingleHistogramDefinition_test.cxx
@@ -0,0 +1,157 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file InDetPhysValMonitoring/test/SingleHistogramDefinition_test.cxx
+ * @author Shaun Roe
+ * @date May 2020
+ * @brief Some tests for SingleHistogramDefinition class 
+ */
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MAIN
+#define BOOST_TEST_MODULE TEST_IOVDBSVC
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverloaded-virtual"
+#include <boost/test/unit_test.hpp>
+#pragma GCC diagnostic pop
+
+
+
+#include "../InDetPhysValMonitoring/SingleHistogramDefinition.h"
+#include <cmath> //for std::isnan
+
+BOOST_AUTO_TEST_SUITE(SingleHistogramDefinitionTest)
+  BOOST_AUTO_TEST_CASE(constructors){
+    BOOST_CHECK_NO_THROW(SingleHistogramDefinition());
+    const SingleHistogramDefinition emptyDefinition;
+    bool allStringsAreEmpty = emptyDefinition.name.empty() and emptyDefinition.histoType.empty()
+      and emptyDefinition.title.empty() and emptyDefinition.xTitle.empty() 
+      and emptyDefinition.yTitle.empty() and emptyDefinition.zTitle.empty() 
+      and emptyDefinition.allTitles.empty() and emptyDefinition.folder.empty();
+    bool allBinsAreZero = (emptyDefinition.nBinsX == 0) and (emptyDefinition.nBinsY == 0)
+      and (emptyDefinition.nBinsZ == 0);
+    auto pairIsInvalid = [](const std::pair<float, float> & axisPair){
+      return (std::isnan(axisPair.first) and std::isnan(axisPair.second));
+    };
+    bool allAxesAreInvalid = pairIsInvalid(emptyDefinition.xAxis) and pairIsInvalid(emptyDefinition.yAxis)
+      and pairIsInvalid(emptyDefinition.zAxis);
+    BOOST_TEST((allStringsAreEmpty and allBinsAreZero and allAxesAreInvalid));
+    //Histogram construction with just x parameters defined
+    /**
+    SingleHistogramDefinition::SingleHistogramDefinition(Titles_t thename, Titles_t thehistoType,
+						     Titles_t thetitle, NBins_t nbinsX, 
+						     Var_t xLo, Var_t xHi,
+						     Titles_t xName, Titles_t yName,
+						     Titles_t thefolder)
+		**/
+		const std::string name("hName");
+		const std::string type("TF");
+		const std::string title("hTitle");
+		const unsigned int nBinsX{10};
+		const float xLo(0.1), xHi(10.1);
+		const auto xAxis=std::make_pair(xLo, xHi);
+		const std::string xTitle{"xAxis"}, yTitle{"yAxis"};
+		const std::string aFolder("folderName");
+		//
+		auto referenceValuesMatchXConstruction = [=](const auto & h){return h.name == name and h.histoType == type 
+		   and h.title == title and h.nBinsX == nBinsX and h.xAxis == xAxis
+		   and h.xTitle == xTitle and h.yTitle == yTitle and aFolder == h.folder;
+		};
+		//
+		auto omittedValuesXYAreUndefined = [=](const auto & h) {
+		return pairIsInvalid(h.zAxis) and h.nBinsZ == 0;
+		};
+		auto omittedValuesXAreUndefined = [=](const auto & h) {
+		  return  omittedValuesXYAreUndefined(h) and pairIsInvalid(h.yAxis) and h.nBinsY==0;
+		};
+		//construct the X histo and test
+		const SingleHistogramDefinition xHisto(name, type, title, nBinsX, xLo, xHi, xTitle, yTitle, aFolder );
+		BOOST_TEST(referenceValuesMatchXConstruction(xHisto));
+		BOOST_TEST(omittedValuesXAreUndefined(xHisto));
+		//Histogram definition with n bins and limits for yAxis
+		const unsigned int nBinsY{10};
+		const float yLo(0.2), yHi(10.2);
+		const auto yAxis=std::make_pair(yLo, yHi);
+    //
+		auto referenceValuesMatchXYConstruction = [=] (const auto & h){
+		  return referenceValuesMatchXConstruction(h) and h.nBinsY == nBinsY and h.yAxis == yAxis;
+		};
+		// construct the XY histo and test
+		const SingleHistogramDefinition yHisto(name, type, title, nBinsX, nBinsY, xLo, xHi, yLo, yHi, xTitle, yTitle, aFolder );
+		BOOST_TEST(referenceValuesMatchXYConstruction(yHisto));
+		BOOST_TEST(omittedValuesXYAreUndefined(yHisto));
+		//Histogram definition with n bins and limits for zAxis also
+		const unsigned int nBinsZ{10};
+		const float zLo(0.3), zHi(10.3);
+		const auto zAxis=std::make_pair(zLo, zHi);
+		const std::string zTitle{"zAxis"};
+		auto referenceValuesMatchXYZConstruction = [=] (const auto & h){
+		  return referenceValuesMatchXYConstruction(h) and h.nBinsZ == nBinsZ and h.zAxis == zAxis and h.zTitle == zTitle;
+		};
+		// construct the XYZ histo and test
+		const SingleHistogramDefinition zHisto(name, type, title, nBinsX, nBinsY, nBinsZ, xLo, xHi, yLo, yHi, zLo, zHi, xTitle, yTitle, zTitle, aFolder );
+		BOOST_TEST(referenceValuesMatchXYZConstruction(zHisto));
+		//nothing left undefined in this case
+  }
+  BOOST_AUTO_TEST_CASE(publicMethodsOnEmptyInstance){
+    const SingleHistogramDefinition emptyDefinition;
+    //its empty?
+    BOOST_TEST(emptyDefinition.empty());
+    //whats the string representation of an empty histogram definition?
+    //(careful about spaces; perhaps this should be improved!)
+    BOOST_TEST(emptyDefinition.str() == "   0 0 0 nan nan nan nan nan nan   ");
+    //empty definition should not have valid histo type, or be valid in any sense
+    BOOST_TEST(emptyDefinition.validType() == false);
+    BOOST_TEST(emptyDefinition.isValid() == false);
+    //the stringIndex should be empty
+    BOOST_TEST(emptyDefinition.stringIndex().empty() ==  true);
+    //the title digest is just the delimiters
+    const std::string onlyDelimiters{";;;"};
+    BOOST_TEST(emptyDefinition.titleDigest() == onlyDelimiters);
+  }
+  BOOST_AUTO_TEST_CASE(publicMethodsOnValidInstance){
+    const std::string name("hName");
+		const std::string type("TH1");
+		const std::string title("hTitle");
+		const unsigned int nBinsX{10};
+		const float xLo(0.1), xHi(10.1);
+		const std::string xTitle{"xAxis"}, yTitle{"yAxis"};
+		const std::string aFolder("folderName");
+		const SingleHistogramDefinition validDefinition(name, type, title, nBinsX, xLo, xHi, xTitle, yTitle, aFolder );
+    //its empty?
+    BOOST_TEST(validDefinition.empty() == false);
+    //whats the string representation of an empty histogram definition?
+    //(careful about spaces; perhaps this should be improved!)
+    auto quote = [](const std::string & s){return "'" + s + "'";};
+    BOOST_TEST(quote(validDefinition.str()) == quote("hName TH1 hTitle 10 0 0 0.100000 10.100000 nan nan nan nan xAxis yAxis "));
+    //valid definition should have valid histo type
+    BOOST_TEST(validDefinition.validType() == true);
+    BOOST_TEST(validDefinition.isValid() == true);
+    //the stringIndex should show the full path
+    BOOST_TEST(validDefinition.stringIndex() ==  "folderName/hName");
+    //the title digest is a delimited concatenation of titles
+    BOOST_TEST(validDefinition.titleDigest() == "hTitle;xAxis;yAxis;");
+  }
+  BOOST_AUTO_TEST_CASE(publicMethodsOnInvalidInstance){
+    const std::string name("hName");
+		const std::string type("TH1");
+		const std::string title("hTitle");
+		const unsigned int nBinsX{10};
+		const float xLo(0.1), xHi(10.1);
+		const std::string xTitle{"xAxis"}, yTitle{"yAxis"};
+		const std::string aFolder("folderName");
+		const SingleHistogramDefinition badLimits(name, type, title, nBinsX, 10.1, 10.1, xTitle, yTitle, aFolder );
+		BOOST_TEST(badLimits.validType() == true);
+    BOOST_TEST(badLimits.isValid() == false);
+    const SingleHistogramDefinition badType(name, "", title, nBinsX, xLo, xHi, xTitle, yTitle, aFolder );
+		BOOST_TEST(badType.validType() == false);
+    BOOST_TEST(badType.isValid() == false);
+    const SingleHistogramDefinition unnamed("", type, title, nBinsX, xLo, xHi, xTitle, yTitle, aFolder );
+    BOOST_TEST(unnamed.validType() == true);
+    BOOST_TEST(unnamed.isValid() == false);
+  }
+BOOST_AUTO_TEST_SUITE_END()
+
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele10GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele10GeV_reco.sh
index 5794fcf25c984d34308ec0cb6329385449789856..d6e264bd65c805577ee2dbe9072493d51a2f1a3d 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele10GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele10GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli.mc16_13TeV.422029.ParticleGun_single_ele_Pt10.recon.RDO.e7967_e5984_s3126_r11774_tid20255009_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+      success_run=$rec_tf_exit_code
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele5GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele5GeV_reco.sh
index bb4f1ff29868ee225c2c74c03e96911d2334063f..0d6de7f0bf7b9d09c928af4c13f7b94dc2c0798f 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele5GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ele5GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli.mc16_13TeV.422028.ParticleGun_single_ele_Pt5.recon.RDO.e7967_e5984_s3126_r11774_tid20254991_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu100GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu100GeV_reco.sh
index 3224cfe3717d34713f092c8f49ec35d8c3ce4775..d63a8cf9921e261b68c2141ad6f9c462b7e58353 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu100GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu100GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli.mc16_13TeV.422036.ParticleGun_single_mu_Pt100.recon.RDO.e7967_e5984_s3126_r11774_tid20254958_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu10GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu10GeV_reco.sh
index c41c6d5a319d7451d535a4c469b9bef4ee41a3b1..492d1c56a33b2b14f7048e38cf19d9ae3f2bde6e 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu10GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu10GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli.mc16_13TeV.422034.ParticleGun_single_mu_Pt10.recon.RDO.e7967_e5984_s3126_r11774_tid20254941_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu1GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu1GeV_reco.sh
index d537e6b135dd89194b6a5c36568a4cc0974a47c3..3270aaaf11a037d3ec17dc3a093ed7ca6b979e3f 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu1GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu1GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli.mc16_13TeV.422032.ParticleGun_single_mu_Pt1.recon.RDO.e7967_e5984_s3126_r11774_tid20254908_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu20GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu20GeV_reco.sh
index f100b863122ce7b2a3dc346e0e60434819b6fbc7..3ca26b9e6306f58b768e01cfed0b3d78074d1af1 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu20GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu20GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli.mc16_13TeV.422035.ParticleGun_single_mu_Pt20.recon.RDO.e7967_e5984_s3126_r11774_tid20255026_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus1GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus1GeV_reco.sh
index b6b81d3f366a70b961251827104a93f2325671bd..738f743f6942e7a1defe0f5985cd37b99216c997 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus1GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus1GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli:user.keli.mc16_13TeV.422047.ParticleGun_single_piplus_Pt1.recon.RDO.e7967_e5984_s3126_r11774_tid20255143_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus5GeV_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus5GeV_reco.sh
index df420fdb94c2e8af02212dfda60b21d019750e94..8b66d4d6726e9915df546ee89a064eb9ef244a56 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus5GeV_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_piplus5GeV_reco.sh
@@ -4,11 +4,12 @@
 # art-input: user.keli:user.keli.mc16_13TeV.422048.ParticleGun_single_piplus_Pt5.recon.RDO.e7967_e5984_s3126_r11774_tid20255160_00
 # art-input-nfiles: 10
 # art-cores: 4
+# art-memory: 4096
 # art-include: master/Athena
 # art-output: *.root
 # art-output: *.xml 
 # art-output: art_core_*
-# art-output: dcube
+# art-output: dcube*
 
 set -x
 
@@ -83,6 +84,7 @@ case $ArtProcess in
       InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
       InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
       InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
       rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
       rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
       rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -92,9 +94,10 @@ case $ArtProcess in
       AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
       AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
       AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-    echo  "art-result: $? reco_${ArtInFile}"
-    if [ $? -ne 0 ]  ;then
-      success_run=$?
+    rec_tf_exit_code = $?
+    echo "art-result: $rec_tf_exit_code reco_${ArtInFile}"
+    if [ $rec_tf_exit_code  -ne 0 ]  ;then
+       success_run=$rec_tf_exit_code 
     fi
     ls -lR
     ;;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU0_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU0_reco.sh
index ab0c042a208c89226398a5b8ac2475904a0eed4f..23d58d7a3e90ad0f87b17c32db7e69e21d86dbe3 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU0_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU0_reco.sh
@@ -33,6 +33,7 @@ run Reco_tf.py \
   InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
   InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
   InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
   rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
   rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
   rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -42,9 +43,11 @@ run Reco_tf.py \
   AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
   AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
   AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-echo "art-result: $? reco"
+rec_tf_exit_code = $?
+echo "art-result: $rec_tf_exit_code reco"
 
-if [ rec_tf_exit_code  -eq 0 ]  ;then
+if [ $rec_tf_exit_code  -eq 0 ]  ;then
+  echo "download latest result"
   run art.py download --user=artprod --dst="$lastref_dir" "$ArtPackage" "$ArtJobName"
   run ls -la "$lastref_dir"
 
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU40_reco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU40_reco.sh
index e37b34fe0acaa5ed95660b3dbf3d70d40c77f751..18d231499f4150015a83c7c5577f5800c380499f 100755
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU40_reco.sh
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarPU40_reco.sh
@@ -24,7 +24,7 @@ run Reco_tf.py \
   --steering        doRAWtoALL \
   --checkEventCount False \
   --ignoreErrors    True \
-  --maxEvents       1000 \
+  --maxEvents       100 \
   --valid           True \
   --validationFlags doInDet \
   --preExec 'from InDetRecExample.InDetJobProperties import InDetFlags; \
@@ -33,6 +33,7 @@ run Reco_tf.py \
   InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
   InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
   InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
+  InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
   rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
   rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
   rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
@@ -42,9 +43,11 @@ run Reco_tf.py \
   AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
   AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
   AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-echo "art-result: $? reco"
+rec_tf_exit_code = $?
+echo "art-result: $rec_tf_exit_code reco"
 
-if [ rec_tf_exit_code  -eq 0 ]  ;then
+if [ $rec_tf_exit_code  -eq 0 ]  ;then
+  echo "download latest result"
   run art.py download --user=artprod --dst="$lastref_dir" "$ArtPackage" "$ArtJobName"
   run ls -la "$lastref_dir"
 
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarsimreco.sh b/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarsimreco.sh
deleted file mode 100755
index 58a9c2c747bf4c2a419202e120f8c7343dfb3a8c..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_ttbarsimreco.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/bash
-# art-description: Standard test for Run2 with ttbar input
-# art-type: grid
-# art-include: master/Athena
-# art-output: *.root
-# art-output: *.xml
-# art-output: dcube*
-
-# Fix ordering of output in logfile
-exec 2>&1
-run() { (set -x; exec "$@") }
-
-# Following specify which steps to run.
-dosim=1
-dorec=1
-
-# Following specify DCube output directories. Set empty to disable.
-dcube_sim_fixref="dcube_sim"
-dcube_sim_lastref="dcube_sim_last"
-dcube_rec_fixref="dcube"
-dcube_rec_lastref="dcube_last"
-
-artdata=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art
-#artdata=/eos/atlas/atlascerngroupdisk/data-art/grid-input
-
-name="run2"
-script="`basename \"$0\"`"
-evnt=$artdata/InDetPhysValMonitoring/inputs/EVNT.12860049._002516.pool.root.1
-hits_ref=$artdata/Tier0ChainTests/mc16_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.simul.HITS.e6337_s3126/HITS.12860054._032508.pool.root.1
-if [ $dosim -ne 0 ]; then
-  hits=physval.HITS.root
-else
-  hits="$hits_ref"
-fi
-dcubemon_sim=SiHitValid.root
-dcubemon_rec=physval.root
-dcubecfg_sim=$artdata/InDetPhysValMonitoring/dcube/config/run2_SiHitValid.xml
-dcuberef_sim=$artdata/InDetPhysValMonitoring/ReferenceHistograms/run2_SiHitValid.root
-dcubecfg_rec=$artdata/InDetPhysValMonitoring/dcube/config/run2_physval.xml
-dcuberef_rec=$artdata/InDetPhysValMonitoring/ReferenceHistograms/run2_physval.root
-art_dcube=/cvmfs/atlas.cern.ch/repo/sw/art/dcube/bin/art-dcube
-
-lastref_dir=last_results
-
-dcube() {
-  # Run DCube and print art-result (if $2 is not empty)
-  step="$1" statname="$2" dcubemon="$3" dcubecfg="$4" dcuberef="$5" dcubedir="$6"
-  test -n "$dcubedir" || return
-  run ls -lLU "$art_dcube" "$dcubemon" "$dcubecfg" "$dcuberef"
-  if [ ! -s "$dcubemon" ]; then
-    echo "$script: $step output '$dcubemon' not created. Don't create $dcubedir output." 2>&1
-    test -n "$statname" && echo "art-result: 20 $statname"
-    return
-  fi
-  if [ ! -s "$dcuberef" ]; then
-    echo "$script: $step DCube reference '$dcuberef' not available. Don't create $dcubedir output." 2>&1
-    test -n "$statname" && echo "art-result: 21 $statname"
-    return
-  fi
-  echo "$script: DCube comparison of $step output '$dcubemon' with '$dcuberef' reference"
-  keep=""
-  test "$dcubedir" != "dcube" -a -d "dcube" && keep="dcube_keep_`uuidgen`"
-  test -n "$keep" && run mv -f dcube "$keep"
-  run "$art_dcube" "$name" "$dcubemon" "$dcubecfg" "$dcuberef"
-  dcube_stat=$?
-  test -n "$statname" && echo "art-result: $dcube_stat $statname"
-  test "$dcubedir" != "dcube" && run mv -f dcube "$dcubedir"
-  test -n "$keep" && run mv -f "$keep" dcube
-}
-
-if [ $dosim -ne 0 ]; then
-
-  run ls -lL "$evnt"
-
-  # Sim step (based on PanDA job 3777178576 which made HITS.12860054._032508.pool.root.1, which is the input for AMI config q221):
-  #...BUT....  https://its.cern.ch/jira/browse/ATLASSIM-4341, cf. MR !28175
-  run Sim_tf.py \
-    --AMITag          s3505 \
-    --inputEVNTFile   "$evnt" \
-    --outputHITSFile  "$hits" \
-    --skipEvents      3000 \
-    --maxEvents       10 \
-    --runNumber       410470 \
-    --firstEvent      24303001 \
-    --randomSeed      24304 \
-    --DataRunNumber   284500 \
-    --physicsList     FTFP_BERT_ATL_VALIDATION \
-    --truthStrategy   MC15aPlus \
-    --simulator       FullG4 \
-    --conditionsTag   'default:OFLCOND-MC16-SDR-14' \
-    --geometryVersion 'default:ATLAS-R2-2016-01-00-01_VALIDATION' \
-    --preExec         EVNTtoHITS:'simFlags.SimBarcodeOffset.set_Value_and_Lock(200000)' \
-                      EVNTtoHITS:'simFlags.TRTRangeCut=30.0; simFlags.TightMuonStepping=True' \
-    --preInclude      EVNTtoHITS:'SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' \
-    --postInclude     'default:PyJobTransforms/UseFrontier.py,InDetPhysValMonitoring/postInclude.SiHitAnalysis.py'
-  echo "art-result: $? sim"
-
-  # DCube Sim hit plots
-  dcube Sim_tf sim-plot "$dcubemon_sim" "$dcubecfg_sim" "$lastref_dir/$dcubemon_sim" "$dcube_sim_lastref"
-  dcube Sim_tf ""       "$dcubemon_sim" "$dcubecfg_sim"              "$dcuberef_sim" "$dcube_sim_fixref"
-
-fi
-
-if [ $dorec -ne 0 ]; then
-
-  if [ $dosim -ne 0 ] && [ ! -s "$hits" ] && [ -s "$hits_ref" ]; then
-    echo "$script: Sim_tf output '$hits' not created. Run Reco_tf on '$hits_ref' instead." 2>&1
-    hits="$hits_ref"
-  fi
-
-  run ls -lL "$hits"
-
-  # Reco step based on test InDetPhysValMonitoring ART setup from Josh Moss.
-  run Reco_tf.py \
-    --inputHITSFile   "$hits" \
-    --outputAODFile   physval.AOD.root \
-    --outputNTUP_PHYSVALFile "$dcubemon_rec" \
-    --steering        doRAWtoALL \
-    --checkEventCount False \
-    --ignoreErrors    True \
-    --maxEvents       10 \
-    --valid           True \
-    --validationFlags doInDet \
-    --preExec 'from InDetRecExample.InDetJobProperties import InDetFlags; \
-    InDetFlags.doSlimming.set_Value_and_Lock(False); rec.doTrigger.set_Value_and_Lock(False); \
-    from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; \
-    InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
-    InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
-    InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
-    rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
-    rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
-    rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
-    rec.doSemiDetailedPerfMon=True; rec.doTau=False; rec.doTile=False;\
-    from ParticleBuilderOptions.AODFlags import AODFlags;\
-    AODFlags.ThinGeantTruth.set_Value_and_Lock(False);  \
-    AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
-    AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
-    AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '
-  echo "art-result: $? reco"
-
-  if [ rec_tf_exit_code  eq 0 ]  ;then
-    if [ \( $dosim -ne 0 -a -n "$dcube_sim_lastref" \) -o \( $dorec -ne 0 -a -n "$dcube_rec_lastref" \) ]; then
-    run art.py download --user=artprod --dst="$lastref_dir" InDetPhysValMonitoring "$script"
-    run ls -la "$lastref_dir"
-    fi
-  fi
-
-  # DCube InDetPhysValMonitoring performance plots
-  dcube InDetPhysValMonitoring plot "$dcubemon_rec" "$dcubecfg_rec" "$lastref_dir/$dcubemon_rec" "$dcube_rec_lastref"
-  dcube InDetPhysValMonitoring ""   "$dcubemon_rec" "$dcubecfg_rec"              "$dcuberef_rec" "$dcube_rec_fixref"
-
-fi
-
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt
index 1e3bab237c1336581f6af6496ce0fca86c7e9240..1e89f66fb92f8b5869c4f49f0abdc9b9b7ace8c3 100644
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt
@@ -33,5 +33,5 @@ atlas_add_library( LArReadoutGeometry
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoPrimitives Identifier LArHV StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel )
+                   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel RDBAccessSvcLib GeoModelInterfaces )
 
diff --git a/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx b/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx
index d4a0e213c1c26ba6d6a0d9b5919b39eca008d078..80f83619e658deb9343b7a72c5aede94a9df5b3d 100644
--- a/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx
+++ b/LArCalorimeter/LArRegionSelector/src/RegSelCondAlg_LAr.cxx
@@ -60,6 +60,18 @@ StatusCode RegSelCondAlg_LAr::execute(const EventContext& ctx)  const {
 
    /// do stuff here ...  
   ATH_MSG_DEBUG( "Creating region selector table " << m_tableKey );
+
+  SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  if (lutCondData.isValid()) {
+    /// inpractice, this should never be called, although in serial athena,                                                                          
+    /// because the implementation of the conditions behaviour is flawed in                                                                          
+    /// the framework, this routine will be called every event (!) regardless                                                                        
+    /// of whether it should be called or not so we need this check to                                                                               
+    /// prevent unecessary code execution on out our side                                                                                            
+    ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid." );
+    return StatusCode::SUCCESS;
+  }
+
    
   /// annoyingly take the pixel cabling to determine whether to build this
   /// calorimeter table using the EventIDRange.
@@ -90,8 +102,11 @@ StatusCode RegSelCondAlg_LAr::execute(const EventContext& ctx)  const {
 
   IRegSelLUTCondData* rcd = new IRegSelLUTCondData( std::move(rd) );  
 
-  try { 
-    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  try {
+    /// leave this commented here since this is where it should really be,
+    /// but we had to move it up in the code to handle the flawed conditions 
+    /// handling in the serial athena use case
+    ///    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
     if( lutCondData.record( id_range, rcd ).isFailure() ) {
       ATH_MSG_ERROR( "Could not record " << m_tableKey 
 		     << " " << lutCondData.key()
diff --git a/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py b/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py
index 099b06abf935728bc445e4efef7eda125211ecb4..440c6bfa1a3df46d7abb914108d5639a71e8db1c 100644
--- a/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py
+++ b/LumiBlock/LumiBlockComps/share/LumiBlockMuWriter_jobOptions.py
@@ -7,6 +7,6 @@ condalg = LuminosityCondAlgDefault()
 from LumiBlockComps.LumiBlockCompsConf import LumiBlockMuWriter
 muWriter = LumiBlockMuWriter("LumiBlockMuWriter",LumiDataKey=condalg.LuminosityOutputKey)
 
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-topSequence += muWriter
+from AthenaCommon.AlgSequence import AthSequencer
+condSeq = AthSequencer("AthCondSeq")
+condSeq += muWriter
diff --git a/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.cxx b/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.cxx
index c0b591f5f3f671accfa0f14affdc598f0a488596..a0924aaded1adc0d09fd241dcac611d76709c8cd 100644
--- a/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.cxx
+++ b/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.cxx
@@ -3,17 +3,16 @@
 */
 
 #include "LumiBlockMuTool.h"
+#include "StoreGate/ReadDecorHandle.h"
 
 //--------------------------------------------------
 
 LumiBlockMuTool::LumiBlockMuTool(const std::string& type,
 				 const std::string& name,
 				 const IInterface* parent)
-  : base_class(type, name, parent),
-    m_MCLumiBlockHack(false)
+  : base_class(type, name, parent)
 {
   declareInterface<ILumiBlockMuTool>(this);
-  declareProperty("MCLumiBlockHack", m_MCLumiBlockHack);
 }
 
 StatusCode
@@ -21,60 +20,29 @@ LumiBlockMuTool::initialize()
 {
   ATH_MSG_DEBUG("LumiBlockMuTool::initialize() begin");
   ATH_CHECK(m_eventInfoKey.initialize());
+  ATH_CHECK(m_rdhkActMu.initialize());
+  ATH_CHECK(m_rdhkAveMu.initialize());
   return StatusCode::SUCCESS;
 }
 
 float
 LumiBlockMuTool::actualInteractionsPerCrossing() const {
 
-  SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey);  
-
-  // Read MC data from LB number?
-
-  if (eventInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) {
-
-    if (m_MCLumiBlockHack) {
-      ATH_MSG_DEBUG("Returning lumi block as mu for MC event ");
-      return eventInfo->lumiBlock() % 100; // Never greater than 100 according to Ayana
-    }
-    
-    // Try reading from eventInfo, but fall back if less than zero
-    // Changed 9/10/13, as actualInteractionsPerCrossing should return -999
-    // if value is not filled, but can return 0 as a valid result
-    if ( eventInfo->actualInteractionsPerCrossing() >= 0) {
-      return eventInfo->actualInteractionsPerCrossing();
-    } else {
-      return eventInfo->lumiBlock() % 100;
-    }
-
-  }
+  SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey);
+  SG::ReadDecorHandle<xAOD::EventInfo,float> actMu(m_rdhkActMu);
+  float mu = actMu.isPresent() ? actMu(0) : 0.;
 
-  // Read mu from eventInfo
-  return eventInfo->actualInteractionsPerCrossing();
+  if (eventInfo->eventType(xAOD::EventInfo::IS_SIMULATION) && mu < 0) return eventInfo->lumiBlock() % 100;
+  return mu;
 }
 
 float
 LumiBlockMuTool::averageInteractionsPerCrossing() const{
 
   SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey);
+  SG::ReadDecorHandle<xAOD::EventInfo,float> aveMu(m_rdhkAveMu);
+  float mu = aveMu.isPresent() ? aveMu(0) : 0.;
 
-  // Read MC data from LB number?
-  if (eventInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) {
-
-    if (m_MCLumiBlockHack) {
-      ATH_MSG_DEBUG("Returning lumi block as mu for MC event ");
-      return eventInfo->lumiBlock() % 100;
-    }
-
-    // Try reading from eventInfo, but fall back if zero
-    if ( eventInfo->averageInteractionsPerCrossing() > 0) {
-      return eventInfo->averageInteractionsPerCrossing();
-    } else {
-      return eventInfo->lumiBlock() % 100;
-    }
-    
-  } 
-
-  // Read mu from eventInfo
-  return eventInfo->averageInteractionsPerCrossing();
+  if (eventInfo->eventType(xAOD::EventInfo::IS_SIMULATION) && mu <= 0) return eventInfo->lumiBlock() % 100;
+  return mu;
 }
diff --git a/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.h b/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.h
index 5d18f7574ab170ca1794bf59266e89eab574e869..fd231a87ac8623246d246f46213f428adcc08766 100644
--- a/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.h
+++ b/LumiBlock/LumiBlockComps/src/LumiBlockMuTool.h
@@ -17,6 +17,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "StoreGate/ReadHandleKey.h"
 #include "xAODEventInfo/EventInfo.h"
+#include "StoreGate/ReadDecorHandleKey.h"
 
 #include <string>
 
@@ -44,11 +45,20 @@ class LumiBlockMuTool: public extends<AthAlgTool, ILumiBlockMuTool> {
   virtual StatusCode initialize() override;
 
  private:
-  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK for EventInfo"};
-
-
-  // Take MC mu from lumi block number instead of EventInfo?
-  bool m_MCLumiBlockHack;  // Default is FALSE
+  SG::ReadHandleKey<xAOD::EventInfo>       m_eventInfoKey{this
+      ,"EventInfoKey"
+      ,"EventInfo"
+      ,"RHK for EventInfo"};
+
+  SG::ReadDecorHandleKey<xAOD::EventInfo>  m_rdhkActMu {this
+      ,"ActIntPerXKey"
+      ,"EventInfo.ActIntPerXDecor"
+      ,"Decoration for Actual Interaction Per Crossing"};
+
+  SG::ReadDecorHandleKey<xAOD::EventInfo>  m_rdhkAveMu {this
+      ,"AveIntPerXKey"
+      ,"EventInfo.AveIntPerXDecor"
+      ,"Decoration for Average Interaction Per Crossing"};
 };
 
 
diff --git a/MagneticField/MagFieldElements/CMakeLists.txt b/MagneticField/MagFieldElements/CMakeLists.txt
index c04fc6894dabb297e4356d68d2f74318ba72f1c8..30aa8f0454f23ed120e0b60aed3a388e8f2d38aa 100644
--- a/MagneticField/MagFieldElements/CMakeLists.txt
+++ b/MagneticField/MagFieldElements/CMakeLists.txt
@@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           MagneticField/MagFieldInterfaces
                           MagneticField/MagFieldConditions
 			  Control/CxxUtils
+			  Event/EventPrimitives
                           PRIVATE
                           MagneticField/MagFieldElements
                           Control/StoreGate
@@ -20,15 +21,14 @@ atlas_depends_on_subdirs( PUBLIC
 
 # External dependencies:
 find_package( CLHEP )
-find_package( Eigen )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( MagFieldElements
                    src/*.cxx
                    PUBLIC_HEADERS MagFieldElements
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-		   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES}  ${EIGEN_LIBRARIES} AthenaBaseComps GaudiKernel CxxUtils)
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+		   LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel CxxUtils EventPrimitives)
 
 # Install files from the package:
 atlas_install_headers( MagFieldElements )
diff --git a/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h b/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h
index 122300b0b1fe16d0d1761b54acccfd31a8bbdf5f..27d857f010e7dc544bdcc734207a96584711e5e8 100644
--- a/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h
+++ b/MagneticField/MagFieldElements/MagFieldElements/BFieldCond.h
@@ -14,7 +14,7 @@
 #ifndef BFIELDCOND_H
 #define BFIELDCOND_H
 
-#include <Eigen/Dense>
+#include "EventPrimitives/EventPrimitives.h"
 #include <cmath>
 
 class BFieldCond
diff --git a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/CMakeLists.txt b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/CMakeLists.txt
index 689245ff8a0c6988e5e41cad7f754dfcf8a586fb..d6f439143e0fa6dfe4b0ed0cddfba947ac57d0d7 100644
--- a/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCablings/MuonMDT_Cabling/CMakeLists.txt
@@ -27,8 +27,8 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( MuonMDT_CablingLib
                    src/*.cxx
                    PUBLIC_HEADERS MuonMDT_Cabling
-                   LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests MuonIdHelpersLib
-                   PRIVATE_LINK_LIBRARIES AthenaPoolUtilities Identifier EventInfo MuonCablingData MuonCondInterface MuonCondSvcLib )
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests MuonIdHelpersLib MuonCondInterface MuonCablingData AthenaPoolUtilities
+                   PRIVATE_LINK_LIBRARIES  Identifier EventInfo MuonCondSvcLib PathResolver EventInfoMgtLib )
 
 atlas_add_component( MuonMDT_Cabling
                      src/components/*.cxx
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/CscCalibData/CscCalibReportSlope.h b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/CscCalibData/CscCalibReportSlope.h
index 4817275b46e38a441e35225f547bdf01fa6196d4..f110627771c597d8a952fcc205d4fc3e68edc585 100755
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/CscCalibData/CscCalibReportSlope.h
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/CscCalibData/CscCalibReportSlope.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 CSCCALIBDATA_CSCCALIBREPORTSLOPE_H
@@ -17,15 +17,12 @@ and graphs. The monitoring system can pick out what graphs it wants.
 #include "CscCalibData/CscCalibReportBase.h"
 #include "AthContainers/DataVector.h"
 
-//#include "TGraphErrors.h"
-//#include "TProfile.h"
-
 #include <map>
 #include <set>
 
-
 class TProfile;
 class TGraphErrors;
+class TH1I;
 
 class CscCalibReportSlope : public CscCalibReportBase
 {
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/src/CscCalibReportSlope.cxx b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/src/CscCalibReportSlope.cxx
index dd19d5373f51a631a0a524e279ff3c3dfc55d52e..4e4faad7708fc02983fa61a1c7d55c3a645182b3 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/src/CscCalibReportSlope.cxx
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibData/src/CscCalibReportSlope.cxx
@@ -1,63 +1,46 @@
 /*
-  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 "TGraphErrors.h"
-#include "TProfile.h"
-
-
 #include "CscCalibData/CscCalibReportSlope.h"
 #include "AthContainers/DataVector.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
+#include "TH1I.h"
+#include "TGraphErrors.h"
+#include "TProfile.h"
 #include <string>
 #include <map>
 #include <set>
 
 /* default constructor */
 CscCalibReportSlope::CscCalibReportSlope() : 
-  m_calGraphs(NULL),
-    m_bitHists(NULL),
-  //m_deadChanges(NULL),
-  m_ampProfs(NULL),
-  m_pulsedChambers(NULL),
-  m_fitResults(NULL)
+  m_calGraphs(nullptr),
+  m_bitHists(nullptr),
+  m_ampProfs(nullptr),
+  m_pulsedChambers(nullptr),
+  m_fitResults(nullptr)
 { }
 
 /* full constructor */
 CscCalibReportSlope::CscCalibReportSlope(std::string label) :  
   CscCalibReportBase::CscCalibReportBase(label),
-  m_calGraphs(NULL),
-  //m_deadChanges(NULL),
-    m_bitHists(NULL),
-  m_ampProfs(NULL),
-  m_pulsedChambers(NULL),
-  m_fitResults(NULL)
+  m_calGraphs(nullptr),
+  m_bitHists(nullptr),
+  m_ampProfs(nullptr),
+  m_pulsedChambers(nullptr),
+  m_fitResults(nullptr)
 { }
 
 CscCalibReportSlope::~CscCalibReportSlope()
 {
   //Datavector, so it will delete its own contents
   delete m_calGraphs;
-
   delete m_bitHists;
-
-  //Doesn't contain pointers, so this is also safe
-  //delete m_deadChanges;
-
   delete m_ampProfs;
   delete m_pulsedChambers;
   delete m_fitResults;
-  /*
-  //ampProfs needs to have contents explicitly deleted.
-  if(ampProfs)
-  {
-    std::map<int,TProfile*>::iterator profItr = m_ampProfs->begin();
-    std::map<int,TProfile*>::iterator profEnd = m_ampProfs->end();
-    for(;profItr != profEnd; profItr++)
-      delete profItr->second;
-    delete m_ampProfs;
-    delete m_pulsedChambers;
-  }
-  */
 }
 
 
@@ -73,8 +56,10 @@ const DataVector<TH1I> * CscCalibReportSlope::getBitHists() const
 
 void CscCalibReportSlope::setCalGraphs(DataVector<TGraphErrors> * someCalGraphs)
 {
-  if(m_calGraphs)
-    std::cout << "CscCalibReportSlope  WARNING      Writing over already existing calGraphs in report!" << std::endl;
+  if(m_calGraphs) {
+    MsgStream log(Athena::getMessageSvc(),"CscCalibReportSlope");
+    log<<MSG::WARNING<<"Writing over already existing calGraphs in report!"<<endmsg;
+  }
     
   m_calGraphs = someCalGraphs;
 }
@@ -84,28 +69,15 @@ const DataVector<TGraphErrors> * CscCalibReportSlope::getCalGraphs() const
   return m_calGraphs;
 }
 
-
-/*void CscCalibReportSlope::setDeadChanges( std::set<CscCalibReportSlope::bitChange> * someDeadChanges )
-{
-  if(m_deadChanges)
-    std::cout << "CscCalibReportSlope  WARNING       Attempt was made to write over already existing dead changes in report" << std::endl;
-
-  m_deadChanges = someDeadChanges;
-}*/
-
 void CscCalibReportSlope::setAmpProfs( std::map<int,TProfile *> * someAmpProfs )
 {
-  if(m_ampProfs)
-    std::cout << "CscCalibReportSlope  WARNING        writing over already existing dead changes in report" << std::endl;
+  if(m_ampProfs) {
+    MsgStream log(Athena::getMessageSvc(),"CscCalibReportSlope");
+    log<<MSG::WARNING<<"writing over already existing dead changes in report!"<<endmsg;
+  }
   m_ampProfs = someAmpProfs;
 }
 
-/*
-const std::set<CscCalibReportSlope::bitChange> * CscCalibReportSlope::getDeadChanges() const
-{
-  return m_deadChanges;
-}*/
-
 void CscCalibReportSlope::setFitResults( std::vector<float> * someFitResults){
   m_fitResults = someFitResults;
 }
@@ -117,8 +89,10 @@ const std::map<int,TProfile*> * CscCalibReportSlope::getAmpProfs() const
 
 void CscCalibReportSlope::setPulsedChambers( std::set<int> * somePulsedChambers)
 {
-  if(m_pulsedChambers)
-    std::cout << "CscCalibReportSlope WARNING     Writing over previously existing pulsed chambers" << std::endl;
+  if(m_pulsedChambers) {
+    MsgStream log(Athena::getMessageSvc(),"CscCalibReportSlope");
+    log<<MSG::WARNING<<"Writing over previously existing pulsed chambers!"<<endmsg;
+  }
   m_pulsedChambers = somePulsedChambers;
 }
     
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtRelationLookUp.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtRelationLookUp.h
index 669a086cb5e0e0d9fa7c5cd38a814dd741a11416..5b85ddbbd0a88213292669ef13933f05e5e407a1 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtRelationLookUp.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtRelationLookUp.h
@@ -1,11 +1,14 @@
 /*
-  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 MUONCALIB_RTRELATIONLOOKUP_H
 #define MUONCALIB_RTRELATIONLOOKUP_H
 
 #include "MdtCalibData/IRtRelation.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
 #include <iostream>
 #include <climits>
 
@@ -22,15 +25,17 @@ namespace MuonCalib{
   public:
     explicit RtRelationLookUp( const ParVec &vec ) : IRtRelation(vec) {
       if( vec.size() < 4 ){
-	m_t_min=9e9;
-	m_bin_size=1.0; //will be always out of range
-	std::cout << "RtRelationLookUp ERROR <to few parameters> " << std::endl;
-      }else{
-	m_t_min = par(0);
-	m_bin_size = par(1);
-	if (m_bin_size==0) {
-	  std::cout << "RtRelationLookUp ERROR <bin size=0> " << std::endl;
-	}
+        m_t_min=9e9;
+        m_bin_size=1.0; //will be always out of range
+        MsgStream log(Athena::getMessageSvc(),"RtRelationLookUp");
+        log<<MSG::WARNING<<"<to few parameters>"<<endmsg;
+      } else {
+        m_t_min = par(0);
+        m_bin_size = par(1);
+        if (m_bin_size==0) {
+          MsgStream log(Athena::getMessageSvc(),"RtRelationLookUp");
+          log<<MSG::WARNING<<"<bin size=0>"<<endmsg;
+        }
       }
     }
     
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtResolutionLookUp.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtResolutionLookUp.h
index 83be9d709c3aa9dcd1e5c426d878ae725ffcc98b..8597c75108ffb798a258d2591db884c1f03b7f84 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtResolutionLookUp.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/MdtCalibData/RtResolutionLookUp.h
@@ -1,11 +1,14 @@
 /*
-  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 MUONCALIB_RTRESOLUTIONLOOKUP_H
 #define MUONCALIB_RTRESOLUTIONLOOKUP_H
 
 #include "MdtCalibData/IRtResolution.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
 #include <iostream>
 
 namespace MuonCalib{
@@ -20,13 +23,14 @@ namespace MuonCalib{
 class RtResolutionLookUp : public IRtResolution {
   public:
     explicit RtResolutionLookUp( const ParVec& vec ) : IRtResolution(vec)  {
-      if( vec.size() < 4 ){ 
-	std::cout << "RtResolutionLookUp ERROR <to few parameters> " << std::endl;
-	m_t_min=9e9;
-	m_bin_size=1.0; //will be always out of range	
-      }else{
-	m_t_min = par(0);
-	m_bin_size = par(1);
+      if( vec.size() < 4 ){
+        MsgStream log(Athena::getMessageSvc(),"RtResolutionLookUp");
+        log<<MSG::WARNING<<"<to few parameters>"<<endmsg;
+        m_t_min=9e9;
+        m_bin_size=1.0; //will be always out of range	
+      } else {
+        m_t_min = par(0);
+        m_bin_size = par(1);
       }
     }
     
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtCalibrationFactory.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtCalibrationFactory.cxx
index e011b4777b997496b6abe6126850687168f20fa9..439ccac013087612592199e4849d0f64b9c848fa 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtCalibrationFactory.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/src/MdtCalibrationFactory.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 "MdtCalibData/MdtCalibrationFactory.h"  
@@ -10,85 +10,80 @@
 #include "MdtCalibData/MdtWireSagCorFunc0.h"
 #include "MdtCalibData/RtRelationLookUp.h"
 #include "MdtCalibData/RtResolutionLookUp.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
 #include <iostream>
 
 namespace MuonCalib{
 
-IMdtBackgroundCorFunc *MdtCalibrationFactory::createBackgroundCorFunc( std::string name, 
-					      const CalibFunc::ParVec& pars) {
+IMdtBackgroundCorFunc *MdtCalibrationFactory::createBackgroundCorFunc(std::string name, const CalibFunc::ParVec& pars) {
   if( name == "MdtBackgroundCorFunc0" ) {
     return new MdtBackgroundCorFunc0(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createBackgroundCorFunc: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createBackgroundCorFunc: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
 
-IMdtBFieldCorFunc *MdtCalibrationFactory::createBFieldCorFunc( std::string name, 
-				      const CalibFunc::ParVec& pars) {
+IMdtBFieldCorFunc *MdtCalibrationFactory::createBFieldCorFunc( std::string name, const CalibFunc::ParVec& pars) {
   if( name == "MdtBFieldCorFunc0" ) {
     return new MdtBFieldCorFunc0(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createBFieldCorFunc: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createBFieldCorFunc: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
   
-IMdtSlewCorFunc *MdtCalibrationFactory::createMdtSlewCorFunc( std::string name, 
-				       const CalibFunc::ParVec& pars) {
+IMdtSlewCorFunc *MdtCalibrationFactory::createMdtSlewCorFunc( std::string name, const CalibFunc::ParVec& pars) {
   if( name == "MdtSlewCorFunc0" ) {
     return new MdtSlewCorFunc0(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createMdtSlewCorFunc: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createMdtSlewCorFunc: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
  
-IMdtTempCorFunc *MdtCalibrationFactory::createMdtTempCorFunc( std::string name, 
-				       const CalibFunc::ParVec& pars) {
+IMdtTempCorFunc *MdtCalibrationFactory::createMdtTempCorFunc( std::string name, const CalibFunc::ParVec& pars) {
   if( name == "MdtTempCorFunc0" ) {
     return new MdtTempCorFunc0(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createMdtTempCorFunc: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createMdtTempCorFunc: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
 
-IMdtWireSagCorFunc* MdtCalibrationFactory::createMdtWireSagCorFunc( std::string name, 
-				  const CalibFunc::ParVec& pars) {
+IMdtWireSagCorFunc* MdtCalibrationFactory::createMdtWireSagCorFunc( std::string name, const CalibFunc::ParVec& pars) {
   if( name == "MdtWireSagCorFunc0" ) {
     return new MdtWireSagCorFunc0(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createMdtWireSagCorFunc: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createMdtWireSagCorFunc: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
   
-IRtRelation* MdtCalibrationFactory::createRtRelation( std::string name, 
-				   const CalibFunc::ParVec& pars) {
+IRtRelation* MdtCalibrationFactory::createRtRelation( std::string name, const CalibFunc::ParVec& pars) {
   if( name == "RtRelationLookUp" ) {
     return new RtRelationLookUp(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createRtRelation: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createRtRelation: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
 
-IRtResolution* MdtCalibrationFactory::createRtResolution( std::string name, 
-				     const CalibFunc::ParVec& pars) {
+IRtResolution* MdtCalibrationFactory::createRtResolution( std::string name, const CalibFunc::ParVec& pars) {
   if( name == "RtResolutionLookUp" ) {
     return new RtResolutionLookUp(pars);
   }else{
-    std::cout << "MdtCalibrationFactory::createRtResolution: <wrong name> " 
-	      << name << std::endl;
-    return 0;
+    MsgStream log(Athena::getMessageSvc(),"MdtCalibrationFactory");
+    log<<MSG::WARNING<<"createRtResolution: <wrong name>"<< name<<endmsg;
+    return nullptr;
   }
 }
 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/src/MdtCalibEventLoop.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/src/MdtCalibEventLoop.cxx
index 2c105cb99d794db93bd4139940852435558a0e74..c49e8a9fba790ebe19ae7e5ca0d6d8a8090a420f 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/src/MdtCalibEventLoop.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/src/MdtCalibEventLoop.cxx
@@ -1,22 +1,22 @@
 /*
-  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 "MdtCalibEventLoop/MdtCalibEventLoop.h"
-
 #include "MdtCalibInterfaces/IMdtCalibrationOutput.h"
-
 #include "MdtCalibInterfaces/IMdtCalibration.h"
 #include "MuonCalibEventBase/MuonCalibSegment.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
 #include <iostream>
 #include <algorithm>
 
 namespace MuonCalib {
 
-  MdtCalibEventLoop::MdtCalibEventLoop(std::string regionKey) 
-    : m_calibrationImp(NULL),
-    m_calibrationResult(NULL),
+  MdtCalibEventLoop::MdtCalibEventLoop(std::string regionKey) :
+    m_calibrationImp(nullptr),
+    m_calibrationResult(nullptr),
     m_regionKey(regionKey)
   {
     m_printLevel = 1;
@@ -31,14 +31,18 @@ namespace MuonCalib {
 
   void MdtCalibEventLoop::performAnalysis()
   {
-    if( m_printLevel >= 1 ) 
-      std::cout << "MdtCalibEventLoop::performAnalysis for region " << m_regionKey << std::endl;
+    if( m_printLevel >= 1 ) {
+      MsgStream log(Athena::getMessageSvc(),"MdtCalibEventLoop");
+      log<<MSG::VERBOSE<<"MdtCalibEventLoop::performAnalysis for region " << m_regionKey<<endmsg;
+    }
 
     // perform rt-calibration 
     m_calibrationResult = m_calibrationImp->analyseSegments( m_segments );
 
-    if( m_printLevel >= 2 ) 
-      std::cout << "new rtOutput " << m_calibrationResult << std::endl;
+    if( m_printLevel >= 2 ) {
+      MsgStream log(Athena::getMessageSvc(),"MdtCalibEventLoop");
+      log<<MSG::DEBUG<<"new rtOutput " << m_calibrationResult<<endmsg;
+    }
 
   
   }
@@ -46,8 +50,10 @@ namespace MuonCalib {
 
   bool MdtCalibEventLoop::handleSegment( const MuonCalibSegment* cseg )
   {
-    if( m_printLevel >= 4 ) 
-      std::cout << "MdtCalibEventLoop::handleSegment " << cseg << std::endl;
+    if( m_printLevel >= 4 ) {
+      MsgStream log(Athena::getMessageSvc(),"MdtCalibEventLoop");
+      log<<MSG::WARNING<<"MdtCalibEventLoop::handleSegment " << cseg<<endmsg;
+    }
 
     if( cseg ){
       // eventloop owns the segments so it should make a copy
@@ -57,7 +63,8 @@ namespace MuonCalib {
       m_segments.push_back(seg);
 
     }else{
-      std::cout << "MdtCalibEventLoop::handleSegment ERROR got NULL pointer " << std::endl;
+      MsgStream log(Athena::getMessageSvc(),"MdtCalibEventLoop");
+      log<<MSG::WARNING<<"MdtCalibEventLoop::handleSegment: got nullptr "<<endmsg;
       return false;
     }
     return true;
@@ -65,13 +72,15 @@ namespace MuonCalib {
 
   void MdtCalibEventLoop::setCalibImp( IMdtCalibration* calibImp)
   {
-    if( m_printLevel >= 2 ) 
-      std::cout << "MdtCalibEventLoop::setRtCalibTool >> new tool " 
-		<< calibImp << std::endl;
+    if( m_printLevel >= 2 ) {
+      MsgStream log(Athena::getMessageSvc(),"MdtCalibEventLoop");
+      log<<MSG::DEBUG<<"MdtCalibEventLoop::setRtCalibTool >> new tool "<<calibImp<<endmsg;
+    }
     if( calibImp ){
       m_calibrationImp = calibImp;
     }else{
-      std::cout << "MdtCalibEventLoop::setCalibImp ERROR got NULL pointer " << std::endl;
+      MsgStream log(Athena::getMessageSvc(),"MdtCalibEventLoop");
+      log<<MSG::WARNING<<"MdtCalibEventLoop::setCalibImp: got nullptr "<<endmsg;
       m_calibrationImp = 0;
     }
   }
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/DCSLFitter.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/DCSLFitter.cxx
index d82e58a58201332ce3016e814d008eb0179624dc..9d734486ce6775ea3b1628e83c9c589d2695f0c2 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/DCSLFitter.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/DCSLFitter.cxx
@@ -3,6 +3,9 @@
 */
 
 #include "MdtCalibFitters/DCSLFitter.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
 #include "cmath"
 
 namespace MuonCalib {
@@ -23,8 +26,10 @@ namespace MuonCalib {
 
   bool DCSLFitter::fit( MuonCalibSegment& seg, HitSelection selection ) const
   {
-    if(m_debug) std::cout << "New seg: " << std::endl; //<< seg;
-
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"New seg: "<<endmsg;
+    }
 
     int N = seg.mdtHitsOnTrack();
 
@@ -41,8 +46,9 @@ namespace MuonCalib {
 	if(selection[i] == 0) ++used;
       }
       if(used < 2){
-	std::cout << "TO FEW HITS SELECTED" << std::endl;
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::WARNING<<"TO FEW HITS SELECTED"<<endmsg;
+        return false;
       }
     }
 
@@ -72,11 +78,13 @@ namespace MuonCalib {
 	  w[ii] = 0.;
 	if(r[ii]<0){
 	  r[ii] = 0.;
-	  std::cout << "DCSLFitter ERROR: <Negative r> " << r[ii] << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+    log<<MSG::WARNING<<"<Negative r> " << r[ii]<<endmsg;
 	}
-	if(m_debug)
-	  std::cout << "DC:  (" << y[ii] << "," << z[ii] << ")  R = " << r[ii]
-		    << " W " << w[ii] << std::endl;
+	if(m_debug) {
+    MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+    log<<MSG::DEBUG<<"DC:  (" << y[ii] << "," << z[ii] << ")  R = " << r[ii] << " W " << w[ii]<<endmsg;
+  }
 
 	if(selection[ii]){
 	  ++hit;++ii;
@@ -91,12 +99,13 @@ namespace MuonCalib {
     Zc = Sz/S;
     Yc = Sy/S;
   
-    if(m_debug)
-      std::cout << "Yc " << Yc << " Zc " << Zc << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"Yc " << Yc << " Zc " << Zc<<endmsg;
+    }
     //
     //    shift hits
     //
-    //std::cout << "Shifted d " << d << std::endl;
     Sy = 0;
     Sz = 0;
     double Szz(0),Syy(0),Szy(0),Syyzz(0);
@@ -121,9 +130,10 @@ namespace MuonCalib {
       Syyzz += (y[i]-z[i])*(y[i]+z[i])*w[i];
     }
 
-    if(m_debug)
-      std::cout << " Szz " << Szz << " Syy " << Syy 
-		<< " Szy " << Szy << " Syyzz " << Syyzz << std::endl; 
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<" Szz " << Szz << " Syy " << Syy << " Szy " << Szy << " Syyzz " << Syyzz<<endmsg;
+    }
   
     int count(0);
     double R(0),Ry(0),Rz(0);
@@ -137,19 +147,23 @@ namespace MuonCalib {
     double cosin = getZ( dir )/dir.mag();
     double sinus = getY( dir )/dir.mag();
 
-    if(m_debug) 
-      std::cout << "cos " << cosin << " sin " << sinus << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"cos " << cosin << " sin " << sinus<<endmsg;
+    }
 
     // make sure 0 <= theta < PI
     if ( sinus < 0.0 ) {
       if(m_debug) {
-	std::cout << "sinus < 0.0 " << std::endl;
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::DEBUG<<"sinus=" << sinus<<endmsg;
       }     
       sinus = -sinus;
       cosin = -cosin;
     } else if ( sinus == 0.0 && cosin < 0.0 ) {
       if(m_debug) {
-	std::cout << "sinus == 0.0 && cosin < 0.0" << std::endl;
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::DEBUG<<"sinus == 0.0 && cosin < 0.0"<<endmsg;
       }     
       cosin = -cosin;
     }
@@ -159,12 +173,16 @@ namespace MuonCalib {
     double d = -( getZ( pos )-Zc)*sinus+( getY( pos )-Yc)*cosin;
     double theta = std::acos(cosin);
     if(m_debug) {
-      std::cout << "____________INITIAL VALUES________________" << count << std::endl;
-      std::cout << "Theta " << theta << " d " << d << std::endl;
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"____________INITIAL VALUES________________" << count<<endmsg;
+      log<<MSG::DEBUG<<"Theta " << theta << " d " << d << count<<endmsg;
     }
 
     while(count<100){
-      if(m_debug) std::cout << "____________NEW ITERATION________________" << count << std::endl;
+      if(m_debug) {
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::DEBUG<<"____________NEW ITERATION________________" << count<<endmsg;
+      }
       R=0;Ry=0;Rz=0;
       for(int i=0;i<N;++i){
 	if(selection[i]) continue;
@@ -174,21 +192,27 @@ namespace MuonCalib {
 	  R  -= rw[i];
 	  Ry -= ryw[i];
 	  Rz -= rzw[i];
-	  if(m_debug) std::cout << " < - > " << dist - d << " r " << r[i];
+	  if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<" < - > " << dist - d << " r " << r[i]<<endmsg;
+    }
 	}else{
 	  R  += rw[i];
 	  Ry += ryw[i];
 	  Rz += rzw[i];
-	  if(m_debug) std::cout << " < + > " << dist - d << " r " << r[i];
+	  if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<" < + > " << dist - d << " r " << r[i]<<endmsg;
+    }
 	}
       }
-      if(m_debug) std::cout << std::endl;
       Att = Syy + cosin*(2*sinus*Szy - cosin*Syyzz);
       Bt = -Szy + cosin*(sinus*Syyzz + 2*cosin*Szy + Rz) + sinus*Ry;
       Bd = -S*d + R;
       if(Att==0){
-	std::cerr << "===> Error NewtonSLDCFitter ZERO Determinant" << std::endl;
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::WARNING<<"NewtonSLDCFitter ZERO Determinant"<<endmsg;
+        return false;
       }
       theta += Bt/Att;
       if ( theta < 0.0   ) theta += M_PI;
@@ -196,32 +220,42 @@ namespace MuonCalib {
       cosin = std::cos(theta);
       sinus = std::sqrt(1-cosin*cosin);
       d = R/S;
-      if(m_debug) std::cout << "R " << R << " Ry " << Ry << " Rz " << Rz << std::endl;
-      if(m_debug) std::cout << "Att " << Att << " Add " << Add << " Bt " << Bt << " Bd " << Bd << std::endl;
-      if(m_debug) std::cout << "dTheta " << Bt/Att << " dD " << Bd/Add << std::endl;
+      if(m_debug) {
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::DEBUG<<"R " << R << " Ry " << Ry << " Rz " << Rz<<endmsg;
+        log<<MSG::DEBUG<<"Att " << Att << " Add " << Add << " Bt " << Bt << " Bd " << Bd<<endmsg;
+        log<<MSG::DEBUG<<"dTheta " << Bt/Att << " dD " << Bd/Add<<endmsg;
+      }
       if(std::abs(Bt/Att) < 0.001 && std::abs(Bd/Add) < 0.001){
 	Stt = std::sqrt(1/Att);
 	Sd = std::sqrt(1/Add);
-	if(m_debug) std::cout << "Fit converged after " << count << " iterations " << std::endl;
 
-	if(m_debug) std::cout << "Theta " << theta << "d " << d << std::endl;
-	if(m_debug) std::cout << "Errors: theta " << Stt << " d " << Sd << std::endl;
+	if(m_debug) {
+    MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+    log<<MSG::DEBUG<<"Fit converged after " << count << " iterations "<<endmsg;
+    log<<MSG::DEBUG<<"Theta " << theta << "d " << d<<endmsg;
+    log<<MSG::DEBUG<<"Errors: theta " << Stt << " d " << Sd<<endmsg;
+  }
 
-//        error_dy0 = Sd;
-//        error_dtheta = Stt;
         seg.setErrors(Sd,Stt);
 
 	break;
       }
       ++count;
     }
-    if(m_debug) std::cout << "Calculating chi2" << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"Calculating chi2"<<endmsg;
+    }
 
     std::vector< double > yl(N);
     std::vector< double > dyl(N);
     std::vector< double > res(N);
     double chi2(0);
-    if(m_debug) std::cout << "contributions to chi2: " << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"contributions to chi2: "<<endmsg;
+    }
 
     // calculate predicted hit positions from track parameters
     for(int i=0;i<N;++i){
@@ -229,32 +263,40 @@ namespace MuonCalib {
       double dth = -(sinus*y[i] + cosin*z[i])*Stt;
       dyl[i] = std::hypot(dth, Sd);
       res[i] = std::abs(yl[i]) - r[i];
-      if(m_debug) std::cout << " r_track " << yl[i] << " dr " << dyl[i]
-			    << " r_rt " << r[i] << " res " << res[i]
-			    << " pull " << res[i]*res[i]*w[i] << std::endl;
+      if(m_debug) {
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::DEBUG<<" r_track " << yl[i] << " dr " << dyl[i]<< " r_rt " << r[i] << " res " << res[i]<< " pull " << res[i]*res[i]*w[i]<<endmsg;
+        }
       //skip hits that are not used in fit
       if(selection[i]) continue;
 
       chi2 += res[i]*res[i]*w[i];
 
     }
-  
-    // std::cout << " Chi2 = " << chi2 << " chi2 per dof " << chi2/(N-2) << std::endl;
 
-    if(m_debug) std::cout << "Fit complete: Chi2 tof " << chi2/(N-2)
-			  << " " << !(chi2/(N-2) > 5) << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"Fit complete: Chi2 tof " << chi2/(N-2)<< " " << !(chi2/(N-2) > 5)<<endmsg;
+      }
     if(chi2/(N-2) > 5) {
       if(m_debug) {
-	std::cout << "_______NOT GOOD " << std::endl;
+        MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+        log<<MSG::DEBUG<<"_______NOT GOOD "<<endmsg;
       }
     }
 
-    if(m_debug) std::cout << "Transforming back to real world" << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"Transforming back to real world"<<endmsg;
+    }
 
     Amg::Vector3D ndir = getVec( dir.x() , sinus, cosin );
     Amg::Vector3D npos = getVec( pos.x() , Yc + cosin*d, Zc - sinus*d );
 
-    if(m_debug) std::cout << "New line: position " << npos << " direction " << ndir << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"New line: position " << npos << " direction " << ndir<<endmsg;
+    }
 
     seg.set( chi2/(N-2), npos, ndir );
 
@@ -269,7 +311,10 @@ namespace MuonCalib {
       ++it;++i;
     }
 
-    if(m_debug) std::cout << "fit done" << std::endl;
+    if(m_debug) {
+      MsgStream log(Athena::getMessageSvc(),"DCSLFitter");
+      log<<MSG::DEBUG<<"fit done"<<endmsg;
+    }
  //tracking failed if position and directins are not real numbers
     return (std::isfinite(ndir.y()) && std::isfinite(ndir.z()) && std::isfinite(npos.y()) && std::isfinite(npos.z()));
   }
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/LocalSegmentResolver.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/LocalSegmentResolver.cxx
index 9e5cfd63970c29edb71e188fd2e5fa76b46b8f2c..f6b0f2e489765bbf631fa09b0004f33653da11f8 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/LocalSegmentResolver.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/LocalSegmentResolver.cxx
@@ -3,26 +3,30 @@
 */
 
 #include "MdtCalibFitters/LocalSegmentResolver.h"
-
 #include "MuonCalibEventBase/MdtCalibHitBase.h"
-
 #include "MdtCalibFitters/LocalToPrecision.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
 #include <iostream>
 
 namespace MuonCalib {
 
-  LocalSegmentResolver::LocalSegmentResolver() : m_printLevel(0) {}
+  LocalSegmentResolver::LocalSegmentResolver() : m_printLevel(1) {}
 
   bool LocalSegmentResolver::resolve(MuonCalibSegment* seg) const{
     if( !seg ){
-      if( m_printLevel >= 0 )
-	std::cout << "LocalSegmentResolver::resolve  ERROR <got null pointer> " << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::resolve: <got nullptr>"<<endmsg;
+      }
       return false;
     }
     if( seg->mdtHitsOnTrack() < 2 ) {
-      if( m_printLevel >= 1 )
-	std::cout << "LocalSegmentResolver::resolve  ERROR <to few hits, cannot resolve direction> " << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::resolve: <to few hits, cannot resolve direction>"<<endmsg;
+      }
       return false;
     }
 
@@ -62,18 +66,20 @@ namespace MuonCalib {
 
     LineVec list_of_lines;
     
-    if( m_printLevel >= 3 ){
-      std::cout << "      calculating Lines (" << x1 << "," << y1 << ")  " << r1 
-		<< "       (" << x2 << "," << y2 << ")  " << r2 << std::endl;
-      std::cout << "      general dir " << (hpos2-hpos1).unit() 
-		<< " calculated : " << Amg::Vector3D( std::cos(Alpha0), std::sin(Alpha0), 0. ) << std::endl;
+    if( m_printLevel >= 1 ){
+      MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+      log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: calculating Lines (" << x1 << "," << y1 << ")  " << r1 << "       (" << x2 << "," << y2 << ")  " << r2<<endmsg;
+      log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: general dir " << (hpos2-hpos1).unit()<< " calculated : " << Amg::Vector3D( std::cos(Alpha0), std::sin(Alpha0), 0. ) <<endmsg;
     }
 
     // Case of 0 drift distances, only 1 line
     if ( r1 == 0. && r2 == 0.) {
       Amg::Vector3D  pos = hpos1;
       Amg::Vector3D dir( std::cos(Alpha0) ,std::sin(Alpha0), 0 );
-      if( m_printLevel >= 5 ) std::cout << " line pos " << pos << " dir " << dir << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos << " dir " << dir <<endmsg;
+      }
       list_of_lines.push_back( std::make_pair(pos, dir) );
       return list_of_lines;
     }
@@ -88,8 +94,10 @@ namespace MuonCalib {
     Amg::Vector3D  pos1( x1 + r1*std::sin(line_phi), y1 - r1*std::cos(line_phi), 0. ) ;
     Amg::Vector3D dir1( std::cos(line_phi), std::sin(line_phi), 0. );
 
-    if( m_printLevel >= 5 )  
-      std::cout << " line pos " << pos1 << " dir " << dir1 << std::endl;
+    if( m_printLevel >= 1 ) {
+      MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+      log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos1 << " dir " << dir1 <<endmsg;
+    }
 
     list_of_lines.push_back( std::make_pair(pos1, dir1) );
     
@@ -98,8 +106,10 @@ namespace MuonCalib {
     Amg::Vector3D  pos2( x1 - r1*std::sin(line_phi), y1 + r1*std::cos(line_phi), 0. );
     Amg::Vector3D dir2( std::cos(line_phi), std::sin(line_phi), 0. );
 			  
-    if( m_printLevel >= 5 ) 
-      std::cout << " line pos " << pos2 << " dir " << dir2 << std::endl;
+    if( m_printLevel >= 1 ) {
+      MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+      log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos2 << " dir " << dir2 <<endmsg;
+    }
 
     list_of_lines.push_back( std::make_pair(pos2, dir2) );
 
@@ -111,17 +121,20 @@ namespace MuonCalib {
     double	Alpha2	=	std::asin(DeltaR/DistanceOfCenters);
 
     if ( r1 < r2 ) {
-      if( m_printLevel >= 5 )
-	std::cout << "   r1 < r2 " << std::endl;
-
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: r1 < r2" <<endmsg;
+      }
 
       line_phi	=	Alpha0 + Alpha2;
 
       Amg::Vector3D  pos3( x1 - r1*std::sin(line_phi), y1 + r1*std::cos(line_phi), 0. );
       Amg::Vector3D dir3( std::cos(line_phi),std::sin(line_phi), 0. );
 
-      if( m_printLevel >= 5 )
-	std::cout << " line pos " << pos3 << " dir " << dir3 << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos3 << " dir " << dir3<<endmsg;
+      }
 
       list_of_lines.push_back( std::make_pair(pos3, dir3) );
 
@@ -130,22 +143,28 @@ namespace MuonCalib {
       Amg::Vector3D  pos4( x1 + r1*std::sin(line_phi), y1 - r1*std::cos(line_phi), 0. );
       Amg::Vector3D dir4( std::cos(line_phi),std::sin(line_phi), 0. );
 
-      if( m_printLevel >= 5 )
-	std::cout << " line pos " << pos4 << " dir " << dir4 << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos4 << " dir " << dir4<<endmsg;
+      }
 
       list_of_lines.push_back( std::make_pair(pos4, dir4) );
 
     } else {
-      if( m_printLevel >= 5 )
-	std::cout << "   r1 > r2 " << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: r1 > r2" <<endmsg;
+      }
 
       line_phi	=	Alpha0 + Alpha2;
 
       Amg::Vector3D  pos3( x1 + r1*std::sin(line_phi), y1 - r1*std::cos(line_phi), 0. );
       Amg::Vector3D dir3( std::cos(line_phi),std::sin(line_phi), 0. );
 
-      if( m_printLevel >= 5 )
-	std::cout << " line pos " << pos3 << " dir " << dir3 << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos3 << " dir " << dir3<<endmsg;
+      }
 
       list_of_lines.push_back( std::make_pair(pos3, dir3) );
 
@@ -154,8 +173,10 @@ namespace MuonCalib {
       Amg::Vector3D  pos4( x1 - r1*std::sin(line_phi), y1 + r1*std::cos(line_phi), 0. );
       Amg::Vector3D dir4( std::cos(line_phi),std::sin(line_phi), 0. );
 
-      if( m_printLevel >= 5 )
-	std::cout << " line pos " << pos4 << " dir " << dir4 << std::endl;
+      if( m_printLevel >= 1 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"LocalSegmentResolver::getLines: line pos " << pos4 << " dir " << dir4<<endmsg;
+      }
 
       list_of_lines.push_back( std::make_pair(pos4, dir4) );
     }
@@ -188,10 +209,10 @@ namespace MuonCalib {
       // rotate position on track into track frame
       Amg::Vector3D avePosTrk = rotationAroundZ*lit->first;
     
-      if( m_printLevel >= 5 ){
-	Amg::Vector3D lTrkDir = rotationAroundZ*lit->second;
-	std::cout << "   angle " << alpha*57.32 << " trk dir in trk frame " << lTrkDir 
-		  << " pos " << avePosTrk << std::endl;
+      if( m_printLevel >= 1 ) {
+        Amg::Vector3D lTrkDir = rotationAroundZ*lit->second;
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::VERBOSE<<"   angle " << alpha*57.32 << " trk dir in trk frame " << lTrkDir << " pos " << avePosTrk<<endmsg;
       }
       // loop over local hits
       LocalSegmentResolver::HitVec::const_iterator it = hits.begin();
@@ -208,27 +229,32 @@ namespace MuonCalib {
 	// calculate residual and pull
 	double res  = r - std::abs( sposAve.y() );
 
-	if( m_printLevel >= 5 )
-	  std::cout << " r " << r << " r_trk " << std::abs( sposAve.y() ) << " residual " << res << std::endl;
+	if( m_printLevel >= 1 ) {
+    MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+    log<<MSG::VERBOSE<<" r " << r << " r_trk " << std::abs( sposAve.y() ) << " residual " << res<<endmsg;
+  }
       
 	ressum += res*res;
       }  
 
-      if( m_printLevel >= 3 )
-	std::cout << "     line " << lit-localTracks.begin() << " residual sum " << ressum << std::endl;
+      if( m_printLevel >= 3 ) {
+        MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+        log<<MSG::INFO<<"     line " << lit-localTracks.begin() << " residual sum " << ressum<<endmsg;
+      }
       if( ressum < ressummin ) {
 	ressummin = ressum;
 	resnum    = lit-localTracks.begin();
       }
     }
 
-    if( m_printLevel >= 3 ){
-      std::cout << "        Done selected line: ressum " <<  ressummin << " ## " << resnum << std::endl;
-      std::cout << "        Position " << localTracks[resnum].first 
-		<< "   direction " << localTracks[resnum].second << std::endl;
+    if( m_printLevel >= 3 ) {
+      MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+      log<<MSG::INFO<<"        Done selected line: ressum " <<  ressummin << " ## " << resnum<<endmsg;
+      log<<MSG::INFO<<"        Position " << localTracks[resnum].first << "   direction " << localTracks[resnum].second<<endmsg;
     }
     if( resnum >= localTracks.size() ) {
-      std::cout << " ERROR wrong line index " << std::endl;
+      MsgStream log(Athena::getMessageSvc(),"LocalSegmentResolver");
+      log<<MSG::WARNING<<"wrong line index"<<endmsg;
       return -1;
     }
     
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/MTStraightLine.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/MTStraightLine.cxx
index 744343591507b0eefee3b261d2bcd510cb690343..ce579390eba2832f74b4c8c5baf4fbde72247542 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/MTStraightLine.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/MTStraightLine.cxx
@@ -3,6 +3,9 @@
 */
 
 #include "MdtCalibFitters/MTStraightLine.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
 #include "cmath"
 #include <iostream>
 
@@ -156,8 +159,8 @@ double MTStraightLine::a_x1_error(void) const {
 double MTStraightLine::b_x1(void) const {
 
 	if (m_direction.z() == 0.0) {
-		std::cerr << "Class MTStraightLine, method b_x1: WARNING!\n"
-			  << "b_x1 not uniquely defined." << std::endl;
+		MsgStream log(Athena::getMessageSvc(),"MTStraightLine");
+        log<<MSG::WARNING<<"Class MTStraightLine, method b_x1: b_x1 not uniquely defined."<<endmsg;
 		return m_position.x();
 	}
 	return (m_position.x()-m_position.z()*a_x1());
@@ -219,8 +222,8 @@ double MTStraightLine::a_x2_error(void) const {
 double MTStraightLine::b_x2(void) const {
 
 	if (m_direction.z() == 0.0) {
-		std::cerr << "Class MTStraightLine, method b_x2: WARNING!\n"
-			  << "b_x2 not uniquely defined." << std::endl;
+		MsgStream log(Athena::getMessageSvc(),"MTStraightLine");
+        log<<MSG::WARNING<<"Class MTStraightLine, method b_x2: b_x2 not uniquely defined."<<endmsg;
 		return m_position.x();
 	}
 	return (m_position.y()-m_position.z()*a_x2());
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/QuasianalyticLineReconstruction.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/QuasianalyticLineReconstruction.cxx
index 1bf19fcf28c94a0831e056029743131de55e5216..ab6263e052121f2bfce8568db2d053ceda2bcbea 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/QuasianalyticLineReconstruction.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/src/QuasianalyticLineReconstruction.cxx
@@ -683,11 +683,11 @@ bool QuasianalyticLineReconstruction::fit(MuonCalibSegment & r_segment,
 		}
 
    // copy the hit information into local vectors //
-		selected_hits.push_back(hit);//[counter2] = hit;
-		selected_hits_index.push_back(k);//[counter2] = k;
-		w.push_back(Amg::Vector3D(0.0, (hit->localPosition()).y(), (hit->localPosition()).z()));//[counter2] = Amg::Vector3D(0.0, (hit->localPosition()).y(), (hit->localPosition()).z());
-		r.push_back(std::abs(hit->driftRadius()));//[counter2] = fabs(hit->driftRadius());
-		sigma2.push_back(hit->sigma2DriftRadius());//[counter2] = hit->sigma2DriftRadius();
+		selected_hits.push_back(hit);
+		selected_hits_index.push_back(k);
+		w.push_back(Amg::Vector3D(0.0, (hit->localPosition()).y(), (hit->localPosition()).z()));
+		r.push_back(std::abs(hit->driftRadius()));
+		sigma2.push_back(hit->sigma2DriftRadius());
    // if the spatial resolution has not been set, set it to 0.1 CLHEP::mm //
 		if (sigma2[counter2] == 0) {
 			sigma2[counter2] = std::pow(0.1*CLHEP::mm, 2);
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationRegionSvc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationRegionSvc.h
index f300a74aa5c1897f4835afcefea79291fefd8cdc..7400f0fc19eab070221926fad46718929fa45fe1 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationRegionSvc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationRegionSvc.h
@@ -35,7 +35,7 @@ public:
   MdtCalibrationRegionSvc(const std::string &name,ISvcLocator *sl);
 
   /** destructor */
-  virtual ~MdtCalibrationRegionSvc();
+  virtual ~MdtCalibrationRegionSvc()=default;
 
   /** IInterface implementation  */
   static const InterfaceID &interfaceID() {
@@ -49,9 +49,6 @@ public:
   /** initialization */
   virtual StatusCode initialize(void);
 
-  /** finalization */
-  virtual StatusCode finalize(void);  
-
   // Currently 3 types of mappings are defined: "OneRt", "OnePerChamber", and "OnePerMultilayer" 
   // and this method can be used to switch between one and the other.  
   virtual void remapRtRegions(std::string mapName);
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationRegionSvc.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationRegionSvc.cxx
index 74b3c053625f06d630b2db57fbe7f98c4feb1f2c..179197ec36cdfc0b9d622bf4ad5b41da3aa7ef24 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationRegionSvc.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationRegionSvc.cxx
@@ -17,9 +17,6 @@ MdtCalibrationRegionSvc::MdtCalibrationRegionSvc(const std::string &name,ISvcLoc
   : AthService(name,sl), m_mdtIdHelper(0), m_regionType(ONERT), m_numberOfRegions(1) {
 }
 
-MdtCalibrationRegionSvc::~MdtCalibrationRegionSvc() {
-}
-
 // queryInterface 
 StatusCode MdtCalibrationRegionSvc::queryInterface(const InterfaceID &riid, void **ppvIF) { 
   if( interfaceID().versionMatch(riid) ) {
@@ -32,31 +29,20 @@ StatusCode MdtCalibrationRegionSvc::queryInterface(const InterfaceID &riid, void
 } 
 
 StatusCode MdtCalibrationRegionSvc::initialize() { 
-  if( AthService::finalize().isFailure() ) return StatusCode::FAILURE;
+  ATH_CHECK(AthService::initialize());
 
   // initialize the MdtIdHelper
   ServiceHandle<StoreGateSvc> detStore("StoreGateSvc/DetectorStore", name());
-  if (detStore.retrieve().isFailure())   {
-    ATH_MSG_ERROR( "Can't locate the DetectorStore" ); 
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(detStore.retrieve());
 
-  StatusCode sc = detStore->retrieve(m_mdtIdHelper, "MDTIDHELPER" );
-  if ( sc.isFailure()) {
-    ATH_MSG_ERROR( "Can't retrieve MdtIdHelper" );
-    return sc;
-  }
+  ATH_CHECK(detStore->retrieve(m_mdtIdHelper, "MDTIDHELPER"));
   
   // Initialize RT and correction function regions
   remapRtRegions("OneRt");
   
-  return sc;
+  return StatusCode::SUCCESS;
 }  //end MdtCalibrationRegionSvc::initialize
 
-StatusCode MdtCalibrationRegionSvc::finalize() { 
-  return AthService::finalize();
-}
-
 void MdtCalibrationRegionSvc::remapRtRegions(std::string mapName) {
   m_regionHash.resize(0);
     
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx
index 7a61ab1dd88c5db21bebeb34644b9f891835f5e8..6071a6630d0adf2ccf09cfaac5fe413aceb285fb 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/src/MdtCalibrationTool.cxx
@@ -2,8 +2,9 @@
   Copyright (C) 2020 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "MdtCalibSvc/MdtCalibrationTool.h"
+
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
-#include "MdtCalibSvc/MdtCalibrationTool.h" // there must be an include issue: if you put this before the MdtReadoutElement, compilation will fail
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MdtCalibSvc/MdtCalibrationDbTool.h"
 #include "MdtCalibSvc/MdtCalibrationSvcInput.h"
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/T0CalibrationClassic.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/T0CalibrationClassic.h
index 3a09c3881c6da2975be0af39ae46cefc83cef041..da5d0a864d792d4035391793d5efec31d54a7608 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/T0CalibrationClassic.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/T0CalibrationClassic.h
@@ -1,23 +1,18 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//   T0CalibrationClassic.h
-//   Header file for class T0CalibrationClassic
-///////////////////////////////////////////////////////////////////
-// (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// 
-///////////////////////////////////////////////////////////////////
-
 #ifndef T0CALIBRATIONCLASSIC_H
 #define T0CALIBRATIONCLASSIC_H
-#include <iostream>
-#include <vector>
 
 #include "MdtCalibInterfaces/IMdtCalibration.h"
 #include "MdtCalibData/MdtTubeFullInfoContainer.h"
 #include "MdtCalibData/MdtTubeFitContainer.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
+#include <iostream>
+#include <vector>
 
 class TH1;
 class TH2;
@@ -77,15 +72,16 @@ namespace MuonCalib {
     int printLevel() const {return m_printLevel;};
   /** a method to dump all the settings */
     void print() const {
-      std::cout <<"T0ClassicSettings: "<<std::endl 
-		<<"booking of Adc histos: min max bins " <<minAdc()<<" "<<maxAdc()<<" "<<binAdc()<<std::endl
-		<<"booking of Time histos: min max bins " <<minTime()<<" "<<maxTime()<<" "<<binTime()<<std::endl
-		<<"fitting of Time histos: active minentries paramflag chi2cut nparams" 
-		<<fitTime()<<" "<<entries()<<" "<<initParamFlag()<<" "<<chi2max()<<" "<<numParams()<<std::endl;
-      std::cout<<"Parameters: ";
-      for(int i=0;i<numParams();i++)std::cout<<m_params[i]<<" ";
-      std::cout<<std::endl;
-    };   
+      MsgStream log(Athena::getMessageSvc(),"T0ClassicSettings");
+      log<<MSG::INFO<<"T0ClassicSettings: "<<endmsg;
+      log<<MSG::INFO<<"booking of Adc histos: min max bins " <<minAdc()<<" "<<maxAdc()<<" "<<binAdc()<<endmsg;
+      log<<MSG::INFO<<"booking of Time histos: min max bins " <<minTime()<<" "<<maxTime()<<" "<<binTime()<<endmsg;
+      log<<MSG::INFO<<"fitting of Time histos: active minentries paramflag chi2cut nparams"<<fitTime()<<" "<<entries()<<" "<<initParamFlag()<<" "<<chi2max()<<" "<<numParams()<<endmsg;
+      log<<MSG::INFO<<"Parameters: "<<endmsg;
+      for(int i=0;i<numParams();i++) {
+        log<<MSG::INFO<<m_params[i]<<endmsg;
+      }
+    };
   
   private:
   /** Private settings */
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/VariableBinwidthHistogramBin.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/VariableBinwidthHistogramBin.h
index b3e6d1957c7f1d017797185d244aba04d4cc3489..fee1471be1ad43d07c13afffe2060c90b2155b78 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/VariableBinwidthHistogramBin.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/MdtCalibT0/VariableBinwidthHistogramBin.h
@@ -1,23 +1,14 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//   VariableBinwidthHistogramBin.h
-//   Header file for class VariableBinwidthHistogram
-///////////////////////////////////////////////////////////////////
-// (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// 
-///////////////////////////////////////////////////////////////////
-
-
 #ifndef VARIABLEBINWIDTHHISTOGRAMBIN_H
 #define VARIABLEBINWIDTHHISTOGRAMBIN_H
 
-// c - c++
 #include <cstdlib>
 #include <iostream>
 #include <vector>
+#include <TString.h> // for Form
 
 namespace MuonCalib {
 
@@ -82,11 +73,9 @@ class VariableBinwidthHistogramBin {
 	void MoveRight(double new_right)
 		{
 		double left=Left();
-		if(new_right< left)
-			{
-			std::cerr<<"new right is too small!"<<std::endl;
-			exit(1);
-			}
+		if(new_right< left) {
+			throw std::runtime_error(Form("File: %s, Line: %d\nVariableBinwidthHistogramBin::MoveRight() - new right is too small!", __FILE__, __LINE__));
+		}
 		m_width = new_right - left;
 		m_center = 0.5 * (left + new_right);
 		}
@@ -98,11 +87,9 @@ class VariableBinwidthHistogramBin {
 	void MoveLeft(double new_left)
 		{
 		double right=Right();
-		if(new_left>right)
-			{
-			std::cerr<<"new right is too small!"<<std::endl;
-			exit(1);
-			}
+		if(new_left>right) {
+			throw std::runtime_error(Form("File: %s, Line: %d\nVariableBinwidthHistogramBin::MoveRight() - new left is too small!", __FILE__, __LINE__));
+		}
 		m_width = right - new_left;
 		m_center = 0.5 * (new_left + right);
 		}
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/MTT0PatternRecognition.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/MTT0PatternRecognition.cxx
index 219e044e8aa44c0477c47da0e8dc918a93043c50..0e08058efc9277e76775109e70a65558bb39a357 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/MTT0PatternRecognition.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/MTT0PatternRecognition.cxx
@@ -55,7 +55,6 @@ bool MTT0PatternRecognition::estimate_background(TH1F* hist, double scale_min)
 	double back_squared=0.0;
 	double n_bins=0.0;
 	double referece_chi2=0.0;
-	std::cout<<"UUUuuuUUU ";
 	for(int i=min; i<max; i++)
 		{
 		n_bins++;
@@ -65,17 +64,14 @@ bool MTT0PatternRecognition::estimate_background(TH1F* hist, double scale_min)
 			{
 			double bac=m_background/n_bins;
 			referece_chi2 = 2 * (back_squared/n_bins - bac*bac);
-			std::cout<<referece_chi2<<" ";
 			}
 		if (n_bins>m_settings->MinBackgroundBins())
 			{
 			double bac=m_background/n_bins;
 			double chi2=2 * (back_squared/n_bins - bac*bac);
-			std::cout<<chi2<<" ";
 			if (chi2>5*referece_chi2) break;
 			}
 		}
-	std::cout<<std::endl;
 	m_background/=n_bins;
 //store lower edge of fit range
 	m_fit_min=hist->GetBinCenter(min);
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/T0CalibrationMT.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/T0CalibrationMT.cxx
index d7b2b677bbf93bfd9ffb1c72066f8c23c3581aa4..5a83ae90a7bb8325b0ed3757da138664a34d04a8 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/T0CalibrationMT.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/src/T0CalibrationMT.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 "MdtCalibT0/T0CalibrationMT.h" 
@@ -8,14 +8,14 @@
 #include "MuonCalibEventBase/MuonCalibSegment.h"
 #include "MuonCalibIdentifier/MuonFixedId.h"
 #include "MdtCalibT0/HistogramId.h"
-
 #include "MdtCalibData/MdtTubeFitContainer.h"
 #include "MdtCalibT0/T0MTSettings.h"
 #include "MdtCalibT0/T0MTHistos.h"
 #include "MdtCalibT0/ADCMTHistos.h"
-
 #include "MuonCalibStl/ToString.h"
 #include "MuonCalibStl/DeleteObject.h"
+#include "AthenaKernel/getMessageSvc.h"
+#include "GaudiKernel/MsgStream.h"
 
 #include <algorithm>
 #include <iostream>
@@ -30,8 +30,6 @@
 
 namespace MuonCalib {
 
-
-
 T0CalibrationMT::T0CalibrationMT( std::string name, const T0MTSettings* settings , const std::vector<int> &sort_by, const std::vector<int> &adc_sort_by)  :
   IMdtCalibration(name), m_settings(settings), m_converged(false), m_name(name),m_currentItnum(0), m_sort_by(sort_by), m_adc_sort_by(adc_sort_by), m_delete_settings(false)
 {
@@ -83,13 +81,9 @@ bool  T0CalibrationMT::handleSegment( MuonCalibSegment& seg )
       double oldT0=0;
       if(stc)
        oldT0 = stc->t0;
-      else
-       {
-       std::cout<<"no Single Tube Calib info found for ML="<<nML<<" L="<<nL<<" T="<<nT<<std::endl; 
-//       std::cout<<"container size "<<m_result->size()<<std::endl;
-//      std::cout<<"container nML "<<m_result->numMultilayers()<<std::endl;
-//       std::cout<<"container nL "<<m_result->numLayers()<<std::endl;
-//       std::cout<<"container nT "<<m_result->numTubes()<<std::endl;
+      else {
+      	MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
+		log<<MSG::WARNING<<"no Single Tube Calib info found for ML="<<nML<<" L="<<nL<<" T="<<nT<<endmsg;
        }
 
       // get histos
@@ -125,8 +119,7 @@ bool  T0CalibrationMT::analyse()
 		}
 			
 			
-	for(std::map<int, MdtTubeFitContainer::SingleTubeFit>::iterator it=full.begin(); it!=full.end(); it++)
-		{
+	for(std::map<int, MdtTubeFitContainer::SingleTubeFit>::iterator it=full.begin(); it!=full.end(); it++) {
 		if(it->first == 0) continue;
 		MuonFixedId fId(it->first);
 		NtupleStationId sid(fId);
@@ -138,14 +131,18 @@ bool  T0CalibrationMT::analyse()
 		int nL=fId.mdtTubeLayer();
 		int nT=fId.mdtTube();
 		bool setInfo=m_result[sid]->setCalib(nML-1,nL-1,nT-1,stc);
-		if(!setInfo) 
-			std::cout<<"T0CalibrationMT::PROBLEM! could not set SingleTubeCalib info "<<std::endl;
+		if(!setInfo) {
+			MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
+			log<<MSG::WARNING<<"T0CalibrationMT::PROBLEM! could not set SingleTubeCalib info"<<endmsg;
+		}
 		fi.n_hits=m_nhits_per_tube[fId.getIdInt()];
 		fi.n_hits_above_adc_cut=m_nhits_per_tube[fId.getIdInt()];
 		setInfo=m_result[sid]->setFit(nML-1,nL-1,nT-1,fi);
-		if(!setInfo) 
-			std::cout<<"T0CalibrationMT::PROBLEM! could not set SingleTubeFit info "<<std::endl;		
+		if(!setInfo) {
+			MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
+			log<<MSG::WARNING<<"T0CalibrationMT::PROBLEM! could not set SingleTubeFit info"<<endmsg;
 		}
+	}
 	
 	m_currentItnum++;
 	p_file->Write();
@@ -154,8 +151,10 @@ bool  T0CalibrationMT::analyse()
  
 bool  T0CalibrationMT::analyse_tdc(const int & nr, std::map<int, MdtTubeFitContainer::SingleTubeFit> & full, std::map<int, MdtTubeFitContainer::SingleTubeCalib> & st, std::map<int, std::string> & fit_by_map)
 	{
-	if(m_settings->VerboseLevel() > 1)
-		std::cout << "T0CalibrationMT::analyse iteration "<<m_currentItnum << std::endl;
+	if(m_settings->VerboseLevel() > 1) {
+		MsgStream log(Athena::getMessageSvc(), "T0CalibrationMT");
+		log<<MSG::VERBOSE<<"T0CalibrationMT::analyse iteration "<<m_currentItnum<<endmsg;
+	}
 	std::string fit_by("UNKNOWN");
 	switch(m_sort_by[nr])
 		{
@@ -225,7 +224,6 @@ void  T0CalibrationMT::doTimeFit(T0MTHistos * T0h, const std::set<MuonFixedId> &
 			double rel_t0(0.0);
 			if(m_settings->T0Settings()->CorrectRelT0s())
 				rel_t0 = m_rel_tube_t0s[stId].GetRelativeOffset(*it, theGroup);
-			std::cout<<"HHhhHH "<<fit_by<<" "<<rel_t0<<std::endl;
 			MdtTubeFitContainer::SingleTubeFit &fi(fim[it->getIdInt()]);
 			MdtTubeFitContainer::SingleTubeCalib &stc(stcm[it->getIdInt()]);
 	//store parameters	
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/MdtCalibTools/MdtCalibTool.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/MdtCalibTools/MdtCalibTool.h
index e74d598df52ae0fba12f5d2bd243d863bc9de837..1ab21606fcd126cdba799a28c10e567c1e726465 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/MdtCalibTools/MdtCalibTool.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/MdtCalibTools/MdtCalibTool.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
 */
 
 ///////////////////////////////////////////////////////////////////
@@ -66,14 +66,11 @@ namespace MuonCalib {
   MdtCalibTool(const std::string&,const std::string&,const IInterface*);
 
   /**Virtual destructor*/
-  virtual ~MdtCalibTool(){};
+  virtual ~MdtCalibTool()=default;
 
   /** AlgTool initailize method.*/
   StatusCode initialize();
 
-  /** AlgTool finalize method */
-  StatusCode finalize();  
-
   /** Interface method: handle MuonCalibPatternCollection */
   //  virtual bool handle( const MuonCalibPatternCollection* patterns );
 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/MdtCalibTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/MdtCalibTool.cxx
index 55dcb5ecae75464863b011ff261d5cb32fb1970c..b652e28f32ebbf86b75856db37b02420509f2e2a 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/MdtCalibTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/MdtCalibTool.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 "MdtCalibTools/MdtCalibTool.h"
@@ -40,45 +40,15 @@ namespace MuonCalib {
 
   StatusCode MdtCalibTool::initialize()
   {
-    MsgStream log(msgSvc(), name());
-
-    StatusCode sc = m_mdtCalibTool.retrieve();
-    if (sc.isFailure()) {
-      log << MSG::FATAL << "Could not find tool " << m_mdtCalibTool << endmsg;
-      return sc;
-    } else {
-      log << MSG::INFO << "Retrieved" << m_mdtCalibTool << endmsg;
-    }
-  
-    sc = m_segmentSelectorTool.retrieve();
-    if (sc.isFailure()) {
-      log << MSG::FATAL << "Could not find tool " << m_segmentSelectorTool << endmsg;
-      return sc;
-    } else {
-      log << MSG::INFO << "Retrieved" << m_segmentSelectorTool << endmsg;
-    }
+    ATH_CHECK(AthAlgTool::initialize());
+    ATH_CHECK(m_mdtCalibTool.retrieve());
+    ATH_MSG_DEBUG("Retrieved" << m_mdtCalibTool);
+    ATH_CHECK(m_segmentSelectorTool.retrieve());
+    ATH_MSG_DEBUG("Retrieved" << m_segmentSelectorTool);
     m_segmentSelector = m_segmentSelectorTool->getImp();
-
-    sc = m_regionSelector.retrieve();
-    if (sc.isFailure()) {
-      log << MSG::FATAL << "Could not find tool " << m_regionSelector << endmsg;
-      return sc;
-    } else {
-      log << MSG::INFO << "Retrieved" << m_regionSelector << endmsg;
-    }
-
+    ATH_CHECK(m_regionSelector.retrieve());
+    ATH_MSG_DEBUG("Retrieved" << m_regionSelector);
     ATH_CHECK(m_idHelperSvc.retrieve());
-
-    log << MSG::INFO << "Initialization ended     " << endmsg;
-    return StatusCode::SUCCESS;
-  
-  }
-
-
-  StatusCode MdtCalibTool::finalize()
-  {
-    MsgStream log(msgSvc(), name());
-    log << MSG::INFO << "finalize " << endmsg;
     return StatusCode::SUCCESS;
   }
 
@@ -88,8 +58,7 @@ namespace MuonCalib {
     std::vector<MuonCalibSegment *> selected_segment;
     bool segment_found;
     bool segment_rejected;
-    MsgStream log(msgSvc(), name());
-    log << MSG::DEBUG << "handleEvent(events) with patSize " << event->numberOfPatterns() << endmsg;
+    ATH_MSG_DEBUG("handleEvent(events) with patSize " << event->numberOfPatterns());
 
     // loop over patterns
     MuonCalibEvent::MCPVecCit pat_it     = event->patternBegin();
@@ -97,15 +66,15 @@ namespace MuonCalib {
     for( ;pat_it!=pat_it_end; ++pat_it ){
       // loop over segments in pattern
 
-      log << MSG::DEBUG << "New pattern with segments " << (*pat_it)->muonSegments() << endmsg;
+      ATH_MSG_DEBUG("New pattern with segments " << (*pat_it)->muonSegments());
 
       MuonCalibPattern::MuonSegCit seg_it     = (*pat_it)->muonSegBegin();
       MuonCalibPattern::MuonSegCit seg_it_end = (*pat_it)->muonSegEnd();
       for( ;seg_it!=seg_it_end;++seg_it ){
         MuonCalibSegment* seg = *seg_it;
 	// protect against null pointer
-	if ( seg == 0 ) {
-	  log << MSG::WARNING  << "Got Segment NULL pointer" << endmsg;
+	if (!seg) {
+	  ATH_MSG_WARNING("Got Segment nullptr");
 	  continue;
 	}
 	// Only process segments with MDT hits
@@ -114,7 +83,7 @@ namespace MuonCalib {
 	}
 
 // if no internal selection is requested, pass the segment to the algorithm //
-        if (m_SelectorSwitch==0 && seg != 0) {
+        if (m_SelectorSwitch==0 && seg) {
 		handleMuonSegment( seg );
 		continue;
 	}
@@ -178,16 +147,13 @@ namespace MuonCalib {
 
   bool MdtCalibTool::analyse()
   {
-    MsgStream log(msgSvc(), name());
-
     // loop over all regions
-    log << MSG::INFO << "Performing loop over regions: " << m_segmentsPerRegion.size() << endmsg;
+    ATH_MSG_INFO("Performing loop over regions: " << m_segmentsPerRegion.size());
 
     RegionEventMap::iterator it     = m_segmentsPerRegion.begin();
     RegionEventMap::iterator it_end = m_segmentsPerRegion.end();
     for( ; it!=it_end; ++it ){
-      log << MSG::DEBUG << "Performing analysis for region " 
-	  << endmsg;
+      ATH_MSG_DEBUG("Performing analysis for region ");
  
       // create new calibration instance
       IMdtCalibration* calibImp = m_mdtCalibTool->getImp( it->first );
@@ -205,19 +171,16 @@ namespace MuonCalib {
       m_mdtCalibTool->writeToDb( result, it->first );
     }
 
-    log << MSG::INFO << "End of calibration started     " << endmsg;
+    ATH_MSG_INFO("End of calibration started     ");
     return true;
   }
 
   void MdtCalibTool::handleMuonSegment( const MuonCalibSegment* seg )
-  {
-    MsgStream log(msgSvc(), name());
- 
+  { 
     // subdivide segment into regions and get key 
     IRegionSelectorTool::RegionVec rvec = m_regionSelector->splitIntoRegions( seg );  
 
-    log << MSG::VERBOSE << "RegionSelector produced " << rvec.size() 
-	<< " subregions for segment " << endmsg;
+    ATH_MSG_VERBOSE("RegionSelector produced " << rvec.size() << " subregions for segment ");
   
     // loop over different region 
     IRegionSelectorTool::RegionVec::iterator it = rvec.begin();
@@ -230,7 +193,7 @@ namespace MuonCalib {
       IRegionSelectorTool::RegionKey key = it->second;
 
       if( !m_segmentSelector->select(*sseg) ){
-	log << MSG::VERBOSE << " ssegment rejected by selector " << endmsg;
+        ATH_MSG_VERBOSE(" ssegment rejected by selector ");
 	// return; this prevents the second ML from being accepted!
         continue;
       }
@@ -238,7 +201,7 @@ namespace MuonCalib {
       // check if region should be calibrated
       if( m_regionSelector->useRegion( key ) ){
   
-	log << MSG::VERBOSE << "handleMuonSegment with region key " << key << endmsg;
+	ATH_MSG_VERBOSE("handleMuonSegment with region key " << key);
 	
 	// pointer to current event loop
 	MdtCalibEventLoop* loop = getEventLoopForRegion( key );
@@ -246,7 +209,7 @@ namespace MuonCalib {
 	// fill current ssegment into event loop
 	loop->handleSegment( sseg );
       }else{
-	log << MSG::VERBOSE << "MuonSegment not selected by RegionSelector " << key << std::endl;
+	ATH_MSG_VERBOSE("MuonSegment not selected by RegionSelector " << key);
       }
     }
   }
@@ -254,25 +217,20 @@ namespace MuonCalib {
 
   IRegionSelectorTool::RegionKey MdtCalibTool::keyFromIdentifier( const IRegionSelectorTool::id_type& id ) const
   {
-    MsgStream log(msgSvc(), name());
-    log << MSG::VERBOSE << " keyFromIdentifier " << endmsg;
-
+    ATH_MSG_VERBOSE(" keyFromIdentifier ");
     return m_regionSelector->getRegionKey(id);
   }
 
 
   MdtCalibEventLoop* MdtCalibTool::getEventLoopForRegion( const IRegionSelectorTool::RegionKey& key )
-  {
-    MsgStream log(msgSvc(), name());
-  
-    MdtCalibEventLoop* loop = 0;
-
+  {  
+    MdtCalibEventLoop* loop = nullptr;
     // look up key in map
     RegionEventMap::iterator sit = m_segmentsPerRegion.find(key);
       
     // if not found create new entry in map
     if( sit == m_segmentsPerRegion.end() ){
-      log << MSG::VERBOSE << "created new entry in region map for key " << key << std::endl;
+      ATH_MSG_VERBOSE("created new entry in region map for key " << key);
       
       // create new event loop
       loop = new MdtCalibEventLoop( key );
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/QuasianalyticLineReconstructionTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/QuasianalyticLineReconstructionTool.cxx
index 969e911ffba52c1d21e15022cfb2729729e465d3..84af831690cdfbe1c54531b0218b276700d9ca38 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/QuasianalyticLineReconstructionTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/src/QuasianalyticLineReconstructionTool.cxx
@@ -42,9 +42,8 @@ QuasianalyticLineReconstructionTool::QuasianalyticLineReconstructionTool(
 //:::::::::::::::::::::::
 
 StatusCode QuasianalyticLineReconstructionTool::initialize() {
-
-	MsgStream log(msgSvc(), name());
-	log << MSG::INFO << "initialize     " << endmsg;
+    ATH_CHECK(AthAlgTool::initialize());
+	ATH_MSG_INFO("initialize     ");
 
 // create an instance of QuasianalyticLineReconstruction //
 	m_implementation = new QuasianalyticLineReconstruction(m_road_width);
@@ -68,12 +67,8 @@ StatusCode QuasianalyticLineReconstructionTool::initialize() {
 //:::::::::::::::::::::
 
 StatusCode QuasianalyticLineReconstructionTool::finalize() {
-
-	MsgStream log(msgSvc(), name());
-	log << MSG::INFO << "finalize     " << endmsg;
-
+	ATH_MSG_INFO("finalize     ");
 	delete m_implementation;
-
+	ATH_CHECK(AthAlgTool::finalize());
 	return StatusCode::SUCCESS;
-
 }
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/RtData_t_r_reso.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/RtData_t_r_reso.h
index 16c23b9b0d30e05d51989d1fe5dafa0ee9074c8f..db61b0b4813eca6b8e1b2047264ec821783e1e00 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/RtData_t_r_reso.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/RtData_t_r_reso.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 MUONCALIB_RTDATA_T_R_RESO_H
@@ -33,16 +33,10 @@ class RtData_t_r_reso {
 
   /** returns falls if the current time is smaller then the previous one */
   bool addEntry( double t, double r , double reso ){
-    std::cout <<" adding entry to rt : t="<<t<<" r="<<r<<" reso="<<reso<<std::endl;
-
-    //if( !m_timeVec.empty() && t < m_timeVec.back() ) return false;
-
     m_timeVec.push_back(t);
     m_radiusVec.push_back(r);
     m_resoVec.push_back(reso);
-    
     m_npars = m_timeVec.size();
-
     return true;
   }
 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/TubeDataFromFile.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/TubeDataFromFile.h
index 3fea61cfa643b0cc12a9d62542bf6f49adb84630..6a2def6e772d3465cfe6ab51bd52ae776d79f16c 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/TubeDataFromFile.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/TubeDataFromFile.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 MUONCALIB_TUBEDATAFROMFILE_H
@@ -7,6 +7,8 @@
 
 #include "MdtCalibData/MdtTubeFitContainer.h"
 #include "MuonCalibIdentifier/MuonFixedId.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
 #include <vector>
 #include <iostream>
@@ -24,7 +26,7 @@ namespace MuonCalib {
     typedef std::vector<MdtTubeFitContainer*>   TubeData;
   public:
     TubeDataFromFile() : m_regions(0) {}
-    ~TubeDataFromFile();
+    ~TubeDataFromFile()=default;
     
     /** return number of regions */
     unsigned int nRegions() const { return m_regions; }
@@ -32,9 +34,9 @@ namespace MuonCalib {
     /** retrieve MdtTubeFitContainer for a give regionId */
     MdtTubeFitContainer* getTubes( unsigned int regionId ) const { 
       if( regionId >= (unsigned int)m_regions ){
-	std::cout << "TubeDataFromFile::getTubes ERROR <regionId out of range> "
-		  << regionId << " size " << m_regions << std::endl;
-	return 0;
+        MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+        log<<MSG::WARNING<<"TubeDataFromFile::getTubes: <regionId out of range> "<< regionId << " size " << m_regions<<endmsg;
+        return 0;
       }
       return m_tubeData[regionId];
     }
@@ -45,13 +47,14 @@ namespace MuonCalib {
     /** TubeDataFromFile takes ownership of the MdtTubeFitContainer */
     bool addTubes( int regionId, MdtTubeFitContainer* tubes ){
       if( regionId < 0 || regionId >= (int)m_regions ){
-	std::cout << "TubeDataFromFile::addTubes ERROR <regionId out of range> "
-		  << regionId << " size " << m_regions << std::endl;
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+        log<<MSG::WARNING<<"TubeDataFromFile::addTubes: <regionId out of range> "<< regionId << " size " << m_regions<<endmsg;
+        return false;
       }
       if( m_tubeData[regionId] != 0 ){
-	std::cout << "TubeDataFromFile::addTubes ERROR <tubes already set> " << std::endl;
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+        log<<MSG::WARNING<<"TubeDataFromFile::addTubes: <tubes already set>"<<endmsg;
+        return false;
       }
 
       m_tubeData[regionId] = tubes;
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/UpdateCalibHit.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/UpdateCalibHit.h
index 7269212025280c04798b88a096c55c83db6d25e6..4c8d175ba83ff9b2aa02e964b68b693414243da7 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/UpdateCalibHit.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/UpdateCalibHit.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 MUONCALIB_UPDATECALIBHIT_H
@@ -7,6 +7,8 @@
 
 #include "MdtCalibInterfaces/IRtRelation.h"
 #include "MuonCalibEvent/MdtCalibHit.h"
+#include "AthenaKernel/getMessageSvc.h"
+#include "GaudiKernel/MsgStream.h"
 
 #include <iostream>
 
@@ -24,12 +26,11 @@ MdtCalibHit using the pointer to the IRtRelation passed to the constructor.
   
     void operator()(MdtCalibHit* hit){
       if( m_rt ){
-	//     std::cout << "UpdateCalibHit hit " << std::endl; 
 	double t = hit->driftTime();
-	//      std::cout << " updating " << t << "  -> " << m_rt->radius(t) << "  s " << m_rt->sigmaR(t) << std::endl;
 	hit->setDriftRadius( m_rt->radius(t), m_rt->sigmaR(t) );
       }else{
-	std::cout << "UpdateCalibHit failed, invalid rt " << std::endl;
+        MsgStream log(Athena::getMessageSvc(), "UpdateCalibHit");
+        log<<MSG::WARNING<<"UpdateCalibHit failed, invalid rt"<<endmsg;
       }
     }
   private:
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/TubeDataFromFile.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/TubeDataFromFile.cxx
index 7b91d1349872f6f12c17027c28a47bf042d3438a..0f865f7efb7f00aa5fdb290cde83b700847926bb 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/TubeDataFromFile.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/TubeDataFromFile.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 "MdtCalibUtils/TubeDataFromFile.h"
@@ -8,19 +8,15 @@
 #include <string>
 #include <sstream>
 #include <stdio.h>
+#include <TString.h> // for Form
 
 namespace MuonCalib {
-  TubeDataFromFile::~TubeDataFromFile()
-  {
-    //delete the tube maps 
-//    std::for_each(m_tubeData.begin(),m_tubeData.end(),DeleteObject());
-  }
   
   std::ostream& TubeDataFromFile::write( std::ostream& os) const
   {
     if( m_regions != m_tubeData.size() ){
-      std::cout << "TubeDataFromFile::write ERROR <inconsistent count>" 
-		<< std::endl;
+      MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+      log<<MSG::WARNING<<"TubeDataFromFile::write: <inconsistent count>"<<endmsg;
     }
 
     os << "v0.0 " << m_regions <<" ";
@@ -49,7 +45,8 @@ namespace MuonCalib {
           is2.str(stnPhi);
           is2 >> phi;
         } else {
-          std::cout<<"TubeDataFromFile: can't unpack string "<<chamberName<<std::endl;
+          MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+          log<<MSG::WARNING<<"TubeDataFromFile: can't unpack string "<<chamberName<<endmsg;
         }
 
         os << datatype <<" "<<implementation<<" "<<i<< " " << nml*nl*nt << std::endl;
@@ -121,8 +118,8 @@ namespace MuonCalib {
     // write out ascii files for Calibration DB //
     //////////////////////////////////////////////
     if( m_regions != m_tubeData.size() ){
-      std::cout << "TubeDataFromFile::write_forDB ERROR <inconsistent count>" 
-              << std::endl;
+      MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+      log<<MSG::WARNING<<"TubeDataFromFile::write_forDB: <inconsistent count>"<<endmsg;
     }
 
     MuonFixedId fixId;
@@ -155,29 +152,23 @@ namespace MuonCalib {
           is2.str(stnPhi);
           is2 >> phi;
         } else {
-          std::cout<<"TubeDataFromFile: can't unpack string "<<chamberName<<std::endl;
+          MsgStream log(Athena::getMessageSvc(),"MdtTubeFitContainer");
+          log<<MSG::WARNING<<"TubeDataFromFile: can't unpack string "<<chamberName<<endmsg;
         }
 
         for (unsigned int km=0; km<nml; ++km){
           for (unsigned int kl=0; kl<nl; ++kl){
             for (unsigned int kt=0; kt<nt; ++kt){
-              const MdtTubeFitContainer::SingleTubeCalib * stc = 
-                                     m_tubeData[i]->getCalib(km,kl,kt);  
-              const MdtTubeFitContainer::SingleTubeFit * stf = 
-                                     m_tubeData[i]->getFit(km,kl,kt);  
-            //              station=stnName.c_str();
-            //              phi=phi;
-            //              eta=eta;
+              const MdtTubeFitContainer::SingleTubeCalib * stc = m_tubeData[i]->getCalib(km,kl,kt);
+              const MdtTubeFitContainer::SingleTubeFit * stf = m_tubeData[i]->getFit(km,kl,kt);
             tech=technology;
             ml=km+1;
             l=kl+1;
             t=kt+1;
 
-            if (!fixId.setTechnology(tech) || !fixId.setStationName(fixId.stationStringToFixedStationNumber(stnName)) || !fixId.setStationEta(eta) || !fixId.setStationPhi(phi) || !fixId.setMdtTube(t) || !fixId.setMdtTubeLayer(l) || !fixId.setMdtMultilayer(ml))
-	    	{
-		std::cerr<<"TubeDataFromFile::write_forDB (171): Setting identifier failed!"<<std::endl;
-		throw(1);
-		}
+            if (!fixId.setTechnology(tech) || !fixId.setStationName(fixId.stationStringToFixedStationNumber(stnName)) || !fixId.setStationEta(eta) || !fixId.setStationPhi(phi) || !fixId.setMdtTube(t) || !fixId.setMdtTubeLayer(l) || !fixId.setMdtMultilayer(ml)) {
+              throw std::runtime_error(Form("File: %s, Line: %d\nTubeDataFromFile::write_forDB() - Setting identifier failed!", __FILE__, __LINE__));
+            }
             tube_id=fixId.getIdInt();
             
             if (stc) {
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/exe/test.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/exe/test.cxx
index c35e3610e73a0159be92ea0276860ac1a6610836..0b0e7aaa6d5611a57e432fbf046039d413101345 100755
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/exe/test.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/exe/test.cxx
@@ -1,22 +1,18 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 /**
  * main program for the Validation
  */
-// #include "MdtCalibValidation/MDTT0CalibrationHandler.h"
 #include "MdtCalibValidation/MdtT0ValidationHandler.h"
 
 int main()
 {
 
 // construct the default CalibrationManager
-  // MDTT0CalibrationHandler* ValHandl = new MDTT0CalibrationHandler::MDTT0CalibrationHandler;
   MdtT0ValidationHandler* ValHandl = new MdtT0ValidationHandler::MdtT0ValidationHandler;
   ValHandl->initialize();
-  // ValHandl->TestRootDB();
-  // ValHandl->FillTreeFromRootDB();
   ValHandl->execute();
   ValHandl->finalize();
   }
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/src/FixRtEnds.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/src/FixRtEnds.cxx
index 453103923f5fa78704cd5fd7a0c91eddd7e7c728..c751aae14c3c6c294891efcb24d7300ade52f3d4 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/src/FixRtEnds.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation/src/FixRtEnds.cxx
@@ -2,24 +2,22 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//this
 #include "MdtCalibValidation/FixRtEnds.h"
-
-//MuonCalibMath
 #include "MuonCalibMath/SamplePoint.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
-//root
 #include "TGraph.h"
 #include "TF1.h"
 
 namespace MuonCalib {
 
 int FixRtEnds::FixEnds(std::vector<SamplePoint> & points) {
-  std::cout<<"FixRtEnds::FixEnds"<<std::endl;
 //check monotony
   bool fix_begin, fix_end;
   if(!checkMono(points, fix_begin, fix_end)) {
-    std::cerr<<"Monotonic check failed!"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"FixRtEnds");
+    log<<MSG::WARNING<<"Monotonic check failed!"<<endmsg;
     return FIX_FAILED;
   }
   if(fix_begin || fix_end) {
@@ -28,23 +26,23 @@ int FixRtEnds::FixEnds(std::vector<SamplePoint> & points) {
       gr->SetPoint(i, points[i].x1(), points[i].x2());
     }
     gr->Write("bevor_fix");
-    std::cout<<"Fix needed"<<std::endl;
   }
   if(!fix_begin && !fix_end) {
-    std::cout<<"Rt relation is monotonic. Ok."<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"FixRtEnds");
+    log<<MSG::DEBUG<<"Rt relation is monotonic. Ok."<<endmsg;
     return NO_FIX_NEEDED;
   }
   if(fix_begin)	{
-    std::cerr<<"Fixing start"<<std::endl;
     if(!fixBegin(points)) {
-      std::cerr<<"Fix failed!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"FixRtEnds");
+      log<<MSG::WARNING<<"Fix failed!"<<endmsg;
       return FIX_FAILED;
     }
   }
   if(fix_end) {
-    std::cerr<<"Fixing end."<<std::endl;
     if(!fixEnd(points))	{
-      std::cerr<<"Fix failed!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"FixRtEnds");
+      log<<MSG::WARNING<<"Fix failed!"<<endmsg;
       return FIX_FAILED;
     }
   }
@@ -53,13 +51,14 @@ int FixRtEnds::FixEnds(std::vector<SamplePoint> & points) {
     gr->SetPoint(i, points[i].x1(), points[i].x2());
   }
   gr->Write("after_fix");
-  std::cout<<"Fix needed"<<std::endl;
   if(!checkMono(points, fix_begin, fix_end)) {
-    std::cerr<<"Monotonic check failed!"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"FixRtEnds");
+    log<<MSG::WARNING<<"Monotonic check failed!"<<endmsg;
     return FIX_FAILED;
   }
   if(fix_begin || fix_end) {
-    std::cerr<<"Still not monotonic"<<std::endl;		
+    MsgStream log(Athena::getMessageSvc(),"FixRtEnds");
+    log<<MSG::WARNING<<"Still not monotonic"<<endmsg;
     return FIX_FAILED;
   }
   return FIX_APPLIED;
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx b/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx
index a3f133e3b8e5dc49fc2315d76cecef52984a0aeb..1d6f3aa1a05f7a2799e890b847e824bcd611511c 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx
@@ -686,7 +686,7 @@ namespace MuonCalib {
 		  double zpos_local = 	 (*deposits_it).second.zpos() ;
 		  const Amg::Vector3D locpos3d = Amg::Vector3D(0.,ypos_local, zpos_local);
 		  const Amg::Vector3D globalPos = (detEl->transform())*locpos3d;
-		  double phipos = atan2(globalPos.y(),globalPos.x());
+		  double phipos = std::atan2(globalPos.y(),globalPos.x());
 		  // use cscTime for phi, since time is no longer set for new SDO format!!
 		  cscTruth->setTime( phipos ) ;
 		  MCtruthCollection->addTruth( cscTruth );
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibRtDbOperations.h b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibRtDbOperations.h
index a808bc12056818c265e448a5d56beba66a2fcfd4..d3bbba7b6801fe6d52adbcd166406e6494762bff 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibRtDbOperations.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibRtDbOperations.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 CalibRtDbOperations_h
@@ -27,7 +27,7 @@ class CalibRtDbOperations {
  public:
 //=====================constructor - destructor=================================
   CalibRtDbOperations(CalibDbConnection & db_conn);
-  virtual ~CalibRtDbOperations();
+  virtual ~CalibRtDbOperations()=default;
 //=====================publlic member functions=================================
   //load rt do not read full info, if full_info=NULL
   bool LoadRt(const NtupleStationId & id, int head_id, bool validated, const std::string & /*site_name*/, std::vector<SamplePoint> & points, RtFullInfo * full_info);
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibT0DbOperations.h b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibT0DbOperations.h
index 32c4704026d4ed79456b8fdee72160b00e955f80..6ca9aa83919fc05ca32a39fb42a40c291091af08 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibT0DbOperations.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/CalibT0DbOperations.h
@@ -1,15 +1,13 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef CalibT0DbOperations_h
 #define CalibT0DbOperations_h
 
-//c - c++
 #include <string>
 #include <vector>
 
-
 namespace coral {
   class IQuery;
   class AttributeList;
@@ -29,7 +27,7 @@ class CalibT0DbOperations {
  public:
 //=====================constructor - destructor=================================
   CalibT0DbOperations(CalibDbConnection & db_conn);
-  virtual ~CalibT0DbOperations();
+  virtual ~CalibT0DbOperations()=default;
 //=====================publlic member functions=================================
   //load t0 for chamber
   MdtStationT0Container * LoadT0Calibration(const NtupleStationId & id, int head_id, std::string &site_name);
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/MuonCalibDefaultCalibrationSource.h b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/MuonCalibDefaultCalibrationSource.h
index 8a00b5d7581d0b9140a17acbf5f2352fb75175d7..0c712d4af34554972d01616d0059d07a17243fdc 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/MuonCalibDefaultCalibrationSource.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/MuonCalibDbOperations/MuonCalibDefaultCalibrationSource.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 MuonCalib_MuonCalibDefaultCalibrationSource
@@ -33,10 +33,6 @@ class MuonCalibDefaultCalibrationSource: public AthAlgTool, virtual public IMuon
 //===============================AlgTool interface =============================
   /** initialize */
   StatusCode initialize();
-  /** finalize */
-  inline StatusCode finalize() {
-    return StatusCode::SUCCESS;
-  }
  private:
 //===============================job options====================================
   //regions and t0 values
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibDbConnection.cxx b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibDbConnection.cxx
index ec96fc78a1b5004963513fc909daba671bfda9ad..5b102b9a1263eaa9da00d29022e34f21b6df31ba 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibDbConnection.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibDbConnection.cxx
@@ -1,15 +1,12 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 //this
 #include "MuonCalibDbOperations/CalibDbConnection.h"
 
-//coral
 #include "RelationalAccess/IRelationalService.h"
-//#include "RelationalAccess/IConnection.h"
 #include "RelationalAccess/IConnectionService.h"
-//#include "RelationalAccess/ISession.h"
 #include "RelationalAccess/ISessionProxy.h"
 #include "RelationalAccess/IRelationalDomain.h"
 #include "RelationalAccess/ITransaction.h"
@@ -21,19 +18,15 @@
 #include "RelationalAccess/IAuthenticationService.h"
 #include "RelationalAccess/IAuthenticationCredentials.h"
 #include "RelationalAccess/SchemaException.h"
-//#include "CoralBase/AttributeList.h"
-//#include "CoralBase/Attribute.h"
-//#include "CoralBase/AttributeSpecification.h"
 #include "CoralKernel/Context.h"
-
-//
-//MuonCalibStandAloneBase
 #include "MuonCalibStandAloneBase/RegionSelectorBase.h"
 #include "MuonCalibStandAloneBase/RegionSelectionSvc.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
-// c- c++
 #include <stdexcept>
 #include "iostream"
+#include <TString.h> // for Form
 
 namespace MuonCalib{
 
@@ -41,7 +34,7 @@ namespace MuonCalib{
 // Constructor //
 /////////////////
 
-CalibDbConnection::CalibDbConnection(const std::string& ConnectionString, const std::string& WorkingSchema): m_connection_string(ConnectionString), m_working_schema(WorkingSchema), m_comp_loaded(false), m_context( &coral::Context::instance() ), m_session(NULL), m_transaction(false) {
+CalibDbConnection::CalibDbConnection(const std::string& ConnectionString, const std::string& WorkingSchema): m_connection_string(ConnectionString), m_working_schema(WorkingSchema), m_comp_loaded(false), m_context( &coral::Context::instance() ), m_session(nullptr), m_transaction(false) {
   coral::IHandle<coral::IConnectionService> lookSvcH = m_context->query<coral::IConnectionService>();
   if (!lookSvcH.isValid()) {
     m_context->loadComponent( "CORAL/Services/ConnectionService" );
@@ -53,7 +46,7 @@ CalibDbConnection::CalibDbConnection(const std::string& ConnectionString, const
   m_context->loadComponent( "CORAL/Services/XMLAuthenticationService" );
   m_context->loadComponent( "CORAL/Services/RelationalService" );
   m_comp_loaded=true;
-  m_session=NULL;
+  m_session=nullptr;
 }
 
 
@@ -70,7 +63,7 @@ CalibDbConnection::~CalibDbConnection() {
 
 bool CalibDbConnection::OpenConnection() {
   if(!m_comp_loaded) { return false; }
-  if (m_session!=NULL) { return true; }
+  if (m_session) { return true; }
   
   try {
     // Load CORAL connection service
@@ -79,16 +72,18 @@ bool CalibDbConnection::OpenConnection() {
     lookSvcH = m_context->query<coral::IConnectionService>();
     
     if (!lookSvcH.isValid()) {
-      throw std::runtime_error( "Could not locate the connection service" );
+      throw std::runtime_error(Form("File: %s, Line: %d\nCalibDbConnection::OpenConnection() - Could not locate the connection service!", __FILE__, __LINE__));
     }
     // connection to CORAL
-    std::cout <<"INFO CalibDbConnection::OpenConnection: "<<m_connection_string<<" Schema: "<<m_working_schema<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibDbConnection");
+    log<<MSG::INFO<<"CalibDbConnection::OpenConnection: "<<m_connection_string<<" Schema: "<<m_working_schema<<endmsg;
     m_session = lookSvcH->connect( m_connection_string, coral::Update );
     return true;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
-    m_session=NULL;
+    MsgStream log(Athena::getMessageSvc(),"CalibDbConnection");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
+    m_session=nullptr;
     return false;
   }		
 }
@@ -134,9 +129,10 @@ coral::ITableDataEditor& CalibDbConnection::GetTableEditor(const std::string & t
 // GetQuery //
 //////////////
 coral::IQuery* CalibDbConnection::GetQuery() {
-  if(m_session==NULL) {
-    std::cerr<<"No Session open!"<<std::endl;
-    return NULL;
+  if(!m_session) {
+    MsgStream log(Athena::getMessageSvc(),"CalibDbConnection");
+    log<<MSG::WARNING<<"No Session open!"<<endmsg;
+    return nullptr;
   }
   coral::ISchema& workingSchema = m_session->schema(  m_working_schema );
   coral::IQuery* query = workingSchema.newQuery();
@@ -159,12 +155,12 @@ void CalibDbConnection::DestroyQuery(coral::IQuery *query) {
 coral::IRelationalDomain& CalibDbConnection::domain( const std::string& connectionString ) {
   coral::IHandle<coral::IRelationalService> relationalService= m_context->query<coral::IRelationalService>();
   if ( !relationalService.isValid() ) {
-    throw std::runtime_error( "Could not locate the relational service" );
+    throw std::runtime_error(Form("File: %s, Line: %d\nCalibDbConnection::domain() - Could not locate the relational service!", __FILE__, __LINE__));
   }
 
   coral::IHandle<coral::IAuthenticationService> authenticationService= m_context->query<coral::IAuthenticationService>();
   if ( !authenticationService.isValid() ) {
-    throw std::runtime_error( "Could not locate the authentication service" );
+    throw std::runtime_error(Form("File: %s, Line: %d\nCalibDbConnection::domain() - Could not locate the authentication service!", __FILE__, __LINE__));
   }
   if(m_username=="") {
     const coral::IAuthenticationCredentials& credentials = authenticationService->credentials( connectionString );
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibHeadOperations.cxx b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibHeadOperations.cxx
index b7ccadf6a8532e38e680a59a7640ba7fdcc33666..c61860928044a80ad274db4af42edeefbdf83ea5 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibHeadOperations.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibHeadOperations.cxx
@@ -1,16 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//this
 #include "MuonCalibDbOperations/CalibHeadOperations.h"
 #include "MuonCalibDbOperations/CalibDbConnection.h"
-
-//coral
 #include "RelationalAccess/IRelationalService.h"
-//#include "RelationalAccess/IConnection.h"
-//#include "RelationalAccess/IConnectionService.h"
-//#include "RelationalAccess/ISession.h"
 #include "RelationalAccess/IRelationalDomain.h"
 #include "RelationalAccess/ITransaction.h"
 #include "RelationalAccess/IQuery.h"
@@ -24,8 +18,9 @@
 #include "CoralBase/Attribute.h"
 #include "CoralBase/AttributeSpecification.h"
 #include "CoralKernel/Context.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
-//c - c+++
 #include "iostream"
 
 namespace MuonCalib {
@@ -42,14 +37,16 @@ int CalibHeadOperations::GetLatestHeadId() const {
     query->addToOutputList("max(HEAD_ID)", "max_head_id");
     coral::ICursor& cursor = query->execute();
     if(!cursor.next()) {
-      std::cerr<<"Query for head_id failed!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+      log<<MSG::WARNING<<"Query for head_id failed!"<<endmsg;
       return -1;
     }
     const coral::AttributeList & al= cursor.currentRow();
     return static_cast<int>(al["max_head_id"].data<double>());
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     return -1;
   }
 }
@@ -59,7 +56,8 @@ bool CalibHeadOperations::GetHeadInfo(int &head_id, int & lowrun, int &uprun, in
     head_id=GetLatestHeadId();
   }
   if(head_id<0)	{
-    std::cerr<<"CalibHeadOperations::GetHeadInfo: Cannot get latest head id"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+    log<<MSG::WARNING<<"CalibHeadOperations::GetHeadInfo: Cannot get latest head id"<<endmsg;
     return -1;
   }
   try {
@@ -77,7 +75,8 @@ bool CalibHeadOperations::GetHeadInfo(int &head_id, int & lowrun, int &uprun, in
     query->setCondition( condition, conditionData );
     coral::ICursor& cursor = query->execute();
     if(!cursor.next()) {
-      std::cerr<<"No information about head_id="<<head_id<<" found!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+      log<<MSG::WARNING<<"No information about head_id="<<head_id<<" found!"<<endmsg;
       return false;
     }
     const coral::AttributeList & al= cursor.currentRow();
@@ -88,7 +87,8 @@ bool CalibHeadOperations::GetHeadInfo(int &head_id, int & lowrun, int &uprun, in
     return true;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     return false;
   }	
 	
@@ -99,7 +99,7 @@ CalibDbConnection * CalibHeadOperations::GetDataConnection(int head_id, bool wri
     head_id = GetLatestHeadId();
 		}
   if (head_id<0)
-    return NULL;
+    return nullptr;
   try {
     m_meta_connection->OpenTransaction();
     coral::IQuery * query=m_meta_connection->GetQuery();
@@ -118,13 +118,15 @@ CalibDbConnection * CalibHeadOperations::GetDataConnection(int head_id, bool wri
     query->setCondition( condition, conditionData );
     coral::ICursor& cursor = query->execute();
     if(!cursor.next()) {
-      std::cerr<<"No information about head_id="<<head_id<<" found!"<<std::endl;
-      return NULL;
+      MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+      log<<MSG::WARNING<<"No information about head_id="<<head_id<<" found!"<<endmsg;
+      return nullptr;
     }
     const coral::AttributeList & al= cursor.currentRow();
     if(write && !al["ACTIVE"].data<bool>()) {
-      std::cerr<<"Can only write to the active schema"<<std::endl;
-      return NULL;
+      MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+      log<<MSG::WARNING<<"Can only write to the active schema"<<endmsg;
+      return nullptr;
     }
     if(al["ARCHIVED"].data<bool>()) {
       return new CalibDbConnection(al["ARCHIVE_CONNECTION_STRING"].data<std::string>(), al["SCHEMA"].data<std::string>());
@@ -142,8 +144,9 @@ CalibDbConnection * CalibHeadOperations::GetDataConnection(int head_id, bool wri
     return ret;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
-    return NULL;
+    MsgStream log(Athena::getMessageSvc(),"CalibHeadOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
+    return nullptr;
   }	
 }
 	
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibRtDbOperations.cxx b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibRtDbOperations.cxx
index 944cf279d7ca523b3c2e06ab688b3d1947e28576..d0a7d7f79f39e6901c7a5f6e942e3e438699870c 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibRtDbOperations.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibRtDbOperations.cxx
@@ -2,27 +2,14 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//this
 #include "MuonCalibDbOperations/CalibRtDbOperations.h"
 #include "MuonCalibDbOperations/CalibDbConnection.h"
 #include "MuonCalibDbOperations/IConditionsStorage.h"
-
-
-//MuonCalibStandAloneBase
 #include "MuonCalibStandAloneBase/NtupleStationId.h"
 #include "MuonCalibStandAloneBase/MdtStationT0Container.h"
-
-//MdtCalibData
 #include "MdtCalibData/RtFullInfo.h"
-
-//MuonCalibMath
 #include "MuonCalibMath/SamplePoint.h"
-
-//coral
 #include "RelationalAccess/IRelationalService.h"
-//#include "RelationalAccess/IConnection.h"
-//#include "RelationalAccess/IConnectionService.h"
-//#include "RelationalAccess/ISession.h"
 #include "RelationalAccess/IRelationalDomain.h"
 #include "RelationalAccess/ITransaction.h"
 #include "RelationalAccess/IQuery.h"
@@ -38,31 +25,29 @@
 #include "CoralBase/Attribute.h"
 #include "CoralBase/AttributeSpecification.h"
 #include "CoralKernel/Context.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
-//c - c++
 #include "sstream"
 #include "string"
 #include "cmath"
 
-
 namespace MuonCalib {
 
 CalibRtDbOperations::CalibRtDbOperations(CalibDbConnection & db_conn) : m_db_conn(db_conn), m_rt_id(-1), m_rt_map_t_id(-1), m_head_id(-1), m_region_id(-1), m_n_points(0) {
-  m_query=NULL;
+  m_query=nullptr;
 }
-
-CalibRtDbOperations::~CalibRtDbOperations() {}
 	
-bool CalibRtDbOperations ::LoadRt(const NtupleStationId & id, int head_id, bool validated, const std::string & /*site_name*/, std::vector<SamplePoint> & points, RtFullInfo * full_info) {
+bool CalibRtDbOperations::LoadRt(const NtupleStationId & id, int head_id, bool validated, const std::string & /*site_name*/, std::vector<SamplePoint> & points, RtFullInfo * full_info) {
   m_head_id=head_id;
   m_region_id=id.FixedId();
-  std::cout<<"CalibRtDbOperations ::LoadRt: "<<head_id<<" "<<id.FixedId()<<std::endl;
   try {
     points.clear();
     m_db_conn.OpenTransaction();
     m_rt_id=-1;
     if(!getRtId(validated, full_info)) {
-      std::cerr<<"Header query failed!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+      log<<MSG::WARNING<<"Header query failed!"<<endmsg;
       m_db_conn.Rollback();
       return false;
     }
@@ -77,7 +62,8 @@ bool CalibRtDbOperations ::LoadRt(const NtupleStationId & id, int head_id, bool
     return true;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     return false;
   }
 }
@@ -88,16 +74,18 @@ bool CalibRtDbOperations::WriteUpdateRt(const NtupleStationId & id, int head_id,
   m_region_id=id.FixedId();
   try {
     m_db_conn.OpenTransaction();
-    if(!getRtId((validflag>1), NULL)) {
+    if(!getRtId((validflag>1), nullptr)) {
       m_db_conn.Rollback();
-      std::cerr<<"Questing RT header failed!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+      log<<MSG::WARNING<<"Questing RT header failed!"<<endmsg;
       return false;
     }
     if(m_rt_id>=0) {
       if(!updateFullInfo(full_info, validflag, static_cast<int>(points.size()))) {
-	std::cout<<"Failed update header"<<std::endl;
-	m_db_conn.Rollback();
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+        log<<MSG::WARNING<<"Failed update header"<<endmsg;
+        m_db_conn.Rollback();
+        return false;
       }
       if(!updateRTSable(points)) {
 	m_db_conn.Rollback();
@@ -105,11 +93,11 @@ bool CalibRtDbOperations::WriteUpdateRt(const NtupleStationId & id, int head_id,
       }
 			
     } else {
-      std::cout<<"fill"<<std::endl;
       if(!insertFullInfo(full_info, validflag, static_cast<int>(points.size()))) {
-	std::cout<<"Failed update header"<<std::endl;
-	m_db_conn.Rollback();
-	return false;				
+        MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+        log<<MSG::WARNING<<"Failed update header"<<endmsg;
+        m_db_conn.Rollback();
+        return false;				
       }
       if(!insertRTSable(points)) {
 	m_db_conn.Rollback();
@@ -117,12 +105,12 @@ bool CalibRtDbOperations::WriteUpdateRt(const NtupleStationId & id, int head_id,
       }
 				
     }
-    std::cout<<"filled"<<std::endl;
     m_db_conn.Commit();
     return true;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     m_db_conn.Rollback();
     return false;
   }
@@ -131,7 +119,8 @@ bool CalibRtDbOperations::WriteUpdateRt(const NtupleStationId & id, int head_id,
 
 bool CalibRtDbOperations::SetValidflag(int validflag, bool commit) {
   if(m_rt_id<0) {
-    std::cerr<<"No current rt!"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"No current rt!"<<endmsg;
     return false;
   }
   try {
@@ -149,10 +138,10 @@ bool CalibRtDbOperations::SetValidflag(int validflag, bool commit) {
     updateData.extend<int>("rid");
     updateData["rid"].data<int>()=m_region_id;
 		
-    std::cout<<m_head_id<<" "<<m_region_id<<" "<<m_rt_id<<std::endl;
     int n_rows=editor.updateRows( updateAction, updateCondition, updateData );
     if(n_rows!=1)	{
-      std::cerr<<"Invalid number of rows updated in MDT_RT! "<<n_rows<<" instead of 1"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+      log<<MSG::WARNING<<"Invalid number of rows updated in MDT_RT! "<<n_rows<<" instead of 1"<<endmsg;
       m_db_conn.Rollback();
       return false;
     }
@@ -161,7 +150,8 @@ bool CalibRtDbOperations::SetValidflag(int validflag, bool commit) {
     return true;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     m_db_conn.Rollback();
     return false;
   }
@@ -194,7 +184,8 @@ bool  CalibRtDbOperations::ReadForConditions(std::string /*site_name*/, int head
       int rt_id=static_cast<int>(al["REGION_ID"].data<float>());
       if(last_region_id>0 && rt_id!=last_region_id) {
 	if(!storage.StoreRtChamber(last_region_id, points)) {
-	  std::cerr<<"Storage_failed"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Storage_failed"<<endmsg;
 	  return false;
 	}
 	points.clear();
@@ -205,21 +196,22 @@ bool  CalibRtDbOperations::ReadForConditions(std::string /*site_name*/, int head
     }
     if(last_region_id>0) {
       if(!storage.StoreRtChamber(last_region_id, points)) {
-	std::cerr<<"Storage_failed"<<std::endl;
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+        log<<MSG::WARNING<<"Storage_failed"<<endmsg;
+        return false;
       }
     }		
     return true;
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     m_db_conn.Rollback();
     return false;
   }	
 }
 
 bool CalibRtDbOperations::getRtId(bool validated,  RtFullInfo * full_info) {
-  std::cout<<"CalibRtDbOperations::getRtId"<<std::endl;
 //select MDT_RT, ... from MDT_RT where head_id=:hid and site_name=:sn and region_id=:rid and [and validflag>0| and validflag=0]
   m_query=m_db_conn.GetQuery();
   m_query->addToTableList("MDT_RT");
@@ -269,7 +261,8 @@ bool CalibRtDbOperations::getRtId(bool validated,  RtFullInfo * full_info) {
     }
   }
   if(n_rows>1) {
-    std::cerr<<"Fount "<<n_rows<<" in MDT_RT instead of 0 or 1"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Found "<<n_rows<<" in MDT_RT instead of 0 or 1"<<endmsg;
     return false;
   }
   m_db_conn.DestroyQuery(m_query);
@@ -277,8 +270,6 @@ bool CalibRtDbOperations::getRtId(bool validated,  RtFullInfo * full_info) {
 }
 
 inline bool CalibRtDbOperations ::readRTS(std::vector<SamplePoint> &points) {
-  std::cout<<"CalibRtDbOperations ::readRTS"<<std::endl;
-  std::cout<<"m_n_points="<<m_n_points<<std::endl;
   m_query=m_db_conn.GetQuery();
   m_query->addToTableList("MDT_RT_MAP");
   coral::AttributeList conditionData;	
@@ -296,17 +287,16 @@ inline bool CalibRtDbOperations ::readRTS(std::vector<SamplePoint> &points) {
   m_query->addToOutputList("MDT_RT_MAP.S", "S");
   m_query->addToOrderList("MDT_RT_MAP.POINT_NR");
   m_query->setRowCacheSize(100);
-  std::cout<<"m_n_points="<<m_n_points<<std::endl;
   coral::ICursor& cursor = m_query->execute();
   points.clear();
   points.resize(m_n_points);
-  std::cout<<"m_n_points="<<m_n_points<<std::endl;
   int count(0);
   while (cursor.next())	{
     const coral::AttributeList & al= cursor.currentRow();
     int pt_nr(static_cast<int>(al["POINT_NR"].data<short>()));
     if(pt_nr>=m_n_points) {
-      std::cerr<<"Illegal point number "<<pt_nr<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+      log<<MSG::WARNING<<"Illegal point number "<<pt_nr<<endmsg;
       return false;
     }
     SamplePoint point(al["T"].data<float>(), al["R"].data<float>(), al["S"].data<float>());
@@ -314,7 +304,8 @@ inline bool CalibRtDbOperations ::readRTS(std::vector<SamplePoint> &points) {
     count++;
   }
   if (count!=m_n_points) {
-    std::cerr<<m_n_points<<" points expected, "<<count<<" found!"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<m_n_points<<" points expected, "<<count<<" found!"<<endmsg;
     return false;
   }
   m_db_conn.DestroyQuery(m_query);	
@@ -322,7 +313,6 @@ inline bool CalibRtDbOperations ::readRTS(std::vector<SamplePoint> &points) {
 }
 
 inline bool CalibRtDbOperations ::updateFullInfo(const RtFullInfo * full_info, const int & validflag, const int & n_points) {
-  std::cout<<"CalibRtDbOperations::updateFullInfo"<<std::endl;
   coral::ITableDataEditor & editor=m_db_conn.GetTableEditor("MDT_RT");
   std::string updateAction = "N_SEGS = :N_SEGS, AVER_ANGLE = :AVER_ANGLE, DELTA_AVER_ANGLE = :DELTA_AVER_ANGLE, AVER_SPREAD = :AVER_SPREAD, DELTA_AVER_SPREAD = :DELTA_AVER_SPREAD, CONVERGENCE = :CONVERGENCE, VALIDFLAG=:VALIDFLAG, BINS=:BINS, ALGO_FLAG=:ALGO_FLAG";
   std::string updateCondition = "HEAD_ID=:hid and REGION_ID=:rid and CALIBFLAG=:rtid";
@@ -335,7 +325,8 @@ inline bool CalibRtDbOperations ::updateFullInfo(const RtFullInfo * full_info, c
   updateData.extend<int>("rid");
   updateData["rid"].data<int>()=m_region_id;
   if(editor.updateRows( updateAction, updateCondition, updateData )!=1)	{
-    std::cerr<<"Invalid number of rows updated in MDT_RT!"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Invalid number of rows updated in MDT_RT!"<<endmsg;
     return false;
   }
   return true;
@@ -357,7 +348,8 @@ inline bool CalibRtDbOperations ::updateRTSable(const std::vector<SamplePoint> &
     deleteData[3].data<int>() = static_cast<int>(points.size());
     long rowsDeleted = editor.deleteRows( deleteCondition, deleteData );
     if(rowsDeleted != m_n_points - static_cast<int>(points.size())) {
-      std::cerr<<rowsDeleted<<" Points removed instead of "<< m_n_points - static_cast<int>(points.size())<<"! Rolling back!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+      log<<MSG::WARNING<<rowsDeleted<<" Points removed instead of "<< m_n_points - static_cast<int>(points.size())<<"! Rolling back!"<<endmsg;
       return false;
     }
   }
@@ -375,8 +367,9 @@ inline bool CalibRtDbOperations ::updateRTSable(const std::vector<SamplePoint> &
       std::string updateAction = "R=:R, T=:T, S=:S";
       std::string updateCondition = "CALIBFLAG=:CALIBFLAG and POINT_NR=:POINT_NR and HEAD_ID=:HEAD_ID and REGION_ID=:REGION_ID";
       if(editor.updateRows( updateAction, updateCondition,  table_data)!=1) {
-	std::cerr<<"Wrong number of points updated!"<<std::endl;
-	return false;
+        MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+        log<<MSG::WARNING<<"Wrong number of points updated!"<<endmsg;
+        return false;
       }
     } else {
       editor.insertRow(table_data);
@@ -386,7 +379,6 @@ inline bool CalibRtDbOperations ::updateRTSable(const std::vector<SamplePoint> &
 }
 
 inline bool CalibRtDbOperations ::insertFullInfo(const RtFullInfo * full_info, const int & validflag, const int & n_points) {
-  std::cout<<"CalibRtDbOperations::insertFullInfo"<<std::endl;
   coral::ITableDataEditor & editor=m_db_conn.GetTableEditor("MDT_RT");
   coral::AttributeList rowBuffer;
   fullInfoInitData(full_info, validflag, rowBuffer, n_points,true);
@@ -416,7 +408,6 @@ inline bool  CalibRtDbOperations ::insertRTSable(const std::vector<SamplePoint>
 }
 
 inline void CalibRtDbOperations::fullInfoInitData( const RtFullInfo * full_info, const int & validflag, coral::AttributeList  &updateData, const int & n_bins, const bool & for_insert) {
-  std::cout<<"CalibRtDbOperations::fullInfoInitData"<<std::endl;
   if(for_insert) {
     updateData.extend<int>("REGION_ID");
     updateData["REGION_ID"].data<int>()=m_region_id;
@@ -443,11 +434,13 @@ inline void CalibRtDbOperations::fullInfoInitData( const RtFullInfo * full_info,
   } else if (full_info->implementation()=="Validation")	{
     m_prev_algs+="Val";
   } else {
-    std::cout<<"Unknown implementation '"<<full_info->implementation()<<"'!"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"Unknown implementation '"<<full_info->implementation()<<"'!"<<endmsg;
     m_prev_algs+="UU";
   }
   if(m_prev_algs.size()>25) {
-    std::cout<<"m_prev_algs exceeds size: "<<m_prev_algs<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibRtDbOperations");
+    log<<MSG::WARNING<<"m_prev_algs exceeds size: "<<m_prev_algs<<endmsg;
     m_prev_algs="..";
   }
   updateData.extend<std::string>("ALGO_FLAG");
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibT0DbOperations.cxx b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibT0DbOperations.cxx
index a0a629f4829f1b16e976d51f308cbeed3d171d90..df3f1adffd3de1e0057de7aa00afee0306017a09 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibT0DbOperations.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibDbOperations/src/CalibT0DbOperations.cxx
@@ -1,27 +1,15 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//this
 #include "MuonCalibDbOperations/CalibT0DbOperations.h"
 #include "MuonCalibDbOperations/CalibDbConnection.h"
 #include "MuonCalibDbOperations/IConditionsStorage.h"
-
-//MuonCalibStandAloneBase
 #include "MuonCalibStandAloneBase/NtupleStationId.h"
 #include "MuonCalibStandAloneBase/MdtStationT0Container.h"
-
-//MuonCalibIdentifier
 #include "MuonCalibIdentifier/MuonFixedId.h"
-
-//MdtCalibData
 #include "MdtCalibData/MdtTubeFitContainer.h"
-
-//coral
 #include "RelationalAccess/IRelationalService.h"
-//#include "RelationalAccess/IConnection.h"
-//#include "RelationalAccess/IConnectionService.h"
-//#include "RelationalAccess/ISession.h"
 #include "RelationalAccess/IRelationalDomain.h"
 #include "RelationalAccess/ITransaction.h"
 #include "RelationalAccess/IQuery.h"
@@ -37,25 +25,18 @@
 #include "CoralBase/Attribute.h"
 #include "CoralBase/AttributeSpecification.h"
 #include "CoralKernel/Context.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
-//c - c++
 #include "sstream"
-#include "string"
 #include "cmath"
 
 namespace MuonCalib {
 
-CalibT0DbOperations::CalibT0DbOperations(CalibDbConnection & db_conn) : m_db_conn(db_conn), m_query(NULL) {
-  //	m_query=m_db_conn.GetQuery();
-}
-
-
-CalibT0DbOperations::~CalibT0DbOperations() {
-  //	m_db_conn.DestroyQuery(m_query);
+CalibT0DbOperations::CalibT0DbOperations(CalibDbConnection & db_conn) : m_db_conn(db_conn), m_query(nullptr) {
 }
 
 MdtStationT0Container * CalibT0DbOperations::LoadT0Calibration(const NtupleStationId & id, int head_id, std::string & site_name) {
-  std::cout<<"CalibT0DbOperations::LoadT0Calibration"<<std::endl;
   try {
     //select MDT_TUBE.TUBE_ID, MDT_TUBE.P4 from MDT_TUBE where MDT_TUBE.HEAD_ID = :hid and MDT_TUBE.CHAMBER = :chamb and MDT_TUBE.VALIDFLAG>1
     m_db_conn.OpenTransaction();
@@ -83,20 +64,21 @@ MdtStationT0Container * CalibT0DbOperations::LoadT0Calibration(const NtupleStati
       count++;
     }
     if(count==0) {
-      std::cerr<<"No tubes found for "<<id.regionId()<<" Header "<<site_name<<head_id<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+      log<<MSG::WARNING<<"No tubes found for "<<id.regionId()<<" Header "<<site_name<<head_id<<endmsg;
       delete ret;
-      return NULL;
+      return nullptr;
     }
     return ret;
   }//try
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
-    return NULL;
+    MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
+    return nullptr;
   }
 }
 
 MdtTubeFitContainer * CalibT0DbOperations::LoadT0Validation(const NtupleStationId & id, int head_id, std::string &/*site_name*/) {
-  std::cout<<"CalibT0DbOperations::LoadT0Validation"<<std::endl;
   try {
     m_db_conn.OpenTransaction();
     m_query=m_db_conn.GetQuery();
@@ -142,7 +124,6 @@ MdtTubeFitContainer * CalibT0DbOperations::LoadT0Validation(const NtupleStationI
     m_query->addToOutputList( "MDT_TUBE.NHITS_ABOVE_ADC_CUT", "NHITS_ABOVE_ADC_CUT");
     m_query->addToOutputList( "MDT_TUBE_V.ALGO_FLAG", "ALGO_FLAG");
     m_query->addToOutputList( "MDT_TUBE_V.TUBE_GROUPING", "TUBE_GROUPING");
-    std::cout<<"Execute"<<std::endl;
     coral::ICursor& cursor = m_query->execute();
     int n_tubes(0), n_layers(0), n_ml(0);
     std::map<MuonFixedId, MdtTubeFitContainer::SingleTubeFit> fits;
@@ -150,7 +131,6 @@ MdtTubeFitContainer * CalibT0DbOperations::LoadT0Validation(const NtupleStationI
     std::string alg_flg, tb_grp;
     bool str_set(false);
     while (cursor.next()) {
-//			std::cout<<"."<<std::endl;
       const coral::AttributeList & al= cursor.currentRow();
       MuonFixedId fid(al["TUBE_ID"].data<int>());
       MdtTubeFitContainer::SingleTubeCalib &calib(calibs[fid]);
@@ -199,17 +179,18 @@ MdtTubeFitContainer * CalibT0DbOperations::LoadT0Validation(const NtupleStationI
     return ret;	
   } //try
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
-    return NULL;
+    MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
+    return nullptr;
   }
 }
 
 bool CalibT0DbOperations::WriteT0Chamber(const NtupleStationId & id, const MdtTubeFitContainer * t0, std::vector<int> & validation_flag, int head_id, const std::string & site_name) {
-  std::cout<<"CalibT0DbOperations::WriteT0Chamber"<<std::endl;
   try {
     m_db_conn.OpenTransaction();
     if(!checkTubesPresent(head_id, site_name, id, validation_flag)) {
-      std::cerr<<"Trying to insert data for chamber " << id.regionId()<<" header "<<head_id<<site_name<<"  which already exists!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+      log<<MSG::WARNING<<"Trying to insert data for chamber " << id.regionId()<<" header "<<head_id<<site_name<<"  which already exists!"<<endmsg;
       m_db_conn.Rollback();
       return false;
     }
@@ -275,12 +256,12 @@ bool CalibT0DbOperations::WriteT0Chamber(const NtupleStationId & id, const MdtTu
 	    rowsUpdated=setValidFlag(site_name, head_id, fixId.getIdInt(), 1, *editor[0]);
 	  
 	  if(rowsUpdated!=1){
-	    std::cerr<<id.regionId()<<" tb="<<tb<<" ly="<<ly<<" ml="<<ml<<" head_id="<<head_id<<": "<<rowsUpdated<<" Rows to be updated! This is wrong! Check database!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+      log<<MSG::WARNING<<id.regionId()<<" tb="<<tb<<" ly="<<ly<<" ml="<<ml<<" head_id="<<head_id<<": "<<rowsUpdated<<" Rows to be updated! This is wrong! Check database!"<<endmsg;
 	    m_db_conn.Rollback();
 	    return false;
 	  }
 	  if(validation_flag[tb_index]!=5) {
-	    std::cout<<"Insert new "<<fixId.getIdInt()<<std::endl;
 	    //initialize row buffers
 	    if(!row_buffer_initialized)	{
 	      initRowBuffer(rowBuffer, id, head_id, site_name,  t0);
@@ -307,19 +288,17 @@ bool CalibT0DbOperations::WriteT0Chamber(const NtupleStationId & id, const MdtTu
     return true;
   }//try
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     m_db_conn.Rollback();
     return false;
   }
 }
 
 bool CalibT0DbOperations::ReadForConditions(std::string /*site_name*/, int head_id, IConditionsStorage & storage) {
-  std::cout<<"CalibT0DbOperations::ReadForConditions"<<std::endl;
   try {
     //prepare query
-    std::cout<<"OpenTransaction();"<<std::endl;
     m_db_conn.OpenTransaction();
-    std::cout<<"GetQuery();"<<std::endl;
     m_query=m_db_conn.GetQuery();
     m_query->addToTableList("MDT_TUBE");
     m_query->addToOutputList("MDT_TUBE.CHAMBER", "CHAMBER");
@@ -342,7 +321,6 @@ bool CalibT0DbOperations::ReadForConditions(std::string /*site_name*/, int head_
       m_query->addToTableList("MDT_TUBE_C");
       for(std::vector<std::string>::const_iterator it=rows_tube_c_table.begin(); it!=rows_tube_c_table.end(); it++) {
 	m_query->addToOutputList( std::string("MDT_TUBE_C.") + *it, *it);
-	std::cout<<std::string("MDT_TUBE_C.") + *it<<std::endl;
       }
     }
     coral::AttributeList conditionData;
@@ -379,13 +357,13 @@ bool CalibT0DbOperations::ReadForConditions(std::string /*site_name*/, int head_
     return true;	
   }
   catch( coral::SchemaException& e ) {
-    std::cerr << "Schema exception : " << e.what() << std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+    log<<MSG::WARNING<<"Schema exception : " << e.what()<<endmsg;
     return false;
   }
 }
 
 inline void CalibT0DbOperations::initRowBuffer(std::vector<coral::AttributeList> & rowBuffer, const NtupleStationId &id, const int & head_id, const std::string & /*site_name*/, const MdtTubeFitContainer * t0) {
-  std::cout<<"CalibT0DbOperations::initRowBuffer"<<std::endl;
   for(unsigned int i=0; i<3; i++) {
     rowBuffer[i].extend<int>("TUBE_ID");
     rowBuffer[i].extend<int>("HEAD_ID");
@@ -394,12 +372,8 @@ inline void CalibT0DbOperations::initRowBuffer(std::vector<coral::AttributeList>
   }
   rowBuffer[0].extend<int>("CHAMBER");
   rowBuffer[0]["CHAMBER"].data<int>()=id.FixedId();
-  //	rowBuffer[0].extend<std::string>("SITE_NAME");
-//	rowBuffer[0]["SITE_NAME"].data<std::string>()=site_name;
   rowBuffer[0].extend<int>("VALIDFLAG");
   rowBuffer[1].extend<int>("ENTRIES");
-//	rowBuffer[1].extend<int>("SEQID");
-//	rowBuffer[2].extend<int>("SEQID");
   rowBuffer[1].extend<float>("CHISQUARE_1");
   rowBuffer[1].extend<float>("CHISQUARE_2");
   for(int i=0; i<8; i++) {
@@ -439,7 +413,6 @@ inline void CalibT0DbOperations::initRowBuffer(std::vector<coral::AttributeList>
 }
 
 inline void CalibT0DbOperations::fillRowBuffer(std::vector<coral::AttributeList> & rowBuffer, const MdtTubeFitContainer * t0, const int & ml, const int &ly, const int &tb, const MuonFixedId &fixId) {
-  std::cout<<"CalibT0DbOperations::fillRowBuffer"<<std::endl;
   for(unsigned int i=0; i<3; i++) {
     rowBuffer[i]["TUBE_ID"].data<int>()=fixId.getIdInt();
   }
@@ -516,7 +489,8 @@ bool  CalibT0DbOperations::insertTubes(const std::string & site_name, int head_i
     }
   }
   if(all_dead) {
-    std::cerr<<"Refusing to insert completely dead chamber"<<std::endl;
+    MsgStream log(Athena::getMessageSvc(),"CalibT0DbOperations");
+    log<<MSG::WARNING<<"Refusing to insert completely dead chamber"<<endmsg;
     return false;
   }
   MuonFixedId fixId(0);
@@ -544,7 +518,6 @@ bool  CalibT0DbOperations::insertTubes(const std::string & site_name, int head_i
 	}
 	fillRowBuffer(rowBuffer, t0, ml, ly, tb, fixId);
 	rowBuffer[0]["VALIDFLAG"].data<int>() =v_flag;
-	std::cout<<"XXXXXXXX='"<<rowBuffer[1]["TUBE_GROUPING"].data<std::string>()<<"'"<<std::endl;
 	for(unsigned int i=0; i<3; i++)	{
 	  rowBuffer[i]["CALIBFLAG"].data<int>() = static_cast<int>(v_flag>3);
 	  bulk_inserter[i]->processNextIteration();
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibEventBase/src/MuonCalibSegment.cxx b/MuonSpectrometer/MuonCalib/MuonCalibEventBase/src/MuonCalibSegment.cxx
index 304a10db50cd4a91e5c8afec0c9eb49b678dd653..34a6474d581d17b2417770b8a243a3530d3b2f4e 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibEventBase/src/MuonCalibSegment.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibEventBase/src/MuonCalibSegment.cxx
@@ -1,9 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonCalibEventBase/MuonCalibSegment.h"
 #include "MuonCalibStl/DeleteObject.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
 
 #include <algorithm>
 #include <iostream>
@@ -240,7 +242,8 @@ namespace MuonCalib {
 
   void MuonCalibSegment::refineMdtSelection(const std::vector<unsigned int> &new_selection) {
     if(new_selection.size() != m_mdtHitsOnTrack.size()) {
-      std::cerr<<" MuonCalibSegment::refineMdtSelection: Wrong size of vector!"<<std::endl;
+      MsgStream log(Athena::getMessageSvc(),"MuonCalibSegment");
+      log<<MSG::WARNING<<"MuonCalibSegment::refineMdtSelection: Wrong size of vector!"<<endmsg;
       return;
     }
 //copy old hit vector
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h
index a9907865ae90c0758d507716902a0bf7198f55be..88c5bc65e46bf8faec754996ad62b6e1449b90e5 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/ExtraTreeTrackFillerTool.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  MuonCalib_ExtraTreeTrackFillerTool_h
@@ -34,7 +34,6 @@ class ExtraTreeTrackFillerTool: virtual public IExtraTreeFillerTool, public AthA
  public:
   ExtraTreeTrackFillerTool(const std::string &type, const std::string &name, const IInterface *parent);
   virtual StatusCode initialize();
-  virtual StatusCode finalize();
   virtual StatusCode writeTracks(unsigned int &index);
 
  protected:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h
index b5a6065d8324813ae6156414ad427cc7ea6c6874..614c1dbf9ac1924ec7edacc7ea7011132869379e 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/MuonCalibExtraTreeAlg/SegmentOnTrackSelector.h
@@ -33,7 +33,6 @@ class SegmentOnTrackSelector: public AthAlgTool, virtual public ISegmentOnTrackS
   SegmentOnTrackSelector(const std::string &type,const std::string &name,const IInterface* parent);	
   //tool interface functions
   StatusCode initialize();
-  StatusCode finalize();
 		
   //call once at begining of event	
   StatusCode beginEvent();
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.cxx b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.cxx
index f659a18f8e22d9ab296c7f4836795b98e81c7693..cd69572e5f41b961e04439cf1c1c57f401d92386 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.cxx
@@ -1,12 +1,8 @@
 /*
-  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 "ExtraTreeMuonFillerTool.h"
-// #include "xAODMuon/MuonContainer.h"
-// #include "xAODMuon/Muon.h"
-// #include "xAODTracking/TrackParticle.h"
-// #include "Particle/TrackParticle.h"
 #include "xAODTracking/TrackParticleContainer.h"
 #include "TrkTrack/Track.h"
 #include <string>
@@ -53,11 +49,7 @@ StatusCode ExtraTreeMuonFillerTool::initialize() {
   }
   return StatusCode::SUCCESS;	
 }  // end ExtraTreeMuonFillerTool::initialize
-  
-StatusCode ExtraTreeMuonFillerTool::finalize() {
-  return StatusCode::SUCCESS;
-}
-	
+
 StatusCode ExtraTreeMuonFillerTool::writeTracks(unsigned int &index) {
   const xAOD::MuonContainer *muonContainer;
   if(evtStore()->retrieve(muonContainer, m_muonContainer).isSuccess()) {
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.h
index 4e35c964ec6572a02ebbb2933d25f3b1e15963a5..4cb364d0c1ec7f704f050f37f603b10b029813f1 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeMuonFillerTool.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 MuonCalib_ExtraTreeMuonFillerTool_h
@@ -12,11 +12,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "MuonRecHelperTools/IMuonEDMHelperSvc.h"
 
-// namespace xAOD {
-// class Muon;
-// class TrackParticle;
-// }
-
 namespace Trk {
 class IPropagator;
 }
@@ -27,7 +22,6 @@ class ExtraTreeMuonFillerTool: public ExtraTreeTrackFillerTool {
   public:
     ExtraTreeMuonFillerTool(const std::string &type, const std::string &name, const IInterface *parent);
     StatusCode initialize();
-    StatusCode finalize();	
     StatusCode writeTracks(unsigned int &index);
 		
   private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeTrackFillerTool.cxx b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeTrackFillerTool.cxx
index 99235d2c63dc3fd3b7f86482dbed6d90520451cc..175462bbc223568d90cd66bb9449fd6cf9a314af 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeTrackFillerTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/ExtraTreeTrackFillerTool.cxx
@@ -71,10 +71,6 @@ StatusCode ExtraTreeTrackFillerTool::initialize() {
   return StatusCode::SUCCESS;
 }
 
-StatusCode ExtraTreeTrackFillerTool::finalize() {
-  return StatusCode::SUCCESS;
-}
-
 StatusCode ExtraTreeTrackFillerTool::writeTracks(unsigned int &index) {
   //retrieve SG container
   const TrackCollection* tracks;
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/SegmentOnTrackSelector.cxx b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/SegmentOnTrackSelector.cxx
index ec7dc17094bcefe45e5f104978f561668a03e9a2..218fd2f896120e56d324c6db0008bf00b325a795 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/SegmentOnTrackSelector.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/src/SegmentOnTrackSelector.cxx
@@ -39,10 +39,6 @@ StatusCode SegmentOnTrackSelector::initialize() {
   return StatusCode::SUCCESS;
 }
 
-StatusCode SegmentOnTrackSelector::finalize() {
-  return StatusCode::SUCCESS;
-}
-
 StatusCode SegmentOnTrackSelector::beginEvent() {
   const MuonCalibPatternCollection *patterns;
   if(!evtStore()->retrieve(patterns, m_pattern_location).isSuccess()) {
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/src/MdtGasChannel.cxx b/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/src/MdtGasChannel.cxx
index 6555987e0fe102ce9caeed2d3da2ad886792ee7a..147869b686dc8b0b46c60eb60d70f39d72a4ab76 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/src/MdtGasChannel.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/src/MdtGasChannel.cxx
@@ -6,6 +6,9 @@
 #include "MuonCalibIdentifier/MuonFixedId.h"
 #include "MuonCalibIdentifier/OfflineOnlineIdConversion.h"
 #include "PathResolver/PathResolver.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
 #include <fstream>
 #include <iostream>
 #include <sstream>
@@ -81,16 +84,14 @@ const  MdtGasChannel::GasChannel & MdtGasChannel::GetGasChannel(const MuonFixedI
 	std::map<MuonFixedId, GasChannel>::const_iterator it=m_channel_map.find(id);
 	if(it==m_channel_map.end())
 		{
-		if(m_warning_printed.find(id)==m_warning_printed.end())
-			{
-			std::cerr<<"WARNING: Invalid Gas channel for "<<id.stationNameString()<<" "<<id.phi()<<" "<<id.eta()<<" "<<id.mdtMultilayer()<<std::endl;
+		if(m_warning_printed.find(id)==m_warning_printed.end()) {
+			MsgStream log(Athena::getMessageSvc(),"MdtGasChannel");
+			log<<MSG::WARNING<<"Invalid Gas channel for "<<id.stationNameString()<<" "<<id.phi()<<" "<<id.eta()<<" "<<id.mdtMultilayer()<<endmsg;
 			m_warning_printed.insert(id);
-			}
+		}
 		return INVALID_CHANNEL;
 		}
 	return it->second;
 	}
 
-
-
 }
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/ApplyRawTimes.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/ApplyRawTimes.h
index 1b30621cba7385d4f84e13a36c1ee0deced770c4..c44bae8dac0b3d1abde4a86c9e32d694c22ff722 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/ApplyRawTimes.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/ApplyRawTimes.h
@@ -1,11 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MuonCalib_ApplyRawTimes_H
 #define MuonCalib_ApplyRawTimes_H
 
-
 //Gaudi
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
@@ -22,13 +21,9 @@ class ApplyRawTimes : public AthAlgTool, virtual public CalibSegmentPreparationT
  public:
 //=========================constructor==========================================
   ApplyRawTimes(const std::string &t, const std::string &n, const IInterface *p);
-  inline ~ApplyRawTimes() {}
+  inline ~ApplyRawTimes()=default;
 //=========================public member functions==============================
-  //initialize and finalize
   StatusCode initialize(void);
-  inline StatusCode finalize(void) {
-    return StatusCode :: SUCCESS;
-  }
   //load event
   void prepareSegments(const MuonCalibEvent *&event, std::map<NtupleStationId, MuonCalibSegment *> &segments);
  private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/BFieldCorrectionUpdateTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/BFieldCorrectionUpdateTool.h
index 19a123a645d882550d67b94150c364dfd121cc87..b9b7242debb5f6d5bf7c2129a9263dbf4827a625 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/BFieldCorrectionUpdateTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/BFieldCorrectionUpdateTool.h
@@ -1,11 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// 02.02.2009, AUTHOR: OLIVER KORTNER
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 #ifndef MuonCalib_BFieldCorrectionUpdateToolH
 #define MuonCalib_BFieldCorrectionUpdateToolH
 
@@ -42,15 +38,13 @@ class BFieldCorrectionUpdateTool : public AthAlgTool, virtual public CalibSegmen
     BFieldCorrectionUpdateTool(const std::string &t, const std::string &n, const IInterface *p);
     ///< Constructor of the tool.
 
-    ~BFieldCorrectionUpdateTool(void);
+    ~BFieldCorrectionUpdateTool()=default;
     ///< Destructor of the tool.
 
 // Methods //
 // methods required by the base classes //
     StatusCode initialize(void);
-    ///< initialization of the tool
-    StatusCode finalize(void);
-                            ///< finalization of the tool
+
     void prepareSegments(
       const MuonCalibEvent *& /*event*/,
       std::map<NtupleStationId, MuonCalibSegment *> &segments);
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/CalibNtupleLoader.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/CalibNtupleLoader.h
index 30d0cadbd12e09a1c9b9300524a5e9865807bb76..167300a84b7397845c57864bbe2cd954b87576f8 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/CalibNtupleLoader.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/CalibNtupleLoader.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 MuonCalib_CalibNtupleLoader_h
@@ -29,13 +29,9 @@ class CalibNtupleLoader: public AthAlgTool, virtual public CalibSegmentPreparati
  public:
 //=========================constructor==========================================
   CalibNtupleLoader(const std::string &t, const std::string &n, const IInterface *p);
-  inline ~CalibNtupleLoader() {}
+  ~CalibNtupleLoader()=default;
 //=========================public member functions==============================
-  //initialize and finalize
   StatusCode initialize(void);
-  inline StatusCode finalize(void) {
-    return StatusCode :: SUCCESS;
-  }
   //load event
   void prepareSegments(const MuonCalibEvent *&event, std::map<NtupleStationId, MuonCalibSegment *> &segments);
  private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/GoodRunListFilter.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/GoodRunListFilter.h
index 1dabf86c2e38745e3cc0613d5a436e093d418be4..78686c6c332db7a62ed7c000079b322d3cda730e 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/GoodRunListFilter.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/GoodRunListFilter.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 MuonCalib__GoodRunListFilter_h
@@ -22,13 +22,9 @@ class GoodRunListFilter: public AthAlgTool, virtual public CalibSegmentPreparati
   public:
 //=========================constructor==========================================
     GoodRunListFilter(const std::string &t, const std::string &n, const IInterface *p);
-    inline ~GoodRunListFilter() {}
+    ~GoodRunListFilter()=default;
 //=========================public member functions==============================
-    //initialize and finalize
     StatusCode initialize(void);
-    inline StatusCode finalize(void) {
-      return StatusCode :: SUCCESS;
-    }
     //load event
     void prepareSegments(const MuonCalibEvent *& /*event*/, std::map<NtupleStationId, MuonCalibSegment *> &segments);
   private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/InitialDqFilter.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/InitialDqFilter.h
index 6ad3ac14cddd5a5d8e2cf6df7b0fcc7227f5fe58..0c1a5cbb0e69536b5dac5c0ba8d31635c667f5a0 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/InitialDqFilter.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/InitialDqFilter.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 MuonCalib__InitialDqFilter_h
@@ -23,13 +23,9 @@ class InitialDqFilter: public AthAlgTool, virtual public CalibSegmentPreparation
   public:
 //=========================constructor==========================================
     InitialDqFilter(const std::string &t, const std::string &n, const IInterface *p);
-    inline ~InitialDqFilter() {}
+    ~InitialDqFilter()=default;
 //=========================public member functions==============================
-    //initialize and finalize
     StatusCode initialize(void);
-    inline StatusCode finalize(void) {
-      return StatusCode :: SUCCESS;
-    }
     //load event
     void prepareSegments(const MuonCalibEvent *& /*event*/, std::map<NtupleStationId, MuonCalibSegment *> &segments);
   private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/RpcTimingCorr.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/RpcTimingCorr.h
deleted file mode 100644
index 527aa1ffd8a46e2d74103a7bf7db5dedc5bb1d22..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/RpcTimingCorr.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MuonCalib_RpcTimingCorr_H
-#define MuonCalib_RpcTimingCorr_H
-
-
-//Gaudi
-#include "GaudiKernel/ServiceHandle.h"
-
-//MuonCalibStandAloneBase
-#include "MuonCalibStandAloneBase/CalibSegmentPreparationTool.h"
-
-//root
-#include "TFile.h"
-#include "TTree.h"
-
-class RegionSelectionSvc;
-class StoreGateSvc;
-class RpcIdHelper;
-
-namespace MuonCalib {
-class IIdToFixedIdTool;
-class RPCClusterBuilder;
-class RPCCluster;
-
-class RpcTimingCorr : public AlgTool, virtual public CalibSegmentPreparationTool {
- public:
-//=========================constructor==========================================
-  RpcTimingCorr(const std::string &t, const std::string &n, const IInterface *p);
-  inline ~RpcTimingCorr() {}
-//=========================public member functions==============================
-  //initialize and finalize
-  StatusCode initialize(void);
-  StatusCode finalize(void);
-  //load event
-  void prepareSegments(const MuonCalibEvent *&event, std::map<NtupleStationId, MuonCalibSegment *> &segments);
- private:
-//=========================private data=========================================
-  bool m_strict_nhits_cut;
-  bool m_do_debug_ntuple;
-  //! pointer to region selection service
-  RegionSelectionSvc *p_reg_sel_svc;
-  StoreGateSvc *m_detStore;         // pointer to the detector store
-  const RpcIdHelper *m_RpcIdHelper; // pointer to the RPC ID helper
-		
-  std::string m_detector_store; // name of the detector store
-  std::string m_RPC_ID_helper;  // name of the RPC ID helper
-  std::string m_offset_file;
-  const MuonCalib::IIdToFixedIdTool *m_id_tool;
-  RPCClusterBuilder *m_cluster_builder;
-  //!debug ntuple
-  TFile *m_debug_file;
-  TTree *m_debug_tree;
-  Int_t m_n_strips;
-  Int_t m_station[100], m_eta[100], m_phi[100], m_double_r[100], m_double_z[100], m_double_phi[100], m_gas_gap[100], m_meas_phi[100], m_strip[100];
-  Int_t m_mdt_station, m_mdt_eta, m_mdt_phi;
-  Double_t m_t_corr, m_t_strip[100];
-  char m_mdt_station_str[4];
-  char m_station_str[100][4];
-  void fill_debug_rpc(const RPCCluster *cluster);
-};
-
-} //namespace MuonCalib
-#endif
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRawdataSelector.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRawdataSelector.h
index 30341e6c35fa4015225c449529029332b2f143a6..9c2d8f652a5b02c7a10b5342a83d11d97f90ebf7 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRawdataSelector.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRawdataSelector.h
@@ -32,7 +32,6 @@ class SegmentRawdataSelector : public AthAlgTool, virtual public CalibSegmentPre
   SegmentRawdataSelector(const std::string &t, const std::string &n, const IInterface *p);
   inline ~SegmentRawdataSelector()=default;
 //=========================public member functions==============================
-  //initialize and finalize
   StatusCode initialize();
 
   //load event
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRecalibration.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRecalibration.h
index 6af5b435dd7bb74da945fbca417f7973159f02b1..72a2ecc4bcdfda4e4b33566c26491a09c5cce7fc 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRecalibration.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRecalibration.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 MuonCalib_SegmentRecalibration_h
@@ -20,13 +20,9 @@ class SegmentRecalibration : public AthAlgTool, virtual public CalibSegmentPrepa
  public:
 //=========================constructor==========================================
   SegmentRecalibration(const std::string &t, const std::string  &n, const IInterface *p);
-  inline ~SegmentRecalibration() {}
+  ~SegmentRecalibration()=default;
 //=========================public member functions==============================
-  //initialize and finalize
   StatusCode initialize(void);
-  inline StatusCode finalize(void) {
-    return StatusCode :: SUCCESS;
-  }
   //load event
   void prepareSegments(const MuonCalibEvent *& /*event*/, std::map<NtupleStationId, MuonCalibSegment *> &segments);
  private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRefitter.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRefitter.h
index 6a3e644eb7a48c8fb90eb3ce0079adca2697f942..bb53fb2e9367f741987c86f6bee8ac855fa98205 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRefitter.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRefitter.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 MuonCalib_SegmentRefitter_h
@@ -23,13 +23,9 @@ class SegmentRefitter : public AthAlgTool, virtual public CalibSegmentPreparatio
  public:
 //=========================constructor==========================================
   SegmentRefitter(const std::string &t, const std::string &n, const IInterface *p);
-  inline ~SegmentRefitter() {}
+  ~SegmentRefitter()=default;
 //=========================public member functions==============================
-  //initialize and finalize
   StatusCode initialize(void);
-  inline StatusCode finalize(void) {
-    return StatusCode :: SUCCESS;
-  }
   //load event
   void prepareSegments(const MuonCalibEvent *& /*event*/, std::map<NtupleStationId, MuonCalibSegment *> &segments);
  private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRegionSelector.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRegionSelector.h
index 3369e9bec50e9e2e2a26c64f6c605f9b7b11ca7a..b44ae94948548f81cf605394a3b6df4855984312 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRegionSelector.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg/SegmentRegionSelector.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 MuonCalib_SegmentRegionSelector_h
@@ -20,13 +20,9 @@ class SegmentRegionSelector : public AthAlgTool, virtual public CalibSegmentPrep
   public:
 //=========================constructor==========================================
     SegmentRegionSelector(const std::string &t, const std::string &n, const IInterface *p);
-    inline ~SegmentRegionSelector() {}
+    ~SegmentRegionSelector()=default;
 //=========================public member functions==============================
-    //initialize and finalize
     StatusCode initialize(void);
-    inline StatusCode finalize(void) {
-      return StatusCode :: SUCCESS;
-    }
     //load event
     void prepareSegments(const MuonCalibEvent *&event, std::map<NtupleStationId, MuonCalibSegment *> &segments);
   private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/BFielCorrectionUpdateTool.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/BFielCorrectionUpdateTool.cxx
index 0548fc070e969cee9f714ccf045307cde581deb6..d457919d2319972a501d451df095b9911afca0e3 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/BFielCorrectionUpdateTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/BFielCorrectionUpdateTool.cxx
@@ -39,14 +39,6 @@ BFieldCorrectionUpdateTool::BFieldCorrectionUpdateTool(
 
 //*****************************************************************************
 
-//::::::::::::::::
-//:: DESTRUCTOR ::
-//::::::::::::::::
-BFieldCorrectionUpdateTool::~BFieldCorrectionUpdateTool(void) {
-}
-
-//*****************************************************************************
-
 //:::::::::::::::::::::::
 //:: METHOD initialize ::
 //:::::::::::::::::::::::
@@ -74,25 +66,6 @@ StatusCode BFieldCorrectionUpdateTool::initialize(void) {
 
 //*****************************************************************************
 
-//:::::::::::::::::::::
-//:: METHOD finalize ::
-//:::::::::::::::::::::
-StatusCode BFieldCorrectionUpdateTool::finalize(void) {
-
-/////////////
-// OBJECTS //
-/////////////
-
-/////////////
-// MESSAGE //
-/////////////
-  ATH_MSG_INFO( "Finalizing tool..." );
-
-  return StatusCode::SUCCESS;
-}
-
-//*****************************************************************************
-
 //::::::::::::::::::::::::::::
 //:: METHOD prepareSegments ::
 //::::::::::::::::::::::::::::
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/components/CalibNtupleAnalysisAlg_entries.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/components/CalibNtupleAnalysisAlg_entries.cxx
index 46c89c8e171e6c123c10276249d9933f77a94480..62d3acb077fcad0fa5d783ecbc700f7fe9172d47 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/components/CalibNtupleAnalysisAlg_entries.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg/src/components/CalibNtupleAnalysisAlg_entries.cxx
@@ -1,3 +1,7 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
 #include "CalibNtupleAnalysisAlg/CalibNtupleAnalysisAlg2.h"
 #include "CalibNtupleAnalysisAlg/BarrelSecondCoordinatePreparationTool.h"
 #include "CalibNtupleAnalysisAlg/BFieldCorrectionUpdateTool.h"
@@ -9,21 +13,15 @@
 #include "CalibNtupleAnalysisAlg/SegmentRecalibration.h"
 #include "CalibNtupleAnalysisAlg/SegmentRefitter.h"
 #include "CalibNtupleAnalysisAlg/InitialDqFilter.h"
-//#include "CalibNtupleAnalysisAlg/RpcTimingCorr.h"
 #include "CalibNtupleAnalysisAlg/ApplyRawTimes.h"
 #include "CalibNtupleAnalysisAlg/GoodRunListFilter.h"
 #include "CalibNtupleAnalysisAlg/MuonCalibGeometryDumper.h"
 
-
 using namespace MuonCalib;
 
 DECLARE_COMPONENT( CalibNtupleAnalysisAlg2 )
 DECLARE_COMPONENT( WriteMdtGeometry )
 DECLARE_COMPONENT( MuonCalibGeometryDumper )
-
-
-
-
 DECLARE_COMPONENT( BarrelSecondCoordinatePreparationTool )
 DECLARE_COMPONENT( BFieldCorrectionUpdateTool )
 DECLARE_COMPONENT( UpdateBField )
@@ -33,7 +31,5 @@ DECLARE_COMPONENT( SegmentRawdataSelector )
 DECLARE_COMPONENT( SegmentRecalibration )
 DECLARE_COMPONENT( InitialDqFilter )
 DECLARE_COMPONENT( SegmentRefitter )
-//DECLARE_COMPONENT( RpcTimingCorr )
 DECLARE_COMPONENT( ApplyRawTimes )
 DECLARE_COMPONENT( GoodRunListFilter )
-
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationFileIOTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationFileIOTool.h
index 674fdf23460e539426802b7f9bbb8eb02a836a3d..4a60ea77b7cd7b691cd9e2ccdb39483f695aebd4 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationFileIOTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationFileIOTool.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 CalibrationFileIOTool_H
@@ -24,11 +24,6 @@ class CalibrationFileIOTool : public AthAlgTool, virtual public CalibrationIOToo
   inline StatusCode initialize() {
     return StatusCode::SUCCESS;
   }
-  /** finalisation */
-  inline StatusCode finalize() {
-    ATH_MSG_INFO("CalibrationFileIOTool Finalize");
-    return StatusCode::SUCCESS;
-  }
   /** write out t0 */
   StatusCode WriteT0(MdtTubeFitContainer *t0_output, const NtupleStationId &station_id, int /*iov_start*/, int /*iov_end*/);
   /** write rt*/	
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationOracleFileIOTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationOracleFileIOTool.h
index d3ce3142125e1ce06130482a1d8f32e31e1f1a61..486af6bd38ecd72f141b78ba1c51fe28ebc507c3 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationOracleFileIOTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/CalibrationOracleFileIOTool.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 CalibrationOracleFileIOTool_H
@@ -24,11 +24,6 @@ class CalibrationOracleFileIOTool : public AthAlgTool, virtual public Calibratio
   inline StatusCode initialize() {
     return StatusCode::SUCCESS;
   }
-  /** finalisation */
-  inline StatusCode finalize() {
-    ATH_MSG_INFO( "CalibrationOracleFileIOTool Finalize" );
-    return StatusCode::SUCCESS;
-  }
   /** write out t0 */
   StatusCode WriteT0(MdtTubeFitContainer *t0_output, const NtupleStationId &station_id, int iov_start, int iov_end);
   /** write rt*/	
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/MdtCalibInputSvc.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/MdtCalibInputSvc.h
index aa172c56a2eb728fb8c301905e8d6219a1217c81..aef3a58b768df9d8776ae652ef83b1abad1a04a8 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/MdtCalibInputSvc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/MdtCalibIOSvc/MdtCalibInputSvc.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 MdtCalibInputSvc_H
@@ -46,9 +46,8 @@ class MdtCalibInputSvc: public AthService {
   /** just some crazy athena function */	
   virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown);
   /** service initalizer - reads files */
-  virtual StatusCode initialize(void);
-  /** service finalize function - does nothing */
-  virtual StatusCode finalize(void);
+  virtual StatusCode initialize();
+
   /** Get t0 container for Station */
   const MuonCalib::MdtStationT0Container* GetT0(const MuonCalib::NtupleStationId &id) const;
   /** Get rt relation container */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx
index 8fadc6946629e8835499f149c431cc49a4942c0b..c43f43b62db231c79593988e52f2af25182f30aa 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MdtCalibIOSvc/src/MdtCalibInputSvc.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
 */
 
 
@@ -59,10 +59,6 @@ StatusCode MdtCalibInputSvc::initialize() {
   return StatusCode::SUCCESS;
 }
 
-StatusCode MdtCalibInputSvc::finalize(void) {
-  return StatusCode::SUCCESS;
-}
-
 StatusCode MdtCalibInputSvc::queryInterface(const InterfaceID &riid, void **ppvUnknown) {
 
   if (IID_IMdtCalibInputSvc.versionMatch(riid)) { 
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneBase/src/RegionElement.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneBase/src/RegionElement.cxx
index 0fe0be79b7bffcb8c9f4f19db78de6d582076d14..faf313ae2a188bcd96c86e2f80d1a00a504062cf 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneBase/src/RegionElement.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneBase/src/RegionElement.cxx
@@ -1,20 +1,18 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//this
 #include "MuonCalibStandAloneBase/RegionElement.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+#include "MuonCalibIdentifier/MuonFixedId.h"
 
-//c - c++
 #include "sstream"
 #include <cstdlib>
 
-//MuonCalibIdentifier
-#include "MuonCalibIdentifier/MuonFixedId.h"
-
 namespace MuonCalib {	
 	
-bool RegionElement :: Initialize(std::string & region)
+bool RegionElement::Initialize(std::string & region)
 	{
 	m_region = region;
 	std::string inner_region(region, 1, region.size()-2);
@@ -60,12 +58,12 @@ bool RegionElement :: Initialize(std::string & region)
 	return true;
 	}
 
-void RegionElement :: Print(std::ostream & os) const
+void RegionElement::Print(std::ostream & os) const
 	{
 	os<<m_region;
 	}
 
-bool RegionElement :: Result(const MuonFixedId & id) const
+bool RegionElement::Result(const MuonFixedId & id) const
 	{
 //check for station
 	if(m_stations.size()!=0 && m_stations.find(id.stationName())==m_stations.end())
@@ -106,13 +104,13 @@ bool RegionElement :: Result(const MuonFixedId & id) const
 	return true;
 	}
 
-bool RegionElement :: process_station_name(std::string & substr)
+bool RegionElement::process_station_name(std::string & substr)
 	{
-	if(substr.size() > 3)
-		{
-		std::cerr<<"Syntax Error '"<<substr<<"'"<<std::endl;
+	if(substr.size() > 3) {
+		MsgStream log(Athena::getMessageSvc(),"RegionElement");
+		log<<MSG::WARNING<<"Syntax Error '"<<substr<<"'"<<endmsg;
 		return false;
-		}
+	}
 	std::string name_template("???");
 	for(unsigned int i=0; i<substr.size(); i++)
 		{
@@ -140,7 +138,7 @@ bool RegionElement :: process_station_name(std::string & substr)
 	return true;
 	}
 
-bool RegionElement :: process_int_range(std::string &substr, std::vector<int> &target_start, std::vector<int> &target_end)
+bool RegionElement::process_int_range(std::string &substr, std::vector<int> &target_start, std::vector<int> &target_end)
 	{
 //check for - in substring
 	std::string begin_range[2];
@@ -170,16 +168,17 @@ bool RegionElement :: process_int_range(std::string &substr, std::vector<int> &t
 					begin_number=false;
 					break;
 					}
-				if(n_substrings>0)
-					{
-					std::cerr<<"Surplus '-' in "<<substr<<std::endl;
+				if(n_substrings>0) {
+					MsgStream log(Athena::getMessageSvc(),"RegionElement");
+					log<<MSG::WARNING<<"Surplus '-' in "<<substr<<endmsg;
 					return false;
-					}
+				}
 				begin_number=true;	
 				n_substrings=1;
 				break;
 			default:
-				std::cerr<<"Syntax error in "<<substr<<std::endl;
+				MsgStream log(Athena::getMessageSvc(),"RegionElement");
+				log<<MSG::WARNING<<"Syntax error in "<<substr<<endmsg;
 				return false;
 			}
 		}
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/CalibExtraNtupleLoader.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/CalibExtraNtupleLoader.h
index 8faa409b91637bf285ef27ede5a20668813986fe..5691b050e5cc65742cd7233c84697bb90cc10d63 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/CalibExtraNtupleLoader.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/CalibExtraNtupleLoader.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 MuonCalib_CalibExtraNtupleLoader_h
@@ -28,13 +28,10 @@ class CalibExtraNtupleLoader: public AthAlgTool, virtual public CalibSegmentPrep
  public:
 //=========================constructor==========================================
   CalibExtraNtupleLoader(const std::string &t, const std::string &n, const IInterface *p);
-  inline ~CalibExtraNtupleLoader() {}
+  ~CalibExtraNtupleLoader()=default;
 //=========================public member functions==============================
-  //initialize and finalize
   StatusCode initialize(void);
-  inline StatusCode finalize(void) {
-    return StatusCode::SUCCESS;
-  }
+
   //load event
   void prepareSegments(const MuonCalibEvent *&event, std::map<NtupleStationId, MuonCalibSegment *> &segments);
  private:
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/MdtDqaNtupleAnalysis.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/MdtDqaNtupleAnalysis.h
index 4ec3d35a9c5e8e8422df75f1aa327c69ab4da900..8d20c20e17addb4e9a6e755eaaf79dbff34b5ee9 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/MdtDqaNtupleAnalysis.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools/MuonCalibStandAloneExtraTools/MdtDqaNtupleAnalysis.h
@@ -6,6 +6,11 @@
 #define SRC_MDTDQANTUPLEANALYSIS_H
 
 #include "GaudiKernel/Algorithm.h"
+#include "MuonCalibStandAloneExtraTools/StringUtil.h"
+#include "MuonCalibStandAloneExtraTools/HistogramManager.h"
+#include "MuonCalibStandAloneExtraTools/MdtDqaDb.h"
+#include "MuonCalibStandAloneExtraTools/MDTDqaDeadElements.h"
+#include "MuonCalibStandAloneBase/RegionSelectionSvc.h"
 
 #include <iostream>
 #include <vector>
@@ -17,20 +22,10 @@
 
 #include "TFile.h"
 
-#include "MuonCalibStandAloneExtraTools/StringUtil.h"
-#include "MuonCalibStandAloneExtraTools/HistogramManager.h"
-#include "MuonCalibStandAloneExtraTools/MdtDqaDb.h"
-#include "MuonCalibStandAloneExtraTools/MDTDqaDeadElements.h"
-
-#include "MuonCalibStandAloneBase/RegionSelectionSvc.h"
-
-class RegionSelectionSvc;
-
 namespace MuonCalib {
 
   class MuonCalibEvent;
   class MuonCalibSegment;
-  class MuonRawHitCollection;
 
   /**
      @class NtupleAnalysis
@@ -40,10 +35,9 @@ namespace MuonCalib {
   class MdtDqaNtupleAnalysis {
   public:
     MdtDqaNtupleAnalysis(bool verbose, std::string outputFileName);     //!< default constructor
-    virtual ~MdtDqaNtupleAnalysis() = default;   //!< destructor
+    virtual ~MdtDqaNtupleAnalysis()=default;
 
     StatusCode initialize(RegionSelectionSvc *, HistogramManager *, int, float);
-    StatusCode finalize();
     
     void handleEvent(const MuonCalibEvent &event, int eventnumber, const std::vector<MuonCalibSegment *> &segments, unsigned int position );  
     void histogramAnalysis(TFile * rootfile);
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleAnalyticAutocalibrationTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleAnalyticAutocalibrationTool.h
index 0f6b705f69e0e233d1cce2c3a82a9fe8518c654e..5d4c3404ea704a1b4daeb8ebb5bf8407ac88972a 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleAnalyticAutocalibrationTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleAnalyticAutocalibrationTool.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 NtupleAnalyticAutocalibrationTool_H
@@ -30,11 +30,7 @@ class NtupleAnalyticAutocalibrationTool : public AthAlgTool, virtual public Ntup
 		NtupleAnalyticAutocalibrationTool(const std::string& t, const std::string& n, const IInterface* p);
 	/** Tool initialization */
 		StatusCode initialize();
-	/** Tool finalization */
-		inline StatusCode finalize()
-			{
-			return StatusCode::SUCCESS;
-			}
+
 	/** analyze segments */
 		StatusCode analyseSegments(const std::vector<MuonCalibSegment *> & segemnts);
 	/** set calibratino region */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleClassicT0Tool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleClassicT0Tool.h
index a0d89fa7884fba384784046139f464a45171b20f..d36919d2a1a3e13e879ebf6609d3940a90323552 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleClassicT0Tool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleClassicT0Tool.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 _NtupleClassicT0Tool_H
@@ -31,11 +31,7 @@ class NtupleClassicT0Tool: public AthAlgTool, virtual public NtupleCalibrationTo
 		NtupleClassicT0Tool(const std::string& t, const std::string& n, const IInterface* p);
 	/** tool initialization */
 		StatusCode initialize();
-	/** tool finalization */
-		inline StatusCode finalize()
-			{
-			return StatusCode::SUCCESS;
-			}
+
 	/**analyse event - fill hits into specra*/
 		StatusCode handleEvent(const MuonCalibEvent &/*event*/, int /*evnt_nr*/, const std::vector<MuonCalibSegment *> &segments, unsigned int position);
 	/** analyze segments */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleCurvedAutocalibrationTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleCurvedAutocalibrationTool.h
index a2d913a8718ffad9b305a34a7591605053357e0b..7407769e5a460ba97cc1435526827d4e2bf2e9cf 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleCurvedAutocalibrationTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleCurvedAutocalibrationTool.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 NtupleCurvedAutocalibrationTool_H
@@ -31,11 +31,7 @@ class NtupleCurvedAutocalibrationTool : public AthAlgTool, virtual public Ntuple
 		NtupleCurvedAutocalibrationTool(const std::string& t, const std::string& n, const IInterface* p);
 	/** Tool initialization */
 		StatusCode initialize();
-	/** Tool finalization */
-		inline StatusCode finalize()
-			{
-			return StatusCode::SUCCESS;
-			}
+
 	/** analyze segments */
 		StatusCode analyseSegments(const std::vector<MuonCalibSegment *> & segemnts);
 	/** set calibratino region */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMDTChamberGeometryDeterminationTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMDTChamberGeometryDeterminationTool.h
deleted file mode 100644
index 4459e59a042265b4a1a3d21cd3e41dda6cd2d01f..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMDTChamberGeometryDeterminationTool.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// 06.07.2007, AUTHOR: OLIVER KORTNER
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-#ifndef MuonCalib_MDTChamberGeometryDeterminationH
-#define MuonCalib_MDTChamberGeometryDeterminationH
-
-//:::::::::::::::::::::::::::::::::::::::::::::::::::::
-//:: CLASS NtupleMDTChamberGeometryDeterminationTool ::
-//:::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-/// \class NtupleMDTChamberGeometryDeterminationTool
-///
-/// This class can be used to measure the positions of tube, layer, or
-/// multilayer positions and orientations with respect to a selected multilayer
-/// of the same chamber. The class uses straight muon tracks for the geometry
-/// determination.
-///
-/// \author Oliver.Kortner@CERN.CH
-///
-/// \date 06.07.2007
-
-//::::::::::::::::::
-//:: HEADER FILES ::
-//::::::::::::::::::
-
-// CLHEP //
-#include "CLHEP/Units/SystemOfUnits.h"
-#include "CLHEP/Units/PhysicalConstants.h"
-#include "CLHEP/Matrix/SymMatrix.h"
-#include "CLHEP/Matrix/Vector.h"
-
-// ROOT //
-#include "TFile.h"
-#include "TH1.h"
-#include "TH2.h"
-#include "TNtuple.h"
-
-#include "AthenaBaseComps/AthAlgTool.h"
-
-// AtlasConditions //
-#include "MuonIdHelpers/MdtIdHelper.h"
-
-// MuonCalib //
-#include "MdtCalibFitters/QuasianalyticLineReconstruction.h"
-#include "MuonCalibStandAloneBase/NtupleCalibrationTool.h"
-#include "MuonCalibStandAloneBase/NtupleStationId.h"
-
-class MdtCalibInputSvc;
-
-namespace MuonCalib {
-
-class IIdToFixedIdTool;
-
-class NtupleMDTChamberGeometryDeterminationTool : public AthAlgTool,
-					virtual public NtupleCalibrationTool {
-
-public:
-// Constructors //
-	NtupleMDTChamberGeometryDeterminationTool(const std::string & t,
-				const std::string & n, const IInterface * p);
-	///< Constructor of the tool.
-
-	~NtupleMDTChamberGeometryDeterminationTool(void);
-	///< Destructor of the tool.
-
-// Methods //
-// methods requires by the base classes //
-	StatusCode initialize(void);
-					///< initialization of the tool
-	StatusCode finalize(void);
-					///< finalization of the tool;
-					///< a text file with the corrected
-					///< geometry and the initial geometry
-					///< of the investigated chambers is
-					///< written
-	StatusCode handleEvent(const MuonCalibEvent & event, int evnt_nb,
-			const std::vector<MuonCalibSegment *> & segments,
-			unsigned int position);
-					///< analysis of the event
-	bool KeepSegments(void) const;
-					///< returns true, if segments should
-					///< be stored in memory, false
-					///< otherwise
-
-private:
-// job options //
-	bool m_write_control_histograms; // = true, if control histograms should
-					 //         be written;
-					 // = false, if no control histgrams
-					 //         should be written
-	std::string m_granularity; // = "TUBE", if the positions of single
-				   //           wires should be determined;
-				   // = "LAYER", if the positions and
-				   //            orientations of multilayers
-				   //            should be determined;
-				   // = "MULTILAYER", if the position and
-				   //                 orientation of multilayers
-				   //                 should be determined
-	unsigned int m_reference_ml; // reference multilayer
-	double m_road_width; // road width for pattern recognition
-	std::string m_geometry_file_name; // name of the geometry file
-	std::string m_MDT_ID_helper; // name of the MDT ID helper
-	std::string m_idToFixedIdToolType; // type of the muon fixed id tool
-	std::string m_idToFixedIdToolName; // name of the muon fixed id tool
-	std::string m_ROOT_file_name; // name of the output ROOT file
-
-// ROOT file and control ntuple //
-	TFile *m_tfile; // pointer to the ROOT file in which the control
-			// histograms are written on request
-	TNtuple *m_ntuple; // control ntuple
-
-
-// calibration parameters //
-	ServiceHandle<MdtCalibInputSvc> m_input_service; // pointer to the calibration input
-					   // service
-
-// chamber parameters //
-	std::map<NtupleStationId, unsigned int> m_nb_ml; // number of
-							 // multilayers
-	std::map<NtupleStationId, unsigned int> m_nb_ly; // number of layers per
-							 // multilayer
-	std::map<NtupleStationId, unsigned int> m_nb_tb; // number of tubes per
-						         // layer
-
-// straight-line fitters //
-	QuasianalyticLineReconstruction m_qfitter; // needed for pattern
-						   // recognition
-	DCSLFitter m_dfitter; // good refitter
-
-// variables for the geometry determination //
-	unsigned int m_grouping; // = 1, if the positions of single wires should
-				 //      be determined;
-				 // = 2, if the positions and orientations of 
-				 //      multilayers should be determined;
-				 // = 3, if the positions and orientations of
-				 //      multilayers should be determined
-	unsigned int m_index_counter; // auxiliary index counter
-	std::map< NtupleStationId, unsigned int > m_index;
-				// map of indices to allow for the access to the
-				// alignment objects;
-				// this is used as a temporary solution for
-				// problems with maps of vectors of HepVectors
-	std::vector< std::vector<CLHEP::HepVector> > m_v; // vectors of alignment 
-						     // parameters
-	std::vector< std::vector<CLHEP::HepSymMatrix> > m_A; // alignment equation
-							// m_A*m_v = m_B
-	std::vector< std::vector<CLHEP::HepVector> > m_B; // alignment equation:
-						     // m_A*m_v = m_B
-
-// bookkeeping in order to write the geometry file //
-	std::map<NtupleStationId, MuonFixedId> m_id; // station identifiers
-	std::vector< std::vector<CLHEP::Hep3Vector> > m_RO; // read-out sides of the
-						     // wires
-	std::vector< std::vector<CLHEP::Hep3Vector> > m_HV; // high-voltage sides of
-						     // the wires
-	// The end of the anode wires are needed because storegate  and //
-	// geomodel might be finalized before this tool.                //
-
-// helpers //
-	const MdtIdHelper *m_MdtIdHelper; // pointer to the MDT ID helper
-	const MuonCalib::IIdToFixedIdTool *m_id_tool; // identifier converter
-
-// private methods //
-	void createMaps(const MuonFixedId & id);
-					// create the maps for the given
-					// station id if they do not
-					// exist
-	void determineMispositioning(void); // determine the mispositioning of
-					    // selected objects (tubes, layers,
-					    // or multilayers)
-	void writeOutGeometry(void); // method which writes the initial and
-				     // final geometry to a text file
-
-};
-
-}
-
-#endif
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMTT0Tool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMTT0Tool.h
index 8a8df43c42eac547a9e0217a1a4104a8c2979193..e4af5a0585f62bc43231f408ab68bf58ddff812c 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMTT0Tool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleMTT0Tool.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 _NtupleMTT0Tool_H
@@ -31,11 +31,7 @@ class NtupleMTT0Tool: public AthAlgTool, virtual public NtupleCalibrationTool
 		NtupleMTT0Tool(const std::string& t, const std::string& n, const IInterface* p);
 	/** tool initialization */
 		StatusCode initialize();
-	/** tool finalization */
-		inline StatusCode finalize()
-			{
-			return StatusCode::SUCCESS;
-			}
+
 	/**analyse event - fill hits into specra*/
 		StatusCode handleEvent(const MuonCalibEvent &/*event*/, int /*evnt_nr*/, const std::vector<MuonCalibSegment *> &segments, unsigned int position);
 	/** end of events analysis */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleSimpleresolutionTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleSimpleresolutionTool.h
index 10093464ddd7acc44bfe16fa0d750aa67d3caaad..3dca009b1d61397c823704cabb54fe424ffbed20 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleSimpleresolutionTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleSimpleresolutionTool.h
@@ -1,24 +1,15 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// 23.04.2007, AUTHOR: I. POTRAP AND O. KORTNER
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
 #ifndef NtupleSimpleResolutionToolH
 #define NtupleSimpleResolutionToolH
 
-//////////////////
-// HEADER FILES //
-//////////////////
-
-//this
 #include "MuonCalibStandAloneBase/NtupleCalibrationTool.h"
 #include "MuonCalibStandAloneBase/RegionSelectionSvc.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
-//c - c++
+
 #include "string"
 #include "vector"
 
@@ -26,40 +17,27 @@
 
 /* ROOT */
 class TFile;
-class TH1F;
 class TH2F;
 class TF1;
 class TGraphErrors;
-class TTree;
-
 
 class MdtCalibInputSvc;
+
 namespace MuonCalib {
 
-/** MuonCalib **/
 class MuonCalibSegment;
 class IRtRelation;
 
-class NtupleStationId;
-
-
 class NtupleSimpleResolutionTool :  public AthAlgTool, virtual public NtupleCalibrationTool
 	{
 public:
 /** Constructors **/
 	NtupleSimpleResolutionTool(const std::string& t, const std::string& n, const IInterface* p);
 
-	inline virtual ~NtupleSimpleResolutionTool(void) {
-		destruct();
-		}
+	virtual ~NtupleSimpleResolutionTool()=default;
 
 /** Tool initialize **/
 	StatusCode initialize();
-/** Tool finalize **/
-	inline StatusCode finalize()
-		{
-		return StatusCode :: SUCCESS;
-		}
 
 /** Is called at the end of the analysis - The argumet is only there to overload the interface function*/
 	StatusCode analyseSegments(const std::vector<MuonCalibSegment *> & segemnts);
@@ -129,7 +107,6 @@ private:
 /* is true if initialize is called - needed for genvonf */
 	bool m_is_initialized;
 
-/*	TFile *m_sfile; // ROOT file */
 	TFile *m_outfile;
 
 	TH2F *m_residual;
@@ -144,13 +121,6 @@ private:
 	TF1 *m_sprfun_r; //
 	TGraphErrors *m_sprgr;
 	TGraphErrors *m_sprgr_r;
-/*
-	TTree *m_ntuple; // ntuple for debug purposes
-// Declaration of Ntuple variables
-	int hit_st_name, hit_eta, hit_phi, hit_layer, hit_number_hits;
-	double hit_drift_time, hit_drift_radius, hit_sigma_drift_radius, hit_sigma_distance_to_track;
-	double hit_radial_residual, hit_track_direction, hit_signed_distance;	
-*/
 
 /* private methods */
 	void destruct(void); /* destruction routine */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleWireCentricityTool.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleWireCentricityTool.h
index 248f66d593ca8ae3537a7e81a4be62d8ae964796..e92b55bb778bed64249611dc480cd20f9f25bd1f 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleWireCentricityTool.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/MuonCalibStandAloneTools/NtupleWireCentricityTool.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 MUONCALIBSTANDALONETOOLS_NTUPLEWIRECENTRICITYTOOL_H
@@ -42,11 +42,7 @@ class NtupleWireCentricityTool : public AthAlgTool, virtual public NtupleCalibra
 		NtupleWireCentricityTool(const std::string& t, const std::string& n, const IInterface* p);
 	/** tool initialization */
 		StatusCode initialize();
-	/** tool finalization */
-		inline StatusCode finalize()
-			{
-			return StatusCode::SUCCESS;
-			}
+
 	/**analyse event - fill hits into specra*/
 		StatusCode handleEvent(const MuonCalibEvent &/*event*/, int /*evnt_nr*/, const std::vector<MuonCalibSegment *> &segments, unsigned int position);
 	/** end of events analysis */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/src/HitCounter.cxx b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/src/HitCounter.cxx
index 7ebc93fac9466eb060a474ed2ca16778f96420ee..5cd36156b70354f7251748af99efc769e88f252a 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/src/HitCounter.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools/src/HitCounter.cxx
@@ -2,30 +2,25 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-//c - c++
-#include "iostream"
-
-//root
-#include "TDirectory.h"
-#include "TH1.h"
-
-//MuonCalibEventBase
 #include "MuonCalibEventBase/MuonCalibSegment.h"
 #include "MuonCalibEventBase/MdtCalibHitBase.h"
-
-//this
 #include "MuonCalibStandAloneTools/HitCounter.h"
+#include "GaudiKernel/MsgStream.h"
+#include "AthenaKernel/getMessageSvc.h"
+
+#include "iostream"
+#include "TDirectory.h"
+#include "TH1.h"
 
 namespace MuonCalib {
 
-bool HitCounter :: Initialize(const NtupleStationId &id)
-	{
+bool HitCounter::Initialize(const NtupleStationId &id) {
 	m_id=id;
-	if(id.NMultilayers() == -1)
-		{
-		std::cerr<<"HitCounter :: Initialize:Geometry for idenifier not initialized!"<<std::endl;
+	if(id.NMultilayers() == -1) {
+		MsgStream log(Athena::getMessageSvc(),"HitCounter");
+		log<<MSG::WARNING<<"HitCounter::Initialize:Geometry for idenifier not initialized!"<<endmsg;
 		return false;
-		}
+	}
 	m_per_chamber=0;
 	for(int i=0; i<id.NMultilayers(); i++)
 		{
@@ -58,10 +53,10 @@ bool HitCounter :: Initialize(const NtupleStationId &id)
 	}
 
 
-void HitCounter :: ProcessSegment(const MuonCalibSegment & segment)
+void HitCounter::ProcessSegment(const MuonCalibSegment & segment)
 	{
 	m_hits_per_segments->Fill(static_cast<Axis_t>(segment.hitsOnTrack()));
-	MuonCalibSegment :: MdtHitCit it(segment.mdtHOTBegin());
+	MuonCalibSegment::MdtHitCit it(segment.mdtHOTBegin());
 	for(; it!=segment.mdtHOTEnd(); it++)
 		{
 		m_per_chamber++;
@@ -80,7 +75,7 @@ void HitCounter :: ProcessSegment(const MuonCalibSegment & segment)
 		}
 	}
 
-const std::string & HitCounter :: FittingBy(int min_hits, double bad_fit_rate)
+const std::string & HitCounter::FittingBy(int min_hits, double bad_fit_rate)
 	{
 	m_wd->cd();
 //try per tube
@@ -91,7 +86,7 @@ const std::string & HitCounter :: FittingBy(int min_hits, double bad_fit_rate)
 	for (int i=1; i<=576; i++)
 		tubes_index->SetBinContent(i, -1.0);
 	m_fit_by_int = -1;
-	for(std::map<TubeId, int> :: const_iterator it=m_per_tube.begin(); it!=m_per_tube.end(); it++)
+	for(std::map<TubeId, int>::const_iterator it=m_per_tube.begin(); it!=m_per_tube.end(); it++)
 		{
 		if(it->second>0)
 			{
@@ -117,7 +112,7 @@ const std::string & HitCounter :: FittingBy(int min_hits, double bad_fit_rate)
 	n_bad=0; n_total=0;
 	index=0.0;
 	TH1F *mezzanaines = new TH1F("Mezzanine", "Mezzanine", m_per_mezz.size(), -0.5, m_per_mezz.size() - 0.5);
-	for(std::map<MezzId, int> :: const_iterator it=m_per_mezz.begin(); it!=m_per_mezz.end(); it++)
+	for(std::map<MezzId, int>::const_iterator it=m_per_mezz.begin(); it!=m_per_mezz.end(); it++)
 		{
 		if(it->second > 0)
 			{
@@ -141,7 +136,7 @@ const std::string & HitCounter :: FittingBy(int min_hits, double bad_fit_rate)
 	n_bad=0; n_total=0;
 	index=0.0;
 	TH1F *mls = new TH1F("Multilayers", "Mulitlayers", m_per_ml.size(), -0.5, m_per_ml.size() - 0.5);
-	for(std::map<int, int> :: const_iterator it=m_per_ml.begin(); it!=m_per_ml.end(); it++)
+	for(std::map<int, int>::const_iterator it=m_per_ml.begin(); it!=m_per_ml.end(); it++)
 		{
 		if(it->second > 0)
 			{
@@ -176,11 +171,11 @@ const std::string & HitCounter :: FittingBy(int min_hits, double bad_fit_rate)
 	return m_fit_by;
 	}
 
-std::map<HitCounter::TubeId, HitCounter::DQInfo> HitCounter :: InitialDQ(int noisy_tube_factor) const
+std::map<HitCounter::TubeId, HitCounter::DQInfo> HitCounter::InitialDQ(int noisy_tube_factor) const
 	{
 	double mean_nhits(0.0);
 	double n(0.0);
-	for(std::map<TubeId, int> :: const_iterator it=m_per_tube.begin(); it!=m_per_tube.end(); it++)
+	for(std::map<TubeId, int>::const_iterator it=m_per_tube.begin(); it!=m_per_tube.end(); it++)
 		{
 		if(it->second>0)
 			{
@@ -190,7 +185,7 @@ std::map<HitCounter::TubeId, HitCounter::DQInfo> HitCounter :: InitialDQ(int noi
 		}
 	mean_nhits=n/mean_nhits;
 	std::map<TubeId, DQInfo> ret;
-	for(std::map<TubeId, int> :: const_iterator it=m_per_tube.begin(); it!=m_per_tube.end(); it++)
+	for(std::map<TubeId, int>::const_iterator it=m_per_tube.begin(); it!=m_per_tube.end(); it++)
 		{
 		if(it->second == 0) 
 			ret[it->first].SetDead();
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/CMakeLists.txt b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/CMakeLists.txt
deleted file mode 100644
index 4891e4f92e9104dfd8f52e95feab203b04be61c3..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-################################################################################
-# Package: RpcCalibTools
-################################################################################
-
-# Declare the package name:
-atlas_subdir( RpcCalibTools )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthLinks
-                          Control/StoreGate
-                          GaudiKernel
-                          MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-                          MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools
-                          Tracking/TrkDetDescr/TrkGeometry
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkTrack
-                          Tracking/TrkExtrapolation/TrkExInterfaces
-                          PRIVATE
-                          MuonSpectrometer/MuonIdHelpers
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData
-                          Tracking/TrkEvent/TrkMeasurementBase
-                          Tracking/TrkEvent/TrkRIO_OnTrack )
-
-# Component(s) in the package:
-atlas_add_library( RpcCalibToolsLib
-                   src/*.cxx
-                   PUBLIC_HEADERS RpcCalibTools
-                   LINK_LIBRARIES AthenaBaseComps AthLinks GaudiKernel MuonReadoutGeometry TrkGeometry TrkParameters TrkTrack TrkExInterfaces StoreGateLib SGtests MuonIdHelpersLib TrackRecordLib
-                   PRIVATE_LINK_LIBRARIES MuonPrepRawData TrkMeasurementBase TrkRIO_OnTrack )
-
-atlas_add_component( RpcCalibTools
-                     src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps AthLinks StoreGateLib SGtests GaudiKernel MuonReadoutGeometry TrkGeometry TrkParameters TrkTrack TrkExInterfaces MuonIdHelpersLib MuonPrepRawData TrkMeasurementBase TrkRIO_OnTrack RpcCalibToolsLib )
-
-# Install files from the package:
-atlas_install_joboptions( share/*.py )
-
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/RpcCalibTools/RpcExtrapolationTool.h b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/RpcCalibTools/RpcExtrapolationTool.h
deleted file mode 100644
index 41ef737c56de8e178a1859c853237df3615d9cc2..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/RpcCalibTools/RpcExtrapolationTool.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef RPC_EXTRAPOLATIONTOOL
-#define  RPC_EXTRAPOLATIONTOOL
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "MuonReadoutGeometry/RpcReadoutElement.h"
-#include "AthLinks/DataLink.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "MuonIdHelpers/IMuonIdHelperSvc.h"
-#include "TrkGeometry/TrackingGeometry.h"
-#include "TrkTrack/TrackCollection.h"
-#include "TrkExInterfaces/IExtrapolator.h"
-#include "TrkExInterfaces/INavigator.h"
-#include "TrkExInterfaces/IPropagator.h"
-#include "MuonTGRecTools/IMuonTGMeasTool.h"
-#include "TrkParameters/TrackParameters.h"
-#include "MuonTGRecTools/MuonHolesOnTrackTool.h"
-
-namespace Muon{
-  class MuonTGMeasurementTool;
-}
-
-struct RpcExtrapolationResults{
-
-  Identifier id;
-  const Trk::TrackParameters* params;
-};
-
-class RpcExtrapolationTool: public AthAlgTool{
-
-
- public:
-
-  RpcExtrapolationTool(const std::string& type, const std::string& name,
-			  const IInterface* parent );
-  virtual ~RpcExtrapolationTool() {};
-
-  static const InterfaceID& interfaceID( );
-  
-  virtual StatusCode initialize();
-
-  void getRpcIntersections(TrackCollection::const_iterator theTrack, std::vector<RpcExtrapolationResults> &theResult);
-
- private:
-
-  bool m_cosmicMode;
-  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-  ToolHandle<Trk::IPropagator>                 m_propagator;
-  ToolHandle<Trk::INavigator>                       m_navigator;    
-  ToolHandle<Trk::IExtrapolator>      m_extrapolator;
-  ToolHandle<Muon::IMuonTGMeasTool>                  m_measTool;
-  ToolHandle<Trk::ITrackHoleSearchTool>             m_holesTool;
-  const DataHandle<Trk::TrackingGeometry> m_trackingGeometry;
-
-};
-
-
-#endif
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/RpcCalibTools/RpcResidualsTool.h b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/RpcCalibTools/RpcResidualsTool.h
deleted file mode 100644
index 595f741bba64b59da535c5bbffce91e3c685fee9..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/RpcCalibTools/RpcResidualsTool.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef RPC_RESIDUALTOOL
-#define RPC_RESIDUALTOOL
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "MuonReadoutGeometry/MuonDetectorManager.h"
-#include "MuonReadoutGeometry/RpcReadoutElement.h"
-#include "AthLinks/DataLink.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "MuonIdHelpers/IMuonIdHelperSvc.h"
-#include "TrkGeometry/TrackingGeometry.h"
-#include "TrkTrack/TrackCollection.h"
-#include "TrkExInterfaces/IExtrapolator.h"
-#include "TrkExInterfaces/INavigator.h"
-#include "TrkExInterfaces/IPropagator.h"
-#include "MuonTGRecTools/IMuonTGMeasTool.h"
-#include "TrkParameters/TrackParameters.h"
-#include "RpcCalibTools/RpcExtrapolationTool.h"
-
-class IRegSelSvc;
-
-struct RpcResiduals{
-
-  Identifier id;
-  float residual;
-  int csize;
-  float pitch;
-  float time;
-  int hasTwin;
-  const Trk::TrackParameters* params;
-
-};
-
-class RpcResidualsTool: public AthAlgTool{
-
- public:
-
-  RpcResidualsTool(const std::string& type, const std::string& name,
-			  const IInterface* parent );
-  virtual ~RpcResidualsTool() {};
-
-  static const InterfaceID& interfaceID( );
-  
-  virtual StatusCode initialize();
-
-  void getRpcResiduals(TrackCollection::const_iterator theTrack, std::vector<RpcResiduals> &theResult);
-
-  Identifier GetTwinPanel(Identifier id);
-  Identifier GetTwinViewPanel(Identifier id);
-
- private:
-
-  std::string m_clusCollection;
-  ActiveStoreSvc* m_activeStore;
-
-  // MuonDetectorManager from the conditions store
-  SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_DetectorManagerKey {this, "DetectorManagerKey", 
-      "MuonDetectorManager", 
-      "Key of input MuonDetectorManager condition data"};    
-  
-  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
-  RpcExtrapolationTool*           m_rpcExtrapolTool;
-};
-
-
-#endif
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/share/RpcExtrapolTool_jobOptions.py b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/share/RpcExtrapolTool_jobOptions.py
deleted file mode 100644
index b4ce309d8c345732c7ae03c3b2ec539036f0210e..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/share/RpcExtrapolTool_jobOptions.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# the geometry builder alg tool
-#from TrkDetDescrTools.TrkDetDescrToolsConf import Trk__GeometryBuilder
-
-#GeometryBuilder = Trk__GeometryBuilder(name = 'AtlasGeometryBuilder')
-# register it to tool svc
-#ToolSvc += AtlasGeometryBuilder
-
-#AtlasGeometryBuilder.MuonTrackingGeometry    = True
-#from MuonTrackingGeometry.ConfiguredMuonTrackingGeometry import MuonTrackingGeometryBuilder
-
-#MuonTrackingGeometryBuilder.BuildActiveMaterial = True
-#AtlasGeometryBuilder.MuonTrackingGeometryBuilder = MuonTrackingGeometryBuilder
-
-
-#from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator as STEP_Propagator
-#STEP_Propagator = STEP_Propagator(name = 'STEP_Propagator')
-#ToolSvc += STEP_Propagator
-
-# the Extrapolator
-#from TrkExTools.TrkExToolsConf import Trk__Extrapolator
-#Extrapolator = Trk__Extrapolator( name = 'Extrapolator',
-#                                 Propagators = [ STEP_Propagator])
-#ToolSvc += Extrapolator
-
-from RpcCalibTools.RpcCalibToolsConf import RpcExtrapolationTool
-RpcExtrapolationTool = RpcExtrapolationTool('RpcExtrapolationTool')
-ToolSvc+=RpcExtrapolationTool
-
-from MuonTGRecTools.MuonTGRecToolsConf import Muon__MuonTGMeasurementTool
-MuonTGMeasurementTool = Muon__MuonTGMeasurementTool(  name = 'MuonTGMeasurementTool',
-                                                      TrackingGeometryName = 'AtlasTrackingGeometry' )
-ToolSvc += MuonTGMeasurementTool
-
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/RpcExtrapolationTool.cxx b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/RpcExtrapolationTool.cxx
deleted file mode 100644
index efa25d3ddd1e1b9d6309475f6886f492b95da432..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/RpcExtrapolationTool.cxx
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "RpcCalibTools/RpcExtrapolationTool.h"
-
-#include "TrkParameters/TrackParameters.h"
-#include "TrkMeasurementBase/MeasurementBase.h"
-#include "TrkExInterfaces/IPropagator.h"
-#include "TrkGeometry/MagneticFieldProperties.h"
-#include "TrkMeasurementBase/MeasurementBase.h"
-#include "TrkTrack/Track.h"
-#include "MuonTGRecTools/MuonTGMeasurementTool.h"
-#include "MuonPrepRawData/MuonPrepDataContainer.h"
-#include "TrkRIO_OnTrack/RIO_OnTrack.h" 
-
-static const InterfaceID IID_IRpcExtrapolationTool("RpcExtrapolationTool", 1, 0);
-
-const InterfaceID& RpcExtrapolationTool::interfaceID( ) { 
-  return IID_IRpcExtrapolationTool; 
-}
-
-RpcExtrapolationTool::RpcExtrapolationTool
-( const std::string& type, const std::string& name,const IInterface* parent )
-  :  AthAlgTool(type,name,parent),
-     m_propagator("Trk::StraightLinePropagator/MuonStraightLinePropagator"),
-     m_navigator("Trk::Navigator/MuonNavigator"),
-     m_extrapolator("Trk::Extrapolator/MuonSTEP_Extrapolator"),
-     m_measTool("Muon::MuonTGMeasurementTool/MuonTGMeasurementTool"),
-     m_holesTool("Muon::MuonHolesOnTrackTool/MuonHolesOnTrackTool")
-
-{
-  declareInterface< RpcExtrapolationTool  >( this );
-  declareProperty("CosmicMode",m_cosmicMode=false);
-}
-
-StatusCode RpcExtrapolationTool::initialize(){
-
-  ATH_MSG_DEBUG( "in initialize()" );
-
-  // Get the Navigation AlgTools
-  ATH_CHECK( m_navigator.retrieve() );
-
-  // get extrapolator
-  ATH_CHECK( m_extrapolator.retrieve() );
-
-  ATH_CHECK( m_idHelperSvc.retrieve() );
-  
-  ATH_CHECK( m_holesTool.retrieve() );
-
-  return StatusCode::SUCCESS;  
-
-}
-
-void RpcExtrapolationTool::getRpcIntersections(TrackCollection::const_iterator theTrack, std::vector<RpcExtrapolationResults> &theResult){
-
-  // keep track here of intersected panels, so we don't double-count them
-
-  std::map<Identifier,RpcExtrapolationResults> panels;
-
-  // assume the result vector has been cleaned before passing it to us
-  
-  // get tsos
-
-  const DataVector<const Trk::TrackStateOnSurface>*  tSoS =  m_holesTool->getHolesOnTrack(*(*theTrack) , Trk::muon);
-
- // now loop over holes
-    
-  if (tSoS) {
-
-    DataVector<const Trk::TrackStateOnSurface>::const_iterator  iter = tSoS->begin();
-    
-    iter = tSoS->begin();
-
-    for (;iter!=tSoS->end();iter++) {
-
-      const Trk::TrackParameters* par=(*iter)->trackParameters();
-
-      if(par){	
-	
-	const Trk::Surface & surf=par->associatedSurface();
-	
-	Identifier idEl = surf.associatedDetectorElementIdentifier();
-	
-	if (idEl.get_compact()){
-	  
-	  if(m_idHelperSvc->isRpc(idEl)){
-	    
-	    if (m_idHelperSvc->rpcIdHelper().stationName(idEl)==3){
-
-	      // from hole parameters get associated TG layer:
-	      const Trk::Layer* lay =m_extrapolator->trackingGeometry()->associatedLayer(par->position());
-
-	      // extrapolate hole track parameters to the associated TG layer:
-	      const Trk::TrackParameters* layPar =m_extrapolator->extrapolate(*par,lay->surfaceRepresentation(),Trk::anyDirection,false,Trk::muon);
-
-	      // get the nearest channel identifier using MuonTGMeasurementTool
-	      double pitch=0.;
-	      Identifier id = m_measTool->nearestDetEl(lay,layPar,m_idHelperSvc->rpcIdHelper().measuresPhi(idEl),pitch);
-
-	      idEl=id;
-
-	    }
-
-	    Identifier panelID=m_idHelperSvc->rpcIdHelper().panelID(idEl);
-	    
-	    std::map<Identifier,RpcExtrapolationResults>::iterator it=panels.find(panelID);
-	    
-	    if(it==panels.end()){
-
-	      // new panel
-	      RpcExtrapolationResults thisResult;
-	      thisResult.params=(*iter)->trackParameters();
-	      thisResult.id=idEl;
-
-	      panels.insert(std::map<Identifier,RpcExtrapolationResults>::value_type(panelID, thisResult) );
-	      
-	    } else {
-	      
-	      ATH_MSG_WARNING( "Found TWO HOLES on the same layer. don't know what to do... ignoring the second" );
-	    }
-	    
-	  }
-	  
-	} else {
-
-	  ATH_MSG_WARNING( "Hole has no associated detEl, trying to recover" );
-	  
-	  Amg::Vector3D pos=par->position();
-
-	  const Trk::Layer* layer =  m_extrapolator->trackingGeometry()->associatedLayer(pos);
-	    
-	  if(layer){
-	    
-	    Identifier id(layer->layerType());
-	    
-	    if(m_idHelperSvc->isRpc(id)){
-	      
-	      double pitch;
-	      const Identifier  id_phi = m_measTool->nearestDetEl(layer,(*iter)->trackParameters() , true, pitch) ;
-	      const Identifier  id_eta = m_measTool->nearestDetEl(layer,(*iter)->trackParameters() , false, pitch) ;
-	      
-	      Identifier panelEtaID=m_idHelperSvc->rpcIdHelper().panelID(id_eta);
-	      Identifier panelPhiID=m_idHelperSvc->rpcIdHelper().panelID(id_phi);
-
-	      // start with eta panel:
-	      std::map<Identifier,RpcExtrapolationResults>::iterator it=panels.find(panelEtaID);
-	      
-	      if(it==panels.end()){
-		
-		// new panel
-		RpcExtrapolationResults thisResult;
-		
-		thisResult.id=id_eta;
-		thisResult.params=(*iter)->trackParameters();
-
-		panels.insert(std::map<Identifier,RpcExtrapolationResults>::value_type(panelEtaID, thisResult) );
-		
-	      } else {
-		ATH_MSG_WARNING( "Found TWO HOLES on the same layer. don't know what to do... ignoring the second" );
-
-	      }
-
-	      // repeat for phi
-	      it=panels.find(panelPhiID);
-	      
-	      if(it==panels.end()){
-		
-		// new panel
-		RpcExtrapolationResults thisResult;
-		
-		thisResult.id=id_phi;
-		thisResult.params=(*iter)->trackParameters();
-		
-		panels.insert(std::map<Identifier,RpcExtrapolationResults>::value_type(panelPhiID, thisResult) );
-		
-	      } else {
-		ATH_MSG_WARNING( "Found TWO HOLES on the same layer. don't know what to do... ignoring the second" );
-		
-	      }
-	      
-	    }
-	    
-	  }
-	  
-	  
-	} 
-	  
-      } else ATH_MSG_WARNING( "TSOS has no parameter" );     
-    }
-    
-  }  else ATH_MSG_WARNING( "Hole finding returns null pointer" );     
-  
-  // now loop over measurements
-  
-  tSoS= (*theTrack)->trackStateOnSurfaces();
-  
-  int count=0;
-  
-  if (!tSoS){
-    
-    count++;
-    theResult.clear();
-    return;
-
-  } else {
-    
-    DataVector<const Trk::TrackStateOnSurface>::const_iterator  iter = tSoS->begin();
-    
-    for (;iter!=tSoS->end();iter++) {
-      
-      if  ((*iter)->type(Trk::TrackStateOnSurface::Measurement)||(*iter)->type(Trk::TrackStateOnSurface::Outlier)) {
-	
-	const Trk::RIO_OnTrack* hit = dynamic_cast<const Trk::RIO_OnTrack*> ((*iter)->measurementOnTrack());
-	if  ( hit == NULL) {
-	  ATH_MSG_WARNING( "The measurementOnTrack is not a RIO_OnTrack ... skipping" );
-	  continue;
-	}
-	const Identifier idHit = hit->identify();
-	
-	const Trk::TrackParameters* par=(*iter)->trackParameters();
-	
-	if(par){
-	  	  
-	  if(m_idHelperSvc->isRpc(idHit)){
-	     
-	    Identifier panelID=m_idHelperSvc->rpcIdHelper().panelID(idHit);
-	    
-	    std::map<Identifier,RpcExtrapolationResults>::iterator it=panels.find(panelID);
-	    
-	    if(it==panels.end()){
-	      
-	      // new panel
-	      RpcExtrapolationResults thisResult;
-	      thisResult.id=idHit;
-	      
-	      thisResult.params=(*iter)->trackParameters();
-	      	      
-	      panels.insert(std::map<Identifier,RpcExtrapolationResults>::value_type(panelID, thisResult) );
-	      
-	    } else {
-	           
-	      (*it).second.params=(*iter)->trackParameters();
-	      (*it).second.id=idHit;
-	      
-	    }
-	    
-
-	    
-	  } //close the control is an RPC hit
-	} else 	ATH_MSG_WARNING( "TSOS has no parameter" );
-	
-      }    
-      
-    }
-  }
-  
-  // now push the residuals into the final vector
-  
-  std::map<Identifier,RpcExtrapolationResults>::iterator it=panels.begin();
-  
-  for(;it!=panels.end();++it) theResult.push_back((*it).second);
-  
-}
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/RpcResidualsTool.cxx b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/RpcResidualsTool.cxx
deleted file mode 100644
index 38747534140205ac64f09516c8b4aa5f6a84fe93..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/RpcResidualsTool.cxx
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
-  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "RpcCalibTools/RpcExtrapolationTool.h"
-#include "RpcCalibTools/RpcResidualsTool.h"
-
-#include "TrkParameters/TrackParameters.h"
-#include "TrkMeasurementBase/MeasurementBase.h"
-#include "TrkExInterfaces/IPropagator.h"
-#include "TrkGeometry/MagneticFieldProperties.h"
-#include "TrkMeasurementBase/MeasurementBase.h"
-#include "TrkTrack/Track.h"
-#include "MuonTGRecTools/MuonTGMeasurementTool.h"
-#include "MuonPrepRawData/MuonPrepDataContainer.h"
-
-static const InterfaceID IID_IRpcResidualsTool("RpcResidualsTool", 1, 0);
-
-const InterfaceID& RpcResidualsTool::interfaceID( ) { 
-  return IID_IRpcResidualsTool; 
-}
-
-RpcResidualsTool::RpcResidualsTool
-( const std::string& type, const std::string& name,const IInterface* parent )
-  :  AthAlgTool(type,name,parent)
-{
-  declareProperty("ClusterCollection",m_clusCollection="rpcClusters");
-  declareInterface< RpcResidualsTool  >( this );
-}
-
-StatusCode RpcResidualsTool::initialize(){
-
-  ATH_MSG_DEBUG( "in initialize()" );
-
-  // retrieve the active store
-  ATH_CHECK( serviceLocator()->service("ActiveStoreSvc", m_activeStore) );
-
-  //retrieve detector manager from the conditions store
-  ATH_CHECK(m_DetectorManagerKey.initialize());
-
-  // get extrapolation tool
-
-  ATH_CHECK( toolSvc()->retrieveTool("RpcExtrapolationTool",m_rpcExtrapolTool) );
-
-  ATH_CHECK( m_idHelperSvc.retrieve() );
-  
-  return StatusCode::SUCCESS;  
-
-}
-
-void RpcResidualsTool::getRpcResiduals(TrackCollection::const_iterator theTrack, std::vector<RpcResiduals> &theResult){
-
-  // assume the result vector has been cleaned before passing it to us
-
-  // start by calling the extrapolator tool
-
-  // extrapolations of the track ill be stored here
-
-  std::vector<RpcExtrapolationResults> extrapolations;
-
-  m_rpcExtrapolTool->getRpcIntersections(theTrack, extrapolations);
-    
-  // get cluster container
-  const Muon::RpcPrepDataContainer* rpc_container;
-  StatusCode sc = (*m_activeStore)->retrieve(rpc_container,m_clusCollection);
-  if (sc.isFailure()) {
-    ATH_MSG_WARNING( " Cannot retrieve RpcPrepDataContainer " );
-    return;
-  }
-  
-  std::set<Identifier> panels;
-
-  // start first loop over clusters
-
-
-  if(rpc_container->size()){
-
-    Muon::RpcPrepDataContainer::const_iterator it = rpc_container->begin();
-    
-
-    for(;it!=rpc_container->end(); ++it){
-      
-      const Muon::RpcPrepDataCollection* clusterCollection = *it;
-      
-      //      if(clusterCollection->identify()==theElement&&clusterCollection->size()>0){
-      if(clusterCollection->size()>0){
-	
-    // there is a collection for the element. now have to loop over it
-   
-	for (Muon::RpcPrepDataCollection::const_iterator rpcPrd = clusterCollection->begin(); 
-	     rpcPrd != clusterCollection->end(); ++rpcPrd) {
-
-	  panels.insert(m_idHelperSvc->rpcIdHelper().panelID((*rpcPrd)->identify()));
-	  
-  
-	}
-      }
-    }
-  }
-  
-  SG::ReadCondHandle<MuonGM::MuonDetectorManager> DetectorManagerHandle{m_DetectorManagerKey};
-  const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr(); 
-  if(MuonDetMgr==nullptr){
-    ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
-    return; 
-  } 
-
-  // now loop over extrapolations:
-  
-  std::vector<RpcExtrapolationResults>::const_iterator theExtra=extrapolations.begin();
-
-  for(;theExtra!=extrapolations.end();++theExtra){
-    
-    // for each extrapolation, want to keep only lowest residual
-    
-    float lowest=-999;
-    int lowest_csize=-999;
-    float pitch=-999;
-    float lowest_time=-999;
-
-    // create here residuals to be returned to caller. give proper panel id, and default (i.e. inefficient) residual
-    RpcResiduals result;    
-
-    result.id=(*theExtra).id;
-
-    result.hasTwin=0;
-    
-    if(panels.find(GetTwinPanel(result.id))!=panels.end()) result.hasTwin=1;  
-    
-    // get the position from extrapolation
-
-    Amg::Vector3D thePosition=(*theExtra).params->position();
-
-    Identifier theElement;
-    Identifier idParent;
-
-    theElement=m_idHelperSvc->rpcIdHelper().elementID((*theExtra).id);
-    idParent = m_idHelperSvc->rpcIdHelper().parentID((*theExtra).id);
-
-    IdContext rpcModuleContext = m_idHelperSvc->rpcIdHelper().module_context();
-
-    IdentifierHash elementIDhash;
-
-    m_idHelperSvc->rpcIdHelper().get_hash(idParent, elementIDhash,&rpcModuleContext);
-    
-    Muon::RpcPrepDataContainer::const_iterator it = rpc_container->indexFind(elementIDhash);
-    
-    if(it!=rpc_container->end()){
-
-      const Muon::RpcPrepDataCollection* clusterCollection = *it;
-     
-      if(clusterCollection->size()>0){
-
-	// there is a collection for the element. now have to loop over it
-	const Muon::RpcPrepDataCollection* clusterCollection = *it;
-	
-	for (Muon::RpcPrepDataCollection::const_iterator rpcPrd = clusterCollection->begin(); 
-	     rpcPrd != clusterCollection->end(); ++rpcPrd) {
-	  
-	  // look for cluster on the same panel
-	  
-	  Identifier panel_id = m_idHelperSvc->rpcIdHelper().panelID((*rpcPrd)->identify());
-	  
-	  // check if the cluster is on the same panel as the extrapolation
-	  
-	  if(panel_id==m_idHelperSvc->rpcIdHelper().panelID(result.id)){
-	    
-	    const MuonGM::RpcReadoutElement* descriptor = MuonDetMgr->getRpcReadoutElement((*rpcPrd)->identify());
-	    
-	    // eta residual
-	    float residual=0.;
-	    if(! m_idHelperSvc->rpcIdHelper().measuresPhi(result.id)) residual= thePosition.z()-(*rpcPrd)->globalPosition().z();
-	    else {
-	      int sign=(thePosition.phi() < (*rpcPrd)->globalPosition().phi()) ? -1 : 1;
-	      residual=sign * std::sqrt(
-				   std::pow(thePosition.x()-(*rpcPrd)->globalPosition().x(),2) +
-				   std::pow(thePosition.y()-(*rpcPrd)->globalPosition().y(),2)
-				   );
-	    }
-	    
-	    if(std::abs(residual)<std::abs(lowest)){
-	      lowest=residual;
-	      lowest_time=(*rpcPrd)->time();
-	      lowest_csize=(*rpcPrd)->rdoList().size();
-	      pitch=descriptor->StripPitch(m_idHelperSvc->rpcIdHelper().measuresPhi(result.id));
-	    }
-	  }
-	  
-	} // end loop clusters
-      
-	
-      } // end if collection id and size
-      
-      
-    } // end for collections
-    
-    
-    // now store residual value. will be default, or the lowest if clusters were found
-
-    result.residual=lowest;
-    result.csize=lowest_csize;
-    result.time=lowest_time;
-    result.pitch=pitch;
-    result.params=(*theExtra).params;
-   
-    // give back to caller what we have found
-
-    theResult.push_back(result);
-    
-  } // end loop extrapolations
-  
-}
-
-Identifier RpcResidualsTool::GetTwinPanel(Identifier id){
-  
-  //unpack the panelID
-      
-  int sec = m_idHelperSvc->rpcIdHelper().stationPhi(id);
-  int sta = m_idHelperSvc->rpcIdHelper().stationName(id);
-  int dr = m_idHelperSvc->rpcIdHelper().doubletR(id);
-  int dp = m_idHelperSvc->rpcIdHelper().doubletPhi(id);
-  int mp = m_idHelperSvc->rpcIdHelper().measuresPhi(id);
-  int gg = m_idHelperSvc->rpcIdHelper().gasGap(id);
-  int dz = m_idHelperSvc->rpcIdHelper().doubletZ(id);
-  int eta = m_idHelperSvc->rpcIdHelper().stationEta(id);
-  
-  return m_idHelperSvc->rpcIdHelper().panelID(sta, eta, sec, dr, dz, dp, gg%2 + 1, mp);
-  
-}
-
-Identifier RpcResidualsTool::GetTwinViewPanel(Identifier id){
-  
-  //unpack the panelID
-      
-  int sec = m_idHelperSvc->rpcIdHelper().stationPhi(id);
-  int sta = m_idHelperSvc->rpcIdHelper().stationName(id);
-  int dr = m_idHelperSvc->rpcIdHelper().doubletR(id);
-  int dp = m_idHelperSvc->rpcIdHelper().doubletPhi(id);
-  int mp = m_idHelperSvc->rpcIdHelper().measuresPhi(id);
-  int gg = m_idHelperSvc->rpcIdHelper().gasGap(id);
-  int dz = m_idHelperSvc->rpcIdHelper().doubletZ(id);
-  int eta = m_idHelperSvc->rpcIdHelper().stationEta(id);
-  
-  return m_idHelperSvc->rpcIdHelper().panelID(sta, eta, sec, dr, dz, dp, gg, !mp);
-  
-}
diff --git a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/components/RpcCalibTools_entries.cxx b/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/components/RpcCalibTools_entries.cxx
deleted file mode 100644
index e9fe2ddb9d7c1571179b976247ca3c567f9a2f77..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCalib/RpcCalib/RpcCalibTools/src/components/RpcCalibTools_entries.cxx
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "RpcCalibTools/RpcExtrapolationTool.h"
-#include "RpcCalibTools/RpcResidualsTool.h"
-
-DECLARE_COMPONENT( RpcExtrapolationTool )
-DECLARE_COMPONENT( RpcResidualsTool )
-
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h
index 779be99f33b75956b11dc05c1acd1b36c02930ad..f2d841d8690d0fb13d8af6bbc088cf52d22f3d19 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MdtDigitToMdtRDO.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 MDTDIGITTOMDTRDO_H
@@ -7,15 +7,11 @@
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "MuonDigitContainer/MdtDigitContainer.h"
 #include "MuonRDO/MdtCsmContainer.h"
-
 #include "MuonCablingData/MuonMDT_CablingMap.h"
 #include "StoreGate/ReadCondHandleKey.h"
-
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -36,8 +32,7 @@ class MdtDigitToMdtRDO : public AthReentrantAlgorithm {
  protected:
 
   bool m_BMEpresent{false};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::WriteHandleKey<MdtCsmContainer> m_csmContainerKey{this,"OutputObjectName","MDTCSM","WriteHandleKey for Output MdtCsmContainer"};
   SG::ReadHandleKey<MdtDigitContainer> m_digitContainerKey{this,"InputObjectName","MDT_DIGITS","ReadHandleKey for Input MdtDigitContainer"};
   SG::ReadCondHandleKey<MuonMDT_CablingMap> m_readKey{this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"};
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MuonRdoToMuonDigitTool.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MuonRdoToMuonDigitTool.h
index 533a47637af96881cb6e2275da162a13573ee012..69794fbf48bf05fbe414c06809cff959cb877abc 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MuonRdoToMuonDigitTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/MuonRdoToMuonDigitTool.h
@@ -1,25 +1,30 @@
 /*
-  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 MUONRDOTOMUONDIGITTOOL_H
 #define MUONRDOTOMUONDIGITTOOL_H 
 
+#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-//#include "CscCalibTools/CscCalibTool.h"
-#include "CscCalibTools/ICscCalibTool.h"
 
-#include "MuonDigToolInterfaces/IMuonDigitizationTool.h"
+#include "CscCalibTools/ICscCalibTool.h"
 #include "MuonRDO/CscRawDataContainer.h"
 #include "MuonDigitContainer/CscDigitContainer.h"
 #include "MuonRDO/STGC_RawDataContainer.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
 #include "MuonRDO/MM_RawDataContainer.h"
 #include "MuonDigitContainer/MmDigitContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-class ITGCcablingSvc;
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "MuonMDT_CnvTools/IMDT_RDO_Decoder.h"
+#include "MuonCSC_CnvTools/ICSC_RDO_Decoder.h"
+#include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
+#include "MuonTGC_CnvTools/ITGC_RDO_Decoder.h"
+#include "MuonSTGC_CnvTools/ISTGC_RDO_Decoder.h"
+#include "MuonMM_CnvTools/IMM_RDO_Decoder.h"
+#include "TGCcablingInterface/ITGCcablingSvc.h"
 
 class MdtDigitContainer;
 class CscDigitContainer;
@@ -46,15 +51,6 @@ class MM_RawDataCollection;
 class MM_RawDataContainer;
 class MM_RawData;
 
-namespace Muon {
-  class IMDT_RDO_Decoder;
-  class ICSC_RDO_Decoder;
-  class IRPC_RDO_Decoder;
-  class ITGC_RDO_Decoder;
-  class ISTGC_RDO_Decoder;
-  class IMM_RDO_Decoder;
-  class MuonIdHelperTool;
-}
 // Author: Ketevi A. Assamagan
 // BNL, January 24, 2004
 
@@ -70,7 +66,7 @@ class MuonRdoToMuonDigitTool : virtual public IMuonDigitizationTool, public AthA
  public:
 
   MuonRdoToMuonDigitTool(const std::string& type, const std::string& name, const IInterface* pIID);
-  ~MuonRdoToMuonDigitTool();
+  ~MuonRdoToMuonDigitTool()=default;
     
   virtual StatusCode initialize() override;
   virtual StatusCode digitize(const EventContext& ctx)   override;
@@ -110,12 +106,10 @@ class MuonRdoToMuonDigitTool : virtual public IMuonDigitizationTool, public AthA
   ToolHandle<Muon::ITGC_RDO_Decoder>  m_tgcRdoDecoderTool;
   ToolHandle<Muon::ISTGC_RDO_Decoder>  m_stgcRdoDecoderTool;
   ToolHandle<Muon::IMM_RDO_Decoder>  m_mmRdoDecoderTool;
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   // cabling service
-  //  const MDTcablingSvc  * m_mdtCabling;
-  const ITGCcablingSvc * m_tgcCabling;
+  const ITGCcablingSvc* m_tgcCabling;
 
   // algorithm properties
   bool m_decodeMdtRDO;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadCscDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadCscDigit.h
index d76fe9d3d31cc898291f7884fc0b012f924fe17c..4b974db2038e75e86483ed6b5a8600e1796ae345 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadCscDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadCscDigit.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 READCSCDIGIT_H
@@ -14,10 +14,10 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
+
 #include "GaudiKernel/NTuple.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -40,8 +40,7 @@ private:
   //Ntuple ID
   std::string     m_NtupleLocID;
 
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   
   // Define variables in the Ntuple:
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtDigit.h
index 020df7cd35293d3f8bb43ba5609de914ad385c89..b8ebeb85b847c418e8ce3620071a88ad46edbc38 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtDigit.h
@@ -1,15 +1,15 @@
 /*
-  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 READMDTDIGIT_H
 #define READMDTDIGIT_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/NTuple.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
+#include "GaudiKernel/NTuple.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -19,7 +19,6 @@ class ReadMdtDigit: public AthAlgorithm {
   ReadMdtDigit (const std::string& name, ISvcLocator* pSvcLocator);
   virtual StatusCode initialize();
   virtual StatusCode execute();
-  virtual StatusCode finalize();
 
  protected:
 
@@ -34,8 +33,7 @@ class ReadMdtDigit: public AthAlgorithm {
   //Ntuple ID
   std::string     m_NtupleLocID;
 
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   // Define variables in the Ntuple:
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtPRD.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtPRD.h
index 0650d5cc690e76e7b66548ef2da23cdb87ab18cf..ccd86fab54ea06b71a6d7339b47bf8420f08596f 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtPRD.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadMdtPRD.h
@@ -1,13 +1,15 @@
 /*
-  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 MUONBYTESTREAMCNVTEST_READMDTPRD_H
 #define MUONBYTESTREAMCNVTEST_READMDTPRD_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "GaudiKernel/NTuple.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -17,7 +19,6 @@ class ReadMdtPRD: public AthAlgorithm {
   ReadMdtPRD (const std::string& name, ISvcLocator* pSvcLocator);
   virtual StatusCode initialize();
   virtual StatusCode execute();
-  virtual StatusCode finalize();
 
  protected:
   NTuple::Tuple* m_ntuplePtr;
@@ -29,8 +30,7 @@ class ReadMdtPRD: public AthAlgorithm {
   //Ntuple ID
   std::string     m_NtupleLocID;
 
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   // Define variables in the Ntuple:
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadRpcDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadRpcDigit.h
index 212f6c7385da4c9dccd9ec2144a4ff4210e3d7ca..b35df1840e061db0643e53236dd863475c348d4f 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadRpcDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadRpcDigit.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 MUONBYTESTREAMCNVTEST_READRPCDIGIT
@@ -8,9 +8,10 @@
 #include <string.h>
 
 #include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "GaudiKernel/NTuple.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class RpcIdHelper;
 
@@ -19,17 +20,15 @@ class ReadRpcDigit : public AthAlgorithm
  public:
   // Agorithm constructor
   ReadRpcDigit (const std::string &name, ISvcLocator *pSvcLocator);
-  ~ReadRpcDigit();
+  ~ReadRpcDigit()=default;
 
   // Gaudi hooks
   StatusCode initialize();
   StatusCode execute();
-  StatusCode finalize();
 
  private:
   ServiceHandle<ActiveStoreSvc> m_activeStore;
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   StatusCode accessNtuple();
   bool m_rpcNtuple;
   std::string m_NtupleLocID;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadTgcDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadTgcDigit.h
index a8da51fa966b459d76c344408b710fdbdd31d447..a53af07052aba102ecc3a7085e58712ccc316d05 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadTgcDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/ReadTgcDigit.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 READTGCDIGIT_H
@@ -14,9 +14,9 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/NTuple.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
+#include "GaudiKernel/NTuple.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -26,7 +26,6 @@ public:
   ReadTgcDigit (const std::string& name, ISvcLocator* pSvcLocator);
   virtual StatusCode initialize();
   virtual StatusCode execute();
-  virtual StatusCode finalize();
 
 protected:
   NTuple::Tuple* m_ntuplePtr;
@@ -39,8 +38,7 @@ private:
   //Ntuple ID
   std::string     m_NtupleLocID;
 
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   // Define variables in the Ntuple:
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h
index 639de1ea1d3986e7936dd997d10a9bb6294f5b82..dfec6d1b64949e428d66442de7d7a22b1093b236 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/MuonByteStreamCnvTest/TgcDigitToTgcRDO.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 TGCDIGITTOTGCRDO_H
@@ -7,16 +7,14 @@
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "StoreGate/DataHandle.h"
 
+#include "StoreGate/DataHandle.h"
 #include "MuonRDO/TgcRdoContainer.h"
 #include "MuonRDO/TgcRdo.h"
 #include "MuonDigitContainer/TgcDigitContainer.h"
 #include "TGCcablingInterface/ITGCcablingServerSvc.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-class ITGCcablingSvc;
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "TGCcablingInterface/ITGCcablingSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -48,8 +46,7 @@ protected:
   SG::WriteHandleKey<TgcRdoContainer> m_rdoContainerKey{this,"OutputObjectName","TGCRDO","WriteHandleKey for Output TgcRdoContainer"};
   SG::ReadHandleKey<TgcDigitContainer> m_digitContainerKey{this,"InputObjectName","TGC_DIGITS","ReadHandleKey for Input TgcDigitContainer"};
   const ITGCcablingSvc * m_cabling{};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   std::string  m_cablingType;
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.cxx
index 633e33a2aa44da2f3182f06d1569a51467200d61..fb97e09f32fa95208f5c54e2f671acefefda35e7 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.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 "CscRdoToCscDigit.h"
@@ -13,7 +13,7 @@ CscRdoToCscDigit::CscRdoToCscDigit(const std::string& name,
 
 StatusCode CscRdoToCscDigit::initialize()
 {
-  ATH_CHECK(m_muonIdHelperTool.retrieve());
+  ATH_CHECK(m_idHelperSvc.retrieve());
   /** CSC calibration tool for the Condtiions Data base access */
   ATH_CHECK(m_cscCalibTool.retrieve());
   ATH_CHECK(m_cscRdoKey.initialize());
@@ -35,7 +35,7 @@ StatusCode CscRdoToCscDigit::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "Retrieved " << rdoContainer->size() << " CSC RDOs." );
 
   SG::WriteHandle<CscDigitContainer> wh_cscDigit(m_cscDigitKey, ctx);
-  ATH_CHECK(wh_cscDigit.record(std::make_unique<CscDigitContainer> (m_muonIdHelperTool->cscIdHelper().module_hash_max())));
+  ATH_CHECK(wh_cscDigit.record(std::make_unique<CscDigitContainer> (m_idHelperSvc->cscIdHelper().module_hash_max())));
   ATH_MSG_DEBUG( "Decoding CSC RDO into CSC Digit"  );
 
   Identifier oldId;
@@ -62,7 +62,7 @@ StatusCode CscRdoToCscDigit::decodeCsc(const CscRawDataCollection *rdoColl, CscD
 
   //      decoder.setParams(samplingTime);
 
-  const IdContext cscContext = m_muonIdHelperTool->cscIdHelper().module_context();
+  const IdContext cscContext = m_idHelperSvc->cscIdHelper().module_context();
 
   /** for each Rdo, loop over RawData, converter RawData to digit
       retrieve/create digit collection, and insert digit into collection */
@@ -98,17 +98,17 @@ StatusCode CscRdoToCscDigit::decodeCsc(const CscRawDataCollection *rdoColl, CscD
                          << " or charge finding failed " << " ... skipping "  );
         continue;
       }
-      ATH_MSG_DEBUG( "CSC RDO->CscDigit: " << m_muonIdHelperTool->cscIdHelper().show_to_string(channelId) );
+      ATH_MSG_DEBUG( "CSC RDO->CscDigit: " << m_idHelperSvc->cscIdHelper().show_to_string(channelId) );
       const int theCharge = static_cast<int>(charge);
       CscDigit * newDigit = new CscDigit(channelId, theCharge, time);
-      ATH_MSG_DEBUG( "CSC RDO->Digit: " << m_muonIdHelperTool->cscIdHelper().show_to_string(newDigit->identify())
+      ATH_MSG_DEBUG( "CSC RDO->Digit: " << m_idHelperSvc->cscIdHelper().show_to_string(newDigit->identify())
                      << " " << newDigit->charge() << " " << charge << " time= " << time );
 
       for (uint16_t i=0; i< samples.size(); ++i) {
         ATH_MSG_DEBUG( "CSC RDO->Digit: " << samples[i] );
       }
       IdentifierHash coll_hash;
-      if (m_muonIdHelperTool->cscIdHelper().get_hash(stationId, coll_hash, &cscContext)) {
+      if (m_idHelperSvc->cscIdHelper().get_hash(stationId, coll_hash, &cscContext)) {
         ATH_MSG_WARNING( "Unable to get CSC digiti collection hash id "
                          << "context begin_index = " << cscContext.begin_index()
                          << " context end_index  = " << cscContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.h
index d2a83d780eb0808f211a3edbc8fa9474dda6a156..67d6f591ef1189d20daad79ff8ab3101351fd57f 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/CscRdoToCscDigit.h
@@ -1,24 +1,19 @@
 /*
-  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 MUONBYTESTREAMCNVTEST_CSCRDOTOCSCDIGIT_H
 #define MUONBYTESTREAMCNVTEST_CSCRDOTOCSCDIGIT_H
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "CscCalibTools/ICscCalibTool.h"
 #include "MuonCSC_CnvTools/ICSC_RDO_Decoder.h"
 #include "MuonRDO/CscRawDataContainer.h"
 #include "MuonDigitContainer/CscDigitContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-// class CscDigitContainer;
-// class CscDigitCollection;
-// class CscRawDataCollection;
-// namespace Muon {
-//   class ICSC_RDO_Decoder;
-// }
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class CscRdoToCscDigit : public AthReentrantAlgorithm {
 
@@ -36,8 +31,7 @@ class CscRdoToCscDigit : public AthReentrantAlgorithm {
 
   ToolHandle<ICscCalibTool>     m_cscCalibTool{this, "cscCalibTool", "CscCalibTool", ""};
   ToolHandle<Muon::ICSC_RDO_Decoder>  m_cscRdoDecoderTool{this, "cscRdoDecoderTool", "Muon::CscRDO_Decoder", ""};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::ReadHandleKey<CscRawDataContainer> m_cscRdoKey{this, "CscRdoContainer", "CSCRDO", "Csc RDO Input"};
   SG::WriteHandleKey<CscDigitContainer> m_cscDigitKey{this, "CscDigitContainer", "CSC_DIGITS", "Csc Digit Output"};
 };
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx
index 9f7324e2a9c9c82fd66a8a384625b3f4c2e09305..b8c8b5406ef986bf266d7ae02376f9e2fbd9a6d5 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.cxx
@@ -1,9 +1,8 @@
 /*
-  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 "MM_DigitToRDO.h"
-#include "MuonIdHelpers/MmIdHelper.h"
 
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
@@ -16,9 +15,9 @@ MM_DigitToRDO::MM_DigitToRDO(const std::string& name, ISvcLocator* pSvcLocator)
 StatusCode MM_DigitToRDO::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
+  ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK( m_rdoContainer.initialize() );
   ATH_CHECK( m_digitContainer.initialize() );
-  ATH_CHECK( detStore()->retrieve(m_idHelper, "MMIDHELPER") );
   return StatusCode::SUCCESS;
 }
 
@@ -30,7 +29,7 @@ StatusCode MM_DigitToRDO::execute(const EventContext& ctx) const
   SG::WriteHandle<MM_RawDataContainer> rdos (m_rdoContainer, ctx);
   SG::ReadHandle<MmDigitContainer> digits (m_digitContainer, ctx);
 
-  ATH_CHECK( rdos.record(std::make_unique<MM_RawDataContainer>(m_idHelper->module_hash_max())) );
+  ATH_CHECK( rdos.record(std::make_unique<MM_RawDataContainer>(m_idHelperSvc->mmIdHelper().module_hash_max())) );
 
   if (digits.isValid()){
     for (const MmDigitCollection* digitColl : *digits ){
@@ -40,7 +39,7 @@ StatusCode MM_DigitToRDO::execute(const EventContext& ctx) const
 
       // get the hash of the RDO collection
       IdentifierHash hash;
-      int getRdoCollHash = m_idHelper->get_module_hash(digitId,hash);
+      int getRdoCollHash = m_idHelperSvc->mmIdHelper().get_module_hash(digitId,hash);
       if ( getRdoCollHash!=0 ) {
         ATH_MSG_ERROR("Could not get the module hash Id");
         return StatusCode::FAILURE;
@@ -67,15 +66,15 @@ StatusCode MM_DigitToRDO::execute(const EventContext& ctx) const
           /// set the rdo id to a value consistent with the channel number
           ///
           bool isValid;
-          int stationName = m_idHelper->stationName(id);
-          int stationEta  = m_idHelper->stationEta(id);
-          int stationPhi  = m_idHelper->stationPhi(id);
-          int multilayer  = m_idHelper->multilayer(id);
-          int gasGap      = m_idHelper->gasGap(id);
+          int stationName = m_idHelperSvc->mmIdHelper().stationName(id);
+          int stationEta  = m_idHelperSvc->mmIdHelper().stationEta(id);
+          int stationPhi  = m_idHelperSvc->mmIdHelper().stationPhi(id);
+          int multilayer  = m_idHelperSvc->mmIdHelper().multilayer(id);
+          int gasGap      = m_idHelperSvc->mmIdHelper().gasGap(id);
           ///
           int channel     = digit->stripResponsePosition().at(i);
 
-          Identifier newId = m_idHelper->channelID(stationName,stationEta,
+          Identifier newId = m_idHelperSvc->mmIdHelper().channelID(stationName,stationEta,
                                                    stationPhi,multilayer,gasGap,channel,true,&isValid);
 
           if (!isValid) {
@@ -103,7 +102,3 @@ StatusCode MM_DigitToRDO::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "done execute()"  );
   return StatusCode::SUCCESS;
 }
-
-StatusCode MM_DigitToRDO::finalize() {
-  return StatusCode::SUCCESS;
-}
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.h
index 480353fb88df02e11507e5040a90382be4e1a3b1..6ae1454199d147db05b5ea9b55dc876dd983e0f0 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_DigitToRDO.h
@@ -1,14 +1,16 @@
 /*
-  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 MMDIGITTORDO_H
 #define MMDIGITTORDO_H
 
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "MuonRDO/MM_RawDataContainer.h"
 #include "MuonDigitContainer/MmDigitContainer.h"
-class MmIdHelper;
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -21,10 +23,9 @@ public:
   virtual ~MM_DigitToRDO() = default;
   virtual StatusCode initialize() override final;
   virtual StatusCode execute(const EventContext& ctx) const override final;
-  virtual StatusCode finalize() override;
 
 private:
-  const MmIdHelper*  m_idHelper{};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::WriteHandleKey<Muon::MM_RawDataContainer> m_rdoContainer{this, "OutputObjectName", "MMRDO","WriteHandleKey for Output MM_RawDataContainer"};
   SG::ReadHandleKey<MmDigitContainer> m_digitContainer{this, "InputObjectName", "MM_DIGITS", "ReadHAndleKey for Input MmDigitContainer"};
 };
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx
index 1e9b33b211c61284f1155885603642fe45e11861..a26db8769e20a4340b035fc9cb4fef1c759bb370 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.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 "MM_RdoToDigit.h"
@@ -12,7 +12,7 @@ MM_RdoToDigit::MM_RdoToDigit(const std::string& name,
 
 StatusCode MM_RdoToDigit::initialize()
 {
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   ATH_CHECK( m_mmRdoDecoderTool.retrieve() );
   ATH_CHECK(m_mmRdoKey.initialize());
   ATH_CHECK(m_mmDigitKey.initialize());
@@ -31,7 +31,7 @@ StatusCode MM_RdoToDigit::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "Retrieved " << rdoContainer->size() << " MM RDOs." );
 
   SG::WriteHandle<MmDigitContainer> wh_mmDigit(m_mmDigitKey, ctx);
-  ATH_CHECK(wh_mmDigit.record(std::make_unique<MmDigitContainer>(m_muonIdHelperTool->mmIdHelper().module_hash_max())));
+  ATH_CHECK(wh_mmDigit.record(std::make_unique<MmDigitContainer>(m_idHelperSvc->mmIdHelper().module_hash_max())));
   ATH_MSG_DEBUG( "Decoding MM RDO into MM Digit"  );
 
   // retrieve the collection of RDO
@@ -47,7 +47,7 @@ StatusCode MM_RdoToDigit::execute(const EventContext& ctx) const
 
 StatusCode MM_RdoToDigit::decodeMM( const Muon::MM_RawDataCollection * rdoColl, MmDigitContainer * mmContainer, MmDigitCollection*& collection, Identifier& oldId ) const
 {
-  const IdContext mmContext = m_muonIdHelperTool->mmIdHelper().module_context();
+  const IdContext mmContext = m_idHelperSvc->mmIdHelper().module_context();
 
   if ( rdoColl->size() > 0 ) {
     ATH_MSG_DEBUG( " Number of RawData in this rdo "
@@ -64,9 +64,9 @@ StatusCode MM_RdoToDigit::decodeMM( const Muon::MM_RawDataCollection * rdoColl,
 
       // find here the Proper Digit Collection identifier, using the rdo-hit id
       // (since RDO collections are not in a 1-to-1 relation with digit collections)
-      const Identifier elementId = m_muonIdHelperTool->mmIdHelper().elementID(newDigit->identify());
+      const Identifier elementId = m_idHelperSvc->mmIdHelper().elementID(newDigit->identify());
       IdentifierHash coll_hash;
-      if (m_muonIdHelperTool->mmIdHelper().get_hash(elementId, coll_hash, &mmContext)) {
+      if (m_idHelperSvc->mmIdHelper().get_hash(elementId, coll_hash, &mmContext)) {
         ATH_MSG_WARNING( "Unable to get MM digit collection hash id "
                          << "context begin_index = " << mmContext.begin_index()
                          << " context end_index  = " << mmContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.h
index e739a81b7c09d48f7e55dd23ffa5187eac3072c8..893d30610489c7309c79a65f37f3e321342f45c6 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MM_RdoToDigit.h
@@ -1,16 +1,18 @@
 /*
-  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 MUONBYTESTREAMCNVTEST_MMRDOTOMMDIGIT_H
 #define MUONBYTESTREAMCNVTEST_MMRDOTOMMDIGIT_H
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonMM_CnvTools/IMM_RDO_Decoder.h"
 #include "MuonRDO/MM_RawDataContainer.h"
 #include "MuonDigitContainer/MmDigitContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class MM_RdoToDigit : public AthReentrantAlgorithm {
 
@@ -26,8 +28,7 @@ class MM_RdoToDigit : public AthReentrantAlgorithm {
   StatusCode decodeMM( const Muon::MM_RawDataCollection *, MmDigitContainer *, MmDigitCollection*&, Identifier& ) const;
 
   ToolHandle<Muon::IMM_RDO_Decoder> m_mmRdoDecoderTool{this, "mmRdoDecoderTool", "Muon::MM_RDO_Decoder", ""};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::ReadHandleKey<Muon::MM_RawDataContainer> m_mmRdoKey{this, "MmRdoContainer", "MMRDO", "MM RDO Input"};
   SG::WriteHandleKey<MmDigitContainer> m_mmDigitKey{this, "MmDigitContainer", "MM_DIGITS", "MM Digit Output"};
 };
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx
index 86e65c8dacd64bec28d165a8ffe36caad5c2717f..041e9d83422e5968b6f72d14be5ae3e46f60f72d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtDigitToMdtRDO.cxx
@@ -34,7 +34,7 @@ StatusCode MdtDigitToMdtRDO::initialize()
   ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_csmContainerKey );
   ATH_CHECK( m_digitContainerKey.initialize() );
   ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_digitContainerKey );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   ATH_CHECK( m_readKey.initialize() );
 
   if ( fillTagInfo().isFailure() ) {
@@ -42,7 +42,7 @@ StatusCode MdtDigitToMdtRDO::initialize()
   }
 
   // check if the layout includes elevator chambers
-  m_BMEpresent = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME") != -1;
+  m_BMEpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME") != -1;
   if ( m_BMEpresent )
     ATH_MSG_INFO( "Processing configuration for layouts with BME chambers."  );
   
@@ -73,7 +73,7 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata(const EventContext& ctx) const {
   ATH_CHECK(csmContainer.record(std::make_unique<MdtCsmContainer>()));
   ATH_MSG_DEBUG("Recorded MdtCsmContainer called " << csmContainer.name() << " in store " << csmContainer.store());
 
-  IdContext mdtContext = m_muonIdHelperTool->mdtIdHelper().module_context();
+  IdContext mdtContext = m_idHelperSvc->mdtIdHelper().module_context();
 
   SG::ReadHandle<MdtDigitContainer> container (m_digitContainerKey, ctx);
   if (!container.isValid()) {
@@ -101,10 +101,10 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata(const EventContext& ctx) const {
       const MdtDigitCollection* mdtCollection = *it_coll;
       IdentifierHash moduleHash = mdtCollection->identifierHash();
       Identifier moduleId;
-      m_muonIdHelperTool->mdtIdHelper().get_id(moduleHash, moduleId, &mdtContext); 
-      int name    = m_muonIdHelperTool->mdtIdHelper().stationName(moduleId);
-      int eta     = m_muonIdHelperTool->mdtIdHelper().stationEta(moduleId);
-      int phi     = m_muonIdHelperTool->mdtIdHelper().stationPhi(moduleId);
+      m_idHelperSvc->mdtIdHelper().get_id(moduleHash, moduleId, &mdtContext); 
+      int name    = m_idHelperSvc->mdtIdHelper().stationName(moduleId);
+      int eta     = m_idHelperSvc->mdtIdHelper().stationEta(moduleId);
+      int phi     = m_idHelperSvc->mdtIdHelper().stationPhi(moduleId);
  
       // Get the online ID of the MDT module
       uint8_t subsystem;
@@ -129,15 +129,15 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata(const EventContext& ctx) const {
       Identifier chid1, chid2;
       if ( m_BMEpresent ){
 	// 1st ML channel get_id
-	chid1 = m_muonIdHelperTool->mdtIdHelper().channelID(m_muonIdHelperTool->mdtIdHelper().stationName(moduleId),
-					 m_muonIdHelperTool->mdtIdHelper().stationEta(moduleId),
-					 m_muonIdHelperTool->mdtIdHelper().stationPhi(moduleId),
+	chid1 = m_idHelperSvc->mdtIdHelper().channelID(m_idHelperSvc->mdtIdHelper().stationName(moduleId),
+					 m_idHelperSvc->mdtIdHelper().stationEta(moduleId),
+					 m_idHelperSvc->mdtIdHelper().stationPhi(moduleId),
 					 1, 1, 1 );
 	// 2nd ML channel id
 	if ( name == 53 ) {
-	  chid2 = m_muonIdHelperTool->mdtIdHelper().channelID(m_muonIdHelperTool->mdtIdHelper().stationName(moduleId),
-					   m_muonIdHelperTool->mdtIdHelper().stationEta(moduleId),
-					   m_muonIdHelperTool->mdtIdHelper().stationPhi(moduleId),
+	  chid2 = m_idHelperSvc->mdtIdHelper().channelID(m_idHelperSvc->mdtIdHelper().stationName(moduleId),
+					   m_idHelperSvc->mdtIdHelper().stationEta(moduleId),
+					   m_idHelperSvc->mdtIdHelper().stationPhi(moduleId),
 					   2, 1, 1 );
         
         }
@@ -188,11 +188,11 @@ StatusCode MdtDigitToMdtRDO::fill_MDTdata(const EventContext& ctx) const {
 	  const MdtDigit* mdtDigit = *it_dig;
 	  Identifier channelId = mdtDigit->identify();
 	    
-	  if (m_muonIdHelperTool->mdtIdHelper().valid(channelId)) 
+	  if (m_idHelperSvc->mdtIdHelper().valid(channelId)) 
 	    {
-	      int multilayer = m_muonIdHelperTool->mdtIdHelper().multilayer(channelId);
-	      int layer      = m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId);
-	      int tube       = m_muonIdHelperTool->mdtIdHelper().tube(channelId);
+	      int multilayer = m_idHelperSvc->mdtIdHelper().multilayer(channelId);
+	      int layer      = m_idHelperSvc->mdtIdHelper().tubeLayer(channelId);
+	      int tube       = m_idHelperSvc->mdtIdHelper().tube(channelId);
 	            
 	      // Get the online Id of the channel
 	      cabling = readCdo->getOnlineId(name, eta, phi, 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.cxx
index d0c8c80609555e026639969f1c01edba5d570812..210a55f91ad96b5ce74f8ac538c5cfe8a2cd4d19 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.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 "MdtRdoToMdtDigit.h"
@@ -12,7 +12,7 @@ MdtRdoToMdtDigit::MdtRdoToMdtDigit(const std::string& name,
 
 StatusCode MdtRdoToMdtDigit::initialize()
 {
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   ATH_CHECK( m_mdtRdoDecoderTool.retrieve() );
   ATH_CHECK(m_mdtRdoKey.initialize());
   ATH_CHECK(m_mdtDigitKey.initialize());
@@ -31,7 +31,7 @@ StatusCode MdtRdoToMdtDigit::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "Retrieved " << rdoContainer->size() << " MDT RDOs." );
 
   SG::WriteHandle<MdtDigitContainer> wh_mdtDigit(m_mdtDigitKey, ctx);
-  ATH_CHECK(wh_mdtDigit.record(std::make_unique<MdtDigitContainer>(m_muonIdHelperTool->mdtIdHelper().module_hash_max())));
+  ATH_CHECK(wh_mdtDigit.record(std::make_unique<MdtDigitContainer>(m_idHelperSvc->mdtIdHelper().module_hash_max())));
   ATH_MSG_DEBUG( "Decoding MDT RDO into MDT Digit"  );
 
   // retrieve the collection of RDO
@@ -48,7 +48,7 @@ StatusCode MdtRdoToMdtDigit::execute(const EventContext& ctx) const
 
 StatusCode MdtRdoToMdtDigit::decodeMdt( const MdtCsm * rdoColl, MdtDigitContainer * mdtContainer, MdtDigitCollection*& collection, Identifier& oldId ) const
 {
-  const IdContext mdtContext = m_muonIdHelperTool->mdtIdHelper().module_context();
+  const IdContext mdtContext = m_idHelperSvc->mdtIdHelper().module_context();
 
   if ( rdoColl->size() > 0 ) {
     ATH_MSG_DEBUG( " Number of AmtHit in this Csm "
@@ -71,9 +71,9 @@ StatusCode MdtRdoToMdtDigit::decodeMdt( const MdtCsm * rdoColl, MdtDigitContaine
 
       // find here the Proper Digit Collection identifier, using the rdo-hit id
       // (since RDO collections are not in a 1-to-1 relation with digit collections)
-      const Identifier elementId = m_muonIdHelperTool->mdtIdHelper().elementID(newDigit->identify());
+      const Identifier elementId = m_idHelperSvc->mdtIdHelper().elementID(newDigit->identify());
       IdentifierHash coll_hash;
-      if (m_muonIdHelperTool->mdtIdHelper().get_hash(elementId, coll_hash, &mdtContext)) {
+      if (m_idHelperSvc->mdtIdHelper().get_hash(elementId, coll_hash, &mdtContext)) {
         ATH_MSG_WARNING( "Unable to get MDT digit collection hash id "
                          << "context begin_index = " << mdtContext.begin_index()
                          << " context end_index  = " << mdtContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.h
index 51a406fd62e52c7a23bba58c1117e870388afa60..f1ea332fd583fe5c386ad1f855a9b70668d00a2a 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MdtRdoToMdtDigit.h
@@ -1,16 +1,18 @@
 /*
-  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 MUONBYTESTREAMCNVTEST_MDTRDOTOMDTDIGIT_H
 #define MUONBYTESTREAMCNVTEST_MDTRDOTOMDTDIGIT_H
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonMDT_CnvTools/IMDT_RDO_Decoder.h"
 #include "MuonRDO/MdtCsmContainer.h"
 #include "MuonDigitContainer/MdtDigitContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class MdtRdoToMdtDigit : public AthReentrantAlgorithm {
 
@@ -26,8 +28,7 @@ class MdtRdoToMdtDigit : public AthReentrantAlgorithm {
   StatusCode decodeMdt( const MdtCsm *, MdtDigitContainer *, MdtDigitCollection*&, Identifier& ) const;
 
   ToolHandle<Muon::IMDT_RDO_Decoder> m_mdtRdoDecoderTool{this, "mdtRdoDecoderTool", "Muon::MdtRDO_Decoder", ""};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::ReadHandleKey<MdtCsmContainer> m_mdtRdoKey{this, "MdtRdoContainer", "MDTCSM", "Mdt RDO Input"};
   SG::WriteHandleKey<MdtDigitContainer> m_mdtDigitKey{this, "MdtDigitContainer", "MDT_DIGITS", "Mdt Digit Output"};
 };
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx
index 772686b372acc1128a5edebbba9e2f37ecd548a9..83b6afbea53e28af4b12b4b7e21aed4a3d409939 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // Author: Ketevi A. Assamagan
@@ -7,22 +7,6 @@
 
 // algorithm to decode RDO into digits
 
-#include "GaudiKernel/MsgStream.h"
-
-#include "StoreGate/StoreGate.h"
-#include "StoreGate/DataHandle.h"
-
-#include "MuonMDT_CnvTools/IMDT_RDO_Decoder.h"
-#include "MuonCSC_CnvTools/ICSC_RDO_Decoder.h"
-#include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
-#include "MuonTGC_CnvTools/ITGC_RDO_Decoder.h"
-#include "MuonSTGC_CnvTools/ISTGC_RDO_Decoder.h"
-#include "MuonMM_CnvTools/IMM_RDO_Decoder.h"
-
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-#include "TGCcablingInterface/ITGCcablingServerSvc.h"
-
 #include "MuonRDO/MdtAmtHit.h"
 #include "MuonRDO/MdtCsm.h"
 #include "MuonRDO/MdtCsmContainer.h"
@@ -74,6 +58,8 @@
 
 #include "MuonByteStreamCnvTest/MuonRdoToMuonDigitTool.h"
 
+#include "TGCcablingInterface/ITGCcablingServerSvc.h"
+
 namespace std { template<typename _Tp> class auto_ptr; }
 
 MuonRdoToMuonDigitTool::MuonRdoToMuonDigitTool(const std::string& type,const std::string& name,const IInterface* pIID) 
@@ -106,19 +92,15 @@ MuonRdoToMuonDigitTool::MuonRdoToMuonDigitTool(const std::string& type,const std
   declareProperty("tgcRdoDecoderTool",  m_tgcRdoDecoderTool);
   declareProperty("stgcRdoDecoderTool",  m_stgcRdoDecoderTool);
   declareProperty("mmRdoDecoderTool",  m_mmRdoDecoderTool);
-  declareProperty("MuonIdHelperTool",  m_muonIdHelperTool);
 
   declareProperty("show_warning_level_invalid_TGC_A09_SSW6_hit", m_show_warning_level_invalid_TGC_A09_SSW6_hit = false);
 }
 
-MuonRdoToMuonDigitTool::~MuonRdoToMuonDigitTool()  
-{}
-
 StatusCode MuonRdoToMuonDigitTool::initialize() {
 
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_acSvc.retrieve() );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   /** CSC calibratin tool for the Condtiions Data base access */
   ATH_CHECK( m_cscCalibTool.retrieve() );
@@ -155,38 +137,38 @@ StatusCode MuonRdoToMuonDigitTool::digitize(const EventContext& ctx) {
 
   if (m_decodeMdtRDO){
     SG::WriteHandle<MdtDigitContainer> wh_mdtDigit(m_mdtDigitKey, ctx);
-    ATH_CHECK(wh_mdtDigit.record(std::make_unique<MdtDigitContainer>(m_muonIdHelperTool->mdtIdHelper().module_hash_max())));
+    ATH_CHECK(wh_mdtDigit.record(std::make_unique<MdtDigitContainer>(m_idHelperSvc->mdtIdHelper().module_hash_max())));
     ATH_CHECK( decodeMdtRDO(ctx, wh_mdtDigit.ptr()) );
   }
 
   if (m_decodeCscRDO){
     SG::WriteHandle<CscDigitContainer> wh_cscDigit(m_cscDigitKey, ctx);
-    ATH_CHECK(wh_cscDigit.record(std::make_unique<CscDigitContainer> (m_muonIdHelperTool->cscIdHelper().module_hash_max())));
+    ATH_CHECK(wh_cscDigit.record(std::make_unique<CscDigitContainer> (m_idHelperSvc->cscIdHelper().module_hash_max())));
     ATH_CHECK( decodeCscRDO(ctx, wh_cscDigit.ptr()) );
   }
 
   if (m_decodeRpcRDO ){
     SG::WriteHandle<RpcDigitContainer> wh_rpcDigit(m_rpcDigitKey, ctx);
-    ATH_CHECK(wh_rpcDigit.record(std::make_unique<RpcDigitContainer> (m_muonIdHelperTool->rpcIdHelper().module_hash_max())));
+    ATH_CHECK(wh_rpcDigit.record(std::make_unique<RpcDigitContainer> (m_idHelperSvc->rpcIdHelper().module_hash_max())));
     ATH_CHECK( decodeRpcRDO(ctx, wh_rpcDigit.ptr()) );
   }
 
   if(!m_tgcCabling && getTgcCabling().isFailure()) return StatusCode::FAILURE;
   if (m_decodeTgcRDO && m_tgcCabling){
     SG::WriteHandle<TgcDigitContainer> wh_tgcDigit(m_tgcDigitKey, ctx);
-    ATH_CHECK(wh_tgcDigit.record(std::make_unique<TgcDigitContainer> (m_muonIdHelperTool->tgcIdHelper().module_hash_max())));
+    ATH_CHECK(wh_tgcDigit.record(std::make_unique<TgcDigitContainer> (m_idHelperSvc->tgcIdHelper().module_hash_max())));
     ATH_CHECK( decodeTgcRDO(ctx, wh_tgcDigit.ptr()) );
   }
 
   if (m_decodesTgcRDO){
     SG::WriteHandle<sTgcDigitContainer> wh_stgcDigit(m_stgcDigitKey, ctx);
-    ATH_CHECK(wh_stgcDigit.record(std::make_unique<sTgcDigitContainer> (m_muonIdHelperTool->stgcIdHelper().module_hash_max())));
+    ATH_CHECK(wh_stgcDigit.record(std::make_unique<sTgcDigitContainer> (m_idHelperSvc->stgcIdHelper().module_hash_max())));
     ATH_CHECK( decodeSTGC_RDO(ctx, wh_stgcDigit.ptr()) );
   }
 
   if (m_decodeMmRDO){
     SG::WriteHandle<MmDigitContainer> wh_mmDigit(m_mmDigitKey, ctx);
-    ATH_CHECK(wh_mmDigit.record(std::make_unique<MmDigitContainer> (m_muonIdHelperTool->mmIdHelper().module_hash_max())));
+    ATH_CHECK(wh_mmDigit.record(std::make_unique<MmDigitContainer> (m_idHelperSvc->mmIdHelper().module_hash_max())));
     ATH_CHECK( decodeMM_RDO(ctx, wh_mmDigit.ptr()) );
   }
 
@@ -371,7 +353,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeMM_RDO(const EventContext& ctx, MmDigit
 
 StatusCode MuonRdoToMuonDigitTool::decodeMdt( MdtDigitContainer *mdtContainer, const MdtCsm * rdoColl, MdtDigitCollection*& collection, Identifier& oldId ) {
 
-    IdContext mdtContext = m_muonIdHelperTool->mdtIdHelper().module_context();
+    IdContext mdtContext = m_idHelperSvc->mdtIdHelper().module_context();
  
     if ( !rdoColl->empty() ) {
         ATH_MSG_DEBUG( " Number of AmtHit in this Csm " 
@@ -399,9 +381,9 @@ StatusCode MuonRdoToMuonDigitTool::decodeMdt( MdtDigitContainer *mdtContainer, c
 	
 	    // find here the Proper Digit Collection identifier, using the rdo-hit id
 	    // (since RDO collections are not in a 1-to-1 relation with digit collections)
-	    Identifier elementId = m_muonIdHelperTool->mdtIdHelper().elementID(newDigit->identify());
+	    Identifier elementId = m_idHelperSvc->mdtIdHelper().elementID(newDigit->identify());
 	    IdentifierHash coll_hash;
-	    if (m_muonIdHelperTool->mdtIdHelper().get_hash(elementId, coll_hash, &mdtContext)) {
+	    if (m_idHelperSvc->mdtIdHelper().get_hash(elementId, coll_hash, &mdtContext)) {
 	      ATH_MSG_WARNING( "Unable to get MDT digit collection hash id " 
                                << "context begin_index = " << mdtContext.begin_index()
                                << " context end_index  = " << mdtContext.end_index()
@@ -447,7 +429,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeCsc(CscDigitContainer* cscContainer, co
 
       //      decoder.setParams(samplingTime);
 
-      IdContext cscContext = m_muonIdHelperTool->cscIdHelper().module_context();
+      IdContext cscContext = m_idHelperSvc->cscIdHelper().module_context();
 
       /** for each Rdo, loop over RawData, converter RawData to digit
 	  retrieve/create digit collection, and insert digit into collection */
@@ -484,17 +466,17 @@ StatusCode MuonRdoToMuonDigitTool::decodeCsc(CscDigitContainer* cscContainer, co
                              << " or charge finding failed " << " ... skipping "  );
 	    continue;
 	  }
-	  ATH_MSG_DEBUG( "CSC RDO->CscDigit: " << m_muonIdHelperTool->cscIdHelper().show_to_string(channelId) );
+	  ATH_MSG_DEBUG( "CSC RDO->CscDigit: " << m_idHelperSvc->cscIdHelper().show_to_string(channelId) );
 	  int theCharge = static_cast<int>(charge);
 	  CscDigit * newDigit = new CscDigit(channelId, theCharge, time);
-	  ATH_MSG_DEBUG( "CSC RDO->Digit: " << m_muonIdHelperTool->cscIdHelper().show_to_string(newDigit->identify()) 
+	  ATH_MSG_DEBUG( "CSC RDO->Digit: " << m_idHelperSvc->cscIdHelper().show_to_string(newDigit->identify()) 
                          << " " << newDigit->charge() << " " << charge << " time= " << time  );
 
 	  for (uint16_t i=0; i< samples.size(); ++i) {
 	    ATH_MSG_DEBUG( "CSC RDO->Digit: " << samples[i]  );
 	  }
           IdentifierHash coll_hash;
-          if (m_muonIdHelperTool->cscIdHelper().get_hash(stationId, coll_hash, &cscContext)) {
+          if (m_idHelperSvc->cscIdHelper().get_hash(stationId, coll_hash, &cscContext)) {
             ATH_MSG_WARNING( "Unable to get CSC digiti collection hash id " 
                              << "context begin_index = " << cscContext.begin_index()
                              << " context end_index  = " << cscContext.end_index()
@@ -530,7 +512,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeCsc(CscDigitContainer* cscContainer, co
 
 StatusCode MuonRdoToMuonDigitTool::decodeRpc(RpcDigitContainer* rpcContainer, const RpcPad * rdoColl, RpcDigitCollection*& collection ) {
 
-            IdContext rpcContext = m_muonIdHelperTool->rpcIdHelper().module_context();
+            IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
 
             ATH_MSG_DEBUG( " Number of CMs in this Pad " 
                            << rdoColl->size()  );
@@ -540,12 +522,12 @@ StatusCode MuonRdoToMuonDigitTool::decodeRpc(RpcDigitContainer* rpcContainer, co
             uint16_t padId     = rdoColl->onlineId(); 
             uint16_t sectorId  = rdoColl->sector(); 
 
-            int stationName = m_muonIdHelperTool->rpcIdHelper().stationName(padOfflineId);
-            int stationEta  = m_muonIdHelperTool->rpcIdHelper().stationEta(padOfflineId);
-            int stationPhi  = m_muonIdHelperTool->rpcIdHelper().stationPhi(padOfflineId);
-            int doubletR    = m_muonIdHelperTool->rpcIdHelper().doubletR(padOfflineId);
+            int stationName = m_idHelperSvc->rpcIdHelper().stationName(padOfflineId);
+            int stationEta  = m_idHelperSvc->rpcIdHelper().stationEta(padOfflineId);
+            int stationPhi  = m_idHelperSvc->rpcIdHelper().stationPhi(padOfflineId);
+            int doubletR    = m_idHelperSvc->rpcIdHelper().doubletR(padOfflineId);
 	
-            Identifier elementId = m_muonIdHelperTool->rpcIdHelper().elementID(stationName, stationEta,
+            Identifier elementId = m_idHelperSvc->rpcIdHelper().elementID(stationName, stationEta,
                                                           stationPhi, doubletR);
 	
             // For each pad, loop on the coincidence matrices
@@ -580,10 +562,10 @@ StatusCode MuonRdoToMuonDigitTool::decodeRpc(RpcDigitContainer* rpcContainer, co
                     {
                         collection = 0;
                         RpcDigit* newDigit = (*itVec);
-                        elementId = m_muonIdHelperTool->rpcIdHelper().elementID(newDigit->identify());
+                        elementId = m_idHelperSvc->rpcIdHelper().elementID(newDigit->identify());
                         
                         IdentifierHash coll_hash;
-                        if (m_muonIdHelperTool->rpcIdHelper().get_hash(elementId, coll_hash, &rpcContext)) {
+                        if (m_idHelperSvc->rpcIdHelper().get_hash(elementId, coll_hash, &rpcContext)) {
                           ATH_MSG_WARNING( "Unable to get RPC digit collection hash id " 
                                            << "context begin_index = " << rpcContext.begin_index()
                                            << " context end_index  = " << rpcContext.end_index()
@@ -623,7 +605,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeTgc(TgcDigitContainer* tgcContainer, co
 
       if(!m_tgcCabling && getTgcCabling().isFailure()) return StatusCode::FAILURE;
 
-      IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+      IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
 
       ATH_MSG_DEBUG( "Number of RawData in this rdo " 
                      << rdoColl->size()  );
@@ -785,7 +767,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeTgc(TgcDigitContainer* tgcContainer, co
 	      
 	      // check new element or not
               IdentifierHash coll_hash;
-              if (m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, coll_hash, &tgcContext)) {
+              if (m_idHelperSvc->tgcIdHelper().get_hash(elementId, coll_hash, &tgcContext)) {
                 ATH_MSG_WARNING( "Unable to get TGC digit collection hash " 
                                  << "context begin_index = " << tgcContext.begin_index()
                                  << " context end_index  = " << tgcContext.end_index()
@@ -842,7 +824,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeTgc(TgcDigitContainer* tgcContainer, co
 StatusCode MuonRdoToMuonDigitTool::decodeSTGC(sTgcDigitContainer * stgcContainer, const Muon::STGC_RawDataCollection * rdoColl, sTgcDigitCollection*& collection, Identifier& oldId){
       if ( !rdoColl->empty() ) {
       ATH_MSG_DEBUG( " Number of RawData in this rdo " << rdoColl->size()  );
-      IdContext stgcContext = m_muonIdHelperTool->stgcIdHelper().module_context();
+      IdContext stgcContext = m_idHelperSvc->stgcIdHelper().module_context();
 
       /** for each Rdo, loop over RawData, converter RawData to digit
 	  retrieve/create digit collection, and insert digit into collection */
@@ -853,13 +835,13 @@ StatusCode MuonRdoToMuonDigitTool::decodeSTGC(sTgcDigitContainer * stgcContainer
 	      ATH_MSG_WARNING( "Error in sTGC RDO decoder"  );
               continue;
 	    }
-	    ATH_MSG_DEBUG( "sTGC RDO->sTGCDigit: " << m_muonIdHelperTool->stgcIdHelper().show_to_string(newDigit->identify()) );
-	    ATH_MSG_DEBUG( "sTGC RDO->Digit: " << m_muonIdHelperTool->stgcIdHelper().show_to_string(newDigit->identify())
+	    ATH_MSG_DEBUG( "sTGC RDO->sTGCDigit: " << m_idHelperSvc->stgcIdHelper().show_to_string(newDigit->identify()) );
+	    ATH_MSG_DEBUG( "sTGC RDO->Digit: " << m_idHelperSvc->stgcIdHelper().show_to_string(newDigit->identify())
                          << " charge: " << newDigit->charge() << " time: " << newDigit->time()  );
 
-	    Identifier elementId = m_muonIdHelperTool->stgcIdHelper().elementID(newDigit->identify());
+	    Identifier elementId = m_idHelperSvc->stgcIdHelper().elementID(newDigit->identify());
 	    IdentifierHash coll_hash;
-	    if (m_muonIdHelperTool->stgcIdHelper().get_hash(elementId, coll_hash, &stgcContext)) {
+	    if (m_idHelperSvc->stgcIdHelper().get_hash(elementId, coll_hash, &stgcContext)) {
 	      ATH_MSG_WARNING( "Unable to get sTGC digit collection hash id "
                                << "context begin_index = " << stgcContext.begin_index()
                                << " context end_index  = " << stgcContext.end_index()
@@ -896,7 +878,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeSTGC(sTgcDigitContainer * stgcContainer
 StatusCode MuonRdoToMuonDigitTool::decodeMM(MmDigitContainer *mmContainer, const Muon::MM_RawDataCollection * rdoColl, MmDigitCollection*& collection, Identifier& oldId){
       if ( !rdoColl->empty() ) {
       ATH_MSG_DEBUG( " Number of RawData in this rdo " << rdoColl->size()  );
-      IdContext mmContext = m_muonIdHelperTool->mmIdHelper().module_context();
+      IdContext mmContext = m_idHelperSvc->mmIdHelper().module_context();
 
       /** for each Rdo, loop over RawData, converter RawData to digit
 	  retrieve/create digit collection, and insert digit into collection */
@@ -907,11 +889,11 @@ StatusCode MuonRdoToMuonDigitTool::decodeMM(MmDigitContainer *mmContainer, const
 	      ATH_MSG_WARNING( "Error in MM RDO decoder"  );
               continue;
 	    }
-	    ATH_MSG_DEBUG( "MM RDO->MMDigit: " << m_muonIdHelperTool->mmIdHelper().show_to_string(newDigit->identify()) );
+	    ATH_MSG_DEBUG( "MM RDO->MMDigit: " << m_idHelperSvc->mmIdHelper().show_to_string(newDigit->identify()) );
 
-	    Identifier elementId = m_muonIdHelperTool->mmIdHelper().elementID(newDigit->identify());
+	    Identifier elementId = m_idHelperSvc->mmIdHelper().elementID(newDigit->identify());
 	    IdentifierHash coll_hash;
-	    if (m_muonIdHelperTool->mmIdHelper().get_hash(elementId, coll_hash, &mmContext)) {
+	    if (m_idHelperSvc->mmIdHelper().get_hash(elementId, coll_hash, &mmContext)) {
 	      ATH_MSG_WARNING( "Unable to get MM digit collection hash id "
                                << "context begin_index = " << mmContext.begin_index()
                                << " context end_index  = " << mmContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadCscDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadCscDigit.cxx
index d1e5dcd805d1dd5237111cc7b24437889c1b3c88..ee0e667be726014c0fca02ea170dc21ac531ca4c 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadCscDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadCscDigit.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 "MuonByteStreamCnvTest/ReadCscDigit.h"
@@ -26,7 +26,7 @@ StatusCode ReadCscDigit::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_activeStore.retrieve() );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   if (!m_cscNtuple) return StatusCode::SUCCESS;
 
@@ -80,15 +80,15 @@ StatusCode ReadCscDigit::execute()
 	    Identifier id = (*dig)->identify();
 
 	    // ID information
-	    m_stationName[m_nDig]  = m_muonIdHelperTool->cscIdHelper().stationName(id);
-	    m_stationEta [m_nDig]  = m_muonIdHelperTool->cscIdHelper().stationEta(id);
-	    m_stationPhi [m_nDig]  = m_muonIdHelperTool->cscIdHelper().stationPhi(id);
-	    m_chamberLayer[m_nDig] = m_muonIdHelperTool->cscIdHelper().chamberLayer(id);
-	    m_wireLayer[m_nDig]    = m_muonIdHelperTool->cscIdHelper().wireLayer(id);
-	    m_measuresPhi[m_nDig]  = m_muonIdHelperTool->cscIdHelper().measuresPhi(id);
-	    m_strip[m_nDig]        = m_muonIdHelperTool->cscIdHelper().strip(id); 
+	    m_stationName[m_nDig]  = m_idHelperSvc->cscIdHelper().stationName(id);
+	    m_stationEta [m_nDig]  = m_idHelperSvc->cscIdHelper().stationEta(id);
+	    m_stationPhi [m_nDig]  = m_idHelperSvc->cscIdHelper().stationPhi(id);
+	    m_chamberLayer[m_nDig] = m_idHelperSvc->cscIdHelper().chamberLayer(id);
+	    m_wireLayer[m_nDig]    = m_idHelperSvc->cscIdHelper().wireLayer(id);
+	    m_measuresPhi[m_nDig]  = m_idHelperSvc->cscIdHelper().measuresPhi(id);
+	    m_strip[m_nDig]        = m_idHelperSvc->cscIdHelper().strip(id); 
 	    m_charge[m_nDig]       = (*dig)->charge(); 
-            ATH_MSG_DEBUG( "Digit = " << m_muonIdHelperTool->cscIdHelper().show_to_string(id) << " charge = " 
+            ATH_MSG_DEBUG( "Digit = " << m_idHelperSvc->cscIdHelper().show_to_string(id) << " charge = " 
                            << m_charge[m_nDig]  );
 	    ++m_nDig;
 	  }
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtDigit.cxx
index 4c1a853640866c35c859265f7296f6e432119c44..a70a9343c7ecc12b004ff3468f577916a0953709 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtDigit.cxx
@@ -33,7 +33,7 @@ StatusCode ReadMdtDigit::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_activeStore.retrieve() );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
  
 
   if (!m_mdtNtuple) return StatusCode::SUCCESS;
@@ -86,9 +86,9 @@ StatusCode ReadMdtDigit::execute()
 	m_tdc[m_nDig] = (*dig)->tdc();
 	m_adc[m_nDig] = (*dig)->adc();
 
-	m_multi[m_nDig] = m_muonIdHelperTool->mdtIdHelper().multilayer(dig_id); 
-	m_layer[m_nDig] = m_muonIdHelperTool->mdtIdHelper().tubeLayer(dig_id);
-	m_wire[m_nDig]  = m_muonIdHelperTool->mdtIdHelper().tube(dig_id); 
+	m_multi[m_nDig] = m_idHelperSvc->mdtIdHelper().multilayer(dig_id); 
+	m_layer[m_nDig] = m_idHelperSvc->mdtIdHelper().tubeLayer(dig_id);
+	m_wire[m_nDig]  = m_idHelperSvc->mdtIdHelper().tube(dig_id); 
 	++m_nDig;
         ATH_MSG_DEBUG( " Digit number  " << m_nDig );
 
@@ -119,13 +119,6 @@ StatusCode ReadMdtDigit::execute()
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
-StatusCode ReadMdtDigit::finalize()
-{
-  ATH_MSG_INFO( "in finalize()"  );
-  return StatusCode::SUCCESS;
-}
-
-
 StatusCode ReadMdtDigit::accessNtuple()
 {
   m_NtupleLocID = "/NTUPLES" + m_NtupleLocID ;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtPRD.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtPRD.cxx
index 8fa56ab5ad0ec3bb1b58bad54e5c240d9bf0ba77..6387f832313aacdc81ab6162457383eb0651c2f2 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtPRD.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadMdtPRD.cxx
@@ -32,7 +32,7 @@ ReadMdtPRD::ReadMdtPRD(const std::string& name, ISvcLocator* pSvcLocator) :
 StatusCode ReadMdtPRD::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   if (!m_mdtNtuple) return StatusCode::SUCCESS;
 
@@ -89,9 +89,9 @@ StatusCode ReadMdtPRD::execute ATLAS_NOT_THREAD_SAFE ()
 	  m_tdc[m_nPrd] = (*mdtPrd)->tdc();
 	  m_adc[m_nPrd] = (*mdtPrd)->adc();
 	  
-	  m_multi[m_nPrd] = m_muonIdHelperTool->mdtIdHelper().multilayer(dig_id); 
-	  m_layer[m_nPrd] = m_muonIdHelperTool->mdtIdHelper().tubeLayer(dig_id);
-	  m_wire[m_nPrd]  = m_muonIdHelperTool->mdtIdHelper().tube(dig_id); 
+	  m_multi[m_nPrd] = m_idHelperSvc->mdtIdHelper().multilayer(dig_id); 
+	  m_layer[m_nPrd] = m_idHelperSvc->mdtIdHelper().tubeLayer(dig_id);
+	  m_wire[m_nPrd]  = m_idHelperSvc->mdtIdHelper().tube(dig_id); 
 	  ++m_nPrd;
 	  ATH_MSG_DEBUG( " MdtPrepData number:  " << m_nPrd );
 	  
@@ -123,13 +123,6 @@ StatusCode ReadMdtPRD::execute ATLAS_NOT_THREAD_SAFE ()
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
-StatusCode ReadMdtPRD::finalize()
-{
-  ATH_MSG_INFO( "in finalize()"  );
-  return StatusCode::SUCCESS;
-}
-
-
 StatusCode ReadMdtPRD::accessNtuple() {
 
   m_NtupleLocID = "/NTUPLES" + m_NtupleLocID ;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadRpcDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadRpcDigit.cxx
index bb184b6f77d771f1389192855cef24a9981f32a3..6e40421e15109b1e8705c1db74565550db810a15 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadRpcDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadRpcDigit.cxx
@@ -20,16 +20,11 @@ ReadRpcDigit::ReadRpcDigit(const std::string &name, ISvcLocator *pSvcLocator)
   declareProperty("WriteRpcNtuple", m_rpcNtuple = false);
 }
 
-ReadRpcDigit::~ReadRpcDigit() 
-{ }
-
-// Initialize method
-
 StatusCode ReadRpcDigit::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_activeStore.retrieve() );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   if (!m_rpcNtuple) return StatusCode::SUCCESS;  
 
@@ -84,19 +79,19 @@ StatusCode ReadRpcDigit::execute()
 	   dig != (*c)->end(); ++dig) 
 	{
 	  Identifier dig_id = (*dig)->identify();
-	  if ( m_muonIdHelperTool->rpcIdHelper().valid(dig_id) ) 
+	  if ( m_idHelperSvc->rpcIdHelper().valid(dig_id) ) 
 	    {
 	      
 	      m_time[m_nDig]         = (*dig)->time();
-	      m_station[m_nDig]      = m_muonIdHelperTool->rpcIdHelper().stationName(dig_id);
-	      m_eta[m_nDig]          = m_muonIdHelperTool->rpcIdHelper().stationEta(dig_id);
-	      m_phi[m_nDig]          = m_muonIdHelperTool->rpcIdHelper().stationPhi(dig_id);
-	      m_doubletR[m_nDig]     = m_muonIdHelperTool->rpcIdHelper().doubletR(dig_id);
-	      m_doubletZ[m_nDig]     = m_muonIdHelperTool->rpcIdHelper().doubletZ(dig_id);
-	      m_doubletPhi[m_nDig]   = m_muonIdHelperTool->rpcIdHelper().doubletPhi(dig_id);
-	      m_gasGap[m_nDig]       = m_muonIdHelperTool->rpcIdHelper().gasGap(dig_id); 
-	      m_measuresPhi[m_nDig]  = m_muonIdHelperTool->rpcIdHelper().measuresPhi(dig_id);
-	      m_strip[m_nDig]        = m_muonIdHelperTool->rpcIdHelper().strip(dig_id);
+	      m_station[m_nDig]      = m_idHelperSvc->rpcIdHelper().stationName(dig_id);
+	      m_eta[m_nDig]          = m_idHelperSvc->rpcIdHelper().stationEta(dig_id);
+	      m_phi[m_nDig]          = m_idHelperSvc->rpcIdHelper().stationPhi(dig_id);
+	      m_doubletR[m_nDig]     = m_idHelperSvc->rpcIdHelper().doubletR(dig_id);
+	      m_doubletZ[m_nDig]     = m_idHelperSvc->rpcIdHelper().doubletZ(dig_id);
+	      m_doubletPhi[m_nDig]   = m_idHelperSvc->rpcIdHelper().doubletPhi(dig_id);
+	      m_gasGap[m_nDig]       = m_idHelperSvc->rpcIdHelper().gasGap(dig_id); 
+	      m_measuresPhi[m_nDig]  = m_idHelperSvc->rpcIdHelper().measuresPhi(dig_id);
+	      m_strip[m_nDig]        = m_idHelperSvc->rpcIdHelper().strip(dig_id);
 	    }
 
 	  ++m_nDig;
@@ -123,15 +118,6 @@ StatusCode ReadRpcDigit::execute()
   return StatusCode::SUCCESS;  
 }
 
-
-// Finalize method
-
-StatusCode ReadRpcDigit::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
-
 StatusCode ReadRpcDigit::accessNtuple() 
 {
   //try to access it  
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadTgcDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadTgcDigit.cxx
index 9f2aa13c171587ebdb4dd4f87ee6488e9904e592..385b8da30582d2e8bb0a58b23a1fadedb636caf3 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadTgcDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/ReadTgcDigit.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 "MuonByteStreamCnvTest/ReadTgcDigit.h"
@@ -28,7 +28,7 @@ StatusCode ReadTgcDigit::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
   ATH_CHECK( m_activeStore.retrieve() );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   if (!m_tgcNtuple) return StatusCode::SUCCESS;
 
@@ -100,20 +100,20 @@ StatusCode ReadTgcDigit::execute()
           ATH_MSG_DEBUG( "Digit number " << m_nDig  );
 
 	  // ID information
-	  m_stationName[m_nDig] = m_muonIdHelperTool->tgcIdHelper().stationName(id);
-	  m_stationEta [m_nDig] = m_muonIdHelperTool->tgcIdHelper().stationEta(id);
-	  m_stationPhi [m_nDig] = m_muonIdHelperTool->tgcIdHelper().stationPhi(id);
-	  m_gasGap     [m_nDig] = m_muonIdHelperTool->tgcIdHelper().gasGap(id);
-	  m_isStrip    [m_nDig] = m_muonIdHelperTool->tgcIdHelper().isStrip(id);
-	  m_channel    [m_nDig] = m_muonIdHelperTool->tgcIdHelper().channel(id); 
+	  m_stationName[m_nDig] = m_idHelperSvc->tgcIdHelper().stationName(id);
+	  m_stationEta [m_nDig] = m_idHelperSvc->tgcIdHelper().stationEta(id);
+	  m_stationPhi [m_nDig] = m_idHelperSvc->tgcIdHelper().stationPhi(id);
+	  m_gasGap     [m_nDig] = m_idHelperSvc->tgcIdHelper().gasGap(id);
+	  m_isStrip    [m_nDig] = m_idHelperSvc->tgcIdHelper().isStrip(id);
+	  m_channel    [m_nDig] = m_idHelperSvc->tgcIdHelper().channel(id); 
 	  m_bcTag      [m_nDig] = bctag;
 
 	  ATH_MSG_DEBUG( MSG::hex
-                         << " N_" << m_muonIdHelperTool->tgcIdHelper().stationName(id)
-                         << " E_" << m_muonIdHelperTool->tgcIdHelper().stationEta(id)
-                         << " P_" << m_muonIdHelperTool->tgcIdHelper().stationPhi(id)
-                         << " G_" << m_muonIdHelperTool->tgcIdHelper().gasGap(id)
-                         << " C_" << m_muonIdHelperTool->tgcIdHelper().channel(id) );
+                         << " N_" << m_idHelperSvc->tgcIdHelper().stationName(id)
+                         << " E_" << m_idHelperSvc->tgcIdHelper().stationEta(id)
+                         << " P_" << m_idHelperSvc->tgcIdHelper().stationPhi(id)
+                         << " G_" << m_idHelperSvc->tgcIdHelper().gasGap(id)
+                         << " C_" << m_idHelperSvc->tgcIdHelper().channel(id) );
 
 	  ++m_nDig;
 	}
@@ -124,15 +124,6 @@ StatusCode ReadTgcDigit::execute()
   return StatusCode::SUCCESS;
 }
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
-
-StatusCode ReadTgcDigit::finalize()
-{
-  ATH_MSG_DEBUG( "in finalize()"  );
-  return StatusCode::SUCCESS;
-}
-
-
 StatusCode ReadTgcDigit::accessNtuple()
 {
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcByteStreamDecoder.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcByteStreamDecoder.cxx
index 46610583c6e3a4a9b3a6a640fea87609a271f7b1..c46e87df12276831834c82a417bc2fe6aaf40b0d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcByteStreamDecoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcByteStreamDecoder.cxx
@@ -3,6 +3,7 @@
 */
 
 #include "MuonByteStreamCnvTest/RpcByteStreamDecoder.h"
+#include "RPCcablingInterface/CablingRPCBase.h"
 
 namespace {
   static constexpr unsigned int const& rpcRawHitWordLength = 7;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx
index 9512ae7364c21a8cc43c883ab8ed6e87f2c47d52..a7d92cd55ea7cb1dbdb729b4baa31c2daebc1938 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcDigitToRpcRDO.cxx
@@ -108,10 +108,10 @@ StatusCode RpcDigitToRpcRDO::execute(const EventContext& ctx) const {
   ///// Creates the CMA patterns from RPC digits /////////////////////////
   debug = (m_detailed_algo)? m_cma_debug : m_fast_debug;                //
                                                                         //
-  CMAdata patterns(&data,&*m_cabling,debug);                            //
+  CMAdata patterns(&data,&*m_cabling,debug);                                //
                                                                         //
-  ATH_MSG_DEBUG( "CMApatterns created from RPC digits:" << std::endl   //
-                 << ShowData<CMAdata>(patterns,"",m_data_detail)  );
+  ATH_MSG_DEBUG( "CMApatterns created from RPC digits:" << std::endl    //
+                 << ShowData<CMAdata>(patterns,"",m_data_detail)  );    //
   ////////////////////////////////////////////////////////////////////////
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.cxx
index 838989f9c965b61f9f3c8b475223613a3908a28f..f6cf5f9e71138e2957e1b050bb37a3db4b4e14a5 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.cxx
@@ -1,9 +1,8 @@
 /*
-  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 "RpcRdoToRpcDigit.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
 
 RpcRdoToRpcDigit::RpcRdoToRpcDigit(const std::string& name,
                                    ISvcLocator* pSvcLocator)
@@ -13,7 +12,7 @@ RpcRdoToRpcDigit::RpcRdoToRpcDigit(const std::string& name,
 
 StatusCode RpcRdoToRpcDigit::initialize()
 {
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   // get RPC cabling
   ATH_CHECK(m_rpcCablingServerSvc.retrieve());
@@ -40,7 +39,7 @@ StatusCode RpcRdoToRpcDigit::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "Retrieved " << rdoContainer->size() << " RPC RDOs." );
 
   SG::WriteHandle<RpcDigitContainer> wh_rpcDigit(m_rpcDigitKey, ctx);
-  ATH_CHECK(wh_rpcDigit.record(std::make_unique<RpcDigitContainer> (m_muonIdHelperTool->rpcIdHelper().module_hash_max())));
+  ATH_CHECK(wh_rpcDigit.record(std::make_unique<RpcDigitContainer> (m_idHelperSvc->rpcIdHelper().module_hash_max())));
   ATH_MSG_DEBUG( "Decoding RPC RDO into RPC Digit"  );
 
   RpcDigitCollection * collection = nullptr;
@@ -60,7 +59,7 @@ StatusCode RpcRdoToRpcDigit::execute(const EventContext& ctx) const
 StatusCode RpcRdoToRpcDigit::decodeRpc( const RpcPad * rdoColl, RpcDigitContainer *rpcContainer, RpcDigitCollection*& collection ) const
 {
 
-  const IdContext rpcContext = m_muonIdHelperTool->rpcIdHelper().module_context();
+  const IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
 
   ATH_MSG_DEBUG( " Number of CMs in this Pad "
                  << rdoColl->size()  );
@@ -70,12 +69,12 @@ StatusCode RpcRdoToRpcDigit::decodeRpc( const RpcPad * rdoColl, RpcDigitContaine
   uint16_t padId     = rdoColl->onlineId();
   uint16_t sectorId  = rdoColl->sector();
 
-  const int stationName = m_muonIdHelperTool->rpcIdHelper().stationName(padOfflineId);
-  const int stationEta  = m_muonIdHelperTool->rpcIdHelper().stationEta(padOfflineId);
-  const int stationPhi  = m_muonIdHelperTool->rpcIdHelper().stationPhi(padOfflineId);
-  const int doubletR    = m_muonIdHelperTool->rpcIdHelper().doubletR(padOfflineId);
+  const int stationName = m_idHelperSvc->rpcIdHelper().stationName(padOfflineId);
+  const int stationEta  = m_idHelperSvc->rpcIdHelper().stationEta(padOfflineId);
+  const int stationPhi  = m_idHelperSvc->rpcIdHelper().stationPhi(padOfflineId);
+  const int doubletR    = m_idHelperSvc->rpcIdHelper().doubletR(padOfflineId);
 
-  Identifier elementId = m_muonIdHelperTool->rpcIdHelper().elementID(stationName, stationEta,
+  Identifier elementId = m_idHelperSvc->rpcIdHelper().elementID(stationName, stationEta,
                                                 stationPhi, doubletR);
 
   // For each pad, loop on the coincidence matrices
@@ -97,10 +96,10 @@ StatusCode RpcRdoToRpcDigit::decodeRpc( const RpcPad * rdoColl, RpcDigitContaine
       // Loop on the digits corresponding to the fired channel
       for (RpcDigit *newDigit : *digitVec) {
         collection = nullptr;
-        elementId = m_muonIdHelperTool->rpcIdHelper().elementID(newDigit->identify());
+        elementId = m_idHelperSvc->rpcIdHelper().elementID(newDigit->identify());
 
         IdentifierHash coll_hash;
-        if (m_muonIdHelperTool->rpcIdHelper().get_hash(elementId, coll_hash, &rpcContext)) {
+        if (m_idHelperSvc->rpcIdHelper().get_hash(elementId, coll_hash, &rpcContext)) {
           ATH_MSG_WARNING( "Unable to get RPC digit collection hash id "
                            << "context begin_index = " << rpcContext.begin_index()
                            << " context end_index  = " << rpcContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.h
index 91ce94f3d5b002de69e515d2ba646edd8dd48a09..d53c9ff812417ddd785c876be47675823aa3ee3c 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/RpcRdoToRpcDigit.h
@@ -5,13 +5,15 @@
 #ifndef MUONBYTESTREAMCNVTEST_RPCRDOTORPCDIGIT_H
 #define MUONBYTESTREAMCNVTEST_RPCRDOTORPCDIGIT_H
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
 #include "MuonRDO/RpcPadContainer.h"
 #include "MuonDigitContainer/RpcDigitContainer.h"
 #include "RPCcablingInterface/IRPCcablingServerSvc.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class RpcRdoToRpcDigit : public AthReentrantAlgorithm {
 
@@ -26,8 +28,7 @@ class RpcRdoToRpcDigit : public AthReentrantAlgorithm {
  private:
   StatusCode decodeRpc( const RpcPad *, RpcDigitContainer *, RpcDigitCollection*& ) const;
   ToolHandle<Muon::IRPC_RDO_Decoder>  m_rpcRdoDecoderTool{this,"rpcRdoDecoderTool","Muon::RpcRDO_Decoder",""};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   ServiceHandle<IRPCcablingServerSvc> m_rpcCablingServerSvc{this, "RPCcablingServerSvc", "RPCcablingServerSvc", ""};
   const IRPCcablingSvc * m_rpcCabling{};
   SG::ReadHandleKey<RpcPadContainer> m_rpcRdoKey{this, "RpcRdoContainer", "RPCPAD", "Rpc RDO Input"};
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx
index 4401cdfbe90c59924140ee1c2fbdc45795f876ed..aa86b43904ca8898afa25753cf909561600764af 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.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 "STGC_DigitToRDO.h"
@@ -15,10 +15,9 @@ STGC_DigitToRDO::STGC_DigitToRDO(const std::string& name, ISvcLocator* pSvcLocat
 StatusCode STGC_DigitToRDO::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
+  ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK( m_rdoContainer.initialize() );
   ATH_CHECK( m_digitContainer.initialize() );
-  ATH_CHECK ( detStore()->retrieve(m_idHelper, "STGCIDHELPER") );
-
   return StatusCode::SUCCESS;
 }
 
@@ -28,7 +27,7 @@ StatusCode STGC_DigitToRDO::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "in execute()"  );
   SG::WriteHandle<STGC_RawDataContainer> rdos (m_rdoContainer, ctx);
   SG::ReadHandle<sTgcDigitContainer> digits (m_digitContainer, ctx);
-  ATH_CHECK( rdos.record(std::make_unique<STGC_RawDataContainer>(m_idHelper->module_hash_max())) );
+  ATH_CHECK( rdos.record(std::make_unique<STGC_RawDataContainer>(m_idHelperSvc->mmIdHelper().module_hash_max())) );
 
   if (digits.isValid() ) {
     for (const sTgcDigitCollection* digitColl : *digits ) {
@@ -37,7 +36,7 @@ StatusCode STGC_DigitToRDO::execute(const EventContext& ctx) const
       // module Id hash
       Identifier digitId = digitColl->identify();
       IdentifierHash hash;
-      int getRdoCollHash = m_idHelper->get_module_hash(digitId,hash);
+      int getRdoCollHash = m_idHelperSvc->mmIdHelper().get_module_hash(digitId,hash);
       if ( getRdoCollHash !=0 ) {
         ATH_MSG_ERROR("Could not get the module hash Id");
         return StatusCode::FAILURE;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h
index b21eb2ddaa1a46a35da49d7579c2732604fc3ea4..55a77ca614e0c34086352cfe140eab0baf9b674c 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_DigitToRDO.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 STGCDIGITTORDO_H
@@ -11,8 +11,7 @@
 
 #include "MuonRDO/STGC_RawDataContainer.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
-
-class sTgcIdHelper;
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -27,8 +26,7 @@ public:
   virtual StatusCode execute(const EventContext& ctx) const override final;
 
 private:
-
-  const sTgcIdHelper*  m_idHelper{};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::WriteHandleKey<Muon::STGC_RawDataContainer> m_rdoContainer{this, "OutputObjectName", "sTGCRDO", "WriteHandleKey for Output STGC_RawDataContainer"};
   SG::ReadHandleKey<sTgcDigitContainer> m_digitContainer{this, "InputObjectName", "sTGC_DIGITS", "ReadHandleKey for Input sTgcDigitContainer"};
 };
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.cxx
index 62248d5eaf3b7e0ed81f454dcdde438e26966c14..9ac6a5a613b55db606ae27df52941345a5d8e68c 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.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 "STGC_RdoToDigit.h"
@@ -12,7 +12,7 @@ STGC_RdoToDigit::STGC_RdoToDigit(const std::string& name,
 
 StatusCode STGC_RdoToDigit::initialize()
 {
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   ATH_CHECK( m_stgcRdoDecoderTool.retrieve() );
   ATH_CHECK(m_stgcRdoKey.initialize());
   ATH_CHECK(m_stgcDigitKey.initialize());
@@ -31,7 +31,7 @@ StatusCode STGC_RdoToDigit::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "Retrieved " << rdoContainer->size() << " sTGC RDOs." );
 
   SG::WriteHandle<sTgcDigitContainer> wh_stgcDigit(m_stgcDigitKey, ctx);
-  ATH_CHECK(wh_stgcDigit.record(std::make_unique<sTgcDigitContainer>(m_muonIdHelperTool->stgcIdHelper().detectorElement_hash_max())));
+  ATH_CHECK(wh_stgcDigit.record(std::make_unique<sTgcDigitContainer>(m_idHelperSvc->stgcIdHelper().detectorElement_hash_max())));
   ATH_MSG_DEBUG( "Decoding sTGC RDO into sTGC Digit"  );
 
   // retrieve the collection of RDO
@@ -47,7 +47,7 @@ StatusCode STGC_RdoToDigit::execute(const EventContext& ctx) const
 
 StatusCode STGC_RdoToDigit::decodeSTGC( const Muon::STGC_RawDataCollection * rdoColl, sTgcDigitContainer * stgcContainer, sTgcDigitCollection*& collection, Identifier& oldId ) const
 {
-  const IdContext stgcContext = m_muonIdHelperTool->stgcIdHelper().module_context();
+  const IdContext stgcContext = m_idHelperSvc->stgcIdHelper().module_context();
 
   if ( rdoColl->size() > 0 ) {
     ATH_MSG_DEBUG( " Number of RawData in this rdo "
@@ -64,9 +64,9 @@ StatusCode STGC_RdoToDigit::decodeSTGC( const Muon::STGC_RawDataCollection * rdo
 
       // find here the Proper Digit Collection identifier, using the rdo-hit id
       // (since RDO collections are not in a 1-to-1 relation with digit collections)
-      const Identifier elementId = m_muonIdHelperTool->stgcIdHelper().elementID(newDigit->identify());
+      const Identifier elementId = m_idHelperSvc->stgcIdHelper().elementID(newDigit->identify());
       IdentifierHash coll_hash;
-      if (m_muonIdHelperTool->stgcIdHelper().get_hash(elementId, coll_hash, &stgcContext)) {
+      if (m_idHelperSvc->stgcIdHelper().get_hash(elementId, coll_hash, &stgcContext)) {
         ATH_MSG_WARNING( "Unable to get STGC digit collection hash id "
                          << "context begin_index = " << stgcContext.begin_index()
                          << " context end_index  = " << stgcContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.h
index c17593b4d64c1ac1e5167e41cadd48fe548775ea..00a3013664ec778ada05bfa439b5feb14f562694 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/STGC_RdoToDigit.h
@@ -1,16 +1,18 @@
 /*
-  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 MUONBYTESTREAMCNVTEST_STGCRDOTOSTGCDIGIT_H
 #define MUONBYTESTREAMCNVTEST_STGCRDOTOSTGCDIGIT_H
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonSTGC_CnvTools/ISTGC_RDO_Decoder.h"
 #include "MuonRDO/STGC_RawDataContainer.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class STGC_RdoToDigit : public AthReentrantAlgorithm {
 
@@ -26,8 +28,7 @@ class STGC_RdoToDigit : public AthReentrantAlgorithm {
   StatusCode decodeSTGC( const Muon::STGC_RawDataCollection *, sTgcDigitContainer *, sTgcDigitCollection*&, Identifier& ) const;
 
   ToolHandle<Muon::ISTGC_RDO_Decoder> m_stgcRdoDecoderTool{this, "sTgcRdoDecoderTool", "Muon::STGC_RDO_Decoder", ""};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   SG::ReadHandleKey<Muon::STGC_RawDataContainer> m_stgcRdoKey{this, "sTgcRdoContainer", "sTGCRDO", "sTGC RDO Input"};
   SG::WriteHandleKey<sTgcDigitContainer> m_stgcDigitKey{this, "sTgcDigitContainer", "sTGC_DIGITS", "sTGC Digit Output"};
 };
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx
index 4cc312b8fe4cfb7ad870ea613e0200376fa971dd..97302353c4d27cb648a66f09d444bf2d9ce92af0 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcDigitToTgcRDO.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 "StoreGate/StoreGateSvc.h"
@@ -7,7 +7,6 @@
 #include "EventInfoMgt/ITagInfoMgr.h"
 
 #include "TGCcablingInterface/ITGCcablingServerSvc.h"
-#include "TGCcablingInterface/ITGCcablingSvc.h"
 
 #include "MuonDigitContainer/TgcDigitCollection.h"
 #include "MuonDigitContainer/TgcDigit.h"
@@ -31,7 +30,7 @@ TgcDigitToTgcRDO::TgcDigitToTgcRDO(const std::string& name, ISvcLocator* pSvcLoc
 StatusCode TgcDigitToTgcRDO::initialize()
 {
   ATH_MSG_DEBUG( " in initialize()"  );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   ATH_CHECK( m_tgc_cabling_server.retrieve() );
 
   ATH_MSG_DEBUG( "standard digitization job: "
@@ -106,7 +105,7 @@ StatusCode TgcDigitToTgcRDO::fill_TGCdata(const EventContext& ctx) const
             bctag = 0;
           }
 
-	  if (m_muonIdHelperTool->tgcIdHelper().valid(channelId))
+	  if (m_idHelperSvc->tgcIdHelper().valid(channelId))
 	    {
 	      // Get the online Id of the channel
 	      int subDetectorID;
@@ -140,19 +139,17 @@ StatusCode TgcDigitToTgcRDO::fill_TGCdata(const EventContext& ctx) const
 		    {
 		      ATH_MSG_DEBUG( "ITGCcablingSvc can't return an online ID for the channel : "
                                      << MSG::dec
-                                     << " N_" << m_muonIdHelperTool->tgcIdHelper().stationName(channelId)
-                                     << " E_" << m_muonIdHelperTool->tgcIdHelper().stationEta(channelId)
-                                     << " P_" << m_muonIdHelperTool->tgcIdHelper().stationPhi(channelId)
-                                     << " G_" << m_muonIdHelperTool->tgcIdHelper().gasGap(channelId)
-                                     << " C_" << m_muonIdHelperTool->tgcIdHelper().channel(channelId) );
+                                     << " N_" << m_idHelperSvc->tgcIdHelper().stationName(channelId)
+                                     << " E_" << m_idHelperSvc->tgcIdHelper().stationEta(channelId)
+                                     << " P_" << m_idHelperSvc->tgcIdHelper().stationPhi(channelId)
+                                     << " G_" << m_idHelperSvc->tgcIdHelper().gasGap(channelId)
+                                     << " C_" << m_idHelperSvc->tgcIdHelper().channel(channelId) );
 		      continue;
 		    }
 
 		  // Create the new Tgc RawData
-//           TgcRawData* rawData
-//             = new TgcRawData(bctag,subDetectorID,rodID,sswID,slbID,0,0,channelID);
-                  bool isStrip = m_muonIdHelperTool->tgcIdHelper().isStrip(channelId);
-                  std::string name = m_muonIdHelperTool->tgcIdHelper().stationNameString(m_muonIdHelperTool->tgcIdHelper().stationName(channelId));
+                  bool isStrip = m_idHelperSvc->tgcIdHelper().isStrip(channelId);
+                  std::string name = m_idHelperSvc->tgcIdHelper().stationNameString(m_idHelperSvc->tgcIdHelper().stationName(channelId));
                   TgcRawData::SlbType type = TgcRawData::SLB_TYPE_UNKNOWN;
                   if (name[1] == '4')
                     type = isStrip ? TgcRawData::SLB_TYPE_INNER_STRIP : TgcRawData::SLB_TYPE_INNER_WIRE;
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.cxx
index ba8a2d24851279eda3597b7ec2d02f83e0e36ab9..6a5de6e69a635f82e787943580e4917fa11e319d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.cxx
@@ -1,9 +1,8 @@
 /*
-  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 "TgcRdoToTgcDigit.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
 TgcRdoToTgcDigit::TgcRdoToTgcDigit(const std::string& name,
                                    ISvcLocator* pSvcLocator)
@@ -13,7 +12,7 @@ TgcRdoToTgcDigit::TgcRdoToTgcDigit(const std::string& name,
 
 StatusCode TgcRdoToTgcDigit::initialize()
 {
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   ATH_CHECK( m_tgcRdoDecoderTool.retrieve() );
   ATH_CHECK(m_tgcRdoKey.initialize());
   ATH_CHECK(m_tgcDigitKey.initialize());
@@ -37,7 +36,7 @@ StatusCode TgcRdoToTgcDigit::execute(const EventContext& ctx) const
   ATH_MSG_DEBUG( "Retrieved " << rdoContainer->size() << " TGC RDOs." );
 
   SG::WriteHandle<TgcDigitContainer> wh_tgcDigit(m_tgcDigitKey, ctx);
-  ATH_CHECK(wh_tgcDigit.record(std::make_unique<TgcDigitContainer> (m_muonIdHelperTool->tgcIdHelper().module_hash_max())));
+  ATH_CHECK(wh_tgcDigit.record(std::make_unique<TgcDigitContainer> (m_idHelperSvc->tgcIdHelper().module_hash_max())));
   ATH_MSG_DEBUG( "Decoding TGC RDO into TGC Digit"  );
 
   Identifier oldElementId;
@@ -59,7 +58,7 @@ StatusCode TgcRdoToTgcDigit::decodeTgc( const TgcRdo *rdoColl,
 {
   TgcDigitCollection* collection = nullptr;
 
-  const IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+  const IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
 
   ATH_MSG_DEBUG( "Number of RawData in this rdo "
                  << rdoColl->size()  );
@@ -217,7 +216,7 @@ StatusCode TgcRdoToTgcDigit::decodeTgc( const TgcRdo *rdoColl,
 
           // check new element or not
           IdentifierHash coll_hash;
-          if (m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, coll_hash, &tgcContext)) {
+          if (m_idHelperSvc->tgcIdHelper().get_hash(elementId, coll_hash, &tgcContext)) {
             ATH_MSG_WARNING( "Unable to get TGC digit collection hash "
                              << "context begin_index = " << tgcContext.begin_index()
                              << " context end_index  = " << tgcContext.end_index()
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.h b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.h
index 616e26b8edf542fdad466a1423da50092189678b..c294a06c3ffb81d9a8f012d1369f1813cadbd099 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.h
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/TgcRdoToTgcDigit.h
@@ -1,17 +1,19 @@
 /*
-  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 MUONBYTESTREAMCNVTEST_TGCRDOTOTGCDIGIT_H
 #define MUONBYTESTREAMCNVTEST_TGCRDOTOTGCDIGIT_H
 
-#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
 #include "MuonTGC_CnvTools/ITGC_RDO_Decoder.h"
 #include "TGCcablingInterface/ITGCcablingServerSvc.h"
 #include "MuonRDO/TgcRdoContainer.h"
 #include "MuonDigitContainer/TgcDigitContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class TgcRdoToTgcDigit : public AthReentrantAlgorithm {
 
@@ -27,13 +29,7 @@ class TgcRdoToTgcDigit : public AthReentrantAlgorithm {
   StatusCode decodeTgc( const TgcRdo *, TgcDigitContainer *, Identifier&) const;
 
   ToolHandle<Muon::ITGC_RDO_Decoder>  m_tgcRdoDecoderTool{this, "tgcRdoDecoderTool", "Muon::TgcRDO_Decoder", ""};
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
-  /** Switch for warning message disabling on one invalid channel in
-      TGC sector A09 seen in 2008 data, at least run 79772 - 91800.
-      bug #48828: TgcRdoToTgcDigit WARNING ElementID not found for
-      sub=103 rod=9 ssw=6 slb=20 bitpos=151 +offset=0 orFlag=0
-  */
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   Gaudi::Property<bool> m_show_warning_level_invalid_TGC_A09_SSW6_hit{this, "show_warning_level_invalid_TGC_A09_SSW6_hit", false, ""};
 
   ServiceHandle<ITGCcablingServerSvc> m_tgcCablingServerSvc{this, "TGCcablingServerSvc", "TGCcablingServerSvc", ""};
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/CscPrepDataRetriever.h b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/CscPrepDataRetriever.h
index f5aeac15536270fc75ef9f0bc113fe6de6fd6316..ba81d48817b32bf5b7ff27884ab5b508dd08f85f 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/CscPrepDataRetriever.h
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/CscPrepDataRetriever.h
@@ -1,19 +1,18 @@
 /*
-  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 JIVEXML_CSCPREPDATARETRIEVER_H
 #define JIVEXML_CSCPREPDATARETRIEVER_H
 
-#include <string>
-
 #include "JiveXML/IDataRetriever.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
-
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
+#include <string>
 
 namespace JiveXML {
   
@@ -39,9 +38,7 @@ namespace JiveXML {
     ///The storegate key for the CSC collection
     std::string m_sgKey;
 
-    /// Tool for CSC identifier helper
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   };
   
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/MdtPrepDataRetriever.h b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/MdtPrepDataRetriever.h
index bdd4012993903a597fc518dfe567e66fa5515837..84300c54b6d63594f372a1602c0242f83c03f0c3 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/MdtPrepDataRetriever.h
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/MdtPrepDataRetriever.h
@@ -1,19 +1,18 @@
 /*
-  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 JIVEXML_MDTPREPDATARETRIEVER_H
 #define JIVEXML_MDTPREPDATARETRIEVER_H
 
-#include <string>
-
 #include "JiveXML/IDataRetriever.h"
-
 #include "AthenaBaseComps/AthAlgTool.h"
-
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
+#include <string>
 
 namespace JiveXML {
   
@@ -38,12 +37,10 @@ namespace JiveXML {
    ///The data type that is generated by this retriever
     const std::string m_typeName;
 
-    ///The storegate key for the CSC collection
+    ///The storegate key for the MDT collection
     std::string m_sgKey;
 
-    /// Tool for MDT identifier helper
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
     int m_adcCut;
     bool m_obeyMasked;
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/RpcPrepDataRetriever.h b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/RpcPrepDataRetriever.h
index 667ff91dd426cd51e112a3d23eec0c971cf316bd..4ad080b012daf3ce4379905609fbd4448a9d5e89 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/RpcPrepDataRetriever.h
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/RpcPrepDataRetriever.h
@@ -1,19 +1,19 @@
 /*
-  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 JIVEXML_RPCPREPDATARETRIEVER_H
 #define JIVEXML_RPCPREPDATARETRIEVER_H
 
-#include <string>
-
 #include "JiveXML/IDataRetriever.h"
 
 #include "AthenaBaseComps/AthAlgTool.h"
-
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
+#include <string>
 
 namespace JiveXML {
   
@@ -38,12 +38,10 @@ namespace JiveXML {
    ///The data type that is generated by this retriever
     const std::string m_typeName;
 
-    ///The storegate key for the CSC collection
+    ///The storegate key for the RPC collection
     std::string m_sgKey;
 
-    /// Tool for RPC identifier helper
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   };
   
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TgcPrepDataRetriever.h b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TgcPrepDataRetriever.h
index e5cfb778c1df494cad6e2b24e4badc11dde04d32..e8b4a3dba2e0a11d6e12d9cd6c1423f9892c881c 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TgcPrepDataRetriever.h
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/MuonJiveXML/TgcPrepDataRetriever.h
@@ -1,19 +1,19 @@
 /*
-  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 JIVEXML_TGCPREPDATARETRIEVER_H
 #define JIVEXML_TGCPREPDATARETRIEVER_H
 
-#include <string>
-
 #include "JiveXML/IDataRetriever.h"
 
 #include "AthenaBaseComps/AthAlgTool.h"
-
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
 
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
+#include <string>
 
 namespace JiveXML {
   
@@ -38,12 +38,10 @@ namespace JiveXML {
    ///The data type that is generated by this retriever
     const std::string m_typeName;
 
-    ///The storegate key for the CSC collection
+    ///The storegate key for the TGC collection
     std::string m_sgKey;
 
-    /// Tool for TGC identifier helper
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   };
   
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CSCClusterRetriever.cxx b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CSCClusterRetriever.cxx
index 689c260f966a3d7512f98f35c6ddf94ef8e41fe8..6cb8beab92ad33c6f42c628825910837c172b460 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CSCClusterRetriever.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CSCClusterRetriever.cxx
@@ -1,12 +1,10 @@
 /*
-  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 "MuonJiveXML/CSCClusterRetriever.h"
 #include "MuonJiveXML/MuonFullIDHelper.h"
 
-#include "MuonIdHelpers/CscIdHelper.h"
-
 namespace JiveXML {
 
   /**
@@ -31,7 +29,7 @@ namespace JiveXML {
   StatusCode CSCClusterRetriever::initialize(){
     
     //be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initializing retriever for " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName()); 
     
     return StatusCode::SUCCESS;
   }        
@@ -43,85 +41,6 @@ namespace JiveXML {
    * @param FormatTool the tool that will create formated output from the DataMap
    */
   StatusCode CSCClusterRetriever::retrieve(ToolHandle<IFormatTool> &/*FormatTool*/) {
-   
-    // //be verbose
-    // if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() << endmsg; 
-    
-    // //retrieve the cluster collection
-    // const CscClusterCollection* container;
-    // if( evtStore()->retrieve(container,m_sgKey).isFailure() ) {
-    //   if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Could not find CscClusterCollection " << m_sgKey << endmsg;
-    //   return StatusCode::SUCCESS;
-    // }
-
-    // //Abort if the container is empty
-    // if (container->empty()){
-    //   if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "CscClusterCollection with name " << m_sgKey << " is empty!" << endmsg;
-    //   return StatusCode::SUCCESS;
-    // }
-
-    // //Make the vectors to contain the information      
-    // //and reserve enough space
-    // int nClusters = container->size();
-    // DataVect x; x.reserve(nClusters);
-    // DataVect y; y.reserve(nClusters);
-    // DataVect z; z.reserve(nClusters);
-    // DataVect sigma; sigma.reserve(nClusters);
-    // DataVect id; id.reserve(nClusters);
-    // DataVect identifier; identifier.reserve(nClusters);
-    // DataVect numHits; numHits.reserve(nClusters);
-    // DataVect barcode; barcode.reserve(nClusters);
-    // DataVect hitsFull; 
-
-    // //Get the number of full hits, and reserve enough space
-    // int hitsCount = 0;
-    // //Get an iterator over the clusters
-    // //and calculate number of hits
-    // CscClusterCollection::const_iterator itr = container->begin();
-    // for(; itr != container->end() ; ++itr)
-    //   hitsCount += ((*itr)->digit_iterator_end() - (*itr)->digit_iterator_begin());
-   
-    // //Reserve enough space for hits
-    // std::string noHitsFull = DataType( hitsCount/((double)(container->size())) ).toString();
-    // hitsFull.reserve(hitsCount);
-
-    // //Now loop again to retrieve the information
-    // for(itr = container->begin(); itr != container->end() ; ++itr){
-    //   x.push_back( DataType( (*itr)->position().x()/CLHEP::cm ) ); 
-    //   y.push_back( DataType( (*itr)->position().y()/CLHEP::cm ) ); 
-    //   z.push_back( DataType( (*itr)->position().z()/CLHEP::cm ) );  
-    //   sigma.push_back( DataType( (*itr)->sigma() ) );  
-    //   id.push_back( DataType( (*itr)->identify().get_compact() ) ); 
-    //   identifier.push_back( DataType( MuonFullIDHelper::getFullID((*itr)->identify(),m_cscHelper) ) );  
-    //   //Barcode is always zero
-    //   barcode.push_back(DataType((int)0));  
-
-    //   //Now loop over CSC digits
-    //   std::vector<CscDigit*>::const_iterator dig = (*itr)->digit_iterator_begin();
-    //   //store all their ids
-    //   for(; dig != (*itr)->digit_iterator_end(); ++dig)
-    //     hitsFull.push_back( DataType( MuonFullIDHelper::getFullID( (*dig)->identify(),m_cscHelper ) ) );
-    //   //and the number of them
-    //   numHits.push_back( DataType(((*itr)->digit_iterator_end() - (*itr)->digit_iterator_begin())));
-    // }
-    
-    // //Finally assemble the DataMap
-    // DataMap myDataMap;
-    // myDataMap["x"] = x;
-    // myDataMap["y"] = y;
-    // myDataMap["z"] = z;
-    // myDataMap["sigma"] = sigma;
-    // myDataMap["id"] = id;
-    // myDataMap["identifier"] = identifier;
-    // myDataMap["numHits"] = numHits;
-    // myDataMap["barcode"] = barcode;
-    // myDataMap["hitsFull multiple=\"" + noHitsFull + "\""] = hitsFull;
-
-    // //Be verbose
-    // if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "<< x.size() << endmsg;
-
-    // //forward data to formating tool
-    // return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
     return StatusCode::SUCCESS;
   }
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CscPrepDataRetriever.cxx b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CscPrepDataRetriever.cxx
index 807b72a1619038658a61feedda3cfc5200a06438..745cade49b8d46bb146b71ce7434f493e55808a7 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CscPrepDataRetriever.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/CscPrepDataRetriever.cxx
@@ -1,13 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonJiveXML/CscPrepDataRetriever.h"
 
 #include "MuonJiveXML/MuonFullIDHelper.h"
-
 #include "MuonReadoutGeometry/CscReadoutElement.h"
-#include "MuonIdHelpers/CscIdHelper.h"
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 
 namespace JiveXML {
@@ -28,9 +26,9 @@ namespace JiveXML {
 
   StatusCode CscPrepDataRetriever::initialize(){
     
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initializing retriever for " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName()); 
     
-    ATH_CHECK( m_muonIdHelperTool.retrieve() );
+    ATH_CHECK( m_idHelperSvc.retrieve() );
 
     return StatusCode::SUCCESS;
   }        
@@ -40,11 +38,11 @@ namespace JiveXML {
   StatusCode CscPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
 
     //be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName()); 
 
-    const Muon::CscPrepDataContainer *cscContainer;
+    const Muon::CscPrepDataContainer *cscContainer=nullptr;
     if ( evtStore()->retrieve(cscContainer, m_sgKey).isFailure() ) {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Muon::CscPrepDataContainer '" << m_sgKey << "' was not retrieved." << endmsg;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::CscPrepDataContainer '" << m_sgKey << "' was not retrieved.");
       return StatusCode::SUCCESS;
     }
 
@@ -75,7 +73,7 @@ namespace JiveXML {
         Identifier id = data->identify();
           
         if (!element) {
-           if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No MuonGM::CscReadoutElement for hit " << id << endmsg;
+           if (msgLvl(MSG::WARNING)) ATH_MSG_WARNING("No MuonGM::CscReadoutElement for hit " << id);
           continue;
         }
 
@@ -88,7 +86,7 @@ namespace JiveXML {
         z.push_back(DataType(globalPos.z()/CLHEP::cm));
         lengthVec.push_back(DataType(length/CLHEP::cm));
         chargeVec.push_back(DataType(charge));
-        identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_muonIdHelperTool->cscIdHelper())));
+        identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_idHelperSvc->cscIdHelper())));
         idVec.push_back(DataType( id.get_compact() ));
         barcode.push_back(DataType(0));
       }
@@ -105,7 +103,7 @@ namespace JiveXML {
     myDataMap["barcode"] = barcode;
 
     //Be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "<< x.size() << endmsg;
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
 
     //forward data to formating tool
     //return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/MdtPrepDataRetriever.cxx b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/MdtPrepDataRetriever.cxx
index 15cbcef50bbee50e7303b579afa30782b40b781e..04bdc4571f901ce7b5378fbc779e0527614c1d62 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/MdtPrepDataRetriever.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/MdtPrepDataRetriever.cxx
@@ -1,13 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonJiveXML/MdtPrepDataRetriever.h"
 
 #include "MuonJiveXML/MuonFullIDHelper.h"
-
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
-#include "MuonIdHelpers/MdtIdHelper.h"
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 
 namespace JiveXML {
@@ -30,9 +28,9 @@ namespace JiveXML {
 
   StatusCode MdtPrepDataRetriever::initialize(){
 
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initializing retriever for " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName()); 
 
-    ATH_CHECK( m_muonIdHelperTool.retrieve() );
+    ATH_CHECK( m_idHelperSvc.retrieve() );
 
     return StatusCode::SUCCESS;
   }
@@ -42,11 +40,11 @@ namespace JiveXML {
   StatusCode MdtPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
 
     //be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName()); 
 
-    const Muon::MdtPrepDataContainer *mdtContainer;
+    const Muon::MdtPrepDataContainer *mdtContainer=nullptr;
     if ( evtStore()->retrieve(mdtContainer, m_sgKey).isFailure() ) {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Muon::MdtPrepDataContainer '" << m_sgKey << "' was not retrieved." << endmsg;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::MdtPrepDataContainer '" << m_sgKey << "' was not retrieved.");
       return StatusCode::SUCCESS;
     }
 
@@ -79,7 +77,7 @@ namespace JiveXML {
         Identifier id = data->identify();
 
         if (!element) {
-          if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No MuonGM::MdtReadoutElement for hit " << id << endmsg;
+          if (msgLvl(MSG::WARNING)) ATH_MSG_WARNING("No MuonGM::MdtReadoutElement for hit " << id);
           continue;
         }
 
@@ -103,16 +101,15 @@ namespace JiveXML {
           z.push_back(DataType(globalPos.z()/CLHEP::cm));
           driftRVec.push_back(DataType(localPos[Trk::driftRadius]/CLHEP::cm));
           lengthVec.push_back(DataType(tubeLength/CLHEP::cm));
-          identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_muonIdHelperTool->mdtIdHelper())));
+          identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_idHelperSvc->mdtIdHelper())));
           idVec.push_back(DataType( id.get_compact() ));
           barcode.push_back(DataType(0));
         }
 
-        if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " MdtPrepData x, y, z, driftR, lenght " << globalPos.x() << " " 
+        if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(" MdtPrepData x, y, z, driftR, lenght " << globalPos.x() << " " 
                                                 << globalPos.y() << " " << globalPos.z() << " " << localPos[Trk::driftRadius] 
-                                                << " " << tubeLength << " adc: " << adcCount; 
-        if ( notMasked ){ if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " *notMasked* "; }  
-        if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << endmsg;
+                                                << " " << tubeLength << " adc: " << adcCount); 
+        if ( notMasked ){ if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(" *notMasked* "); }
       }
     }
 
@@ -127,7 +124,7 @@ namespace JiveXML {
     myDataMap["barcode"] = barcode;
 
     //Be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "<< x.size() << endmsg;
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
 
     //forward data to formating tool
     //return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/RpcPrepDataRetriever.cxx b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/RpcPrepDataRetriever.cxx
index 2af4e90267bec837e510096e615b5d707d2a4796..0b9d55321211d5e6cfe0a258d0c8dce75154da25 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/RpcPrepDataRetriever.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/RpcPrepDataRetriever.cxx
@@ -1,11 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonJiveXML/RpcPrepDataRetriever.h"
 
 #include "MuonJiveXML/MuonFullIDHelper.h"
-
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 
@@ -27,9 +26,9 @@ namespace JiveXML {
 
   StatusCode RpcPrepDataRetriever::initialize(){
 
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initializing retriever for " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName()); 
 
-    ATH_CHECK( m_muonIdHelperTool.retrieve() );
+    ATH_CHECK( m_idHelperSvc.retrieve() );
 
     return StatusCode::SUCCESS;
   }        
@@ -39,11 +38,11 @@ namespace JiveXML {
   StatusCode RpcPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
 
     //be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName()); 
 
-    const Muon::RpcPrepDataContainer *rpcContainer;
+    const Muon::RpcPrepDataContainer *rpcContainer=nullptr;
     if ( evtStore()->retrieve(rpcContainer, m_sgKey).isFailure() ) {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Muon::RpcPrepDataContainer '" << m_sgKey << "' was not retrieved." << endmsg;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::RpcPrepDataContainer '" << m_sgKey << "' was not retrieved.");
       return StatusCode::SUCCESS;
     }
 
@@ -74,12 +73,12 @@ namespace JiveXML {
         Identifier id = data->identify();
   
         if (!element) {
-          if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No MuonGM::RpcReadoutElement for hit " << id << endmsg;
+          if (msgLvl(MSG::WARNING)) ATH_MSG_WARNING("No MuonGM::RpcReadoutElement for hit " << id);
           continue;
         }
   
 	Amg::Vector3D globalPos = element->stripPos(id);  
-        int measuresPhi = m_muonIdHelperTool->rpcIdHelper().measuresPhi(id);
+        int measuresPhi = m_idHelperSvc->rpcIdHelper().measuresPhi(id);
         double stripLength = element->StripLength(measuresPhi);
         double stripWidth = element->StripWidth(measuresPhi);
 
@@ -88,7 +87,7 @@ namespace JiveXML {
         z.push_back(DataType(globalPos.z()/CLHEP::cm));
         lengthVec.push_back(DataType(stripLength/CLHEP::cm));
         widthVec.push_back(DataType(stripWidth/CLHEP::cm));
-        identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_muonIdHelperTool->rpcIdHelper())));
+        identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_idHelperSvc->rpcIdHelper())));
         idVec.push_back(DataType( id.get_compact() ));
         barcode.push_back(DataType(0));
       }
@@ -105,7 +104,7 @@ namespace JiveXML {
     myDataMap["barcode"] = barcode;
 
     //Be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "<< x.size() << endmsg;
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
 
     //forward data to formating tool
     return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
diff --git a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/TgcPrepDataRetriever.cxx b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/TgcPrepDataRetriever.cxx
index 7bebed02dc62ac8ac8a313d42b6dd5a75b97f87a..489dd3caf6bb58ead99718a3958323d814436858 100644
--- a/MuonSpectrometer/MuonCnv/MuonJiveXML/src/TgcPrepDataRetriever.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonJiveXML/src/TgcPrepDataRetriever.cxx
@@ -1,13 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "MuonJiveXML/TgcPrepDataRetriever.h"
 
 #include "MuonJiveXML/MuonFullIDHelper.h"
-
 #include "MuonReadoutGeometry/TgcReadoutElement.h"
-#include "MuonIdHelpers/TgcIdHelper.h"
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 
 namespace JiveXML {
@@ -28,9 +26,9 @@ namespace JiveXML {
 
   StatusCode TgcPrepDataRetriever::initialize(){
     
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initializing retriever for " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Initializing retriever for " << dataTypeName()); 
 
-    ATH_CHECK( m_muonIdHelperTool.retrieve() );
+    ATH_CHECK( m_idHelperSvc.retrieve() );
 
     return StatusCode::SUCCESS;
   }
@@ -40,11 +38,11 @@ namespace JiveXML {
   StatusCode TgcPrepDataRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
 
     //be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieving " << dataTypeName() << endmsg; 
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Retrieving " << dataTypeName()); 
 
-    const Muon::TgcPrepDataContainer *tgcContainer;
+    const Muon::TgcPrepDataContainer *tgcContainer=nullptr;
     if ( evtStore()->retrieve(tgcContainer, m_sgKey).isFailure() ) {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Muon::TgcPrepDataContainer '" << m_sgKey << "' was not retrieved." << endmsg;
+      if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG("Muon::TgcPrepDataContainer '" << m_sgKey << "' was not retrieved.");
       return StatusCode::SUCCESS;
     }
 
@@ -75,22 +73,22 @@ namespace JiveXML {
         Identifier id = data->identify();
 
         if (!element) {
-          if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "No MuonGM::TgcReadoutElement for hit " << id << endmsg;
+          if (msgLvl(MSG::WARNING)) ATH_MSG_WARNING("No MuonGM::TgcReadoutElement for hit " << id);
           continue;
         }
 
 	Amg::Vector3D globalPos; 
         double shortWidth, longWidth, length;
-        if (m_muonIdHelperTool->tgcIdHelper().isStrip(id)) {
-          int gasGap = m_muonIdHelperTool->tgcIdHelper().gasGap(id);
-          int strip = m_muonIdHelperTool->tgcIdHelper().channel(id);
+        if (m_idHelperSvc->tgcIdHelper().isStrip(id)) {
+          int gasGap = m_idHelperSvc->tgcIdHelper().gasGap(id);
+          int strip = m_idHelperSvc->tgcIdHelper().channel(id);
           shortWidth = element->stripShortWidth(gasGap, strip);
           longWidth = element->stripLongWidth(gasGap, strip);
           length = element->stripLength(gasGap, strip);
           globalPos = element->stripPos(gasGap, strip);
         } else {
-          int gasGap = m_muonIdHelperTool->tgcIdHelper().gasGap(id);
-          int gang = m_muonIdHelperTool->tgcIdHelper().channel(id);
+          int gasGap = m_idHelperSvc->tgcIdHelper().gasGap(id);
+          int gang = m_idHelperSvc->tgcIdHelper().channel(id);
           shortWidth = element->gangShortWidth(gasGap, gang);
           longWidth = element->gangLongWidth(gasGap, gang);
           length = element->gangLength(gasGap, gang);
@@ -103,7 +101,7 @@ namespace JiveXML {
         swidthVec.push_back(DataType(shortWidth/CLHEP::cm));
         lwidthVec.push_back(DataType(longWidth/CLHEP::cm));
         lengthVec.push_back(DataType(length/CLHEP::cm));
-        identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_muonIdHelperTool->tgcIdHelper())));
+        identifierVec.push_back(DataType(MuonFullIDHelper::getFullID(id, m_idHelperSvc->tgcIdHelper())));
         idVec.push_back(DataType( id.get_compact() ));
         barcode.push_back(DataType(0));
 
@@ -122,7 +120,7 @@ namespace JiveXML {
     myDataMap["barcode"] = barcode;
 
     //Be verbose
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << ": "<< x.size() << endmsg;
+    if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(dataTypeName() << ": "<< x.size());
 
     ////forward data to formating tool
     //return FormatTool->AddToEvent(dataTypeName(), m_sgKey, &myDataMap);
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx
index 5326b967911a6b320f5fef023b04645d4909d047..3ca1dfb5c2c7c565d9d2d57926d7a4dbe722ad22 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx
@@ -23,14 +23,14 @@ using eformat::helper::SourceIdentifier;
 
 
 MDT_Hid2RESrcID::MDT_Hid2RESrcID() :
-  m_muonIdHelperTool(nullptr), m_specialROBNumber(0), m_readKey("MuonMDT_CablingMap")
+  m_mdtIdHelper(nullptr), m_specialROBNumber(0), m_readKey("MuonMDT_CablingMap")
 {
 
 }
 
-StatusCode MDT_Hid2RESrcID::set(const Muon::MuonIdHelperTool* muonIdHelperTool) {
+StatusCode MDT_Hid2RESrcID::set(const MdtIdHelper* mdtId) {
   // Initialize the cabling Service
-  m_muonIdHelperTool = muonIdHelperTool;
+  m_mdtIdHelper = mdtId;
   ATH_CHECK( m_readKey.initialize() ); 
   return StatusCode::SUCCESS; 
 }
@@ -58,12 +58,12 @@ uint32_t MDT_Hid2RESrcID::getRodID(const Identifier& offlineId) {
       << endmsg;
 
   bool online;
-  int station_name = m_muonIdHelperTool->mdtIdHelper().stationName(offlineId);
-  int station_eta = m_muonIdHelperTool->mdtIdHelper().stationEta(offlineId);
-  int station_phi = m_muonIdHelperTool->mdtIdHelper().stationPhi(offlineId);
-  int multilayer = m_muonIdHelperTool->mdtIdHelper().multilayer(offlineId);
-  int tubelayer = m_muonIdHelperTool->mdtIdHelper().tubeLayer(offlineId);
-  int tube = m_muonIdHelperTool->mdtIdHelper().tube(offlineId);
+  int station_name = m_mdtIdHelper->stationName(offlineId);
+  int station_eta = m_mdtIdHelper->stationEta(offlineId);
+  int station_phi = m_mdtIdHelper->stationPhi(offlineId);
+  int multilayer = m_mdtIdHelper->multilayer(offlineId);
+  int tubelayer = m_mdtIdHelper->tubeLayer(offlineId);
+  int tube = m_mdtIdHelper->tube(offlineId);
 
   SG::ReadCondHandle<MuonMDT_CablingMap> readHandle{m_readKey};
   const MuonMDT_CablingMap* readCdo{*readHandle};
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.h
index e24965d459fe45664f7462474eeebe17c8810bd4..404413e9bb1bea89cc4536b837b9549b4c7e5d1e 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.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 __MDT_HID2RESRCID__
@@ -12,7 +12,7 @@
 #include "StoreGate/ReadCondHandle.h"
 #include "MuonCablingData/MuonMDT_CablingMap.h"
 #include "StoreGate/ReadCondHandleKey.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/MdtIdHelper.h"
 
 #include "Identifier/Identifier.h"
 
@@ -38,7 +38,7 @@ public:
 
   /** intialize the cabling service
    */
-  StatusCode set(const Muon::MuonIdHelperTool* muonIdHelperTool); 
+  StatusCode set(const MdtIdHelper* mdtId); 
 
   /** TMP method for sector 13 data */
   void setSpecialROBNumber(int specialROBNumber) {m_specialROBNumber=specialROBNumber;}
@@ -60,7 +60,7 @@ public:
 
  private: 
 
-  const Muon::MuonIdHelperTool* m_muonIdHelperTool;
+  const MdtIdHelper* m_mdtIdHelper;
 
   int m_specialROBNumber;
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
index 26a0d0c0dc7b48ae3f62764f790482156dbd3274..b60e60d219447ff62fa896ff8f535d0f40ad17f8 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
@@ -1,21 +1,14 @@
 /*
-  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 "MdtCsmContByteStreamTool.h"
-#include "MdtROD_Encoder.h"
 
+#include "MdtROD_Encoder.h"
 #include "MuonRDO/MdtCsm.h"
 #include "MuonRDO/MdtCsmContainer.h"
-
-#include "GaudiKernel/MsgStream.h"
-
-//#include "StoreGate/tools/ClassID_traits.h"
-#include "AthenaKernel/CLASS_DEF.h"
 #include "ByteStreamData/RawEvent.h" 
 
-#include <map> 
-
 // default constructor
 Muon::MdtCsmContByteStreamTool::MdtCsmContByteStreamTool
 ( const std::string& type, const std::string& name,const IInterface* parent )
@@ -26,22 +19,14 @@ Muon::MdtCsmContByteStreamTool::MdtCsmContByteStreamTool
   declareInterface< Muon::IMDT_RDOtoByteStreamTool  >( this );
 }
 
-// destructor 
- 
-//Muon::MdtCsmContByteStreamTool::~MdtCsmContByteStreamTool() {
-//delete m_hid2re;
-//}
-  
 StatusCode Muon::MdtCsmContByteStreamTool::initialize() {
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
-
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   m_hid2re = new MDT_Hid2RESrcID ();
-  StatusCode status = m_hid2re->set(m_muonIdHelperTool.get());
+  StatusCode status = m_hid2re->set(&m_idHelperSvc->mdtIdHelper());
   if ( status.isFailure() ){
     ATH_MSG_FATAL("Could not initialize MDT mapping !");
     return StatusCode::FAILURE;
   }
-
   return StatusCode::SUCCESS;
 }
 
@@ -56,7 +41,7 @@ StatusCode Muon::MdtCsmContByteStreamTool::convert(CONTAINER* cont, RawEventWrit
 						   MsgStream& log ) {
   
   m_fea.clear();
-  StatusCode status = m_fea.idMap().set(m_muonIdHelperTool.get());
+  StatusCode status = m_fea.idMap().set(&m_idHelperSvc->mdtIdHelper());
   if ( status.isFailure() ){
     ATH_MSG_FATAL("Could not initialize MDT mapping !");
     return StatusCode::FAILURE;
@@ -86,7 +71,6 @@ StatusCode Muon::MdtCsmContByteStreamTool::convert(CONTAINER* cont, RawEventWrit
   
   for (; it!=it_end;++it) { 
     theROD  = m_fea.getRodData( (*it).first ); 
-    //((*it).second).set( m_hid2re, m_muonIdHelperTool.get() ) ; 
     ((*it).second).fillROD( *theROD ) ; 
   } 
   
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.h
index 722d3d9d0502e55babce65c7432746ad5f823af5..20d3d3ec4570ccb1e1db09a4a34bf0d81d113f71 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.h
@@ -1,27 +1,23 @@
 /*
-  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 MUONMDT_CNVTOOLS_MDTCSMCONTRAWEVENTTOOL_H
 #define MUONMDT_CNVTOOLS_MDTCSMCONTRAWEVENTTOOL_H
 
-#include <stdint.h>
-#include <map>
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "MDT_Hid2RESrcID.h"
+#include "GaudiKernel/ServiceHandle.h"
 
+#include "MDT_Hid2RESrcID.h"
 #include "ByteStreamData/RawEvent.h" 
-
 #include "ByteStreamCnvSvcBase/FullEventAssembler.h" 
-
 #include "MuonMDT_CnvTools/IMDT_RDOtoByteStreamTool.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 class MdtCsmContainer; 
-class MsgStream;
 
 #include <string>
+#include <map>
 
 namespace Muon {
 /** An AlgTool class to provide conversion from LArRawChannelContainer
@@ -48,16 +44,7 @@ public:
 
   /** constructor
   */
-   MdtCsmContByteStreamTool( const std::string& type, const std::string& name,
-        const IInterface* parent ) ;
-
-  /** destructor 
-  */ 
-  //virtual ~MdtCsmContByteStreamTool() ;
-
-  /** AlgTool InterfaceID
-  */
-  //  static const InterfaceID& interfaceID( ) ;
+   MdtCsmContByteStreamTool( const std::string& type, const std::string& name, const IInterface* parent ) ;
 
   virtual StatusCode initialize();
   virtual StatusCode finalize();
@@ -68,8 +55,7 @@ private:
 
   MDT_Hid2RESrcID* m_hid2re; 
 
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
   
   FullEventAssembler<MDT_Hid2RESrcID> m_fea ;    
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.cxx
index 976ef91576b7c32e0ece01885d1ad8d6cc86589a..2839b8d9fdbf4c8096eef7220a95cbdea1fa8452 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.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 "MdtRDO_Decoder.h"
@@ -13,23 +13,7 @@ MdtRDO_Decoder::MdtRDO_Decoder(const std::string& type, const std::string& name,
 }
 
 StatusCode MdtRDO_Decoder::initialize() {
-   
-  StatusCode status = m_muonIdHelperTool.retrieve();
-  if (status.isFailure()) {
-    ATH_MSG_FATAL("Could not get MuonIdHelperTool !");
-    return StatusCode::FAILURE;
-  } 
-  else {
-    ATH_MSG_DEBUG(" Found the MdtIdHelper. ");
-  }
+  ATH_CHECK(m_idHelperSvc.retrieve());
   ATH_CHECK( m_readKey.initialize() );
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode MdtRDO_Decoder::finalize() 
-{
   return StatusCode::SUCCESS;
 }
-
-
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h
index 40feec2ae6b794bfba56dc12df16ade42711ef37..9241061bd259787ee730c2b7a849cbd986595c05 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRDO_Decoder.h
@@ -1,24 +1,23 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef MUONBYTESTREAMMDTRDODECODER_H
 #define MUONBYTESTREAMMDTRDODECODER_H
 
+#include "MuonMDT_CnvTools/IMDT_RDO_Decoder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 
 #include "MuonRDO/MdtAmtHit.h"
 #include "MuonDigitContainer/MdtDigit.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "MuonCablingData/MuonMDT_CablingMap.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
-#include "MuonMDT_CnvTools/IMDT_RDO_Decoder.h"
-
-#include <inttypes.h>
+#include <string>
 #include <vector>
 
-
 namespace Muon {
   // Decoder class for conversion from MDT RDOs to MDT digits
   // Stefano Rosati
@@ -28,11 +27,9 @@ namespace Muon {
     
   public:
     
-    MdtRDO_Decoder( const std::string& type, const std::string& name,
-        const IInterface* parent ) ;
+    MdtRDO_Decoder( const std::string& type, const std::string& name, const IInterface* parent ) ;
 
     virtual StatusCode initialize();
-    virtual StatusCode finalize();    
     
     MdtDigit * getDigit(const MdtAmtHit * amtHit, uint16_t& subdetId, 
 			uint16_t& mrodId, uint16_t& csmId) const;
@@ -41,9 +38,7 @@ namespace Muon {
 			      uint16_t& mrodId, uint16_t& csmId, int& tdc, int& width) const;
     
   private:
-    
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     SG::ReadCondHandleKey<MuonMDT_CablingMap> m_readKey{this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"};
     
   };
@@ -80,7 +75,7 @@ inline MdtDigit* Muon::MdtRDO_Decoder::getDigit(const MdtAmtHit* amtHit, uint16_
     
   if (!cab) return NULL;
   
-  Identifier chanId = m_muonIdHelperTool->mdtIdHelper().channelID(stationName, stationEta, stationPhi, 
+  Identifier chanId = m_idHelperSvc->mdtIdHelper().channelID(stationName, stationEta, stationPhi, 
 					       multiLayer, tubeLayer, tube);
   
   int tdcCounts = coarse*32+fine;
@@ -123,7 +118,7 @@ inline Identifier Muon::MdtRDO_Decoder::getOfflineData(const MdtAmtHit* amtHit,
     
   }
   
-  Identifier chanId = m_muonIdHelperTool->mdtIdHelper().channelID(stationName, stationEta, stationPhi, 
+  Identifier chanId = m_idHelperSvc->mdtIdHelper().channelID(stationName, stationEta, stationPhi, 
 					       multiLayer, tubeLayer, tube);
   
   tdcCounts = coarse*32+fine;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx
index 87a31ab7c3a366796122b1ac6d0844d91ce95efb..f1e1012cdb221f00c95f1f357b9bcbe48faa19e9 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx
@@ -1,15 +1,9 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// Implementation of MDTROD_Decoder class 
-
 #include "MdtROD_Decoder.h"
 
-#include "GaudiKernel/ListItem.h"
-#include "GaudiKernel/GaudiException.h"
-//#include "GaudiKernel/MsgStream.h"
-
 #include "eformat/Issue.h"
 
 #include <algorithm> 
@@ -20,45 +14,28 @@ static const InterfaceID IID_IMdtROD_Decoder
             ("MdtROD_Decoder", 1, 0);
 
 /** constructor 
-*/ 
-
+*/
 MdtROD_Decoder::MdtROD_Decoder
 ( const std::string& type, const std::string& name,const IInterface* parent )
 :  AthAlgTool(type,name,parent), 
    m_hid2re(0), m_rodReadOut(0), m_csmReadOut(0), 
    m_amtReadOut(0), m_hptdcReadOut(0), m_BMEpresent(false), m_BMGpresent(false), m_BMEid(-1), m_BMGid(-1)
-   //   m_debug(false),
-   //   m_log (msgSvc(), name) 
 {
   declareInterface< MdtROD_Decoder  >( this );
 
   declareProperty("SpecialROBNumber",m_specialROBNumber=-1);
 }
 
-/** destructor 
-*/ 
-MdtROD_Decoder::~MdtROD_Decoder() {
-
-}
-
 const InterfaceID& MdtROD_Decoder::interfaceID( ) { 
   return IID_IMdtROD_Decoder;  
 }
 
 StatusCode MdtROD_Decoder::initialize() {
-
-  // m_log.setLevel(outputLevel());
-  
-  // Retrieve the MuonIdHelperTool
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   // Here the mapping service has to be initialized
   m_hid2re=new MDT_Hid2RESrcID();
-  StatusCode sc = m_hid2re->set(m_muonIdHelperTool.get()); 
-  if ( !sc.isSuccess() ) {
-    ATH_MSG_ERROR(" Can't initialize MDT mapping");
-    return sc;
-  }
+  ATH_CHECK(m_hid2re->set(&m_idHelperSvc->mdtIdHelper())); 
 
   // Initialize decoding classes
   m_rodReadOut = new MdtRODReadOut();
@@ -67,15 +44,15 @@ StatusCode MdtROD_Decoder::initialize() {
   m_hptdcReadOut = new MdtHptdcReadOut();
 
   // check if the layout includes elevator chambers
-  m_BMEpresent = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME") != -1;
+  m_BMEpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME") != -1;
   if(m_BMEpresent){
     ATH_MSG_INFO("Processing configuration for layouts with BME chambers.");
-    m_BMEid = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME");
+    m_BMEid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME");
   }
-  m_BMGpresent = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BMG") != -1;
+  m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1;
   if(m_BMGpresent){
     ATH_MSG_INFO("Processing configuration for layouts with BMG chambers.");
-    m_BMGid = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BMG");
+    m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG");
   }
 
   ATH_CHECK( m_readKey.initialize() );
@@ -287,22 +264,18 @@ StatusCode MdtROD_Decoder::fillCollections(const OFFLINE_FRAGMENTS_NAMESPACE::RO
     ATH_MSG_DEBUG("Name : " << StationName);
     ATH_MSG_DEBUG("Eta  : " << StationEta);
     ATH_MSG_DEBUG("Phi  : " << StationPhi);	
-       
-    //    bool isValid = true;
-    //    moduleId = m_muonIdHelperTool->mdtIdHelper().elementID(StationName, StationEta, StationPhi,
-    //                                    true,&isValid);
       
     if (m_BMEpresent) {
       // for layouts with BMEs (read out by 2 CSMs) the RDOs have to be registered with the detectorElement hash
       // registration of common chambers is always done with detectorElement hash of 1st multilayer
       // boundary in BME when 2nd CSM starts is (offline!) tube 43, 1st CMS is registered with ML1 hash, 2nd CSM is ML2 hash
       if (StationName == m_BMEid && Tube > 42)
-        moduleId = m_muonIdHelperTool->mdtIdHelper().channelID(StationName, StationEta, StationPhi, 2, 1, 1);
+        moduleId = m_idHelperSvc->mdtIdHelper().channelID(StationName, StationEta, StationPhi, 2, 1, 1);
       else
-        moduleId = m_muonIdHelperTool->mdtIdHelper().channelID(StationName, StationEta, StationPhi, 1, 1, 1);
+        moduleId = m_idHelperSvc->mdtIdHelper().channelID(StationName, StationEta, StationPhi, 1, 1, 1);
     } else
       // for layouts with no BME the module hash keeps being used for registration
-      moduleId = m_muonIdHelperTool->mdtIdHelper().elementID(StationName, StationEta, StationPhi);
+      moduleId = m_idHelperSvc->mdtIdHelper().elementID(StationName, StationEta, StationPhi);
 
     if (!cab) {
       ATH_MSG_DEBUG("Cabling not understood");
@@ -548,14 +521,14 @@ std::pair<IdentifierHash, Identifier>  MdtROD_Decoder::getHash ( Identifier iden
     IdentifierHash idHash;
     Identifier regid;
     if (m_BMEpresent) {
-      regid = m_muonIdHelperTool->mdtIdHelper().channelID(m_muonIdHelperTool->mdtIdHelper().stationName(ident),
-				       m_muonIdHelperTool->mdtIdHelper().stationEta(ident),
-				       m_muonIdHelperTool->mdtIdHelper().stationPhi(ident),
-				       m_muonIdHelperTool->mdtIdHelper().multilayer(ident), 1, 1 );
-      m_muonIdHelperTool->mdtIdHelper().get_detectorElement_hash(regid, idHash);
+      regid = m_idHelperSvc->mdtIdHelper().channelID(m_idHelperSvc->mdtIdHelper().stationName(ident),
+				       m_idHelperSvc->mdtIdHelper().stationEta(ident),
+				       m_idHelperSvc->mdtIdHelper().stationPhi(ident),
+				       m_idHelperSvc->mdtIdHelper().multilayer(ident), 1, 1 );
+      m_idHelperSvc->mdtIdHelper().get_detectorElement_hash(regid, idHash);
     } else {
       regid = ident;
-      m_muonIdHelperTool->mdtIdHelper().get_module_hash(regid, idHash);
+      m_idHelperSvc->mdtIdHelper().get_module_hash(regid, idHash);
     }
     return std::make_pair(idHash, regid);
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h
index 4ba3e1cc6a243bbd9a7d29034a19cd901bd96f6a..6e2bfed0ed5616853f14fd4b6ca0293f3e6a8381 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h
@@ -5,6 +5,9 @@
 #ifndef MUONBYTESTREAM_MDTROD_DECODER_H
 #define MUONBYTESTREAM_MDTROD_DECODER_H
 
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "MdtRODReadOut.h"
 #include "MdtCsmReadOut.h"
 #include "MdtAmtReadOut.h"
@@ -13,45 +16,33 @@
 #include "MuonRDO/MdtCsmContainer.h"
 #include "MuonRDO/MdtCsm.h"
 #include "MuonRDO/MdtAmtHit.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "MDT_Hid2RESrcID.h"
 #include "MuonCablingData/MuonMDT_CablingMap.h"
 #include "StoreGate/ReadCondHandleKey.h"
 
-#include <stdint.h>
-#include <map>
-#include <vector>
-#include <cassert>
-
-#include "AthenaBaseComps/AthAlgTool.h"
-
 #include "eformat/SourceIdentifier.h"
 #include "eformat/Version.h"
 #include "ByteStreamData/RawEvent.h"
 
-#include "Identifier/Identifier.h"
-
-
-
-//using eformat::helper::SourceIdentifier; 
+#include <string>
+#include <map>
+#include <vector>
+#include <cassert>
 
 typedef std::map <uint16_t, MdtAmtHit*, std::less<uint16_t> > leading_amt_map;
 
-class MdtROD_Decoder :public AthAlgTool
-{
-
+class MdtROD_Decoder :public AthAlgTool {
 public: 
 
         /** constructor 
         */
-
         MdtROD_Decoder(const std::string& type, const std::string& name,
         const IInterface* parent ) ;
 
         /** destructor 
         */
-        virtual ~MdtROD_Decoder(); 
+        virtual ~MdtROD_Decoder()=default; 
 
         /** AlgTool InterfaceID
         */
@@ -63,12 +54,6 @@ public:
         /** TODO Add documentation. What is a MDT_Hid2RESrcID?*/
         MDT_Hid2RESrcID* getHid2RE() {return m_hid2re;}
 
-        /** Convert ROD Data words into MDr RDOs.
-        @param robFrag Input. Take this and decode it, and fill rdoIDC
-        @param rdoIDC  Output. Will be filled with data (and MUST exist before calling this function)*/ 
-        //void fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag,
-	//		    MdtCsmContainer& rdoIDC);
-
         StatusCode fillCollections(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag,
 			    MdtCsmContainer& rdoIDC);
 
@@ -77,12 +62,10 @@ public:
         std::pair<IdentifierHash, Identifier> getHash (Identifier ident);
 
 private:
-
         MDT_Hid2RESrcID* m_hid2re;
 	SG::ReadCondHandleKey<MuonMDT_CablingMap> m_readKey{this, "ReadKey", "MuonMDT_CablingMap", "Key of MuonMDT_CablingMap"};
 
-        ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-                "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+        ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
         /** TMP special ROB number for sector13 runs*/
         int m_specialROBNumber;
@@ -97,24 +80,12 @@ private:
         bool m_BMGpresent;
         int m_BMEid;
         int m_BMGid;
-        
-	//        bool    m_debug; //!< If true, output debugging information
-        //MsgStream       m_log;
 
         // variables to count how often the caching kicks in
         unsigned int m_nCache = 0;
         unsigned int m_nNotCache = 0;
 }; 
 
-/*
-inline void MdtROD_Decoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag,
-					   MdtCsmContainer& rdoIDC)
-{
-  std::vector<unsigned int> ChambersToDecode;
-
-  this->fillCollection (robFrag, rdoIDC, ChambersToDecode);
-}
-*/
 #endif
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
index ffb04572e13e8c1e33d8a26cefd3e67333c103a7..b72b1fc24e0b8a4d5995493ff293207ebacde85d 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
@@ -1,11 +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
 */
 
-///////////////////////////////////////////////////////////////////
-// MdtRdoToPrepDataTool.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #include "MdtRdoToPrepDataTool.h"
 
 Muon::MdtRdoToPrepDataTool::MdtRdoToPrepDataTool(const std::string& t, const std::string& n, const IInterface*  p)
@@ -15,10 +11,6 @@ Muon::MdtRdoToPrepDataTool::MdtRdoToPrepDataTool(const std::string& t, const std
 {
 }
 
-Muon::MdtRdoToPrepDataTool::~MdtRdoToPrepDataTool()
-{
-}
-
 StatusCode Muon::MdtRdoToPrepDataTool::initialize()
 {    
   ATH_MSG_VERBOSE("Starting init");
@@ -27,18 +19,13 @@ StatusCode Muon::MdtRdoToPrepDataTool::initialize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode Muon::MdtRdoToPrepDataTool::finalize()
-{
-  return MdtRdoToPrepDataToolCore::finalize();
-}
-
 Muon::MdtRdoToPrepDataTool::SetupMdtPrepDataContainerStatus Muon::MdtRdoToPrepDataTool::setupMdtPrepDataContainer()
 {
   if(!evtStore()->contains<Muon::MdtPrepDataContainer>(m_mdtPrepDataContainerKey.key())){	 
     m_fullEventDone=false;
 
     SG::WriteHandle< Muon::MdtPrepDataContainer >handle(m_mdtPrepDataContainerKey);
-    StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(m_muonIdHelperTool->mdtIdHelper().module_hash_max()));
+    StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(m_idHelperSvc->mdtIdHelper().module_hash_max()));
 
     if (status.isFailure() || !handle.isValid() ) 	{
       ATH_MSG_FATAL("Could not record container of MDT PrepData Container at " << m_mdtPrepDataContainerKey.key());	
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
index 39a863fcf9c6e2cb5f90cbf8ce7f58aaa7909e6e..5c648e499bcf4c8289601f1f2894d5dd4b26b267 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
@@ -1,11 +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
 */
 
-///////////////////////////////////////////////////////////////////
-// MdtRdoToPrepDataTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONMdtRdoToPrepDataTool_H
 #define MUONMdtRdoToPrepDataTool_H
 
@@ -31,13 +27,10 @@ namespace Muon
     MdtRdoToPrepDataTool(const std::string&,const std::string&,const IInterface*);
 
     /** default destructor */
-    virtual ~MdtRdoToPrepDataTool ();
+    virtual ~MdtRdoToPrepDataTool()=default;
 
     /** standard Athena-Algorithm method */
     virtual StatusCode initialize() override;
-    
-    /** standard Athena-Algorithm method */
-    virtual StatusCode finalize() override;
       
   protected:
     virtual SetupMdtPrepDataContainerStatus setupMdtPrepDataContainer() override;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
index 2b3cc6d12166caa257f92b0dec7bfb0940bcf9be..712de32de20654b9bfa8a8a70ac69b8d091b1a0c 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.cxx
@@ -1,27 +1,20 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MdtRdoToPrepDataToolCore.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #include "MdtRdoToPrepDataToolCore.h"
 
 #include "MuonReadoutGeometry/MuonStation.h"
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
 #include "MdtRDO_Decoder.h"
-
 #include "MuonCalibEvent/MdtCalibHit.h"
 #include "MdtCalibSvc/MdtCalibrationTool.h"
 #include "MdtCalibSvc/MdtCalibrationSvcSettings.h"
 #include "MdtCalibSvc/MdtCalibrationSvcInput.h"
-
 #include "MuonPrepRawData/MdtTwinPrepData.h"    // TWIN TUBES
-
 #include "GeoModelUtilities/GeoGetIds.h"
-
 #include "GaudiKernel/ThreadLocalContext.h"
+
 #include <vector>
 #include <algorithm>
 
@@ -29,20 +22,15 @@ using namespace MuonGM;
 using namespace Trk;
 using namespace Muon;
 
-Muon::MdtRdoToPrepDataToolCore::MdtRdoToPrepDataToolCore(const std::string& t,
-                                                 const std::string& n,
-                                                 const IInterface*  p )
-  :
+Muon::MdtRdoToPrepDataToolCore::MdtRdoToPrepDataToolCore(const std::string& t, const std::string& n, const IInterface* p) :
   AthAlgTool(t,n,p),
-  m_muonMgr(0),
+  m_muonMgr(nullptr),
   m_calibrationTool("MdtCalibrationTool",this),
   m_mdtCalibSvcSettings(new MdtCalibrationSvcSettings() ),
-  m_calibHit( 0 ),
+  m_calibHit(nullptr),
   m_invSpeed(1./299.792458),
-  //m_mdtPrepDataContainer("MDT_DriftCircles"),
   m_calibratePrepData(true),
   m_mdtDecoder("Muon::MdtRDO_Decoder/MdtRDO_Decoder", this),
-  m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool", this),
   m_fullEventDone(false),
   m_BMEpresent(false),
   m_BMGpresent(false),
@@ -74,35 +62,15 @@ Muon::MdtRdoToPrepDataToolCore::MdtRdoToPrepDataToolCore(const std::string& t,
   declareProperty("CalibrationTool",m_calibrationTool);
 }
 
-
-Muon::MdtRdoToPrepDataToolCore::~MdtRdoToPrepDataToolCore()
-{
-
-}
-
-StatusCode Muon::MdtRdoToPrepDataToolCore::initialize()
-{  
-  if(detStore()->retrieve( m_muonMgr ).isFailure()) {
-    ATH_MSG_FATAL(" Cannot retrieve MuonDetectorManager ");
-    return StatusCode::FAILURE;
-  }
-
-  StatusCode sc = m_calibrationTool.retrieve();
-  if ( sc.isFailure() ){
-    ATH_MSG_ERROR( "Could not retrieve MdtCalibrationTool"  );
-  } else {
-    ATH_MSG_VERBOSE("MdtCalibrationTool retrieved with statusCode = "<<sc<<" pointer = "<<m_calibrationTool );
-  }
-
-  /// create an empty MDT PrepData container for filling
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
-
+StatusCode Muon::MdtRdoToPrepDataToolCore::initialize() {  
+  ATH_CHECK(AthAlgTool::initialize());
+  ATH_CHECK(detStore()->retrieve(m_muonMgr));
+  ATH_CHECK(m_calibrationTool.retrieve());
+  ATH_MSG_VERBOSE("MdtCalibrationTool retrieved with pointer = "<<m_calibrationTool);
+  ATH_CHECK(m_idHelperSvc.retrieve());
   // Retrieve the RDO decoder 
   ATH_CHECK(m_mdtDecoder.retrieve());
 
-  ATH_CHECK(m_idHelper.retrieve());
-  
-    
   // + TWIN TUBES
   // make an array of [multilayer][layer][twin-pair]; 2 multilayers, 3 layer per multilayer, 36 twin-pairs per layer 
   if(m_useTwin){
@@ -124,15 +92,15 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::initialize()
   m_mdtCalibSvcSettings->initialize();
 
   // check if the layout includes elevator chambers
-  m_BMEpresent = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME") != -1;
+  m_BMEpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME") != -1;
   if(m_BMEpresent){
     ATH_MSG_INFO("Processing configuration for layouts with BME chambers.");
-    m_BMEid = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME");
+    m_BMEid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME");
   }
-  m_BMGpresent = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BMG") != -1;
+  m_BMGpresent = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG") != -1;
   if(m_BMGpresent){
     ATH_MSG_INFO("Processing configuration for layouts with BMG chambers.");
-    m_BMGid = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BMG");
+    m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG");
     for(int phi=6; phi<8; phi++) { // phi sectors
       for(int eta=1; eta<4; eta++) { // eta sectors
         for(int side=-1; side<2; side+=2) { // side
@@ -165,8 +133,8 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::decode( const std::vector<uint32_t>&
 {    
   SG::ReadCondHandle<MuonMDT_CablingMap> readHandle{m_readKey};
   const MuonMDT_CablingMap* readCdo{*readHandle};
-  if(readCdo==nullptr){
-    ATH_MSG_ERROR("Null pointer to the read conditions object");
+  if(!readCdo){
+    ATH_MSG_ERROR("nullptr to the read conditions object");
     return StatusCode::FAILURE;
   }
   const std::vector<IdentifierHash>& chamberHashInRobs = readCdo->getChamberHashVec(robIds);
@@ -227,7 +195,7 @@ void Muon::MdtRdoToPrepDataToolCore::processRDOContainer( std::vector<Identifier
 
   // It is more practical to loop through all the hashes rather than all RDO elements
   // as we benefit from handling the 2 RDO to 1 PRD special case
-  for(unsigned int iHash = 0; iHash < m_muonIdHelperTool->mdtIdHelper().module_hash_max(); iHash++){
+  for(unsigned int iHash = 0; iHash < m_idHelperSvc->mdtIdHelper().module_hash_max(); iHash++){
     handlePRDHash( IdentifierHash(iHash), *rdoContainer, idWithDataVect);
   }
   //for (MdtCsmContainer::const_iterator rdoColli = rdoContainer->begin(); rdoColli!=rdoContainer->end(); ++rdoColli) {
@@ -248,20 +216,20 @@ bool Muon::MdtRdoToPrepDataToolCore::handlePRDHash( IdentifierHash hash, const M
   IdentifierHash rdoHash = hash; // before BMEs were installed, RDOs were indexed by offline hashes (same as PRD)
   if (m_BMEpresent) { // after BMEs were installed, the RDOs are indexed by the detectorElement hash of a multilayer
     Identifier elementId;
-    IdContext tmp_context = m_muonIdHelperTool->mdtIdHelper().module_context();
-    m_muonIdHelperTool->mdtIdHelper().get_id(hash, elementId, &tmp_context);
+    IdContext tmp_context = m_idHelperSvc->mdtIdHelper().module_context();
+    m_idHelperSvc->mdtIdHelper().get_id(hash, elementId, &tmp_context);
 
-    Identifier multilayerId = m_muonIdHelperTool->mdtIdHelper().multilayerID(elementId, 1); //first multilayer
+    Identifier multilayerId = m_idHelperSvc->mdtIdHelper().multilayerID(elementId, 1); //first multilayer
     IdentifierHash multilayerHash;
-    m_muonIdHelperTool->mdtIdHelper().get_detectorElement_hash(multilayerId, multilayerHash);
+    m_idHelperSvc->mdtIdHelper().get_detectorElement_hash(multilayerId, multilayerHash);
     rdoHash = multilayerHash;
 
     // for BMEs there are 2 CSMs per chamber, registered with the hashes of the 2 multilayers
     // If this is BMEid then we handle two RDO at once, else just one
-    if (m_muonIdHelperTool->mdtIdHelper().stationName(elementId) == m_BMEid) {
-      Identifier multilayerId2 = m_muonIdHelperTool->mdtIdHelper().multilayerID(elementId, 2); //second multilayer
+    if (m_idHelperSvc->mdtIdHelper().stationName(elementId) == m_BMEid) {
+      Identifier multilayerId2 = m_idHelperSvc->mdtIdHelper().multilayerID(elementId, 2); //second multilayer
       IdentifierHash multilayerHash2;
-      m_muonIdHelperTool->mdtIdHelper().get_detectorElement_hash(multilayerId2, multilayerHash2);
+      m_idHelperSvc->mdtIdHelper().get_detectorElement_hash(multilayerId2, multilayerHash2);
       IdentifierHash rdoHash2 = multilayerHash2;
       // Retrieve the two RDO
       MdtCsmContainer::const_iterator rdoColli  = rdoContainer.indexFind(rdoHash);
@@ -437,13 +405,13 @@ void Muon::MdtRdoToPrepDataToolCore::printPrepData(  )
       int nhitcoll = 0;
       if ( mdtColl->size() > 0 ) 
         {            
-          ATH_MSG_DEBUG("PrepData Collection ID "<<m_idHelper->toString(mdtColl->identify()));
+          ATH_MSG_DEBUG("PrepData Collection ID "<<m_idHelperSvc->toString(mdtColl->identify()));
           MdtPrepDataCollection::const_iterator it_mdtPrepData;
           for (it_mdtPrepData=mdtColl->begin(); it_mdtPrepData != mdtColl->end(); it_mdtPrepData++) {
             nhitcoll++;
             nhits++;
             ATH_MSG_DEBUG(" in this coll. "<<nhitcoll<<" prepData id = "
-                         <<m_idHelper->toString((*it_mdtPrepData)->identify())
+                         <<m_idHelperSvc->toString((*it_mdtPrepData)->identify())
                          <<" tdc/adc ="<<(*it_mdtPrepData)->tdc()<<"/"<< (*it_mdtPrepData)->adc());
           }
           ncoll++;
@@ -465,9 +433,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
     // two chambers in ATLAS are installed with Twin Tubes; in detector coordinates BOL4A13 & BOL4C13; only INNER multilayer(=1) is with twin tubes
     // implement twin tube writing to prepData either for all BOL (m_useAllBOLTwin = true) _OR_ only for two chambers really installed
     Identifier elementId = rdoColl->identify();
-    MuonStationIndex::ChIndex chIndex = m_idHelper->chamberIndex(elementId);
+    MuonStationIndex::ChIndex chIndex = m_idHelperSvc->chamberIndex(elementId);
     if( chIndex == MuonStationIndex::BOL &&
-        ( m_useAllBOLTwin || (std::abs(m_muonIdHelperTool->mdtIdHelper().stationEta(elementId)) == 4 && m_muonIdHelperTool->mdtIdHelper().stationPhi(elementId) == 7) ) ) { 
+        ( m_useAllBOLTwin || (std::abs(m_idHelperSvc->mdtIdHelper().stationEta(elementId)) == 4 && m_idHelperSvc->mdtIdHelper().stationPhi(elementId) == 7) ) ) { 
       return processCsmTwin(rdoColl, idWithDataVect);
     }
   }
@@ -476,12 +444,12 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
 
   // Make some checks if we are in special circumstances
   if(rdoColl2){
-    Identifier elementId1 = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl->identify());
-    Identifier elementId2 = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl2->identify());
-    IdContext mdtContext  = m_muonIdHelperTool->mdtIdHelper().module_context();
+    Identifier elementId1 = m_idHelperSvc->mdtIdHelper().parentID(rdoColl->identify());
+    Identifier elementId2 = m_idHelperSvc->mdtIdHelper().parentID(rdoColl2->identify());
+    IdContext mdtContext  = m_idHelperSvc->mdtIdHelper().module_context();
     IdentifierHash hash1, hash2;
-    m_muonIdHelperTool->mdtIdHelper().get_hash(elementId1, hash1, &mdtContext);
-    m_muonIdHelperTool->mdtIdHelper().get_hash(elementId2, hash2, &mdtContext);
+    m_idHelperSvc->mdtIdHelper().get_hash(elementId1, hash1, &mdtContext);
+    m_idHelperSvc->mdtIdHelper().get_hash(elementId2, hash2, &mdtContext);
     ATH_MSG_DEBUG("Special case with 2 RDO going into 1 PRD - ID1 " << elementId1 
       << " ID2 " << elementId2 << " hash 1 " << hash1 << " hash 2 " << hash2 );
     // These should have the same PRD MDT hash otherwise we need to understand why we are here
@@ -489,13 +457,13 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
       ATH_MSG_ERROR("Hash1 and Hash2 are different for special case : " << hash1 << " " << hash2);
       return StatusCode::FAILURE;
     }
-    ATH_MSG_DEBUG(" Number of AmtHit in this Csm (1) " << rdoColl->size()  <<" CSM id is "<<m_idHelper->toString(elementId1));
-    ATH_MSG_DEBUG(" Number of AmtHit in this Csm (2) " << rdoColl2->size() <<" CSM id is "<<m_idHelper->toString(elementId2));
+    ATH_MSG_DEBUG(" Number of AmtHit in this Csm (1) " << rdoColl->size()  <<" CSM id is "<<m_idHelperSvc->toString(elementId1));
+    ATH_MSG_DEBUG(" Number of AmtHit in this Csm (2) " << rdoColl2->size() <<" CSM id is "<<m_idHelperSvc->toString(elementId2));
   }
 
   /// MDT hit context
-  //IdContext hitContext = m_muonIdHelperTool->mdtIdHelper().channel_context();
-  Identifier elementId = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl->identify());
+  //IdContext hitContext = m_idHelperSvc->mdtIdHelper().channel_context();
+  Identifier elementId = m_idHelperSvc->mdtIdHelper().parentID(rdoColl->identify());
   
   // prepare the special case of two chamber connected to the same CSM
   // create objects but do not initialize them
@@ -506,18 +474,18 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
   IdentifierHash secondMdtHashId;
 
   if(!rdoColl2)
-    ATH_MSG_DEBUG(" Number of AmtHit in this Csm " << rdoColl->size() <<" CSM id is "<<m_idHelper->toString(elementId));
+    ATH_MSG_DEBUG(" Number of AmtHit in this Csm " << rdoColl->size() <<" CSM id is "<<m_idHelperSvc->toString(elementId));
 
   uint16_t subdetId = rdoColl->SubDetId();
   uint16_t mrodId = rdoColl->MrodId();
   uint16_t csmId = rdoColl->CsmId();
-  ATH_MSG_VERBOSE("Identifier = "<<m_idHelper->toString(elementId)
+  ATH_MSG_VERBOSE("Identifier = "<<m_idHelperSvc->toString(elementId)
                   <<" subdetId/ mrodId/ csmId = "<<subdetId<<" / "<<mrodId<<" / "<<csmId);
 
   // Create prepdata collection
-  IdContext mdtContext = m_muonIdHelperTool->mdtIdHelper().module_context();
+  IdContext mdtContext = m_idHelperSvc->mdtIdHelper().module_context();
   IdentifierHash mdtHashId;
-  if(m_muonIdHelperTool->mdtIdHelper().get_hash(elementId, mdtHashId, &mdtContext)) {
+  if(m_idHelperSvc->mdtIdHelper().get_hash(elementId, mdtHashId, &mdtContext)) {
     ATH_MSG_FATAL("Unable to get MDT hash id from MDT digit collection "
                   << "context begin_index = " << mdtContext.begin_index()
                   << " context end_index  = " << mdtContext.end_index()
@@ -558,11 +526,11 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
       itD   = rdoColl2->begin();
       itD_e = rdoColl2->end();
 
-      elementId = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl2->identify());
+      elementId = m_idHelperSvc->mdtIdHelper().parentID(rdoColl2->identify());
       subdetId = rdoColl2->SubDetId();
       mrodId   = rdoColl2->MrodId();
       csmId    = rdoColl2->CsmId();
-      ATH_MSG_VERBOSE("Identifier = "<<m_idHelper->toString(elementId)
+      ATH_MSG_VERBOSE("Identifier = "<<m_idHelperSvc->toString(elementId)
                   <<" subdetId/ mrodId/ csmId = "<<subdetId<<" / "<<mrodId<<" / "<<csmId);
     }
   }
@@ -582,7 +550,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
     MdtDigit * newDigit = m_mdtDecoder->getDigit(amtHit,subdetId,
                                                  mrodId,csmId);
 
-    if (newDigit==NULL) {
+    if (!newDigit) {
       ATH_MSG_WARNING("Found issue MDT RDO decoder for subdetId/mrodId/csmId "
                       <<subdetId<<"/"<<mrodId<<"/"<<csmId<<" amtHit channelId/tdcId ="
                       <<amtHit->channelId()<<"/"<<amtHit->tdcId());
@@ -592,12 +560,12 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
 
     // Do something with it
     Identifier     channelId   = newDigit->identify();
-    Identifier     parentId    = m_muonIdHelperTool->mdtIdHelper().parentID(channelId);
-    if( m_muonIdHelperTool->mdtIdHelper().stationName(parentId) == m_BMGid && m_BMGpresent) {
+    Identifier     parentId    = m_idHelperSvc->mdtIdHelper().parentID(channelId);
+    if( m_idHelperSvc->mdtIdHelper().stationName(parentId) == m_BMGid && m_BMGpresent) {
       std::map<Identifier, std::vector<Identifier> >::iterator myIt = m_DeadChannels.find(m_muonMgr->getMdtReadoutElement(channelId)->identify());
       if( myIt != m_DeadChannels.end() ){
         if( std::find( (myIt->second).begin(), (myIt->second).end(), channelId) != (myIt->second).end() ) {
-          ATH_MSG_DEBUG("processCsm : Deleting BMG digit with identifier" << m_muonIdHelperTool->mdtIdHelper().show_to_string(channelId) );
+          ATH_MSG_DEBUG("processCsm : Deleting BMG digit with identifier" << m_idHelperSvc->mdtIdHelper().show_to_string(channelId) );
           delete newDigit;
 	  itD++;
           continue;
@@ -610,9 +578,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
 
     if ( parentId != elementId ) {
 
-      int stationName = m_muonIdHelperTool->mdtIdHelper().stationName(channelId);
+      int stationName = m_idHelperSvc->mdtIdHelper().stationName(channelId);
       // check that at least the station name is the same, otherwise it must be an error
-      if ( stationName == m_muonIdHelperTool->mdtIdHelper().stationName(elementId) ) {
+      if ( stationName == m_idHelperSvc->mdtIdHelper().stationName(elementId) ) {
 
         doubleCsm = true;
 
@@ -623,17 +591,17 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
 
           ATH_MSG_DEBUG("A special case of single CSM reading two chambers has been found");
 
-          ATH_MSG_DEBUG("First station: " << m_muonIdHelperTool->mdtIdHelper().stationNameString(stationName) << " eta: " 
-                        << m_muonIdHelperTool->mdtIdHelper().stationEta(elementId) << " phi: " << m_muonIdHelperTool->mdtIdHelper().stationPhi(elementId) );
+          ATH_MSG_DEBUG("First station: " << m_idHelperSvc->mdtIdHelper().stationNameString(stationName) << " eta: " 
+                        << m_idHelperSvc->mdtIdHelper().stationEta(elementId) << " phi: " << m_idHelperSvc->mdtIdHelper().stationPhi(elementId) );
 
-          ATH_MSG_DEBUG("Second station: " << m_muonIdHelperTool->mdtIdHelper().stationNameString(stationName) << " eta: " 
-                        << m_muonIdHelperTool->mdtIdHelper().stationEta(secondElementId) << " phi: " 
-                        << m_muonIdHelperTool->mdtIdHelper().stationPhi(secondElementId) );
+          ATH_MSG_DEBUG("Second station: " << m_idHelperSvc->mdtIdHelper().stationNameString(stationName) << " eta: " 
+                        << m_idHelperSvc->mdtIdHelper().stationEta(secondElementId) << " phi: " 
+                        << m_idHelperSvc->mdtIdHelper().stationPhi(secondElementId) );
 
           //
           // create the collection and initialize the hash Id
           //
-          if(m_muonIdHelperTool->mdtIdHelper().get_hash(secondElementId, secondMdtHashId, &mdtContext)) {
+          if(m_idHelperSvc->mdtIdHelper().get_hash(secondElementId, secondMdtHashId, &mdtContext)) {
             ATH_MSG_FATAL("Unable to get MDT hash id from MDT digit collection "
                           << "context begin_index = " << mdtContext.begin_index()
                           << " context end_index  = " << mdtContext.end_index()
@@ -660,24 +628,24 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
 
     IdentifierHash channelHash = newDigit->identifyHash();
 
-    ATH_MSG_VERBOSE("got digit with id ext / hash "<<m_idHelper->toString(channelId)<<" / "<<(int)channelHash);
+    ATH_MSG_VERBOSE("got digit with id ext / hash "<<m_idHelperSvc->toString(channelId)<<" / "<<(int)channelHash);
 
     double radius(0.); double errRadius(0.);
     Muon::MdtDriftCircleStatus digitStatus = Muon::MdtStatusDriftTime;
 
     // do lookup once
     const MdtReadoutElement * descriptor = m_muonMgr->getMdtReadoutElement(channelId);
-    if (descriptor == NULL){
+    if (!descriptor){
       ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
-                      <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(channelId)<<">  =>>ignore this hit");
       delete newDigit;
       itD++;
       continue;
     }
     if (!descriptor->containsId(channelId)) {
-      ATH_MSG_WARNING("Detector Element "<<m_idHelper->toString(descriptor->identify())
+      ATH_MSG_WARNING("Detector Element "<<m_idHelperSvc->toString(descriptor->identify())
                       <<" does not contains candidate prd Identifier <"
-                      <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(channelId)<<">  =>>ignore this hit");
       delete newDigit;
       itD++;
       continue;
@@ -690,7 +658,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
       digitStatus = getMdtDriftRadius(newDigit, radius, errRadius, descriptor);
       if( radius < -999 ) {
         ATH_MSG_WARNING("MDT PrepData with very large, negative radius "
-                        << " Id is: "<<m_idHelper->toString(channelId));
+                        << " Id is: "<<m_idHelperSvc->toString(channelId));
           
       }
     }
@@ -714,7 +682,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
       hashId = secondMdtHashId;
     }
 
-    // We can make the MdtPrepData, but only if our collection is being used (ie not null)
+    // We can make the MdtPrepData, but only if our collection is being used (ie not nullptr)
     if(collectionToBeUpdated){
       MdtPrepData* newPrepData = new MdtPrepData(channelId,
                                                  hashId,
@@ -743,11 +711,11 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsm(const MdtCsm *rdoColl, std
         itD_e = rdoColl2->end();
         mc = 0; // for logging
         // Update element information for next RDO
-        elementId = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl2->identify());
+        elementId = m_idHelperSvc->mdtIdHelper().parentID(rdoColl2->identify());
         subdetId = rdoColl2->SubDetId();
         mrodId   = rdoColl2->MrodId();
         csmId    = rdoColl2->CsmId();
-        ATH_MSG_VERBOSE("Identifier = "<<m_idHelper->toString(elementId)
+        ATH_MSG_VERBOSE("Identifier = "<<m_idHelperSvc->toString(elementId)
           <<" subdetId/ mrodId/ csmId = "<<subdetId<<" / "<<mrodId<<" / "<<csmId);
       }
     }
@@ -814,22 +782,21 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
   ATH_MSG_DEBUG(" Number of AmtHit in this Csm "
                 << rdoColl->size());
   /// MDT hit context
-  //IdContext hitContext = m_muonIdHelperTool->mdtIdHelper().channel_context();
-  Identifier elementId = m_muonIdHelperTool->mdtIdHelper().parentID(rdoColl->identify());
+  Identifier elementId = m_idHelperSvc->mdtIdHelper().parentID(rdoColl->identify());
     
   uint16_t subdetId = rdoColl->SubDetId();
   uint16_t mrodId = rdoColl->MrodId();
   uint16_t csmId = rdoColl->CsmId();
-  ATH_MSG_VERBOSE("Identifier = "<<m_idHelper->toString(elementId)
+  ATH_MSG_VERBOSE("Identifier = "<<m_idHelperSvc->toString(elementId)
                   <<" subdetId/ mrodId/ csmId = "<<subdetId<<" / "
                   <<mrodId<<" / "<<csmId);
     
 
     
   // Create prepdata collection
-  IdContext mdtContext = m_muonIdHelperTool->mdtIdHelper().module_context();
+  IdContext mdtContext = m_idHelperSvc->mdtIdHelper().module_context();
   IdentifierHash mdtHashId;
-  if(m_muonIdHelperTool->mdtIdHelper().get_hash(elementId, mdtHashId, &mdtContext)) {
+  if(m_idHelperSvc->mdtIdHelper().get_hash(elementId, mdtHashId, &mdtContext)) {
     ATH_MSG_FATAL("Unable to get MDT hash id from MDT digit collection "
                   << "context begin_index = " << mdtContext.begin_index()
                   << " context end_index  = " << mdtContext.end_index()
@@ -874,11 +841,11 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
     Identifier channelId = newDigit->identify();
     //IdentifierHash channelHash = newDigit->identifyHash();
 
-    if( m_muonIdHelperTool->mdtIdHelper().stationName(channelId) == m_BMGid && m_BMGpresent) {
+    if( m_idHelperSvc->mdtIdHelper().stationName(channelId) == m_BMGid && m_BMGpresent) {
       std::map<Identifier, std::vector<Identifier> >::iterator myIt = m_DeadChannels.find(m_muonMgr->getMdtReadoutElement(channelId)->identify());
       if( myIt != m_DeadChannels.end() ){
         if( std::find( (myIt->second).begin(), (myIt->second).end(), channelId) != (myIt->second).end() ) {
-          ATH_MSG_DEBUG("processCsm : Deleting BMG digit with identifier" << m_muonIdHelperTool->mdtIdHelper().show_to_string(channelId) );
+          ATH_MSG_DEBUG("processCsm : Deleting BMG digit with identifier" << m_idHelperSvc->mdtIdHelper().show_to_string(channelId) );
           delete newDigit;
           continue;
         }
@@ -886,9 +853,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
     }
 
     // get tube params
-    int tube = m_muonIdHelperTool->mdtIdHelper().tube(channelId);
-    int layer = m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId);
-    int multilayer = m_muonIdHelperTool->mdtIdHelper().multilayer(channelId);
+    int tube = m_idHelperSvc->mdtIdHelper().tube(channelId);
+    int layer = m_idHelperSvc->mdtIdHelper().tubeLayer(channelId);
+    int multilayer = m_idHelperSvc->mdtIdHelper().multilayer(channelId);
       
     // find the correct twin-pair (tube-1 & tube-3 are twin pair 1, tube-2 & tube-4 are twin pair 2)
     int twinPair = -1;
@@ -918,10 +885,10 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
           mdtDigitColl[ m_secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second = newDigit;
         }
         else{ ATH_MSG_VERBOSE(" TWIN TUBES: found a tertiary hit in a twin tube in one RdoCollection for "
-                              << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(channelId))
-                              << " eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(channelId) << " phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(channelId)
-                              << "  ml =  "  <<m_muonIdHelperTool->mdtIdHelper().multilayer(channelId)  << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId) 
-                              << " tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(channelId) << " with adc  = " << newDigit->adc() << "  tdc = " << newDigit->tdc());
+                              << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(channelId))
+                              << " eta = " << m_idHelperSvc->mdtIdHelper().stationEta(channelId) << " phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(channelId)
+                              << "  ml =  "  <<m_idHelperSvc->mdtIdHelper().multilayer(channelId)  << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(channelId) 
+                              << " tube = " <<  m_idHelperSvc->mdtIdHelper().tube(channelId) << " with adc  = " << newDigit->adc() << "  tdc = " << newDigit->tdc());
         }
       } //end --   if(!m_discardSecondaryHitTwin){
       else{
@@ -940,8 +907,8 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
     MdtDigit* digit = iter_map->second.first;
     MdtDigit* second_digit = iter_map->second.second;
 
-    if (digit==NULL) {
-      ATH_MSG_FATAL("A null pointer to a digit ");
+    if (!digit) {
+      ATH_MSG_FATAL("nullptr to a digit ");
       return StatusCode::FAILURE;
     }
       
@@ -949,17 +916,17 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
     Identifier     channelId   = digit->identify();
     IdentifierHash channelHash = digit->identifyHash();
 
-    int multilayer = m_muonIdHelperTool->mdtIdHelper().multilayer(channelId);
+    int multilayer = m_idHelperSvc->mdtIdHelper().multilayer(channelId);
   
     //check if the hit is in multilayer=1	    
     // two chambers in ATLAS are installed with Twin Tubes; in detector coordinates BOL4A13 & BOL4C13; only INNER multilayer(=1) is with twin tubes
     if(multilayer==1){
       // if no twin hit present in data, use standard PRD making 
-      if(second_digit == NULL){
+      if(!second_digit){
 	  
 	  
         ATH_MSG_VERBOSE("got digit with id ext / hash "
-                        <<m_idHelper->toString(channelId)<<" / "
+                        <<m_idHelperSvc->toString(channelId)<<" / "
                         <<(int)channelHash);
 	  
         double radius(0.); double errRadius(0.);
@@ -967,9 +934,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
 	  
         // do lookup once
         const MdtReadoutElement * descriptor = m_muonMgr->getMdtReadoutElement(channelId);
-        if (descriptor == NULL){
+        if (!descriptor){
           ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
-                          <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
+                          <<m_idHelperSvc->toString(channelId)<<">  =>>ignore this hit");
           delete digit;
           continue;
         }
@@ -980,7 +947,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
           digitStatus = getMdtDriftRadius(digit, radius, errRadius, descriptor);
           if( radius < -999 ) {
             ATH_MSG_WARNING("MDT PrepData with very large, negative radius "
-                            << " Id is: "<<m_idHelper->toString(channelId));
+                            << " Id is: "<<m_idHelperSvc->toString(channelId));
           }
         }
 	  
@@ -1001,16 +968,16 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
         newPrepData->setHashAndIndex(driftCircleColl->identifyHash(), driftCircleColl->size());
         driftCircleColl->push_back(newPrepData);
 	  
-        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA " << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(channelId)) 
-                      << "  eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(channelId)
-                      << "  phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(channelId)
-                      << "  ml = " << m_muonIdHelperTool->mdtIdHelper().multilayer(channelId)
-                      << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId) 
-                      << "  tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(channelId) 
+        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA " << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(channelId)) 
+                      << "  eta = " << m_idHelperSvc->mdtIdHelper().stationEta(channelId)
+                      << "  phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(channelId)
+                      << "  ml = " << m_idHelperSvc->mdtIdHelper().multilayer(channelId)
+                      << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(channelId) 
+                      << "  tube = " <<  m_idHelperSvc->mdtIdHelper().tube(channelId) 
                       << "  radius = " << radius << " +- " << errRadius);
 	  
         delete digit;
-      }// end if(second_digit == NULL){
+      }// end if(!second_digit){
       else{
 	  
         // define twin position and error
@@ -1021,8 +988,8 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
         // call the function to calculate radii and twin coordinate
         digitStatus = getMdtTwinPosition(digit, second_digit, radius, errRadius, zTwin, errZTwin, secondHitIsPrompt);
         if( zTwin <-99999 ) {   ATH_MSG_WARNING("MDT Twin PrepData with very large, negative twin coordinate " << zTwin
-                                                << " Id is: "<<m_idHelper->toString(digit->identify())
-                                                << " Twin Id is: "<<m_idHelper->toString(second_digit->identify())); }
+                                                << " Id is: "<<m_idHelperSvc->toString(digit->identify())
+                                                << " Twin Id is: "<<m_idHelperSvc->toString(second_digit->identify())); }
 	  
         // set the properties of PrepData-object to the tube that was PROMPT (= hit by the muon)
         Identifier promptHit_channelId = digit->identify();
@@ -1043,9 +1010,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
 	  
         // do lookup once
         const MdtReadoutElement * descriptor = m_muonMgr->getMdtReadoutElement(promptHit_channelId);
-        if (descriptor == NULL){
+        if (!descriptor){
           ATH_MSG_WARNING("Detector Element not found for Identifier from the DetManager <"
-                          <<m_idHelper->toString(promptHit_channelId)<<">  =>>ignore this hit");
+                          <<m_idHelperSvc->toString(promptHit_channelId)<<">  =>>ignore this hit");
           delete digit;
           continue;
         }
@@ -1055,7 +1022,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
           digitStatus = Muon::MdtStatusMasked;
         }else if( radius < -999 ) {
           ATH_MSG_WARNING("MDT Twin PrepData with very large, negative radius "
-                          << " Id is: "<<m_idHelper->toString(promptHit_channelId));
+                          << " Id is: "<<m_idHelperSvc->toString(promptHit_channelId));
         }
 	  
           
@@ -1082,11 +1049,11 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
                                                                   twinHit_Digit->adc(),
                                                                   digitStatus);
 	    
-          ATH_MSG_DEBUG(" MADE A 2D TWINPREPDATA " << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(promptHit_channelId))
-                        << "  eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(promptHit_channelId)
-                        << "  phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(promptHit_channelId)
-                        << "  ml = " << m_muonIdHelperTool->mdtIdHelper().multilayer(promptHit_channelId)
-                        << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(promptHit_channelId) << " tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(promptHit_channelId) 
+          ATH_MSG_DEBUG(" MADE A 2D TWINPREPDATA " << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(promptHit_channelId))
+                        << "  eta = " << m_idHelperSvc->mdtIdHelper().stationEta(promptHit_channelId)
+                        << "  phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(promptHit_channelId)
+                        << "  ml = " << m_idHelperSvc->mdtIdHelper().multilayer(promptHit_channelId)
+                        << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(promptHit_channelId) << " tube = " <<  m_idHelperSvc->mdtIdHelper().tube(promptHit_channelId) 
                         << "  zTwin = " << zTwin << " +- " << errZTwin 
                         << "  radius = " << radius << " +- " << errRadius);
 	    
@@ -1122,11 +1089,11 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
 	    
           ATH_MSG_DEBUG(" MADE A 1D(=original) PREPDATA OUT OF TWINPAIR "
                         << "   TWIN COORDINATE IS NOT STORED IN PREPDATA "
-                        << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(promptHit_channelId))
-                        << "  eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(promptHit_channelId)
-                        << "  phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(promptHit_channelId)
-                        << "  ml = " << m_muonIdHelperTool->mdtIdHelper().multilayer(promptHit_channelId)
-                        << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(promptHit_channelId) << " tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(promptHit_channelId) 
+                        << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(promptHit_channelId))
+                        << "  eta = " << m_idHelperSvc->mdtIdHelper().stationEta(promptHit_channelId)
+                        << "  phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(promptHit_channelId)
+                        << "  ml = " << m_idHelperSvc->mdtIdHelper().multilayer(promptHit_channelId)
+                        << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(promptHit_channelId) << " tube = " <<  m_idHelperSvc->mdtIdHelper().tube(promptHit_channelId) 
                         << "  zTwin = " << zTwin << " +- " << errZTwin 
                         << "  radius = " << radius << " +- " << errRadius);
 	    
@@ -1138,15 +1105,15 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
         delete digit;
         delete second_digit;
 	  
-      }// end else --  if(second_digit == NULL){
+      }// end else --  if(!second_digit){
     } // end -- if(multilayer==1)
     else if(multilayer==2){
       // if multilayer=2, then treat every hit as a separate hit, no twin hit should be present here as the hardware is not installed
         
-      if(second_digit == NULL){
+      if(!second_digit){
 
         ATH_MSG_VERBOSE("got digit with id ext / hash "
-                        <<m_idHelper->toString(channelId)<<" / "
+                        <<m_idHelperSvc->toString(channelId)<<" / "
                         <<(int)channelHash);
 	  
         double radius(0.); double errRadius(0.);
@@ -1154,9 +1121,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
 	  
         // do lookup once
         const MdtReadoutElement * descriptor = m_muonMgr->getMdtReadoutElement(channelId);
-        if (descriptor == NULL){
+        if (!descriptor){
           ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
-                          <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
+                          <<m_idHelperSvc->toString(channelId)<<">  =>>ignore this hit");
           delete digit;
           continue;
         }
@@ -1167,7 +1134,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
           digitStatus = getMdtDriftRadius(digit, radius, errRadius, descriptor);
           if( radius < -999 ) {
             ATH_MSG_WARNING("MDT PrepData with very large, negative radius "
-                            << " Id is: "<<m_idHelper->toString(channelId));
+                            << " Id is: "<<m_idHelperSvc->toString(channelId));
           }
         }
 	  
@@ -1189,17 +1156,17 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
         newPrepData->setHashAndIndex(driftCircleColl->identifyHash(), driftCircleColl->size());
         driftCircleColl->push_back(newPrepData);
 	  
-        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA " << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(channelId)) 
-                      << "  eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(channelId)
-                      << "  phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(channelId)
-                      << "  ml = " << m_muonIdHelperTool->mdtIdHelper().multilayer(channelId)
-                      << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId) 
-                      << "  tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(channelId) 
+        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA " << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(channelId)) 
+                      << "  eta = " << m_idHelperSvc->mdtIdHelper().stationEta(channelId)
+                      << "  phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(channelId)
+                      << "  ml = " << m_idHelperSvc->mdtIdHelper().multilayer(channelId)
+                      << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(channelId) 
+                      << "  tube = " <<  m_idHelperSvc->mdtIdHelper().tube(channelId) 
                       << "  radius = " << radius << " +- " << errRadius);
 	  
         delete digit;
         delete second_digit;
-      } //end  --  if(second_digit == NULL){
+      } //end  --  if(!second_digit){
       else{
 	  
         // Do something with second_digit
@@ -1207,12 +1174,12 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
         IdentifierHash second_channelHash = second_digit->identifyHash();
 	  
         ATH_MSG_VERBOSE("got digit with id ext / hash "
-                        <<m_idHelper->toString(channelId)<<" / "
+                        <<m_idHelperSvc->toString(channelId)<<" / "
                         <<(int)channelHash);
 	  
         //second_digit
         ATH_MSG_VERBOSE("got second_digit with id ext / hash "
-                        <<m_idHelper->toString(second_channelId)<<" / "
+                        <<m_idHelperSvc->toString(second_channelId)<<" / "
                         <<(int)second_channelHash);
 	  
 	  
@@ -1226,9 +1193,9 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
 	  
         // do lookup once
         const MdtReadoutElement * descriptor = m_muonMgr->getMdtReadoutElement(channelId);
-        if (descriptor == NULL){
+        if (!descriptor){
           ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
-                          <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
+                          <<m_idHelperSvc->toString(channelId)<<">  =>>ignore this hit");
           delete digit;
           continue;
         }
@@ -1239,14 +1206,14 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
           digitStatus = getMdtDriftRadius(digit, radius, errRadius, descriptor);
           if( radius < -999 ) {
             ATH_MSG_WARNING("MDT PrepData with very large, negative radius "
-                            << " Id is: "<<m_idHelper->toString(channelId));
+                            << " Id is: "<<m_idHelperSvc->toString(channelId));
           }
         }
 
         const MdtReadoutElement * second_descriptor = m_muonMgr->getMdtReadoutElement(second_channelId);
-        if (second_descriptor == NULL){
+        if (!second_descriptor){
           ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
-                          <<m_idHelper->toString(second_channelId)<<">  =>>ignore this hit");
+                          <<m_idHelperSvc->toString(second_channelId)<<">  =>>ignore this hit");
           delete second_digit;
           continue;
         }
@@ -1258,7 +1225,7 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
           second_digitStatus = getMdtDriftRadius(second_digit, second_radius, second_errRadius, second_descriptor);
           if( second_radius < -999 ) {
             ATH_MSG_WARNING("MDT PrepData with very large, negative radius "
-                            << " Id is: "<<m_idHelper->toString(second_channelId));
+                            << " Id is: "<<m_idHelperSvc->toString(second_channelId));
           }
         }
 	  
@@ -1299,26 +1266,26 @@ StatusCode Muon::MdtRdoToPrepDataToolCore::processCsmTwin(const MdtCsm *rdoColl,
         second_newPrepData->setHashAndIndex(driftCircleColl->identifyHash(), driftCircleColl->size());
         driftCircleColl->push_back(second_newPrepData);
 	  
-        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA " << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(channelId)) 
-                      << "  eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(channelId)
-                      << "  phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(channelId)
-                      << "  ml = " << m_muonIdHelperTool->mdtIdHelper().multilayer(channelId)
-                      << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId) 
-                      << "  tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(channelId) 
+        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA " << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(channelId)) 
+                      << "  eta = " << m_idHelperSvc->mdtIdHelper().stationEta(channelId)
+                      << "  phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(channelId)
+                      << "  ml = " << m_idHelperSvc->mdtIdHelper().multilayer(channelId)
+                      << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(channelId) 
+                      << "  tube = " <<  m_idHelperSvc->mdtIdHelper().tube(channelId) 
                       << "  radius = " << radius << " +- " << errRadius);
 	  
         //second_digit
-        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA FOR SECOND DIGIT " << m_muonIdHelperTool->mdtIdHelper().stationNameString(m_muonIdHelperTool->mdtIdHelper().stationName(second_channelId))
-                      << "  eta = " << m_muonIdHelperTool->mdtIdHelper().stationEta(second_channelId)
-                      << "  phi = " << m_muonIdHelperTool->mdtIdHelper().stationPhi(second_channelId)
-                      << "  ml = " << m_muonIdHelperTool->mdtIdHelper().multilayer(second_channelId)
-                      << "  layer = " << m_muonIdHelperTool->mdtIdHelper().tubeLayer(second_channelId) 
-                      << "  tube = " <<  m_muonIdHelperTool->mdtIdHelper().tube(second_channelId) 
+        ATH_MSG_DEBUG(" MADE ORIGINAL PREPDATA FOR SECOND DIGIT " << m_idHelperSvc->mdtIdHelper().stationNameString(m_idHelperSvc->mdtIdHelper().stationName(second_channelId))
+                      << "  eta = " << m_idHelperSvc->mdtIdHelper().stationEta(second_channelId)
+                      << "  phi = " << m_idHelperSvc->mdtIdHelper().stationPhi(second_channelId)
+                      << "  ml = " << m_idHelperSvc->mdtIdHelper().multilayer(second_channelId)
+                      << "  layer = " << m_idHelperSvc->mdtIdHelper().tubeLayer(second_channelId) 
+                      << "  tube = " <<  m_idHelperSvc->mdtIdHelper().tube(second_channelId) 
                       << "  radius = " << second_radius << " +- " << second_errRadius);
 	  
         delete digit;
         delete second_digit;
-      } //end  --  else -- if(second_digit == NULL){
+      } //end  --  else -- if(!second_digit){
     }
     else{
       ATH_MSG_DEBUG("Something strange in MdtRdoToPrepDataToolCore, MDT multilayer (must be 1 or 2)= " << multilayer);
@@ -1352,8 +1319,8 @@ MdtDriftCircleStatus MdtRdoToPrepDataToolCore::getMdtDriftRadius(const MdtDigit
     if (!descriptor->containsId(channelId)) {
       radius = -1000.;
       ATH_MSG_WARNING("Identifier from the cabling service <"
-                      <<m_idHelper->toString(channelId)<<"> inconsistent with the geometry of detector element <"
-                      <<m_idHelper->toString(descriptor->identify())<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(channelId)<<"> inconsistent with the geometry of detector element <"
+                      <<m_idHelperSvc->toString(descriptor->identify())<<">  =>>ignore this hit");
       return MdtStatusUnDefined;
     }
 
@@ -1417,17 +1384,17 @@ MdtDriftCircleStatus MdtRdoToPrepDataToolCore::getMdtTwinPosition(const MdtDigit
 
     // here check validity
     // if invalid, reset flags
-    if (descriptor == NULL){
+    if (!descriptor){
       ATH_MSG_WARNING("getMdtTwinPosition(): Detector Element not found for Identifier from the cabling service <"
-                      <<m_idHelper->toString(channelId)<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(channelId)<<">  =>>ignore this hit");
       zTwin = -100000.;
       return MdtStatusUnDefined;
     }
     else if (!descriptor->containsId(channelId)){
       zTwin = -100000.;
       ATH_MSG_WARNING("getMdtTwinPosition(): Identifier from the cabling service <"
-                      <<m_idHelper->toString(channelId)<<"> inconsistent with the geometry of detector element <"
-                      <<m_idHelper->toString(descriptor->identify())<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(channelId)<<"> inconsistent with the geometry of detector element <"
+                      <<m_idHelperSvc->toString(descriptor->identify())<<">  =>>ignore this hit");
       return MdtStatusUnDefined;
     }
     
@@ -1450,17 +1417,17 @@ MdtDriftCircleStatus MdtRdoToPrepDataToolCore::getMdtTwinPosition(const MdtDigit
     
     // here check validity
     // if invalid, reset flags
-    if (second_descriptor == NULL){
+    if (!second_descriptor){
       ATH_MSG_WARNING("getMdtTwinPosition(): Detector Element not found for Identifier from the cabling service <"
-                      <<m_idHelper->toString(second_channelId)<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(second_channelId)<<">  =>>ignore this hit");
       zTwin = -100000.;
       return MdtStatusUnDefined;
     }
     else if (!second_descriptor->containsId(second_channelId)){
       zTwin = -100000.;
       ATH_MSG_WARNING("getMdtTwinPosition(): Identifier from the cabling service <"
-                      <<m_idHelper->toString(second_channelId)<<"> inconsistent with the geometry of detector element <"
-                      <<m_idHelper->toString(second_descriptor->identify())<<">  =>>ignore this hit");
+                      <<m_idHelperSvc->toString(second_channelId)<<"> inconsistent with the geometry of detector element <"
+                      <<m_idHelperSvc->toString(second_descriptor->identify())<<">  =>>ignore this hit");
       return MdtStatusUnDefined;
     }
     
@@ -1505,7 +1472,7 @@ MdtDriftCircleStatus MdtRdoToPrepDataToolCore::getMdtTwinPosition(const MdtDigit
     radius = 0.;
     errRadius = m_muonMgr->getMdtReadoutElement(channelId)->innerTubeRadius()/sqrt(12); // 14.6/sqrt(12)
     zTwin = 0.;
-    double tubelength = m_muonMgr->getMdtReadoutElement(channelId)->getTubeLength(m_muonIdHelperTool->mdtIdHelper().tubeLayer(channelId),m_muonIdHelperTool->mdtIdHelper().tube(channelId));
+    double tubelength = m_muonMgr->getMdtReadoutElement(channelId)->getTubeLength(m_idHelperSvc->mdtIdHelper().tubeLayer(channelId),m_idHelperSvc->mdtIdHelper().tube(channelId));
     errZTwin = tubelength/2.;
   }
   
@@ -1523,10 +1490,10 @@ void MdtRdoToPrepDataToolCore::initDeadChannels(const MuonGM::MdtReadoutElement*
 
   Identifier detElId = mydetEl->identify();
 
-  int name = m_muonIdHelperTool->mdtIdHelper().stationName(detElId);
-  int eta = m_muonIdHelperTool->mdtIdHelper().stationEta(detElId);
-  int phi = m_muonIdHelperTool->mdtIdHelper().stationPhi(detElId);
-  int ml = m_muonIdHelperTool->mdtIdHelper().multilayer(detElId);
+  int name = m_idHelperSvc->mdtIdHelper().stationName(detElId);
+  int eta = m_idHelperSvc->mdtIdHelper().stationEta(detElId);
+  int phi = m_idHelperSvc->mdtIdHelper().stationPhi(detElId);
+  int ml = m_idHelperSvc->mdtIdHelper().multilayer(detElId);
   std::vector<Identifier> deadTubes;
 
   std::vector<int>::iterator it = tubes.begin();
@@ -1542,7 +1509,7 @@ void MdtRdoToPrepDataToolCore::initDeadChannels(const MuonGM::MdtReadoutElement*
           ++it;
         }
         else {
-          Identifier deadTubeId = m_muonIdHelperTool->mdtIdHelper().channelID( name, eta, phi, ml, layer, tube );
+          Identifier deadTubeId = m_idHelperSvc->mdtIdHelper().channelID( name, eta, phi, ml, layer, tube );
           deadTubes.push_back( deadTubeId );
           ATH_MSG_VERBOSE("adding dead tube (" << tube  << "), layer(" <<  layer
                           << "), phi(" << phi << "), eta(" << eta << "), name(" << name
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h
index 444b22d278f1a8cd2310c0ff9142a622b09e322a..5500a4f339661dfbafe18ba66e7936fb49082767 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolCore.h
@@ -1,38 +1,29 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MdtRdoToPrepDataToolCore.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONMdtRdoToPrepDataToolCore_H
 #define MUONMdtRdoToPrepDataToolCore_H
 
+#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-
-#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
 
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 #include "MuonRDO/MdtCsmContainer.h"
-
 #include "MuonCablingData/MuonMDT_CablingMap.h"
 #include "StoreGate/ReadCondHandleKey.h"
-
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
+#include "MuonMDT_CnvTools/IMDT_RDO_Decoder.h"
+#include "MdtCalibSvc/MdtCalibrationTool.h"
 
 #include <string>
-class AtlasDetectorID;
-class Identifier;
+
 class MdtDigit;
-class MdtCalibrationTool;
 class MdtCalibrationSvcSettings;
 class MdtCalibHit;
-//class MdtRDO_Decoder;
-class MdtCsm;
-
 
 namespace MuonGM
 {    
@@ -40,14 +31,8 @@ namespace MuonGM
   class MdtReadoutElement;
 }
 
-
 namespace Muon 
 {
-
-  class IMuonRawDataProviderTool;
-  class IMDT_RDO_Decoder;
-  class MuonIdHelperTool;
-
   /** @class MdtRdoToPrepDataToolCore 
 
       This is for the Doxygen-Documentation.  
@@ -65,7 +50,7 @@ namespace Muon
     MdtRdoToPrepDataToolCore(const std::string&,const std::string&,const IInterface*);
 
     /** default destructor */
-    virtual ~MdtRdoToPrepDataToolCore ();
+    virtual ~MdtRdoToPrepDataToolCore()=default;
       
     /** standard Athena-Algorithm method */
     virtual StatusCode initialize() override;
@@ -115,11 +100,9 @@ namespace Muon
     bool handlePRDHash( IdentifierHash hash, const MdtCsmContainer& rdoContainer, std::vector<IdentifierHash>& idWithDataVect );
   
     /// Muon Detector Descriptor
-    const MuonGM::MuonDetectorManager * m_muonMgr;
+    const MuonGM::MuonDetectorManager* m_muonMgr;
         
-    /// Tool for MDT identifier helper
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
         
     /// MDT calibration service
     ToolHandle<MdtCalibrationTool> m_calibrationTool;
@@ -139,9 +122,7 @@ namespace Muon
     bool m_decodeData; //!< toggle on/off the decoding of MDT RDO into MdtPrepData
     bool m_sortPrepData; //!< Toggle on/off the sorting of the MdtPrepData
 
-
     ToolHandle<Muon::IMDT_RDO_Decoder> m_mdtDecoder;
-    ToolHandle<Muon::MuonIdHelperTool> m_idHelper;
     
     //keepTrackOfFullEventDecoding
     bool m_fullEventDone;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx
index 940390f0f237fd8ab186802890fc1bfb410b4a45..40bea9a8208d8b0739832371e5524a8ab4ef5bcc 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.cxx
@@ -1,14 +1,9 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MdtRdoToPrepDataToolMT.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #include "MdtRdoToPrepDataToolMT.h"
 
-
 Muon::MdtRdoToPrepDataToolMT::MdtRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p)
   :
   AthAlgTool(t,n,p),
@@ -17,10 +12,6 @@ Muon::MdtRdoToPrepDataToolMT::MdtRdoToPrepDataToolMT(const std::string& t, const
   declareProperty("MdtPrdContainerCacheKey", m_prdContainerCacheKey, "Optional external cache for the MDT PRD container");
 }
 
-Muon::MdtRdoToPrepDataToolMT::~MdtRdoToPrepDataToolMT()
-{
-}
-
 StatusCode Muon::MdtRdoToPrepDataToolMT::initialize()
 {    
     ATH_MSG_VERBOSE("Starting init");
@@ -30,11 +21,6 @@ StatusCode Muon::MdtRdoToPrepDataToolMT::initialize()
     return StatusCode::SUCCESS;
 }
 
-StatusCode Muon::MdtRdoToPrepDataToolMT::finalize()
-{
-  return MdtRdoToPrepDataToolCore::finalize();
-}
-
 Muon::MdtRdoToPrepDataToolMT::SetupMdtPrepDataContainerStatus Muon::MdtRdoToPrepDataToolMT::setupMdtPrepDataContainer()
 {
   m_fullEventDone=false;
@@ -45,7 +31,7 @@ Muon::MdtRdoToPrepDataToolMT::SetupMdtPrepDataContainerStatus Muon::MdtRdoToPrep
   const bool externalCachePRD = !m_prdContainerCacheKey.key().empty();
   if (!externalCachePRD) {
     // without the cache we just record the container
-    StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(m_muonIdHelperTool->mdtIdHelper().module_hash_max()));
+    StatusCode status = handle.record(std::make_unique<Muon::MdtPrepDataContainer>(m_idHelperSvc->mdtIdHelper().module_hash_max()));
     if (status.isFailure() || !handle.isValid() )   {
       ATH_MSG_FATAL("Could not record container of MDT PrepData Container at " << m_mdtPrepDataContainerKey.key()); 
       return FAILED;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h
index 645d933bad0097c9019edd183c004f65ba5b38e2..df87cbabb7043b602e957336a43408a75eca6983 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataToolMT.h
@@ -1,11 +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
 */
 
-///////////////////////////////////////////////////////////////////
-// MdtRdoToPrepDataToolMT.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONMdtRdoToPrepDataToolMT_H
 #define MUONMdtRdoToPrepDataToolMT_H
 
@@ -32,13 +28,10 @@ namespace Muon
     MdtRdoToPrepDataToolMT(const std::string&,const std::string&,const IInterface*);
 
     /** default destructor */
-    virtual ~MdtRdoToPrepDataToolMT ();
+    virtual ~MdtRdoToPrepDataToolMT()=default;
 
     /** standard Athena-Algorithm method */
     virtual StatusCode initialize() override;
-    
-    /** standard Athena-Algorithm method */
-    virtual StatusCode finalize() override;
       
   protected:
     virtual SetupMdtPrepDataContainerStatus setupMdtPrepDataContainer() override;
diff --git a/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonIdCutTool.h b/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonIdCutTool.h
index 7e361ec459b371ef32d2de7027336be6a29557df..68807b2844ba1d49acb656c95a3b16a502ea9fb1 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonIdCutTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonIdCutTool.h
@@ -1,26 +1,24 @@
 /*
-  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 TESTTOOL_H
 #define TESTTOOL_H
 
 #include "MuonPrdSelector/IMuonIdCutTool.h"
-
-
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
-#include "Identifier/Identifier.h"
-#include <vector>
-#include <set>
 #include "MuonCalibTools/IdToFixedIdTool.h"
 #include "MuonCalibIdentifier/MuonFixedId.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
-class MsgStream;
-class MuonStationIntersectSvc;
+#include <string>
+#include <vector>
+#include <set>
 
+class MuonStationIntersectSvc;
 
   /** 
       Implementation of an IMuonIdCutTool. 
@@ -35,13 +33,10 @@ class MuonIdCutTool :  virtual public IMuonIdCutTool, public AthAlgTool   {
     MuonIdCutTool(const std::string&, const std::string&, const IInterface*);
     
     /** destructor */
-    virtual ~MuonIdCutTool();
+    virtual ~MuonIdCutTool()=default;
     
     /** initialize method, method taken from bass-class AlgTool */
     StatusCode initialize();
-
-    /** finialize method, method taken from bass-class AlgTool */
-    StatusCode finalize();
     
     virtual bool isCut(Identifier ID) const;
     virtual bool isCut(MuonCalib::MuonFixedId id) const;
@@ -89,8 +84,7 @@ class MuonIdCutTool :  virtual public IMuonIdCutTool, public AthAlgTool   {
 
     ToolHandle<MuonCalib::IIdToFixedIdTool>        m_idToFixedIdTool;     //<! tool to assist with Identifiers
 
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
     std::vector<int> m_EELeta;
     std::vector<int> m_EELsector;
diff --git a/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonPrdSelectorAlg.h b/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonPrdSelectorAlg.h
index ad897947614a3a1a851e84ddd801432a16a1f632..10324d1a59865d2e3b3c34a5affc94db6c0e0445 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonPrdSelectorAlg.h
+++ b/MuonSpectrometer/MuonCnv/MuonPrdSelector/MuonPrdSelector/MuonPrdSelectorAlg.h
@@ -1,34 +1,26 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MuonPrdSelectorAlg.h
-//   Header file for class MuonPrdSelectorAlg
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONPRDSELECTORALG_H
 #define MUONPRDSELECTORALG_H
 
-// Base class
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "StoreGate/DataHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
-//#include "MuonPrepRawData/MuonPrepDataContainer.h"
+
 #include "MuonPrepRawData/MdtPrepDataContainer.h"
 #include "MuonPrepRawData/RpcPrepDataContainer.h"
 #include "MuonPrepRawData/TgcPrepDataContainer.h"
 #include "MuonPrepRawData/CscPrepDataContainer.h"
 #include "MuonPrepRawData/CscStripPrepDataContainer.h"
 #include "MuonPrdSelector/MuonIdCutTool.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
 #include <utility>
 #include <vector>
 #include <string>
 
-
-
-
 /*
    class MuonPrdSelectorAlg
    class to cut out hits from Muon PRDCollections
@@ -46,7 +38,6 @@ class MuonPrdSelectorAlg : public AthAlgorithm  {
   // Basic algorithm methods:
   virtual StatusCode initialize();   //!< Algorithm initialization: retrieves StoreGate/DetectorStore/MuonIdHelpers/MuonPrepDataContainers
   virtual StatusCode execute();      //!< Retrieves and records containers, performs selection
-  virtual StatusCode finalize();     //!< Does nothing
 
  private:
   void print();                      //!< method for DEBUG purposes: prints the content of input and output MuonPrepDataContainer
@@ -61,8 +52,7 @@ class MuonPrdSelectorAlg : public AthAlgorithm  {
   StatusCode selectTGCs() ; //!< selects the hits from TGCcollections
   StatusCode selectCSCs() ; //!< selects the hits from CSCcollections
 
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   ToolHandle<IMuonIdCutTool>             m_muonIdCutTool;  //defines the cuts
 
diff --git a/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx
index 910b3b6b9bb6e1e59465b038b7cca7a5b42e284d..7ea6d41f79ae93baa7529d37386b5fe8a7fa98e9 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx
@@ -1,12 +1,9 @@
 /*
-  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 "MuonPrdSelector/MuonIdCutTool.h"
-#include "MuonIdHelpers/MdtIdHelper.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
-#include "MuonIdHelpers/CscIdHelper.h"
-#include "MuonIdHelpers/TgcIdHelper.h"
+
 #include "MuonCalibTools/IdToFixedIdTool.h"
 #include "MuonCalibIdentifier/MuonFixedId.h"
 
@@ -64,14 +61,10 @@ MuonIdCutTool::MuonIdCutTool(const std::string& t,const std::string& n,const IIn
   //cut the whole technology
 
 }
-  
-MuonIdCutTool::~MuonIdCutTool() {
-  
-}
 
 StatusCode MuonIdCutTool::initialize() {
   ATH_CHECK( m_idToFixedIdTool.retrieve() );
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
   
   if (!m_cutStationName && !m_cutStationRegion && !m_cutEta && !m_cutPhi && !m_cutEE){
     ATH_MSG_WARNING( "MuonIdCutTool invoked with no cuts performed"   );
@@ -115,15 +108,6 @@ StatusCode MuonIdCutTool::initialize() {
   return StatusCode::SUCCESS;
 }
 
-
-StatusCode MuonIdCutTool::finalize()
-{
-  ATH_MSG_DEBUG( "Finalize Called"  );
-  return StatusCode::SUCCESS;
-}
-
-
-
 bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are passed
   
   //some checks to see if the tool is configured in a state that makes sense 
@@ -149,27 +133,27 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
   enum class IdEnum { MDT, CSC, RPC, TGC } idEnum;
   auto pIdHelper = [&]() -> const MuonIdHelper& {
     switch (idEnum) {
-      case IdEnum::MDT: { return m_muonIdHelperTool->mdtIdHelper(); }
-      case IdEnum::CSC: { return m_muonIdHelperTool->cscIdHelper(); }
-      case IdEnum::RPC: { return m_muonIdHelperTool->rpcIdHelper(); }
-      default:          { return m_muonIdHelperTool->tgcIdHelper(); }
+      case IdEnum::MDT: { return m_idHelperSvc->mdtIdHelper(); }
+      case IdEnum::CSC: { return m_idHelperSvc->cscIdHelper(); }
+      case IdEnum::RPC: { return m_idHelperSvc->rpcIdHelper(); }
+      default:          { return m_idHelperSvc->tgcIdHelper(); }
     }
   };
 
   //determine technology
-  if (m_muonIdHelperTool->mdtIdHelper().is_mdt(ID)){
+  if (m_idHelperSvc->isMdt(ID)){
     idEnum = IdEnum::MDT;
     ATH_MSG_DEBUG( "ID is an MDT"   );
   }
-  else if (m_muonIdHelperTool->cscIdHelper().is_csc(ID)){
+  else if (m_idHelperSvc->isCsc(ID)){
     idEnum = IdEnum::CSC;
     ATH_MSG_DEBUG( "ID is an CSC"   );
   } 
-  else if (m_muonIdHelperTool->rpcIdHelper().is_rpc(ID)){
+  else if (m_idHelperSvc->isRpc(ID)){
     idEnum = IdEnum::RPC;
     ATH_MSG_DEBUG( "ID is an RPC"   );
   } 
-  else if (m_muonIdHelperTool->tgcIdHelper().is_tgc(ID)){
+  else if (m_idHelperSvc->isTgc(ID)){
     idEnum = IdEnum::TGC;
     ATH_MSG_DEBUG( "ID is a TGC"   );
   } 
@@ -202,16 +186,16 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
   //Routine for cutting on Station Region
 
   if (m_cutStationRegion){ 
-    if (m_muonIdHelperTool->mdtIdHelper().is_mdt(ID)){
+    if (m_idHelperSvc->isMdt(ID)){
       cutList = m_mdtRegionList;
     }
-    else if (m_muonIdHelperTool->cscIdHelper().is_csc(ID)){
+    else if (m_idHelperSvc->isCsc(ID)){
       cutList = m_cscRegionList;
     } 
-    else if (m_muonIdHelperTool->rpcIdHelper().is_rpc(ID)){
+    else if (m_idHelperSvc->isRpc(ID)){
       cutList = m_rpcRegionList;
     } 
-    else if (m_muonIdHelperTool->tgcIdHelper().is_tgc(ID)){
+    else if (m_idHelperSvc->isTgc(ID)){
       cutList = m_tgcRegionList;
     } 
     else{
@@ -236,16 +220,16 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
     
   
   if (m_cutStationName){ 
-    if (m_muonIdHelperTool->mdtIdHelper().is_mdt(ID)){
+    if (m_idHelperSvc->isMdt(ID)){
       cutList = m_mdtStationNameList;
     }
-    else if (m_muonIdHelperTool->cscIdHelper().is_csc(ID)){
+    else if (m_idHelperSvc->isCsc(ID)){
       cutList = m_cscStationNameList;
     } 
-    else if (m_muonIdHelperTool->rpcIdHelper().is_rpc(ID)){
+    else if (m_idHelperSvc->isRpc(ID)){
       cutList = m_rpcStationNameList;
     } 
-    else if (m_muonIdHelperTool->tgcIdHelper().is_tgc(ID)){
+    else if (m_idHelperSvc->isTgc(ID)){
       cutList = m_tgcStationNameList;
     } 
     else{
@@ -264,25 +248,25 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
 	
 	else {  //proceed with more specific cuts
 
-	  if (m_muonIdHelperTool->mdtIdHelper().is_mdt(ID)){
-	    ATH_MSG_DEBUG( "MDT multilayer " <<m_muonIdHelperTool->mdtIdHelper().multilayer(ID)
+	  if (m_idHelperSvc->isMdt(ID)){
+	    ATH_MSG_DEBUG( "MDT multilayer " <<m_idHelperSvc->mdtIdHelper().multilayer(ID)
                            <<  " compared with " << m_mdtMultilayerList[i]   );
-	    if(m_mdtMultilayerList[i] == m_muonIdHelperTool->mdtIdHelper().multilayer(ID))
+	    if(m_mdtMultilayerList[i] == m_idHelperSvc->mdtIdHelper().multilayer(ID))
 	      return true;
 	  }
 
 
-	  else if (m_muonIdHelperTool->rpcIdHelper().is_rpc(ID)){
-	    ATH_MSG_DEBUG( "RPC doublet R " <<m_muonIdHelperTool->rpcIdHelper().doubletR(ID)
+	  else if (m_idHelperSvc->isRpc(ID)){
+	    ATH_MSG_DEBUG( "RPC doublet R " <<m_idHelperSvc->rpcIdHelper().doubletR(ID)
                            <<  " compared with " << m_rpcDoubletRList[i]   );
-	    if( m_rpcDoubletRList[i] == m_muonIdHelperTool->rpcIdHelper().doubletR(ID) ){
+	    if( m_rpcDoubletRList[i] == m_idHelperSvc->rpcIdHelper().doubletR(ID) ){
 	      if (m_rpcGasGapList.size() == 0){
 		return true;
 	      }
 	      else {
-		ATH_MSG_DEBUG( "RPC gasgap " <<m_muonIdHelperTool->rpcIdHelper().gasGap(ID)
+		ATH_MSG_DEBUG( "RPC gasgap " <<m_idHelperSvc->rpcIdHelper().gasGap(ID)
                                <<  " compared with " << m_rpcGasGapList[i]   );
-		if (m_rpcGasGapList[i] == m_muonIdHelperTool->rpcIdHelper().gasGap(ID))
+		if (m_rpcGasGapList[i] == m_idHelperSvc->rpcIdHelper().gasGap(ID))
 		  return true;
 	      }
 	          
@@ -290,10 +274,10 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
 	  }
 	  
 	      
-	  else if (m_muonIdHelperTool->tgcIdHelper().is_tgc(ID)){
-	    ATH_MSG_DEBUG( "TGC gasgap " <<m_muonIdHelperTool->tgcIdHelper().gasGap(ID)
+	  else if (m_idHelperSvc->isTgc(ID)){
+	    ATH_MSG_DEBUG( "TGC gasgap " <<m_idHelperSvc->tgcIdHelper().gasGap(ID)
                            <<  " compared with " << m_tgcGasGapList[i]   );
-	    if (m_tgcGasGapList[i] == m_muonIdHelperTool->tgcIdHelper().gasGap(ID))
+	    if (m_tgcGasGapList[i] == m_idHelperSvc->tgcIdHelper().gasGap(ID))
 	      return true;
 	  }
 	      
@@ -326,7 +310,7 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
     ATH_MSG_DEBUG( "Phi Sector is " << sector  );
     
     //Is it tgc?
-    if (m_muonIdHelperTool->tgcIdHelper().is_tgc(ID)){
+    if (m_idHelperSvc->isTgc(ID)){
       //If no cuts specified, don't cut anything
       if (m_tgcEtaList.size()==0 && m_tgcEndPhiList.size()==0 && m_tgcForPhiList.size()==0)
 	return false;
@@ -341,7 +325,7 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
     
     
     //mdt?
-    else if(m_muonIdHelperTool->mdtIdHelper().is_mdt(ID)){
+    else if(m_idHelperSvc->isMdt(ID)){
       //If no cuts specified, don't cut anything
       if (m_mdtSectorList.size()==0 && m_mdtEndEtaList.size()==0 && m_mdtBarEtaList.size()==0)
 	return false;
@@ -353,7 +337,7 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
     }
     
     //rpc?
-    else if(m_muonIdHelperTool->rpcIdHelper().is_rpc(ID)){
+    else if(m_idHelperSvc->isRpc(ID)){
       //If no cuts specified, don't cut anything
       if (m_rpcSectorList.size()==0 && m_rpcEtaList.size()==0)
 	return false;
@@ -362,7 +346,7 @@ bool MuonIdCutTool::isCut(Identifier ID) const { //false indicates all cuts are
     }
     
     //csc?
-    else if(m_muonIdHelperTool->cscIdHelper().is_csc(ID)){
+    else if(m_idHelperSvc->isCsc(ID)){
       //If no cuts specified, don't cut anything
       if (m_cscSectorList.size()==0 && m_cscEtaList.size()==0)
 	return false;
diff --git a/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonPrdSelectorAlg.cxx b/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonPrdSelectorAlg.cxx
index 08b95ee3a900a04e93f7151f442cba9e47678b47..a406c8fc84ab3f5b1c5e2666851c9ead2f13ae52 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonPrdSelectorAlg.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonPrdSelectorAlg.cxx
@@ -1,32 +1,17 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// MuonPrdSelectorAlg.cxx
-//   Source file for class MuonPrdSelectorAlg
-///////////////////////////////////////////////////////////////////
-
 #include "MuonPrdSelector/MuonPrdSelectorAlg.h"
 
-// Gaudi includes
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGate.h"
-#include "Identifier/IdentifierHash.h"
-#include "Identifier/Identifier.h"
 #include <iomanip>
 
 // Constructor with parameters:
 MuonPrdSelectorAlg::MuonPrdSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator) 
   : AthAlgorithm(name,pSvcLocator),
-
     m_muonIdCutTool("MuonIdCutTool/MuonIdCutTool"),
     m_mdtPRDs_in(0), m_rpcPRDs_in(0), m_tgcPRDs_in(0), m_cscPRDs_in(0),
     m_mdtPRDs_out(0), m_rpcPRDs_out(0), m_tgcPRDs_out(0), m_cscPRDs_out(0)
-
-
-
 {
   declareProperty("MDT_PRDinputContainer"      , m_inputContainer_mdt  = "MDT_DriftCircles_unfiltered"  );
   declareProperty("MDT_PRDoutputContainer"     , m_outputContainer_mdt = "MDT_DriftCircles"             );
@@ -39,15 +24,6 @@ MuonPrdSelectorAlg::MuonPrdSelectorAlg(const std::string &name, ISvcLocator *pSv
 
   declareProperty("CSC_PRDinputContainer"      , m_inputContainer_csc  = "CSC_Measurements_unfiltered"      );
   declareProperty("CSC_PRDoutputContainer"     , m_outputContainer_csc = "CSC_Measurements"                 );
-  
-
-
-
-
-
-
-
-
 }
 
 
@@ -56,14 +32,13 @@ StatusCode MuonPrdSelectorAlg::initialize()
 {
   ATH_MSG_DEBUG( "initialize() called"  );
 
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   // retrieve test tool
   ATH_CHECK(  m_muonIdCutTool.retrieve() );
-
   
   try {     
-    m_mdtPRDs_out = new Muon::MdtPrepDataContainer(m_muonIdHelperTool->mdtIdHelper().module_hash_max());
+    m_mdtPRDs_out = new Muon::MdtPrepDataContainer(m_idHelperSvc->mdtIdHelper().module_hash_max());
   } catch(const std::bad_alloc&) {
     ATH_MSG_FATAL( "Could not create a new MDT PrepRawData container!" );
     return StatusCode::FAILURE;
@@ -73,7 +48,7 @@ StatusCode MuonPrdSelectorAlg::initialize()
  
     
     try {
-      m_rpcPRDs_out = new Muon::RpcPrepDataContainer(m_muonIdHelperTool->rpcIdHelper().module_hash_max());
+      m_rpcPRDs_out = new Muon::RpcPrepDataContainer(m_idHelperSvc->rpcIdHelper().module_hash_max());
     } catch(const std::bad_alloc&) {
       ATH_MSG_FATAL( "Could not create a new RPC PrepRawData container!" );
       return StatusCode::FAILURE;
@@ -81,7 +56,7 @@ StatusCode MuonPrdSelectorAlg::initialize()
     m_rpcPRDs_out->addRef();
 
     try {
-      m_tgcPRDs_out = new Muon::TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max());
+      m_tgcPRDs_out = new Muon::TgcPrepDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max());
     } catch(const std::bad_alloc&) {
       ATH_MSG_FATAL( "Could not create a new TGC PrepRawData container!" );
       return StatusCode::FAILURE;
@@ -90,7 +65,7 @@ StatusCode MuonPrdSelectorAlg::initialize()
   
     
     try {
-      m_cscPRDs_out = new Muon::CscStripPrepDataContainer(m_muonIdHelperTool->cscIdHelper().module_hash_max());
+      m_cscPRDs_out = new Muon::CscStripPrepDataContainer(m_idHelperSvc->cscIdHelper().module_hash_max());
     } catch(const std::bad_alloc&) {
       ATH_MSG_FATAL( "Could not create a new CSC PrepRawData container!" );
       return StatusCode::FAILURE;
@@ -110,13 +85,6 @@ StatusCode MuonPrdSelectorAlg::execute()
   return StatusCode::SUCCESS;
 }
 
-StatusCode MuonPrdSelectorAlg::finalize()
-{
-  ATH_MSG_DEBUG( "finalize() called"  );
-  return StatusCode::SUCCESS;
-}
-
-
 StatusCode MuonPrdSelectorAlg::retrieveContainers() {
   ATH_MSG_DEBUG( "retrieveContainers() called"  );
   
diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx
index f5136aaff87e11ef78f833766c8ea6ab1e244a3c..6fc50e50ffedb0a84432fba8c3cbcf338cd37fa9 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.cxx
@@ -1,57 +1,36 @@
 /*
-  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 "MuonPRDSelectionTool.h"
 
-#include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h"
-#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h"
 #include "EventPrimitives/EventPrimitivesHelpers.h"
-#include "MuonRecToolInterfaces/IMuonRecoValidationTool.h"
-
-// #include "TrkToolInterfaces/IResidualPullCalculator.h"
-// #include "TrkEventPrimitives/ResidualPull.h"
 
 namespace Muon {
 
  MuonPRDSelectionTool::MuonPRDSelectionTool(const std::string& type, const std::string& name, const IInterface* parent):
     AthAlgTool(type,name,parent),
-    m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool"),
     m_mdtCreator("Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator", this),
     m_clusterCreator("Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator", this),
-    m_recoValidationTool("", this), // ("Muon::MuonRecoValidationTool/MuonRecoValidationTool"),
-    // m_pullCalculator("Trk::ResidualPullCalculator/ResidualPullCalculator"),    
+    m_recoValidationTool("", this),
     m_distanceToTubeCut(1000.),
     m_secondCoordinateCut(1500.)
   {
     declareInterface<IMuonPRDSelectionTool>(this);
-
-    declareProperty("MuonIdHelperTool",m_idHelper );    
     declareProperty("MdtDriftCircleOnTrackCreator",m_mdtCreator);
     declareProperty("MuonClusterOnTrackCreator",m_clusterCreator);
     declareProperty("MuonRecoValidationTool",m_recoValidationTool);
-    
-  }
-
- MuonPRDSelectionTool::~MuonPRDSelectionTool() { }
-
-  StatusCode MuonPRDSelectionTool::finalize() {
-    return StatusCode::SUCCESS;
   }
 
   StatusCode MuonPRDSelectionTool::initialize() {
 
-    ATH_CHECK(m_idHelper.retrieve());
+    ATH_CHECK(m_idHelperSvc.retrieve());
     ATH_CHECK(m_mdtCreator.retrieve());
     ATH_CHECK(m_clusterCreator.retrieve());
     if( !m_recoValidationTool.empty() ) ATH_CHECK(m_recoValidationTool.retrieve());
-    // ATH_CHECK(m_pullCalculator.retrieve());
-
     return StatusCode::SUCCESS;
   }
 
-
-
   bool MuonPRDSelectionTool::calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MuonLayerPrepRawData& layerPrepRawData, MuonLayerROTs& layerROTs ) const {
 
     if( msgLvl(MSG::DEBUG) ){
@@ -118,7 +97,7 @@ namespace Muon {
     const Trk::Surface& surface = mdt.detectorElement()->surface(id);
     Amg::Vector2D localPosition;
     if( !surface.globalToLocal(intersect,direction,localPosition) ){
-      ATH_MSG_VERBOSE(" globalToLocal failed for " << m_idHelper->toString(id) );
+      ATH_MSG_VERBOSE(" globalToLocal failed for " << m_idHelperSvc->toString(id) );
       return 0;
     }
 	    
@@ -126,10 +105,10 @@ namespace Muon {
     if( !m_recoValidationTool.empty() ) m_recoValidationTool->add(intersection,mdt,localPosition.x(),err_precision );
     
     // bound checks
-    double tubeHalfLen = 0.5*detEl->getActiveTubeLength( m_idHelper->mdtIdHelper().tubeLayer(id),m_idHelper->mdtIdHelper().tube(id) );
+    double tubeHalfLen = 0.5*detEl->getActiveTubeLength( m_idHelperSvc->mdtIdHelper().tubeLayer(id),m_idHelperSvc->mdtIdHelper().tube(id) );
     double distanceAlongTube = localPosition[Trk::locZ];
 
-    if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " Intersected " << m_idHelper->toString(id) << " distance to wire " << localPosition[Trk::locR] 
+    if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " Intersected " << m_idHelperSvc->toString(id) << " distance to wire " << localPosition[Trk::locR] 
                                                  << " error " << err_precision << " along tube (%) " << distanceAlongTube/tubeHalfLen;
 
     if( std::abs(distanceAlongTube) > tubeHalfLen + m_secondCoordinateCut ) {
@@ -152,7 +131,7 @@ namespace Muon {
 
     // calibrate hit
     const MdtDriftCircleOnTrack* mdtROT = m_mdtCreator->createRIO_OnTrack( mdt, intersect,  &direction ); 
-    if( !mdtROT ) ATH_MSG_VERBOSE(" Failed to calibrate " << m_idHelper->toString(id));
+    if( !mdtROT ) ATH_MSG_VERBOSE(" Failed to calibrate " << m_idHelperSvc->toString(id));
     return mdtROT;    
   }
 
@@ -172,11 +151,11 @@ namespace Muon {
     // get local position
     Amg::Vector2D localPosition;
     if( !surf.globalToLocal(intersect,direction,localPosition) ){
-      ATH_MSG_VERBOSE(" globalToLocal failed for " << m_idHelper->toString(id) );
+      ATH_MSG_VERBOSE(" globalToLocal failed for " << m_idHelperSvc->toString(id) );
       return 0;
     }
 
-    if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " Intersected " << m_idHelper->toString(id) << " local position " << localPosition[Trk::loc1] << " " << localPosition[Trk::loc2];
+    if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " Intersected " << m_idHelperSvc->toString(id) << " local position " << localPosition[Trk::loc1] << " " << localPosition[Trk::loc2];
 
     if( !surf.insideBounds(localPosition, m_distanceToTubeCut, m_secondCoordinateCut) ) {
       if( msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) << " outside bounds, dropping " << endmsg;
@@ -211,16 +190,12 @@ namespace Muon {
       const Amg::Vector3D& planeposition = tubePos;
 	    
       // always project on plane with normal in radial direction
-      Amg::Vector3D planenormal = !m_idHelper->isEndcap(id) ? amdbToGlobal.linear()*Amg::Vector3D(0.,0.,1.) : amdbToGlobal.linear()*Amg::Vector3D(0.,1.,0.);
+      Amg::Vector3D planenormal = !m_idHelperSvc->isEndcap(id) ? amdbToGlobal.linear()*Amg::Vector3D(0.,0.,1.) : amdbToGlobal.linear()*Amg::Vector3D(0.,1.,0.);
 	    
       double denom = direction.dot(planenormal);
       double u = (planenormal.dot(planeposition - position))/denom;
       Amg::Vector3D  piOnPlane = ( position + u * direction);
       return piOnPlane;
-      //Amg::Vector3D lpiOnPlane = amdbToGlobal.inverse()*piOnPlane;
-      //Amg::Vector3D ltubePos   = amdbToGlobal.inverse()*tubePos;
-	    
-      //return amdbToGlobal*lpiOnPlane;//Amg::Vector3D( lpiOnPlane.x(), ltubePos.y(), ltubePos.z() );
     }
     Trk::Intersection intersection = mdt.detectorElement()->surface(mdt.identify()).straightLineIntersection(position,direction,false,false);
     return intersection.position;
diff --git a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h
index d508869db1de509089ae841147aef4ba64246d63..4c4ec8de9a80b2e75f822b49a052105ce160ca75 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonPrepRawDataProviderTools/src/MuonPRDSelectionTool.h
@@ -1,40 +1,37 @@
 /*
-  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 MUON_MUONPRDSELECTIONTOOL_H
 #define MUON_MUONPRDSELECTIONTOOL_H
 
 #include "MuonRecToolInterfaces/IMuonPRDSelectionTool.h"
-
-#include <vector>
-
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
 #include "MuonLayerEvent/MuonSystemExtension.h"
 #include "MuonLayerEvent/MuonLayerPrepRawData.h"
 #include "MuonLayerEvent/MuonLayerROTs.h"
-
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 #include "MuonRIO_OnTrack/MuonClusterOnTrack.h"
+#include "MuonRecToolInterfaces/IMdtDriftCircleOnTrackCreator.h"
+#include "MuonRecToolInterfaces/IMuonClusterOnTrackCreator.h"
+#include "MuonRecToolInterfaces/IMuonRecoValidationTool.h"
+#include "MuonPrepRawData/MdtPrepDataCollection.h"
+
+#include <vector>
+#include <string>
 
 namespace Muon {
-  
-  class MuonIdHelperTool;
-  class IMdtDriftCircleOnTrackCreator;
-  class IMuonClusterOnTrackCreator;
-  class IMuonRecoValidationTool;
-  class MdtPrepData;
 
   class MuonPRDSelectionTool : virtual public Muon::IMuonPRDSelectionTool,  public AthAlgTool {
   public:
 
     /** Default AlgTool functions */
     MuonPRDSelectionTool(const std::string& type, const std::string& name, const IInterface* parent);
-    virtual ~MuonPRDSelectionTool();
+    virtual ~MuonPRDSelectionTool()=default;
     StatusCode initialize();
-    StatusCode finalize();
 
     /**IMuonPRDSelectionTool interface: calibrateAndSelect */   
     bool calibrateAndSelect( const MuonSystemExtension::Intersection& intersection, const MuonLayerPrepRawData& layerPrepRawData, MuonLayerROTs& layerROTs ) const;
@@ -84,13 +81,11 @@ namespace Muon {
     bool calibrateAndSelectCluster( const MuonSystemExtension::Intersection& intersection, const COL& prds, MuonLayerROTs& layerROTs ) const {
       std::vector<const MuonClusterOnTrack*> rots;
       calibrateAndSelectCluster(intersection,prds,rots);
-      if( !rots.empty() ) layerROTs.addClusters(rots,m_idHelper->technologyIndex(rots.front()->identify()));
+      if( !rots.empty() ) layerROTs.addClusters(rots,m_idHelperSvc->technologyIndex(rots.front()->identify()));
       return true;
     }
     
-
-    /** tool handles */
-    ToolHandle<MuonIdHelperTool>              m_idHelper; 
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtCreator; //<! pointer to mdt rio ontrack creator
     ToolHandle<IMuonClusterOnTrackCreator>    m_clusterCreator;  //<! pointer to muon cluster rio ontrack creator
     mutable ToolHandle<IMuonRecoValidationTool>       m_recoValidationTool; //<! FIXME!
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/CMakeLists.txt
index 5032ecadd34b6f42d77afd1cf2fc0df87afb66cc..86bd1087a20c34353727bac4f301a82c00fceccf 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/CMakeLists.txt
@@ -5,29 +5,6 @@
 # Declare the package name:
 atlas_subdir( MuonRPC_CnvTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/ByteStreamData
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          Event/ByteStreamCnvSvcBase
-                          MuonSpectrometer/MuonCablings/RPCcablingInterface
-                          MuonSpectrometer/MuonCnv/MuonCnvToolInterfaces
-                          MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface
-                          MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData
-                          MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
-                          MuonSpectrometer/MuonDigitContainer
-                          MuonSpectrometer/MuonIdHelpers
-                          MuonSpectrometer/MuonRDO
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData
-                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData
-                          Tracking/TrkDetDescr/TrkSurfaces
-                          MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling
-                          Trigger/TrigT1/TrigT1RPChardware )
-
 # External dependencies:
 find_package( tdaq-common COMPONENTS eformat_write DataWriter )
 
@@ -36,7 +13,7 @@ atlas_add_component( MuonRPC_CnvTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData ByteStreamData_test GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests ByteStreamCnvSvcBaseLib RPCcablingInterfaceLib MuonCondInterface MuonCondData MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonRDO MuonPrepRawData MuonTrigCoinData TrkSurfaces TrigT1RPChardwareLib RPChardware RPC_CondCablingLib)
+                     LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamData ByteStreamData_test GaudiKernel AthenaBaseComps AthenaKernel StoreGateLib SGtests ByteStreamCnvSvcBaseLib MuonCondInterface MuonCondData MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonRDO MuonPrepRawData MuonTrigCoinData TrkSurfaces TrigT1RPChardwareLib RPChardware RPC_CondCablingLib RPCcablingInterfaceLib MuonCnvToolInterfacesLib )
 
 # Install files from the package:
 atlas_install_headers( MuonRPC_CnvTools )
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/IRpcROD_Decoder.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/IRpcROD_Decoder.h
index 48166f8347b0debdbee39d97a15dc072506f2f2b..edd56b65e83063bbd9be12639cb442d9c1ed2049 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/IRpcROD_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/MuonRPC_CnvTools/IRpcROD_Decoder.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 IMUONRPCRODDECODER_H
@@ -9,13 +9,9 @@
 #include "ByteStreamData/RawEvent.h"
 #include "eformat/SourceIdentifier.h"
 
-
-//using eformat::helper::SourceIdentifier;
-
-
 class RpcPadContainer;
 class RpcSectorLogicContainer;
-//using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+class IdentifierHash;
 
 namespace Muon
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.cxx
index f380b7edcff561ca8c4df2cdd8047c229c4d0812..2db7ab6a12164e585dd30c6cb49718c33cd0954f 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.cxx
@@ -1,39 +1,27 @@
 /*
-  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 "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/IMessageSvc.h"
-#include "GaudiKernel/Bootstrap.h"
-
-#include "StoreGate/StoreGate.h"
+#include "RpcRDO_Decoder.h"
 
 #include "RPCcablingInterface/IRPCcablingServerSvc.h"
 #include "RPCcablingInterface/IRPCcablingSvc.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
 #include "MuonDigitContainer/RpcDigit.h"
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
 #include "MuonRDO/RpcFiredChannel.h"
 
-#include "RpcRDO_Decoder.h"
-
-
-
 Muon::RpcRDO_Decoder::RpcRDO_Decoder
-( const std::string& type, const std::string& name,const IInterface* parent )
-  :  AthAlgTool(type,name,parent),
-  m_cablingSvc(0)
+( const std::string& type, const std::string& name,const IInterface* parent ) :
+  AthAlgTool(type,name,parent)
 {
   declareInterface<IRPC_RDO_Decoder>( this );
 }
 
 StatusCode Muon::RpcRDO_Decoder::initialize()
 {
-  
-  ATH_MSG_DEBUG ( "initialize"); 
-  
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
-      
+  ATH_CHECK(AthAlgTool::initialize());
+  ATH_MSG_DEBUG ("initialize"); 
+        
   // get RPC cablingSvc
   const IRPCcablingServerSvc* RpcCabGet = 0;
   StatusCode sc = service("RPCcablingServerSvc", RpcCabGet);
@@ -46,15 +34,16 @@ StatusCode Muon::RpcRDO_Decoder::initialize()
   sc = RpcCabGet->giveCabling(m_cablingSvc);
   if (sc.isFailure()) {
     msg (MSG::FATAL) << "Could not get RPCcablingSvc from the Server !" << endmsg;
-    m_cablingSvc = 0;
+    m_cablingSvc = nullptr;
     return StatusCode::FAILURE;
   } 
   else {
     msg (MSG::VERBOSE) << " RPCcablingSvc obtained " << endmsg;
   }
-  
-  return sc;
-  
+
+  ATH_CHECK(m_idHelperSvc.retrieve());
+  ATH_CHECK(m_rpcReadKey.initialize());
+  return StatusCode::SUCCESS;
 }
 
 
@@ -74,18 +63,16 @@ std::vector<RpcDigit*>* Muon::RpcRDO_Decoder::getDigit(const RpcFiredChannel * f
   // BCzero=3 and ROOffset=2 in
   // Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx
   // need to find a better way than hard-coding
-  //std::cout << "here" <<std::endl;
   float time = (fChan->bcid()-3)*25 +(fChan->time()+0.5-2)*3.125; 
   
   // skip the trigger hits
   if (ijk==7) {
     return rpcDigitVec;
-  } 
+  }
 
   // Get the list of offline channels corresponding to the 
   // online identifier
-  std::list<Identifier> idList = m_cablingSvc->give_strip_id(side, slogic, padId, 
-							     cmaId, ijk, channel);
+  std::list<Identifier> idList = m_cablingSvc->give_strip_id(side, slogic, padId, cmaId, ijk, channel);
  
   std::list<Identifier>::const_iterator it_list;
   rpcDigitVec->reserve(idList.size());
@@ -94,20 +81,6 @@ std::vector<RpcDigit*>* Muon::RpcRDO_Decoder::getDigit(const RpcFiredChannel * f
     // and add the digit to the collection
     Identifier stripOfflineId = *it_list;
 
-    //    // RPC digits do not hold anymore time of flight : digit time (and RDO time) is TOF subtracted 
-    //    // recalculate the time of flight in case it was not in the RDOs
-    //    if (time==0) {
-    //      // get the digit position
-    //      const MuonGM::RpcReadoutElement* descriptor = 
-    //	m_muonMgr->getRpcReadoutElement(stripOfflineId);
-    //      
-    //      const HepGeom::Point3D<double> stripPos = descriptor->stripPos(stripOfflineId);
-    //      // TEMP : set the time of flight from the digit position
-    //      // temporary solution
-    //      time = static_cast<int> ( stripPos.distance()/(299.7925*CLHEP::mm/CLHEP::ns) );
-    //    
-    //    }
-
     RpcDigit* rpcDigit = new RpcDigit(stripOfflineId, time);
     rpcDigitVec->push_back(rpcDigit);
 
@@ -133,7 +106,6 @@ std::vector<Identifier>* Muon::RpcRDO_Decoder::getOfflineData(const RpcFiredChan
   // BCzero=3 and ROOffset=2 in
   // Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx
   // need to find a better way than hard-coding
-  //std::cout << "here" <<std::endl;
   time = (fChan->bcid()-3)*25 +(fChan->time()+0.5-2)*3.125;  
   
   // skip the trigger hits
@@ -143,8 +115,7 @@ std::vector<Identifier>* Muon::RpcRDO_Decoder::getOfflineData(const RpcFiredChan
 
   // Get the list of offline channels corresponding to the 
   // online identifier
-  std::list<Identifier> idList = m_cablingSvc->give_strip_id(side, slogic, padId, 
-							     cmaId, ijk, channel);
+  std::list<Identifier> idList = m_cablingSvc->give_strip_id(side, slogic, padId, cmaId, ijk, channel);
  
   rpcIdVec->assign(idList.begin(), idList.end());
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.h
index 07fac96f0e4d278681ab53d873a2a30b96123fd8..882e6531d107e64e27746d54b073a3915410576f 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRDO_Decoder.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 MUONBYTESTREAMRPCRDODECODER_H
@@ -7,34 +7,29 @@
 
 #include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-
-#include "AthenaKernel/MsgStreamMember.h"
-
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "RPC_CondCabling/RpcCablingCondData.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 #include <inttypes.h>
 #include <vector>
+#include <string>
 
-// Decoder class for conversion from RPC RDOs to RPC digits
-// Stefano Rosati
-// CERN Jan 2004
+class IRPCcablingSvc;
 
-namespace Muon
-{
-    
+// Decoder class for conversion from RPC RDOs to RPC digits
+namespace Muon {
 
-class RpcRDO_Decoder : virtual public IRPC_RDO_Decoder, public AthAlgTool
-{
+class RpcRDO_Decoder : virtual public IRPC_RDO_Decoder, public AthAlgTool {
 
  public:
 
   RpcRDO_Decoder(const std::string& type, const std::string& name,
                               const IInterface* parent);
-  ~RpcRDO_Decoder() { }
+  ~RpcRDO_Decoder()=default;
 
   virtual StatusCode initialize();
-  virtual StatusCode finalize() { return StatusCode::SUCCESS; }
 
   virtual std::vector<RpcDigit*>* getDigit(const RpcFiredChannel * fChan, 
 				   uint16_t& sectorID, uint16_t& padId, 
@@ -46,9 +41,8 @@ class RpcRDO_Decoder : virtual public IRPC_RDO_Decoder, public AthAlgTool
 
 	
  private:
-
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+  SG::ReadCondHandleKey<RpcCablingCondData> m_rpcReadKey{this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"};
 
   const IRPCcablingSvc* m_cablingSvc;
 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.cxx
index 31393bd37997e9fa26d9336d10bce54ee784b4ab..e5460e358c54a069e5c3b0215206a5ea93ca74d9 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.cxx
@@ -1,12 +1,8 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// Implementation of RpcROD_Decoder class 
-
 #include "RpcROD_Decoder.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
-#include "RPCcablingInterface/IRPCcablingServerSvc.h"
 
 #include <algorithm> 
 
@@ -14,57 +10,25 @@
 #include <vector>
 #include <utility>
 #include <algorithm>
-//Gaudi
-#include "GaudiKernel/ListItem.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/ISvcLocator.h"
-#include "GaudiKernel/ListItem.h"
-
-//niko
-//#include "RpcByteStreamAccess/IRPC_ByteStreamErrorSvc.h"
-
 
-//Athena
 #include "eformat/Version.h"
 #include "ByteStreamData/RawEvent.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
-Muon::RpcROD_Decoder::RpcROD_Decoder ( const std::string& type, const std::string& name,const IInterface* parent ) :  AthAlgTool(type,name,parent),
-														      //m_hashfunc(0),
-														      //niko
-														      m_decodeSL(false),
-														      //m_byteStreamErrSvc("RPC_ByteStreamErrorSvc",name),
-														      m_cabling(0)
-														      //,m_bench("RpcROD_Decoder"),
-{
+Muon::RpcROD_Decoder::RpcROD_Decoder (const std::string& type, const std::string& name, const IInterface* parent) :
+  AthAlgTool(type,name,parent),
+  m_decodeSL(false) {
     declareInterface< IRpcROD_Decoder  >( this );
     declareProperty("SpecialROBNumber",m_specialROBNumber=-1);
     declareProperty("Sector13Data",m_sector13Data=false);
     declareProperty("DataErrorPrintLimit",m_maxprinterror=1000);
-    //declareProperty("RpcByteStreamErrorContainer",m_bsErrContainerName="myRpcByteStreamErrorContainer");
-    
-}
-
-
-Muon::RpcROD_Decoder::~RpcROD_Decoder() {
-
 }
 
 StatusCode Muon::RpcROD_Decoder::initialize() {
 
-  ServiceHandle<IRPCcablingServerSvc> rpc_server("RPCcablingServerSvc", name());
-  if (rpc_server.retrieve().isFailure()) {
-    ATH_MSG_FATAL("Can't get RPCcablingServerSvc" );
-    return StatusCode::FAILURE;
-  }
-  
-  if (StatusCode::SUCCESS != rpc_server->giveCabling(m_cabling)) {
-    ATH_MSG_FATAL("Can't get RPCcablingSvc from Server");
-    return StatusCode::FAILURE; 
-  }
+  ATH_CHECK(m_idHelperSvc.retrieve());
 
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK(m_rpcReadKey.initialize());
 
   if (m_specialROBNumber>0) {
     ATH_MSG_DEBUG("Setting the special ROB Number to: 0x" << MSG::hex << m_specialROBNumber << MSG::dec );
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h
index 531a93d6d3e3a9e007852702e28178d92a9df78c..26a1f593214ae2df132a6cbb502c9effe4f635ce 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder.h
@@ -8,7 +8,6 @@
 #include "TrigT1RPChardware/RPCRODDecode.h"
 #include "TrigT1RPChardware/RPCRXRODDecode.h"
 #include "TrigT1RPChardware/RPCRODStructure.h"
-#include "RPCcablingInterface/IRPCcablingSvc.h"
 
 #include "MuonRPC_CnvTools/IRpcROD_Decoder.h"
 
@@ -19,7 +18,8 @@
 #include "MuonRDO/RpcFiredChannel.h"
 #include "MuonRDO/RpcSectorLogicContainer.h"
 
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 #include "eformat/Issue.h"
 #include "eformat/SourceIdentifier.h"
@@ -27,17 +27,13 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/GaudiException.h"
+#include "RPC_CondCabling/RpcCablingCondData.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include <atomic>
 #include <cassert>
 #include <stdint.h>
 
-// start preparing for BS errors 
-//#include "MuonByteStreamErrors/RpcByteStreamErrorContainer.h"
-//#include "RpcByteStreamAccess/IRPC_ByteStreamErrorSvc.h"
-
-// #include "minibench.h"
-
 namespace Muon
 {
   
@@ -62,7 +58,7 @@ namespace Muon
                    const std::string& name,
                    const IInterface* p) ;
     
-    virtual ~RpcROD_Decoder(); 
+    virtual ~RpcROD_Decoder()=default; 
     
     
     
@@ -125,20 +121,14 @@ namespace Muon
     void printcheckformat() const;
     
   private:
-    
-    //RpcPadIdHash*                      m_hashfunc;
-    const IRPCcablingSvc*              m_cabling;
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
-    ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-      "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+    SG::ReadCondHandleKey<RpcCablingCondData> m_rpcReadKey{this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"};
     
     // re-define the ROB number
     IntegerProperty m_specialROBNumber;
     // flag to read old sector 13 data
     BooleanProperty m_sector13Data;
-
-    //RpcByteStreamErrorContainer *m_bsErrCont;
-    //std::string m_bsErrContainerName; 
   }; 
   
   inline StatusCode Muon::RpcROD_Decoder::checkdataformat(std::vector<uint16_t>* pdata, int ini, int end) const
@@ -428,6 +418,9 @@ namespace Muon
     
     StatusCode cnv_sc;
 
+    SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+    const RpcCablingCondData* rpcCabling{*cablingCondData};
+
     // here optimize decoding of ROB fragment (for data only type==2)
     if (type==2)
     {
@@ -449,7 +442,7 @@ namespace Muon
           ATH_MSG_DEBUG ( "Created new Pad Collection Hash ID = " << static_cast<unsigned int>(it) );
 
 		      // create new collection - I should be doing this with unique_ptr but it requires changing downstream functions
-          RpcPad* coll = new RpcPad((m_cabling->padHashFunction())->identifier(it), it);
+          RpcPad* coll = new RpcPad(rpcCabling->identifier(it), it);
           mapOfCollections[coll->identify()]=coll;
           
 	      }// endif collection not found in the container 
@@ -511,7 +504,7 @@ namespace Muon
         ATH_MSG_VERBOSE(" Created new Pad Collection Hash ID = " << static_cast<unsigned int>(it) );
 
         // create new collection - I should be doing this with unique_ptr but it requires changing downstream functions
-        RpcPad* coll = new RpcPad((m_cabling->padHashFunction())->identifier(it), it);
+        RpcPad* coll = new RpcPad(rpcCabling->identifier(it), it);
         
         //convert collection - note case3 will never be used due to statement above
         switch(type)
@@ -630,7 +623,7 @@ namespace Muon
     
     if (msgLvl(MSG::VERBOSE ) )
       msg(MSG::VERBOSE) << "The offline ID request for conversion is "
-      << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId) << endmsg;
+      << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) << endmsg;
     
     bool isSLHeader    =false;
     bool isSLSubHeader =false;
@@ -741,7 +734,9 @@ namespace Muon
         isSLFragment  = false;
         isSLFooter    = false;
       }
-      
+
+      SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+      const RpcCablingCondData* rpcCabling{*cablingCondData};
       
       if (msgLvl(MSG::VERBOSE) ) {
         char decoded_char[256] ;
@@ -1008,7 +1003,7 @@ namespace Muon
           uint16_t sectorLogic = sector-side*32;
           
           // get the offline ID of the pad
-          if(!m_cabling->giveOffflineID(side,sectorLogic,PadID,padOfflineId))
+          if(!rpcCabling->giveOfflineId(side,sectorLogic,PadID,padOfflineId))
           {
             if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
             << "Cannot retrieve the OfflineID for the PAD n. " 
@@ -1016,7 +1011,7 @@ namespace Muon
             << sectorLogic << endmsg;
           } else {
             if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-            << "ID " << m_muonIdHelperTool->rpcIdHelper().show_to_string(padOfflineId)
+            << "ID " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId)
             << " associated to PAD n. " << PadID << " at side " 
             << side << " and  sector " << sectorLogic << endmsg; 
           }
@@ -1026,7 +1021,7 @@ namespace Muon
             
             if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
             << " match found with ID " 
-            << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId)
+            << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
             << " requested for the conversion; return this collection" 
             << endmsg; 
             
@@ -1043,7 +1038,7 @@ namespace Muon
           {
             if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
             << " match NOT found with ID "  
-            << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId)
+            << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
             << " requested for the conversion" << endmsg;  
           }
           
@@ -1507,8 +1502,12 @@ namespace Muon
 #ifndef NVERBOSE
           msg(MSG::VERBOSE) <<" Pad Identifier= "<<PadID<< " Status: " << status << endmsg;
 #endif
+
+          SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+          const RpcCablingCondData* rpcCabling{*cablingCondData};
+
           // get the offline ID of the pad
-          if(!m_cabling->giveOffflineID(side,sectorLogic,PadID,padOfflineId))
+          if(!rpcCabling->giveOfflineId(side,sectorLogic,PadID,padOfflineId))
           {
             if (msgLvl(MSG::VERBOSE) ) 
               msg(MSG::VERBOSE) 
@@ -1519,7 +1518,7 @@ namespace Muon
           else 
             if (msgLvl(MSG::VERBOSE) ) 
               msg(MSG::VERBOSE) 
-              << "ID " << m_muonIdHelperTool->rpcIdHelper().show_to_string(padOfflineId)
+              << "ID " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId)
               << " associated to PAD n. " << PadID << " at side " 
               << side << " and  sector " << sectorLogic << endmsg;
           
@@ -1528,7 +1527,7 @@ namespace Muon
             if (msgLvl(MSG::VERBOSE) ) 
               msg(MSG::VERBOSE) 
               << " match found with ID " 
-              << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId)
+              << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
               << " requested for the conversion; return this collection" 
               << endmsg; 
             
@@ -1549,7 +1548,7 @@ namespace Muon
             if (msgLvl(MSG::VERBOSE) ) 
               msg(MSG::VERBOSE) 
               << " match NOT found with ID " 
-              << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId)
+              << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
               << " requested for the conversion" << endmsg;
           } 
         }
@@ -1696,7 +1695,7 @@ namespace Muon
     
     if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
       << "The offline ID request for conversion is " 
-      << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId) 
+      << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) 
       << endmsg;
     
     // remove the rod header and footer then
@@ -1776,11 +1775,13 @@ namespace Muon
       while (padHeader == 'H') {
         uint16_t padId = padReadout.padid();
         
-        // uint16_t status = padReadout.status();
         uint16_t status = 0;
+
+        SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+        const RpcCablingCondData* rpcCabling{*cablingCondData};
         
         Identifier padOfflineId;
-        if(!m_cabling->giveOffflineID(side,slogic,padId,padOfflineId))
+        if(!rpcCabling->giveOfflineId(side,slogic,padId,padOfflineId))
         {
           if (msgLvl(MSG::VERBOSE) ) 
             msg(MSG::VERBOSE) 
@@ -1791,7 +1792,7 @@ namespace Muon
         else 
           if (msgLvl(MSG::VERBOSE) ) 
             msg(MSG::VERBOSE) 
-            << "ID " << m_muonIdHelperTool->rpcIdHelper().show_to_string(padOfflineId)
+            << "ID " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId)
             << " associated to PAD n. " << padId << " at side " 
             << side << " and  sector " << slogic << endmsg;
         
@@ -1803,15 +1804,15 @@ namespace Muon
         if (thisPadOfflineId == padOfflineId) {
           if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
             << "Found the collection to return " 
-            << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId) 
+            << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) 
             << endmsg;
           v.setOnlineId(padId);
           v.setStatus(status);
           v.setSector(sectorID);
         } else {
           if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-            << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId) 
-            << "!=" << m_muonIdHelperTool->rpcIdHelper().show_to_string(padOfflineId)
+            << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId) 
+            << "!=" << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId)
             << endmsg;
         } 
         char cmaHeader    = 'U';
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder_v302.C b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder_v302.C
index 129036ddee3d284f524f36f95743c2ae3eac46e8..d864e4c506dfc58d37e61392b0526bf23a0e48ff 100644
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder_v302.C
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcROD_Decoder_v302.C
@@ -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
 */
 
 StatusCode Muon::RpcROD_Decoder::fillCollection_v302new(BS data, const uint32_t data_size, RpcPad& v,
@@ -7,7 +7,6 @@ StatusCode Muon::RpcROD_Decoder::fillCollection_v302new(BS data, const uint32_t
 
 {
   ATH_MSG_VERBOSE("in fillCollection_v302new");
-  //std::cout<<" in fillCollection_v302"<<std::endl;
   std::map<Identifier,RpcPad*> vmap;
   vmap[v.identify()]=&v;
   StatusCode cnvsc= fillCollectionsFromRob_v302(data,data_size,vmap,sourceId, sectorLogicContainer);
@@ -27,12 +26,6 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
   if(skipSectorLogicDecoding)
     ATH_MSG_DEBUG("Skip SectorLogic decoding, so SLROC.decodeFragment is not being processed");
 
-  /* for (unsigned int i = 0; i<1000; ++i) { */
-  /*   //std::cout<<" aaa "<<std::endl; */
-  /*   msg(MSG::VERBOSE) << "try to increase cpu time "<<log(pow(((double)i+1.)/999.,3))<<endmsg; */
-  /* } */
-
-  // m_bench.point(1);
   // unpack the 32 bits words into 16 bits 
   // no ROD header and footer 
   ATH_MSG_VERBOSE("in fillCollectionFromRob_v302");
@@ -43,13 +36,9 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
   ATH_MSG_DEBUG("In fillCollectionsFromRob_v302:");
   ATH_MSG_VERBOSE("**Start of v302********Decoder v302 dumping the words******** ");
   ////  notice that instructions in between   #ifndef NVERBOSE are executed in normal jobs with standard (INFO) output level !!!!	      
-  /* #ifndef NVERBOSE */
-  /*     std::cout<<" printing something for testing"<<std::endl; */
-  /* #endif */
 
-  //if (size > 0  && msgLvl(MSG::INFO) ) {
   if (size > 0  && msgLvl(MSG::VERBOSE) ) {
-    msg(MSG::VERBOSE) << "The size of this ROD-read is " << size << endmsg;
+    ATH_MSG_VERBOSE("The size of this ROD-read is " << size);
     int  decoded             ;
     int iSLh = -1;
     char decoded_char[1000]  ;
@@ -76,11 +65,9 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
 	{
 	  sprintf(decoded_char,"SL hit ???"      );
 	}
-        
-      //      msg(MSG::INFO) << "word " << i <<" = "<< MSG::hex << p[i] << MSG::dec 
-      //			<< " " << MSG::hex << decoded << MSG::dec << " " << decoded_char << endmsg;
-      msg(MSG::VERBOSE) << "word " << i <<" = "<< MSG::hex << p[i] << MSG::dec 
-      		<< " " << MSG::hex << decoded << MSG::dec << " " << decoded_char << endmsg;
+
+      ATH_MSG_VERBOSE("word " << i <<" = "<< MSG::hex << p[i] << MSG::dec 
+      		<< " " << MSG::hex << decoded << MSG::dec << " " << decoded_char);
     }
   }
   int nwInCM = 0;
@@ -94,7 +81,7 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
     
     
     
-  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "The source ID is: " << MSG::hex << sourceId << endmsg;
+  if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("The source ID is: " << MSG::hex << sourceId);
     
     
   uint16_t sectorForCabling = 0;
@@ -120,13 +107,13 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
 	{
 	  Identifier myPadOfflineId = (*it).second->identify();
 	  IdentifierHash myPadHashOfflineId =  (*it).second->identifyHash();	    
-	  msg(MSG::VERBOSE) << "The offline ID requested for conversion are "
-			    << m_muonIdHelperTool->rpcIdHelper().show_to_string(myPadOfflineId)<<" hash version "<< (int)myPadHashOfflineId << endmsg;
+	  ATH_MSG_VERBOSE("The offline ID requested for conversion are "
+			    << m_idHelperSvc->rpcIdHelper().show_to_string(myPadOfflineId)<<" hash version "<< (int)myPadHashOfflineId);
 	}
     }  
   else if (msgLvl(MSG::DEBUG ))
     {
-      msg(MSG::DEBUG)<<"N. of pads requested for conversion = "<<vmap.size()<<endmsg;
+      ATH_MSG_DEBUG("N. of pads requested for conversion = "<<vmap.size());
     }
   bool isSLHeader    =false;
   bool isSLSubHeader =false;
@@ -172,53 +159,18 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
   if (msgLvl(MSG::DEBUG) )
     {
       
-      msg(MSG::DEBUG) << "subDetectorID = 0x" 
-		      << MSG::hex << subDetectorID << MSG::dec 
-		      << endmsg;
+      ATH_MSG_DEBUG("subDetectorID = 0x" 
+		      << MSG::hex << subDetectorID << MSG::dec);
       
-      msg(MSG::DEBUG) << "rodID = 0x" << MSG::hex
-		      << rodId << MSG::dec << endmsg;
-      msg(MSG::DEBUG) << "The side is " << side 
-		      << endmsg;
+      ATH_MSG_DEBUG("rodID = 0x" << MSG::hex
+		      << rodId << MSG::dec);
+      ATH_MSG_DEBUG("The side is " << side);
     }
     
-  //RpcSectorLogic* sl;
-  RpcPad* thisv = NULL;
-
-  // ---- boolean variables to keep trak of where we stand and what we expect -----
-  //
-  // bool bsErrCheck_InRX = false;
-  // bool bsErrCheck_InSL = false;
-  // bool bsErrCheck_InPD = false;
-  // bool bsErrCheck_InCM = false;
-  //
-  //bool bsErrCheck_FromSLFooter  = false;
-  // bool bsErrCheck_FromPDFooter  = false;
-  // bool bsErrCheck_FromPDHeader  = false;
-  //
-  // bool bsErrCheck_errorInRXHeader    = false;
-  //bool bsErrCheck_errorInRXSubHeader = false;
-  // bool bsErrCheck_errorInRXFooter    = false;
-  //bool bsErrCheck_errorInSLHeader    = false;
-  //bool bsErrCheck_errorInSLSubHeader = false;
-  //bool bsErrCheck_errorInSLFooter    = false;
-  // bool bsErrCheck_errorInPDHeader    = false;
-  // bool bsErrCheck_errorInPDSubHeader = false;
-  //bool bsErrCheck_errorInPDFooter    = false;
-  //bool bsErrCheck_errorInPDPreFooter = false;
-  //bool bsErrCheck_errorInCMHeader    = false;
-  //bool bsErrCheck_errorInCMSubHeader = false;
-  //bool bsErrCheck_errorInCMPreFooter = false;
-  //bool bsErrCheck_errorInCMFooter    = false;
-  //
-  // ------------------------------------------------------------------------------
-
+  RpcPad* thisv = nullptr;
 
   for (uint16_t i = 0; i < size; ++i) 
     {
-      
-      //std::cout << "REGISTER: " << i << std::endl;
-      
       isRXHeader    =false;
       isRXFooter    =false;
       isPadHeader   =false;
@@ -314,9 +266,9 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
         }
         
         
-        msg(MSG::VERBOSE)  << i << " -->current data word is " 
+        ATH_MSG_VERBOSE(i << " -->current data word is " 
 			   << MSG::hex << currentWord << MSG::dec
-			   << decoded_char << " RecFieldROS,PAD,SL  "<<recFieldROS<<" "<<recFieldPAD<<" "<<recFieldSL<<endmsg;
+			   << decoded_char << " RecFieldROS,PAD,SL  "<<recFieldROS<<" "<<recFieldPAD<<" "<<recFieldSL);
         
       }
       
@@ -326,21 +278,14 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
         ATH_MSG_WARNING("Bad data from RPC ROD 0x" << MSG::hex << rodId << MSG::dec
         << ". RX header not found at ROB fragment begin. Skipping this ROB fragment.");
         return StatusCode::SUCCESS; //continue decoding data from other ROBs
-	      //bsErrCheck_errorInRXHeader = true;
       }
 
 
       if(isRXHeader) { 
-	      //bsErrCheck_errorInRXHeader = false;
-	      //bsErrCheck_InRX = true;
-	      // bsErrCheck_InSL = false;
-	      // bsErrCheck_InPD = false;
-	      // bsErrCheck_InCM = false;
-
  
         if (msgLvl(MSG::VERBOSE) ){
-	        msg(MSG::VERBOSE)  << " this is a RX Header " << endmsg;
-	        msg(MSG::VERBOSE)  << " Sector ID="    <<RXROS.RXid()<<endmsg;
+	        ATH_MSG_VERBOSE(" this is a RX Header ");
+	        ATH_MSG_VERBOSE(" Sector ID="    <<RXROS.RXid());
 	      }
         
         // get the sector id according to the new format
@@ -351,7 +296,7 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
         uint16_t rxid = RXROS.RXid();      // range (presumably) 0-1
         sectorForCabling = 2*rodId+rxid;   // range 0-31
         sector = side*32+sectorForCabling; // range 0-63    //side = 1 for side A or 0 for side C // side 1 corresponds to subDetID=65 (side 0 for subDetID=66)
-	      if (msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE)  << "RXid, sectorForCabling, sector = "<<rxid<<" "<<sectorForCabling<<" "<<sector<<std::endl;
+	      if (msgLvl(MSG::VERBOSE) ) ATH_MSG_VERBOSE("RXid, sectorForCabling, sector = "<<rxid<<" "<<sectorForCabling<<" "<<sector);
         
         //fix for M3 
         if ((rodId==3 || rodId==1) && (m_specialROBNumber > 0) ) {
@@ -362,21 +307,18 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
             sector=40;
             sectorForCabling=8;
           }
-	  if (msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE)  << "Here a change !!! RXid, sectorForCabling, sector = "<<rxid<<" "<<sectorForCabling<<" "<<sector<<endmsg;
+	  if (msgLvl(MSG::VERBOSE) ) ATH_MSG_VERBOSE("Here a change !!! RXid, sectorForCabling, sector = "<<rxid<<" "<<sectorForCabling<<" "<<sector);
         }
         else if ( (rodId==4 || rodId==2) && (m_specialROBNumber > 0)) {
           sector=40;
           sectorForCabling=8;
-	  if (msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE)  << "Here a change !!! RXid, sectorForCabling, sector = "<<rxid<<" "<<sectorForCabling<<" "<<sector<<endmsg;
+	  if (msgLvl(MSG::VERBOSE) ) ATH_MSG_VERBOSE("Here a change !!! RXid, sectorForCabling, sector = "<<rxid<<" "<<sectorForCabling<<" "<<sector);
         }     
         
 
       } else if(isRXFooter) {
-	// bsErrCheck_errorInRXHeader = false; 
-	// bsErrCheck_errorInRXFooter = false; 
         ATH_MSG_VERBOSE(" this is a RX Footer ");
 	++nDecodedRX;
-	//if (nDecodedRX==2) return StatusCode::SUCCESS;
       } else if(isSLHeader || isSLFragment || isSLSubHeader || isSLFooter)  {
         
         // push only the lowest 16 bits
@@ -409,16 +351,13 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
           if (msgLvl(MSG::VERBOSE) )
 	    {
             
-	      msg(MSG::VERBOSE) 
-		<< " Number of data words in SectorLogicReadOut= "
-		<< SLBodyWords << endmsg;  
-	      msg(MSG::VERBOSE) 
-		<< " TEST SL: "<< foundSL << endmsg;
+	      ATH_MSG_VERBOSE(" Number of data words in SectorLogicReadOut= "<< SLBodyWords);  
+	      ATH_MSG_VERBOSE(" TEST SL: "<< foundSL);
             
 	      // Print out a raw dump of the SL fragment 
 	      for(unsigned short j=0; j<SLBodyWords; j++) {
-		msg(MSG::VERBOSE) << " SL data word " << j << " : " << MSG::hex
-				  << SLBuff[j] << MSG::dec << endmsg;
+		ATH_MSG_VERBOSE(" SL data word " << j << " : " << MSG::hex
+				  << SLBuff[j] << MSG::dec);
 	      }
 	    }
           
@@ -491,8 +430,7 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
               else if (SLROS.isOutputBody()) {
                 if (!outputHeaderFound) {
                   rowinBcid = 999;
-                  if (msgLvl(MSG::VERBOSE) ) msg(MSG::VERBOSE) 
-					       << "ERROR: outputSLHeader missing !!" << endmsg;
+                  if (msgLvl(MSG::VERBOSE) ) ATH_MSG_VERBOSE("ERROR: outputSLHeader missing !!");
                 }
                 else {
                   if (SLROS.isOutputDecoded()) {
@@ -596,36 +534,31 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
 
           side = (sector<32) ? 0:1; // 0 = side C[z<0], 1 = side A[z>0]
           uint16_t sectorLogic = sector-side*32; // range is 0-31
-	  //if (sector==22 || sector==23 || sector==26 || sector==27) msg(MSG::INFO) <<"Decoding Pad Header - side,sectorLogic= "<<side<<" "<<sectorLogic<<"  PadID/Sector "<<PadID<<"/"<<sector<<" need to get from cabling padOfflineId"<<endmsg;
-	  //else 
-	  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) <<"Decoding Pad Header - side,sectorLogic= "<<side<<" "<<sectorLogic<<"  PadID/Sector "<<PadID<<"/"<<sector<<" need to get from cabling padOfflineId"<<endmsg;
+	  if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("Decoding Pad Header - side,sectorLogic= "<<side<<" "<<sectorLogic<<"  PadID/Sector "<<PadID<<"/"<<sector<<" need to get from cabling padOfflineId");
 
+          SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+          const RpcCablingCondData* rpcCabling{*cablingCondData};
           // get the offline ID of the pad
-          if(!m_cabling->giveOffflineID(side,sectorLogic,PadID,padOfflineId))
+          if(!rpcCabling->giveOfflineId(side,sectorLogic,PadID,padOfflineId))
 	    {
-	      if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-					  << "Cannot retrieve the OfflineID for the PAD n. " 
+	      if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("Cannot retrieve the OfflineID for the PAD n. " 
 					  << PadID << " at side " << side << " and  sector " 
-					  << sectorLogic << endmsg;
+					  << sectorLogic);
 	    } else {
-            if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-					<< "PadOfflineId " << m_muonIdHelperTool->rpcIdHelper().show_to_string(padOfflineId)
+            if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("PadOfflineId " << m_idHelperSvc->rpcIdHelper().show_to_string(padOfflineId)
 					<< " associated to PAD n. " << PadID << " at side " 
-					<< side << " and  sectorLogic " << sectorLogic << endmsg; 
+					<< side << " and  sectorLogic " << sectorLogic); 
           }
           
           // check if it's the pad to convert
-          //if (thisPadOfflineId == padOfflineId) {
 	  std::map<Identifier,RpcPad*>::const_iterator myPadInList = vmap.find(padOfflineId);
           if (myPadInList!=vmap.end()){
             thisPadOfflineId = ((*myPadInList).second)->identify();
 	    thisPadHashOfflineId = ((*myPadInList).second)->identifyHash();
 	    thisv = (*myPadInList).second; // pointer to RpcPad collection to be filled (if in the list requested)
-            if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-					<< " match found with ID " 
-					<< m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId)
-					<< " requested for the conversion; return this collection with hash " << thisPadHashOfflineId
-					<< endmsg; 
+            if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("match found with ID " 
+					<< m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
+					<< " requested for the conversion; return this collection with hash " << thisPadHashOfflineId); 
             
             foundPad = true;
             
@@ -638,10 +571,9 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
           }
           else
 	    {
-	      if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-					  << " match NOT found with ID "  
-					  << m_muonIdHelperTool->rpcIdHelper().show_to_string(thisPadOfflineId)
-					  << " requested for the conversion" << endmsg;  
+	      if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("match NOT found with ID "  
+					  << m_idHelperSvc->rpcIdHelper().show_to_string(thisPadOfflineId)
+					  << " requested for the conversion");  
 	    }
           
         }
@@ -653,32 +585,23 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
           //bsErrCheck_FromPDHeader = false;
           if (foundPad) {
             thisv->setBcId(PDROS.bcid());
-            if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-					<< "Found the subheader, setting bcid to: " << PDROS.bcid() 
-					<< endmsg;
+            if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("Found the subheader, setting bcid to: " << PDROS.bcid());
           }
         }
 	else 
-	  // if (bsErrCheck_FromPDHeader)
-	  //   {
-	  //     bsErrCheck_errorInPDSubHeader = true;
-	  //   }
-        
         if (recField == 'P') {
-          if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-				      << "Found the prefooter" << endmsg;
+          if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("Found the prefooter");
           if (foundPad) thisv->setStatus(PDROS.status());
           
           if ( currentWord&0x0fff ) {
-            if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE)
-					<< "Pad Busy status not zero ! value: " << MSG::hex
-					<< (currentWord & 0x0fff) << MSG::dec << endmsg;
+            if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("Pad Busy status not zero ! value: " << MSG::hex
+					<< (currentWord & 0x0fff) << MSG::dec);
           }
         }
         
         if(recField == 'F') {
 	  if (msgLvl(MSG::VERBOSE)) {
-	    msg(MSG::VERBOSE) << " Pad Footer " << endmsg;
+	    ATH_MSG_VERBOSE(" Pad Footer ");
 	  }
 	  if (PDROS.errorCode()!=0) 
 	    {
@@ -701,14 +624,6 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
 		    } 
 		  else ATH_MSG_DEBUG("... keep going to allow full SL decoding");
 		}
-	      // M.C. : CONTINUE TO SCAN TILL THE END of the ROB TO FIND LAST SectorLogic:
-	      /* if (!(PadID>3&&sector%2>0))
-		 {
-		 msg(MSG::VERBOSE) 
-		 << "Found Last sector Data Fragment ????  PadID=("<<PadID<<")<=3 || sector="<<sector<<" is odd"<< endmsg;  
-		 return StatusCode::SUCCESS;
-                 }
-	      */
 	    }          
 	}
         
@@ -716,62 +631,43 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
         
 	if (msgLvl(MSG::VERBOSE))
 	  {          
-	    msg(MSG::VERBOSE) 
-	      << " current word "<< MSG::hex << currentWord << MSG::dec << endmsg;
-          
-	    msg(MSG::VERBOSE) 
-	      << " ==isPADFragment= " << isPADFragment << endmsg;
-	    msg(MSG::VERBOSE) 
-	      << " calling pushword: " << MSG::hex << currentWord << MSG::dec << endmsg;
+	    ATH_MSG_VERBOSE(" current word "<< MSG::hex << currentWord << MSG::dec);
+	    ATH_MSG_VERBOSE(" ==isPADFragment= " << isPADFragment);
+	    ATH_MSG_VERBOSE(" calling pushword: " << MSG::hex << currentWord << MSG::dec);
 	  }
         
 	// here scrolling all PAD/CM fragments until a CM footer is found (foundCM>0 when a CM footer is found)
-	//if (sector==22 || sector==23 || sector==26 || sector==27)  myRPC.enablePrintOut();
 	int foundCM = 0;
 	foundCM = myRPC.pushWord(currentWord,0);
-	//std::cout<<" foundCM = "<<foundCM<<std::endl;
-	//myRPC.disablePrintOut();
         
 	if(foundCM==1) { // corresponds to CM footer found - all CM words stored in myRPC
-          
-	  //if (sector==22 || sector==23 || sector==26 || sector==27)  msg(MSG::INFO)<< " in PadID/Sector "<<PadID<<"/"<<sector<<" CM footer found: n. of words in CM including Footer "<<nwInCM<<myRPC.CMFragment() << endmsg;
-	  //else 
-	  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " in PadID/Sector "<<PadID<<"/"<<sector<< " CM footer found: n. of words in CM including Footer "<<nwInCM<<myRPC.CMFragment() << endmsg;
+
+	  if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE(" in PadID/Sector "<<PadID<<"/"<<sector<< " CM footer found: n. of words in CM including Footer "<<nwInCM<<myRPC.CMFragment());
           
 	  // If the pad is the good one, add the CMs to the container   
 	  if (foundPad) {
 	    MatrixReadOut* matrix = myRPC.CMFragment();
-            
-	    //std::cout << myRPC.CMFragment()<< std::endl;
-            
+     
 	    matrixROS = matrix->getHeader();  
 	    uint16_t cmaId  = matrixROS.cmid();
 	    // special "feet" towers have "high-pt" cmaIds in hardware, transform to low-pt 
 	    if ((sectorForCabling==21||sectorForCabling==22||sectorForCabling==25||sectorForCabling==26)&& 
 		(PadID==2||PadID==4||PadID==5||PadID==7)&& 
 		cmaId>=4)   cmaId=cmaId-4; 
-	    //msg(MSG::DEBUG) << "sector, Pad, cmaid : "<< sectorForCabling << ", " << PadID << ", " <<  cmaId << endmsg; 	    
 	    uint16_t fel1id = matrixROS.fel1id();
             
 	    matrixROS = matrix->getSubHeader();
 	    uint16_t febcid = matrixROS.febcid();
 
-	    //if (sector==22 || sector==23 || sector==26 || sector==27)  msg(MSG::INFO) 
-	    //<< "Creating a new CM, cmaId=" << cmaId << " fel1id=" << fel1id
-	    //<< " febcid=" << febcid <<" in PadID/Sector "<<PadID<<"/"<<sector<<endmsg;
-	    //else 
-	    if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) 
-					<< "Creating a new CM, cmaId=" << cmaId << " fel1id=" << fel1id
-					<< " febcid=" << febcid <<" in PadID/Sector "<<PadID<<"/"<<sector<<endmsg;
+	    if (msgLvl(MSG::VERBOSE)) ATH_MSG_VERBOSE("Creating a new CM, cmaId=" << cmaId << " fel1id=" << fel1id
+					<< " febcid=" << febcid <<" in PadID/Sector "<<PadID<<"/"<<sector);
             
 	    // Create the new cm
 	    RpcCoinMatrix * coinMatrix = new RpcCoinMatrix (padOfflineId,cmaId,fel1id,febcid);
             
 	    matrixROS = matrix->getFooter();
 	    coinMatrix->setCRC(matrixROS.crc());
-            
-	    //std::cout << matrix->numberOfBodyWords() << std::endl;
-            
+           
 	    // Loop on the hits and push them in the coin matrix
 	    for (int i=0 ; i<matrix->numberOfBodyWords() ; ++i) {
               
@@ -786,13 +682,7 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
 	      if (ijk < 7 ) {
 		uint16_t channel = matrixROS.channel();
 		firedChan = new RpcFiredChannel(bcid,time,ijk,channel);
-                
-		
-		//if (sector==22 || sector==23 || sector==26 || sector==27)
-		//ATH_MSG_INFO (
-		//		 "Adding a fired channel, bcid=" << bcid << " time=" 
-		//		 << " ijk=" << ijk << " channel=" << channel<< " in PadID/Sector "<<PadID<<"/"<<sector);
-		//else
+
 		ATH_MSG_VERBOSE (
 				 "Adding a fired channel, bcid=" << bcid << " time=" 
 				 << " ijk=" << ijk << " channel=" << channel<< " in PadID/Sector "<<PadID<<"/"<<sector);
@@ -829,16 +719,6 @@ StatusCode Muon::RpcROD_Decoder::fillCollectionsFromRob_v302(BS data, const uint
 	    ATH_MSG_VERBOSE ("generic CM word - counting words in this cm " << nwInCM);
 	  }
 
-	/*
-	// here check pad condition errors (Niko)
-	int decoded = (p[i] & 0xf000)>> 12 ;
-	msg(MSG::DEBUG) << "WHEN looking for errors in pad fragment ---- word " << i <<" = "<< MSG::hex << p[i] << MSG::dec 
-			  << " " << MSG::hex << decoded << MSG::dec << endmsg;
-	if (decoded<0x4) msg(MSG::INFO) << "Unexpected word WHEN looking for errors in pad fragment ---- word " << i <<" = "<< MSG::hex << p[i] << MSG::dec 
-			  << " " << MSG::hex << decoded << MSG::dec << endmsg;
-
-	*/
-
       } // end of if is pad fragment or pad header
         
     } // end of word scan 
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx
index 608201c7d3c7a82d11c1d45ad3b00db46853b7c8..37410b153379def497d8ab076364a499c63328aa 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataTool.cxx
@@ -39,7 +39,7 @@ StatusCode Muon::RpcRdoToPrepDataTool::manageOutputContainers(bool& firstTimeInT
   if(!rpcPrepDataHandle.isPresent()) {
     firstTimeInTheEvent = true;
 
-    StatusCode status = rpcPrepDataHandle.record(std::make_unique<Muon::RpcPrepDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
+    StatusCode status = rpcPrepDataHandle.record(std::make_unique<Muon::RpcPrepDataContainer>(m_idHelperSvc->rpcIdHelper().module_hash_max()));
 
     if (status.isFailure() || !rpcPrepDataHandle.isValid() ) 	{
       ATH_MSG_FATAL("Could not record container of RPC PrepData Container at " << m_rpcPrepDataContainerKey.key());
@@ -52,7 +52,7 @@ StatusCode Muon::RpcRdoToPrepDataTool::manageOutputContainers(bool& firstTimeInT
     if (m_producePRDfromTriggerWords){
       /// create an empty RPC trigger hit container for filling
       SG::WriteHandle< Muon::RpcCoinDataContainer > rpcCoinDataHandle(m_rpcCoinDataContainerKey);
-      status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
+      status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(m_idHelperSvc->rpcIdHelper().module_hash_max()));
 
       if (status.isFailure() || !rpcCoinDataHandle.isValid() ) 	{
         ATH_MSG_FATAL("Could not record container of RPC TrigCoinData Container at " << m_rpcCoinDataContainerKey.key());
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.cxx
index 1f1bf06df50bba8d0452ac1a1f528aa4d3dd08c5..17d231fabc9da67b5db9e49640c5aab043c2e2e1 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.cxx
@@ -2,34 +2,19 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-
 #include "RpcRdoToPrepDataToolCore.h"
 
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
-
 #include "RPCcablingInterface/IRPCcablingServerSvc.h"
 #include "RPCcablingInterface/IRPCcablingSvc.h"
 #include "RPCcablingInterface/CablingRPCBase.h"
-#include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
-
 #include "RPCcablingInterface/RpcPadIdHash.h"
-#include "AthenaKernel/IOVSvcDefs.h"
-
-
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 #include "MuonTrigCoinData/RpcCoinDataContainer.h"
-
 #include "TrkSurfaces/Surface.h"
- 
 #include "MuonCnvToolInterfaces/IDC_Helper.h"
-
 #include "GaudiKernel/ThreadLocalContext.h"
-
-// BS access 
-//#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
-
-//Muon cool db access
 #include "MuonCondInterface/IRPCConditionsSvc.h"
 
 #include <fstream>
@@ -40,12 +25,8 @@ using namespace Trk;
 
 /////////////////////////////////////////////////////////////////////////////
 
-Muon::RpcRdoToPrepDataToolCore::RpcRdoToPrepDataToolCore( const std::string& type, const std::string& name,
-						  const IInterface* parent ) 
-  : AthAlgTool( type, name, parent ),
-    //m_factor(0.0),
-    //m_rpcOffset(0),
-    //m_print_prepData(0),                  //!< if 1 write a summary at the collections found
+Muon::RpcRdoToPrepDataToolCore::RpcRdoToPrepDataToolCore( const std::string& type, const std::string& name, const IInterface* parent ) :
+    AthAlgTool( type, name, parent ),
     m_etaphi_coincidenceTime(0.),         //!< time for phi*eta coincidence 
     m_overlap_timeTolerance(0.),          //!< tolerance of the timing calibration 
     m_processingData(false),              //!< data or MC 
@@ -56,8 +37,6 @@ Muon::RpcRdoToPrepDataToolCore::RpcRdoToPrepDataToolCore( const std::string& typ
     m_timeShift(0.),                      //!< any global time shift ?!
     m_decodeData(true),                   //!< toggle on/off the decoding of RPC RDO into RpcPrepData
     m_muonMgr(nullptr),
-    m_rpcCabling(nullptr),
-    //m_padHashIdHelper(0),
     m_rpcRdoDecoderTool("Muon::RpcRDO_Decoder", this),
     m_fullEventDone(false)
 {
@@ -102,81 +81,53 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::initialize() {
 
   // perform necessary one-off initialization
 
-  msg (MSG::INFO) <<"package version = "<<PACKAGE_VERSION<<endmsg;
+  ATH_MSG_INFO("package version = "<<PACKAGE_VERSION);
 
-  msg (MSG::INFO) <<"properties are "<<endmsg;
-  msg (MSG::INFO) <<"processingData                     "<<m_processingData <<endmsg;
-  msg (MSG::INFO) <<"produceRpcCoinDatafromTriggerWords "<<m_producePRDfromTriggerWords <<endmsg;
-  msg (MSG::INFO) <<"reduceCablingOverlap               "<<m_reduceCablingOverlap <<endmsg;
-  msg (MSG::INFO) <<"solvePhiAmbiguities                "<<m_solvePhiAmbiguities  <<endmsg;
-  msg (MSG::INFO) <<"timeShift                          "<<m_timeShift  <<endmsg;
+  ATH_MSG_INFO("properties are ");
+  ATH_MSG_INFO("processingData                     "<<m_processingData);
+  ATH_MSG_INFO("produceRpcCoinDatafromTriggerWords "<<m_producePRDfromTriggerWords);
+  ATH_MSG_INFO("reduceCablingOverlap               "<<m_reduceCablingOverlap);
+  ATH_MSG_INFO("solvePhiAmbiguities                "<<m_solvePhiAmbiguities );
+  ATH_MSG_INFO("timeShift                          "<<m_timeShift);
   if (m_solvePhiAmbiguities && (!m_reduceCablingOverlap)) {
-    msg (MSG::WARNING) << "Inconsistent setting of properties (solvePhiAmbiguities entails reduceCablingOverlap)"<<endmsg;
-    msg (MSG::WARNING) << "Resetting reduceCablingOverlap to true "<<endmsg;
+    ATH_MSG_WARNING("Inconsistent setting of properties (solvePhiAmbiguities entails reduceCablingOverlap)");
+    ATH_MSG_WARNING("Resetting reduceCablingOverlap to true");
     m_reduceCablingOverlap  = true;
   }
-  msg (MSG::INFO) <<"etaphi_coincidenceTime             "<<m_etaphi_coincidenceTime<<endmsg;
-  msg (MSG::INFO) <<"overlap_timeTolerance              "<<m_overlap_timeTolerance <<endmsg;
-  msg (MSG::INFO) <<"Correct prd time from cool db      "<<m_RPCInfoFromDb         <<endmsg;
-  
-  StatusCode sc;
-  
+  ATH_MSG_INFO("etaphi_coincidenceTime             "<<m_etaphi_coincidenceTime);
+  ATH_MSG_INFO("overlap_timeTolerance              "<<m_overlap_timeTolerance );
+  ATH_MSG_INFO("Correct prd time from cool db      "<<m_RPCInfoFromDb         );
+    
   /// get the detector descriptor manager
-  sc = detStore()->retrieve( m_muonMgr );
-  if (sc.isFailure()) {
-    msg (MSG::FATAL) << " Cannot retrieve the MuonDetectorManager " << endmsg;
-    return sc;
-  }
-  else ATH_MSG_VERBOSE(" MuonDetectorManager retrieved");
-  
+  ATH_CHECK(detStore()->retrieve(m_muonMgr));
+  ATH_MSG_VERBOSE("MuonDetectorManager retrieved");
   
   // Get RpcRdoDecoderTool
-  ATH_CHECK( m_rpcRdoDecoderTool.retrieve() );  
+  ATH_CHECK(m_rpcRdoDecoderTool.retrieve());  
+
+  ATH_CHECK(m_idHelperSvc.retrieve());
+
+  ATH_CHECK(m_rpcReadKey.initialize());
 
-  /// init muonidhelpertool 
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
-  // get here the pad id helper 
-  //m_padHashIdHelper = new RpcPadIdHash();
-  
   // get RPC cablingSvc
-  const IRPCcablingServerSvc* RpcCabGet = 0;
-  sc = service("RPCcablingServerSvc", RpcCabGet);
-  if (sc.isFailure()) {
-    msg (MSG::FATAL) << "Could not get RPCcablingServerSvc !" << endmsg;
-    return StatusCode::FAILURE;
-  }
-  else ATH_MSG_VERBOSE(" RPCcablingServerSvc retrieved");
-  
-  sc = RpcCabGet->giveCabling(m_rpcCabling);
-  if (sc.isFailure()) {
-    msg (MSG::FATAL) << "Could not get RPCcablingSvc from the Server !" << endmsg;
-    m_rpcCabling = 0;
-    return StatusCode::FAILURE;
-  } 
-  else {
-    //ATH_MSG_VERBOSE(" RPCcablingSvc obtained ");
-    msg (MSG::VERBOSE) << "RPCcablingSvc obtained: " << (dynamic_cast<const Service*>(m_rpcCabling))->name() << endmsg;
-  }
-  
+  const IRPCcablingServerSvc* RpcCabGet = nullptr;
+  ATH_CHECK(service("RPCcablingServerSvc", RpcCabGet));
+  ATH_MSG_VERBOSE(" RPCcablingServerSvc retrieved");
+  ATH_CHECK(RpcCabGet->giveCabling(m_rpcCabling));
+  ATH_MSG_VERBOSE("RPCcablingSvc obtained: " << (dynamic_cast<const Service*>(m_rpcCabling))->name());
   std::string svcName=m_rpcCabling->rpcCabSvcType();
-  
-  msg(MSG::INFO)<<"Rpc Cabling Svc name is "<<svcName<<endmsg;
-  
+  ATH_MSG_VERBOSE("Rpc Cabling Svc name is "<<svcName);
   // LBTAG 29/01/10: case RPCcabling or RPCcablingSim
   if (svcName.find("sim")!=std::string::npos) {
     // LBTAG 29/01/10: case RPCcabling
     if (svcName.find("simulationLikeInitialization")!=std::string::npos) m_processingData = true;
-    
     // LBTAG 29/01/10: case MuonRPC_Cabling maps from files
     else if (svcName.find("simLike_MapsFromFiles")!=std::string::npos) m_processingData = true;
-    
     // LBTAG 29/01/10: case RPCcablingSim
     else m_processingData = false;
   }
-
   // LBTAG 29/01/10: case MuonRPC_Cabling maps from COOL
-  else 
-  {
+  else {
     //Data-Style Cabling Svc 
     m_processingData = true;
   }
@@ -185,21 +136,15 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::initialize() {
   ATH_CHECK(m_readKey.initialize(m_RPCInfoFromDb));
 
   // check if initializing of DataHandle objects success
-  ATH_CHECK( m_rdoContainerKey.initialize() );
+  ATH_CHECK(m_rdoContainerKey.initialize());
 
-  ATH_CHECK( m_rpcPrepDataContainerKey.initialize() );
+  ATH_CHECK(m_rpcPrepDataContainerKey.initialize());
 
-  ATH_CHECK( m_rpcCoinDataContainerKey.initialize() );
+  ATH_CHECK(m_rpcCoinDataContainerKey.initialize());
    
   return StatusCode::SUCCESS;
 }
 
-//___________________________________________________________________________
-StatusCode Muon::RpcRdoToPrepDataToolCore::finalize()
-{   
-  return StatusCode::SUCCESS;
-}
-
 //___________________________________________________________________________
 StatusCode Muon::RpcRdoToPrepDataToolCore::decode( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& idWithDataVect )
 {
@@ -247,10 +192,9 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( std::vector<IdentifierHash>&
     } else {
       ATH_MSG_DEBUG(idVectToBeDecoded.size() << " offline collections have not yet been decoded and will be decoded now.");
       if (msgLvl(MSG::VERBOSE)) {
-        msg(MSG::VERBOSE) << "The list of offline collection hash ids to be decoded: ";
+        ATH_MSG_VERBOSE("The list of offline collection hash ids to be decoded:");
         for (auto itHashId=idVectToBeDecoded.begin(); itHashId!=idVectToBeDecoded.end(); ++itHashId)
-          msg(MSG::VERBOSE) << (int)*itHashId << " ";
-        msg(MSG::VERBOSE) << endmsg;
+          ATH_MSG_VERBOSE((int)*itHashId << " ");
       }
     }
   }
@@ -263,20 +207,23 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( std::vector<IdentifierHash>&
   }
 
   ATH_MSG_DEBUG("Decoding RPC RDO into RPC PrepRawData");
+
+  SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+  const RpcCablingCondData* rpcCabling{*cablingCondData};
   
   // if the vector requested has size 0, we need to perform a scan of the entire RDO container
   // otherwise select the pads to be decoded
   std::vector<IdentifierHash> rdoHashVec;
   if (sizeVectorRequested != 0) {
     ATH_MSG_DEBUG("Looking for pads IdHash to be decoded for the requested collection Ids");
-    StatusCode sc = m_rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec);
+    StatusCode sc = rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec);
     if (StatusCode::SUCCESS != sc) return sc; //!< fix me - define a SW type of error 
   }
   
   /// RPC context
-  IdContext rpcContext = m_muonIdHelperTool->rpcIdHelper().module_context();
+  IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
   
-  // we come here if the rdo container is already in SG (for example in MC RDO!) => the ContainerManager return NULL
+  // we come here if the rdo container is already in SG (for example in MC RDO!)
   ATH_MSG_DEBUG("Retrieving Rpc PAD container from the store");
   auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey);
   if (!rdoContainerHandle.isValid()) {
@@ -305,8 +252,8 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( std::vector<IdentifierHash>&
     int nEtaPrepRawData =0;
     if (processingphiview) m_ambiguousCollections.clear();
     if (msgLvl(MSG::DEBUG)) {
-      if (processingetaview) msg (MSG::DEBUG) <<"*** Processing eta view "<<endmsg;
-      else msg (MSG::DEBUG) <<"*** Processing phi view "<<endmsg;
+      if (processingetaview) ATH_MSG_DEBUG("*** Processing eta view ");
+      else ATH_MSG_DEBUG("*** Processing phi view ");
     }
     
     const RpcPad* rdoColl;
@@ -369,16 +316,15 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( std::vector<IdentifierHash>&
         //loop again for unrequested collections stored with ambiguous phi hits
         m_doingSecondLoopAmbigColls=true;
         processingetaview=true;
-        if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << m_ambiguousCollections.size() << " ambiguous collections were stored: ";
+        if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG(m_ambiguousCollections.size() << " ambiguous collections were stored:");
         idVectToBeDecoded.clear();
         rdoHashVec.clear();
         for (auto itAmbiColl = m_ambiguousCollections.begin(); itAmbiColl != m_ambiguousCollections.end(); ++itAmbiColl) {
-          if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << (int)*itAmbiColl << " ";
+          if (msgLvl(MSG::DEBUG)) ATH_MSG_DEBUG((int)*itAmbiColl << " ");
           idVectToBeDecoded.push_back(*itAmbiColl);
           m_decodedOfflineHashIds.insert(*itAmbiColl);
         }
-        if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << endmsg;
-        StatusCode sc = m_rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec);
+        StatusCode sc = rpcCabling->giveRDO_fromPRD(idVectToBeDecoded, rdoHashVec);
         if (StatusCode::SUCCESS != sc) return sc;
       }
     }
@@ -400,12 +346,12 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( std::vector<IdentifierHash>&
       if (!(*rpcColli)->empty()) {	
 	temIdWithDataVect.push_back(*ii);
 	ATH_MSG_VERBOSE("Accepting non empty coll. "
-			<<m_muonIdHelperTool->rpcIdHelper().show_to_string((*rpcColli)->identify())
+			<<m_idHelperSvc->rpcIdHelper().show_to_string((*rpcColli)->identify())
 			<<" hash = "<<(int)*ii<<" in PREPDATA container at "<<m_rpcPrepDataContainer);
       }
       else {	
 	ATH_MSG_DEBUG("Removing from the rpc prep data container empty coll. "
-		      <<m_muonIdHelperTool->rpcIdHelper().show_to_string((*rpcColli)->identify())
+		      <<m_idHelperSvc->rpcIdHelper().show_to_string((*rpcColli)->identify())
 		      <<" hash = "<<(int)*ii<<" in PREPDATA container at "<<m_rpcPrepDataContainer);
 	delete m_rpcPrepDataContainer->removeCollection(*ii); // from Scott Snyder #43275 // fix mem.leak
       }            
@@ -471,14 +417,16 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( const std::vector<uint32_t>&
   } else {
     ATH_MSG_DEBUG(robIdsToBeDecoded.size() << " ROBs have not yet been decoded and will be decoded now.");
       if (msgLvl(MSG::VERBOSE)) {
-        msg(MSG::VERBOSE) << "The list of ROB Ids to be decoded: ";
-        for (uint32_t robid : robIdsToBeDecoded) msg(MSG::VERBOSE) << "0x" << MSG::hex << robid << MSG::dec << " ";
-        msg(MSG::VERBOSE) << endmsg;
+        ATH_MSG_VERBOSE("The list of ROB Ids to be decoded:");
+        for (uint32_t robid : robIdsToBeDecoded) ATH_MSG_VERBOSE("0x" << MSG::hex << robid << MSG::dec << " ");
       }
   }
+
+  SG::ReadCondHandle<RpcCablingCondData> cablingCondData{m_rpcReadKey, Gaudi::Hive::currentContext()};
+  const RpcCablingCondData* rpcCabling{*cablingCondData};
   
   //if all robs will be decoded after the current execution of the method, set the flag m_fullEventDone
-  if (m_decodedRobIds.size() == m_rpcCabling->giveFullListOfRobIds().size()) m_fullEventDone=true;
+  if (m_decodedRobIds.size() == rpcCabling->giveFullListOfRobIds().size()) m_fullEventDone=true;
   
   // if RPC decoding is switched off stop here
   if( !m_decodeData ) {
@@ -490,9 +438,9 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( const std::vector<uint32_t>&
   ATH_MSG_DEBUG("Decoding RPC RDO into RPC PrepRawData");
   
   /// RPC context
-  IdContext rpcContext = m_muonIdHelperTool->rpcIdHelper().module_context();
+  IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
 
-  // we come here if the rdo container is already in SG (for example in MC RDO!) => the ContainerManager return NULL
+  // we come here if the rdo container is already in SG (for example in MC RDO!)
   ATH_MSG_DEBUG("Retrieving Rpc PAD container from the store");
   auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey);
   if (!rdoContainerHandle.isValid()) {
@@ -513,7 +461,7 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( const std::vector<uint32_t>&
   // obtain a list of PADs (RDOs) to be processed
   std::vector<IdentifierHash> rdoHashVec;
   rdoHashVec.reserve(13*robIdsToBeDecoded.size()); // most ROBs have 13 RDOs, some have less
-  CHECK( m_rpcCabling->giveRDO_fromROB(robIdsToBeDecoded, rdoHashVec) );
+  ATH_CHECK(rpcCabling->giveRDO_fromROB(robIdsToBeDecoded, rdoHashVec) );
   
   std::vector<IdentifierHash> idVect; //vector passed to processPad - if empty, turns off decoding of additional RDOs for ambiguity solving
   std::vector<IdentifierHash> idWithDataVect; //vector passed to processPad - filled with IDs of created PrepRawData collections
@@ -588,13 +536,13 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( const std::vector<uint32_t>&
       if (!(*rpcColli)->empty()) {
         temIdWithDataVect.push_back(hashId);
         ATH_MSG_VERBOSE("Accepting non empty coll. "
-                     << m_muonIdHelperTool->rpcIdHelper().show_to_string((*rpcColli)->identify())
+                     << m_idHelperSvc->rpcIdHelper().show_to_string((*rpcColli)->identify())
                      << " hashId = " << (unsigned int)hashId
                      << " in PREPDATA container at " << m_rpcPrepDataContainer);
       }
       else {
         ATH_MSG_DEBUG("Removing from the rpc prep data container empty coll. "
-                   << m_muonIdHelperTool->rpcIdHelper().show_to_string((*rpcColli)->identify())
+                   << m_idHelperSvc->rpcIdHelper().show_to_string((*rpcColli)->identify())
                    << " hashId = " << (unsigned int)hashId
                    << " in PREPDATA container at " << m_rpcPrepDataContainer);
         delete m_rpcPrepDataContainer->removeCollection(hashId);
@@ -624,11 +572,11 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::decode( const std::vector<uint32_t>&
 //___________________________________________________________________________
 void Muon::RpcRdoToPrepDataToolCore::printInputRdo()
 {
-  msg (MSG::INFO) << "********************************************************************************************************" << endmsg;
-  msg (MSG::INFO) << "***************** Listing RpcPad Collections --- i.e. input RDO ****************************************" << endmsg;
+  ATH_MSG_INFO( "********************************************************************************************************");
+  ATH_MSG_INFO( "***************** Listing RpcPad Collections --- i.e. input RDO ****************************************");
   
   /// RPC context
-  IdContext rpcContext = m_muonIdHelperTool->rpcIdHelper().module_context();
+  IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
   /// RPC RDO container --- assuming it is available
   ATH_MSG_DEBUG("Retrieving Rpc PAD container from the store");
   auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey);
@@ -637,13 +585,13 @@ void Muon::RpcRdoToPrepDataToolCore::printInputRdo()
     return ;                                        
   }                                                                 
 
-  if (rdoContainerHandle->size() <= 0)msg (MSG::INFO) << "No RpcPad collections found" << endmsg;
+  if (rdoContainerHandle->size() <= 0) ATH_MSG_INFO("No RpcPad collections found");
   
   int ncoll = 0;
   int ictphi = 0;
   int icteta = 0;
   int icttrg = 0;
-  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
   
   int ipad = 0;
   const RpcPad * rdoColl;
@@ -659,10 +607,10 @@ void Muon::RpcRdoToPrepDataToolCore::printInputRdo()
 		 <<" # of CM inside is "<< rdoColl->size());
     IdentifierHash rpcHashId = rdoColl->identifyHash();
     Identifier rdoId;
-    int  code = m_muonIdHelperTool->rpcIdHelper().get_id(rpcHashId, rdoId, &rpcContext);
+    int  code = m_idHelperSvc->rpcIdHelper().get_id(rpcHashId, rdoId, &rpcContext);
     if  (code != 0) 
-      msg (MSG::INFO) <<" A problem in hash -> id conversion for hashId= "<<(int)rpcHashId<<endmsg;
-    std::string extIdstring = m_muonIdHelperTool->rpcIdHelper().show_to_string(rdoId);
+      ATH_MSG_INFO(" A problem in hash -> id conversion for hashId= "<<(int)rpcHashId);
+    std::string extIdstring = m_idHelperSvc->rpcIdHelper().show_to_string(rdoId);
     ATH_MSG_INFO("*** Offine HashId = "<<static_cast<unsigned int>(rpcHashId)<<" extended = "<<extIdstring);
 
     // For each pad, loop on the coincidence matrices
@@ -680,31 +628,20 @@ void Muon::RpcRdoToPrepDataToolCore::printInputRdo()
       // Get CM online Id
       uint16_t cmaId = (*itCM)->onlineId();
       if (cmaId<4) {
-	//    msg (MSG::INFO) << " low pt ";
 	if (cmaId<2) {    
 	  etaview = true;
 	  if (m_processingData) {
 	    etaview = false;
 	  }
-	  //        msg (MSG::INFO) << " eta view = "<<etaview<<endmsg;
-	}
-	
-	else {
-	  //msg (MSG::INFO) << " eta view = "<<etaview<<endmsg;
 	}
       }
       else {
-	//msg (MSG::INFO) << " high pt ";
 	highPtCm = true;
 	if (cmaId<6) {
 	  etaview = true;
 	  if (m_processingData) {
 	    etaview = false;
 	  }
-	  //msg (MSG::INFO) << " eta view = "<<etaview<<endmsg;
-	}
-	else {
-	  //msg (MSG::INFO) << " eta view = "<<etaview<<endmsg;
 	}
       }
       ATH_MSG_INFO("*** CM online Id "
@@ -716,19 +653,15 @@ void Muon::RpcRdoToPrepDataToolCore::printInputRdo()
       RpcCoinMatrix::const_iterator itD_e = (*itCM)->end();
       int idata = 0;
       if (itD == itD_e) {
-	msg (MSG::INFO) << "Empty CM"<<endmsg;
+	ATH_MSG_INFO( "Empty CM");
       }
       for (; itD != itD_e ; ++itD) {
 	idata++;
 	
 	const RpcFiredChannel * rpcChan = (*itD);
-	if (msgLvl(MSG::INFO)) {
-	  msg (MSG::INFO) <<"***** RpcFiredChannel: bcid "<<rpcChan->bcid()<<" time "
-			  <<rpcChan->time()<<" ijk "<<rpcChan->ijk();
-	  if (rpcChan->ijk()<7)  msg() <<" ch "<<rpcChan->channel();
-	  msg() <<endmsg;
+	  ATH_MSG_INFO("***** RpcFiredChannel: bcid "<<rpcChan->bcid()<<" time " <<rpcChan->time()<<" ijk "<<rpcChan->ijk());
+	  if (rpcChan->ijk()<7) ATH_MSG_INFO(" ch "<<rpcChan->channel());
 	  if (rpcChan->ijk()==6) ++ictrg;
-	}
       }// end loop over hits 
     }// end loop over CM
     icttrg += ictrg;
@@ -736,21 +669,20 @@ void Muon::RpcRdoToPrepDataToolCore::printInputRdo()
     icteta += iceta;
   }//end loop over pads
   ncoll = ipad;
-  msg (MSG::INFO) <<"*** Event  Summary: "
+  ATH_MSG_INFO("*** Event  Summary: "
 		  <<ncoll <<" Collections / "
 		  <<icttrg<<" trigger hits / "
 		  <<ictphi<<" phi hits / "
-		  <<icteta<<" eta hits "<<endmsg;
-  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+		  <<icteta<<" eta hits ");
+  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
 }
 
 void Muon::RpcRdoToPrepDataToolCore::printPrepData()
 {
-  msg (MSG::INFO) << "********************************************************************************************************" << endmsg;
-  msg (MSG::INFO) << "***************** Listing RpcPrepData collections content **********************************************" << endmsg;
+  ATH_MSG_INFO( "********************************************************************************************************");
+  ATH_MSG_INFO( "***************** Listing RpcPrepData collections content **********************************************");
   
-  if (m_rpcPrepDataContainer->size() <= 0)msg (MSG::INFO) << "No RpcPrepRawData collections found" << endmsg;
-  //else msg (MSG::INFO) << "Number of RpcPrepRawData collections found in this event is "<< << endmsg;
+  if (m_rpcPrepDataContainer->size() <= 0) ATH_MSG_INFO( "No RpcPrepRawData collections found");
   
   int ncoll = 0;
   int ict = 0;
@@ -758,30 +690,22 @@ void Muon::RpcRdoToPrepDataToolCore::printPrepData()
   int ictamb = 0;
   int icteta = 0;
   int icttrg = 0;
-  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
   for (IdentifiableContainer<Muon::RpcPrepDataCollection>::const_iterator rpcColli = m_rpcPrepDataContainer->begin();
        rpcColli!=m_rpcPrepDataContainer->end(); ++rpcColli) {
 
     const Muon::RpcPrepDataCollection* rpcColl = *rpcColli;
         
     if ( rpcColl->size() > 0 ) {
-      msg (MSG::INFO) <<"PrepData Collection ID "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(rpcColl->identify())<<endmsg;
+      ATH_MSG_INFO("PrepData Collection ID "<<m_idHelperSvc->rpcIdHelper().show_to_string(rpcColl->identify()));
       RpcPrepDataCollection::const_iterator it_rpcPrepData;
       int icc = 0;
       int iccphi = 0;
       int icceta = 0;
-      //            int icctrg = 0;
       for (it_rpcPrepData=rpcColl->begin(); it_rpcPrepData != rpcColl->end(); it_rpcPrepData++) {
 	icc++;
-	ict++;
-	//                 if ((*it_rpcPrepData)->triggerInfo() > 0) 
-	//                 {
-	//                     icctrg++;
-	//                     icttrg++;
-	//                 }
-	//                 else
-	//                 {                    
-	if (m_muonIdHelperTool->rpcIdHelper().measuresPhi((*it_rpcPrepData)->identify())) {
+	ict++;             
+	if (m_idHelperSvc->rpcIdHelper().measuresPhi((*it_rpcPrepData)->identify())) {
 	  iccphi++;
 	  ictphi++;
 	  if ((*it_rpcPrepData)->ambiguityFlag()>1) ictamb++;
@@ -790,26 +714,24 @@ void Muon::RpcRdoToPrepDataToolCore::printPrepData()
 	  icceta++;
 	  icteta++;
 	}                    
-	//                 }
-	msg (MSG::INFO) <<ict<<" in this coll. "<<icc<<" prepData id = "
-			<<m_muonIdHelperTool->rpcIdHelper().show_to_string((*it_rpcPrepData)->identify())
+	ATH_MSG_INFO(ict<<" in this coll. "<<icc<<" prepData id = "
+			<<m_idHelperSvc->rpcIdHelper().show_to_string((*it_rpcPrepData)->identify())
 			<<" time "<<(*it_rpcPrepData)->time()/*<<" triggerInfo "<<(*it_rpcPrepData)->triggerInfo()*/
-			<<" ambiguityFlag "<<(*it_rpcPrepData)->ambiguityFlag()<<endmsg;
+			<<" ambiguityFlag "<<(*it_rpcPrepData)->ambiguityFlag());
       }
       ncoll++;
-      msg (MSG::INFO) <<"*** Collection "<<ncoll<<" Summary: "
-	//                <<icctrg<<" trigger hits / "
+      ATH_MSG_INFO("*** Collection "<<ncoll<<" Summary: "
 		      <<iccphi<<" phi hits / "
-		      <<icceta<<" eta hits "<<endmsg;
-      msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+		      <<icceta<<" eta hits ");
+      ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
     }
   }
-  msg (MSG::INFO) <<"*** Event  Summary: "
+  ATH_MSG_INFO("*** Event  Summary: "
 		  <<ncoll <<" Collections / "
 		  <<icttrg<<" trigger hits / "
 		  <<ictphi<<" phi hits / "
-		  <<icteta<<" eta hits "<<endmsg;
-  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+		  <<icteta<<" eta hits ");
+  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
   
   // and now coincidence data 
   printCoinData();
@@ -817,11 +739,10 @@ void Muon::RpcRdoToPrepDataToolCore::printPrepData()
 
 void Muon::RpcRdoToPrepDataToolCore::printCoinData()
 {
-  msg (MSG::INFO) << "********************************************************************************************************" << endmsg;
-  msg (MSG::INFO) << "***************** Listing RpcCoinData collections content **********************************************" << endmsg;
+  ATH_MSG_INFO("********************************************************************************************************");
+  ATH_MSG_INFO("***************** Listing RpcCoinData collections content **********************************************");
   
-  if (m_rpcCoinDataContainer->size() <= 0)msg (MSG::INFO) << "No RpcCoinData collections found" << endmsg;
-  //else msg (MSG::INFO) << "Number of RpcPrepRawData collections found in this event is "<< << endmsg;
+  if (m_rpcCoinDataContainer->size() <= 0) ATH_MSG_INFO("No RpcCoinData collections found");
   
   int ncoll = 0;
   int ict = 0;
@@ -831,14 +752,14 @@ void Muon::RpcRdoToPrepDataToolCore::printCoinData()
   int ictphihc = 0;
   int ictetalc = 0;
   int ictetahc = 0;
-  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
   for (IdentifiableContainer<Muon::RpcCoinDataCollection>::const_iterator rpcColli = m_rpcCoinDataContainer->begin();
        rpcColli!=m_rpcCoinDataContainer->end(); ++rpcColli) {
 
         const Muon::RpcCoinDataCollection* rpcColl = *rpcColli;
         
         if ( rpcColl->size() > 0 ) {	  
-	  msg (MSG::INFO) <<"CoinData Collection ID "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(rpcColl->identify())<<endmsg;
+	  ATH_MSG_INFO("CoinData Collection ID "<<m_idHelperSvc->rpcIdHelper().show_to_string(rpcColl->identify()));
 	  RpcCoinDataCollection::const_iterator it_rpcCoinData;
 	  int icc = 0;
 	  int iccphi = 0;
@@ -847,18 +768,10 @@ void Muon::RpcRdoToPrepDataToolCore::printCoinData()
 	  int iccetahc = 0;
 	  int iccphihc = 0;
 	  int iccetalc = 0;
-	  //            int icctrg = 0;
 	  for (it_rpcCoinData=rpcColl->begin(); it_rpcCoinData != rpcColl->end(); it_rpcCoinData++) {
 	    icc++;
-	    ict++;
-	    //                 if ((*it_rpcPrepData)->triggerInfo() > 0) 
-	    //                 {
-	    //                     icctrg++;
-	    //                     icttrg++;
-	    //                 }
-	    //                 else
-	    //                 {                    
-	    if (m_muonIdHelperTool->rpcIdHelper().measuresPhi((*it_rpcCoinData)->identify())) {
+	    ict++;              
+	    if (m_idHelperSvc->rpcIdHelper().measuresPhi((*it_rpcCoinData)->identify())) {
 	      
 	      iccphi++;
 	      ictphi++;
@@ -883,39 +796,34 @@ void Muon::RpcRdoToPrepDataToolCore::printCoinData()
 		ictetahc++;
 	      }
 	    }                    
-	    //                 }
-	    msg (MSG::INFO) <<ict<<" in this coll. "<<icc<<" coinData id = "
-			    <<m_muonIdHelperTool->rpcIdHelper().show_to_string((*it_rpcCoinData)->identify())
+	    ATH_MSG_INFO(ict<<" in this coll. "<<icc<<" coinData id = "
+			    <<m_idHelperSvc->rpcIdHelper().show_to_string((*it_rpcCoinData)->identify())
 			    <<" time "<<(*it_rpcCoinData)->time()<<" ijk = "<<(*it_rpcCoinData)->ijk()/*<<" triggerInfo "<<(*it_rpcPrepData)->triggerInfo()*/
 			    <<" cm/pad/sl ids = "
 			    <<(*it_rpcCoinData)->parentCmId()<<"/"<<(*it_rpcCoinData)->parentPadId()<<"/"<<(*it_rpcCoinData)->parentSectorId()<<"/"
 			    <<" isLowPtCoin/HighPtCoin/LowPtInputToHighPt "
-			    <<(*it_rpcCoinData)->isLowPtCoin() <<"/"<<(*it_rpcCoinData)->isHighPtCoin() <<"/"<<(*it_rpcCoinData)->isLowPtInputToHighPtCm() 
-			    <<endmsg;
+			    <<(*it_rpcCoinData)->isLowPtCoin() <<"/"<<(*it_rpcCoinData)->isHighPtCoin() <<"/"<<(*it_rpcCoinData)->isLowPtInputToHighPtCm());
 	  }
 	  ncoll++;
-	  msg (MSG::INFO) <<"*** Collection "<<ncoll<<" Summary: "
-	    //                <<icctrg<<" trigger hits / "
+	  ATH_MSG_INFO("*** Collection "<<ncoll<<" Summary: "
 			  <<iccphi<<" phi coin. hits / "
 			  <<icceta<<" eta coin. hits \n"
 			  <<iccphilc<<" phi lowPt / "
 			  <<iccphihc<<" phi highPt / "
 			  <<iccetalc<<" eta lowPt / "
-			  <<iccetahc<<" eta highPt coincidences  "
-			  <<endmsg;
-	  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+			  <<iccetahc<<" eta highPt coincidences");
+	  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
         }
   }
-  msg (MSG::INFO) <<"*** Event  Summary: "
+  ATH_MSG_INFO("*** Event  Summary: "
 		  <<ncoll <<" Collections / "
 		  <<ictphi<<" phi coin. hits / "
 		  <<icteta<<" eta coin. hits \n"
 		  <<ictphilc<<" phi lowPt / "
 		  <<ictphihc<<" phi highPt / "
 		  <<ictetalc<<" eta lowPt / "
-		  <<ictetahc<<" eta highPt coincidences  "
-		  <<endmsg;
-  msg (MSG::INFO) <<"--------------------------------------------------------------------------------------------"<<endmsg;
+		  <<ictetahc<<" eta highPt coincidences");
+  ATH_MSG_INFO("--------------------------------------------------------------------------------------------");
 }
 
 
@@ -1010,10 +918,9 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
       ATH_MSG_DEBUG("A new CM Hit "<<idata);
       const RpcFiredChannel * rpcChan = (*itD);
       if (msgLvl(MSG::DEBUG)) {
-	msg (MSG::DEBUG) <<"RpcFiredChannel: bcid "<<rpcChan->bcid()<<" time "
-			 <<rpcChan->time()<<" ijk "<<rpcChan->ijk();
-	if (rpcChan->ijk()<7)  msg() <<" ch "<<rpcChan->channel();
-	msg() <<endmsg;
+	ATH_MSG_DEBUG("RpcFiredChannel: bcid "<<rpcChan->bcid()<<" time "
+			 <<rpcChan->time()<<" ijk "<<rpcChan->ijk());
+	if (rpcChan->ijk()<7) ATH_MSG_DEBUG(" ch "<<rpcChan->channel());
       }
 
       // check if trigger hit             
@@ -1037,8 +944,8 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	m_rpcRdoDecoderTool->getOfflineData(rpcChan, sectorId, padId, cmaId, time);
       time += (double)m_timeShift;
       
-      if (digitVec==NULL) {
-	msg (MSG::ERROR) << "Error in the RPC RDO decoder " << endmsg;
+      if (!digitVec) {
+	ATH_MSG_WARNING("Error in the RPC RDO decoder ");
 	return StatusCode::RECOVERABLE;
       }
       
@@ -1054,10 +961,6 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
       // If all phi digits do not have a eta match, they will be all recorded as PrepRawData
       // in the second iteration (the ambiguity will remain unsolved)
       while (notFinished) {	
-	//                             m_log << MSG::VERBOSE
-	//                                 << "STARTOFWHILE - NotFinished = "<< notFinished
-	//                                 <<" unsolvedAmbiguity = "<<unsolvedAmbiguity<<" processingphiview "<<processingphiview
-	//                                 <<" digitVec of size "<<digitVec->size()<<endmsg;
 	// Loop on the digits corresponding to the fired channel
 	std::vector<Identifier>::iterator itVec   = digitVec->begin();
 	std::vector<Identifier>::iterator itVec_e = digitVec->end();
@@ -1073,29 +976,22 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	  // Prepare the prepdata for this identifier 
 	  // channel Id
 	  Identifier channelId = *itVec;
-	  Identifier parentId = m_muonIdHelperTool->rpcIdHelper().elementID(channelId);
-	  if (m_muonIdHelperTool->rpcIdHelper().get_hash(parentId, rpcHashId, &rpcContext)) {
-	    msg (MSG::ERROR) << "Unable to get RPC hash id from RPC collection " 
+	  Identifier parentId = m_idHelperSvc->rpcIdHelper().elementID(channelId);
+	  if (m_idHelperSvc->rpcIdHelper().get_hash(parentId, rpcHashId, &rpcContext)) {
+	    ATH_MSG_WARNING("Unable to get RPC hash id from RPC collection " 
 			     << "context begin_index = " << rpcContext.begin_index()
 			     << " context end_index  = " << rpcContext.end_index()
-			     << " the identifier is "
-			     << endmsg;
+			     << " the identifier is ");
 	    parentId.show();
 	  }
-	  // SS 14/10/2008 try this (doesn't change unseeded behaviour)
-	  //                     if ( !isRequested(idVect, rpcHashId) ) {
-	  //                         if (m_debug) m_log << MSG::DEBUG << "this offline identifier does not belong to the selection of collections requested - skip "<<endmsg;
-	  //                         continue;
-	  //                     }
-	  if ( msgLvl (MSG::DEBUG) ) {	    
-	    msg (MSG::DEBUG) << "CM Hit decoded into offline Id " 
-			     << m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId) 
-			     << " time "<<time<<endmsg; 
-	    msg (MSG::DEBUG) << "           Parent collection   " 
-			     << m_muonIdHelperTool->rpcIdHelper().show_to_string(parentId)
-			     << " oldID = "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(oldId)
-			     << " oldIDtrg = "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(oldIdTrg)
-			     << endmsg;
+	  if ( msgLvl(MSG::DEBUG) ) {	    
+	    ATH_MSG_DEBUG("CM Hit decoded into offline Id " 
+			     << m_idHelperSvc->rpcIdHelper().show_to_string(channelId) 
+			     << " time "<<time); 
+	    ATH_MSG_DEBUG("           Parent collection   " 
+			     << m_idHelperSvc->rpcIdHelper().show_to_string(parentId)
+			     << " oldID = "<<m_idHelperSvc->rpcIdHelper().show_to_string(oldId)
+			     << " oldIDtrg = "<<m_idHelperSvc->rpcIdHelper().show_to_string(oldIdTrg));
 	  }
 	  bool hasAMatchingEtaHit = 0;
 	  // current collection has Id "parentId"; get it from the container !
@@ -1103,23 +999,23 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	    if ( (oldIdTrg != parentId) || collectionTrg == 0 ) {
 	      // Get collection from IDC if it exists, or create it and add it if not.
 	      ATH_MSG_DEBUG(" Looking/Creating a collection with ID = "
-			    <<m_muonIdHelperTool->rpcIdHelper().show_to_string(parentId)<<" hash = "
+			    <<m_idHelperSvc->rpcIdHelper().show_to_string(parentId)<<" hash = "
 			    <<static_cast<unsigned int>(rpcHashId)<<" in COINDATA container at "<<m_rpcCoinDataContainer);
-	      collectionTrg = Muon::IDC_Helper::getCollection<RpcCoinDataContainer, RpcIdHelper>(parentId, m_rpcCoinDataContainer , m_muonIdHelperTool->rpcIdHelper(), msg());
-	      if ( collectionTrg ==0 ) msg (MSG::WARNING) <<"Failed to get/create RpcCoinData collection"<<endmsg;
+	      collectionTrg = Muon::IDC_Helper::getCollection<RpcCoinDataContainer, RpcIdHelper>(parentId, m_rpcCoinDataContainer , m_idHelperSvc->rpcIdHelper(), msg());
+	      if ( collectionTrg ==0 ) ATH_MSG_WARNING("Failed to get/create RpcCoinData collection");
 	      oldIdTrg = parentId;
-	      ATH_MSG_DEBUG(" Resetting oldIDtrg to current parentID = "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(oldIdTrg));
+	      ATH_MSG_DEBUG(" Resetting oldIDtrg to current parentID = "<<m_idHelperSvc->rpcIdHelper().show_to_string(oldIdTrg));
 	    }
 	  }
 	  else {
 	    if ( (oldId    != parentId) || collection    == 0 ) {	      
 	      // Get collection from IDC if it exists, or create it and add it if not.
 	      ATH_MSG_DEBUG(" Looking/Creating a collection with ID = "
-			    <<m_muonIdHelperTool->rpcIdHelper().show_to_string(parentId)<<" hash = "
+			    <<m_idHelperSvc->rpcIdHelper().show_to_string(parentId)<<" hash = "
 			    <<static_cast<unsigned int>(rpcHashId)<<" in PREPDATA container at "<<m_rpcPrepDataContainer);
 	      collection =	Muon::IDC_Helper::getCollection<RpcPrepDataContainer, RpcIdHelper>(parentId,
 										   		   m_rpcPrepDataContainer,
-										   		   m_muonIdHelperTool->rpcIdHelper(),
+										   		   m_idHelperSvc->rpcIdHelper(),
 										   		   msg() );
 	      if (collection) {                            
            bool alreadyRecorded = false;
@@ -1132,13 +1028,13 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
            if (!alreadyRecorded) {		  
              idWithDataVect.push_back(rpcHashId); // Record that this collection contains data                 
              ATH_MSG_DEBUG(" A new collection add to the RPC PrepData container with identifier "
-             <<m_muonIdHelperTool->rpcIdHelper().show_to_string(collection->identify()));
+             <<m_idHelperSvc->rpcIdHelper().show_to_string(collection->identify()));
            }
 	      }
-	      else msg (MSG::WARNING) <<"Failed to get/create RpcPrepData collection"<<endmsg;
+	      else ATH_MSG_WARNING("Failed to get/create RpcPrepData collection");
 	      oldId = parentId;
 	      ATH_MSG_DEBUG(" Resetting oldID to current parentID = "
-			    <<m_muonIdHelperTool->rpcIdHelper().show_to_string(oldId));
+			    <<m_idHelperSvc->rpcIdHelper().show_to_string(oldId));
 	    }
 	  }
           
@@ -1155,9 +1051,9 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	      int current_dbz   = 0;
 	      int current_gg    = 0;
 	      if (processingphiview) {		
-          current_dbphi = m_muonIdHelperTool->rpcIdHelper().doubletPhi(channelId);
-          current_dbz   = m_muonIdHelperTool->rpcIdHelper().doubletZ(channelId);
-          current_gg    = m_muonIdHelperTool->rpcIdHelper().gasGap(channelId);
+          current_dbphi = m_idHelperSvc->rpcIdHelper().doubletPhi(channelId);
+          current_dbz   = m_idHelperSvc->rpcIdHelper().doubletZ(channelId);
+          current_gg    = m_idHelperSvc->rpcIdHelper().gasGap(channelId);
           ATH_MSG_VERBOSE("Check also for eta hits matching dbz, dbphi, gg  "
             <<current_dbz<<" "<<current_dbphi<<" "<< current_gg);
 	      }
@@ -1170,7 +1066,7 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 		  hasAMatchingEtaHit = false; // we don't want to increment the number of strips with
 		  // a matching eta due to a cabling overlap 
 		  ATH_MSG_VERBOSE("Duplicated RpcPrepData(not recorded) = "
-				  << m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId));
+				  << m_idHelperSvc->rpcIdHelper().show_to_string(channelId));
 		  float previous_time = (*it_rpcPrepData)->time();
 		  // choose the smallest time within timeTolerance 
 		  if (time < previous_time) {		    
@@ -1184,16 +1080,16 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 		if (processingphiview) {
 		  if (solvePhiAmb_thisHit) {
 		    if (!unsolvedAmbiguity) {
-		      if (m_muonIdHelperTool->rpcIdHelper().measuresPhi( (*it_rpcPrepData)->identify() )==0) {
+		      if (m_idHelperSvc->rpcIdHelper().measuresPhi( (*it_rpcPrepData)->identify() )==0) {
 			// check if there's a eta hit in the same gap
 			// of the RPC module (doubletZ, doubletPhi, gg)
-			if (current_dbz == m_muonIdHelperTool->rpcIdHelper().doubletZ( (*it_rpcPrepData)->identify() ) ) {
-			  if (current_dbphi == m_muonIdHelperTool->rpcIdHelper().doubletPhi( (*it_rpcPrepData)->identify() ) ) {                                                    
-			    if (current_gg == m_muonIdHelperTool->rpcIdHelper().gasGap( (*it_rpcPrepData)->identify() ) ) {                                                        
+			if (current_dbz == m_idHelperSvc->rpcIdHelper().doubletZ( (*it_rpcPrepData)->identify() ) ) {
+			  if (current_dbphi == m_idHelperSvc->rpcIdHelper().doubletPhi( (*it_rpcPrepData)->identify() ) ) {                                                    
+			    if (current_gg == m_idHelperSvc->rpcIdHelper().gasGap( (*it_rpcPrepData)->identify() ) ) {                                                        
 			      if ( fabs(time - (*it_rpcPrepData)->time()) < m_etaphi_coincidenceTime ) {
 				hasAMatchingEtaHit = true;
 				ATH_MSG_VERBOSE("There's a matching eta hit with id "
-						<<m_muonIdHelperTool->rpcIdHelper().show_to_string((*it_rpcPrepData)->identify()));
+						<<m_idHelperSvc->rpcIdHelper().show_to_string((*it_rpcPrepData)->identify()));
 				//here there can be a break ? NO, we need to keep looping in order to check
 				// if this preprawdata has been already recorded (due to cabling overlaps)
 			      }
@@ -1217,11 +1113,10 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	  
 	  if (msgLvl(MSG::VERBOSE)) {	    
 	    if (solvePhiAmb_thisHit && (!etaview)) 
-	      msg (MSG::VERBOSE) 
-		<< "nMatchingEtaHits = "
+	      ATH_MSG_VERBOSE("nMatchingEtaHits = "
 		<<nMatchingEtaHits
 		<<" hasAMatchingEtaHit = "
-		<<hasAMatchingEtaHit<<endmsg;
+		<<hasAMatchingEtaHit);
 	  }
                     
 	  if (!duplicate) {
@@ -1255,31 +1150,30 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	      
 	      // here check validity
 	      // if invalid, reset flags
-	      if (descriptor == NULL) {
+	      if (!descriptor) {
 		hasAMatchingEtaHit = false;
 		duplicate          = false;
-		msg (MSG::WARNING) <<"Detector Element not found for Identifier from the cabling service <"
-				   <<m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId)<<">  =>>ignore this hit"<<endmsg;
+		ATH_MSG_WARNING("Detector Element not found for Identifier from the cabling service <"
+				   <<m_idHelperSvc->rpcIdHelper().show_to_string(channelId)<<">  =>>ignore this hit");
 		continue;
 	      }
 	      else if (!descriptor->containsId(channelId)) {
 		hasAMatchingEtaHit = false;
 		duplicate          = false;
-		if (m_muonIdHelperTool->rpcIdHelper().stationNameString(m_muonIdHelperTool->rpcIdHelper().stationName(channelId))=="BOG") 
+		if (m_idHelperSvc->rpcIdHelper().stationNameString(m_idHelperSvc->rpcIdHelper().stationName(channelId))=="BOG") 
 		  ATH_MSG_DEBUG("Identifier from the cabling service <"
-				<<m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId)<<"> inconsistent with the geometry of detector element <"
-				<<m_muonIdHelperTool->rpcIdHelper().show_to_string(descriptor->identify())<<">  =>>ignore this hit /// there are unmasked channels in BOG");
+				<<m_idHelperSvc->rpcIdHelper().show_to_string(channelId)<<"> inconsistent with the geometry of detector element <"
+				<<m_idHelperSvc->rpcIdHelper().show_to_string(descriptor->identify())<<">  =>>ignore this hit /// there are unmasked channels in BOG");
 		else
-		  msg (MSG::WARNING) <<"Identifier from the cabling service <"
-				     <<m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId)<<"> inconsistent with the geometry of detector element <"
-				     <<m_muonIdHelperTool->rpcIdHelper().show_to_string(descriptor->identify())<<">  =>>ignore this hit"<<endmsg;
+		  ATH_MSG_WARNING("Identifier from the cabling service <"
+				     <<m_idHelperSvc->rpcIdHelper().show_to_string(channelId)<<"> inconsistent with the geometry of detector element <"
+				     <<m_idHelperSvc->rpcIdHelper().show_to_string(descriptor->identify())<<">  =>>ignore this hit");
 		continue;
 	      }
               
 	      // 
 	      // Global position
 	      Amg::Vector3D tempGlobalPosition = descriptor->stripPos(channelId);
-	      //const Trk::GlobalPosition *globalPosition = new Trk::GlobalPosition(tempGlobalPosition);
 	      ATH_MSG_VERBOSE("RPC RDO->PrepRawdata: global position ("
 			      <<tempGlobalPosition.x()<<", "
 			      <<tempGlobalPosition.y()<<", "
@@ -1287,26 +1181,19 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	      // Local position
 	      Amg::Vector2D pointLocPos;
 	      descriptor->surface(channelId).globalToLocal(tempGlobalPosition,tempGlobalPosition,pointLocPos);
-	      //if (fabs(pointLocPos->y())>0.001) 
-	      //  std::cout<<" Local Position for id = "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId)
-	      //<<" is ("<<pointLocPos->x()<<",  "<<pointLocPos->y()<<")"<<std::endl;
-	      // the globalToLocal should not fail, if it does produce a WARNING
-	      
+
 	      // List of Digits in the cluster (self)
 	      std::vector<Identifier> identifierList;        
 	      identifierList.push_back(channelId);
 	      
 	      // width of the cluster (self) 
-	      float stripWidth   = descriptor->StripWidth( m_muonIdHelperTool->rpcIdHelper().measuresPhi(channelId) );
+	      float stripWidth   = descriptor->StripWidth( m_idHelperSvc->rpcIdHelper().measuresPhi(channelId) );
 	      
 	      // Error matrix
 	      double errPos      = stripWidth / sqrt(12.0);
-	      //CLHEP::HepSymMatrix mat = CLHEP::HepSymMatrix(1,1);
 	      Amg::MatrixX mat(1,1);
 	      mat.setIdentity();
 	      mat *= errPos*errPos;
-	      //Trk::CovarianceMatrix * cov = new Trk::CovarianceMatrix(mat);
-	      //const Trk::ErrorMatrix * errMat = new Trk::ErrorMatrix(cov);
 	      // check if this is a triggerINFO rather then a real hit
 	      // Create a new PrepData
 	      int ambiguityFlag = 0;
@@ -1345,13 +1232,11 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 							   ambiguityFlag,
 							   rpcChan->ijk(), threshold, overlap,
 							   cmaId, padId, sectorId,
-							   !(highPtCm));
-		//if (fabs(pointLocPos->y())>0.001) std::cout<<"NEW RPCCOINDATA with id, hash, descriptor "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId)<<" "<<(unsigned int)rpcHashId<<" "<<(long)descriptor<<std::endl;
-		
+							   !(highPtCm));		
 		
 		// record the new data in the collection     
 		ATH_MSG_DEBUG(" Adding RpcCoinData @ "<<newCoinData
-			      <<" to collection "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(collectionTrg->identify()));
+			      <<" to collection "<<m_idHelperSvc->rpcIdHelper().show_to_string(collectionTrg->identify()));
 		
 		newCoinData->setHashAndIndex(collectionTrg->identifyHash(), collectionTrg->size());
 		collectionTrg->push_back(newCoinData);
@@ -1359,10 +1244,7 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 	      else {		   
 		ATH_MSG_DEBUG("producing a new  RpcPrepData with "
 			      <<"ambiguityFlag = "
-			      <<ambiguityFlag);
-		
-		//std::cout<<" before creating the prd time = "<<time<<" (float)time = "<<(float)time<<std::endl;
-		  
+			      <<ambiguityFlag);		  
 		
 		RpcPrepData *newPrepData = new RpcPrepData(channelId,
 							   rpcHashId,
@@ -1371,13 +1253,11 @@ StatusCode Muon::RpcRdoToPrepDataToolCore::processPad(const RpcPad *rdoColl,
 							   new Amg::MatrixX(mat),
 							   descriptor,
 							   (float)time,
-							   ambiguityFlag);
-		//if (fabs(pointLocPos->y())>0.001) std::cout<<"NEW RPCPREPDATA with id, hash, descriptor "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(channelId)<<" "<<(unsigned int)rpcHashId<<" "<<(long)descriptor<<std::endl;
-		
+							   ambiguityFlag);		
 		
 		// record the new data in the collection     
 		ATH_MSG_DEBUG(" Adding digit @ "<<newPrepData
-			      <<" to collection "<<m_muonIdHelperTool->rpcIdHelper().show_to_string(collection->identify()));
+			      <<" to collection "<<m_idHelperSvc->rpcIdHelper().show_to_string(collection->identify()));
 		
 		newPrepData->setHashAndIndex(collection->identifyHash(), collection->size());
 		collection->push_back(newPrepData);
@@ -1449,18 +1329,16 @@ void Muon::RpcRdoToPrepDataToolCore::processTriggerHitHypothesis(RpcCoinMatrix::
       if (msgLvl(MSG::VERBOSE)) {
         cmtype    = " in low  pT CM ";
         if (highPtCm) cmtype = " in high pT CM ";
-        msg( MSG::VERBOSE ) 
-          <<"This hit: ijk = "<<rpcChan->ijk()<<cmtype<<" bcid is "<<rpcChan->bcid()
-          <<" time is "<<rpcChan->time()<<" ch "<<rpcChan->channel()<<endmsg;
+        ATH_MSG_VERBOSE("This hit: ijk = "<<rpcChan->ijk()<<cmtype<<" bcid is "<<rpcChan->bcid()
+          <<" time is "<<rpcChan->time()<<" ch "<<rpcChan->channel());
       }
       RpcCoinMatrix::const_iterator itDnext =   itD+1;
       while (itDnext != itD_end) {
         const RpcFiredChannel * rpcChanNext = (*itDnext);
         if (msgLvl(MSG::VERBOSE)) {
-          msg( MSG::VERBOSE ) 
-            <<"Next hit: ijk = "<<rpcChanNext->ijk()<<cmtype<<" bcid is "<<rpcChan->bcid()
-            <<" time is "<<rpcChanNext->time();
-          if (rpcChanNext->ijk()<7)  msg() <<" ch "<<rpcChanNext->channel()<<endmsg;
+          ATH_MSG_VERBOSE("Next hit: ijk = "<<rpcChanNext->ijk()<<cmtype<<" bcid is "<<rpcChan->bcid()
+            <<" time is "<<rpcChanNext->time());
+          if (rpcChanNext->ijk()<7) ATH_MSG_VERBOSE(" ch "<<rpcChanNext->channel());
         }
         if (rpcChanNext->ijk()==7) {        
           ATH_MSG_VERBOSE("next has ijk=7 ");
@@ -1470,7 +1348,7 @@ void Muon::RpcRdoToPrepDataToolCore::processTriggerHitHypothesis(RpcCoinMatrix::
             overlap   = rpcChanNext->ovl();
           }
           else {
-            msg( MSG::WARNING )<<"ijk =7 after a ijk = 6 BUT bdid/tick don't match - will not assign threshold/overlap "<<endmsg;
+            ATH_MSG_WARNING("ijk =7 after a ijk = 6 BUT bdid/tick don't match - will not assign threshold/overlap ");
           }
           break;
         }
@@ -1481,8 +1359,7 @@ void Muon::RpcRdoToPrepDataToolCore::processTriggerHitHypothesis(RpcCoinMatrix::
 	    //std::cout<<"next has ijk 6; try next to next"<<std::endl;
           }
           else {
-            msg( MSG::WARNING )
-              <<"RPC cm hit with ijk = 6 not followed by ijk = 6 or 7 - will not assign threshold / overlap"<<endmsg;
+            ATH_MSG_WARNING("RPC cm hit with ijk = 6 not followed by ijk = 6 or 7 - will not assign threshold / overlap");
             break;
           }       
         }
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.h
index ccb7f8e65cb2dc0a5e07ad63160f293e6c5dfcce..696a9260b00efb574a9a78b28cef57a5e642f6a8 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolCore.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 MUONRDOTOPREPDATA_RPCRDOTOPREPDATATOOLCORE_H
@@ -7,48 +7,34 @@
 
 #include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
 
+#include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/MsgStream.h"
-
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 #include "MuonTrigCoinData/RpcCoinDataContainer.h"
 #include "MuonCondData/RpcCondDbData.h"
-
 #include "MuonRDO/RpcCoinMatrix.h"
 #include "MuonRDO/RpcPadContainer.h"
-
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "MuonRPC_CnvTools/IRPC_RDO_Decoder.h"
+#include "RPC_CondCabling/RpcCablingCondData.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 #include <string>
 #include <set>
 
 #define maxOfflineHash 600 // actually 593
 
-//class IROBDataProviderSvc;
-
-
 namespace MuonGM
 {
   class MuonDetectorManager;
 }
 
 class IRPCcablingSvc;
-class RpcPadIdHash;
-class IdentifierHash;
-class RpcPad;
-class RpcPadContainer;
-class RpcCondDbData;
 
 namespace Muon {
 
-
-class IRPC_RDO_Decoder;
-    
-    
-    
 /////////////////////////////////////////////////////////////////////////////
 
 class RpcRdoToPrepDataToolCore : virtual public IMuonRdoToPrepDataTool, virtual public AthAlgTool {
@@ -61,7 +47,6 @@ public:
 
   // setup/teardown functions, similar like those for Algorithm/Service
   StatusCode initialize();
-  StatusCode finalize();
 
   // decoding method 
   StatusCode decode( std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& selectedIdVect );
@@ -89,12 +74,6 @@ protected:
                                    unsigned short& overlap,
                                    bool& toSkip);
 
-
-  //double m_factor;
-
-  // configurable options
-  //int   m_rpcOffset;                    //!< Identifier hash offset
-  //int   m_print_prepData;               //!< if 1 write a summary at the collections found
   float m_etaphi_coincidenceTime;       //!< time for phi*eta coincidence 
   float m_overlap_timeTolerance;        //!< tolerance of the timing calibration 
   bool  m_processingData;               //!< data or MC 
@@ -108,13 +87,9 @@ protected:
   // end of configurable options 
 
   /// Muon Detector Descriptor
-  const MuonGM::MuonDetectorManager * m_muonMgr;
+  const MuonGM::MuonDetectorManager* m_muonMgr;
   
-  /// RPC identifier helper
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
-  // RpcPadIdHash helper 
-  //RpcPadIdHash* m_padHashIdHelper;
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
  
   /// RpcPrepData containers
   Muon::RpcPrepDataContainer* m_rpcPrepDataContainer;
@@ -128,11 +103,11 @@ protected:
   /// RPC cabling Svc
   const IRPCcablingSvc *m_rpcCabling;
 
-//   // Rob Data Provider handle 
-//   ServiceHandle<IROBDataProviderSvc>          m_robDataProvider;
+  // Rob Data Provider handle 
   ToolHandle<Muon::IRPC_RDO_Decoder>         m_rpcRdoDecoderTool; 
 
   SG::ReadCondHandleKey<RpcCondDbData> m_readKey{this, "ReadKey", "RpcCondDbData", "Key of RpcCondDbData"};
+  SG::ReadCondHandleKey<RpcCablingCondData> m_rpcReadKey{this, "RpcCablingKey", "RpcCablingCondData", "Key of RpcCablingCondData"};
  
   //keepTrackOfFullEventDecoding
   bool m_fullEventDone;
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
index 09d90db716f397cb81ccd94e1d125896bc6fced8..7f096924aca5b545daadec849443fa3e8e785934 100755
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/src/RpcRdoToPrepDataToolMT.cxx
@@ -40,7 +40,7 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::manageOutputContainers(bool& firstTimeI
   if(!rpcPrepDataHandle.isPresent()) {
     firstTimeInTheEvent = true;
 
-    StatusCode status = rpcPrepDataHandle.record(std::make_unique<Muon::RpcPrepDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
+    StatusCode status = rpcPrepDataHandle.record(std::make_unique<Muon::RpcPrepDataContainer>(m_idHelperSvc->rpcIdHelper().module_hash_max()));
 
     if (status.isFailure() || !rpcPrepDataHandle.isValid() ) 	{
       ATH_MSG_FATAL("Could not record container of RPC PrepData Container at " << m_rpcPrepDataContainerKey.key());
@@ -53,7 +53,7 @@ StatusCode Muon::RpcRdoToPrepDataToolMT::manageOutputContainers(bool& firstTimeI
     if (m_producePRDfromTriggerWords){
       /// create an empty RPC trigger hit container for filling
       SG::WriteHandle< Muon::RpcCoinDataContainer > rpcCoinDataHandle(m_rpcCoinDataContainerKey);
-      status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(m_muonIdHelperTool->rpcIdHelper().module_hash_max()));
+      status = rpcCoinDataHandle.record(std::make_unique<Muon::RpcCoinDataContainer>(m_idHelperSvc->rpcIdHelper().module_hash_max()));
 
       if (status.isFailure() || !rpcCoinDataHandle.isValid() ) 	{
         ATH_MSG_FATAL("Could not record container of RPC TrigCoinData Container at " << m_rpcCoinDataContainerKey.key());
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx
index 0eb150e725ec45403b7fae140077e744416ba082..463ba003112d075c7076cb757356428c1ca47cd3 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.cxx
@@ -1,16 +1,9 @@
 /*
-  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 "MuonPRDCacheCreator.h"
 
-#include "MuonIdHelpers/MdtIdHelper.h"
-#include "MuonIdHelpers/CscIdHelper.h"
-#include "MuonIdHelpers/RpcIdHelper.h"
-#include "MuonIdHelpers/TgcIdHelper.h"
-#include "MuonIdHelpers/sTgcIdHelper.h"
-#include "MuonIdHelpers/MmIdHelper.h"
-
 #include "AthViews/View.h"
 
 /// Constructor
@@ -38,10 +31,6 @@ MuonPRDCacheCreator::MuonPRDCacheCreator(const std::string &name,ISvcLocator *pS
   declareProperty("DisableViewWarning", m_disableWarning);
 }
 
-MuonPRDCacheCreator::~MuonPRDCacheCreator() {
-
-}
-
 StatusCode MuonPRDCacheCreator::initialize() {
   ATH_CHECK( m_CscCacheKey.initialize( !m_CscCacheKey.key().empty() ));
   ATH_CHECK( m_CscStripCacheKey.initialize( !m_CscStripCacheKey.key().empty() ));
@@ -53,26 +42,25 @@ StatusCode MuonPRDCacheCreator::initialize() {
   ATH_CHECK( m_RpcCoinCacheKey.initialize( !m_RpcCoinCacheKey.key().empty() ));
   ATH_CHECK( m_TgcCoinCacheKey.initialize( !m_TgcCoinCacheKey.key().empty() ));
 
-  // Retrieve ID tools
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK(m_idHelperSvc.retrieve());
 
   // Check we have the tools to allow us to setup cache
-  if( !m_muonIdHelperTool->hasCscIdHelper() && !m_CscCacheKey.key().empty() ){
+  if( !m_idHelperSvc->hasCSC() && !m_CscCacheKey.key().empty() ){
     ATH_MSG_WARNING("CSC ID Helper is not available and CSC PRD cache was requested - This will not be created");
   } 
-  if( !m_muonIdHelperTool->hasMdtIdHelper() && !m_MdtCacheKey.key().empty() ){
+  if( !m_idHelperSvc->hasMDT() && !m_MdtCacheKey.key().empty() ){
     ATH_MSG_WARNING("MDT ID Helper is not available and MDT PRD cache was requested - This will not be created");
   }
-  if( !m_muonIdHelperTool->hasRpcIdHelper() && !m_RpcCacheKey.key().empty() ){
+  if( !m_idHelperSvc->hasRPC() && !m_RpcCacheKey.key().empty() ){
     ATH_MSG_WARNING("RPC ID Helper is not available and RPC PRD cache was requested - This will not be created");
   }
-  if( !m_muonIdHelperTool->hasTgcIdHelper() && !m_TgcCacheKey.key().empty() ){
+  if( !m_idHelperSvc->hasTGC() && !m_TgcCacheKey.key().empty() ){
     ATH_MSG_WARNING("TGC ID Helper is not available and TGC PRD cache was requested - This will not be created");
   }
-  if( !m_muonIdHelperTool->hasSTgcIdHelper() && !m_sTgcCacheKey.key().empty() ){
+  if( !m_idHelperSvc->hasSTgc() && !m_sTgcCacheKey.key().empty() ){
     ATH_MSG_WARNING("STGC ID Helper is not available and STGC PRD cache was requested - This will not be created");
   }
-  if( !m_muonIdHelperTool->hasMmIdHelper() && !m_MmCacheKey.key().empty() ){
+  if( !m_idHelperSvc->hasMM() && !m_MmCacheKey.key().empty() ){
     ATH_MSG_WARNING("MM ID Helper is not available and MM PRD cache was requested - This will not be created");
   }
 
@@ -98,37 +86,37 @@ StatusCode MuonPRDCacheCreator::execute (const EventContext& ctx) const {
 
   // Create all the cache containers (if the tools are available)
   // CSC
-  if( m_muonIdHelperTool->hasCscIdHelper() ){
-    ATH_CHECK(createContainer(m_CscCacheKey, m_muonIdHelperTool->cscIdHelper().module_hash_max(), ctx));
-    ATH_CHECK(createContainer(m_CscStripCacheKey, m_muonIdHelperTool->cscIdHelper().module_hash_max(), ctx));
+  if( m_idHelperSvc->hasCSC() ){
+    ATH_CHECK(createContainer(m_CscCacheKey, m_idHelperSvc->cscIdHelper().module_hash_max(), ctx));
+    ATH_CHECK(createContainer(m_CscStripCacheKey, m_idHelperSvc->cscIdHelper().module_hash_max(), ctx));
   }
 
   // MDT
-  if( m_muonIdHelperTool->hasMdtIdHelper() ){
-    auto maxHashMDTs = m_muonIdHelperTool->mdtIdHelper().stationNameIndex("BME") != -1 ? m_muonIdHelperTool->mdtIdHelper().detectorElement_hash_max() : m_muonIdHelperTool->mdtIdHelper().module_hash_max();
+  if( m_idHelperSvc->hasMDT() ){
+    auto maxHashMDTs = m_idHelperSvc->mdtIdHelper().stationNameIndex("BME") != -1 ? m_idHelperSvc->mdtIdHelper().detectorElement_hash_max() : m_idHelperSvc->mdtIdHelper().module_hash_max();
     ATH_CHECK(createContainer(m_MdtCacheKey, maxHashMDTs, ctx));
   }
 
   // RPC
-  if( m_muonIdHelperTool->hasRpcIdHelper() ){
-    ATH_CHECK(createContainer(m_RpcCacheKey, m_muonIdHelperTool->rpcIdHelper().module_hash_max(), ctx));
-    ATH_CHECK(createContainer(m_RpcCoinCacheKey, m_muonIdHelperTool->rpcIdHelper().module_hash_max(), ctx));
+  if( m_idHelperSvc->hasRPC() ){
+    ATH_CHECK(createContainer(m_RpcCacheKey, m_idHelperSvc->rpcIdHelper().module_hash_max(), ctx));
+    ATH_CHECK(createContainer(m_RpcCoinCacheKey, m_idHelperSvc->rpcIdHelper().module_hash_max(), ctx));
   }
 
   // TGC
-  if( m_muonIdHelperTool->hasTgcIdHelper() ){
-    ATH_CHECK(createContainer(m_TgcCacheKey, m_muonIdHelperTool->tgcIdHelper().module_hash_max(), ctx));
-    ATH_CHECK(createContainer(m_TgcCoinCacheKey, m_muonIdHelperTool->tgcIdHelper().module_hash_max(), ctx));
+  if( m_idHelperSvc->hasTGC() ){
+    ATH_CHECK(createContainer(m_TgcCacheKey, m_idHelperSvc->tgcIdHelper().module_hash_max(), ctx));
+    ATH_CHECK(createContainer(m_TgcCoinCacheKey, m_idHelperSvc->tgcIdHelper().module_hash_max(), ctx));
   }
 
   // NSW STGC
-  if( m_muonIdHelperTool->hasSTgcIdHelper() ){
-    ATH_CHECK(createContainer(m_sTgcCacheKey, m_muonIdHelperTool->stgcIdHelper().module_hash_max(), ctx));
+  if( m_idHelperSvc->hasSTgc() ){
+    ATH_CHECK(createContainer(m_sTgcCacheKey, m_idHelperSvc->stgcIdHelper().module_hash_max(), ctx));
   }
 
   // NSW MM
-  if( m_muonIdHelperTool->hasMmIdHelper() ){
-    ATH_CHECK(createContainer(m_MmCacheKey, m_muonIdHelperTool->mmIdHelper().module_hash_max(), ctx));
+  if( m_idHelperSvc->hasMM() ){
+    ATH_CHECK(createContainer(m_MmCacheKey, m_idHelperSvc->mmIdHelper().module_hash_max(), ctx));
   }
 
   return StatusCode::SUCCESS;
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h
index 41b3b48b9a68a7116d834c27400e4e492a7faabc..8b06e325f0dffa012c2406de8adc83c8ab74171d 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/src/MuonPRDCacheCreator.h
@@ -1,15 +1,15 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 #pragma once
  
 #include "AthenaBaseComps/AthReentrantAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
 
 #include "MuonPrepRawData/MuonPrepDataCollection_Cache.h"
 #include "MuonTrigCoinData/MuonTrigCoinData_Cache.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 
 // Class for setting up PRD cache containers
@@ -19,7 +19,7 @@ class MuonPRDCacheCreator : public AthReentrantAlgorithm {
   /// Constructor
   MuonPRDCacheCreator(const std::string &name,ISvcLocator *pSvcLocator);
   /// Destructor
-  virtual ~MuonPRDCacheCreator()  ;
+  virtual ~MuonPRDCacheCreator()=default;
 
   /// Initialize the algorithm
   virtual StatusCode initialize () override;
@@ -43,9 +43,7 @@ protected:
   SG::WriteHandleKey<RpcCoinDataCollection_Cache>       m_RpcCoinCacheKey;
   SG::WriteHandleKey<TgcCoinDataCollection_Cache>       m_TgcCoinCacheKey;
 
-
-  ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-    "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
   mutable bool m_disableWarning = false;
   bool isInsideView(const EventContext&) const;
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.cxx
index 9d2c3cc9d06e3f6be65b79ccefcd6a4987aa540e..e71b11aaaa0ff98f486300a33893b38ad4e5735c 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.cxx
@@ -1,14 +1,9 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TGC_RawDataProviderTool.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #include "TGC_RawDataProviderTool.h"
 
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
 #include "MuonRDO/TgcRdoContainer.h"
 
 //================ Constructor =================================================
@@ -22,11 +17,6 @@ Muon::TGC_RawDataProviderTool::TGC_RawDataProviderTool(
   declareInterface<IMuonRawDataProviderTool>(this);
 }
 
-//================ Destructor =================================================
-
-Muon::TGC_RawDataProviderTool::~TGC_RawDataProviderTool()
-{}
-
 //================ Initialisation =================================================
 
 StatusCode Muon::TGC_RawDataProviderTool::initialize()
@@ -38,13 +28,6 @@ StatusCode Muon::TGC_RawDataProviderTool::initialize()
   return StatusCode::SUCCESS;
 }
 
-//================ Finalisation =================================================
-
-StatusCode Muon::TGC_RawDataProviderTool::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
 //============================================================================================
 
 StatusCode Muon::TGC_RawDataProviderTool::convert(const ROBFragmentList& vecRobs) 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h
index 8f32d41044846110234dfc78d2023d40e2bc8390..945aad7ef50ffcd2fe7c24519b5a61a55b171983 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderTool.h
@@ -1,17 +1,13 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TGC_RawDataProviderTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOL_H
 #define MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOL_H
 
 #include "TGC_RawDataProviderToolCore.h"
-#include "GaudiKernel/ToolHandle.h"
 #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
+
 #include "TGC_Hid2RESrcID.h"
 
 namespace Muon
@@ -31,12 +27,10 @@ namespace Muon
       /** Default constructor */
       TGC_RawDataProviderTool(const std::string& t, const std::string& n, const IInterface* p);
       /** Default destructor */
-      virtual ~TGC_RawDataProviderTool();
+      virtual ~TGC_RawDataProviderTool()=default;
       
       /** Standard AlgTool method */
       virtual StatusCode initialize();
-      /** Standard AlgTool method */
-      virtual StatusCode finalize();
       
       /** Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool */
       virtual StatusCode convert(const ROBFragmentList& vecRobs);
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx
index 9d1445444c2a0ef447c757a3286e35be4caa77a0..748e08c9535163328b8a9fe3a68391942fa361a8 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.cxx
@@ -8,11 +8,9 @@
 
 #include "TGC_RawDataProviderToolCore.h"
 
-#include "MuonTGC_CnvTools/ITGC_RodDecoder.h"
 #include "MuonRDO/TgcRdoContainer.h"
 
 #include "TGCcablingInterface/ITGCcablingServerSvc.h"
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
 
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/IJobOptionsSvc.h"
@@ -31,42 +29,26 @@ Muon::TGC_RawDataProviderToolCore::TGC_RawDataProviderToolCore(
   declareProperty("Decoder",     m_decoder);
 }
 
-//================ Destructor =================================================
-
-Muon::TGC_RawDataProviderToolCore::~TGC_RawDataProviderToolCore()
-{}
-
 //================ Initialisation =================================================
 
 StatusCode Muon::TGC_RawDataProviderToolCore::initialize()
 {
-  StatusCode sc = AthAlgTool::initialize();
-
-  if(sc.isFailure()) return sc;
-
+  ATH_CHECK(AthAlgTool::initialize());
   ATH_CHECK(m_idHelperSvc.retrieve());
 
-  if(m_decoder.retrieve().isFailure()) {
-    ATH_MSG_FATAL( "Failed to retrieve tool " << m_decoder );
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_INFO( "Retrieved tool " << m_decoder );
-  }
+  ATH_CHECK(m_decoder.retrieve());
+  ATH_MSG_DEBUG( "Retrieved tool " << m_decoder );
 
   // Get ROBDataProviderSvc
-  if(m_robDataProvider.retrieve().isFailure()) {
-    ATH_MSG_FATAL( "Failed to retrieve serive " << m_robDataProvider );
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_INFO( "Retrieved service " << m_robDataProvider );
-  }
+  ATH_CHECK(m_robDataProvider.retrieve());
+  ATH_MSG_DEBUG( "Retrieved service " << m_robDataProvider );
 
   m_maxhashtoUse = m_idHelperSvc->tgcIdHelper().module_hash_max();  
 
   ATH_CHECK(m_rdoContainerKey.initialize());
 
   //try to configure the cabling service
-  sc = getCabling();
+  StatusCode sc = getCabling();
   if(sc.isFailure()) {
       ATH_MSG_INFO( "TGCcablingServerSvc not yet configured; postone TGCcabling initialization at first event. " );
   }
@@ -74,13 +56,6 @@ StatusCode Muon::TGC_RawDataProviderToolCore::initialize()
   return StatusCode::SUCCESS;
 }
 
-//================ Finalisation =================================================
-
-StatusCode Muon::TGC_RawDataProviderToolCore::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
 //============================================================================================
 
 StatusCode Muon::TGC_RawDataProviderToolCore::convertIntoContainer(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs, TgcRdoContainer& tgcRdoContainer) 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.h
index d9012911b507810fec7f2cc1376952b430f09fea..f1ca7f5bd6af2f7c85b8820836ea9942fbb15999 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolCore.h
@@ -1,29 +1,24 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TGC_RawDataProviderToolCore.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOLCORE_H
 #define MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOLCORE_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
+
 #include "TGC_Hid2RESrcID.h"
 #include "ByteStreamData/RawEvent.h" 
-#include "Identifier/IdentifierHash.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
+#include "MuonTGC_CnvTools/ITGC_RodDecoder.h"
+#include "TGCcablingInterface/ITGCcablingSvc.h"
 
 class TgcRdoContainer;
-class IROBDataProviderSvc;
-class ITGCcablingSvc;
 
-namespace Muon
-{
-  class ITGC_RodDecoder;
+namespace Muon {
 
   /** @class TGC_RawDataProviderToolCore
    *  A tool to decode TGC ROB fragments into TGC RDO.
@@ -38,12 +33,10 @@ namespace Muon
       /** Default constructor */
       TGC_RawDataProviderToolCore(const std::string& t, const std::string& n, const IInterface* p);
       /** Default destructor */
-      virtual ~TGC_RawDataProviderToolCore();
+      virtual ~TGC_RawDataProviderToolCore()=default;
       
       /** Standard AlgTool method */
       virtual StatusCode initialize();
-      /** Standard AlgTool method */
-      virtual StatusCode finalize();
       
       /** Method that converts the ROBFragments into the passed container */
       virtual StatusCode convertIntoContainer(const std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs, TgcRdoContainer& tgcRdoContainer);
@@ -53,7 +46,6 @@ namespace Muon
       /** Function to get the ROB data from a vector of IdentifierHash **/
       std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> getROBData(const std::vector<IdentifierHash>& rdoIdhVect);
 
-      /** Get tgcIdHelper */
       ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
       /** Decoder for ROB fragment RDO conversion */
       ToolHandle<ITGC_RodDecoder>         m_decoder;
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.cxx
index 47d00f730063472c435fd7f4565e3e80e8d65366..75a89d01873e6da1bcb46217e106da72e2e48831 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.cxx
@@ -1,14 +1,9 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TGC_RawDataProviderToolMT.cxx, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #include "TGC_RawDataProviderToolMT.h"
 
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
 #include "MuonRDO/TgcRdoContainer.h"
 
 //================ Constructor =================================================
@@ -23,11 +18,6 @@ Muon::TGC_RawDataProviderToolMT::TGC_RawDataProviderToolMT(
   declareProperty("TgcContainerCacheKey", m_rdoContainerCacheKey, "Optional external cache for the TGC container");
 }
 
-//================ Destructor =================================================
-
-Muon::TGC_RawDataProviderToolMT::~TGC_RawDataProviderToolMT()
-{}
-
 //================ Initialisation =================================================
 
 StatusCode Muon::TGC_RawDataProviderToolMT::initialize()
@@ -42,13 +32,6 @@ StatusCode Muon::TGC_RawDataProviderToolMT::initialize()
   return StatusCode::SUCCESS;
 }
 
-//================ Finalisation =================================================
-
-StatusCode Muon::TGC_RawDataProviderToolMT::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
 //============================================================================================
 
 StatusCode Muon::TGC_RawDataProviderToolMT::convert(const ROBFragmentList& vecRobs) 
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.h
index 1e82db99e589ea1d140f3d9da328022e21bfabed..7bcd24af68d54e00323ca017d77a4ea1da43e20c 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TGC_RawDataProviderToolMT.h
@@ -1,16 +1,13 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TGC_RawDataProviderToolMT.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
 #ifndef MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOLMT_H
 #define MUONTGC_CNVTOOLS_TGC_RAWDATAPROVIDERTOOLMT_H
 
 #include "TGC_RawDataProviderToolCore.h"
 #include "MuonCnvToolInterfaces/IMuonRawDataProviderTool.h"
+
 #include "TGC_Hid2RESrcID.h"
 #include "MuonRDO/TgcRdo_Cache.h"
 
@@ -31,12 +28,10 @@ namespace Muon
       /** Default constructor */
       TGC_RawDataProviderToolMT(const std::string& t, const std::string& n, const IInterface* p);
       /** Default destructor */
-      virtual ~TGC_RawDataProviderToolMT();
+      virtual ~TGC_RawDataProviderToolMT()=default;
       
       /** Standard AlgTool method */
       virtual StatusCode initialize();
-      /** Standard AlgTool method */
-      virtual StatusCode finalize();
       
       /** Old decoding method which uses IROBDataProviderSvc in TgcRdoToPrepDataTool */
       virtual StatusCode convert(const ROBFragmentList& vecRobs);
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.cxx
index b9bb337e2bac11886529835c39d997c978941d0d..48d8d1a0b26cc2dae313a4be39cd92cc08534f41 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.cxx
@@ -1,15 +1,10 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-////////////////////////////////////////////////////////////////////////////////
-// TgcPrepDataReplicationTool.cxx, (c) ATLAS Detector software
-////////////////////////////////////////////////////////////////////////////////
-
 #include "TgcPrepDataReplicationTool.h"
 
 #include "MuonCnvToolInterfaces/IDC_Helper.h"
-
 #include "MuonDigitContainer/TgcDigit.h"
 #include "EventPrimitives/EventPrimitives.h"
 
@@ -21,24 +16,16 @@ Muon::TgcPrepDataReplicationTool::TgcPrepDataReplicationTool
   for(int ibc = 0; ibc < BC_NUM; ibc++) m_tgcPrepDataContainer[ibc] = 0;
 }  
 
-
-//================ Destructor ==================================================
-Muon::TgcPrepDataReplicationTool::~TgcPrepDataReplicationTool()
-{}
-
-
 //================ Initialization ==============================================
 StatusCode Muon::TgcPrepDataReplicationTool::initialize()
 {
-  StatusCode sc = AthAlgTool::initialize();
-  if(sc.isFailure()) return sc;
-
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK(AthAlgTool::initialize());
+  ATH_CHECK( m_idHelperSvc.retrieve() );
 
   /// create an empty TGC container for filling
   for(int ibc = 0; ibc < BC_NUM; ibc++) {
     try {
-      m_tgcPrepDataContainer[ibc] = new TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max());
+      m_tgcPrepDataContainer[ibc] = new TgcPrepDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max());
     } catch(const std::bad_alloc&) {
       ATH_MSG_FATAL("Could not create a new TGC PrepRawData container!");
       return StatusCode::FAILURE;
@@ -132,11 +119,11 @@ StatusCode Muon::TgcPrepDataReplicationTool::convertAllBCto3BC()
         hasBC[BC_NEXT] = TgcPrepData::BCBIT_NEXT;
 
       Identifier channelId = (*tgcAllColItr)->identify();
-      Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelId);
+      Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelId);
 
       for (int ibc = 0; ibc < BC_ALL; ibc++) {
         collections[ibc] = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
-                            (elementId, m_tgcPrepDataContainer[ibc], m_muonIdHelperTool->tgcIdHelper(), msg());
+                            (elementId, m_tgcPrepDataContainer[ibc], m_idHelperSvc->tgcIdHelper(), msg());
      
         if (!hasBC[ibc]) continue;
         Muon::TgcPrepData* newPrepData = makeTgcPrepData(tgcAllColItr, hasBC[ibc]);
@@ -199,10 +186,10 @@ StatusCode Muon::TgcPrepDataReplicationTool::convert3BCtoAllBC()
 
       for (; tgcColItr != tgcColItrE; ++tgcColItr) {
         Identifier channelId = (*tgcColItr)->identify();
-        Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelId);
+        Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelId);
 
         collection = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
-                            (elementId, m_tgcPrepDataContainer[BC_ALL], m_muonIdHelperTool->tgcIdHelper(), msg());
+                            (elementId, m_tgcPrepDataContainer[BC_ALL], m_idHelperSvc->tgcIdHelper(), msg());
 
         bool duplicateInAllBCs = false;
         TgcPrepDataCollection::iterator tgcAllItr  = collection->begin();
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.h
index 4b8196fa1adaa4c3ff0a52a0824bd7c1a2a6fc3f..99f0f0dc1db70fcbbdd75a662ef240032d1c3edd 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool.h
@@ -1,17 +1,16 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TgcPrepDataReplicationTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
 #ifndef MUONTGC_CNVTOOLS_TGCPREPDATAREPLICATIONTOOL_H
 #define MUONTGC_CNVTOOLS_TGCPREPDATAREPLICATIONTOOL_H
 
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "MuonTGC_CnvTools/ITgcPrepDataReplicationTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "MuonPrepRawData/TgcPrepDataContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 namespace Muon 
 {
@@ -23,7 +22,7 @@ namespace Muon
       TgcPrepDataReplicationTool(const std::string& t, const std::string& n, const IInterface* p);
       
       /** Destructor */
-      virtual ~TgcPrepDataReplicationTool();
+      virtual ~TgcPrepDataReplicationTool()=default;
 
       /** Provide InterfaceID */
       static const InterfaceID& interfaceID() { return ITgcPrepDataReplicationTool::interfaceID(); };
@@ -40,9 +39,7 @@ namespace Muon
     private:
       enum {BC_PREVIOUS=0, BC_CURRENT, BC_NEXT, BC_ALL, BC_NUM};
 
-      /** TGC identifier helper */
-      ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-        "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+      ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
       /** TgcPrepRawData (hit PRD) containers */
       TgcPrepDataContainer* m_tgcPrepDataContainer[BC_NUM];
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.cxx
index 20b26f56285ddebbf8115baf31a71a24416b113f..41e840aa2b208cddf36f66af7269064c33c07fbb 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.cxx
@@ -1,11 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-////////////////////////////////////////////////////////////////////////////////
-// TgcPrepDataReplicationTool.cxx, (c) ATLAS Detector software
-////////////////////////////////////////////////////////////////////////////////
-
 #include "TgcPrepDataReplicationTool3BCtoAllBC.h"
 #include "TgcPrepDataReplicationToolAllBCto3BC.h"
 #include "MuonCnvToolInterfaces/IDC_Helper.h"
@@ -24,18 +20,11 @@ Muon::TgcPrepDataReplicationTool3BCtoAllBC::TgcPrepDataReplicationTool3BCtoAllBC
   declareProperty("AllBCKey", m_AllBCKey);
 }  
 
-
-//================ Destructor ==================================================
-Muon::TgcPrepDataReplicationTool3BCtoAllBC::~TgcPrepDataReplicationTool3BCtoAllBC()
-{}
-
 //================ Initialization ==============================================
 StatusCode Muon::TgcPrepDataReplicationTool3BCtoAllBC::initialize()
 {
-  StatusCode sc = AthAlgTool::initialize();
-  if(sc.isFailure()) return sc;
-  
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK(AthAlgTool::initialize());
+  ATH_CHECK(m_idHelperSvc.retrieve());
   
   for(int ibc = 0; ibc < BC_ALL; ibc++) {
     std::ostringstream location;
@@ -56,18 +45,11 @@ StatusCode Muon::TgcPrepDataReplicationTool3BCtoAllBC::replicate()
     return convert3BCtoAllBC();
 }
 
-StatusCode Muon::TgcPrepDataReplicationTool3BCtoAllBC::finalize()
-{
-  
-  return AthAlgTool::finalize();
-}
-
-
 StatusCode Muon::TgcPrepDataReplicationTool3BCtoAllBC::convert3BCtoAllBC()
 {
 
   SG::WriteHandle<TgcPrepDataContainer> tgcPrepDataContainerAll(m_AllBCKey);
-  tgcPrepDataContainerAll = std::unique_ptr<TgcPrepDataContainer>( new TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()) );
+  tgcPrepDataContainerAll = std::unique_ptr<TgcPrepDataContainer>( new TgcPrepDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max()) );
   
   auto tgc3BCs = m_3BCKeys.makeHandles();
 
@@ -94,10 +76,10 @@ StatusCode Muon::TgcPrepDataReplicationTool3BCtoAllBC::convert3BCtoAllBC()
 
       for (; tgcColItr != tgcColItrE; ++tgcColItr) {
         Identifier channelId = (*tgcColItr)->identify();
-        Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelId);
+        Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelId);
 
         Muon::TgcPrepDataCollection* collection = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
-                            (elementId, tgcPrepDataContainerAll.ptr(), m_muonIdHelperTool->tgcIdHelper(), msg());
+                            (elementId, tgcPrepDataContainerAll.ptr(), m_idHelperSvc->tgcIdHelper(), msg());
 
         bool duplicateInAllBCs = false;
         TgcPrepDataCollection::iterator tgcAllItr  = collection->begin();
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.h
index e93f5990125a26332d629d88219fc418ab86db46..34d5d3baf7a9e8359dc53e4bfc1cd43eb9f91f85 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationTool3BCtoAllBC.h
@@ -1,18 +1,16 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TgcPrepDataReplicationTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
 #ifndef MUONTGC_CNVTOOLS_TGCPREPDATAREPLICATIONTOOL3BCtoALLBC_H
 #define MUONTGC_CNVTOOLS_TGCPREPDATAREPLICATIONTOOL3BCtoALLBC_H
 
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "MuonTGC_CnvTools/ITgcPrepDataReplicationTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "MuonPrepRawData/TgcPrepDataContainer.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 namespace Muon 
 {
@@ -24,7 +22,7 @@ namespace Muon
       TgcPrepDataReplicationTool3BCtoAllBC(const std::string& t, const std::string& n, const IInterface* p);
       
       /** Destructor */
-      virtual ~TgcPrepDataReplicationTool3BCtoAllBC();
+      virtual ~TgcPrepDataReplicationTool3BCtoAllBC()=default;
 
       /** Provide InterfaceID */
       static const InterfaceID& interfaceID() { return ITgcPrepDataReplicationTool::interfaceID(); };
@@ -33,7 +31,6 @@ namespace Muon
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF) override;
 
       virtual StatusCode initialize() override;
-      virtual StatusCode finalize() override;
       virtual StatusCode replicate() override;
       StatusCode convert3BCtoAllBC();
 
@@ -41,8 +38,7 @@ namespace Muon
     private:
       enum {BC_PREVIOUS=0, BC_CURRENT, BC_NEXT, BC_ALL, BC_NUM};
 
-      ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-        "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+      ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
       SG::ReadHandleKeyArray<TgcPrepDataContainer> m_3BCKeys;
       SG::WriteHandleKey<TgcPrepDataContainer> m_AllBCKey;
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx
index 667196766c12f5c6c4bc9fc8da5f61f70ed14121..0a78da92a2feeb0c9b8b12ff68cede13323039e6 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.cxx
@@ -1,11 +1,7 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-////////////////////////////////////////////////////////////////////////////////
-// TgcPrepDataReplicationTool.cxx, (c) ATLAS Detector software
-////////////////////////////////////////////////////////////////////////////////
-
 #include "TgcPrepDataReplicationToolAllBCto3BC.h"
 
 #include "MuonCnvToolInterfaces/IDC_Helper.h"
@@ -25,26 +21,11 @@ Muon::TgcPrepDataReplicationToolAllBCto3BC::TgcPrepDataReplicationToolAllBCto3BC
   declareProperty("AllBCKey", m_AllBCKey);
 }  
 
-
-//================ Destructor ==================================================
-Muon::TgcPrepDataReplicationToolAllBCto3BC::~TgcPrepDataReplicationToolAllBCto3BC()
-{}
-
-//================ Finalization ================================================
-StatusCode Muon::TgcPrepDataReplicationToolAllBCto3BC::finalize()
-{
-  
-  return AthAlgTool::finalize();
-}
-
-
 //================ Initialization ==============================================
 StatusCode Muon::TgcPrepDataReplicationToolAllBCto3BC::initialize()
 {
-  StatusCode sc = AthAlgTool::initialize();
-  if(sc.isFailure()) return sc;
-
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
+  ATH_CHECK(AthAlgTool::initialize());
+  ATH_CHECK(m_idHelperSvc.retrieve());
   
   for(int ibc = 0; ibc < BC_ALL; ibc++) {
     std::ostringstream location;
@@ -79,7 +60,7 @@ StatusCode Muon::TgcPrepDataReplicationToolAllBCto3BC::convertAllBCto3BC()
   // convert
   auto tgc3BCHandles = m_3BCKeys.makeHandles();
   for (int ibc = 0; ibc < BC_ALL; ibc++){
-      tgc3BCHandles.at(ibc) = std::unique_ptr<TgcPrepDataContainer>( new TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()) );
+      tgc3BCHandles.at(ibc) = std::unique_ptr<TgcPrepDataContainer>( new TgcPrepDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max()) );
   }
 
   Muon::TgcPrepDataContainer::const_iterator tgcAllItr   = tgcAll->begin();
@@ -101,11 +82,11 @@ StatusCode Muon::TgcPrepDataReplicationToolAllBCto3BC::convertAllBCto3BC()
         hasBC[BC_NEXT] = TgcPrepData::BCBIT_NEXT;
 
       Identifier channelId = (*tgcAllColItr)->identify();
-      Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelId);
+      Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelId);
       std::array<Muon::TgcPrepDataCollection*, BC_ALL> collections;
       for (int ibc = 0; ibc < BC_ALL; ibc++) {
         collections[ibc] = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
-                            (elementId, tgc3BCHandles[ibc].ptr(), m_muonIdHelperTool->tgcIdHelper(), msg());
+                            (elementId, tgc3BCHandles[ibc].ptr(), m_idHelperSvc->tgcIdHelper(), msg());
      
         if (!hasBC[ibc]) continue;
         Muon::TgcPrepData* newPrepData = makeTgcPrepData(tgcAllColItr, hasBC[ibc]);
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.h
index 28a54c966713480bef57443eba0fe4dbb8f6e8b4..a3d6a0efc5a3aaf69ebcbed3fb54761a51eb181b 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcPrepDataReplicationToolAllBCto3BC.h
@@ -1,18 +1,16 @@
-
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TgcPrepDataReplicationTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
 #ifndef MUONTGC_CNVTOOLS_TGCPREPDATAREPLICATIONTOOLAllBCto3BC_H
 #define MUONTGC_CNVTOOLS_TGCPREPDATAREPLICATIONTOOLAllBCto3BC_H
 
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "MuonTGC_CnvTools/ITgcPrepDataReplicationTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+
 #include "MuonPrepRawData/TgcPrepDataContainer.h"
-#include "MuonIdHelpers/MuonIdHelperTool.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
 
 namespace Muon 
 {
@@ -24,7 +22,7 @@ namespace Muon
       TgcPrepDataReplicationToolAllBCto3BC(const std::string& t, const std::string& n, const IInterface* p);
       
       /** Destructor */
-      virtual ~TgcPrepDataReplicationToolAllBCto3BC();
+      virtual ~TgcPrepDataReplicationToolAllBCto3BC()=default;
 
       /** Provide InterfaceID */
       static const InterfaceID& interfaceID() { return ITgcPrepDataReplicationTool::interfaceID(); };
@@ -33,7 +31,6 @@ namespace Muon
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIF) override;
 
       virtual StatusCode initialize() override;
-      virtual StatusCode finalize() override;
       virtual StatusCode replicate() override;
       StatusCode convertAllBCto3BC();
       
@@ -43,8 +40,7 @@ namespace Muon
     private:
       enum {BC_PREVIOUS=0, BC_CURRENT, BC_NEXT, BC_ALL, BC_NUM};
 
-      ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-        "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+      ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
 
       SG::WriteHandleKeyArray<TgcPrepDataContainer> m_3BCKeys;
       SG::ReadHandleKey<TgcPrepDataContainer> m_AllBCKey;
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx
index 5ec934b890b2b617e0d0156eb4ddfebcb4140067..864fe64509875f83897ed3a6e1bce8abbd092ad0 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.cxx
@@ -1,27 +1,18 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TGC_CnvTool.cxx, (c) ATLAS Detector software
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 #include "TgcRdoToPrepDataTool.h"
 
 #include "MuonDigitContainer/TgcDigit.h"
 #include "MuonTrigCoinData/TgcCoinData.h"
 
-
 Muon::TgcRdoToPrepDataTool::TgcRdoToPrepDataTool(const std::string& t, const std::string& n, const IInterface* p)
   : AthAlgTool(t, n, p), 
     TgcRdoToPrepDataToolCore(t, n, p)
 {
 }  
 
-Muon::TgcRdoToPrepDataTool::~TgcRdoToPrepDataTool()
-{
-}
-
 StatusCode Muon::TgcRdoToPrepDataTool::initialize()
 {
   ATH_MSG_VERBOSE("Starting init");
@@ -30,11 +21,6 @@ StatusCode Muon::TgcRdoToPrepDataTool::initialize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode Muon::TgcRdoToPrepDataTool::finalize()
-{
-  return TgcRdoToPrepDataToolCore::finalize();
-}
-
 StatusCode Muon::TgcRdoToPrepDataTool::decode(std::vector<IdentifierHash>& requestedIdHashVect, 
   std::vector<IdentifierHash>& selectedIdHashVect)
 {
@@ -64,7 +50,7 @@ StatusCode Muon::TgcRdoToPrepDataTool::decode(std::vector<IdentifierHash>& reque
       SG::WriteHandle<TgcPrepDataContainer>  handle(m_outputprepdataKeys[ibc]);
       
       // record the container in storeGate
-      handle = std::unique_ptr<TgcPrepDataContainer> (new TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
+      handle = std::unique_ptr<TgcPrepDataContainer> (new TgcPrepDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max()));
       // cache the pointer, storegate retains ownership
       m_tgcPrepDataContainer[ibc] = handle.ptr();
       if(!handle.isValid()) {
@@ -113,13 +99,7 @@ StatusCode Muon::TgcRdoToPrepDataTool::decode(std::vector<IdentifierHash>& reque
   for(int ibc=0; ibc<NBC; ibc++) {
     if(!nothingToDo[ibc]) nothingToDoForAllBC = false;
   } 
-  
-  /*if(nothingToDoForAllBC) {
-    ATH_MSG_DEBUG("Whole events at all " << NBC << " BCs have already been decoded; nothing to do");
-    return StatusCode::SUCCESS;
-    }*/
 
-  
   /// clean up containers for Coincidence
   for(int ibc=0; ibc<NBC; ibc++) {
 
@@ -128,7 +108,7 @@ StatusCode Muon::TgcRdoToPrepDataTool::decode(std::vector<IdentifierHash>& reque
       SG::WriteHandle<TgcCoinDataContainer>  handle(m_outputCoinKeys[ibc]);
       
       // record the container in storeGate
-      handle = std::unique_ptr<TgcCoinDataContainer> (new TgcCoinDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
+      handle = std::unique_ptr<TgcCoinDataContainer> (new TgcCoinDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max()));
       
       // cache the pointer, storegate retains ownership
       m_tgcCoinDataContainer[ibc] = handle.ptr();
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h
index d005d9e78afb1cdf1b75dcf099e342c0e856d679..8526cce9fb816e9eb2ef2af75ac508507c935c4c 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataTool.h
@@ -1,10 +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
 */
 
-///////////////////////////////////////////////////////////////////
-// TgcRdoToPrepDataTool.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
 #ifndef MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOL_H
 #define MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOL_H
 
@@ -28,12 +25,10 @@ namespace Muon
       TgcRdoToPrepDataTool(const std::string& t, const std::string& n, const IInterface* p);
       
       /** Destructor */
-      virtual ~TgcRdoToPrepDataTool();
+      virtual ~TgcRdoToPrepDataTool()=default;
       
       /** Standard AthAlgTool initialize method */
       virtual StatusCode initialize() override;
-      /** Standard AthAlgTool finalize method */
-      virtual StatusCode finalize() override;
     
       using TgcRdoToPrepDataToolCore::decode; // To prevent the decode below from hiding the superclass decode methods
       virtual StatusCode decode(std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& idWithDataVect) override;
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.cxx
index 4ff6f30d7b7d763184bc2843f1376f4a572f740b..39a45acd92f3f69b53f6bcf4086bd4764277e505 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.cxx
@@ -1,32 +1,18 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TGC_CnvTool.cxx, (c) ATLAS Detector software
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 #include "TgcRdoToPrepDataToolCore.h"
 
-#include "GaudiKernel/ISvcLocator.h"
-
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/TgcReadoutElement.h"
-
-#include "TGCcablingInterface/ITGCcablingSvc.h"
 #include "TGCcablingInterface/ITGCcablingServerSvc.h"
 #include "TGCcablingInterface/TGCIdBase.h"
-
 #include "MuonDigitContainer/TgcDigit.h"
-
 #include "MuonTrigCoinData/TgcCoinData.h"
-
 #include "TrkSurfaces/Surface.h"
-
 #include "MuonCnvToolInterfaces/IDC_Helper.h"
-
 #include "EventPrimitives/EventPrimitives.h"
-
 #include "GaudiKernel/ThreadLocalContext.h"
 
 #include <cfloat>
@@ -70,11 +56,6 @@ Muon::TgcRdoToPrepDataToolCore::TgcRdoToPrepDataToolCore(const std::string& t, c
   for(int ibc=0; ibc<NBC+1; ibc++) m_fullEventDone[ibc]=false;
 }  
 
-//================ Destructor =================================================
-
-Muon::TgcRdoToPrepDataToolCore::~TgcRdoToPrepDataToolCore()
-{}
-
 //___________________________________________________________________________
 StatusCode Muon::TgcRdoToPrepDataToolCore::queryInterface(const InterfaceID& riid, void** ppvIf)
 {
@@ -92,17 +73,9 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::queryInterface(const InterfaceID& rii
 
 StatusCode Muon::TgcRdoToPrepDataToolCore::initialize()
 {
-  StatusCode sc = AthAlgTool::initialize();
-  if(sc.isFailure()) return sc;
-
-  sc = detStore()->retrieve(m_muonMgr);
-  if(sc.isFailure()) {
-    ATH_MSG_FATAL("Cannot retrieve MuonDetectorManager");
-    return sc;
-  }
-
-  ATH_CHECK( m_muonIdHelperTool.retrieve() );
-  
+  ATH_CHECK(AthAlgTool::initialize());
+  ATH_CHECK(detStore()->retrieve(m_muonMgr));
+  ATH_CHECK(m_idHelperSvc.retrieve());
 
   for(int ibc=0; ibc<NBC+1; ibc++) {      
     int bcTag=ibc+1;
@@ -127,7 +100,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::initialize()
   ATH_CHECK( m_rdoContainerKey.initialize() );
   
   //try to configure the cabling service
-  sc = getCabling();
+  StatusCode sc = getCabling();
   if(sc.isFailure()) {
     ATH_MSG_INFO("TGCcablingServerSvc not yet configured; postpone TGCcabling initialization at first event.");
   }
@@ -151,8 +124,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::finalize()
 	       "HiPt: "         << m_nHiPtRDOs         << "->" << m_nHiPtPRDs         << ", " << 
 	       "SL: "           << m_nSLRDOs           << "->" << m_nSLPRDs           << "]"); 
 
-  StatusCode sc = AthAlgTool::finalize();
-  return sc;
+  return AthAlgTool::finalize();
 }
 
 //================ Decoding =================================================
@@ -166,7 +138,7 @@ void Muon::TgcRdoToPrepDataToolCore::printInputRdo()
   ATH_MSG_INFO("***************** Listing input TgcRdo Collections *****************************************");
 
   /// TGC context
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
 
   /// TGC RDO container --- assuming it is available
   auto rdoContainer = SG::makeHandle(m_rdoContainerKey);
@@ -206,12 +178,12 @@ void Muon::TgcRdoToPrepDataToolCore::printInputRdo()
     
     IdentifierHash tgcHashId = rdoColl->identifyHash();
     Identifier rdoId;
-    int code = m_muonIdHelperTool->tgcIdHelper().get_id(tgcHashId, rdoId, &tgcContext);
+    int code = m_idHelperSvc->tgcIdHelper().get_id(tgcHashId, rdoId, &tgcContext);
     if(code!=0) { 
       ATH_MSG_INFO("*** A problem in hash -> id conversion for hashId= " << static_cast<int>(tgcHashId)); 
     }
     
-    std::string extIdstring = m_muonIdHelperTool->tgcIdHelper().show_to_string(rdoId);
+    std::string extIdstring = m_idHelperSvc->tgcIdHelper().show_to_string(rdoId);
     ATH_MSG_INFO("*** Offine HashId = " << tgcHashId << " extended = " << extIdstring);
     
     int iHit = 0;
@@ -329,13 +301,13 @@ void Muon::TgcRdoToPrepDataToolCore::printPrepData()
 		   << (ibc==2 ? "NextBC" : ""));
 
       ATH_MSG_INFO("PrepData Collection ID "
-		   << m_muonIdHelperTool->tgcIdHelper().show_to_string(tgcColl->identify()));
+		   << m_idHelperSvc->tgcIdHelper().show_to_string(tgcColl->identify()));
 
       TgcPrepDataCollection::const_iterator it_tgcPrepData   = tgcColl->begin();
       TgcPrepDataCollection::const_iterator it_tgcPrepData_e = tgcColl->end();
       for(; it_tgcPrepData!=it_tgcPrepData_e; it_tgcPrepData++) {
 	ATH_MSG_INFO("PrepData Offline ID "
-		     << m_muonIdHelperTool->tgcIdHelper().show_to_string((*it_tgcPrepData)->identify()));
+		     << m_idHelperSvc->tgcIdHelper().show_to_string((*it_tgcPrepData)->identify()));
       }
     }
   }
@@ -359,13 +331,13 @@ void Muon::TgcRdoToPrepDataToolCore::printPrepData()
 		   << (ibc==2 ? "NextBC" : ""));
 
       ATH_MSG_INFO("CoinData Collection ID "
-		   << m_muonIdHelperTool->tgcIdHelper().show_to_string(tgcCoinColl->identify()));
+		   << m_idHelperSvc->tgcIdHelper().show_to_string(tgcCoinColl->identify()));
 
       TgcCoinDataCollection::const_iterator it_tgcCoinData   = tgcCoinColl->begin();
       TgcCoinDataCollection::const_iterator it_tgcCoinData_e = tgcCoinColl->end();
       for(; it_tgcCoinData!=it_tgcCoinData_e; it_tgcCoinData++) {
 	ATH_MSG_INFO("CoinData Offline ID "
-		     << m_muonIdHelperTool->tgcIdHelper().show_to_string((*it_tgcCoinData)->identify()));
+		     << m_idHelperSvc->tgcIdHelper().show_to_string((*it_tgcCoinData)->identify()));
       }
     }
   }
@@ -428,7 +400,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
   TgcPrepDataCollection* collection = 0;
   TgcPrepDataCollection* collectionAllBcs = 0;
   IdentifierHash tgcHashId;
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
   
   // select current Hits, =0 for backward compatibility
   // BC_CURRENT=2, BC_UNDEFINED=0
@@ -502,7 +474,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
       continue;
     }
     
-    if(m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
+    if(m_idHelperSvc->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
       ATH_MSG_WARNING("Unable to get TGC hash id from TGC RDO collection "
 		      << "context begin_index = " << tgcContext.begin_index()
 		      << " context end_index  = " << tgcContext.end_index()
@@ -511,7 +483,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
     }
     
     collection  = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
-      (elementId, m_tgcPrepDataContainer[locId], m_muonIdHelperTool->tgcIdHelper(), msg());
+      (elementId, m_tgcPrepDataContainer[locId], m_idHelperSvc->tgcIdHelper(), msg());
 
     // convert RawData to PrepRawData
     Identifier channelId;    
@@ -540,7 +512,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
       if(channelId==(*cit_tgcPrepData)->identify()) {
 	duplicate = true;
 	ATH_MSG_DEBUG("Duplicated TgcPrepData(removed) = "
-		      << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelId));
+		      << m_idHelperSvc->tgcIdHelper().show_to_string(channelId));
 	break;
       }
     }
@@ -554,7 +526,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
       ATH_MSG_WARNING("decodeHits: MuonGM::TgcReadoutElement is invalid.");
       continue;
     }
-    ATH_MSG_DEBUG("TGC RDO->PrepRawdata: " << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelId));
+    ATH_MSG_DEBUG("TGC RDO->PrepRawdata: " << m_idHelperSvc->tgcIdHelper().show_to_string(channelId));
     
     std::vector<Identifier> identifierList;
     identifierList.push_back(channelId);
@@ -568,10 +540,10 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
       continue; 
     }
     
-    int gasGap  = m_muonIdHelperTool->tgcIdHelper().gasGap(channelId);
-    int channel = m_muonIdHelperTool->tgcIdHelper().channel(channelId);
+    int gasGap  = m_idHelperSvc->tgcIdHelper().gasGap(channelId);
+    int channel = m_idHelperSvc->tgcIdHelper().channel(channelId);
     double width = 0.;
-    if(!static_cast<bool>(m_muonIdHelperTool->tgcIdHelper().isStrip(channelId))) { // wire
+    if(!static_cast<bool>(m_idHelperSvc->tgcIdHelper().isStrip(channelId))) { // wire
       width = getWidthWire(descriptor, gasGap, channel);
     } else { // strip
       width = getWidthStrip(descriptor, gasGap, channel, channelId);
@@ -601,7 +573,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHits(const TgcRdo::const_iterat
 
     // for All Bcs
     collectionAllBcs = Muon::IDC_Helper::getCollection<TgcPrepDataContainer, TgcIdHelper>
-      (elementId, m_tgcPrepDataContainer[NBC], m_muonIdHelperTool->tgcIdHelper(), msg());
+      (elementId, m_tgcPrepDataContainer[NBC], m_idHelperSvc->tgcIdHelper(), msg());
     uint16_t bcBitMap = 0;
     if (locId == 0)      bcBitMap = TgcPrepData::BCBIT_PREVIOUS;
     else if (locId == 1) bcBitMap = TgcPrepData::BCBIT_CURRENT;
@@ -691,9 +663,9 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTracklet(const TgcRdo::const_it
   //*** Get OfflineId of non-pivot plane (TGC2) end ***//
   
   IdentifierHash tgcHashId;
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
-  Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelIdOut);
-  if(m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
+  Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelIdOut);
+  if(m_idHelperSvc->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
     ATH_MSG_WARNING("Unable to get TGC hash id from TGC RDO collection "
 		    << "context begin_index = " << tgcContext.begin_index()
 		    << " context end_index  = " << tgcContext.end_index()
@@ -705,7 +677,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTracklet(const TgcRdo::const_it
     ? 1 : (*itD)->bcTag()-1;
 
   TgcCoinDataCollection* coincollection = Muon::IDC_Helper::getCollection<TgcCoinDataContainer, TgcIdHelper>
-    (elementId, m_tgcCoinDataContainer[locId], m_muonIdHelperTool->tgcIdHelper(), msg());
+    (elementId, m_tgcCoinDataContainer[locId], m_idHelperSvc->tgcIdHelper(), msg());
 
   int subMatrix = static_cast<int>((*itD)->subMatrix());
   int trackletId = static_cast<int>(2*(*itD)->slbId()+subMatrix); 
@@ -723,12 +695,12 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTracklet(const TgcRdo::const_it
        (subMatrix==(*it_tgcCoinData)->sub()) // subMatrix 
        ) {
       ATH_MSG_DEBUG("Duplicated TgcCoinData (Tracklet) = "
-		    << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelIdIn));
+		    << m_idHelperSvc->tgcIdHelper().show_to_string(channelIdIn));
       return StatusCode::SUCCESS;
     }
   }
 
-  ATH_MSG_DEBUG("TGC RDO->Coindata for LowPT: " << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelIdOut)); 
+  ATH_MSG_DEBUG("TGC RDO->Coindata for LowPT: " << m_idHelperSvc->tgcIdHelper().show_to_string(channelIdOut)); 
 
   //*** Get geometry of pivot plane (TGC3) start ***//
   const MuonGM::TgcReadoutElement* descriptor_o = m_muonMgr->getTgcReadoutElement(channelIdOut);
@@ -736,10 +708,10 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTracklet(const TgcRdo::const_it
     return StatusCode::SUCCESS;
   }
   
-  int gasGap_o = m_muonIdHelperTool->tgcIdHelper().gasGap(channelIdOut);
-  int channel_o = m_muonIdHelperTool->tgcIdHelper().channel(channelIdOut);
+  int gasGap_o = m_idHelperSvc->tgcIdHelper().gasGap(channelIdOut);
+  int channel_o = m_idHelperSvc->tgcIdHelper().channel(channelIdOut);
   double width_o = 0.;
-  if(!(static_cast<bool> (m_muonIdHelperTool->tgcIdHelper().isStrip(channelIdOut)))) { // wire 
+  if(!(static_cast<bool> (m_idHelperSvc->tgcIdHelper().isStrip(channelIdOut)))) { // wire 
     width_o = getWidthWire(descriptor_o, gasGap_o, channel_o);
   } else { // strip
     width_o = getWidthStrip(descriptor_o, gasGap_o, channel_o, channelIdOut);
@@ -764,10 +736,10 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTracklet(const TgcRdo::const_it
     return StatusCode::SUCCESS;
   }
   
-  int gasGap_i = m_muonIdHelperTool->tgcIdHelper().gasGap(channelIdIn);
-  int channel_i = m_muonIdHelperTool->tgcIdHelper().channel(channelIdIn);
+  int gasGap_i = m_idHelperSvc->tgcIdHelper().gasGap(channelIdIn);
+  int channel_i = m_idHelperSvc->tgcIdHelper().channel(channelIdIn);
   double width_i = 0.;
-  if(!(static_cast<bool>(m_muonIdHelperTool->tgcIdHelper().isStrip(channelIdIn)))) { // wire 
+  if(!(static_cast<bool>(m_idHelperSvc->tgcIdHelper().isStrip(channelIdIn)))) { // wire 
     width_i = getWidthWire(descriptor_i, gasGap_i, channel_i);
   } else { // strip
     width_i = getWidthStrip(descriptor_i, gasGap_i, channel_i, channelIdIn);
@@ -795,10 +767,10 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTracklet(const TgcRdo::const_it
 					     descriptor_o, // determined from channelIdOut
 					     TgcCoinData::TYPE_TRACKLET, 
 					     ((*itD)->subDetectorId()==ASIDE), // isAside
-					     static_cast<int>(m_muonIdHelperTool->tgcIdHelper().stationPhi(channelIdOut)), // phi
+					     static_cast<int>(m_idHelperSvc->tgcIdHelper().stationPhi(channelIdOut)), // phi
                                              0, // isInner
 					     ((*itD)->sswId()==7||(*itD)->sswId()==2), // isForward
-					     static_cast<bool>(m_muonIdHelperTool->tgcIdHelper().isStrip(channelIdOut)), // isStrip
+					     static_cast<bool>(m_idHelperSvc->tgcIdHelper().isStrip(channelIdOut)), // isStrip
 					     trackletId, // trackletId
 					     hitPosition_i, // determined from channelIdIn
 					     hitPosition_o, // determined from channelIdOut
@@ -929,12 +901,12 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI(const TgcRdo::cons
   }
 
   // Retrieve ElementID from OfflineID
-  Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelIdIn);
+  Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelIdIn);
 
   // Retrieve Hash from ElementID
   IdentifierHash tgcHashId;
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
-  if(m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
+  if(m_idHelperSvc->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
     ATH_MSG_WARNING("Unable to get TGC hash id from TGC RDO collection "
                     << "context begin_index = " << tgcContext.begin_index()
                     << " context end_index  = " << tgcContext.end_index()
@@ -948,7 +920,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI(const TgcRdo::cons
 
   // Get corresponding collection 
   TgcCoinDataCollection* coincollection = Muon::IDC_Helper::getCollection<TgcCoinDataContainer, TgcIdHelper>
-    (elementId, m_tgcCoinDataContainer[locId], m_muonIdHelperTool->tgcIdHelper(), msg());
+    (elementId, m_tgcCoinDataContainer[locId], m_idHelperSvc->tgcIdHelper(), msg());
 
   // Check duplicate digits
   TgcCoinDataCollection::const_iterator it_tgcCoinData   = coincollection->begin();
@@ -958,7 +930,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI(const TgcRdo::cons
        (channelIdIn==(*it_tgcCoinData)->channelIdIn()) && // channelIdIn
        (static_cast<int>((*itD)->subMatrix())==(*it_tgcCoinData)->sub())) { // sub
       ATH_MSG_DEBUG("Duplicated TgcCoinData (TrackletEIFI) = "
-		    << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelIdIn));
+		    << m_idHelperSvc->tgcIdHelper().show_to_string(channelIdIn));
       return StatusCode::SUCCESS;
     }
   }
@@ -967,7 +939,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI(const TgcRdo::cons
   const MuonGM::TgcReadoutElement* descriptor = m_muonMgr->getTgcReadoutElement(channelIdIn);
   if(!isOfflineIdOKForTgcReadoutElement(descriptor, channelIdIn)) {
     ATH_MSG_WARNING("Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI descriptor doesn't contain " 
-		    << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelIdIn));
+		    << m_idHelperSvc->tgcIdHelper().show_to_string(channelIdIn));
     return StatusCode::SUCCESS;
   }
 
@@ -983,8 +955,8 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI(const TgcRdo::cons
 
   // Get width from channelIdIn, one subMatrix covers 8 channels per gasGap 
   double width = 0.;
-  int gasGap = m_muonIdHelperTool->tgcIdHelper().gasGap(channelIdIn); // 1
-  int channel = m_muonIdHelperTool->tgcIdHelper().channel(channelIdIn); // 4, 12, 20, 28
+  int gasGap = m_idHelperSvc->tgcIdHelper().gasGap(channelIdIn); // 1
+  int channel = m_idHelperSvc->tgcIdHelper().channel(channelIdIn); // 4, 12, 20, 28
   if(isStrip) { // Strip
     double localZ = (descriptor->transform(channelIdIn).inverse()*descriptor->channelPos(channelIdIn)).z();
     double stripMaxX  = descriptor->stripMaxX(gasGap, channel+4, localZ);
@@ -1010,7 +982,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeTrackletEIFI(const TgcRdo::cons
                                              descriptor, // determined from channelIdIn
 					     TgcCoinData::TYPE_TRACKLET_EIFI,
                                              isAside, 
-                                             m_muonIdHelperTool->tgcIdHelper().stationPhi(channelIdIn), 
+                                             m_idHelperSvc->tgcIdHelper().stationPhi(channelIdIn), 
                                              isForward, 
                                              isStrip, 
                                              hitPosition, // determined from channelIdIn
@@ -1047,7 +1019,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
 
   TgcCoinDataCollection* coincollection = 0;
   IdentifierHash tgcHashId;
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
   
   int slbsubMatrix = 0;
   bool isBackward = isBackwardBW(itD);  // Backward or Forward
@@ -1134,10 +1106,10 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
   //}
   //*** TGC1 end ***//
   
-  ATH_MSG_DEBUG("TGC RDO->Coindata for HIPT: " << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelIdOut[1])); 
+  ATH_MSG_DEBUG("TGC RDO->Coindata for HIPT: " << m_idHelperSvc->tgcIdHelper().show_to_string(channelIdOut[1])); 
   
-  Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelIdOut[1]);
-  if(m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
+  Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelIdOut[1]);
+  if(m_idHelperSvc->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
     ATH_MSG_WARNING("Unable to get TGC hash id from TGC RDO collection "
 		    << "context begin_index = " << tgcContext.begin_index()
 		    << " context end_index  = " << tgcContext.end_index()
@@ -1149,7 +1121,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
     ? 1 : (*itD)->bcTag()-1;
 
   coincollection = Muon::IDC_Helper::getCollection<TgcCoinDataContainer, TgcIdHelper>
-    (elementId, m_tgcCoinDataContainer[locId], m_muonIdHelperTool->tgcIdHelper(), msg());
+    (elementId, m_tgcCoinDataContainer[locId], m_idHelperSvc->tgcIdHelper(), msg());
   
   //*** TGC3 start ***// 
   // Get geometry of pivot plane 
@@ -1162,8 +1134,8 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
   }
 
   for(int i=0; i<2; i++) { 
-    gasGap_o[i] = m_muonIdHelperTool->tgcIdHelper().gasGap(channelIdOut[i]);
-    channel_o[i] = m_muonIdHelperTool->tgcIdHelper().channel(channelIdOut[i]);
+    gasGap_o[i] = m_idHelperSvc->tgcIdHelper().gasGap(channelIdOut[i]);
+    channel_o[i] = m_idHelperSvc->tgcIdHelper().channel(channelIdOut[i]);
   }
 
   if(!((*itD)->isStrip())) { // wire
@@ -1205,8 +1177,8 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
     }
   }
   for(int i=0; i<4; i++) { 
-    gasGap_i[i] = m_muonIdHelperTool->tgcIdHelper().gasGap(channelIdIn[i]); 
-    channel_i[i] = m_muonIdHelperTool->tgcIdHelper().channel(channelIdIn[i]); 
+    gasGap_i[i] = m_idHelperSvc->tgcIdHelper().gasGap(channelIdIn[i]); 
+    channel_i[i] = m_idHelperSvc->tgcIdHelper().channel(channelIdIn[i]); 
   }
     
   if(!(*itD)->isStrip()) { // WIRE
@@ -1256,7 +1228,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
 	m_nHiPtRDOs--; // Reduce the number of input RDOs. 
       }
       ATH_MSG_DEBUG("Duplicated TgcCoinData (HiPt) = "
-		    << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelIdOut_tmp));
+		    << m_idHelperSvc->tgcIdHelper().show_to_string(channelIdOut_tmp));
       return StatusCode::SUCCESS;
     }
   }
@@ -1273,7 +1245,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeHiPt(const TgcRdo::const_iterat
 					     descriptor_oo, // determined from channelIdOut_tmp
 					     TgcCoinData::TYPE_HIPT, // Coincidence type
 					     ((*itD)->subDetectorId()==ASIDE), // isAside
-					     static_cast<int>(m_muonIdHelperTool->tgcIdHelper().stationPhi(channelIdOut_tmp)), // phi
+					     static_cast<int>(m_idHelperSvc->tgcIdHelper().stationPhi(channelIdOut_tmp)), // phi
                                              0, // isInner
 					     static_cast<bool>((*itD)->isForward()), // isForward
 					     static_cast<bool>((*itD)->isStrip()), // isStrip
@@ -1316,7 +1288,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeInner(const TgcRdo::const_itera
 
   TgcCoinDataCollection* coincollection = 0;
   IdentifierHash tgcHashId;
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
  
   Identifier channelIdIn; 
   Identifier channelIdOut; 
@@ -1343,8 +1315,8 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeInner(const TgcRdo::const_itera
   int stationEta = isAside ? 1 : -1;
   int stationPhi = phi;
 
-  Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(stationName, stationEta, stationPhi, true);
-  if(m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
+  Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(stationName, stationEta, stationPhi, true);
+  if(m_idHelperSvc->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
     ATH_MSG_WARNING("Unable to get TGC hash id from TGC RDO collection "
 		    << "context begin_index = " << tgcContext.begin_index()
 		    << " context end_index  = " << tgcContext.end_index()
@@ -1353,7 +1325,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeInner(const TgcRdo::const_itera
   }
   
   coincollection = Muon::IDC_Helper::getCollection<TgcCoinDataContainer, TgcIdHelper>
-    (elementId, m_tgcCoinDataContainer[locId], m_muonIdHelperTool->tgcIdHelper(), msg());
+    (elementId, m_tgcCoinDataContainer[locId], m_idHelperSvc->tgcIdHelper(), msg());
   
   ATH_MSG_DEBUG("Inner Data Word, phi: " << phi << " isAside: " << isAside << " isEndcap: " << isEndcap
                 << " subDetectorId: " << subDetectorId << " isStrip: " << (*itD)->isStrip()
@@ -1402,7 +1374,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeSL(const TgcRdo::const_iterator
   
   TgcCoinDataCollection* coincollection = 0;
   IdentifierHash tgcHashId;
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context();
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context();
   
   bool found = false;
 
@@ -1440,10 +1412,10 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeSL(const TgcRdo::const_iterator
     return StatusCode::SUCCESS;
   }
 
-  ATH_MSG_DEBUG("TGC RDO->TgcCoindata(SL): " << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelId_wire[1])); 
+  ATH_MSG_DEBUG("TGC RDO->TgcCoindata(SL): " << m_idHelperSvc->tgcIdHelper().show_to_string(channelId_wire[1])); 
   
-  Identifier elementId = m_muonIdHelperTool->tgcIdHelper().elementID(channelId_wire[1]);
-  if(m_muonIdHelperTool->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
+  Identifier elementId = m_idHelperSvc->tgcIdHelper().elementID(channelId_wire[1]);
+  if(m_idHelperSvc->tgcIdHelper().get_hash(elementId, tgcHashId, &tgcContext)) {
     ATH_MSG_WARNING("Unable to get TGC hash id from TGC RDO collection "
 		    << "context begin_index = " << tgcContext.begin_index()
 		    << " context end_index  = " << tgcContext.end_index()
@@ -1455,7 +1427,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeSL(const TgcRdo::const_iterator
     ? 1 : (*itD)->bcTag()-1;
 
   coincollection = Muon::IDC_Helper::getCollection<TgcCoinDataContainer, TgcIdHelper>
-    (elementId, m_tgcCoinDataContainer[locId], m_muonIdHelperTool->tgcIdHelper(), msg());
+    (elementId, m_tgcCoinDataContainer[locId], m_idHelperSvc->tgcIdHelper(), msg());
   
   int trackletId = 2*sbLoc_w + subMatrix_w;
   int trackletIdStrip = 2*sbLoc_s + subMatrix_s;
@@ -1478,7 +1450,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeSL(const TgcRdo::const_iterator
        (isPositiveDeltaR==(*it_tgcCoinData)->isPositiveDeltaR()) 
        ) {
       ATH_MSG_DEBUG("Duplicated TgcCoinData (SL) = "
-		    << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelId_wire[2]));
+		    << m_idHelperSvc->tgcIdHelper().show_to_string(channelId_wire[2]));
       return StatusCode::SUCCESS;
     }
   }
@@ -1546,7 +1518,7 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::decodeSL(const TgcRdo::const_iterator
 					     descriptor_w2, // determined from channelId_wire[2]
 					     TgcCoinData::TYPE_SL, // Coincidence type
 					     static_cast<bool>((*itD)->subDetectorId()==ASIDE), // isAside
-					     static_cast<int>(m_muonIdHelperTool->tgcIdHelper().stationPhi(channelId_wire[2])), // phi
+					     static_cast<int>(m_idHelperSvc->tgcIdHelper().stationPhi(channelId_wire[2])), // phi
 					     static_cast<bool> ((*itD)->isForward()), // isForward
 					     trackletId, // trackletId 
 					     trackletIdStrip, // trackletIdStrip
@@ -1698,7 +1670,7 @@ bool Muon::TgcRdoToPrepDataToolCore::isOfflineIdOKForTgcReadoutElement(const Muo
 								   const Identifier channelId)
 {
   if(!descriptor || !descriptor->containsId(channelId)) {
-    ATH_MSG_DEBUG("Illegal OfflineID for TgcReadoutElement" << m_muonIdHelperTool->tgcIdHelper().show_to_string(channelId));
+    ATH_MSG_DEBUG("Illegal OfflineID for TgcReadoutElement" << m_idHelperSvc->tgcIdHelper().show_to_string(channelId));
     return false;
   }
   return true;
@@ -1723,7 +1695,7 @@ void Muon::TgcRdoToPrepDataToolCore::showIdentifierHashVector(std::vector<Identi
 
 void Muon::TgcRdoToPrepDataToolCore::fillIdentifierHashVector(std::vector<IdentifierHash>& selectedIdHashVect) {  
   // Fill the hashes with hits or coincidences   
-  unsigned int HashId_max = m_muonIdHelperTool->tgcIdHelper().module_hash_max();  
+  unsigned int HashId_max = m_idHelperSvc->tgcIdHelper().module_hash_max();  
   for(unsigned int HashId=0; HashId<HashId_max; HashId++) {  
     IdentifierHash offlineCollHash(static_cast<IdentifierHash>(HashId));  
     if(isIdentifierHashFoundInAnyTgcPrepDataContainer(offlineCollHash) ||  
@@ -1740,7 +1712,7 @@ void Muon::TgcRdoToPrepDataToolCore::showIdentifierHash() {
   if(!(this->msgLvl(MSG::DEBUG))) return;
 
   unsigned int nc = 0;
-  unsigned int HashId_max = m_muonIdHelperTool->tgcIdHelper().module_hash_max();
+  unsigned int HashId_max = m_idHelperSvc->tgcIdHelper().module_hash_max();
   for(unsigned int HashId=0; HashId<HashId_max; HashId++) {
     nc++;
     IdentifierHash offlineCollHash(static_cast<IdentifierHash>(HashId));
@@ -2295,8 +2267,8 @@ bool Muon::TgcRdoToPrepDataToolCore::getSLWireGeometry(const Identifier* channel
   int gasGap_w[3] = {0, 0, 0};
   int channel_w[3] = {0, 0, 0};
   for(int i=0; i<3; i++) {
-    gasGap_w[i] = m_muonIdHelperTool->tgcIdHelper().gasGap(channelId_wire[i]);
-    channel_w[i] = m_muonIdHelperTool->tgcIdHelper().channel(channelId_wire[i]);
+    gasGap_w[i] = m_idHelperSvc->tgcIdHelper().gasGap(channelId_wire[i]);
+    channel_w[i] = m_idHelperSvc->tgcIdHelper().channel(channelId_wire[i]);
   }
   double tmp_r_w[3] = {0., 0., 0.};
   double tmp_phi_w[3] = {0., 0., 0.};
@@ -2368,8 +2340,8 @@ bool Muon::TgcRdoToPrepDataToolCore::getSLStripGeometry(const Identifier* channe
   int gasGap_s[3] = {0, 0, 0};
   int channel_s[3] = {0, 0, 0};
   for(int i=0; i<3; i++) {
-    gasGap_s[i] = m_muonIdHelperTool->tgcIdHelper().gasGap(channelId_strip[i]);
-    channel_s[i] = m_muonIdHelperTool->tgcIdHelper().channel(channelId_strip[i]);
+    gasGap_s[i] = m_idHelperSvc->tgcIdHelper().gasGap(channelId_strip[i]);
+    channel_s[i] = m_idHelperSvc->tgcIdHelper().channel(channelId_strip[i]);
   }
 
   Amg::Vector3D localPos[3];
@@ -2605,8 +2577,8 @@ bool Muon::TgcRdoToPrepDataToolCore::getPosAndIdWireIn(const MuonGM::TgcReadoutE
     return false;
   }
   
-  int gasGap_tmp = m_muonIdHelperTool->tgcIdHelper().gasGap(channelIdIn_tmp);
-  int channel_tmp = m_muonIdHelperTool->tgcIdHelper().channel(channelIdIn_tmp);
+  int gasGap_tmp = m_idHelperSvc->tgcIdHelper().gasGap(channelIdIn_tmp);
+  int channel_tmp = m_idHelperSvc->tgcIdHelper().channel(channelIdIn_tmp);
   double half_width = getWidthWire(descriptor_iw, gasGap_tmp, channel_tmp)/2.;
   if(half_width<s_cutDropPrdsWithZeroWidth/2. && m_dropPrdsWithZeroWidth) { // Invalid PRD's whose widths are zero are dropped.
     return false;
@@ -3190,16 +3162,16 @@ StatusCode Muon::TgcRdoToPrepDataToolCore::getCabling() {
   }
 
   // check the relation between hash and onlineId (onlineId depends on cabling)  
-  unsigned int hashId_max = m_muonIdHelperTool->tgcIdHelper().module_hash_max();  
+  unsigned int hashId_max = m_idHelperSvc->tgcIdHelper().module_hash_max();  
   m_hashToOnlineId.reserve(hashId_max);  
-  IdContext tgcContext = m_muonIdHelperTool->tgcIdHelper().module_context(); // TGC context   
+  IdContext tgcContext = m_idHelperSvc->tgcIdHelper().module_context(); // TGC context   
   Identifier elementId;  
   int subDetectorId = 0; // 103(=0x67) for A side, 104(=0x68) for C side  
   int rodId = 0; // 1 to 12 (12-fold cabling), 0 to 7 (8-fold cabling)   
   TgcRdo tgcRdo; // For onlineId conversion  
   for(unsigned int hashId=0; hashId<hashId_max; hashId++) {  
     IdentifierHash hash(hashId);  
-    m_muonIdHelperTool->tgcIdHelper().get_id(hash, elementId, &tgcContext);  
+    m_idHelperSvc->tgcIdHelper().get_id(hash, elementId, &tgcContext);  
     m_tgcCabling->getReadoutIDfromElementID(elementId, subDetectorId, rodId);  
     // onlineId: 0 to 11 on A side and 12 to 23 on C side (12-fold cabling)  
     //           0 to  7 on A side and  8 to 15 on C side (8-fold cabling)  
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.h
index 7b420bcdb74509cc11b62e5cc8bcac0f62dc8257..cebc7c625133bd023b41a4106dcafff759933c7d 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolCore.h
@@ -1,31 +1,22 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-///////////////////////////////////////////////////////////////////
-// TgcRdoToPrepDataToolCore.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
 #ifndef MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOLCORE_H
 #define MUONTGC_CNVTOOLS_TGCRDOTOPREPDATATOOLCORE_H
 
-#include <string>
-
-#include "AthenaBaseComps/AthAlgTool.h"
 #include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
 
-#include "GaudiKernel/ToolHandle.h"
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
 #include "MuonRDO/TgcRdo.h"
 #include "MuonTrigCoinData/TgcCoinDataContainer.h"
-
 #include "MuonRDO/TgcRdoContainer.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+#include "TGCcablingInterface/ITGCcablingSvc.h"
 
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-class AtlasDetectorID;
-class Identifier;
-
-class ITGCcablingSvc;
+#include <string>
 
 namespace MuonGM 
 {
@@ -53,7 +44,7 @@ namespace Muon
       TgcRdoToPrepDataToolCore(const std::string& t, const std::string& n, const IInterface* p);
       
       /** Destructor */
-      virtual ~TgcRdoToPrepDataToolCore();
+      virtual ~TgcRdoToPrepDataToolCore()=default;
       
       /** Query the IMuonRdoToPrepDataTool interface */
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIf) override;
@@ -312,11 +303,9 @@ namespace Muon
       const Amg::Vector2D* getSLLocalPosition(const MuonGM::TgcReadoutElement* readout, const Identifier, const double eta, const double phi) const; 
 
       /** muon detector manager */
-      const MuonGM::MuonDetectorManager * m_muonMgr;
+      const MuonGM::MuonDetectorManager* m_muonMgr;
 
-      /** Tool for TGC identifier helper */
-      ToolHandle<Muon::MuonIdHelperTool> m_muonIdHelperTool{this, "idHelper", 
-        "Muon::MuonIdHelperTool/MuonIdHelperTool", "Handle to the MuonIdHelperTool"};
+      ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
       
       /* TGC Cabling service */
       const ITGCcablingSvc* m_tgcCabling;
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx
index d8f629fbe5c2b8971b6d3e4a194a31e635f74ebf..b36db087959922e7080f1f1217bf688bf04cdffc 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.cxx
@@ -1,27 +1,18 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// TGC_CnvTool.cxx, (c) ATLAS Detector software
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
 #include "TgcRdoToPrepDataToolMT.h"
 
 #include "MuonDigitContainer/TgcDigit.h"
 #include "MuonTrigCoinData/TgcCoinData.h"
 
-
 Muon::TgcRdoToPrepDataToolMT::TgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p)
   : AthAlgTool(t, n, p), 
     TgcRdoToPrepDataToolCore(t, n, p)
 {
 }  
 
-Muon::TgcRdoToPrepDataToolMT::~TgcRdoToPrepDataToolMT()
-{
-}
-
 StatusCode Muon::TgcRdoToPrepDataToolMT::initialize()
 {
   ATH_MSG_VERBOSE("Starting init");
@@ -30,11 +21,6 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::initialize()
   return StatusCode::SUCCESS;
 }
 
-StatusCode Muon::TgcRdoToPrepDataToolMT::finalize()
-{
-  return TgcRdoToPrepDataToolCore::finalize();
-}
-
 StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& requestedIdHashVect, 
   std::vector<IdentifierHash>& selectedIdHashVect)
 {
@@ -61,7 +47,7 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& req
     SG::WriteHandle<TgcPrepDataContainer>  handle(m_outputprepdataKeys[ibc]);
     
     // record the container in storeGate
-    handle = std::unique_ptr<TgcPrepDataContainer> (new TgcPrepDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
+    handle = std::unique_ptr<TgcPrepDataContainer> (new TgcPrepDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max()));
     // cache the pointer, storegate retains ownership
     m_tgcPrepDataContainer[ibc] = handle.ptr();
     if(!handle.isValid()) {
@@ -82,13 +68,7 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& req
   bool nothingToDoForAllBC = true;
   for(int ibc=0; ibc<NBC; ibc++) {
     if(!nothingToDo[ibc]) nothingToDoForAllBC = false;
-  } 
-  
-  /*if(nothingToDoForAllBC) {
-    ATH_MSG_DEBUG("Whole events at all " << NBC << " BCs have already been decoded; nothing to do");
-    return StatusCode::SUCCESS;
-    }*/
-
+  }
   
   /// clean up containers for Coincidence
   for(int ibc=0; ibc<NBC; ibc++) {
@@ -96,7 +76,7 @@ StatusCode Muon::TgcRdoToPrepDataToolMT::decode(std::vector<IdentifierHash>& req
     SG::WriteHandle<TgcCoinDataContainer>  handle(m_outputCoinKeys[ibc]);
     
     // record the container in storeGate
-    handle = std::unique_ptr<TgcCoinDataContainer> (new TgcCoinDataContainer(m_muonIdHelperTool->tgcIdHelper().module_hash_max()));
+    handle = std::unique_ptr<TgcCoinDataContainer> (new TgcCoinDataContainer(m_idHelperSvc->tgcIdHelper().module_hash_max()));
     
     // cache the pointer, storegate retains ownership
     m_tgcCoinDataContainer[ibc] = handle.ptr();
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h
index ef08a36cd1df8a1677fe53478c7277665f62e6f2..a4ff379ab83d436f1df00ba066196593f0c30db5 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/src/TgcRdoToPrepDataToolMT.h
@@ -29,12 +29,10 @@ namespace Muon
       TgcRdoToPrepDataToolMT(const std::string& t, const std::string& n, const IInterface* p);
       
       /** Destructor */
-      virtual ~TgcRdoToPrepDataToolMT();
+      virtual ~TgcRdoToPrepDataToolMT()=default;
       
       /** Standard AthAlgTool initialize method */
       virtual StatusCode initialize() override;
-      /** Standard AthAlgTool finalize method */
-      virtual StatusCode finalize() override;
     
       using TgcRdoToPrepDataToolCore::decode; // To prevent the decode below from hiding the superclass decode methods
       virtual StatusCode decode(std::vector<IdentifierHash>& idVect, std::vector<IdentifierHash>& idWithDataVect) override;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RpcCablingCondData.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RpcCablingCondData.h
index b3304319459158f505eafd790e5ba53f5884dddc..0b55f041d4128a0f6faf145acc8d81c70b89ae1b 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RpcCablingCondData.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RpcCablingCondData.h
@@ -29,10 +29,10 @@ class RpcCablingCondData{
   typedef std::map <int,RDOindex,std::less < int > > RDOmap;
   typedef std::vector<const RDOindex*> OfflineOnlineHashMap;
   typedef std::map <Identifier,const RDOindex*,std::less < Identifier > > OfflineOnlineMap;
-  typedef Identifier ID;
   typedef std::vector < RPC_CondCabling::SectorLogicSetup > STvec;
   typedef std::map <IdentifierHash, std::set<IdentifierHash> > PRD_RDO_Map;
   typedef std::map <IdentifierHash, std::set<uint32_t> > PRD_ROB_Map;
+  typedef std::map <uint32_t, std::set<IdentifierHash> > ROB_RDO_Map;
 
   RpcCablingCondData()=default;
   virtual ~RpcCablingCondData()=default;
@@ -81,9 +81,10 @@ class RpcCablingCondData{
                                              int stationEta, int doubletR, int doubletZ, int cabStat) const;
 
   StatusCode giveRDO_fromPRD(const IdentifierHash prdHashId, std::vector<IdentifierHash>& rdoHashVec) const;
+  StatusCode giveRDO_fromPRD(const std::vector<IdentifierHash>& prdHashVec, std::vector<IdentifierHash>& rdoHashVec) const;
+  StatusCode giveRDO_fromROB(const std::vector<uint32_t>& robIdVec, std::vector<IdentifierHash>& rdoHashVec) const;
   StatusCode giveROB_fromPRD(const IdentifierHash prdHashId, std::vector<uint32_t>& robIdVec) const;
 
-
   virtual bool give_Pad_Parameters( unsigned short int logic_sector,
                                     unsigned short int PADId,
                                     bool & feet,
@@ -154,11 +155,13 @@ bool give_HighPt_borders_id(unsigned short int SubsystemId,
 
 Identifier strip_OffId_fromCode (unsigned long int strip_code, const RpcIdHelper* rpcId) const;
 
+bool giveOfflineId(const unsigned short int side, const unsigned short int sector, const unsigned short int padId, Identifier& id) const;
+
   // migrate from RpcPadIDHash
   // reverse conversion 
-  ID identifier(int i) const;
+  Identifier identifier(int i) const;
 
-  int operator() (const ID& id) const ;
+  int operator() (const Identifier& id) const ;
   int max() const; 
   int offset() const ;
   std::vector<IdentifierHash> rod2hash(uint16_t subsystem, uint16_t rod) const;
@@ -188,23 +191,24 @@ Identifier strip_OffId_fromCode (unsigned long int strip_code, const RpcIdHelper
   std::vector<std::string> m_vecphiInfo;
 
   // migrate from RpcPadIDHash
-  std::vector<ID> m_int2id;
+  std::vector<Identifier> m_int2id;
   std::vector<IdentifierHash> m_rod2hash[2][16];
-  std::map<Identifier,int>  m_lookup;
+  std::map<Identifier,int> m_lookup;
 
-  std::vector<uint32_t>   m_fullListOfRobIds;
+  std::vector<uint32_t> m_fullListOfRobIds;
   int m_SectorMap[64]; 
   // array; for each sectorlogic type returns the SectorLogicSetup
   STvec m_SectorType;
   PRD_RDO_Map m_PRD_RDO_map;
   PRD_ROB_Map m_PRD_ROB_map;
+  ROB_RDO_Map m_ROB_RDO_map;
 
   int m_MaxType;
 
   // list of RPCPadParameters
   RPCPadParameters  m_RPCPadParameters_array[64][8];
 
-
+  Identifier m_offline_id[2][32][10];
 
 };
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx
index 5aa8854c9237f3364eb6d04acc54508ee5ff8cd5..13836a732b82094c174e04477fe20d4c28e6e1a2 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondAlg.cxx
@@ -8,7 +8,7 @@ RpcCablingCondAlg::RpcCablingCondAlg(const std::string& name, ISvcLocator* pSvcL
   AthAlgorithm(name, pSvcLocator),
   m_ConfMapPString(nullptr),
   m_MaxType(0),
-  m_SectorMap{0},
+  m_SectorMap(),
   m_Version(""),
   m_condSvc("CondSvc",name)
 {
@@ -521,6 +521,9 @@ StatusCode RpcCablingCondAlg::buildRDOmap(RpcCablingCondData* writeCdo)
     Identifier id;
     pRDOindex->pad_identifier( id );
 
+    //build the offline_id vector
+    writeCdo->m_offline_id[sub_id_index][sec_id][pad_id] = id;
+
     // build the map
     std::pair < RpcCablingCondData::OfflineOnlineMap::iterator, bool> ins = writeCdo->m_RDOmap.insert( RpcCablingCondData::OfflineOnlineMap::value_type(id,pRDOindex));
     ATH_MSG_DEBUG("OfflineOnlineMap new entry: value  "<< m_idHelperSvc ->rpcIdHelper().show_to_string(id) << 
@@ -530,6 +533,13 @@ StatusCode RpcCablingCondAlg::buildRDOmap(RpcCablingCondData* writeCdo)
       return StatusCode::FAILURE;
     }
 
+    //build the ROB->RDO map
+    std::pair<std::set<IdentifierHash>::iterator, bool> insert_ROB_RDO_returnVal = writeCdo->m_ROB_RDO_map[ROB_ID].insert(IdentifierHash(pRDOindex->hash()));
+    if (insert_ROB_RDO_returnVal.second)
+      ATH_MSG_DEBUG("A new RDO HashId = " << pRDOindex->hash() << " registered for ROB Id = " << ROB_ID);
+    else
+      ATH_MSG_VERBOSE("The RDO HashId = " << pRDOindex->hash() << " was already registered for ROB Id = " << ROB_ID);
+
     //build the PRD->RDO and PRD->ROB maps
     ATH_MSG_VERBOSE("Looking for PRDs corresponding to this RDO");
     std::list<Identifier> strip_id_list;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondData.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondData.cxx
index a02ae192f4bdc998085eb3f3891ddecbee07f559..8dcb3a21885212196f2f030ef825044e22d8b13a 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondData.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RpcCablingCondData.cxx
@@ -107,7 +107,7 @@ bool RpcCablingCondData::give_PADid(const unsigned int hashID, unsigned short in
 
 const std::vector<uint32_t>& RpcCablingCondData::giveFullListOfRobIds() const {return m_fullListOfRobIds;}
 
-RpcCablingCondData::ID RpcCablingCondData::identifier(int index) const 
+Identifier RpcCablingCondData::identifier(int index) const 
 {
   int size = m_int2id.size();
   if(index>=0 && index < size) { return m_int2id[index] ; }
@@ -116,9 +116,9 @@ RpcCablingCondData::ID RpcCablingCondData::identifier(int index) const
   return id; 
 }
 
-int RpcCablingCondData::operator() (const  ID& id) const 
+int RpcCablingCondData::operator() (const Identifier& id) const 
 {
-  std::map<ID,int>::const_iterator it = m_lookup.find(id); 
+  std::map<Identifier,int>::const_iterator it = m_lookup.find(id); 
   if(it!=m_lookup.end()){
     return (*it).second; 
   }
@@ -423,6 +423,56 @@ StatusCode RpcCablingCondData::giveRDO_fromPRD(const IdentifierHash prdHashId, s
   return sc;
 }
 
+StatusCode RpcCablingCondData::giveRDO_fromPRD(const std::vector<IdentifierHash>& prdHashVec, std::vector<IdentifierHash>& rdoHashVec) const
+{
+  StatusCode sc = StatusCode::SUCCESS;
+  
+  rdoHashVec.clear();
+  std::set<IdentifierHash> requestedRdoHashSet;
+  
+  for (IdentifierHash prdHashId : prdHashVec) {
+    //find the requested PRD HashId in the map
+    PRD_RDO_Map::const_iterator it = m_PRD_RDO_map.find(prdHashId);
+    if (it == m_PRD_RDO_map.cend()) {
+      continue;
+    }
+    //if the PRD was found in the map, add the corresponding set of RDO HashIds to the set of requested RDO HashIds
+    requestedRdoHashSet.insert((*it).second.begin(), (*it).second.end());
+  }
+  
+  //convert set to vector
+  for (IdentifierHash rdoHashId : requestedRdoHashSet) {
+    rdoHashVec.push_back(rdoHashId);
+  }
+  
+  return sc;
+}
+
+StatusCode RpcCablingCondData::giveRDO_fromROB(const std::vector<uint32_t>& robIdVec, std::vector<IdentifierHash>& rdoHashVec) const
+{
+  StatusCode sc = StatusCode::SUCCESS;
+  
+  rdoHashVec.clear();
+  std::set<IdentifierHash> requestedRdoHashSet;
+  
+  for (uint32_t robId : robIdVec) {
+    //find the requested ROB Id in the map
+    ROB_RDO_Map::const_iterator it = m_ROB_RDO_map.find(robId);
+    if (it == m_ROB_RDO_map.cend()) {
+      continue;
+    }
+    //if the ROB Id was found in the map, add the corresponding set of RDO HashIds to the set of requested RDO HashIds
+    requestedRdoHashSet.insert((*it).second.begin(), (*it).second.end());
+  }
+  
+  //convert set to vector
+  for (IdentifierHash rdoHashId : requestedRdoHashSet) {
+    rdoHashVec.push_back(rdoHashId);
+  }
+  
+  return sc;
+}
+
 StatusCode RpcCablingCondData::giveROB_fromPRD(const IdentifierHash prdHashId, std::vector<uint32_t>& robIdVec) const
 {
   StatusCode sc = StatusCode::SUCCESS;
@@ -786,5 +836,13 @@ RpcCablingCondData::strip_OffId_fromCode (unsigned long int strip_code, const Rp
            rpc_strip.strip);
 }
 
-
+bool RpcCablingCondData::giveOfflineId(const unsigned short int side, const unsigned short int sector, const unsigned short int padId, Identifier& id) const
+{
+  if (side>=2) return false;
+  if (sector>=32) return false;
+  if (padId>=10) return false;
+  id = m_offline_id[side][sector][padId];
+  if (!id.is_valid()) return false;
+  return true;
+}
 
diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref
index e80eb113ac0ce5c253102dd66a21a8c9a7920827..28b682a17f7406cadf3ec16c9bd5e7787714688f 100644
--- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref
+++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest.ref
@@ -1,23 +1,564 @@
+Flag Name                                : Value
+Beam.BunchSpacing                        : 25
+Beam.Energy                              : [function]
+Beam.NumberOfCollisions                  : [function]
+Beam.Type                                : [function]
+Beam.estimatedLuminosity                 : [function]
+Common.Project                           : 'Athena'
+Common.bunchCrossingSource               : [function]
+Common.doExpressProcessing               : False
+Common.isOnline                          : False
+Common.useOnlineLumi                     : [function]
+Concurrency.NumConcurrentEvents          : 0
+Concurrency.NumProcs                     : 0
+Concurrency.NumThreads                   : 0
+GeoModel.Align.Dynamic                   : [function]
+GeoModel.AtlasVersion                    : 'ATLAS-R2-2016-01-00-01'
+GeoModel.IBLLayout                       : [function]
+GeoModel.Layout                          : 'atlas'
+GeoModel.Run                             : [function]
+GeoModel.StripGeoType                    : [function]
+GeoModel.Type                            : [function]
+IOVDb.DatabaseInstance                   : [function]
+IOVDb.GlobalTag                          : 'CONDBR2-BLKPA-2018-13'
+Input.Collections                        : [function]
+Input.Files                              : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1']
+Input.Format                             : [function]
+Input.ProjectName                        : [function]
+Input.RunNumber                          : [function]
+Input.SecondaryCollections               : [function]
+Input.SecondaryFiles                     : []
+Input.isMC                               : [function]
+Output.AODFileName                       : ''
+Output.ESDFileName                       : ''
+Output.EVNTFileName                      : ''
+Output.HISTFileName                      : ''
+Output.HITSFileName                      : ''
+Output.RDOFileName                       : ''
+Output.RDO_SGNLFileName                  : ''
+Output.doESD                             : [function]
+Output.doWriteAOD                        : [function]
+Output.doWriteBS                         : False
+Output.doWriteESD                        : [function]
+Output.doWriteRDO                        : [function]
+Output.doWriteRDO_SGNL                   : [function]
+Random.Engine                            : 'dSFMT'
+Scheduler.CheckDependencies              : True
+Scheduler.ShowControlFlow                : True
+Scheduler.ShowDataDeps                   : True
+Scheduler.ShowDataFlow                   : True
+TrackingGeometry.MagneticFileMode        : 6
+TrackingGeometry.MaterialSource          : 'COOL'
+Flag categories that can be loaded dynamically
+Category                  :                 Generator name : Defined in
+BField                    :                       __bfield : AthenaConfiguration/AllConfigFlags.py
+BTagging                  :                     __btagging : AthenaConfiguration/AllConfigFlags.py
+Calo                      :                         __calo : AthenaConfiguration/AllConfigFlags.py
+DQ                        :                           __dq : AthenaConfiguration/AllConfigFlags.py
+Detector                  :                     __detector : AthenaConfiguration/AllConfigFlags.py
+Digitization              :                 __digitization : AthenaConfiguration/AllConfigFlags.py
+Egamma                    :                       __egamma : AthenaConfiguration/AllConfigFlags.py
+InDet                     :                        __indet : AthenaConfiguration/AllConfigFlags.py
+LAr                       :                          __lar : AthenaConfiguration/AllConfigFlags.py
+Muon                      :                         __muon : AthenaConfiguration/AllConfigFlags.py
+MuonCombined              :                 __muoncombined : AthenaConfiguration/AllConfigFlags.py
+Overlay                   :                      __overlay : AthenaConfiguration/AllConfigFlags.py
+PF                        :                        __pflow : AthenaConfiguration/AllConfigFlags.py
+Sim                       :                   __simulation : AthenaConfiguration/AllConfigFlags.py
+Tile                      :                         __tile : AthenaConfiguration/AllConfigFlags.py
+Trigger                   :                      __trigger : AthenaConfiguration/AllConfigFlags.py
+Py:Athena            INFO About to setup Raw data decoding
+Py:AutoConfigFlags    INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Py:MetaReader        INFO Current mode used: peeker
+Py:MetaReader        INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1']
+Py:Athena            INFO using release [WorkDir-22.0.13] [x86_64-centos7-gcc8-opt] [atlas-work3/c0397ca1951] -- built on [2020-05-12T1917]
+Py:ConfigurableDb    INFO Read module info for 5576 configurables from 41 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+EventInfoMgtInit: Got release version  Athena-22.0.13
+Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO Print Config
+Py:ComponentAccumulator    INFO Event Inputs
+Py:ComponentAccumulator    INFO Event Algorithm Sequences
+Py:ComponentAccumulator    INFO Top sequence 0
+Py:ComponentAccumulator    INFO \__ AthAlgSeq (seq: SEQ AND)
+Py:ComponentAccumulator    INFO    \__ RpcRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ TgcRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ MdtRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ CscRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ RpcRdoToRpcPrepData (alg)
+Py:ComponentAccumulator    INFO    \__ TgcRdoToTgcPrepData (alg)
+Py:ComponentAccumulator    INFO    \__ CscRdoToCscPrepData (alg)
+Py:ComponentAccumulator    INFO    \__ CscThresholdClusterBuilder (alg)
+Py:ComponentAccumulator    INFO Condition Algorithms
+Py:ComponentAccumulator    INFO  \__ CondInputLoader (cond alg)
+Py:ComponentAccumulator    INFO  \__ MuonAlignmentCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ MuonDetectorCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ RpcCablingCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ MuonMDT_CablingAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ AtlasFieldMapCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ AtlasFieldCacheCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ RpcCondDbAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ MdtCalibDbAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ CscCondDbAlg (cond alg)
+Py:ComponentAccumulator    INFO Services
+Py:ComponentAccumulator    INFO ['EventSelector', 'ByteStreamInputSvc', 'EventPersistencySvc', 'ByteStreamCnvSvc', 'ROBDataProviderSvc', 'ByteStreamAddressProviderSvc', 'MetaDataStore', 'InputMetaDataStore', 'MetaDataSvc', 'ProxyProviderSvc', 'IOVDbSvc', 'PoolSvc', 'CondSvc', 'DBReplicaSvc', 'TagInfoMgr', 'GeoModelSvc', 'DetDescrCnvSvc', 'AthenaPoolCnvSvc', 'MuonIdHelperSvc', 'RPCcablingServerSvc', 'MuonRPC_CablingSvc', 'LVL1TGC::TGCRecRoiSvc', 'TGCcablingServerSvc', 'MuonMDT_CablingSvc', 'AtlasFieldSvc', 'CSCcablingSvc']
+Py:ComponentAccumulator    INFO Public Tools
+Py:ComponentAccumulator    INFO [
+Py:ComponentAccumulator    INFO   IOVDbMetaDataTool/IOVDbMetaDataTool,
+Py:ComponentAccumulator    INFO   ByteStreamMetadataTool/ByteStreamMetadataTool,
+Py:ComponentAccumulator    INFO   RPCCablingDbTool/RPCCablingDbTool,
+Py:ComponentAccumulator    INFO   Muon::RPC_RawDataProviderToolMT/RPC_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   Muon::TGC_RawDataProviderToolMT/TGC_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   MDTCablingDbTool/MDTCablingDbTool,
+Py:ComponentAccumulator    INFO   Muon::MDT_RawDataProviderToolMT/MDT_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   Muon::CSC_RawDataProviderToolMT/CSC_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   Muon::RpcRdoToPrepDataToolMT/RpcRdoToRpcPrepDataTool,
+Py:ComponentAccumulator    INFO   Muon::TgcRdoToPrepDataToolMT/TgcRdoToTgcPrepDataTool,
+Py:ComponentAccumulator    INFO   Muon::MdtRdoToPrepDataToolMT/MdtRdoToMdtPrepDataTool,
+Py:ComponentAccumulator    INFO   Muon::CscRdoToCscPrepDataToolMT/CscRdoToCscPrepDataTool,
+Py:ComponentAccumulator    INFO   CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool,
+Py:ComponentAccumulator    INFO ]
+Py:ComponentAccumulator    INFO Private Tools
+Py:ComponentAccumulator    INFO [
+Py:ComponentAccumulator    INFO ]
+Py:ComponentAccumulator    INFO TheApp properties
+Py:ComponentAccumulator    INFO   EvtSel : EventSelector
+Py:Athena            INFO Save Config
+
+JOs reading stage finished, launching CARunner from pickle file
+
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on lxplus728.cern.ch on Tue May 12 19:41:27 2020
+====================================================================================================================================
+ApplicationMgr       INFO Application Manager Configured successfully
+PublicTool  IOVDbMetaDataTool
+PublicTool  ByteStreamMetadataTool
+PublicTool  RPCCablingDbTool
+PublicTool  RPC_RawDataProviderToolMT
+PublicTool  TGC_RawDataProviderToolMT
+PublicTool  MDTCablingDbTool
+PublicTool  MDT_RawDataProviderToolMT
+PublicTool  CSC_RawDataProviderToolMT
+PublicTool  RpcRdoToRpcPrepDataTool
+PublicTool  TgcRdoToTgcPrepDataTool
+PublicTool  MdtRdoToMdtPrepDataTool
+PublicTool  CscRdoToCscPrepDataTool
+PublicTool  CscThresholdClusterBuilderTool
+CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = 438)
+CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+ClassIDSvc           INFO  getRegistryEntries: read 3838 CLIDRegistry entries for module ALL
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-05-11T2140/Athena/22.0.13/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus728.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/
+PoolSvc              INFO Successfully setup replica sorting algorithm
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
+MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool/IOVDbMetaDataTool','ByteStreamMetadataTool/ByteStreamMetadataTool'])
+ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ByteStreamAddre...   INFO initialized 
+ByteStreamAddre...   INFO -- Will fill Store with id =  0
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
+IOVDbSvc             INFO Global tag: CONDBR2-BLKPA-2018-13 set from joboptions
+IOVDbFolder          INFO Inputfile tag override disabled for /GLOBAL/BField/Maps
+IOVDbSvc             INFO Initialised with 11 connections and 30 folders
+IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 3039 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLONL_TDAQ/CONDBR2
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 230 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4058 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 139 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3331 CLIDRegistry entries for module ALL
+IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_TDAQ/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_RPC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_TGC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_RPC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_MDT/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_TGC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_MDT/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_GLOBAL/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_RPC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MDT/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_RPC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CSC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_MDT/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_CSC/CONDBR2
+IOVDbSvc             INFO Added taginfo remove for /CSC/FTHOLD
+IOVDbSvc             INFO Added taginfo remove for /CSC/NOISE
+IOVDbSvc             INFO Added taginfo remove for /CSC/PED
+IOVDbSvc             INFO Added taginfo remove for /CSC/PSLOPE
+IOVDbSvc             INFO Added taginfo remove for /CSC/RMS
+IOVDbSvc             INFO Added taginfo remove for /CSC/STAT
+IOVDbSvc             INFO Added taginfo remove for /CSC/T0BASE
+IOVDbSvc             INFO Added taginfo remove for /CSC/T0PHASE
+IOVDbSvc             INFO Added taginfo remove for /EXT/DCS/MAGNETS/SENSORDATA
+IOVDbSvc             INFO Added taginfo remove for /GLOBAL/BField/Maps
+IOVDbSvc             INFO Added taginfo remove for /MDT/CABLING/MAP_SCHEMA
+IOVDbSvc             INFO Added taginfo remove for /MDT/CABLING/MEZZANINE_SCHEMA
+IOVDbSvc             INFO Added taginfo remove for /MDT/RTBLOB
+IOVDbSvc             INFO Added taginfo remove for /MDT/T0BLOB
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/CSC/ILINES
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/ASBUILTPARAMS
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/BARREL
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEA
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEC
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/TGC/SIDEA
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/TGC/SIDEC
+IOVDbSvc             INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA
+IOVDbSvc             INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA_CORR
+IOVDbSvc             INFO Added taginfo remove for /RPC/DCS/DeadRopanels
+IOVDbSvc             INFO Added taginfo remove for /RPC/DCS/OffRopanels
+IOVDbSvc             INFO Added taginfo remove for /RPC/DQMF/ELEMENT_STATUS
+IOVDbSvc             INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_ETA
+IOVDbSvc             INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_PHI
+IOVDbSvc             INFO Added taginfo remove for /TDAQ/RunCtrl/SOR_Params
+IOVDbSvc             INFO Added taginfo remove for /TGC/CABLING/MAP_SCHEMA
+GeoModelSvc          INFO Explicitly initializing DetDescrCnvSvc
+DetDescrCnvSvc       INFO  initializing 
+DetDescrCnvSvc       INFO Found DetectorStore service
+DetDescrCnvSvc       INFO  filling proxies for detector managers 
+DetDescrCnvSvc       INFO  filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for IdDict with CLID 2411 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for AtlasID with CLID 164875623 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for PixelID with CLID 2516 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SCT_ID with CLID 2517 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TRT_ID with CLID 2518 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SiliconID with CLID 129452393 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileID with CLID 2901 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileHWID with CLID 2902 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileTBID with CLID 2903 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for ZdcID with CLID 190591643 and storage type 68 to detector store 
+GeoModelSvc.Muo...   INFO Initializing ...
+GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
+MuonGeoModel         INFO MuonDetectorFactory - constructor  MuonSystem OuterRadius 13000 Length 22030
+GeoModelSvc.Muo...   INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00
+GeoModelSvc.Muo...   INFO (from GeoModelSvc)    AtlasVersion = <ATLAS-R2-2016-01-00-01>  MuonVersion = <>
+GeoModelSvc.Muo...   INFO Keys for Muon Switches are  (key) ATLAS-R2-2016-01-00-01 (node) ATLAS
+GeoModelSvc.Muo...   INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01>  default MuonVersion is <MuonSpectrometer-R.08.01>
+GeoModelSvc.Muo...   INFO Properties have been set as follows: 
+GeoModelSvc.Muo...   INFO     LayoutName                     R
+GeoModelSvc.Muo...   INFO     IncludeCutouts                 0
+GeoModelSvc.Muo...   INFO     IncludeCutoutsBog              0
+GeoModelSvc.Muo...   INFO     IncludeCtbBis                  0
+GeoModelSvc.Muo...   INFO     ControlAlines                  111111
+GeoModelSvc.Muo...   INFO     MinimalGeoFlag                 0
+GeoModelSvc.Muo...   INFO     EnableCscIntAlignment          1
+GeoModelSvc.Muo...   INFO     EnableCscIntAlignmentFromGM    0
+GeoModelSvc.Muo...   INFO     ControlCscIntAlines            111111
+GeoModelSvc.Muo...   INFO     EnableMdtDeformations          1
+GeoModelSvc.Muo...   INFO     EnableMdtAsBuiltParameters     1
+MuGM:MuonFactory     INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures 
+MuGM:MuonFactory     INFO                    BOG cutouts are activated 1 , all other cutouts are disabled 1
+MuGM:MuonFactory     INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuonGeoModel.MYSQL   INFO GeometryVersion set to <R.08.01>
+MuGM:MuonFactory     INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuGM:MuonFactory     INFO MDTIDHELPER retrieved from DetStore
+EventPersistenc...   INFO Added successfully Conversion service:ByteStreamCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
+EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
+MDT_IDDetDescrCnv    INFO in createObj: creating a MdtIdHelper object in the detector store
+IdDictDetDescrCnv    INFO in initialize
+IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
+IdDictDetDescrCnv    INFO IdDictName:  IdDictParser/ATLAS_IDS.xml
+IdDictDetDescrCnv    INFO Reading InnerDetector    IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Reading LArCalorimeter   IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Reading TileCalorimeter  IdDict file IdDictParser/IdDictTileCalorimeter.xml
+IdDictDetDescrCnv    INFO Reading Calorimeter      IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Found id dicts:
+IdDictDetDescrCnv    INFO Using dictionary tag: null
+IdDictDetDescrCnv    INFO Dictionary ATLAS                version default              DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary Calorimeter          version default              DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Dictionary ForwardDetectors     version default              DetDescr tag ForDetIdentifier-01       file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Dictionary InnerDetector        version IBL-DBM              DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Dictionary LArCalorimeter       version fullAtlas            DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Dictionary LArElectrode         version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary LArHighVoltage       version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.03                 DetDescr tag MuonIdentifier-08         file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Dictionary TileCalorimeter      version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00         file IdDictParser/IdDictTileCalorimeter.xml
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+MdtIdHelper          INFO MultiRange built successfully to Technology: MultiRange size is 210
+MdtIdHelper          INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 241
+MdtIdHelper          INFO MultiRange built successfully to tube: MultiRange size is 241
+MdtIdHelper          INFO Initializing MDT hash indices ... 
+MdtIdHelper          INFO The element hash max is 1188
+MdtIdHelper          INFO The detector element hash max is 2328
+MdtIdHelper          INFO Initializing MDT hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO RPCIDHELPER retrieved from DetStore
+RPC_IDDetDescrCnv    INFO in createObj: creating a RpcIdHelper object in the detector store
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+RpcIdHelper          INFO MultiRange built successfully to doubletR: MultiRange size is 241
+RpcIdHelper          INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 241
+RpcIdHelper          INFO MultiRange built successfully to rpcStrip: MultiRange size is 241
+RpcIdHelper          INFO Initializing RPC hash indices ... 
+RpcIdHelper          INFO The element hash max is 600
+RpcIdHelper          INFO The detector element hash max is 1122
+RpcIdHelper          INFO Initializing RPC hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO TGCIDHELPER retrieved from DetStore
+TGC_IDDetDescrCnv    INFO in createObj: creating a TgcIdHelper object in the detector store
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+TgcIdHelper          INFO MultiRange built successfully to Technology: MultiRange size is 210
+TgcIdHelper          INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 210
+TgcIdHelper          INFO MultiRange built successfully to channel: MultiRange size is 241
+TgcIdHelper          INFO Initializing TGC hash indices ... 
+TgcIdHelper          INFO The element hash max is 1578
+TgcIdHelper          INFO The detector element hash max is 1578
+TgcIdHelper          INFO Initializing TGC hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO CSCIDHELPER retrieved from DetStore
+CSC_IDDetDescrCnv    INFO in createObj: creating a CcscIdHelper object in the detector store
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+CscIdHelper          INFO MultiRange built successfully to Technology: MultiRange size is 210
+CscIdHelper          INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 237
+CscIdHelper          INFO MultiRange built successfully to cscStrip: MultiRange size is 241
+CscIdHelper          INFO Initializing CSC hash indices ... 
+CscIdHelper          INFO The element hash max is 32
+CscIdHelper          INFO The detector element hash max is 64
+CscIdHelper          INFO The channel hash max is 61440
+CscIdHelper          INFO Initializing CSC hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ************************
+MuGM:MuonFactory     INFO  *** Start building the Muon Geometry Tree **********************
+MuGM:RDBReadAtlas    INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS>
+RDBAccessSvc      WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO After getQuery XtomoData
+In DblQ00Xtomo(data)
+No XtomoData table in the MuonDD Database
+MuGM:RDBReadAtlas    INFO After new DblQ00Xtomo
+MuGM:RDBReadAtlas    INFO After m_dhxtomo.data()
+MuGM:RDBReadAtlas    INFO No Ascii aszt input found: looking for A-lines in ORACLE
+MuGM:RDBReadAtlas    INFO ASZT table found in Oracle
+MuGM:RDBReadAtlas    INFO ASZT size is 32
+MuGM:RDBReadAtlas    INFO No Ascii iacsc input found: looking for A-lines in ORACLE
+RDBAccessSvc      WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO No ISZT table in Oracle
+MuGM:RDBReadAtlas    INFO Access granted for all dbObjects needed by muon detectors
+MuonGeoModel.MYSQL   INFO LayoutName (from DBAM) set to <R.08>  -- relevant for CTB2004
+MuGM:ProcStations    INFO  Processing Stations and Components
+MuGM:ProcStations    INFO  Processing Stations and Components DONE
+MuGM:ProcTechnol.s   INFO nMDT 13 nCSC 2 nTGC 22 nRPC 25
+MuGM:ProcTechnol.s   INFO nDED 2 nSUP 4 nSPA 2
+MuGM:ProcTechnol.s   INFO nCHV 7 nCRO 7 nCMI 6 nLBI 6
+MuGM:ProcPosition    INFO  *** N. of stations positioned in the setup 234
+MuGM:ProcPosition    INFO  *** N. of stations described in mysql      234
+MuGM:ProcPosition    INFO  *** N. of types  32 size of jtypvec 32
+MuGM:ProcPosition    INFO  *** : 234 kinds of stations (type*sub_type) 
+MuGM:ProcPosition    INFO  *** : 1758 physical stations in space - according to the MuonDD DataBase
+MuGM:ProcCutouts     INFO  Processing Cutouts for geometry layout R.08
+MuGM:ProcCutouts     INFO  Processing Cutouts DONE
+MuGM:RDBReadAtlas    INFO  ProcessTGCreadout - version 7 wirespacing 1.8
+MuGM:RDBReadAtlas    INFO Intermediate Objects built from primary numbers
+MuGM:MuonFactory     INFO  theMaterialManager retrieven successfully from the DetStore
+MuGM:MuonFactory     INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS>
+MuGM:MuonFactory     INFO  TreeTop added to the Manager
+MuGM:MuonFactory     INFO  Muon Layout R.08.01
+MuGM:MuonFactory     INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction)
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ****************************
+MuGM:MuonFactory     INFO  *** The Muon Chamber Geometry Tree is built with 
+MuGM:MuonFactory     INFO  *** 1758 child volumes 
+MuGM:MuonFactory     INFO  *** 1839 independent elements and 
+MuGM:MuonFactory     INFO  *** 11473 elements cloned or shared 
+MuGM:MuonFactory     INFO  *** 234 kinds of stations
+MuGM:MuonFactory     INFO  *** 1758 stations with alignable transforms
+MuGM:MuonFactory     INFO  *** 148 stations are described as Assemblies
+MuGM:MuonFactory     INFO  *** 1758 MuonStations 
+MuGM:MuonFactory     INFO  *** 	 2324 MDT Readout Elements 	 1186 MDT Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 32 CSC Readout Elements 	 32 CSC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1122 RPC Readout Elements 	 600 RPC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1578 TGC Readout Elements 	 1578 TGC Detector Elements 
+MuGM:MuonFactory     INFO  ********************************************************************
+MuGM:MuonFactory     INFO  *** Inert Material built according to DB switches and config. ****** 
+MuGM:MuonFactory     INFO  *** The Muon Geometry Tree has 1758 child vol.s in total ********
+MuGM:MuonFactory     INFO  ********************************************************************
+
+MGM::MuonDetect...   INFO Init A/B Line Containers - done - size is respectively 1758/0
+MGM::MuonDetect...   INFO Init of CSC I-Lines will be done via Conditions DB
+MGM::MuonDetect...   INFO Init I-Line Container - done - size is respectively 128
+MGM::MuonDetect...   INFO I-Line for CSC wire layers loaded (Csc Internal Alignment)
+MGM::MuonDetect...   INFO According to configuration they WILL be used 
+MGM::MuonDetect...   INFO Filling cache
+GeoModelSvc          INFO GeoModelSvc.MuonDetectorTool	 SZ= 228364Kb 	 Time = 1.66S
+ClassIDSvc           INFO  getRegistryEntries: read 2703 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 839 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 436 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 305 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 291 CLIDRegistry entries for module ALL
+CondInputLoader      INFO Initializing CondInputLoader...
+CondInputLoader      INFO Adding base classes:
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' )   ->
+CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' ) 
+MuonAlignmentCo...   INFO Initilalizing
+MuonAlignmentCo...   INFO In initialize ---- # of folders registered is 7
+MuonAlignmentCo...   INFO geometry version from the MuonDetectorManager = R.08.01
+MuonDetectorCon...   INFO Initializing ...
+AtlasFieldMapCo...   INFO Initialize
+AtlasFieldMapCo...   INFO Initialize: Key  ( 'AtlasFieldMapCondObj' , 'ConditionStore+fieldMapCondObj' )  has been succesfully registered 
+AtlasFieldMapCo...   INFO Initialize: Will update the field map from conditions
+AtlasFieldCache...   INFO Initialize
+AtlasFieldCache...   INFO Initialize: Key  ( 'AtlasFieldCacheCondObj' , 'ConditionStore+fieldCondObj' )  has been succesfully registered 
+AtlasFieldCache...   INFO Initialize: Will update current from conditions
+AtlasFieldCache...   INFO Initialize: useDCS, useSoleCurrent, useToroCurrent. 1,  'UseSoleCurrent':7730.0000,  'UseToroCurrent':20400.000 LockMapCurrents 0
+ClassIDSvc           INFO  getRegistryEntries: read 2353 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1043 CLIDRegistry entries for module ALL
 RpcRawDataProvider   INFO RpcRawDataProvider::initialize
 RpcRawDataProvider   INFO  'DoSeededDecoding':False
+ClassIDSvc           INFO  getRegistryEntries: read 2064 CLIDRegistry entries for module ALL
+ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
+ROBDataProviderSvc   INFO  ---> Filter out specific ROBs by Status Code: # ROBs = 0
+ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0
 RpcRawDataProvi...   INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderToolMT
 TgcRawDataProvider   INFO TgcRawDataProvider::initialize
 TgcRawDataProvider   INFO  'DoSeededDecoding':False
+ClassIDSvc           INFO  getRegistryEntries: read 1223 CLIDRegistry entries for module ALL
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT.TgcROD_Decoder
 TgcRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
 TgcRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
+MuonTGC_CablingSvc   INFO for 1/12 sector initialize
+ToolSvc.TGCCabl...   INFO initialize
+ToolSvc.TGCCabl...   INFO readTGCMap from text
+ToolSvc.TGCCabl...   INFO readTGCMap found file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-05-11T2140/Athena/22.0.13/InstallArea/x86_64-centos7-gcc8-opt/share/ASD2PP_diff_12_ONL.db
+ToolSvc.TGCCabl...   INFO giveASD2PP_DIFF_12 (m_ASD2PP_DIFF_12 is not NULL)
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT
 MdtRawDataProvider   INFO MdtRawDataProvider::initialize
 MdtRawDataProvider   INFO  'DoSeededDecoding':False
+ClassIDSvc           INFO  getRegistryEntries: read 1375 CLIDRegistry entries for module ALL
 MdtRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
 MdtRawDataProvi...   INFO Processing configuration for layouts with BME chambers.
 MdtRawDataProvi...   INFO Processing configuration for layouts with BMG chambers.
 MdtRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder')
 MdtRawDataProvi...   INFO initialize() successful in MdtRawDataProvider.MDT_RawDataProviderToolMT
+ClassIDSvc           INFO  getRegistryEntries: read 1048 CLIDRegistry entries for module ALL
 CscRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
 CscRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder')
 CscRawDataProvi...   INFO The Muon Geometry version is R.08.01
 CscRawDataProvi...   INFO initialize() successful in CscRawDataProvider.CSC_RawDataProviderToolMT
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
+RpcRdoToRpcPrep...   INFO package version = MuonRPC_CnvTools-00-00-00
 RpcRdoToRpcPrep...   INFO properties are 
 RpcRdoToRpcPrep...   INFO processingData                     0
 RpcRdoToRpcPrep...   INFO produceRpcCoinDatafromTriggerWords 1
@@ -27,12 +568,501 @@ RpcRdoToRpcPrep...   INFO timeShift                          -12.5
 RpcRdoToRpcPrep...   INFO etaphi_coincidenceTime             20
 RpcRdoToRpcPrep...   INFO overlap_timeTolerance              10
 RpcRdoToRpcPrep...   INFO Correct prd time from cool db      0
-RpcRdoToRpcPrep...   INFO Rpc Cabling Svc name is dataLike
+MuonRPC_CablingSvc   INFO Initializing MuonRPC_CablingSvc - package version MuonRPC_Cabling-00-00-00
+ToolSvc.RPCCabl...   INFO Initializing - folders names are: conf /RPC/CABLING/MAP_SCHEMA / corr /RPC/CABLING/MAP_SCHEMA_CORR
+MuonRPC_CablingSvc   INFO RPCCablingDbTool retrieved with handle TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool')
+MuonRPC_CablingSvc   INFO Register call-back  against 2 folders listed below 
+MuonRPC_CablingSvc   INFO  Folder n. 1 </RPC/CABLING/MAP_SCHEMA>     found in the DetStore
+ClassIDSvc           INFO  getRegistryEntries: read 239 CLIDRegistry entries for module ALL
+MuonRPC_CablingSvc   INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA>
+MuonRPC_CablingSvc   INFO  Folder n. 2 </RPC/CABLING/MAP_SCHEMA_CORR>     found in the DetStore
+MuonRPC_CablingSvc   INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA_CORR>
+MuonRPC_CablingSvc   INFO RPCTriggerDbTool retrieved with statusCode = SUCCESS pointer = TheRpcTriggerDbTool = PublicToolHandle('RPCTriggerDbTool')
+MuonRPC_CablingSvc   INFO Register call-back  against 2 folders listed below 
+MuonRPC_CablingSvc   INFO  Folder n. 1 </RPC/TRIGGER/CM_THR_ETA>     found in the DetStore
+MuonRPC_CablingSvc   INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_ETA>
+MuonRPC_CablingSvc   INFO  Folder n. 2 </RPC/TRIGGER/CM_THR_PHI>     found in the DetStore
+MuonRPC_CablingSvc   INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_PHI>
 RpcRdoToRpcPrep...   INFO Retrieved DecodingTool = PrivateToolHandle('Muon::RpcRdoToPrepDataToolMT/RpcRdoToRpcPrepDataTool')
 TgcRdoToTgcPrep...   INFO initialize() successful in TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool
 TgcRdoToTgcPrep...   INFO Retrieved DecodingTool = PrivateToolHandle('Muon::TgcRdoToPrepDataToolMT/TgcRdoToTgcPrepDataTool')
 CscRdoToCscPrep...   INFO The Geometry version is MuonSpectrometer-R.08.01
+ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 CscRdoToCscPrep...   INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataToolMT/CscRdoToCscPrepDataTool')
+EventSelector     WARNING InputCollections not properly set, checking EventStorageInputSvc properties
+EventSelector        INFO reinitialization...
+ClassIDSvc           INFO  getRegistryEntries: read 440 CLIDRegistry entries for module ALL
+EventSelector        INFO Retrieved InputCollections from InputSvc
+ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
+EventSelector        INFO reinitialization...
+AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr    SUCCESS ****************************** Algorithm Sequence ****************************
+ApplicationMgr    SUCCESS AthSequencer/AthMasterSeq
+ApplicationMgr    SUCCESS      AthSequencer/AthAlgEvtSeq
+ApplicationMgr    SUCCESS           AthSequencer/AthBeginSeq
+ApplicationMgr    SUCCESS                AthIncFirerAlg/BeginIncFiringAlg
+ApplicationMgr    SUCCESS                IncidentProcAlg/IncidentProcAlg1
+ApplicationMgr    SUCCESS           AthSequencer/AthAllAlgSeq
+ApplicationMgr    SUCCESS                AthSequencer/AthCondSeq
+ApplicationMgr    SUCCESS                     CondInputLoader/CondInputLoader
+ApplicationMgr    SUCCESS                     MuonAlignmentCondAlg/MuonAlignmentCondAlg
+ApplicationMgr    SUCCESS                     MuonDetectorCondAlg/MuonDetectorCondAlg
+ApplicationMgr    SUCCESS                     RpcCablingCondAlg/RpcCablingCondAlg
+ApplicationMgr    SUCCESS                     MuonMDT_CablingAlg/MuonMDT_CablingAlg
+ApplicationMgr    SUCCESS                     MagField::AtlasFieldMapCondAlg/AtlasFieldMapCondAlg
+ApplicationMgr    SUCCESS                     MagField::AtlasFieldCacheCondAlg/AtlasFieldCacheCondAlg
+ApplicationMgr    SUCCESS                     RpcCondDbAlg/RpcCondDbAlg
+ApplicationMgr    SUCCESS                     MdtCalibDbAlg/MdtCalibDbAlg
+ApplicationMgr    SUCCESS                     CscCondDbAlg/CscCondDbAlg
+ApplicationMgr    SUCCESS                AthSequencer/AthAlgSeq
+ApplicationMgr    SUCCESS                     Muon::RpcRawDataProvider/RpcRawDataProvider
+ApplicationMgr    SUCCESS                     Muon::TgcRawDataProvider/TgcRawDataProvider
+ApplicationMgr    SUCCESS                     Muon::MdtRawDataProvider/MdtRawDataProvider
+ApplicationMgr    SUCCESS                     Muon::CscRawDataProvider/CscRawDataProvider
+ApplicationMgr    SUCCESS                     RpcRdoToRpcPrepData/RpcRdoToRpcPrepData
+ApplicationMgr    SUCCESS                     TgcRdoToTgcPrepData/TgcRdoToTgcPrepData
+ApplicationMgr    SUCCESS                     CscRdoToCscPrepData/CscRdoToCscPrepData
+ApplicationMgr    SUCCESS                     CscThresholdClusterBuilder/CscThresholdClusterBuilder
+ApplicationMgr    SUCCESS           AthSequencer/AthEndSeq
+ApplicationMgr    SUCCESS                AthIncFirerAlg/EndIncFiringAlg
+ApplicationMgr    SUCCESS                IncidentProcAlg/IncidentProcAlg2
+ApplicationMgr    SUCCESS      AthSequencer/AthOutSeq
+ApplicationMgr    SUCCESS      AthSequencer/AthRegSeq
+ApplicationMgr    SUCCESS ******************************************************************************
+ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/FTHOLD'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/NOISE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PED'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PSLOPE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/RMS'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/STAT'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0BASE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0PHASE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/GLOBAL/BField/Maps'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MAP_SCHEMA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/RTBLOB'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/T0BLOB'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/CSC/ILINES'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/BARREL'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEC'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/DeadRopanels'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/OffRopanels'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI'
+ApplicationMgr       INFO Application Manager Started successfully
+EventInfoByteSt...   INFO IsSimulation : 0
+EventInfoByteSt...   INFO IsTestbeam : 0
+EventInfoByteSt...   INFO IsCalibration : 0
+AthenaEventLoopMgr   INFO   ===>>>  start of run 327265    <<<===
+IOVDbSvc             INFO Opening COOL connection for COOLONL_RPC/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchema_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchemaCorr_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA_CORR
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrEta_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_ETA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrPhi_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_PHI
+IOVDbSvc             INFO Disconnecting from COOLONL_RPC/CONDBR2
+EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+MuonRPC_CablingSvc   INFO initMappingModel has been called
+MuonRPC_CablingSvc   INFO ToolHandle in initMappingModel - <TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool')>
+MuonRPC_CablingSvc   INFO Retrieving cabling singleton; to create an empty one or to get the existing one
+RPCcabling           INFO CablingRPC---singleton constructor ---- this must be executed just once
+RPCcabling           INFO CablingRPC---The singleton will fill the maps from the COOL streams
+RPCcabling           INFO CablingRPC---InitMaps from COOL cannot be executed NOW: empty string
+RPCcabling           INFO CablingRPC---The singleton is created here
+RPCcabling           INFO CablingRPC--- cacheCleared: s_status = 0
+MuonRPC_CablingSvc   INFO Cabling singleton cache has been cleared
+MuonRPC_CablingSvc   INFO  Trigger roads will be loaded from COOL
+ToolSvc.RPCCabl...   INFO LoadParameters /RPC/CABLING/MAP_SCHEMA I=2 
+ToolSvc.RPCCabl...   INFO loadRPCMap --- Load Map from DB
+ToolSvc.RPCCabl...   INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA>
+ToolSvc.RPCCabl...   INFO  CondAttrListCollection from DB folder have been obtained with size 1
+ToolSvc.RPCCabl...   INFO Loop over CondAttrListCollection ic = 1
+ToolSvc.RPCCabl...   INFO After Reading folder, Configuration string size is 222202
+ToolSvc.RPCCabl...   INFO LoadParameters /RPC/CABLING/MAP_SCHEMA_CORR I=2 
+ToolSvc.RPCCabl...   INFO loadRPCCorr --- Load Corrections from DB
+ToolSvc.RPCCabl...   INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA_CORR>
+ToolSvc.RPCCabl...   INFO  CondAttrListCollection from DB folder have been obtained with size 1
+ToolSvc.RPCCabl...   INFO After Reading folder, Correction string size is 29369
+MuonRPC_CablingSvc   INFO  InitMappingModel: Trigger roads not yet loaded from COOL - postpone cabling initialization 
+MuonRPC_CablingSvc   INFO initTrigRoadsModel has been called
+MuonRPC_CablingSvc   INFO  Trigger roads will be loaded from COOL
+MuonRPC_CablingSvc   INFO Retrieve the pointer to the cabling singleton 
+RPCcabling           INFO CablingRPC--- cacheCleared: s_status = 0
+MuonRPC_CablingSvc   INFO Cabling singleton cache has been cleared
+ToolSvc.RPCTrig...   INFO LoadParameters /RPC/TRIGGER/CM_THR_ETA I=2 
+ToolSvc.RPCTrig...   INFO LoadParameters /RPC/TRIGGER/CM_THR_PHI I=2 
+MuonRPC_CablingSvc   INFO ======== RPC Trigger Roads from COOL - Header infos ========
+MuonRPC_CablingSvc   INFO 
+RPC LVL1 Configuration 10.6 with roads from Feb 2012
+L1 THRESHOLDS:   MU4 MU6 MU10 MU11 MU15 MU20
+Road version: "road_files_120209"
+CMA            th0    th1   th2
+eta low-pt     mu4    mu6   mu10
+phi low-pt     mu4    mu6   mu10
+eta high-pt    mu11  mu15   mu20
+phi high-pt    mu11  mu15   mu15
+
+
+RPCcabling           INFO CablingRPC---InitMaps from COOL: going to read configuration
+RPCcabling           INFO CablingRPC--->> RPC cabling map from COOL <<
+RPCcabling           INFO CablingRPC--- ReadConf: map has size 222202
+RPCcabling           INFO CablingRPC--- ReadConf: map n. of lines read is 924
+RPCcabling           INFO CablingRPC--- ReadConf: version is 5.0 Atlas R_07_03_RUN2ver104
+RPCcabling           INFO CablingRPC--- buildRDOmap
+RPCcabling           INFO CablingRPC---InitMaps from COOL: going to read corrections to configuration
+RPCcabling           INFO CablingRPC--->> RPC cabling corrections from COOL <<
+RPCcabling           INFO CablingRPC--- ReadCorr: CorrMap has size 29369
+RPCcabling           INFO CablingRPC--- ReadConf: CorrMap n. of lines read is 743
+RPCcabling           INFO CablingRPC---InitMaps from COOL - maps have been parsed
+MuonRPC_CablingSvc   INFO InitTrigRoadsModel: RPC cabling model is loaded!
+Level-1 configuration database version 5.0 Atlas R_07_03_RUN2ver104 read.
+Contains 26 Trigger Sector Types:
+negative sectors  0 - 15 ==> 18  2 24  3 19  2 24  4 20  2 24  1 18  5 25  6 
+negative sectors 16 - 31 ==> 21 13 26  6 21  7 16  8 14  7 16  6 21 13 26  1 
+positive sectors 32 - 47 ==>  9 24  2 22  9 24  2 23 10 24  2 18  1 25  5 18 
+positive sectors 48 - 63 ==>  1 26 13 21  6 17 12 15 11 17 12 21  6 26 13 22 
+
+MuonRPC_CablingSvc   INFO buildOfflineOnlineMap
+MuonRPC_CablingSvc   INFO Applying FeetPadThresholds : 0,2,5
+MuonRPC_CablingSvc   INFO MuonRPC_CablingSvc initialized succesfully
+ByteStreamCnvSvc     INFO problem adding converter for CLID [2101]
+ByteStreamCnvSvc  WARNING Cannot get converter for EventInfo
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186525031, run #327265 0 events processed so far  <<<===
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CSC/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscFthold-RUN2-BLK-UPD1-007-00 for folder /CSC/FTHOLD
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscNoise-RUN2-BLK-UPD1-007-00 for folder /CSC/NOISE
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPed-RUN2-BLK-UPD1-007-00 for folder /CSC/PED
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPslope-RUN2-BLK-UPD1-000-00 for folder /CSC/PSLOPE
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscRms-RUN2-BLK-UPD1-003-00 for folder /CSC/RMS
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscStat-RUN2-BLK-UPD1-008-00 for folder /CSC/STAT
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0base-RUN2-BLK-UPD1-001-00 for folder /CSC/T0BASE
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0phase-RUN2-BLK-UPD2-001-00 for folder /CSC/T0PHASE
+IOVDbSvc             INFO Disconnecting from COOLOFL_CSC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to BFieldMap-Run1-14m-v01 for folder /GLOBAL/BField/Maps
+IOVDbSvc             INFO Disconnecting from COOLONL_GLOBAL/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_MDT/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMapSchema_BMG_01 for folder /MDT/CABLING/MAP_SCHEMA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMezzanineSchema_M5-RUN2 for folder /MDT/CABLING/MEZZANINE_SCHEMA
+IOVDbSvc             INFO Disconnecting from COOLONL_MDT/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MDT/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTRT-RUN2-UPD4-21 for folder /MDT/RTBLOB
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTT0-RUN2-UPD4-21 for folder /MDT/T0BLOB
+IOVDbSvc             INFO Disconnecting from COOLOFL_MDT/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignCscIlines-UPD1-02 for folder /MUONALIGN/CSC/ILINES
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMdtAsbuiltparams-RUN2-BA_ONLY-UPD4-00 for folder /MUONALIGN/MDT/ASBUILTPARAMS
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_11-BLKP-UPD4-00 for folder /MUONALIGN/MDT/BARREL
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEC
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEC
+IOVDbSvc             INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_RPC/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCDQMFElementStatus_Run1_UPD4-RUN2-01 for folder /RPC/DQMF/ELEMENT_STATUS
+IOVDbSvc             INFO Disconnecting from COOLOFL_RPC/CONDBR2
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/CSC/ILINES>
+MuonAlignmentCo...   INFO Size of CSC/ILINES CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' )  readCscILinesCdo->size()= 1
+MuonAlignmentCo...   INFO Range of CSC/ILINES input is {[0,0,t:1425168000] - [t:4294967294.854775807]}
+MGM::MuonDetect...   INFO temporary CSC I-line container with size = 128
+MGM::MuonDetect...   INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines             is 128
+MGM::MuonDetect...   INFO # of entries in the CSC I-lines historical container          is 128
+MuonAlignmentCo...   INFO recorded new CscInternalAlignmentMapContainer with range {[0,0,t:1425168000] - [t:4294967294.854775807]} into Conditions Store
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ASBUILTPARAMS>
+MuonAlignmentCo...   INFO Size of MDT/ASBUILTPARAMS CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' )  ->size()= 1
+MuonAlignmentCo...   INFO Range of MDT/ASBUILTPARAMS input is {[0,0,t:0] - [t:4294967294.854775807]}
+MGM::MuonDetect...   INFO temporary As-Built container with size = 628
+MGM::MuonDetect...   INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to As-Built                  is 628
+MGM::MuonDetect...   INFO # of entries in the MdtAsBuilt historical container                 is 628
+MuonAlignmentCo...   INFO recorded new MdtAsBuiltMapContainer with range {[0,0,t:0] - [t:4294967294.854775807]} into Conditions Store
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/BARREL>
+MuonAlignmentCo...   INFO Size of /MUONALIGN/MDT/BARREL CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/MDT/BARREL input is, ALines: {[0,0,t:1497851700] - [t:1498737300]} BLines: {[0,0,t:1497851700] - [t:1498737300]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/MDT/BARREL have IoV = 195569
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/BARREL> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA>
+MuonAlignmentCo...   INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEA CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEA input is, ALines: {[0,0,t:1497891240] - [t:1497898380]} BLines: {[0,0,t:1497891240] - [t:1497898380]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEA have IoV = 195588
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC>
+MuonAlignmentCo...   INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEC CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEC input is, ALines: {[0,0,t:1497892260] - [t:1497899460]} BLines: {[0,0,t:1497892260] - [t:1497899460]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEC have IoV = 195599
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEA>
+MuonAlignmentCo...   INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEA
+MuonAlignmentCo...   INFO Size of /MUONALIGN/TGC/SIDEA CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/TGC/SIDEA input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/TGC/SIDEA have IoV = 82360
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEA> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEC>
+MuonAlignmentCo...   INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEC
+MuonAlignmentCo...   INFO Size of /MUONALIGN/TGC/SIDEC CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/TGC/SIDEC input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/TGC/SIDEC have IoV = 82359
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEC> loaded
+MGM::MuonDetect...   INFO temporary A-line container with size = 2694
+MGM::MuonDetect...   INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines         is 2694
+MGM::MuonDetect...   INFO # of entries in the A-lines historical container          is 2814
+MuonAlignmentCo...   INFO recorded new ALineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store
+MGM::MuonDetect...   INFO In updateDeformations()
+MGM::MuonDetect...   INFO temporary B-line container with size = 1206
+MGM::MuonDetect...   INFO # of B-lines read from the ALineMapContainer in StoreGate   is 1206
+MGM::MuonDetect...   INFO # of deform-Transforms updated according to B-lines         is 1174
+MGM::MuonDetect...   INFO # of entries in the B-lines historical container            is 1174
+MuonAlignmentCo...   INFO recorded new BLineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store
+MuonGeoModel         INFO MuonDetectorFactory - constructor  MuonSystem OuterRadius 13000 Length 22030
+MuonDetectorCon...   INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00
+MuonDetectorCon...   INFO (from GeoModelSvc)    AtlasVersion = <ATLAS-R2-2016-01-00-01>  MuonVersion = <>
+MuonDetectorCon...   INFO Keys for Muon Switches are  (key) ATLAS-R2-2016-01-00-01 (node) ATLAS
+MuonDetectorCon...   INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01>  default MuonVersion is <MuonSpectrometer-R.08.01>
+MuonDetectorCon...   INFO Properties have been set as follows: 
+MuonDetectorCon...   INFO     LayoutName                     R
+MuonDetectorCon...   INFO     IncludeCutouts                 0
+MuonDetectorCon...   INFO     IncludeCutoutsBog              0
+MuonDetectorCon...   INFO     IncludeCtbBis                  0
+MuonDetectorCon...   INFO     ControlAlines                  111111
+MuonDetectorCon...   INFO     MinimalGeoFlag                 0
+MuonDetectorCon...   INFO     EnableCscIntAlignment          1
+MuonDetectorCon...   INFO     EnableCscIntAlignmentFromGM    0
+MuonDetectorCon...   INFO     ControlCscIntAlines            111111
+MuonDetectorCon...   INFO     EnableMdtDeformations          1
+MuonDetectorCon...   INFO     EnableMdtAsBuiltParameters     1
+MuGM:MuonFactory     INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures 
+MuGM:MuonFactory     INFO                    BOG cutouts are activated 1 , all other cutouts are disabled 1
+MuGM:MuonFactory     INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuonGeoModel.MYSQL   INFO GeometryVersion set to <R.08.01>
+MuGM:MuonFactory     INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuGM:MuonFactory     INFO MDTIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO RPCIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO TGCIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO CSCIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ************************
+MuGM:MuonFactory     INFO  *** Start building the Muon Geometry Tree **********************
+MuGM:RDBReadAtlas    INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS>
+RDBAccessSvc      WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO After getQuery XtomoData
+In DblQ00Xtomo(data)
+No XtomoData table in the MuonDD Database
+MuGM:RDBReadAtlas    INFO After new DblQ00Xtomo
+MuGM:RDBReadAtlas    INFO After m_dhxtomo.data()
+MuGM:RDBReadAtlas    INFO No Ascii aszt input found: looking for A-lines in ORACLE
+MuGM:RDBReadAtlas    INFO ASZT table found in Oracle
+MuGM:RDBReadAtlas    INFO ASZT size is 32
+MuGM:RDBReadAtlas    INFO No Ascii iacsc input found: looking for A-lines in ORACLE
+RDBAccessSvc      WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO No ISZT table in Oracle
+MuGM:RDBReadAtlas    INFO Access granted for all dbObjects needed by muon detectors
+MuonGeoModel.MYSQL   INFO LayoutName (from DBAM) set to <R.08>  -- relevant for CTB2004
+MuGM:ProcStations    INFO  Processing Stations and Components
+MuGM:ProcStations    INFO  Processing Stations and Components DONE
+MuGM:ProcTechnol.s   INFO nMDT 26 nCSC 4 nTGC 44 nRPC 50
+MuGM:ProcTechnol.s   INFO nDED 4 nSUP 8 nSPA 4
+MuGM:ProcTechnol.s   INFO nCHV 14 nCRO 14 nCMI 12 nLBI 12
+MuGM:ProcPosition    INFO  *** N. of stations positioned in the setup 234
+MuGM:ProcPosition    INFO  *** N. of stations described in mysql      234
+MuGM:ProcPosition    INFO  *** N. of types  32 size of jtypvec 32
+MuGM:ProcPosition    INFO  *** : 234 kinds of stations (type*sub_type) 
+MuGM:ProcPosition    INFO  *** : 1758 physical stations in space - according to the MuonDD DataBase
+MuGM:ProcCutouts     INFO  Processing Cutouts for geometry layout R.08
+MuGM:ProcCutouts     INFO  Processing Cutouts DONE
+MuGM:RDBReadAtlas    INFO  ProcessTGCreadout - version 7 wirespacing 1.8
+MuGM:RDBReadAtlas    INFO Intermediate Objects built from primary numbers
+MuGM:MuonFactory     INFO  theMaterialManager retrieven successfully from the DetStore
+MuGM:MuonFactory     INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS>
+MuGM:MuonFactory     INFO  TreeTop added to the Manager
+MuGM:MuonFactory     INFO  Muon Layout R.08.01
+MuGM:MuonFactory     INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction)
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ****************************
+MuGM:MuonFactory     INFO  *** The Muon Chamber Geometry Tree is built with 
+MuGM:MuonFactory     INFO  *** 1758 child volumes 
+MuGM:MuonFactory     INFO  *** 1839 independent elements and 
+MuGM:MuonFactory     INFO  *** 11473 elements cloned or shared 
+MuGM:MuonFactory     INFO  *** 234 kinds of stations
+MuGM:MuonFactory     INFO  *** 1758 stations with alignable transforms
+MuGM:MuonFactory     INFO  *** 148 stations are described as Assemblies
+MuGM:MuonFactory     INFO  *** 1758 MuonStations 
+MuGM:MuonFactory     INFO  *** 	 2324 MDT Readout Elements 	 1186 MDT Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 32 CSC Readout Elements 	 32 CSC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1122 RPC Readout Elements 	 600 RPC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1578 TGC Readout Elements 	 1578 TGC Detector Elements 
+MuGM:MuonFactory     INFO  ********************************************************************
+MuGM:MuonFactory     INFO  *** Inert Material built according to DB switches and config. ****** 
+MuGM:MuonFactory     INFO  *** The Muon Geometry Tree has 1758 child vol.s in total ********
+MuGM:MuonFactory     INFO  ********************************************************************
+
+MGM::MuonDetect...   INFO Init A/B Line Containers - done - size is respectively 1758/0
+MGM::MuonDetect...   INFO Init of CSC I-Lines will be done via Conditions DB
+MGM::MuonDetect...   INFO Init I-Line Container - done - size is respectively 128
+MGM::MuonDetect...   INFO I-Line for CSC wire layers loaded (Csc Internal Alignment)
+MGM::MuonDetect...   INFO According to configuration they WILL be used 
+MGM::MuonDetect...   INFO Filling cache
+MGM::MuonDetect...   INFO temporary CSC I-line container with size = 128
+MGM::MuonDetect...   INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines             is 128
+MGM::MuonDetect...   INFO # of entries in the CSC I-lines historical container          is 128
+MGM::MuonDetect...   INFO temporary As-Built container with size = 628
+MGM::MuonDetect...   INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to As-Built                  is 628
+MGM::MuonDetect...   INFO # of entries in the MdtAsBuilt historical container                 is 628
+MGM::MuonDetect...   INFO temporary A-line container with size = 2694
+MGM::MuonDetect...   INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines         is 2694
+MGM::MuonDetect...   INFO # of entries in the A-lines historical container          is 2814
+MGM::MuonDetect...   INFO In updateDeformations()
+MGM::MuonDetect...   INFO temporary B-line container with size = 1206
+MGM::MuonDetect...   INFO # of B-lines read from the ALineMapContainer in StoreGate   is 1206
+MGM::MuonDetect...   INFO # of deform-Transforms updated according to B-lines         is 1174
+MGM::MuonDetect...   INFO # of entries in the B-lines historical container            is 1174
+MuonDetectorCon...   INFO recorded new MuonDetectorManager with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store
+RpcCablingCondAlg    INFO maps configuration have been parsed
+RpcCablingCondAlg    INFO recorded new RpcCablingCondData with range {[315000,l:0] - [999999,l:0]}
+MuonMDT_CablingAlg   INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' )  readCdoMez->size()= 24
+MuonMDT_CablingAlg   INFO Range of input is {[0,l:0] - [INVALID]}
+MuonMDT_CablingAlg   INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' )  readCdoMap->size()= 2312
+MuonMDT_CablingAlg   INFO Range of input is {[327264,l:4294640031] - [327265,l:4294640030]}
+MuonMDT_CablingAlg   INFO recorded new MuonMDT_CablingMap with range {[327264,t:0,l:4294640031] - [327265,l:4294640030]} into Conditions Store
+AtlasFieldMapCo...   INFO updateFieldMap: Update map from conditions
+AtlasFieldMapCo...   INFO updateFieldMap: Update map from conditions: Range of input/output is {[0,l:0] - [INVALID]}
+AtlasFieldMapCo...   INFO updateFieldMap: reading magnetic field map filenames from COOL
+AtlasFieldMapCo...   INFO updateFieldMap: found map of type GlobalMap with soleCur=7730 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_7730_20400_14m.root)
+AtlasFieldMapCo...   INFO updateFieldMap: found map of type SolenoidMap with soleCur=7730 toroCur=0 (path file:MagneticFieldMaps/bfieldmap_7730_0_14m.root)
+AtlasFieldMapCo...   INFO updateFieldMap: found map of type ToroidMap with soleCur=0 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_0_20400_14m.root)
+AtlasFieldMapCo...   INFO updateFieldMap: tagInfoH  ( 'TagInfo' , 'DetectorStore+ProcessingTags' )  is valid. 
+AtlasFieldMapCo...   INFO updateFieldMap: DID NOT reset currents from TagInfo
+AtlasFieldMapCo...   INFO updateFieldMap: Set map currents from FieldSvc: solenoid/toroid 7730,20400
+AtlasFieldMapCo...   INFO updateFieldMap: Use map file MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldMapCo...   INFO updateFieldMap: Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldMapCo...   INFO execute: solenoid zone id  7000
+AtlasFieldMapCo...   INFO execute: recored AtlasFieldMapCondObj with field map
+AtlasFieldCache...   INFO UpdateCurrentFromConditions  
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Range of input/output is {[0,0,t:1497895317.371000000] - [t:1497898549.609000000]}
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Attempt 1 at reading currents from DCS (using channel name)
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_Current , 1 , 7729.99
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_SCurrent , 2 , 7730
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_Current , 3 , 20399.9
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20397.7
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Currents read from DCS - solenoid 7729.99 toroid 20399.9
+AtlasFieldCache...   INFO scaleField: Solenoid field scale factor 1. Solenoid and map currents: 7729.99,7730
+AtlasFieldCache...   INFO scaleField: Toroid field scale factor 1. Toroid and map currents: 20399.9,20400
+AtlasFieldCache...   INFO execute: initialized AtlasFieldCacheCondObj and cache with SFs - sol/tor 1/1
+AtlasFieldCache...   INFO execute: solenoid zone id  7000
+MdtCalibDbAlg        INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' )  readCdoRt->size()= 1186
+MdtCalibDbAlg        INFO Range of input is {[327265,l:0] - [327342,l:0]}
+MdtCalibDbAlg        INFO MdtCalibDbAlg::loadRt Read 1188RTs from COOL
+MdtCalibDbAlg        INFO recorded new MdtRtRelationCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store
+MdtCalibDbAlg        INFO recorded new MdtCorFuncSetCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store
+MdtCalibDbAlg        INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML -6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1
+MdtCalibDbAlg        INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML stationEta 6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1
+MdtCalibDbAlg        INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' )  readCdoTube->size()= 1186
+MdtCalibDbAlg        INFO Range of input is {[319000,l:0] - [INVALID]}
+MdtCalibDbAlg        INFO recorded new MdtTubeCalibContainerCollection with range {[319000,l:0] - [INVALID]} into Conditions Store
+CscCondDbData        INFO Maximum Layer hash is 255
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186525031, run #327265 1 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186524665, run #327265 1 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186524665, run #327265 2 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186542447, run #327265 2 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186542447, run #327265 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186543405, run #327265 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186543405, run #327265 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186548387, run #327265 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186548387, run #327265 5 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186515186, run #327265 5 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186515186, run #327265 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186556019, run #327265 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186556019, run #327265 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186542866, run #327265 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186542866, run #327265 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186537901, run #327265 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186537901, run #327265 9 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186517811, run #327265 9 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186517811, run #327265 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186534221, run #327265 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186534221, run #327265 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186540986, run #327265 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186540986, run #327265 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186535104, run #327265 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186535104, run #327265 13 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186539903, run #327265 13 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186539903, run #327265 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186552713, run #327265 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186552713, run #327265 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186524730, run #327265 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186524730, run #327265 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186547632, run #327265 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186547632, run #327265 17 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186555621, run #327265 17 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186555621, run #327265 18 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186568452, run #327265 18 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186568452, run #327265 19 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186580451, run #327265 19 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186580451, run #327265 20 events processed so far  <<<===
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+CondInputLoader      INFO Finalizing CondInputLoader...
+AtlasFieldMapCo...   INFO  in finalize 
+AtlasFieldCache...   INFO  in finalize 
+IncidentProcAlg2     INFO Finalize
+IOVDbFolder          INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 ((     0.03 ))s
+IOVDbFolder          INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 ((     0.03 ))s
+IOVDbFolder          INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 ((     0.14 ))s
+IOVDbFolder          INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 ((     0.04 ))s
+IOVDbFolder          INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 ((     0.02 ))s
+IOVDbFolder          INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 ((     0.09 ))s
+IOVDbFolder          INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 ((     0.01 ))s
+IOVDbFolder          INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 ((     0.02 ))s
+IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/1 objs/chan/bytes 4/4/20 ((     0.02 ))s
+IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.03 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 ((     0.13 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 ((     0.03 ))s
+IOVDbFolder          INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 ((     0.12 ))s
+IOVDbFolder          INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 ((     0.07 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/CSC/ILINES (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/10814 ((     0.04 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/ASBUILTPARAMS (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/128992 ((     0.04 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/BARREL (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/140293 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65494 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65497 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/TGC/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/TGC/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 ((     0.02 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/222235 ((     0.09 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/29402 ((     0.04 ))s
+IOVDbFolder          INFO Folder /RPC/DCS/DeadRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 32/48/6200 ((     0.00 ))s
+IOVDbFolder          INFO Folder /RPC/DCS/OffRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 4/48/16 ((     0.00 ))s
+IOVDbFolder          INFO Folder /RPC/DQMF/ELEMENT_STATUS (AttrListColl) db-read 1/1 objs/chan/bytes 8320/8320/6180700 ((     0.24 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/2 objs/chan/bytes 1613/1613/7562651 ((     2.26 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/2 objs/chan/bytes 1612/1612/8096306 ((     0.11 ))s
+IOVDbFolder          INFO Folder /TDAQ/RunCtrl/SOR_Params (AttrListColl) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbSvc             INFO  bytes in ((      3.70 ))s
+IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLONL_TDAQ/CONDBR2 : nConnect: 1 nFolders: 1 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLOFL_MUONALIGN/CONDBR2 : nConnect: 2 nFolders: 7 ReadTime: ((     0.17 ))s
+IOVDbSvc             INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: ((     2.50 ))s
+IOVDbSvc             INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 1 nFolders: 1 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     0.16 ))s
+IOVDbSvc             INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.03 ))s
+IOVDbSvc             INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 3 ReadTime: ((     0.02 ))s
+IOVDbSvc             INFO Connection COOLOFL_RPC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.24 ))s
+IOVDbSvc             INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     0.19 ))s
+IOVDbSvc             INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: ((     0.38 ))s
+ToolSvc              INFO Removing all tools created by ToolSvc
+TgcRdoToTgcPrep...   INFO finalize(): input RDOs->output PRDs [Hit: 6807->6807, Tracklet: 28->28, TrackletEIFI: 692->692, HiPt: 4031->4031, SL: 3->3]
 MdtRawDataProvi...   INFO Fraction of fills that use the cache = 0
 TgcRawDataProvi...   INFO Fraction of fills that use the cache = 0
 RpcROD_Decoder:...   INFO  ============ FINAL RPC DATA FORMAT STAT. =========== 
@@ -50,3 +1080,15 @@ RpcROD_Decoder:...   INFO  SL Footer Errors.............0
 RpcROD_Decoder:...   INFO  RX Footer Errors.............0
 RpcROD_Decoder:...   INFO  CRC8 check Failures..........0
 RpcROD_Decoder:...   INFO  ==================================================== 
+ToolSvc.ByteStr...   INFO in finalize()
+ToolSvc.TGCCabl...   INFO finalize
+IdDictDetDescrCnv    INFO in finalize
+*****Chrono*****     INFO ****************************************************************************************************
+*****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****     INFO ****************************************************************************************************
+cObj_ALL             INFO Time User   : Tot=    0 [us] Ave/Min/Max=    0(+-    0)/    0/    0 [us] #= 32
+ChronoStatSvc        INFO Time User   : Tot= 27.3  [s]                                             #=  1
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc.f...   INFO  Service finalized successfully 
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
diff --git a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref
index e80eb113ac0ce5c253102dd66a21a8c9a7920827..b1122b5002294aee7c0d8d8d56af06b3c45e9d6a 100644
--- a/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref
+++ b/MuonSpectrometer/MuonConfig/share/MuonDataDecodeTest_Cache.ref
@@ -1,23 +1,565 @@
+Flag Name                                : Value
+Beam.BunchSpacing                        : 25
+Beam.Energy                              : [function]
+Beam.NumberOfCollisions                  : [function]
+Beam.Type                                : [function]
+Beam.estimatedLuminosity                 : [function]
+Common.Project                           : 'Athena'
+Common.bunchCrossingSource               : [function]
+Common.doExpressProcessing               : False
+Common.isOnline                          : False
+Common.useOnlineLumi                     : [function]
+Concurrency.NumConcurrentEvents          : 0
+Concurrency.NumProcs                     : 0
+Concurrency.NumThreads                   : 0
+GeoModel.Align.Dynamic                   : [function]
+GeoModel.AtlasVersion                    : 'ATLAS-R2-2016-01-00-01'
+GeoModel.IBLLayout                       : [function]
+GeoModel.Layout                          : 'atlas'
+GeoModel.Run                             : [function]
+GeoModel.StripGeoType                    : [function]
+GeoModel.Type                            : [function]
+IOVDb.DatabaseInstance                   : [function]
+IOVDb.GlobalTag                          : 'CONDBR2-BLKPA-2018-13'
+Input.Collections                        : [function]
+Input.Files                              : ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1']
+Input.Format                             : [function]
+Input.ProjectName                        : [function]
+Input.RunNumber                          : [function]
+Input.SecondaryCollections               : [function]
+Input.SecondaryFiles                     : []
+Input.isMC                               : [function]
+Output.AODFileName                       : ''
+Output.ESDFileName                       : ''
+Output.EVNTFileName                      : ''
+Output.HISTFileName                      : ''
+Output.HITSFileName                      : ''
+Output.RDOFileName                       : ''
+Output.RDO_SGNLFileName                  : ''
+Output.doESD                             : [function]
+Output.doWriteAOD                        : [function]
+Output.doWriteBS                         : False
+Output.doWriteESD                        : [function]
+Output.doWriteRDO                        : [function]
+Output.doWriteRDO_SGNL                   : [function]
+Random.Engine                            : 'dSFMT'
+Scheduler.CheckDependencies              : True
+Scheduler.ShowControlFlow                : True
+Scheduler.ShowDataDeps                   : True
+Scheduler.ShowDataFlow                   : True
+TrackingGeometry.MagneticFileMode        : 6
+TrackingGeometry.MaterialSource          : 'COOL'
+Flag categories that can be loaded dynamically
+Category                  :                 Generator name : Defined in
+BField                    :                       __bfield : AthenaConfiguration/AllConfigFlags.py
+BTagging                  :                     __btagging : AthenaConfiguration/AllConfigFlags.py
+Calo                      :                         __calo : AthenaConfiguration/AllConfigFlags.py
+DQ                        :                           __dq : AthenaConfiguration/AllConfigFlags.py
+Detector                  :                     __detector : AthenaConfiguration/AllConfigFlags.py
+Digitization              :                 __digitization : AthenaConfiguration/AllConfigFlags.py
+Egamma                    :                       __egamma : AthenaConfiguration/AllConfigFlags.py
+InDet                     :                        __indet : AthenaConfiguration/AllConfigFlags.py
+LAr                       :                          __lar : AthenaConfiguration/AllConfigFlags.py
+Muon                      :                         __muon : AthenaConfiguration/AllConfigFlags.py
+MuonCombined              :                 __muoncombined : AthenaConfiguration/AllConfigFlags.py
+Overlay                   :                      __overlay : AthenaConfiguration/AllConfigFlags.py
+PF                        :                        __pflow : AthenaConfiguration/AllConfigFlags.py
+Sim                       :                   __simulation : AthenaConfiguration/AllConfigFlags.py
+Tile                      :                         __tile : AthenaConfiguration/AllConfigFlags.py
+Trigger                   :                      __trigger : AthenaConfiguration/AllConfigFlags.py
+Py:Athena            INFO About to setup Raw data decoding
+Py:AutoConfigFlags    INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+Py:MetaReader        INFO Current mode used: peeker
+Py:MetaReader        INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1']
+Py:Athena            INFO using release [WorkDir-22.0.13] [x86_64-centos7-gcc8-opt] [atlas-work3/c0397ca1951] -- built on [2020-05-12T1917]
+Py:ConfigurableDb    INFO Read module info for 5576 configurables from 41 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+EventInfoMgtInit: Got release version  Athena-22.0.13
+Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO Print Config
+Py:ComponentAccumulator    INFO Event Inputs
+Py:ComponentAccumulator    INFO Event Algorithm Sequences
+Py:ComponentAccumulator    INFO Top sequence 0
+Py:ComponentAccumulator    INFO \__ AthAlgSeq (seq: SEQ AND)
+Py:ComponentAccumulator    INFO    \__ MuonCacheCreator (alg)
+Py:ComponentAccumulator    INFO    \__ RpcRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ TgcRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ MdtRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ CscRawDataProvider (alg)
+Py:ComponentAccumulator    INFO    \__ RpcRdoToRpcPrepData (alg)
+Py:ComponentAccumulator    INFO    \__ TgcRdoToTgcPrepData (alg)
+Py:ComponentAccumulator    INFO    \__ CscRdoToCscPrepData (alg)
+Py:ComponentAccumulator    INFO    \__ CscThresholdClusterBuilder (alg)
+Py:ComponentAccumulator    INFO Condition Algorithms
+Py:ComponentAccumulator    INFO  \__ CondInputLoader (cond alg)
+Py:ComponentAccumulator    INFO  \__ MuonAlignmentCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ MuonDetectorCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ RpcCablingCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ MuonMDT_CablingAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ AtlasFieldMapCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ AtlasFieldCacheCondAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ RpcCondDbAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ MdtCalibDbAlg (cond alg)
+Py:ComponentAccumulator    INFO  \__ CscCondDbAlg (cond alg)
+Py:ComponentAccumulator    INFO Services
+Py:ComponentAccumulator    INFO ['EventSelector', 'ByteStreamInputSvc', 'EventPersistencySvc', 'ByteStreamCnvSvc', 'ROBDataProviderSvc', 'ByteStreamAddressProviderSvc', 'MetaDataStore', 'InputMetaDataStore', 'MetaDataSvc', 'ProxyProviderSvc', 'IOVDbSvc', 'PoolSvc', 'CondSvc', 'DBReplicaSvc', 'TagInfoMgr', 'GeoModelSvc', 'DetDescrCnvSvc', 'AthenaPoolCnvSvc', 'MuonIdHelperSvc', 'RPCcablingServerSvc', 'MuonRPC_CablingSvc', 'LVL1TGC::TGCRecRoiSvc', 'TGCcablingServerSvc', 'MuonMDT_CablingSvc', 'AtlasFieldSvc', 'CSCcablingSvc']
+Py:ComponentAccumulator    INFO Public Tools
+Py:ComponentAccumulator    INFO [
+Py:ComponentAccumulator    INFO   IOVDbMetaDataTool/IOVDbMetaDataTool,
+Py:ComponentAccumulator    INFO   ByteStreamMetadataTool/ByteStreamMetadataTool,
+Py:ComponentAccumulator    INFO   RPCCablingDbTool/RPCCablingDbTool,
+Py:ComponentAccumulator    INFO   Muon::RPC_RawDataProviderToolMT/RPC_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   Muon::TGC_RawDataProviderToolMT/TGC_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   MDTCablingDbTool/MDTCablingDbTool,
+Py:ComponentAccumulator    INFO   Muon::MDT_RawDataProviderToolMT/MDT_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   Muon::CSC_RawDataProviderToolMT/CSC_RawDataProviderToolMT,
+Py:ComponentAccumulator    INFO   Muon::RpcRdoToPrepDataToolMT/RpcRdoToRpcPrepDataTool,
+Py:ComponentAccumulator    INFO   Muon::TgcRdoToPrepDataToolMT/TgcRdoToTgcPrepDataTool,
+Py:ComponentAccumulator    INFO   Muon::MdtRdoToPrepDataToolMT/MdtRdoToMdtPrepDataTool,
+Py:ComponentAccumulator    INFO   Muon::CscRdoToCscPrepDataToolMT/CscRdoToCscPrepDataTool,
+Py:ComponentAccumulator    INFO   CscThresholdClusterBuilderTool/CscThresholdClusterBuilderTool,
+Py:ComponentAccumulator    INFO ]
+Py:ComponentAccumulator    INFO Private Tools
+Py:ComponentAccumulator    INFO [
+Py:ComponentAccumulator    INFO ]
+Py:ComponentAccumulator    INFO TheApp properties
+Py:ComponentAccumulator    INFO   EvtSel : EventSelector
+Py:Athena            INFO Save Config
+
+JOs reading stage finished, launching CARunner from pickle file
+
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on lxplus728.cern.ch on Tue May 12 19:45:41 2020
+====================================================================================================================================
+ApplicationMgr       INFO Application Manager Configured successfully
+PublicTool  IOVDbMetaDataTool
+PublicTool  ByteStreamMetadataTool
+PublicTool  RPCCablingDbTool
+PublicTool  RPC_RawDataProviderToolMT
+PublicTool  TGC_RawDataProviderToolMT
+PublicTool  MDTCablingDbTool
+PublicTool  MDT_RawDataProviderToolMT
+PublicTool  CSC_RawDataProviderToolMT
+PublicTool  RpcRdoToRpcPrepDataTool
+PublicTool  TgcRdoToTgcPrepDataTool
+PublicTool  MdtRdoToMdtPrepDataTool
+PublicTool  CscRdoToCscPrepDataTool
+PublicTool  CscThresholdClusterBuilderTool
+CoreDumpSvc          INFO install f-a-t-a-l handler... (flag = 438)
+CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+ClassIDSvc           INFO  getRegistryEntries: read 3838 CLIDRegistry entries for module ALL
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-05-11T2140/Athena/22.0.13/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus728.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO COOL SQLite replicas will be excluded if matching pattern /DBRelease/
+PoolSvc              INFO Successfully setup replica sorting algorithm
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+PoolSvc              INFO Resolved path (via ATLAS_POOLCOND_PATH) is /cvmfs/atlas-condb.cern.ch/repo/conditions/poolcond/PoolFileCatalog.xml
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_comcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession            INFO     Open     DbSession    
+Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
+ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
+MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool/IOVDbMetaDataTool','ByteStreamMetadataTool/ByteStreamMetadataTool'])
+ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ByteStreamAddre...   INFO initialized 
+ByteStreamAddre...   INFO -- Will fill Store with id =  0
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
+IOVDbSvc             INFO Global tag: CONDBR2-BLKPA-2018-13 set from joboptions
+IOVDbFolder          INFO Inputfile tag override disabled for /GLOBAL/BField/Maps
+IOVDbSvc             INFO Initialised with 11 connections and 30 folders
+IOVDbSvc             INFO Service IOVDbSvc initialised successfully
+ClassIDSvc           INFO  getRegistryEntries: read 3039 CLIDRegistry entries for module ALL
+IOVDbSvc             INFO Opening COOL connection for COOLONL_TDAQ/CONDBR2
+ClassIDSvc           INFO  getRegistryEntries: read 268 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 230 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 4058 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 139 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3331 CLIDRegistry entries for module ALL
+IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvc.IOVSvcTool    INFO IOVRanges will be checked at every Event
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_TDAQ/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_RPC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_TGC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_RPC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_MDT/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_TGC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_MDT/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLONL_GLOBAL/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_RPC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MDT/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_RPC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CSC/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_MDT/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_CSC/CONDBR2
+IOVDbSvc             INFO Added taginfo remove for /CSC/FTHOLD
+IOVDbSvc             INFO Added taginfo remove for /CSC/NOISE
+IOVDbSvc             INFO Added taginfo remove for /CSC/PED
+IOVDbSvc             INFO Added taginfo remove for /CSC/PSLOPE
+IOVDbSvc             INFO Added taginfo remove for /CSC/RMS
+IOVDbSvc             INFO Added taginfo remove for /CSC/STAT
+IOVDbSvc             INFO Added taginfo remove for /CSC/T0BASE
+IOVDbSvc             INFO Added taginfo remove for /CSC/T0PHASE
+IOVDbSvc             INFO Added taginfo remove for /EXT/DCS/MAGNETS/SENSORDATA
+IOVDbSvc             INFO Added taginfo remove for /GLOBAL/BField/Maps
+IOVDbSvc             INFO Added taginfo remove for /MDT/CABLING/MAP_SCHEMA
+IOVDbSvc             INFO Added taginfo remove for /MDT/CABLING/MEZZANINE_SCHEMA
+IOVDbSvc             INFO Added taginfo remove for /MDT/RTBLOB
+IOVDbSvc             INFO Added taginfo remove for /MDT/T0BLOB
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/CSC/ILINES
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/ASBUILTPARAMS
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/BARREL
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEA
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/MDT/ENDCAP/SIDEC
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/TGC/SIDEA
+IOVDbSvc             INFO Added taginfo remove for /MUONALIGN/TGC/SIDEC
+IOVDbSvc             INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA
+IOVDbSvc             INFO Added taginfo remove for /RPC/CABLING/MAP_SCHEMA_CORR
+IOVDbSvc             INFO Added taginfo remove for /RPC/DCS/DeadRopanels
+IOVDbSvc             INFO Added taginfo remove for /RPC/DCS/OffRopanels
+IOVDbSvc             INFO Added taginfo remove for /RPC/DQMF/ELEMENT_STATUS
+IOVDbSvc             INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_ETA
+IOVDbSvc             INFO Added taginfo remove for /RPC/TRIGGER/CM_THR_PHI
+IOVDbSvc             INFO Added taginfo remove for /TDAQ/RunCtrl/SOR_Params
+IOVDbSvc             INFO Added taginfo remove for /TGC/CABLING/MAP_SCHEMA
+GeoModelSvc          INFO Explicitly initializing DetDescrCnvSvc
+DetDescrCnvSvc       INFO  initializing 
+DetDescrCnvSvc       INFO Found DetectorStore service
+DetDescrCnvSvc       INFO  filling proxies for detector managers 
+DetDescrCnvSvc       INFO  filling address for CaloTTMgr with CLID 117659265 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloMgr with CLID 4548337 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloSuperCellMgr with CLID 241807251 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloIdManager with CLID 125856940 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArIdManager with CLID 79554919 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for IdDict with CLID 2411 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for AtlasID with CLID 164875623 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for PixelID with CLID 2516 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SCT_ID with CLID 2517 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TRT_ID with CLID 2518 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for SiliconID with CLID 129452393 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_ID with CLID 163583365 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArEM_SuperCell_ID with CLID 99488227 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_ID with CLID 3870484 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHEC_SuperCell_ID with CLID 254277678 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_ID with CLID 45738051 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArFCAL_SuperCell_ID with CLID 12829437 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArMiniFCAL_ID with CLID 79264204 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnlineID with CLID 158698068 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TTOnlineID with CLID 38321944 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArOnline_SuperCellID with CLID 115600394 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArHVLineID with CLID 27863673 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for LArElectrodeID with CLID 80757351 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileID with CLID 2901 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for Tile_SuperCell_ID with CLID 49557789 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileHWID with CLID 2902 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TileTBID with CLID 2903 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for MDTIDHELPER with CLID 4170 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CSCIDHELPER with CLID 4171 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for RPCIDHELPER with CLID 4172 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for TGCIDHELPER with CLID 4173 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloLVL1_ID with CLID 108133391 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloCell_SuperCell_ID with CLID 128365736 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for CaloDM_ID with CLID 167756483 and storage type 68 to detector store 
+DetDescrCnvSvc       INFO  filling address for ZdcID with CLID 190591643 and storage type 68 to detector store 
+GeoModelSvc.Muo...   INFO Initializing ...
+GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
+MuonGeoModel         INFO MuonDetectorFactory - constructor  MuonSystem OuterRadius 13000 Length 22030
+GeoModelSvc.Muo...   INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00
+GeoModelSvc.Muo...   INFO (from GeoModelSvc)    AtlasVersion = <ATLAS-R2-2016-01-00-01>  MuonVersion = <>
+GeoModelSvc.Muo...   INFO Keys for Muon Switches are  (key) ATLAS-R2-2016-01-00-01 (node) ATLAS
+GeoModelSvc.Muo...   INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01>  default MuonVersion is <MuonSpectrometer-R.08.01>
+GeoModelSvc.Muo...   INFO Properties have been set as follows: 
+GeoModelSvc.Muo...   INFO     LayoutName                     R
+GeoModelSvc.Muo...   INFO     IncludeCutouts                 0
+GeoModelSvc.Muo...   INFO     IncludeCutoutsBog              0
+GeoModelSvc.Muo...   INFO     IncludeCtbBis                  0
+GeoModelSvc.Muo...   INFO     ControlAlines                  111111
+GeoModelSvc.Muo...   INFO     MinimalGeoFlag                 0
+GeoModelSvc.Muo...   INFO     EnableCscIntAlignment          1
+GeoModelSvc.Muo...   INFO     EnableCscIntAlignmentFromGM    0
+GeoModelSvc.Muo...   INFO     ControlCscIntAlines            111111
+GeoModelSvc.Muo...   INFO     EnableMdtDeformations          1
+GeoModelSvc.Muo...   INFO     EnableMdtAsBuiltParameters     1
+MuGM:MuonFactory     INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures 
+MuGM:MuonFactory     INFO                    BOG cutouts are activated 1 , all other cutouts are disabled 1
+MuGM:MuonFactory     INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuonGeoModel.MYSQL   INFO GeometryVersion set to <R.08.01>
+MuGM:MuonFactory     INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuGM:MuonFactory     INFO MDTIDHELPER retrieved from DetStore
+EventPersistenc...   INFO Added successfully Conversion service:ByteStreamCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
+EventPersistenc...   INFO Added successfully Conversion service:DetDescrCnvSvc
+MDT_IDDetDescrCnv    INFO in createObj: creating a MdtIdHelper object in the detector store
+IdDictDetDescrCnv    INFO in initialize
+IdDictDetDescrCnv    INFO in createObj: creating a IdDictManager object in the detector store
+IdDictDetDescrCnv    INFO IdDictName:  IdDictParser/ATLAS_IDS.xml
+IdDictDetDescrCnv    INFO Reading InnerDetector    IdDict file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Reading LArCalorimeter   IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Reading TileCalorimeter  IdDict file IdDictParser/IdDictTileCalorimeter.xml
+IdDictDetDescrCnv    INFO Reading Calorimeter      IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Found id dicts:
+IdDictDetDescrCnv    INFO Using dictionary tag: null
+IdDictDetDescrCnv    INFO Dictionary ATLAS                version default              DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary Calorimeter          version default              DetDescr tag CaloIdentifier-LVL1-02 file IdDictParser/IdDictCalorimeter_L1Onl.xml
+IdDictDetDescrCnv    INFO Dictionary ForwardDetectors     version default              DetDescr tag ForDetIdentifier-01       file IdDictParser/IdDictForwardDetectors_2010.xml
+IdDictDetDescrCnv    INFO Dictionary InnerDetector        version IBL-DBM              DetDescr tag InDetIdentifier-IBL3D25-02 file InDetIdDictFiles/IdDictInnerDetector_IBL3D25-03.xml
+IdDictDetDescrCnv    INFO Dictionary LArCalorimeter       version fullAtlas            DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
+IdDictDetDescrCnv    INFO Dictionary LArElectrode         version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary LArHighVoltage       version fullAtlas            DetDescr tag (using default) file 
+IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.03                 DetDescr tag MuonIdentifier-08         file IdDictParser/IdDictMuonSpectrometer_R.03.xml
+IdDictDetDescrCnv    INFO Dictionary TileCalorimeter      version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00         file IdDictParser/IdDictTileCalorimeter.xml
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+MdtIdHelper          INFO MultiRange built successfully to Technology: MultiRange size is 210
+MdtIdHelper          INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 241
+MdtIdHelper          INFO MultiRange built successfully to tube: MultiRange size is 241
+MdtIdHelper          INFO Initializing MDT hash indices ... 
+MdtIdHelper          INFO The element hash max is 1188
+MdtIdHelper          INFO The detector element hash max is 2328
+MdtIdHelper          INFO Initializing MDT hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO RPCIDHELPER retrieved from DetStore
+RPC_IDDetDescrCnv    INFO in createObj: creating a RpcIdHelper object in the detector store
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+RpcIdHelper          INFO MultiRange built successfully to doubletR: MultiRange size is 241
+RpcIdHelper          INFO MultiRange built successfully to detectorElement: DetectorElement MultiRange size is 241
+RpcIdHelper          INFO MultiRange built successfully to rpcStrip: MultiRange size is 241
+RpcIdHelper          INFO Initializing RPC hash indices ... 
+RpcIdHelper          INFO The element hash max is 600
+RpcIdHelper          INFO The detector element hash max is 1122
+RpcIdHelper          INFO Initializing RPC hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO TGCIDHELPER retrieved from DetStore
+TGC_IDDetDescrCnv    INFO in createObj: creating a TgcIdHelper object in the detector store
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+TgcIdHelper          INFO MultiRange built successfully to Technology: MultiRange size is 210
+TgcIdHelper          INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 210
+TgcIdHelper          INFO MultiRange built successfully to channel: MultiRange size is 241
+TgcIdHelper          INFO Initializing TGC hash indices ... 
+TgcIdHelper          INFO The element hash max is 1578
+TgcIdHelper          INFO The detector element hash max is 1578
+TgcIdHelper          INFO Initializing TGC hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO CSCIDHELPER retrieved from DetStore
+CSC_IDDetDescrCnv    INFO in createObj: creating a CcscIdHelper object in the detector store
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find mm region index: group, region size 0 0
+AtlasDetectorIDHelper::initialize_from_dictionary - Warning: unable to find stgc region index: group, region size 0 0
+AtlasDetectorID::initLevelsFromDict - there are no sTGC entries in the dictionary! 
+AtlasDetectorID::initLevelsFromDict - there are no MM entries in the dictionary! 
+ AtlasDetectorID::initialize_from_dictionary - OK 
+CscIdHelper          INFO MultiRange built successfully to Technology: MultiRange size is 210
+CscIdHelper          INFO MultiRange built successfully to detector element: Multilayer MultiRange size is 237
+CscIdHelper          INFO MultiRange built successfully to cscStrip: MultiRange size is 241
+CscIdHelper          INFO Initializing CSC hash indices ... 
+CscIdHelper          INFO The element hash max is 32
+CscIdHelper          INFO The detector element hash max is 64
+CscIdHelper          INFO The channel hash max is 61440
+CscIdHelper          INFO Initializing CSC hash indices for finding neighbors ... 
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ************************
+MuGM:MuonFactory     INFO  *** Start building the Muon Geometry Tree **********************
+MuGM:RDBReadAtlas    INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS>
+RDBAccessSvc      WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO After getQuery XtomoData
+In DblQ00Xtomo(data)
+No XtomoData table in the MuonDD Database
+MuGM:RDBReadAtlas    INFO After new DblQ00Xtomo
+MuGM:RDBReadAtlas    INFO After m_dhxtomo.data()
+MuGM:RDBReadAtlas    INFO No Ascii aszt input found: looking for A-lines in ORACLE
+MuGM:RDBReadAtlas    INFO ASZT table found in Oracle
+MuGM:RDBReadAtlas    INFO ASZT size is 32
+MuGM:RDBReadAtlas    INFO No Ascii iacsc input found: looking for A-lines in ORACLE
+RDBAccessSvc      WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO No ISZT table in Oracle
+MuGM:RDBReadAtlas    INFO Access granted for all dbObjects needed by muon detectors
+MuonGeoModel.MYSQL   INFO LayoutName (from DBAM) set to <R.08>  -- relevant for CTB2004
+MuGM:ProcStations    INFO  Processing Stations and Components
+MuGM:ProcStations    INFO  Processing Stations and Components DONE
+MuGM:ProcTechnol.s   INFO nMDT 13 nCSC 2 nTGC 22 nRPC 25
+MuGM:ProcTechnol.s   INFO nDED 2 nSUP 4 nSPA 2
+MuGM:ProcTechnol.s   INFO nCHV 7 nCRO 7 nCMI 6 nLBI 6
+MuGM:ProcPosition    INFO  *** N. of stations positioned in the setup 234
+MuGM:ProcPosition    INFO  *** N. of stations described in mysql      234
+MuGM:ProcPosition    INFO  *** N. of types  32 size of jtypvec 32
+MuGM:ProcPosition    INFO  *** : 234 kinds of stations (type*sub_type) 
+MuGM:ProcPosition    INFO  *** : 1758 physical stations in space - according to the MuonDD DataBase
+MuGM:ProcCutouts     INFO  Processing Cutouts for geometry layout R.08
+MuGM:ProcCutouts     INFO  Processing Cutouts DONE
+MuGM:RDBReadAtlas    INFO  ProcessTGCreadout - version 7 wirespacing 1.8
+MuGM:RDBReadAtlas    INFO Intermediate Objects built from primary numbers
+MuGM:MuonFactory     INFO  theMaterialManager retrieven successfully from the DetStore
+MuGM:MuonFactory     INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS>
+MuGM:MuonFactory     INFO  TreeTop added to the Manager
+MuGM:MuonFactory     INFO  Muon Layout R.08.01
+MuGM:MuonFactory     INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction)
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ****************************
+MuGM:MuonFactory     INFO  *** The Muon Chamber Geometry Tree is built with 
+MuGM:MuonFactory     INFO  *** 1758 child volumes 
+MuGM:MuonFactory     INFO  *** 1839 independent elements and 
+MuGM:MuonFactory     INFO  *** 11473 elements cloned or shared 
+MuGM:MuonFactory     INFO  *** 234 kinds of stations
+MuGM:MuonFactory     INFO  *** 1758 stations with alignable transforms
+MuGM:MuonFactory     INFO  *** 148 stations are described as Assemblies
+MuGM:MuonFactory     INFO  *** 1758 MuonStations 
+MuGM:MuonFactory     INFO  *** 	 2324 MDT Readout Elements 	 1186 MDT Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 32 CSC Readout Elements 	 32 CSC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1122 RPC Readout Elements 	 600 RPC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1578 TGC Readout Elements 	 1578 TGC Detector Elements 
+MuGM:MuonFactory     INFO  ********************************************************************
+MuGM:MuonFactory     INFO  *** Inert Material built according to DB switches and config. ****** 
+MuGM:MuonFactory     INFO  *** The Muon Geometry Tree has 1758 child vol.s in total ********
+MuGM:MuonFactory     INFO  ********************************************************************
+
+MGM::MuonDetect...   INFO Init A/B Line Containers - done - size is respectively 1758/0
+MGM::MuonDetect...   INFO Init of CSC I-Lines will be done via Conditions DB
+MGM::MuonDetect...   INFO Init I-Line Container - done - size is respectively 128
+MGM::MuonDetect...   INFO I-Line for CSC wire layers loaded (Csc Internal Alignment)
+MGM::MuonDetect...   INFO According to configuration they WILL be used 
+MGM::MuonDetect...   INFO Filling cache
+GeoModelSvc          INFO GeoModelSvc.MuonDetectorTool	 SZ= 228388Kb 	 Time = 1.63S
+ClassIDSvc           INFO  getRegistryEntries: read 2703 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 839 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 436 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 305 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 291 CLIDRegistry entries for module ALL
+CondInputLoader      INFO Initializing CondInputLoader...
+CondInputLoader      INFO Adding base classes:
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' )   ->
+  +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' )   ->
+CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/FTHOLD' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/NOISE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PED' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/PSLOPE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/RMS' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/STAT' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/GLOBAL/BField/Maps' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/DeadRopanels' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DCS/OffRopanels' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA' ) 
+    +  ( 'CondAttrListCollection' , 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI' ) 
+MuonAlignmentCo...   INFO Initilalizing
+MuonAlignmentCo...   INFO In initialize ---- # of folders registered is 7
+MuonAlignmentCo...   INFO geometry version from the MuonDetectorManager = R.08.01
+MuonDetectorCon...   INFO Initializing ...
+AtlasFieldMapCo...   INFO Initialize
+AtlasFieldMapCo...   INFO Initialize: Key  ( 'AtlasFieldMapCondObj' , 'ConditionStore+fieldMapCondObj' )  has been succesfully registered 
+AtlasFieldMapCo...   INFO Initialize: Will update the field map from conditions
+AtlasFieldCache...   INFO Initialize
+AtlasFieldCache...   INFO Initialize: Key  ( 'AtlasFieldCacheCondObj' , 'ConditionStore+fieldCondObj' )  has been succesfully registered 
+AtlasFieldCache...   INFO Initialize: Will update current from conditions
+AtlasFieldCache...   INFO Initialize: useDCS, useSoleCurrent, useToroCurrent. 1,  'UseSoleCurrent':7730.0000,  'UseToroCurrent':20400.000 LockMapCurrents 0
+ClassIDSvc           INFO  getRegistryEntries: read 2353 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1043 CLIDRegistry entries for module ALL
 RpcRawDataProvider   INFO RpcRawDataProvider::initialize
 RpcRawDataProvider   INFO  'DoSeededDecoding':False
+ClassIDSvc           INFO  getRegistryEntries: read 2064 CLIDRegistry entries for module ALL
+ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
+ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
+ROBDataProviderSvc   INFO  ---> Filter out specific ROBs by Status Code: # ROBs = 0
+ROBDataProviderSvc   INFO  ---> Filter out Sub Detector ROBs by Status Code: # Sub Detectors = 0
 RpcRawDataProvi...   INFO initialize() successful in RpcRawDataProvider.RPC_RawDataProviderToolMT
 TgcRawDataProvider   INFO TgcRawDataProvider::initialize
 TgcRawDataProvider   INFO  'DoSeededDecoding':False
+ClassIDSvc           INFO  getRegistryEntries: read 1223 CLIDRegistry entries for module ALL
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT.TgcROD_Decoder
 TgcRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('Muon::TGC_RodDecoderReadout/TgcROD_Decoder')
 TgcRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
+MuonTGC_CablingSvc   INFO for 1/12 sector initialize
+ToolSvc.TGCCabl...   INFO initialize
+ToolSvc.TGCCabl...   INFO readTGCMap from text
+ToolSvc.TGCCabl...   INFO readTGCMap found file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-05-11T2140/Athena/22.0.13/InstallArea/x86_64-centos7-gcc8-opt/share/ASD2PP_diff_12_ONL.db
+ToolSvc.TGCCabl...   INFO giveASD2PP_DIFF_12 (m_ASD2PP_DIFF_12 is not NULL)
 TgcRawDataProvi...   INFO initialize() successful in TgcRawDataProvider.TGC_RawDataProviderToolMT
 MdtRawDataProvider   INFO MdtRawDataProvider::initialize
 MdtRawDataProvider   INFO  'DoSeededDecoding':False
+ClassIDSvc           INFO  getRegistryEntries: read 1375 CLIDRegistry entries for module ALL
 MdtRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
 MdtRawDataProvi...   INFO Processing configuration for layouts with BME chambers.
 MdtRawDataProvi...   INFO Processing configuration for layouts with BMG chambers.
 MdtRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('MdtROD_Decoder/MdtROD_Decoder')
 MdtRawDataProvi...   INFO initialize() successful in MdtRawDataProvider.MDT_RawDataProviderToolMT
+ClassIDSvc           INFO  getRegistryEntries: read 1048 CLIDRegistry entries for module ALL
 CscRawDataProvi...   INFO Retrieved service ServiceHandle('ROBDataProviderSvc')
 CscRawDataProvi...   INFO Retrieved tool Decoder = PrivateToolHandle('Muon::CscROD_Decoder/CscROD_Decoder')
 CscRawDataProvi...   INFO The Muon Geometry version is R.08.01
 CscRawDataProvi...   INFO initialize() successful in CscRawDataProvider.CSC_RawDataProviderToolMT
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
+RpcRdoToRpcPrep...   INFO package version = MuonRPC_CnvTools-00-00-00
 RpcRdoToRpcPrep...   INFO properties are 
 RpcRdoToRpcPrep...   INFO processingData                     0
 RpcRdoToRpcPrep...   INFO produceRpcCoinDatafromTriggerWords 1
@@ -27,12 +569,502 @@ RpcRdoToRpcPrep...   INFO timeShift                          -12.5
 RpcRdoToRpcPrep...   INFO etaphi_coincidenceTime             20
 RpcRdoToRpcPrep...   INFO overlap_timeTolerance              10
 RpcRdoToRpcPrep...   INFO Correct prd time from cool db      0
-RpcRdoToRpcPrep...   INFO Rpc Cabling Svc name is dataLike
+MuonRPC_CablingSvc   INFO Initializing MuonRPC_CablingSvc - package version MuonRPC_Cabling-00-00-00
+ToolSvc.RPCCabl...   INFO Initializing - folders names are: conf /RPC/CABLING/MAP_SCHEMA / corr /RPC/CABLING/MAP_SCHEMA_CORR
+MuonRPC_CablingSvc   INFO RPCCablingDbTool retrieved with handle TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool')
+MuonRPC_CablingSvc   INFO Register call-back  against 2 folders listed below 
+MuonRPC_CablingSvc   INFO  Folder n. 1 </RPC/CABLING/MAP_SCHEMA>     found in the DetStore
+ClassIDSvc           INFO  getRegistryEntries: read 239 CLIDRegistry entries for module ALL
+MuonRPC_CablingSvc   INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA>
+MuonRPC_CablingSvc   INFO  Folder n. 2 </RPC/CABLING/MAP_SCHEMA_CORR>     found in the DetStore
+MuonRPC_CablingSvc   INFO initMappingModel registered for call-back against folder </RPC/CABLING/MAP_SCHEMA_CORR>
+MuonRPC_CablingSvc   INFO RPCTriggerDbTool retrieved with statusCode = SUCCESS pointer = TheRpcTriggerDbTool = PublicToolHandle('RPCTriggerDbTool')
+MuonRPC_CablingSvc   INFO Register call-back  against 2 folders listed below 
+MuonRPC_CablingSvc   INFO  Folder n. 1 </RPC/TRIGGER/CM_THR_ETA>     found in the DetStore
+MuonRPC_CablingSvc   INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_ETA>
+MuonRPC_CablingSvc   INFO  Folder n. 2 </RPC/TRIGGER/CM_THR_PHI>     found in the DetStore
+MuonRPC_CablingSvc   INFO initTrigRoadsModel registered for call-back against folder </RPC/TRIGGER/CM_THR_PHI>
 RpcRdoToRpcPrep...   INFO Retrieved DecodingTool = PrivateToolHandle('Muon::RpcRdoToPrepDataToolMT/RpcRdoToRpcPrepDataTool')
 TgcRdoToTgcPrep...   INFO initialize() successful in TgcRdoToTgcPrepData.TgcRdoToTgcPrepDataTool
 TgcRdoToTgcPrep...   INFO Retrieved DecodingTool = PrivateToolHandle('Muon::TgcRdoToPrepDataToolMT/TgcRdoToTgcPrepDataTool')
 CscRdoToCscPrep...   INFO The Geometry version is MuonSpectrometer-R.08.01
+ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 CscRdoToCscPrep...   INFO Retrieved CscRdoToCscPrepDataTool = PrivateToolHandle('Muon::CscRdoToCscPrepDataToolMT/CscRdoToCscPrepDataTool')
+EventSelector     WARNING InputCollections not properly set, checking EventStorageInputSvc properties
+EventSelector        INFO reinitialization...
+ClassIDSvc           INFO  getRegistryEntries: read 440 CLIDRegistry entries for module ALL
+EventSelector        INFO Retrieved InputCollections from InputSvc
+ByteStreamInputSvc   INFO Initializing ByteStreamInputSvc - package version ByteStreamCnvSvc-00-00-00
+EventSelector        INFO reinitialization...
+AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr    SUCCESS ****************************** Algorithm Sequence ****************************
+ApplicationMgr    SUCCESS AthSequencer/AthMasterSeq
+ApplicationMgr    SUCCESS      AthSequencer/AthAlgEvtSeq
+ApplicationMgr    SUCCESS           AthSequencer/AthBeginSeq
+ApplicationMgr    SUCCESS                AthIncFirerAlg/BeginIncFiringAlg
+ApplicationMgr    SUCCESS                IncidentProcAlg/IncidentProcAlg1
+ApplicationMgr    SUCCESS           AthSequencer/AthAllAlgSeq
+ApplicationMgr    SUCCESS                AthSequencer/AthCondSeq
+ApplicationMgr    SUCCESS                     CondInputLoader/CondInputLoader
+ApplicationMgr    SUCCESS                     MuonAlignmentCondAlg/MuonAlignmentCondAlg
+ApplicationMgr    SUCCESS                     MuonDetectorCondAlg/MuonDetectorCondAlg
+ApplicationMgr    SUCCESS                     RpcCablingCondAlg/RpcCablingCondAlg
+ApplicationMgr    SUCCESS                     MuonMDT_CablingAlg/MuonMDT_CablingAlg
+ApplicationMgr    SUCCESS                     MagField::AtlasFieldMapCondAlg/AtlasFieldMapCondAlg
+ApplicationMgr    SUCCESS                     MagField::AtlasFieldCacheCondAlg/AtlasFieldCacheCondAlg
+ApplicationMgr    SUCCESS                     RpcCondDbAlg/RpcCondDbAlg
+ApplicationMgr    SUCCESS                     MdtCalibDbAlg/MdtCalibDbAlg
+ApplicationMgr    SUCCESS                     CscCondDbAlg/CscCondDbAlg
+ApplicationMgr    SUCCESS                AthSequencer/AthAlgSeq
+ApplicationMgr    SUCCESS                     MuonCacheCreator/MuonCacheCreator
+ApplicationMgr    SUCCESS                     Muon::RpcRawDataProvider/RpcRawDataProvider
+ApplicationMgr    SUCCESS                     Muon::TgcRawDataProvider/TgcRawDataProvider
+ApplicationMgr    SUCCESS                     Muon::MdtRawDataProvider/MdtRawDataProvider
+ApplicationMgr    SUCCESS                     Muon::CscRawDataProvider/CscRawDataProvider
+ApplicationMgr    SUCCESS                     RpcRdoToRpcPrepData/RpcRdoToRpcPrepData
+ApplicationMgr    SUCCESS                     TgcRdoToTgcPrepData/TgcRdoToTgcPrepData
+ApplicationMgr    SUCCESS                     CscRdoToCscPrepData/CscRdoToCscPrepData
+ApplicationMgr    SUCCESS                     CscThresholdClusterBuilder/CscThresholdClusterBuilder
+ApplicationMgr    SUCCESS           AthSequencer/AthEndSeq
+ApplicationMgr    SUCCESS                AthIncFirerAlg/EndIncFiringAlg
+ApplicationMgr    SUCCESS                IncidentProcAlg/IncidentProcAlg2
+ApplicationMgr    SUCCESS      AthSequencer/AthOutSeq
+ApplicationMgr    SUCCESS      AthSequencer/AthRegSeq
+ApplicationMgr    SUCCESS ******************************************************************************
+ByteStreamInputSvc   INFO Picked valid file: /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/FTHOLD'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/NOISE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PED'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/PSLOPE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/RMS'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/STAT'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0BASE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/CSC/T0PHASE'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/EXT/DCS/MAGNETS/SENSORDATA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/GLOBAL/BField/Maps'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MAP_SCHEMA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/RTBLOB'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MDT/T0BLOB'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/CSC/ILINES'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/BARREL'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/MUONALIGN/TGC/SIDEC'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/CABLING/MAP_SCHEMA_CORR'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/DeadRopanels'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DCS/OffRopanels'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/DQMF/ELEMENT_STATUS'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_ETA'
+CondInputLoader      INFO created CondCont<CondAttrListCollection> with key 'ConditionStore+/RPC/TRIGGER/CM_THR_PHI'
+ApplicationMgr       INFO Application Manager Started successfully
+EventInfoByteSt...   INFO IsSimulation : 0
+EventInfoByteSt...   INFO IsTestbeam : 0
+EventInfoByteSt...   INFO IsCalibration : 0
+AthenaEventLoopMgr   INFO   ===>>>  start of run 327265    <<<===
+IOVDbSvc             INFO Opening COOL connection for COOLONL_RPC/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchema_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCCablingMapSchemaCorr_2016_2017_01 for folder /RPC/CABLING/MAP_SCHEMA_CORR
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrEta_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_ETA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCTriggerCMThrPhi_RUN1-RUN2-HI-02 for folder /RPC/TRIGGER/CM_THR_PHI
+IOVDbSvc             INFO Disconnecting from COOLONL_RPC/CONDBR2
+EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+MuonRPC_CablingSvc   INFO initMappingModel has been called
+MuonRPC_CablingSvc   INFO ToolHandle in initMappingModel - <TheRpcCablingDbTool = PublicToolHandle('RPCCablingDbTool/RPCCablingDbTool')>
+MuonRPC_CablingSvc   INFO Retrieving cabling singleton; to create an empty one or to get the existing one
+RPCcabling           INFO CablingRPC---singleton constructor ---- this must be executed just once
+RPCcabling           INFO CablingRPC---The singleton will fill the maps from the COOL streams
+RPCcabling           INFO CablingRPC---InitMaps from COOL cannot be executed NOW: empty string
+RPCcabling           INFO CablingRPC---The singleton is created here
+RPCcabling           INFO CablingRPC--- cacheCleared: s_status = 0
+MuonRPC_CablingSvc   INFO Cabling singleton cache has been cleared
+MuonRPC_CablingSvc   INFO  Trigger roads will be loaded from COOL
+ToolSvc.RPCCabl...   INFO LoadParameters /RPC/CABLING/MAP_SCHEMA I=2 
+ToolSvc.RPCCabl...   INFO loadRPCMap --- Load Map from DB
+ToolSvc.RPCCabl...   INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA>
+ToolSvc.RPCCabl...   INFO  CondAttrListCollection from DB folder have been obtained with size 1
+ToolSvc.RPCCabl...   INFO Loop over CondAttrListCollection ic = 1
+ToolSvc.RPCCabl...   INFO After Reading folder, Configuration string size is 222202
+ToolSvc.RPCCabl...   INFO LoadParameters /RPC/CABLING/MAP_SCHEMA_CORR I=2 
+ToolSvc.RPCCabl...   INFO loadRPCCorr --- Load Corrections from DB
+ToolSvc.RPCCabl...   INFO Try to read from folder </RPC/CABLING/MAP_SCHEMA_CORR>
+ToolSvc.RPCCabl...   INFO  CondAttrListCollection from DB folder have been obtained with size 1
+ToolSvc.RPCCabl...   INFO After Reading folder, Correction string size is 29369
+MuonRPC_CablingSvc   INFO  InitMappingModel: Trigger roads not yet loaded from COOL - postpone cabling initialization 
+MuonRPC_CablingSvc   INFO initTrigRoadsModel has been called
+MuonRPC_CablingSvc   INFO  Trigger roads will be loaded from COOL
+MuonRPC_CablingSvc   INFO Retrieve the pointer to the cabling singleton 
+RPCcabling           INFO CablingRPC--- cacheCleared: s_status = 0
+MuonRPC_CablingSvc   INFO Cabling singleton cache has been cleared
+ToolSvc.RPCTrig...   INFO LoadParameters /RPC/TRIGGER/CM_THR_ETA I=2 
+ToolSvc.RPCTrig...   INFO LoadParameters /RPC/TRIGGER/CM_THR_PHI I=2 
+MuonRPC_CablingSvc   INFO ======== RPC Trigger Roads from COOL - Header infos ========
+MuonRPC_CablingSvc   INFO 
+RPC LVL1 Configuration 10.6 with roads from Feb 2012
+L1 THRESHOLDS:   MU4 MU6 MU10 MU11 MU15 MU20
+Road version: "road_files_120209"
+CMA            th0    th1   th2
+eta low-pt     mu4    mu6   mu10
+phi low-pt     mu4    mu6   mu10
+eta high-pt    mu11  mu15   mu20
+phi high-pt    mu11  mu15   mu15
+
+
+RPCcabling           INFO CablingRPC---InitMaps from COOL: going to read configuration
+RPCcabling           INFO CablingRPC--->> RPC cabling map from COOL <<
+RPCcabling           INFO CablingRPC--- ReadConf: map has size 222202
+RPCcabling           INFO CablingRPC--- ReadConf: map n. of lines read is 924
+RPCcabling           INFO CablingRPC--- ReadConf: version is 5.0 Atlas R_07_03_RUN2ver104
+RPCcabling           INFO CablingRPC--- buildRDOmap
+RPCcabling           INFO CablingRPC---InitMaps from COOL: going to read corrections to configuration
+RPCcabling           INFO CablingRPC--->> RPC cabling corrections from COOL <<
+RPCcabling           INFO CablingRPC--- ReadCorr: CorrMap has size 29369
+RPCcabling           INFO CablingRPC--- ReadConf: CorrMap n. of lines read is 743
+RPCcabling           INFO CablingRPC---InitMaps from COOL - maps have been parsed
+MuonRPC_CablingSvc   INFO InitTrigRoadsModel: RPC cabling model is loaded!
+Level-1 configuration database version 5.0 Atlas R_07_03_RUN2ver104 read.
+Contains 26 Trigger Sector Types:
+negative sectors  0 - 15 ==> 18  2 24  3 19  2 24  4 20  2 24  1 18  5 25  6 
+negative sectors 16 - 31 ==> 21 13 26  6 21  7 16  8 14  7 16  6 21 13 26  1 
+positive sectors 32 - 47 ==>  9 24  2 22  9 24  2 23 10 24  2 18  1 25  5 18 
+positive sectors 48 - 63 ==>  1 26 13 21  6 17 12 15 11 17 12 21  6 26 13 22 
+
+MuonRPC_CablingSvc   INFO buildOfflineOnlineMap
+MuonRPC_CablingSvc   INFO Applying FeetPadThresholds : 0,2,5
+MuonRPC_CablingSvc   INFO MuonRPC_CablingSvc initialized succesfully
+ByteStreamCnvSvc     INFO problem adding converter for CLID [2101]
+ByteStreamCnvSvc  WARNING Cannot get converter for EventInfo
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186525031, run #327265 0 events processed so far  <<<===
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_CSC/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscFthold-RUN2-BLK-UPD1-007-00 for folder /CSC/FTHOLD
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscNoise-RUN2-BLK-UPD1-007-00 for folder /CSC/NOISE
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPed-RUN2-BLK-UPD1-007-00 for folder /CSC/PED
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscPslope-RUN2-BLK-UPD1-000-00 for folder /CSC/PSLOPE
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscRms-RUN2-BLK-UPD1-003-00 for folder /CSC/RMS
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscStat-RUN2-BLK-UPD1-008-00 for folder /CSC/STAT
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0base-RUN2-BLK-UPD1-001-00 for folder /CSC/T0BASE
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to CscT0phase-RUN2-BLK-UPD2-001-00 for folder /CSC/T0PHASE
+IOVDbSvc             INFO Disconnecting from COOLOFL_CSC/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Disconnecting from COOLOFL_DCS/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_GLOBAL/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to BFieldMap-Run1-14m-v01 for folder /GLOBAL/BField/Maps
+IOVDbSvc             INFO Disconnecting from COOLONL_GLOBAL/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLONL_MDT/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMapSchema_BMG_01 for folder /MDT/CABLING/MAP_SCHEMA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTCablingMezzanineSchema_M5-RUN2 for folder /MDT/CABLING/MEZZANINE_SCHEMA
+IOVDbSvc             INFO Disconnecting from COOLONL_MDT/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MDT/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTRT-RUN2-UPD4-21 for folder /MDT/RTBLOB
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MDTT0-RUN2-UPD4-21 for folder /MDT/T0BLOB
+IOVDbSvc             INFO Disconnecting from COOLOFL_MDT/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_MUONALIGN/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignCscIlines-UPD1-02 for folder /MUONALIGN/CSC/ILINES
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMdtAsbuiltparams-RUN2-BA_ONLY-UPD4-00 for folder /MUONALIGN/MDT/ASBUILTPARAMS
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTBarrelAlign-RUN2-BA_ROLLING_11-BLKP-UPD4-00 for folder /MUONALIGN/MDT/BARREL
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapAAlign-RUN2-ECA_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignMDTEndCapCAlign-RUN2-ECC_ROLLING_2015_03_01-UPD4-02 for folder /MUONALIGN/MDT/ENDCAP/SIDEC
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapAAlign-RUN2-TGCA_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEA
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to MuonAlignTGCEndCapCAlign-RUN2-TGCC_ROLLING_2011_01-ES1-UPD1-03 for folder /MUONALIGN/TGC/SIDEC
+IOVDbSvc             INFO Disconnecting from COOLOFL_MUONALIGN/CONDBR2
+IOVDbSvc             INFO Opening COOL connection for COOLOFL_RPC/CONDBR2
+IOVDbFolder          INFO HVS tag CONDBR2-BLKPA-2018-13 resolved to RPCDQMFElementStatus_Run1_UPD4-RUN2-01 for folder /RPC/DQMF/ELEMENT_STATUS
+IOVDbSvc             INFO Disconnecting from COOLOFL_RPC/CONDBR2
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/CSC/ILINES>
+MuonAlignmentCo...   INFO Size of CSC/ILINES CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/CSC/ILINES' )  readCscILinesCdo->size()= 1
+MuonAlignmentCo...   INFO Range of CSC/ILINES input is {[0,0,t:1425168000] - [t:4294967294.854775807]}
+MGM::MuonDetect...   INFO temporary CSC I-line container with size = 128
+MGM::MuonDetect...   INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines             is 128
+MGM::MuonDetect...   INFO # of entries in the CSC I-lines historical container          is 128
+MuonAlignmentCo...   INFO recorded new CscInternalAlignmentMapContainer with range {[0,0,t:1425168000] - [t:4294967294.854775807]} into Conditions Store
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ASBUILTPARAMS>
+MuonAlignmentCo...   INFO Size of MDT/ASBUILTPARAMS CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ASBUILTPARAMS' )  ->size()= 1
+MuonAlignmentCo...   INFO Range of MDT/ASBUILTPARAMS input is {[0,0,t:0] - [t:4294967294.854775807]}
+MGM::MuonDetect...   INFO temporary As-Built container with size = 628
+MGM::MuonDetect...   INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to As-Built                  is 628
+MGM::MuonDetect...   INFO # of entries in the MdtAsBuilt historical container                 is 628
+MuonAlignmentCo...   INFO recorded new MdtAsBuiltMapContainer with range {[0,0,t:0] - [t:4294967294.854775807]} into Conditions Store
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/BARREL>
+MuonAlignmentCo...   INFO Size of /MUONALIGN/MDT/BARREL CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/BARREL' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/MDT/BARREL input is, ALines: {[0,0,t:1497851700] - [t:1498737300]} BLines: {[0,0,t:1497851700] - [t:1498737300]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/MDT/BARREL have IoV = 195569
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/BARREL> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA>
+MuonAlignmentCo...   INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEA CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEA' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEA input is, ALines: {[0,0,t:1497891240] - [t:1497898380]} BLines: {[0,0,t:1497891240] - [t:1497898380]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEA have IoV = 195588
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEA> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC>
+MuonAlignmentCo...   INFO Size of /MUONALIGN/MDT/ENDCAP/SIDEC CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/MDT/ENDCAP/SIDEC' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/MDT/ENDCAP/SIDEC input is, ALines: {[0,0,t:1497892260] - [t:1497899460]} BLines: {[0,0,t:1497892260] - [t:1497899460]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/MDT/ENDCAP/SIDEC have IoV = 195599
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/MDT/ENDCAP/SIDEC> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEA>
+MuonAlignmentCo...   INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEA
+MuonAlignmentCo...   INFO Size of /MUONALIGN/TGC/SIDEA CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEA' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/TGC/SIDEA input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/TGC/SIDEA have IoV = 82360
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEA> loaded
+MuonAlignmentCo...   INFO Load alignment parameters from DB folder </MUONALIGN/TGC/SIDEC>
+MuonAlignmentCo...   INFO No BLines decoding will be attempted for folder named /MUONALIGN/TGC/SIDEC
+MuonAlignmentCo...   INFO Size of /MUONALIGN/TGC/SIDEC CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MUONALIGN/TGC/SIDEC' )  readCdo->size()= 1
+MuonAlignmentCo...   INFO Range of /MUONALIGN/TGC/SIDEC input is, ALines: {[0,0,t:0] - [t:4294967294.854775807]}
+MuonAlignmentCo...   INFO Data read from folder /MUONALIGN/TGC/SIDEC have IoV = 82359
+MuonAlignmentCo...   INFO A- and B-Lines parameters from DB folder </MUONALIGN/TGC/SIDEC> loaded
+MGM::MuonDetect...   INFO temporary A-line container with size = 2694
+MGM::MuonDetect...   INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines         is 2694
+MGM::MuonDetect...   INFO # of entries in the A-lines historical container          is 2814
+MuonAlignmentCo...   INFO recorded new ALineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store
+MGM::MuonDetect...   INFO In updateDeformations()
+MGM::MuonDetect...   INFO temporary B-line container with size = 1206
+MGM::MuonDetect...   INFO # of B-lines read from the ALineMapContainer in StoreGate   is 1206
+MGM::MuonDetect...   INFO # of deform-Transforms updated according to B-lines         is 1174
+MGM::MuonDetect...   INFO # of entries in the B-lines historical container            is 1174
+MuonAlignmentCo...   INFO recorded new BLineMapContainer with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store
+MuonGeoModel         INFO MuonDetectorFactory - constructor  MuonSystem OuterRadius 13000 Length 22030
+MuonDetectorCon...   INFO create MuonDetectorTool - package version = MuonGeoModel-00-00-00
+MuonDetectorCon...   INFO (from GeoModelSvc)    AtlasVersion = <ATLAS-R2-2016-01-00-01>  MuonVersion = <>
+MuonDetectorCon...   INFO Keys for Muon Switches are  (key) ATLAS-R2-2016-01-00-01 (node) ATLAS
+MuonDetectorCon...   INFO (from GeoModelSvc) in AtlasVersion = <ATLAS-R2-2016-01-00-01>  default MuonVersion is <MuonSpectrometer-R.08.01>
+MuonDetectorCon...   INFO Properties have been set as follows: 
+MuonDetectorCon...   INFO     LayoutName                     R
+MuonDetectorCon...   INFO     IncludeCutouts                 0
+MuonDetectorCon...   INFO     IncludeCutoutsBog              0
+MuonDetectorCon...   INFO     IncludeCtbBis                  0
+MuonDetectorCon...   INFO     ControlAlines                  111111
+MuonDetectorCon...   INFO     MinimalGeoFlag                 0
+MuonDetectorCon...   INFO     EnableCscIntAlignment          1
+MuonDetectorCon...   INFO     EnableCscIntAlignmentFromGM    0
+MuonDetectorCon...   INFO     ControlCscIntAlines            111111
+MuonDetectorCon...   INFO     EnableMdtDeformations          1
+MuonDetectorCon...   INFO     EnableMdtAsBuiltParameters     1
+MuGM:MuonFactory     INFO MuonLayout set to <R.08.01> = Development version for DC3 - infrastructures 
+MuGM:MuonFactory     INFO                    BOG cutouts are activated 1 , all other cutouts are disabled 1
+MuGM:MuonFactory     INFO Manager created for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuonGeoModel.MYSQL   INFO GeometryVersion set to <R.08.01>
+MuGM:MuonFactory     INFO Mysql helper class created here for geometry version R.08.01 from DB MuonVersion <MuonSpectrometer-R.08.01>
+MuGM:MuonFactory     INFO MDTIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO RPCIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO TGCIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO CSCIDHELPER retrieved from DetStore
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ************************
+MuGM:MuonFactory     INFO  *** Start building the Muon Geometry Tree **********************
+MuGM:RDBReadAtlas    INFO Start retriving dbObjects with tag = <ATLAS-R2-2016-01-00-01> node <ATLAS>
+RDBAccessSvc      WARNING Could not get the tag for XtomoData node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO After getQuery XtomoData
+In DblQ00Xtomo(data)
+No XtomoData table in the MuonDD Database
+MuGM:RDBReadAtlas    INFO After new DblQ00Xtomo
+MuGM:RDBReadAtlas    INFO After m_dhxtomo.data()
+MuGM:RDBReadAtlas    INFO No Ascii aszt input found: looking for A-lines in ORACLE
+MuGM:RDBReadAtlas    INFO ASZT table found in Oracle
+MuGM:RDBReadAtlas    INFO ASZT size is 32
+MuGM:RDBReadAtlas    INFO No Ascii iacsc input found: looking for A-lines in ORACLE
+RDBAccessSvc      WARNING Could not get the tag for ISZT node. Returning 0 pointer to IRDBQuery
+MuGM:RDBReadAtlas    INFO No ISZT table in Oracle
+MuGM:RDBReadAtlas    INFO Access granted for all dbObjects needed by muon detectors
+MuonGeoModel.MYSQL   INFO LayoutName (from DBAM) set to <R.08>  -- relevant for CTB2004
+MuGM:ProcStations    INFO  Processing Stations and Components
+MuGM:ProcStations    INFO  Processing Stations and Components DONE
+MuGM:ProcTechnol.s   INFO nMDT 26 nCSC 4 nTGC 44 nRPC 50
+MuGM:ProcTechnol.s   INFO nDED 4 nSUP 8 nSPA 4
+MuGM:ProcTechnol.s   INFO nCHV 14 nCRO 14 nCMI 12 nLBI 12
+MuGM:ProcPosition    INFO  *** N. of stations positioned in the setup 234
+MuGM:ProcPosition    INFO  *** N. of stations described in mysql      234
+MuGM:ProcPosition    INFO  *** N. of types  32 size of jtypvec 32
+MuGM:ProcPosition    INFO  *** : 234 kinds of stations (type*sub_type) 
+MuGM:ProcPosition    INFO  *** : 1758 physical stations in space - according to the MuonDD DataBase
+MuGM:ProcCutouts     INFO  Processing Cutouts for geometry layout R.08
+MuGM:ProcCutouts     INFO  Processing Cutouts DONE
+MuGM:RDBReadAtlas    INFO  ProcessTGCreadout - version 7 wirespacing 1.8
+MuGM:RDBReadAtlas    INFO Intermediate Objects built from primary numbers
+MuGM:MuonFactory     INFO  theMaterialManager retrieven successfully from the DetStore
+MuGM:MuonFactory     INFO MuonSystem description from OracleTag=<ATLAS-R2-2016-01-00-01> and node=<ATLAS>
+MuGM:MuonFactory     INFO  TreeTop added to the Manager
+MuGM:MuonFactory     INFO  Muon Layout R.08.01
+MuGM:MuonFactory     INFO Fine Clash Fixing disabled: (should be ON/OFF for Simulation/Reconstruction)
+MuGM:MuonFactory     INFO  **************** MuonDetectorFactory001 ****************************
+MuGM:MuonFactory     INFO  *** The Muon Chamber Geometry Tree is built with 
+MuGM:MuonFactory     INFO  *** 1758 child volumes 
+MuGM:MuonFactory     INFO  *** 1839 independent elements and 
+MuGM:MuonFactory     INFO  *** 11473 elements cloned or shared 
+MuGM:MuonFactory     INFO  *** 234 kinds of stations
+MuGM:MuonFactory     INFO  *** 1758 stations with alignable transforms
+MuGM:MuonFactory     INFO  *** 148 stations are described as Assemblies
+MuGM:MuonFactory     INFO  *** 1758 MuonStations 
+MuGM:MuonFactory     INFO  *** 	 2324 MDT Readout Elements 	 1186 MDT Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 32 CSC Readout Elements 	 32 CSC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1122 RPC Readout Elements 	 600 RPC Detector Elements 
+MuGM:MuonFactory     INFO  *** 	 1578 TGC Readout Elements 	 1578 TGC Detector Elements 
+MuGM:MuonFactory     INFO  ********************************************************************
+MuGM:MuonFactory     INFO  *** Inert Material built according to DB switches and config. ****** 
+MuGM:MuonFactory     INFO  *** The Muon Geometry Tree has 1758 child vol.s in total ********
+MuGM:MuonFactory     INFO  ********************************************************************
+
+MGM::MuonDetect...   INFO Init A/B Line Containers - done - size is respectively 1758/0
+MGM::MuonDetect...   INFO Init of CSC I-Lines will be done via Conditions DB
+MGM::MuonDetect...   INFO Init I-Line Container - done - size is respectively 128
+MGM::MuonDetect...   INFO I-Line for CSC wire layers loaded (Csc Internal Alignment)
+MGM::MuonDetect...   INFO According to configuration they WILL be used 
+MGM::MuonDetect...   INFO Filling cache
+MGM::MuonDetect...   INFO temporary CSC I-line container with size = 128
+MGM::MuonDetect...   INFO # of CSC I-lines read from the ILineMapContainer in StoreGate is 128
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines             is 128
+MGM::MuonDetect...   INFO # of entries in the CSC I-lines historical container          is 128
+MGM::MuonDetect...   INFO temporary As-Built container with size = 628
+MGM::MuonDetect...   INFO # of MDT As-Built read from the MdtAsBuiltMapContainer in StoreGate is 628
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to As-Built                  is 628
+MGM::MuonDetect...   INFO # of entries in the MdtAsBuilt historical container                 is 628
+MGM::MuonDetect...   INFO temporary A-line container with size = 2694
+MGM::MuonDetect...   INFO # of A-lines read from the ALineMapContainer in StoreGate is 2694
+MGM::MuonDetect...   INFO # of deltaTransforms updated according to A-lines         is 2694
+MGM::MuonDetect...   INFO # of entries in the A-lines historical container          is 2814
+MGM::MuonDetect...   INFO In updateDeformations()
+MGM::MuonDetect...   INFO temporary B-line container with size = 1206
+MGM::MuonDetect...   INFO # of B-lines read from the ALineMapContainer in StoreGate   is 1206
+MGM::MuonDetect...   INFO # of deform-Transforms updated according to B-lines         is 1174
+MGM::MuonDetect...   INFO # of entries in the B-lines historical container            is 1174
+MuonDetectorCon...   INFO recorded new MuonDetectorManager with range {[0,0,t:1497892260,l:0] - [t:1497898380]} into Conditions Store
+RpcCablingCondAlg    INFO maps configuration have been parsed
+RpcCablingCondAlg    INFO recorded new RpcCablingCondData with range {[315000,l:0] - [999999,l:0]}
+MuonMDT_CablingAlg   INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MEZZANINE_SCHEMA' )  readCdoMez->size()= 24
+MuonMDT_CablingAlg   INFO Range of input is {[0,l:0] - [INVALID]}
+MuonMDT_CablingAlg   INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/CABLING/MAP_SCHEMA' )  readCdoMap->size()= 2312
+MuonMDT_CablingAlg   INFO Range of input is {[327264,l:4294640031] - [327265,l:4294640030]}
+MuonMDT_CablingAlg   INFO recorded new MuonMDT_CablingMap with range {[327264,t:0,l:4294640031] - [327265,l:4294640030]} into Conditions Store
+AtlasFieldMapCo...   INFO updateFieldMap: Update map from conditions
+AtlasFieldMapCo...   INFO updateFieldMap: Update map from conditions: Range of input/output is {[0,l:0] - [INVALID]}
+AtlasFieldMapCo...   INFO updateFieldMap: reading magnetic field map filenames from COOL
+AtlasFieldMapCo...   INFO updateFieldMap: found map of type GlobalMap with soleCur=7730 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_7730_20400_14m.root)
+AtlasFieldMapCo...   INFO updateFieldMap: found map of type SolenoidMap with soleCur=7730 toroCur=0 (path file:MagneticFieldMaps/bfieldmap_7730_0_14m.root)
+AtlasFieldMapCo...   INFO updateFieldMap: found map of type ToroidMap with soleCur=0 toroCur=20400 (path file:MagneticFieldMaps/bfieldmap_0_20400_14m.root)
+AtlasFieldMapCo...   INFO updateFieldMap: tagInfoH  ( 'TagInfo' , 'DetectorStore+ProcessingTags' )  is valid. 
+AtlasFieldMapCo...   INFO updateFieldMap: DID NOT reset currents from TagInfo
+AtlasFieldMapCo...   INFO updateFieldMap: Set map currents from FieldSvc: solenoid/toroid 7730,20400
+AtlasFieldMapCo...   INFO updateFieldMap: Use map file MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldMapCo...   INFO updateFieldMap: Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldMapCo...   INFO execute: solenoid zone id  7000
+AtlasFieldMapCo...   INFO execute: recored AtlasFieldMapCondObj with field map
+AtlasFieldCache...   INFO UpdateCurrentFromConditions  
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Range of input/output is {[0,0,t:1497895317.371000000] - [t:1497898549.609000000]}
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Attempt 1 at reading currents from DCS (using channel name)
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_Current , 1 , 7729.99
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] CentralSol_SCurrent , 2 , 7730
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_Current , 3 , 20399.9
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Trying to read from DCS: [channel name, index, value] Toroids_SCurrent , 4 , 20397.7
+AtlasFieldCache...   INFO UpdateCurrentFromConditions: Currents read from DCS - solenoid 7729.99 toroid 20399.9
+AtlasFieldCache...   INFO scaleField: Solenoid field scale factor 1. Solenoid and map currents: 7729.99,7730
+AtlasFieldCache...   INFO scaleField: Toroid field scale factor 1. Toroid and map currents: 20399.9,20400
+AtlasFieldCache...   INFO execute: initialized AtlasFieldCacheCondObj and cache with SFs - sol/tor 1/1
+AtlasFieldCache...   INFO execute: solenoid zone id  7000
+MdtCalibDbAlg        INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/RTBLOB' )  readCdoRt->size()= 1186
+MdtCalibDbAlg        INFO Range of input is {[327265,l:0] - [327342,l:0]}
+MdtCalibDbAlg        INFO MdtCalibDbAlg::loadRt Read 1188RTs from COOL
+MdtCalibDbAlg        INFO recorded new MdtRtRelationCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store
+MdtCalibDbAlg        INFO recorded new MdtCorFuncSetCollection with range {[327265,l:0] - [327342,l:0]} into Conditions Store
+MdtCalibDbAlg        INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML -6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1
+MdtCalibDbAlg        INFO Ignoring nonexistant station in calibration DB: MuonSpectrometer BML stationEta 6 stationPhi 7 MDT multiLayer 1 tubeLayer 1 tube 1
+MdtCalibDbAlg        INFO Size of CondAttrListCollection  ( 'CondAttrListCollection' , 'ConditionStore+/MDT/T0BLOB' )  readCdoTube->size()= 1186
+MdtCalibDbAlg        INFO Range of input is {[319000,l:0] - [INVALID]}
+MdtCalibDbAlg        INFO recorded new MdtTubeCalibContainerCollection with range {[319000,l:0] - [INVALID]} into Conditions Store
+CscCondDbData        INFO Maximum Layer hash is 255
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186525031, run #327265 1 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186524665, run #327265 1 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186524665, run #327265 2 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186542447, run #327265 2 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186542447, run #327265 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186543405, run #327265 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186543405, run #327265 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186548387, run #327265 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186548387, run #327265 5 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186515186, run #327265 5 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186515186, run #327265 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186556019, run #327265 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186556019, run #327265 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186542866, run #327265 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186542866, run #327265 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186537901, run #327265 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186537901, run #327265 9 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186517811, run #327265 9 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186517811, run #327265 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186534221, run #327265 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186534221, run #327265 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186540986, run #327265 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186540986, run #327265 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186535104, run #327265 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186535104, run #327265 13 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186539903, run #327265 13 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186539903, run #327265 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186552713, run #327265 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186552713, run #327265 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186524730, run #327265 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186524730, run #327265 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186547632, run #327265 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186547632, run #327265 17 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186555621, run #327265 17 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186555621, run #327265 18 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186568452, run #327265 18 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186568452, run #327265 19 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #186580451, run #327265 19 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #186580451, run #327265 20 events processed so far  <<<===
+Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+CondInputLoader      INFO Finalizing CondInputLoader...
+AtlasFieldMapCo...   INFO  in finalize 
+AtlasFieldCache...   INFO  in finalize 
+IncidentProcAlg2     INFO Finalize
+IOVDbFolder          INFO Folder /CSC/FTHOLD (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/322656 ((     0.03 ))s
+IOVDbFolder          INFO Folder /CSC/NOISE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/350062 ((     0.04 ))s
+IOVDbFolder          INFO Folder /CSC/PED (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411187 ((     0.19 ))s
+IOVDbFolder          INFO Folder /CSC/PSLOPE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/353376 ((     0.04 ))s
+IOVDbFolder          INFO Folder /CSC/RMS (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/411395 ((     0.11 ))s
+IOVDbFolder          INFO Folder /CSC/STAT (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/230496 ((     0.09 ))s
+IOVDbFolder          INFO Folder /CSC/T0BASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/314380 ((     0.02 ))s
+IOVDbFolder          INFO Folder /CSC/T0PHASE (AttrListColl) db-read 1/1 objs/chan/bytes 32/32/3136 ((     0.01 ))s
+IOVDbFolder          INFO Folder /EXT/DCS/MAGNETS/SENSORDATA (AttrListColl) db-read 1/1 objs/chan/bytes 4/4/20 ((     0.08 ))s
+IOVDbFolder          INFO Folder /GLOBAL/BField/Maps (AttrListColl) db-read 1/1 objs/chan/bytes 3/3/202 ((     0.10 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 2312/2437/216520 ((     0.14 ))s
+IOVDbFolder          INFO Folder /MDT/CABLING/MEZZANINE_SCHEMA (AttrListColl) db-read 1/1 objs/chan/bytes 24/24/288 ((     0.01 ))s
+IOVDbFolder          INFO Folder /MDT/RTBLOB (AttrListColl) db-read 1/1 objs/chan/bytes 2372/1186/2251209 ((     0.13 ))s
+IOVDbFolder          INFO Folder /MDT/T0BLOB (AttrListColl) db-read 1/1 objs/chan/bytes 1186/1186/1374284 ((     0.07 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/CSC/ILINES (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/10814 ((     0.03 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/ASBUILTPARAMS (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/128992 ((     0.01 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/BARREL (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/140293 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65494 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/MDT/ENDCAP/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/65497 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/TGC/SIDEA (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 ((     0.02 ))s
+IOVDbFolder          INFO Folder /MUONALIGN/TGC/SIDEC (AttrListColl) db-read 1/1 objs/chan/bytes 1/1/165643 ((     0.02 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/222235 ((     0.05 ))s
+IOVDbFolder          INFO Folder /RPC/CABLING/MAP_SCHEMA_CORR (AttrListColl) db-read 1/2 objs/chan/bytes 1/1/29402 ((     0.03 ))s
+IOVDbFolder          INFO Folder /RPC/DCS/DeadRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 32/48/6200 ((     0.02 ))s
+IOVDbFolder          INFO Folder /RPC/DCS/OffRopanels (AttrListColl) db-read 1/1 objs/chan/bytes 4/48/16 ((     0.03 ))s
+IOVDbFolder          INFO Folder /RPC/DQMF/ELEMENT_STATUS (AttrListColl) db-read 1/1 objs/chan/bytes 8320/8320/6180700 ((     0.24 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_ETA (AttrListColl) db-read 1/2 objs/chan/bytes 1613/1613/7562651 ((     0.16 ))s
+IOVDbFolder          INFO Folder /RPC/TRIGGER/CM_THR_PHI (AttrListColl) db-read 1/2 objs/chan/bytes 1612/1612/8096306 ((     0.09 ))s
+IOVDbFolder          INFO Folder /TDAQ/RunCtrl/SOR_Params (AttrListColl) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbFolder          INFO Folder /TGC/CABLING/MAP_SCHEMA (AttrListColl) db-read 0/0 objs/chan/bytes 0/1/0 ((     0.00 ))s
+IOVDbSvc             INFO  bytes in ((      1.81 ))s
+IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=CONDBR2 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLONL_TDAQ/CONDBR2 : nConnect: 1 nFolders: 1 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLOFL_MUONALIGN/CONDBR2 : nConnect: 2 nFolders: 7 ReadTime: ((     0.13 ))s
+IOVDbSvc             INFO Connection COOLONL_RPC/CONDBR2 : nConnect: 2 nFolders: 4 ReadTime: ((     0.33 ))s
+IOVDbSvc             INFO Connection COOLONL_TGC/CONDBR2 : nConnect: 1 nFolders: 1 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection COOLONL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     0.16 ))s
+IOVDbSvc             INFO Connection COOLONL_GLOBAL/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.10 ))s
+IOVDbSvc             INFO Connection COOLOFL_DCS/CONDBR2 : nConnect: 2 nFolders: 3 ReadTime: ((     0.13 ))s
+IOVDbSvc             INFO Connection COOLOFL_RPC/CONDBR2 : nConnect: 2 nFolders: 1 ReadTime: ((     0.24 ))s
+IOVDbSvc             INFO Connection COOLOFL_MDT/CONDBR2 : nConnect: 2 nFolders: 2 ReadTime: ((     0.20 ))s
+IOVDbSvc             INFO Connection COOLOFL_CSC/CONDBR2 : nConnect: 2 nFolders: 8 ReadTime: ((     0.52 ))s
+ToolSvc              INFO Removing all tools created by ToolSvc
+TgcRdoToTgcPrep...   INFO finalize(): input RDOs->output PRDs [Hit: 6807->6807, Tracklet: 28->28, TrackletEIFI: 692->692, HiPt: 4031->4031, SL: 3->3]
 MdtRawDataProvi...   INFO Fraction of fills that use the cache = 0
 TgcRawDataProvi...   INFO Fraction of fills that use the cache = 0
 RpcROD_Decoder:...   INFO  ============ FINAL RPC DATA FORMAT STAT. =========== 
@@ -50,3 +1082,15 @@ RpcROD_Decoder:...   INFO  SL Footer Errors.............0
 RpcROD_Decoder:...   INFO  RX Footer Errors.............0
 RpcROD_Decoder:...   INFO  CRC8 check Failures..........0
 RpcROD_Decoder:...   INFO  ==================================================== 
+ToolSvc.ByteStr...   INFO in finalize()
+ToolSvc.TGCCabl...   INFO finalize
+IdDictDetDescrCnv    INFO in finalize
+*****Chrono*****     INFO ****************************************************************************************************
+*****Chrono*****     INFO  The Final CPU consumption ( Chrono ) Table (ordered)
+*****Chrono*****     INFO ****************************************************************************************************
+cObj_ALL             INFO Time User   : Tot=   10 [ms] Ave/Min/Max=0.312(+- 1.74)/    0/   10 [ms] #= 32
+ChronoStatSvc        INFO Time User   : Tot= 27.6  [s]                                             #=  1
+*****Chrono*****     INFO ****************************************************************************************************
+ChronoStatSvc.f...   INFO  Service finalized successfully 
+ApplicationMgr       INFO Application Manager Finalized successfully
+ApplicationMgr       INFO Application Manager Terminated successfully
diff --git a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt
index 390ed295ddaa5b2c6c7f71b10a32485ea9f233f0..d0763d78764c9d7f03bc69fa368606c4d0e81084 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt
+++ b/MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry/CMakeLists.txt
@@ -34,15 +34,14 @@ atlas_depends_on_subdirs( PUBLIC
                           MuonSpectrometer/MuonDetDescr/MuonAGDDDescription )
 
 # External dependencies:
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
 atlas_add_library( MuonReadoutGeometry
                    src/*.c*
                    PUBLIC_HEADERS MuonReadoutGeometry
-                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives Identifier GaudiKernel MuonAlignmentData TrkDetElementBase TrkDistortedSurfaces TrkSurfaces MuonIdHelpersLib StoreGateLib GeoModelUtilities CxxUtils ${extra_libs}
+                   INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaBaseComps AthenaKernel GeoPrimitives Identifier GaudiKernel MuonAlignmentData TrkDetElementBase TrkDistortedSurfaces TrkSurfaces MuonIdHelpersLib StoreGateLib GeoModelUtilities CxxUtils ${extra_libs}
                    PRIVATE_LINK_LIBRARIES AGDDModel MuonAGDDDescription )
 
 
diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MuonRegSelCondAlg.cxx b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MuonRegSelCondAlg.cxx
index da465972034b4b8099006f38d067abd2e8edb0fa..e008e4a4589289e4bb03129ba734c08fc8ce925d 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MuonRegSelCondAlg.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/src/MuonRegSelCondAlg.cxx
@@ -56,6 +56,20 @@ StatusCode MuonRegSelCondAlg::execute(const EventContext& ctx)  const
   
   /// do stuff here ...  
   ATH_MSG_DEBUG( "Creating region selector table " << m_tableKey );
+
+
+  SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  if (lutCondData.isValid()) {
+    /// inpractice, this should never be called, although in serial athena,                                                                          
+    /// because the implementation of the conditions behaviour is flawed in                                                                          
+    /// the framework, this routine will be called every event (!) regardless                                                                        
+    /// of whether it should be called or not so we need this check to                                                                               
+    /// prevent unecessary code execution on out our side                                                                                            
+    ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid." );
+    return StatusCode::SUCCESS;
+  }
+
+
  
 
   SG::ReadCondHandle<MuonMDT_CablingMap> cabling( m_cablingKey, ctx );
@@ -83,8 +97,11 @@ StatusCode MuonRegSelCondAlg::execute(const EventContext& ctx)  const
 
   IRegSelLUTCondData* rcd = new IRegSelLUTCondData( std::move(rd) );
   
-  try { 
-    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  try {
+    /// leave this commented here since this is where it should really be,
+    /// but we had to move it up in the code to handle the flawed conditions 
+    /// handling in the serial athena use case 
+    ///    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
     if( lutCondData.record( id_range, rcd ).isFailure() ) {
       ATH_MSG_ERROR( "Could not record " << m_tableKey 
 		     << " " << lutCondData.key()
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..22b11c43bc30587e5771db1cc0e874bc70a950f8
--- /dev/null
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.cxx
@@ -0,0 +1,229 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+#include "ClusterTimeProjectionMMClusterBuilderTool.h"
+
+#include <algorithm>
+#include <numeric>
+
+#include "GaudiKernel/PhysicalConstants.h"
+#include "GaudiKernel/SystemOfUnits.h"
+
+namespace {
+    static constexpr double halfGapWidth = 2.52;
+}
+
+
+Muon::ClusterTimeProjectionMMClusterBuilderTool::ClusterTimeProjectionMMClusterBuilderTool(
+                    const std::string& t,
+                    const std::string& n, const IInterface* p):
+                    AthAlgTool(t, n, p) {
+    declareInterface<IMMClusterBuilderTool>(this);
+    declareProperty("maxHoleSize", m_maxHoleSize = 1);
+}
+
+StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::initialize() {
+    ATH_CHECK(m_idHelperSvc.retrieve());
+    return StatusCode::SUCCESS;
+}
+
+StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::getClusters(
+                std::vector<Muon::MMPrepData>& MMprds,
+                std::vector<Muon::MMPrepData*>& clustersVec) const {
+    std::vector<std::vector<Muon::MMPrepData>> prdsPerLayer(8, std::vector<Muon::MMPrepData>(0));
+    ATH_CHECK(sortHitsToLayer(MMprds, prdsPerLayer));
+    for (const auto& prdsOfLayer : prdsPerLayer) {
+        if (prdsOfLayer.size() < 2) continue;  // require at least two strips per layer
+        std::vector<std::vector<uint>> idxClusters;  // index of strips in cluster
+        StatusCode sc = clusterLayer(prdsOfLayer, idxClusters);
+        if (sc.isFailure()) continue;
+        for (uint i_cluster = 0; i_cluster < idxClusters.size(); i_cluster++) {
+            double clusterPosition, clusterPositionErrorSq;
+            sc = getClusterPosition(prdsOfLayer, idxClusters.at(i_cluster),
+                                    clusterPosition, clusterPositionErrorSq);
+            if (sc.isFailure()) continue;
+            sc = writeClusterPrd(prdsOfLayer, idxClusters.at(i_cluster),
+                                 clusterPosition, clusterPositionErrorSq, clustersVec);
+            if (sc.isFailure()) continue;
+        }
+    }
+    return StatusCode::SUCCESS;
+}
+
+
+StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::sortHitsToLayer(
+                const std::vector<Muon::MMPrepData>& MMprds,
+                std::vector<std::vector<Muon::MMPrepData>>& prdsPerLayer)const {
+        // sorting hits by gas gap
+    for (const auto& prd : MMprds) {
+        Identifier id = prd.identify();
+        int layer = 4*(m_idHelperSvc->mmIdHelper().multilayer(id)-1) +
+                        (m_idHelperSvc->mmIdHelper().gasGap(id)-1);
+        prdsPerLayer.at(layer).push_back(prd);
+    }
+
+    ATH_MSG_DEBUG("sorted hist");
+    // sort MMPrds by channel
+    for (unsigned int i_layer = 0; i_layer < prdsPerLayer.size(); i_layer++) {
+               std::sort(prdsPerLayer.at(i_layer).begin(), prdsPerLayer.at(i_layer).end(),
+                        [this](const MMPrepData &a, const MMPrepData &b){
+                            return this-> channel(a) < this->channel(b);});
+    }
+    return StatusCode::SUCCESS;
+}
+
+StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::clusterLayer(
+                const std::vector<Muon::MMPrepData> &MMPrdsPerLayer,
+                std::vector<std::vector<uint>> &idxClusters) const {
+    // get gas gap for later correction of the sign of the slope
+    int gasGap = m_idHelperSvc->mmIdHelper().gasGap(MMPrdsPerLayer.at(0).identify());
+
+    ATH_MSG_DEBUG("Scanning gas gap "<< gasGap);
+    for (const auto &prd : MMPrdsPerLayer) {
+        ATH_MSG_DEBUG("Hit channel "<< channel(prd)
+                       << " local positionX " << prd.localPosition().x()
+                       << " time " << prd.time()
+                       << " corrected time " << prd.time()
+                       << " angle to IP" << std::atan(prd.globalPosition().perp() /
+                                std::abs(prd.globalPosition().z()))
+                       << " "<< std::atan(prd.globalPosition().perp() /
+                                std::abs(prd.globalPosition().z())) / Gaudi::Units::degree
+                       << " stationEta " <<m_idHelperSvc->mmIdHelper().stationEta(prd.identify())
+                       << " stationPhi "<< m_idHelperSvc->mmIdHelper().stationEta(prd.identify())
+                       << " multilayer " <<m_idHelperSvc->mmIdHelper().multilayer(prd.identify()));
+    }
+
+    // simple grouping of strips using the fact that the strips where ordered by channel
+    idxClusters.push_back(std::vector<uint>{0});  // assumes that mmPrdsPerLayer always has at least one strip
+    for (uint i_strip = 1; i_strip < MMPrdsPerLayer.size(); i_strip++) {
+        if (channel(MMPrdsPerLayer.at(i_strip)) -
+                channel(MMPrdsPerLayer.at(i_strip-1)) <= m_maxHoleSize+1) {
+            idxClusters.back().push_back(i_strip);
+        } else {
+            idxClusters.push_back(std::vector<uint>{i_strip});
+        }
+    }
+    ATH_MSG_DEBUG("Found "<< idxClusters.size() <<" clusters");
+    for (const auto idxCluster : idxClusters) {
+        ATH_MSG_DEBUG("cluster: "<< idxCluster);
+    }
+    return StatusCode::SUCCESS;
+}  // end of cluster layer
+
+StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::getClusterPosition(
+                const std::vector<Muon::MMPrepData> &MMPrdsOfLayer,
+                const std::vector<uint> &idxCluster, double &clusterPosition,
+                double &clusterPositionErrorSq) const {
+    if (idxCluster.empty()) return StatusCode::FAILURE;
+    double qtot = 0;
+    double meanTheta = 0;
+    double meanDriftDist = 0;
+    double meanDriftDistError = 0;
+    double meanPosX = 0;
+    double meanPosXError = 0;
+    for (auto idx : idxCluster) {
+        double driftDist = MMPrdsOfLayer.at(idx).driftDist();
+        double charge = MMPrdsOfLayer.at(idx).charge()*Gaudi::Units::perThousand; //  divide by 1000 to avoid overflow of variables
+        qtot += charge;
+        meanPosX += MMPrdsOfLayer.at(idx).localPosition().x()*charge;
+        meanPosXError += MMPrdsOfLayer.at(idx).localCovariance()(1, 1)*charge*charge;
+        meanDriftDist += driftDist*charge;
+        meanDriftDistError += MMPrdsOfLayer.at(idx).localCovariance()(0, 0)*charge*charge;
+        ATH_MSG_VERBOSE("Strip:"
+                        <<" drift dist " << driftDist
+                        <<" +- "<<  std::sqrt(MMPrdsOfLayer.at(idx).localCovariance()(0,0))
+                        <<" xpos " << MMPrdsOfLayer.at(idx).localPosition().x()
+                        << " +- "<< std::sqrt(MMPrdsOfLayer.at(idx).localCovariance()(1,1))
+                        <<" xMeanPos " << meanPosX / qtot
+                        <<" +- " << std::sqrt(meanPosXError) / qtot
+                        << " meanPosXError " << meanPosXError
+                        <<" meanDriftDist " << meanDriftDist/qtot
+                        <<" meanDriftDist Error " <<  std::sqrt(meanDriftDistError)/qtot
+                        <<" charge " << charge << " qtot " << qtot
+                        << " theta " << std::atan(MMPrdsOfLayer.at(idx).globalPosition().perp() /
+                        std::abs(MMPrdsOfLayer.at(idx).globalPosition().z()))
+                        << " meanTheta " << meanTheta / qtot);
+
+        meanTheta += std::abs(std::atan(MMPrdsOfLayer.at(idx).globalPosition().perp() /
+                        std::abs(MMPrdsOfLayer.at(idx).globalPosition().z())))*charge;
+    }
+    meanPosX /= qtot;
+    double meanPosXErrorSq = meanPosXError/(qtot*qtot);
+    ATH_MSG_VERBOSE("meanPosXErrorSq" << meanPosXErrorSq
+                    << "meanPosXError" << meanPosXError
+                    << "qtot*qtot" << qtot*qtot);
+    meanDriftDist /= qtot;
+    double meanDriftDistErrorSq = meanDriftDistError/(qtot*qtot);
+    meanTheta /= qtot;
+    ATH_MSG_VERBOSE("Cluster: "<< "xmean" << meanPosX);
+    ATH_MSG_VERBOSE("Cluster: " << "meanPosXErrorSq" << meanPosXErrorSq
+                    << " sqrt "<< sqrt(meanPosXErrorSq));
+    ATH_MSG_VERBOSE("Cluster: "<< " meanDriftDist" << meanDriftDist);
+    ATH_MSG_VERBOSE("Cluster: "<< " meanDriftDistErrorSq " << meanDriftDistErrorSq
+                               << " sqrt " << std::sqrt(meanDriftDistErrorSq));
+    ATH_MSG_VERBOSE("Cluster " << " meanTheta " << meanTheta);
+
+    double correction = std::tan(meanTheta)*(meanDriftDist-halfGapWidth);
+    if (m_idHelperSvc->mmIdHelper().gasGap(MMPrdsOfLayer.at(0).identify())%2 == 0) {
+     correction = -1. * correction;  // take care of inverted drif direction for even gaps
+    }
+    double correctionErrorSq = std::tan(meanTheta)*std::tan(meanTheta)*meanDriftDistErrorSq;
+
+
+    clusterPosition = meanPosX + correction;
+    clusterPositionErrorSq = correctionErrorSq + meanPosXErrorSq;
+
+    ATH_MSG_DEBUG("Cluster Properties"
+                  << " meanX " << meanPosX
+                  << " +-" << std::sqrt(meanPosXErrorSq)
+                  << "  mean drift dist " << meanDriftDist
+                  <<" +- " << std::sqrt(meanDriftDistErrorSq)
+                  << " correction " << correction
+                  << " +- " << std::sqrt(correctionErrorSq)
+                  << " final position " << clusterPosition
+                  << " +- " << std::sqrt(clusterPositionErrorSq));
+    return StatusCode::SUCCESS;
+}
+
+
+StatusCode Muon::ClusterTimeProjectionMMClusterBuilderTool::writeClusterPrd(
+                           const std::vector<Muon::MMPrepData> &MMPrdsOfLayer,
+                           const std::vector<uint> &idxCluster,
+                           const double &clusterPosition,
+                           const double &clusterPositionErrorSq,
+                           std::vector<Muon::MMPrepData*>& clustersVec) const {
+    std::vector<Identifier> rdoList;
+    std::vector<int> stripCharges;
+    std::vector<short int> stripTimes;
+    std::vector<uint16_t> stripNumbers;
+
+    rdoList.reserve(idxCluster.size());
+    stripCharges.reserve(idxCluster.size());
+    stripTimes.reserve(idxCluster.size());
+    stripNumbers.reserve(idxCluster.size());
+
+    for (auto &idx : idxCluster) {
+        Identifier id = MMPrdsOfLayer.at(idx).identify();
+        rdoList.push_back(id);
+        stripCharges.push_back(MMPrdsOfLayer.at(idx).charge());
+        stripTimes.push_back(MMPrdsOfLayer.at(idx).time());
+        stripNumbers.push_back(channel(id));
+    }
+    Amg::MatrixX* covN = new Amg::MatrixX(1, 1);
+    covN -> coeffRef(0, 0) = clusterPositionErrorSq;
+    Amg::Vector2D localClusterPositionV(clusterPosition,
+            MMPrdsOfLayer.at(idxCluster.at(0)).localPosition().y());
+    Identifier idStrip0 = MMPrdsOfLayer.at(idxCluster.at(0)).identify();
+
+    MMPrepData* prdN = new MMPrepData(idStrip0,
+                   MMPrdsOfLayer.at(idxCluster.at(0)).collectionHash(),
+                   localClusterPositionV, rdoList, covN,
+                   MMPrdsOfLayer.at(idxCluster.at(0)).detectorElement(),
+                   (short int) 0,  // drift dist
+                   std::accumulate(stripCharges.begin(), stripCharges.end(), 0),
+                   0.0/*drift dist*/,
+                   stripNumbers, stripTimes, stripCharges);
+
+    clustersVec.push_back(prdN);
+    return StatusCode::SUCCESS;
+}
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..cfac1fa4a7485a7af8dd240128cb03427ccc2409
--- /dev/null
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ClusterTimeProjectionMMClusterBuilderTool.h
@@ -0,0 +1,68 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef ClusterTimeProjectionMMClusterBuilderTool_h
+#define ClusterTimeProjectionMMClusterBuilderTool_h
+
+#include <vector>
+#include <string>
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "MuonIdHelpers/IMuonIdHelperSvc.h"
+
+#include "MMClusterization/IMMClusterBuilderTool.h"
+#include "MuonPrepRawData/MMPrepData.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "MuonIdHelpers/MuonIdHelperSvc.h"
+
+namespace Muon {
+class ClusterTimeProjectionMMClusterBuilderTool :
+  virtual public IMMClusterBuilderTool,
+  public AthAlgTool {
+ public:
+  ClusterTimeProjectionMMClusterBuilderTool(const std::string&,
+      const std::string&, const IInterface*);
+
+  virtual ~ClusterTimeProjectionMMClusterBuilderTool() = default;
+  StatusCode initialize() override;
+
+  StatusCode getClusters(std::vector<Muon::MMPrepData>& MMprds,
+      std::vector<Muon::MMPrepData*>& clustersVec) const override;
+
+ private:
+    /// Muon Detector Descriptor
+    ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
+
+    uint m_maxHoleSize;
+
+
+    StatusCode sortHitsToLayer(const std::vector<Muon::MMPrepData>& MMprds,
+                               std::vector<std::vector<Muon::MMPrepData>>& prdsPerLayer) const;
+
+    StatusCode clusterLayer(const std::vector<Muon::MMPrepData> &MMPrdsPerLayer,
+                            std::vector<std::vector<uint>> &idxClusters) const;
+
+
+    StatusCode getClusterPosition(const std::vector<Muon::MMPrepData> &MMPrdsOfLayer,
+                               const std::vector<uint> &idxCluster,
+                               double &clustersPosition,
+                               double &clustersPositionErrorSq) const;
+
+    StatusCode writeClusterPrd(const std::vector<Muon::MMPrepData> &MMPrdsOfLayer,
+                               const std::vector<uint> &idxCluster,
+                               const double &clustersPosition,
+                               const double &clustersPositionErrorSq,
+                               std::vector<Muon::MMPrepData*>& clustersVec) const;
+
+    uint channel(const Identifier &id) const {
+        return m_idHelperSvc->mmIdHelper().channel(id);
+    }
+    uint channel(const MMPrepData &strip) const {
+        return channel(strip.identify());
+    }
+};  // class ClusterTimeProjectionMMClusterBuilderTool
+
+
+}  // namespace Muon
+#endif  // ClusterTimeProjectionMMClusterBuilderTool_h
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
index 6a129bcb9b7769ffb290bff627e4bb6c523efb9c..41270cbf2389d17cc62cfc8efff9dc2fde12de4e 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.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 "SimpleMMClusterBuilderTool.h"
 #include "MuonPrepRawData/MMPrepData.h"
@@ -14,8 +14,8 @@ Muon::SimpleMMClusterBuilderTool::SimpleMMClusterBuilderTool(const std::string&
   AthAlgTool(t,n,p)
 {
   declareInterface<IMMClusterBuilderTool>(this);
-  declareProperty("useErrorParametrization",m_useErrorParametrization=true);
-
+  declareProperty("useErrorParametrization", m_useErrorParametrization = true);
+  declareProperty("maxHoleSize", m_maxHoleSize = 1);
 }
 
 Muon::SimpleMMClusterBuilderTool::~SimpleMMClusterBuilderTool()
@@ -67,22 +67,25 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
     int strip = m_idHelperSvc->mmIdHelper().channel(id_prd);
     int gasGap  = m_idHelperSvc->mmIdHelper().gasGap(id_prd);
     int layer   = m_idHelperSvc->mmIdHelper().multilayer(id_prd);
-    ATH_MSG_VERBOSE("  MMprds " <<  MMprds.size() <<" index "<< i << " strip " << strip 
-		    << " gasGap " << gasGap << " layer " << layer << " z " << MMprds[i].globalPosition().z() );
-    for (unsigned int j=i+1; j<MMprds.size(); ++j){
+    ATH_MSG_VERBOSE("  MMprds " <<  MMprds.size() <<" index "<< i << " strip " << strip
+		    << " gasGap " << gasGap << " layer " << layer << " z " << MMprds[i].globalPosition().z());
+    for (unsigned int j = i+1; j < MMprds.size(); ++j) {
       Identifier id_prdN = MMprds[j].identify();
       int stripN = m_idHelperSvc->mmIdHelper().channel(id_prdN);
       int gasGapN  = m_idHelperSvc->mmIdHelper().gasGap(id_prdN);
       int layerN   = m_idHelperSvc->mmIdHelper().multilayer(id_prdN);
-      if( gasGapN==gasGap && layerN==layer ) {
-	ATH_MSG_VERBOSE(" next MMprds strip same gasGap and layer index " << j << " strip " << stripN << " gasGap " << gasGapN << " layer " << layerN );
-	if(abs(strip-stripN)<2) {
-	  jmerge = j;
-	  break;
-	}
+      if (gasGapN == gasGap && layerN == layer) {
+          ATH_MSG_VERBOSE(" next MMprds strip same gasGap and layer index " << j
+                          << " strip " << stripN
+                          << " gasGap " << gasGapN
+                          << " layer " << layerN);
+          if (static_cast<unsigned int>(std::abs(strip-stripN)) <= m_maxHoleSize + 1) {
+          jmerge = j;
+          break;
+        }
       }
     }
- 
+
     unsigned int nmerge = 0;
     std::vector<Identifier> rdoList;
     std::vector<unsigned int> mergeIndices;
@@ -94,7 +97,7 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
     MMflag[i] = 1;
     mergeIndices.push_back(i);
     mergeStrips.push_back(strip);
-    mergeStripsTime.push_back(MMprds[i].time()-MMprds[i].globalPosition().norm()/299.792);
+    mergeStripsTime.push_back(MMprds[i].time());
     mergeStripsCharge.push_back(MMprds[i].charge());
 
     unsigned int nmergeStrips = 1;
@@ -104,7 +107,7 @@ StatusCode Muon::SimpleMMClusterBuilderTool::getClusters(std::vector<Muon::MMPre
 	if(MMflag[j] == 1) continue;
 	Identifier id_prdN = MMprds[j].identify();
 	int stripN = m_idHelperSvc->mmIdHelper().channel(id_prdN);
-	if( abs(mergeStrips[k]-stripN) <= 1 ) {
+	if( static_cast<unsigned int>(std::abs(mergeStrips[k]-stripN)) <= m_maxHoleSize + 1 ) {
 	  int gasGapN  = m_idHelperSvc->mmIdHelper().gasGap(id_prdN);
 	  int layerN   = m_idHelperSvc->mmIdHelper().multilayer(id_prdN);
 	  if( gasGapN==gasGap && layerN==layer ) {
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
index a5727a94bd3d9891fe727b2579088e4f1cb1f5aa..eacd9b6fab019007669358dc4cd9a3365ff90b8c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/SimpleMMClusterBuilderTool.h
@@ -4,6 +4,8 @@
 #ifndef SimpleMMClusterBuilderTool_h
 #define SimpleMMClusterBuilderTool_h
 
+#include <vector>
+
 #include "GaudiKernel/ServiceHandle.h"
 #include "MMClusterization/IMMClusterBuilderTool.h"
 #include "MuonPrepRawData/MMPrepData.h"
@@ -42,6 +44,7 @@ namespace Muon
     ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
     
     bool m_useErrorParametrization;
+    uint m_maxHoleSize;
     
 };
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
index 192b462a07d5aeda0db53f3e41e2c90f7e462f43..72bd7b6671233fa774a1f3d4bb7de506589956b9 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx
@@ -212,7 +212,6 @@ StatusCode Muon::UTPCMMClusterBuilderTool::runHoughTrafo(const std::vector<Muon:
     sc = findAlphaMax(h_hough,houghPeaks);
     if(sc.isFailure()) return sc;
     ATH_MSG_DEBUG("Found HoughPeaks");
-    
     sc = selectTrack(mmPrd, xpos, flag, houghPeaks, idx_selected);
     if(sc.isFailure()) return sc;
     return StatusCode::SUCCESS;   
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/components/MMClusterization_entries.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/components/MMClusterization_entries.cxx
index 0c4b738870c5bab6e6d1bd4553f6c3e107b4b07b..e575e30772d56ad01cfaf30645b04f4cc24b9865 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/components/MMClusterization_entries.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/components/MMClusterization_entries.cxx
@@ -2,10 +2,12 @@
 #include "../UTPCMMClusterBuilderTool.h"
 #include "../ProjectionMMClusterBuilderTool.h"
 #include "../ConstraintAngleMMClusterBuilderTool.h"
+#include "../ClusterTimeProjectionMMClusterBuilderTool.h"
 
 
 DECLARE_COMPONENT(Muon::SimpleMMClusterBuilderTool)
 DECLARE_COMPONENT(Muon::UTPCMMClusterBuilderTool)
 DECLARE_COMPONENT(Muon::ProjectionMMClusterBuilderTool)
 DECLARE_COMPONENT(Muon::ConstraintAngleMMClusterBuilderTool)
+DECLARE_COMPONENT(Muon::ClusterTimeProjectionMMClusterBuilderTool)
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py
index fca36cb879047561dbe7385108ef2dd6a58b5cfe..709ab9a6f52c8dfa9bbf2337a69650b0b765c300 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecExampleConfigDb.py
@@ -232,7 +232,7 @@ addTool("MuonRecExample.NSWTools.SimpleMMClusterBuilderTool","SimpleMMClusterBui
 addTool("MuonRecExample.NSWTools.UTPCMMClusterBuilderTool","UTPCMMClusterBuilderTool")
 addTool("MuonRecExample.NSWTools.ProjectionMMClusterBuilderTool","ProjectionMMClusterBuilderTool")
 addTool("MuonRecExample.NSWTools.ConstraintAngleMMClusterBuilderTool","ConstraintAngleMMClusterBuilderTool")
-
+addTool("MuonRecExample.NSWTools.ClusterTimeProjectionMMClusterBuilderTool","ClusterTimeProjectionMMClusterBuilderTool")
 addTool("MuonRecExample.NSWTools.SimpleSTgcClusterBuilderTool","SimpleSTgcClusterBuilderTool")
 
 addTool("NSWCalibTools.NSWCalibToolsConfig.MMCalibSmearingTool","MMCalibSmearingTool")
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/NSWTools.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/NSWTools.py
index d389cf4df7679673920e7884b43eb1542c86f663..5a60b828fcbc41786ea676786280434423ac7cfe 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/NSWTools.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/NSWTools.py
@@ -21,6 +21,9 @@ def ProjectionMMClusterBuilderTool(name="ProjectionMMClusterBuilderTool",extraFl
 
 def ConstraintAngleMMClusterBuilderTool(name="ConstraintAngleMMClusterBuilderTool",extraFlags=None,**kwargs):
     return CfgMgr.Muon__ConstraintAngleMMClusterBuilderTool(name,**kwargs)
+
+def ClusterTimeProjectionMMClusterBuilderTool(name="ClusterTimeProjectionMMClusterBuilderTool",extraFlags=None,**kwargs):
+    return CfgMgr.Muon__ClusterTimeProjectionMMClusterBuilderTool(name,**kwargs)
 ##
 ## STgc Tools
 ##
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py
index 7be92cfb4cd7002994e3e1b5f7b04f448f9b1c4f..92496227ae2d930d2e177e8326dbd592de4d20b9 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/python/ParticleJetToolsConfig.py
@@ -11,14 +11,13 @@
 from AthenaCommon import Logging
 jrtlog = Logging.logging.getLogger('ParticleJetToolsConfig')
 
-from ParticleJetTools import ParticleJetToolsConf
-from MCTruthClassifier import MCTruthClassifierConf
+from AthenaConfiguration.ComponentFactory import CompFactory
 
 # Putting MCTruthClassifier here as we needn't stick jet configs in really foreign packages
 def getMCTruthClassifier():
     # Assume mc15 value
     firstSimCreatedBarcode = 200000
-    truthclassif = MCTruthClassifierConf.MCTruthClassifier(
+    truthclassif = CompFactory.MCTruthClassifier(
         "JetMCTruthClassifier",
         barcodeG4Shift=firstSimCreatedBarcode,
         xAODTruthLinkVector=""
@@ -32,9 +31,9 @@ def getMCTruthClassifier():
 
 # Generates truth particle containers for truth labeling
 truthpartoptions = {
-    "Partons":{"ToolType":ParticleJetToolsConf.CopyTruthPartons,"ptmin":5000},
-    "BosonTop":{"ToolType":ParticleJetToolsConf.CopyBosonTopLabelTruthParticles,"ptmin":100000},
-    "FlavourLabel":{"ToolType":ParticleJetToolsConf.CopyFlavorLabelTruthParticles,"ptmin":5000},
+    "Partons":{"ToolType":CompFactory.CopyTruthPartons,"ptmin":5000},
+    "BosonTop":{"ToolType":CompFactory.CopyBosonTopLabelTruthParticles,"ptmin":100000},
+    "FlavourLabel":{"ToolType":CompFactory.CopyFlavorLabelTruthParticles,"ptmin":5000},
 }
 def getCopyTruthLabelParticles(truthtype):
     truthcategory = ""
@@ -60,7 +59,7 @@ def getCopyTruthJetParticles(modspec):
     # if objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ):
     #    barCodeFromMetadata=0
 
-    truthpartcopy = ParticleJetToolsConf.CopyTruthJetParticles(
+    truthpartcopy = CompFactory.CopyTruthJetParticles(
         "truthpartcopy"+modspec,
         OutputName="JetInputTruthParticles"+modspec,
         MCTruthClassifier=truthclassif,
@@ -73,7 +72,7 @@ def getCopyTruthJetParticles(modspec):
     return truthpartcopy
 
 def getJetQuarkLabel():
-    jetquarklabel = ParticleJetToolsConf.Analysis__JetQuarkLabel(
+    jetquarklabel = CompFactory.Analysis.JetQuarkLabel(
         "jetquarklabel",
         McEventCollection = "TruthEvents"
         )
@@ -81,7 +80,7 @@ def getJetQuarkLabel():
 
 def getJetConeLabeling():
     jetquarklabel = getJetQuarkLabel()
-    truthpartonlabel = ParticleJetToolsConf.Analysis__JetConeLabeling(
+    truthpartonlabel = CompFactory.Analysis.JetConeLabeling(
         "truthpartondr",
         JetTruthMatchTool = jetquarklabel
         )
@@ -90,7 +89,7 @@ def getJetConeLabeling():
   # Cone matching for B, C and tau truth for all but track jets.
 def getJetDeltaRLabelTool(modspec):
     jetptmin = float(modspec)
-    jetdrlabeler = ParticleJetToolsConf.ParticleJetDeltaRLabelTool(
+    jetdrlabeler = CompFactory.ParticleJetDeltaRLabelTool(
         "jetdrlabeler_jetpt{0}GeV".format(int(jetptmin/1000)),
         LabelName = "HadronConeExclTruthLabelID",
         DoubleLabelName = "HadronConeExclExtendedTruthLabelID",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py
index 8536ae2be4afe4345d876bf7d3200bb436d17460..90a0af470a936ad8e7baee65a2cc66da845dd320 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/DerivationFrameworkMaster.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # ------------------------------------------------------------
 # DerivationFrameworkMaster.py
@@ -7,6 +7,8 @@
 # Contains all basic includes for running the derivation framework
 #-------------------------------------------------------------
 
+from __future__ import print_function
+
 from AthenaCommon.AppMgr import ToolSvc
 from AthenaCommon.AppMgr import theApp
 # Derivation names and locations of job options
@@ -84,7 +86,7 @@ jetFlags.useTracks = True
 DerivationFrameworkIsMonteCarlo=False
 DerivationFrameworkSimBarcodeOffset = int(200e3)
 if globalflags.DataSource()=='geant4':
-    print "Switching on jetFlags.useTruth"
+    print ("Switching on jetFlags.useTruth")
     jetFlags.useTruth = True
     DerivationFrameworkIsMonteCarlo = True
     try:
@@ -94,7 +96,7 @@ if globalflags.DataSource()=='geant4':
         if not objKeyStore.isInInput( "McEventCollection", "GEN_EVENT" ):
             DerivationFrameworkSimBarcodeOffset = int(inputFileSummary['metadata']['/Simulation/Parameters']['SimBarcodeOffset'])
     except:
-        print 'Could not retrieve SimBarcodeOffset from /Simulation/Parameters, leaving at 200k'
+        print ('Could not retrieve SimBarcodeOffset from /Simulation/Parameters, leaving at 200k')
 
 def buildFileName(derivationStream):
     return derivationStream.FileName
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py
index 0626d9e968ec3ab80bd2b24f1d9a68e32601393d..8e3f0e174e5c02a550be6760adddc1373cb7508c 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/LHE3WeightMetadata.py
@@ -1,11 +1,13 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+from __future__ import print_function
 
 import operator
 import json 
 def addLHE3Weights(seq, pref = '', var_dict = {}):
   
   from AthenaCommon.AppMgr import ToolSvc
-  from ReweightUtils.ReweightUtilsConf import * 
+  from ReweightUtils.ReweightUtilsConf import SumOfWeightsAlg
 
   sumOfWeightsAlg = SumOfWeightsAlg(name = pref+"LHE3SumWeightsAlg")
 
@@ -33,7 +35,7 @@ if globalflags.DataSource() == 'geant4':
   try:
     mcweight_dict_orig = inputFileSummary['metadata']['/Generation/Parameters']['HepMCWeightNames']
   except:
-    print 'Could not retrieve HepMCWeightNames /Generation/Parameters metadata.'
+    print ('Could not retrieve HepMCWeightNames /Generation/Parameters metadata.')
   
   # Recent versions of MadGraph are writing the dictionary as a flat string
   # The next few lines ensure the string is reformatted as a dictionary
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
index 9f6d69c6267c5099f8a06d3202c5ca901b9673e8..2a8ab150271ae87619d9fd492a82fe21d3b04084 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/SlimmingHelper.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
 
 ####################################################################
 # SlimmingHelper.py
@@ -34,6 +34,8 @@
 # may be unreadable.
 ####################################################################
 
+from __future__ import print_function
+
 from DerivationFrameworkCore.CompulsoryContent import *
 from DerivationFrameworkCore.ContentHandler import *
 from DerivationFrameworkCore.ContainersForExpansion import ContainersForExpansion
@@ -211,7 +213,7 @@ class SlimmingHelper:
 
                 #Add on-the-fly containers to the dictionary
                 for _cont,_type in ContainersOnTheFly:
-                        if not self.AppendToDictionary.has_key(_cont):
+                        if _cont not in self.AppendToDictionary:
                                 self.AppendToDictionary[_cont]=_type
 
                 # Process the master list...
@@ -294,14 +296,14 @@ class SlimmingHelper:
                                 badItemsXAOD.append(item)
                 if (len(badItemsWildcards)>0):
                         msg.error("These static items contain wildcards: not permitted")
-                        print badItemsWildcards
+                        print (badItemsWildcards)
                         raise RuntimeError("Static content list contains wildcards")
                 if (len(badItemsXAOD)>0):
                         msg.error("These static items are xAOD collections: not permitted")
-                        print badItemsXAOD
+                        print (badItemsXAOD)
                         raise RuntimeError("Static content list contains xAOD collections")
                 #Prevent any more modifications As they will be completely ignored, and hard to debug
-                print self.ExtraVariables,dir(self.ExtraVariables)
+                print (self.ExtraVariables,dir(self.ExtraVariables))
 
                 self.StaticContent.lock()
                 self.ExtraVariables.lock()
@@ -355,12 +357,12 @@ class SlimmingHelper:
                 elif collectionName=="MET_Reference_AntiKt4EMPFlow":
                         from DerivationFrameworkJetEtMiss.MET_Reference_AntiKt4EMPFlowCPContent import MET_Reference_AntiKt4EMPFlowCPContent
                         items.extend(MET_Reference_AntiKt4EMPFlowCPContent)
-		elif collectionName=="MET_Baseline_AntiKt4EMTopo":
+                elif collectionName=="MET_Baseline_AntiKt4EMTopo":
                         from DerivationFrameworkJetEtMiss.MET_Baseline_AntiKt4EMTopoCPContent import MET_Baseline_AntiKt4EMTopoCPContent
-			items.extend(MET_Baseline_AntiKt4EMTopoCPContent)
-		elif collectionName=="MET_Baseline_AntiKt4EMPFlow":
-			from DerivationFrameworkJetEtMiss.MET_Baseline_AntiKt4EMPFlowCPContent import MET_Baseline_AntiKt4EMPFlowCPContent
-			items.extend(MET_Baseline_AntiKt4EMPFlowCPContent)
+                        items.extend(MET_Baseline_AntiKt4EMTopoCPContent)
+                elif collectionName=="MET_Baseline_AntiKt4EMPFlow":
+                        from DerivationFrameworkJetEtMiss.MET_Baseline_AntiKt4EMPFlowCPContent import MET_Baseline_AntiKt4EMPFlowCPContent
+                        items.extend(MET_Baseline_AntiKt4EMPFlowCPContent)
                 elif collectionName=="AntiKt4TruthJets":
                         from DerivationFrameworkJetEtMiss.AntiKt4TruthJetsCPContent import AntiKt4TruthJetsCPContent
                         items.extend(AntiKt4TruthJetsCPContent)
@@ -383,7 +385,7 @@ class SlimmingHelper:
                         from DerivationFrameworkJetEtMiss.AntiKt4EMTopoJetsCPContent import AntiKt4EMTopoJetsCPContent
                         items.extend(AntiKt4EMTopoJetsCPContent)
                 elif collectionName=="AntiKt4EMTopoJets_BTagging201810":
-                        if not self.AppendToDictionary.has_key("AntiKt4EMTopoJets_BTagging201810"):
+                        if "AntiKt4EMTopoJets_BTagging201810" not in  self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt4EMTopoJets_BTagging201810"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt4EMTopoJets_BTagging201810Aux"]='xAOD::ShallowAuxContainer'
                 elif collectionName=="AntiKt10TruthJets":
@@ -406,25 +408,25 @@ class SlimmingHelper:
                         items.extend(AntiKt10UFOCHSJetsCPContent)
                 elif collectionName=="AntiKt10TruthTrimmedPtFrac5SmallR20Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent import AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" not in self:
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10TruthTrimmedPtFrac5SmallR20JetsCPContent)
                 elif collectionName=="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent import AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets" not in self:
                                 self.AppendToDictionary["AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" not in self:
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10LCTopoTrimmedPtFrac5SmallR20JetsCPContent)
                 elif collectionName=="AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent import AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20JetsCPContent)
@@ -436,16 +438,16 @@ class SlimmingHelper:
                         items.extend(AntiKt10UFOCHSTrimmedPtFrac5SmallR20JetsCPContent)
                 elif collectionName=="AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent import AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10UFOCSSKTrimmedPtFrac5SmallR20Jets"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthTrimmedPtFrac5SmallR20Jets"):
+                        if "AntiKt10TruthTrimmedPtFrac5SmallR20Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthTrimmedPtFrac5SmallR20JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10UFOCSSKTrimmedPtFrac5SmallR20JetsCPContent)
                 elif collectionName=="AntiKt10TruthSoftDropBeta100Zcut10Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent import AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthSoftDropBeta100Zcut10Jets"):
+                        if "AntiKt10TruthSoftDropBeta100Zcut10Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthSoftDropBeta100Zcut10Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthSoftDropBeta100Zcut10JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10TruthSoftDropBeta100Zcut10JetsCPContent)
@@ -457,40 +459,40 @@ class SlimmingHelper:
                         items.extend(AntiKt10UFOCHSSoftDropBeta100Zcut10JetsCPContent)
                 elif collectionName=="AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent import AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"):
+                        if "AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10UFOCSSKSoftDropBeta100Zcut10Jets"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsAux"]='xAOD::JetAuxContainer'
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthSoftDropBeta100Zcut10Jets"):
+                        if "AntiKt10TruthSoftDropBeta100Zcut10Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthSoftDropBeta100Zcut10Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthSoftDropBeta100Zcut10JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10UFOCSSKSoftDropBeta100Zcut10JetsCPContent)
                 elif collectionName=="AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent import AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets"):
+                        if "AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsCPContent)
                 elif collectionName=="AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets":
                         from DerivationFrameworkJetEtMiss.AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent import AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets"):
+                        if "AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5Jets"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsAux"]='xAOD::JetAuxContainer'
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets"):
+                        if "AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets" not in  self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthBottomUpSoftDropBeta100Zcut5Jets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthBottomUpSoftDropBeta100Zcut5JetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10UFOCSSKBottomUpSoftDropBeta100Zcut5JetsCPContent)
                 elif collectionName=="AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets":
                         from DerivationFrameworkJetEtMiss.AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent import AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets"):
+                        if "AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsCPContent)
                 elif collectionName=="AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets":
                         from DerivationFrameworkJetEtMiss.AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent import AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent
-                        if not self.AppendToDictionary.has_key("AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets"):
+                        if "AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJets"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsAux"]='xAOD::JetAuxContainer'
-                        if not self.AppendToDictionary.has_key("AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets"):
+                        if "AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJets"]="xAOD::JetContainer"
                                 self.AppendToDictionary["AntiKt10TruthRecursiveSoftDropBeta100Zcut5NinfJetsAux"]='xAOD::JetAuxContainer'
                         items.extend(AntiKt10UFOCSSKRecursiveSoftDropBeta100Zcut5NinfJetsCPContent)
@@ -499,11 +501,11 @@ class SlimmingHelper:
                         #from DerivationFrameworkCore.AntiKt4EMPFlowJetsCPContent import AntiKt4EMPFlowJetsCPContent
                         items.extend(AntiKt4EMPFlowJetsCPContent)
                 elif collectionName=="AntiKt4EMPFlowJets_BTagging201810":
-                        if not self.AppendToDictionary.has_key("AntiKt4EMPFlowJets_BTagging201810"):
+                        if "AntiKt4EMPFlowJets_BTagging201810" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt4EMPFlowJets_BTagging201810"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt4EMPFlowJets_BTagging201810Aux"]='xAOD::ShallowAuxContainer'
                 elif collectionName=="AntiKt4EMPFlowJets_BTagging201903":
-                        if not self.AppendToDictionary.has_key("AntiKt4EMPFlowJets_BTagging201903"):
+                        if "AntiKt4EMPFlowJets_BTagging201903" not in self.AppendToDictionary:
                                 self.AppendToDictionary["AntiKt4EMPFlowJets_BTagging201903"]='xAOD::JetContainer'
                                 self.AppendToDictionary["AntiKt4EMPFlowJets_BTagging201903Aux"]='xAOD::ShallowAuxContainer'
                 elif collectionName=="AntiKt2TruthJets":
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py
index d1e4309ed85b4dd554c88177389c32231d4c9cb2..cd40aba9c3c630ea752796ab5a495c89089099df 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM1.py
@@ -413,14 +413,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM1ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM1ElectronTPThinningTool
         print EGAM1ElectronTPThinningTool
         thinningTools.append(EGAM1ElectronTPThinningTool)
@@ -428,14 +427,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     # Tracks associated with Electrons (all tracks, large cone, for track isolation studies of the selected electrons)
     if (TrackThinningKeepAllElectronTracks) :
         EGAM1ElectronTPThinningTool2 = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM1ElectronTPThinningTool2",
-                                                                                         ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                                         StreamName              = streamName,
                                                                                          SGKey                   = "Electrons",
                                                                                          GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                          InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                          SelectionString         = "Electrons.pt > 4*GeV",
                                                                                          BestMatchOnly = False,
-                                                                                         ConeSize = 0.6,
-                                                                                         ApplyAnd = False)
+                                                                                         ConeSize = 0.6)
 
         ToolSvc += EGAM1ElectronTPThinningTool2
         print EGAM1ElectronTPThinningTool2
@@ -445,14 +443,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM1PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM1PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         ToolSvc += EGAM1PhotonTPThinningTool
         print EGAM1PhotonTPThinningTool
         thinningTools.append(EGAM1PhotonTPThinningTool)
@@ -461,7 +458,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM1JetTPThinningTool",
-                                                                                ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 JetKey                  = "AntiKt4EMTopoJets",
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM1JetTPThinningTool
@@ -473,7 +470,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM1MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM1MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM1MuonTPThinningTool
@@ -485,7 +482,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM1TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM1TauTPThinningTool",
-                                                                                ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -497,7 +494,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM1TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM1TPThinningTool",
-                                                                          ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM1TPThinningTool
@@ -508,7 +505,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
 # keep topoclusters around electrons
 from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning
 EGAM1CCTCThinningTool = DerivationFramework__CaloClusterThinning(name                    = "EGAM1CCTCThinningTool",
-                                                                 ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                 StreamName              = streamName,
                                                                  SGKey                   = "Electrons",
                                                                  SelectionString         = "Electrons.pt>4*GeV",
                                                                  TopoClCollectionSGKey   = "CaloCalTopoClusters",
@@ -529,7 +526,7 @@ if globalflags.DataSource()=='geant4':
 
     from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
     EGAM1TruthThinningTool = DerivationFramework__GenericTruthThinning(name                    = "EGAM1TruthThinningTool",
-                                                                       ThinningService         = EGAM1ThinningHelper.ThinningSvc(),
+                                                                       StreamName              = streamName,
                                                                        ParticleSelectionString = truth_expression,
                                                                        PreserveDescendants     = False,
                                                                        PreserveGeneratorDescendants     = True,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM2.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM2.py
index 4681c663d174f86fc1b0cbd6bbf1a4637a0160f9..1b2ed6464fae64ddc741dd42352b93a1aa4d1bc0 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM2.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM2.py
@@ -194,10 +194,9 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM2JetTPThinningTool",
-                                                                                ThinningService         = EGAM2ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 JetKey                  = "AntiKt4EMTopoJets",
-                                                                                InDetTrackParticlesKey  = "InDetTrackParticles",
-                                                                                ApplyAnd                = True)
+                                                                                InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM2JetTPThinningTool
         print EGAM2JetTPThinningTool
         thinningTools.append(EGAM2JetTPThinningTool)
@@ -206,7 +205,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM2MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM2ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM2MuonTPThinningTool
@@ -217,14 +216,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM2ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM2ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM2ElectronTPThinningTool
         print EGAM2ElectronTPThinningTool
         thinningTools.append(EGAM2ElectronTPThinningTool)
@@ -233,14 +231,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM2PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM2PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM2ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
 
         ToolSvc += EGAM2PhotonTPThinningTool
         print EGAM2PhotonTPThinningTool
@@ -250,7 +247,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM2TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM2TauTPThinningTool",
-                                                                                ThinningService         = EGAM2ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -262,7 +259,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM2TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM2TPThinningTool",
-                                                                          ThinningService         = EGAM2ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM2TPThinningTool
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM3.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM3.py
index d1e2dfa42c7c2947908e9bd7d7d40860538ef80a..6827c2008e3e625c53959fd72e2a15524018b51f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM3.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM3.py
@@ -379,10 +379,9 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM3JetTPThinningTool",
-                                                                                ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 JetKey                  = "AntiKt4EMTopoJets",
-                                                                                InDetTrackParticlesKey  = "InDetTrackParticles",
-                                                                                ApplyAnd                = True)
+                                                                                InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM3JetTPThinningTool
         print EGAM3JetTPThinningTool
         thinningTools.append(EGAM3JetTPThinningTool)
@@ -391,7 +390,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM3MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM3MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM3MuonTPThinningTool
@@ -402,14 +401,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM3ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM3ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM3ElectronTPThinningTool
         print EGAM3ElectronTPThinningTool
         thinningTools.append(EGAM3ElectronTPThinningTool)
@@ -418,14 +416,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM3PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM3PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         
         ToolSvc += EGAM3PhotonTPThinningTool
         print EGAM3PhotonTPThinningTool
@@ -434,14 +431,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     # Tracks associated with Photons (all tracks, large cone, for track isolation studies of the selected photon)
     if (TrackThinningKeepAllPhotonTracks) : 
         EGAM3PhotonTPThinningTool2 = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM3PhotonTPThinningTool2",
-                                                                                       ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                                       StreamName              = streamName,
                                                                                        SGKey                   = "Photons",
                                                                                        GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                        InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                        SelectionString         = "Photons.pt > 9.5*GeV",
                                                                                        BestMatchOnly = False,
-                                                                                       ConeSize = 0.6,
-                                                                                       ApplyAnd = False)
+                                                                                       ConeSize = 0.6)
         
         ToolSvc += EGAM3PhotonTPThinningTool2
         print EGAM3PhotonTPThinningTool2
@@ -451,7 +447,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM3TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM3TauTPThinningTool",
-                                                                                ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -463,7 +459,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM3TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM3TPThinningTool",
-                                                                          ThinningService         = EGAM3ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM3TPThinningTool
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM4.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM4.py
index ce8f65ec744ad2ba56bba2d945e3a6222cf2b120..f5d8fe752feced1d06e9a593035b5a6f8a22f1f6 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM4.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM4.py
@@ -308,10 +308,9 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM4JetTPThinningTool",
-                                                                                ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 JetKey                  = "AntiKt4EMTopoJets",
-                                                                                InDetTrackParticlesKey  = "InDetTrackParticles",
-                                                                                ApplyAnd                = True)
+                                                                                InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM4JetLCTPThinningTool
         print EGAM4JetLCTPThinningTool
         thinningTools.append(EGAM4JetLCTPThinningTool)
@@ -320,7 +319,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM4MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM4MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM4MuonTPThinningTool
@@ -331,14 +330,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM4ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM4ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM4ElectronTPThinningTool
         print EGAM4ElectronTPThinningTool
         thinningTools.append(EGAM4ElectronTPThinningTool)
@@ -347,14 +345,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM4PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM4PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         
         ToolSvc += EGAM4PhotonTPThinningTool
         print EGAM4PhotonTPThinningTool
@@ -363,14 +360,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     # Tracks associated with Photons (all tracks, large cone, for track isolation studies of the selected photon)
     if (TrackThinningKeepAllPhotonTracks) : 
         EGAM4PhotonTPThinningTool2 = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM4PhotonTPThinningTool2",
-                                                                                       ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                                       StreamName              = streamName,
                                                                                        SGKey                   = "Photons",
                                                                                        GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                        InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                        SelectionString         = "Photons.pt > 9.5*GeV",
                                                                                        BestMatchOnly = False,
-                                                                                       ConeSize = 0.6,
-                                                                                       ApplyAnd = False)
+                                                                                       ConeSize = 0.6)
         
         ToolSvc += EGAM4PhotonTPThinningTool2
         print EGAM4PhotonTPThinningTool2
@@ -380,7 +376,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM4TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM4TauTPThinningTool",
-                                                                                ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -392,7 +388,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM4TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM4TPThinningTool",
-                                                                          ThinningService         = EGAM4ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM4TPThinningTool
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM5.py
index 5ba7064281368010b5f534d27f1a00dc0139e3af..acdf5b5620b18a68ae8774cde6d72857914efa44 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM5.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM5.py
@@ -256,10 +256,9 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM5JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM5JetTPThinningTool",
-                                                                                ThinningService         = EGAM5ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 JetKey                  = "AntiKt4EMTopoJets",
-                                                                                InDetTrackParticlesKey  = "InDetTrackParticles",
-                                                                                ApplyAnd                = True)
+                                                                                InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM5JetTPThinningTool
         print EGAM5JetTPThinningTool
         thinningTools.append(EGAM5JetTPThinningTool)
@@ -268,7 +267,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM5MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM5ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM5MuonTPThinningTool
@@ -279,14 +278,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM5ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM5ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM5ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM5ElectronTPThinningTool
         print EGAM5ElectronTPThinningTool
         thinningTools.append(EGAM5ElectronTPThinningTool)
@@ -295,14 +293,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM5PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM5PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM5ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         
         ToolSvc += EGAM5PhotonTPThinningTool
         print EGAM5PhotonTPThinningTool
@@ -312,7 +309,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM5TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM5TauTPThinningTool",
-                                                                                ThinningService         = EGAM5ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -324,7 +321,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM5TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM5TPThinningTool",
-                                                                          ThinningService         = EGAM5ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM5TPThinningTool
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py
index 56723395a2b52d27ee0d0cca93ea538abcb8d5d0..f5ae924f642540fdbf19b677d9c24ea384574c13 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM6.py
@@ -223,14 +223,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM6ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM6ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM6ElectronTPThinningTool
         print EGAM6ElectronTPThinningTool
         thinningTools.append(EGAM6ElectronTPThinningTool)
@@ -238,14 +237,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     # Tracks associated with Electrons (all tracks, large cone, for track isolation studies of the selected electrons)
     if (TrackThinningKeepAllElectronTracks) :
         EGAM6ElectronTPThinningTool2 = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM6ElectronTPThinningTool2",
-                                                                                         ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                                         StreamName              = streamName,
                                                                                          SGKey                   = "Electrons",
                                                                                          GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                          InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                          SelectionString         = "Electrons.pt > 4*GeV",
                                                                                          BestMatchOnly = False,
-                                                                                         ConeSize = 0.6,
-                                                                                         ApplyAnd = False)
+                                                                                         ConeSize = 0.6)
 
         ToolSvc += EGAM6ElectronTPThinningTool2
         print EGAM6ElectronTPThinningTool2
@@ -255,14 +253,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM6PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM6PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
-                                                                                      GSFTrackParticlesKey    = "GSFTrackParticles",        
+                                                                                     GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         ToolSvc += EGAM6PhotonTPThinningTool
         print EGAM6PhotonTPThinningTool
         thinningTools.append(EGAM6PhotonTPThinningTool)
@@ -271,7 +268,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM6JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM6JetTPThinningTool",
-                                                                                ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 JetKey                  = "AntiKt4EMTopoJets",
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM6JetTPThinningTool
@@ -283,7 +280,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM6MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM6MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM6MuonTPThinningTool
@@ -295,7 +292,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM6TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM6TauTPThinningTool",
-                                                                                ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -307,7 +304,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM6TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM6TPThinningTool",
-                                                                          ThinningService         = EGAM6ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM6TPThinningTool
@@ -326,7 +323,7 @@ if globalflags.DataSource()=='geant4':
     
     from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
     EGAM6TruthThinningTool = DerivationFramework__GenericTruthThinning(name                    = "EGAM6TruthThinningTool",
-                                                                       ThinningService         = "EGAM6ThinningSvc",
+                                                                       StreamName              = streamName,
                                                                        ParticleSelectionString = truth_expression,
                                                                        PreserveDescendants     = False,
                                                                        PreserveGeneratorDescendants     = True,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM7.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM7.py
index efa45d4b2d841ca0096a8bbe284df38cfb3b5fd2..3b9755c3556efc976106adf84394d06f6965525f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM7.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM7.py
@@ -198,10 +198,8 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM7JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM7JetTPThinningTool",
-                                                                                ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
-                                                                                JetKey                  = "AntiKt4EMTopoJets",
-                                                                                InDetTrackParticlesKey  = "InDetTrackParticles",
-                                                                                ApplyAnd                = True)
+                                                                                StreamName              = streamName,
+                                                                                InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM7JetTPThinningTool
         print EGAM7JetTPThinningTool
         thinningTools.append(EGAM7JetTPThinningTool)
@@ -210,7 +208,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM7MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM7MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM7MuonTPThinningTool
@@ -221,14 +219,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM7ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM7ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM7ElectronTPThinningTool
         print EGAM7ElectronTPThinningTool
         thinningTools.append(EGAM7ElectronTPThinningTool)
@@ -237,14 +234,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM7PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM7PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         
         ToolSvc += EGAM7PhotonTPThinningTool
         print EGAM7PhotonTPThinningTool
@@ -254,7 +250,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) :         
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM7TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM7TauTPThinningTool",
-                                                                                ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -266,7 +262,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM7TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM7TPThinningTool",
-                                                                          ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM7TPThinningTool
@@ -284,7 +280,7 @@ if globalflags.DataSource()=='geant4':
 
     from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
     EGAM7TruthThinningTool = DerivationFramework__GenericTruthThinning(name                    = "EGAM7TruthThinningTool",
-                                                                       ThinningService         = EGAM7ThinningHelper.ThinningSvc(),
+                                                                       StreamName              = streamName,
                                                                        ParticleSelectionString = truth_expression,
                                                                        PreserveDescendants     = False,
                                                                        PreserveGeneratorDescendants     = True,
@@ -325,16 +321,6 @@ reducedJetList = ["AntiKt4PV0TrackJets", "AntiKt4TruthJets"]
 replaceAODReducedJets(reducedJetList,egam7Seq,"EGAM7")
 
 
-#============ Create Derivation EGAM7 cell collection ==================
-
-# Keep only calo cells associated with the egammaClusters collection
-from DerivationFrameworkCalo.CaloCellDFGetter import CaloCellDFGetter
-theCaloCellDFGetter = CaloCellDFGetter(inputClusterKeys=["egammaClusters"],
-                                       outputCellKey="DFEGAMCellContainer")
-#========================================================================
-
-
-
 #====================================================================
 # SET UP STREAM SELECTION
 #====================================================================
@@ -345,6 +331,14 @@ theCaloCellDFGetter = CaloCellDFGetter(inputClusterKeys=["egammaClusters"],
 EGAM7Stream.AcceptAlgs(["EGAM7Kernel"])
 
 
+#============ Thin cells for EGAM7 ==================
+
+# Keep only calo cells associated with the egammaClusters collection
+rom DerivationFrameworkCalo.CaloCellDFGetter import thinCaloCellsForDF
+thinCaloCellsForDF (inputClusterKeys=["egammaClusters"],
+                    streamName = EGAM7Stream.Name,
+                    outputCellKey = "DFEGAMCellContainer")
+
 #====================================================================
 # SET UP SLIMMING
 #====================================================================
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py
index c62b7913e9562c04527a6d593e83b2290cba0267..3d9bca93146a5a651197743aabccac8a1352699a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM8.py
@@ -157,10 +157,8 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepJetTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning
         EGAM8JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name                    = "EGAM8JetTPThinningTool",
-                                                                                ThinningService         = EGAM8ThinningHelper.ThinningSvc(),
-                                                                                JetKey                  = "AntiKt4EMTopoJets",
-                                                                                InDetTrackParticlesKey  = "InDetTrackParticles",
-                                                                                ApplyAnd                = True)
+                                                                                StreamName              = streamName,
+                                                                                InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM8JetTPThinningTool
         print EGAM8JetTPThinningTool
         thinningTools.append(EGAM8JetTPThinningTool)
@@ -169,7 +167,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepMuonTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
         EGAM8MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name                    = "EGAM8MuonTPThinningTool",
-                                                                                  ThinningService         = EGAM8ThinningHelper.ThinningSvc(),
+                                                                                  StreamName              = streamName,
                                                                                   MuonKey                 = "Muons",
                                                                                   InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM8MuonTPThinningTool
@@ -180,14 +178,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM8ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM8ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM8ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM8ElectronTPThinningTool
         print EGAM8ElectronTPThinningTool
         thinningTools.append(EGAM8ElectronTPThinningTool)
@@ -196,14 +193,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM8PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM8PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM8ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         
         ToolSvc += EGAM8PhotonTPThinningTool
         print EGAM8PhotonTPThinningTool
@@ -213,7 +209,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepTauTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
         EGAM8TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name                    = "EGAM8TauTPThinningTool",
-                                                                                ThinningService         = EGAM8ThinningHelper.ThinningSvc(),
+                                                                                StreamName              = streamName,
                                                                                 TauKey                  = "TauJets",
                                                                                 ConeSize                = 0.6,
                                                                                 InDetTrackParticlesKey  = "InDetTrackParticles")
@@ -225,7 +221,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM8TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM8TPThinningTool",
-                                                                          ThinningService         = EGAM8ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM8TPThinningTool
@@ -244,7 +240,7 @@ if globalflags.DataSource()=='geant4':
     
     from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
     EGAM8TruthThinningTool = DerivationFramework__GenericTruthThinning(name                    = "EGAM8TruthThinningTool",
-                                                                       ThinningService         = "EGAM8ThinningSvc",
+                                                                       StreamName              = streamName,
                                                                        ParticleSelectionString = truth_expression,
                                                                        PreserveDescendants     = False,
                                                                        PreserveGeneratorDescendants     = True,
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM9.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM9.py
index a13d27fba4cf9ba315b046a4d5e48d72551922dd..458a5fcfe0403db6ebeb9402dde0157b9f55808f 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM9.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkEGamma/share/EGAM9.py
@@ -153,7 +153,7 @@ if globalflags.DataSource()=='geant4':
     
     from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning
     EGAM9TruthThinningTool = DerivationFramework__GenericTruthThinning(name                    = "EGAM9TruthThinningTool",
-                                                                       ThinningService         = EGAM9ThinningHelper.ThinningSvc(),
+                                                                       StreamName              = streamName,
                                                                        ParticleSelectionString = truth_expression,
                                                                        PreserveDescendants     = False,
                                                                        PreserveGeneratorDescendants     = True,
@@ -175,14 +175,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepElectronTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM9ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM9ElectronTPThinningTool",
-                                                                                        ThinningService         = EGAM9ThinningHelper.ThinningSvc(),
+                                                                                        StreamName              = streamName,
                                                                                         SGKey                   = "Electrons",
                                                                                         GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                         InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                         SelectionString         = "Electrons.pt > 0*GeV",
                                                                                         BestMatchOnly = True,
-                                                                                        ConeSize = 0.3,
-                                                                                        ApplyAnd = False)
+                                                                                        ConeSize = 0.3)
         ToolSvc += EGAM9ElectronTPThinningTool
         print EGAM9ElectronTPThinningTool
         thinningTools.append(EGAM9ElectronTPThinningTool)
@@ -191,14 +190,13 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPhotonTracks) : 
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning
         EGAM9PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name                    = "EGAM9PhotonTPThinningTool",
-                                                                                      ThinningService         = EGAM9ThinningHelper.ThinningSvc(),
+                                                                                      StreamName              = streamName,
                                                                                       SGKey                   = "Photons",
                                                                                       GSFTrackParticlesKey    = "GSFTrackParticles",        
                                                                                       InDetTrackParticlesKey  = "InDetTrackParticles",
                                                                                       SelectionString         = "Photons.pt > 0*GeV",
                                                                                       BestMatchOnly = True,
-                                                                                      ConeSize = 0.3,
-                                                                                      ApplyAnd = False)
+                                                                                      ConeSize = 0.3)
         
         ToolSvc += EGAM9PhotonTPThinningTool
         print EGAM9PhotonTPThinningTool
@@ -208,7 +206,7 @@ if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning:
     if (TrackThinningKeepPVTracks) :
         from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
         EGAM9TPThinningTool = DerivationFramework__TrackParticleThinning( name                    = "EGAM9TPThinningTool",
-                                                                          ThinningService         = EGAM9ThinningHelper.ThinningSvc(),
+                                                                          StreamName              = streamName,
                                                                           SelectionString         = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm",
                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
         ToolSvc += EGAM9TPThinningTool
@@ -248,16 +246,6 @@ replaceAODReducedJets(reducedJetList,egam9Seq,"EGAM9")
 
 
 
-#============ Create Derivation EGAM9 cell collection ==================
-
-# Keep only calo cells associated with the egammaClusters collection
-from DerivationFrameworkCalo.CaloCellDFGetter import CaloCellDFGetter
-theCaloCellDFGetter = CaloCellDFGetter(inputClusterKeys=["egammaClusters"],
-                                       outputCellKey="DFEGAMCellContainer")
-
-#========================================================================
-
-
 #====================================================================
 # SET UP STREAM SELECTION
 #====================================================================
@@ -268,6 +256,17 @@ theCaloCellDFGetter = CaloCellDFGetter(inputClusterKeys=["egammaClusters"],
 EGAM9Stream.AcceptAlgs(["EGAM9Kernel"])
 
 
+#============ Thin cells for EGAM9 ==================
+
+# Keep only calo cells associated with the egammaClusters collection
+from DerivationFrameworkCalo.CaloCellDFGetter import thinCaloCellsForDF
+thinCaloCellsForDF (inputClusterKeys=["egammaClusters"],
+                    streamName = EGAM9Stream.Name,
+                    outputCellKey = "DFEGAMCellContainer")
+
+#========================================================================
+
+
 #====================================================================
 # SET UP SLIMMING
 #====================================================================
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/share/FTAG5.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/share/FTAG5.py
index 0f392bebc44fc581a7f09f1f038b3a625ebf443c..c0226929abf2d87cdb5ff505f14504cd23750415 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/share/FTAG5.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkFlavourTag/share/FTAG5.py
@@ -89,7 +89,7 @@ FTAG5HbbThinningTools = []
 for collection in ["AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", "AntiKt10TrackCaloClusterTrimmedPtFrac5SmallR20Jets"]:
     FTAG5HbbThinningTools.append(HbbThinner(
         name = "FTAG5HbbThinningTool_%s"%collection,
-        thinningService = FTAG5ThinningHelper.ThinningSvc(),
+        StreamName = streamName,
         jetCollectionName = collection,
         largeJetPtCut = 200e3,
         largeJetEtaCut = 2.1,
@@ -105,7 +105,7 @@ for collection in ["AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", "AntiKt10TrackCal
 # Tracks and CaloClusters associated with TCCs
 from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TCCTrackParticleThinning
 FTAG5TCCThinningTool = DerivationFramework__TCCTrackParticleThinning(name                         = "FTAG5TCCThinningTool",
-                                                                     ThinningService              = FTAG5ThinningHelper.ThinningSvc(),
+                                                                     StreamName                   = streamName,
                                                                      JetKey                       = "AntiKt10TrackCaloClusterJets",
                                                                      TCCKey                       = "TrackCaloClustersCombinedAndNeutral",
                                                                      InDetTrackParticlesKey       = "InDetTrackParticles",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/python/MuonsCommon.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/python/MuonsCommon.py
index a7f233c4fa0f3f25c98847a461f59acd7eab7cc4..4e5511a48f4f5c70a09bc3cb3c90b26a3074e128 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/python/MuonsCommon.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMuons/python/MuonsCommon.py
@@ -78,6 +78,6 @@ DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("DFComm
                                                                          AugmentationTools = DFCommonMuonToolWrapperTools
                                                                         )
 
-import IsolationAlgs.IsoUpdatedTrackCones as isoCones
-if not hasattr(DerivationFrameworkJob,"IsolationBuilderTight1000"):
-  DerivationFrameworkJob += isoCones.GetUpdatedIsoTrackCones()
+#import IsolationAlgs.IsoUpdatedTrackCones as isoCones
+#if not hasattr(DerivationFrameworkJob,"IsolationBuilderTight1000"):
+#  DerivationFrameworkJob += isoCones.GetUpdatedIsoTrackCones()
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py
index 09564d0ec4f956769d96a7671fe43cfecd78773c..c839a9aa48de9bafa3bed6cf7647333cc096f51b 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYS.py
@@ -26,9 +26,6 @@ PHYSStream = MSMgr.NewPoolRootStream( streamName, fileName )
 PHYSStream.AcceptAlgs(["PHYSKernel"])
 
 ### Thinning and augmentation tools lists
-from DerivationFrameworkCore.ThinningHelper import ThinningHelper
-PHYSThinningHelper = ThinningHelper( "PHYSThinningHelper" )
-PHYSThinningHelper.AppendToStream( PHYSStream )
 thinningTools       = []
 AugmentationTools   = []
 
@@ -74,59 +71,57 @@ for trig_item in inputFileSummary['metadata']['/TRIGGER/HLT/Menu']:
 # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/DaodRecommendations
 
 # Inner detector group recommendations for indet tracks in analysis
-# PHYS_thinning_expression = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm && InDetTrackParticles.pt > 10*GeV"
-# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
-# PHYSTrackParticleThinningTool = DerivationFramework__TrackParticleThinning(name                    = "PHYSTrackParticleThinningTool",
-#                                                                            ThinningService         = PHYSThinningHelper.ThinningSvc(),
-#                                                                           SelectionString         = PHYS_thinning_expression,
-#                                                                           InDetTrackParticlesKey  = "InDetTrackParticles",
-#                                                                           ApplyAnd                = False)
+#PHYS_thinning_expression = "InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm && InDetTrackParticles.pt > 10*GeV"
+PHYS_thinning_expression = "abs(DFCommonInDetTrackZ0AtPV)*sin(InDetTrackParticles.theta) < 3.0*mm && InDetTrackParticles.pt > 10*GeV"
+from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning
+PHYSTrackParticleThinningTool = DerivationFramework__TrackParticleThinning(name                    = "PHYSTrackParticleThinningTool",
+                                                                           StreamName              = PHYSStream.Name, 
+                                                                           SelectionString         = PHYS_thinning_expression,
+                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
 
-# ToolSvc += PHYSTrackParticleThinningTool
-# thinningTools.append(PHYSTrackParticleThinningTool)
+ToolSvc += PHYSTrackParticleThinningTool
+thinningTools.append(PHYSTrackParticleThinningTool)
 
 # Include inner detector tracks associated with muons
-# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
-# PHYSMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name                    = "PHYSMuonTPThinningTool",
-#                                                                        ThinningService         = PHYSThinningHelper.ThinningSvc(),
-#                                                                        MuonKey                 = "Muons",
-#                                                                        InDetTrackParticlesKey  = "InDetTrackParticles",
-#                                                                        ApplyAnd = False)
-
-# ToolSvc += PHYSMuonTPThinningTool
-# thinningTools.append(PHYSMuonTPThinningTool)
-
-# # TauJets thinning
-# tau_thinning_expression = "(TauJets.ptFinalCalib >= 13.*GeV) && (TauJets.nTracks>=1) && (TauJets.nTracks<=3) && (TauJets.RNNJetScoreSigTrans>0.01)"
-# from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning
-# PHYSTauJetsThinningTool = DerivationFramework__GenericObjectThinning(name            = "PHYSTauJetsThinningTool",
-#                                                                      ThinningService = PHYSThinningHelper.ThinningSvc(),
-#                                                                      ContainerName   = "TauJets",
-#                                                                      SelectionString = tau_thinning_expression)
-# ToolSvc += PHYSTauJetsThinningTool
-# thinningTools.append(PHYSTauJetsThinningTool)
-
-# # Only keep tau tracks (and associated ID tracks) classified as charged tracks
-# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
-# PHYSTauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name                   = "PHYSTauTPThinningTool",
-#                                                                       ThinningService        = PHYSThinningHelper.ThinningSvc(),
-#                                                                       TauKey                 = "TauJets",
-#                                                                       InDetTrackParticlesKey = "InDetTrackParticles",
-#                                                                       SelectionString        = tau_thinning_expression,
-#                                                                       ApplyAnd               = False,
-#                                                                       DoTauTracksThinning    = True,
-#                                                                       TauTracksKey           = "TauTracks")
-# ToolSvc += PHYSTauTPThinningTool
-# thinningTools.append(PHYSTauTPThinningTool)
-
-# # ID tracks associated with high-pt di-tau
-# from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__DiTauTrackParticleThinning
-# PHYSDiTauTPThinningTool = DerivationFramework__DiTauTrackParticleThinning(name                    = "PHYSDiTauTPThinningTool",
-#                                                                           ThinningService         = PHYSThinningHelper.ThinningSvc(),
-#                                                                           DiTauKey                = "DiTauJets",
-#                                                                           InDetTrackParticlesKey  = "InDetTrackParticles")
-# ToolSvc += PHYSDiTauTPThinningTool
-# thinningTools.append(PHYSDiTauTPThinningTool)
+from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
+PHYSMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name                    = "PHYSMuonTPThinningTool",
+                                                                        StreamName              = PHYSStream.Name,
+                                                                        MuonKey                 = "Muons",
+                                                                        InDetTrackParticlesKey  = "InDetTrackParticles")
+
+ToolSvc += PHYSMuonTPThinningTool
+thinningTools.append(PHYSMuonTPThinningTool)
+
+# TauJets thinning
+tau_thinning_expression = "(TauJets.ptFinalCalib >= 13.*GeV) && (TauJets.nTracks>=1) && (TauJets.nTracks<=3) && (TauJets.RNNJetScoreSigTrans>0.01)"
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning
+PHYSTauJetsThinningTool = DerivationFramework__GenericObjectThinning(name            = "PHYSTauJetsThinningTool",
+                                                                     StreamName      = PHYSStream.Name,
+                                                                     ContainerName   = "TauJets",
+                                                                     SelectionString = tau_thinning_expression)
+ToolSvc += PHYSTauJetsThinningTool
+thinningTools.append(PHYSTauJetsThinningTool)
+
+# Only keep tau tracks (and associated ID tracks) classified as charged tracks
+from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning
+PHYSTauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name                   = "PHYSTauTPThinningTool",
+                                                                      StreamName             = PHYSStream.Name,
+                                                                      TauKey                 = "TauJets",
+                                                                      InDetTrackParticlesKey = "InDetTrackParticles",
+                                                                      SelectionString        = tau_thinning_expression)
+                                                                      #DoTauTracksThinning    = True,
+                                                                      #TauTracksKey           = "TauTracks")
+ToolSvc += PHYSTauTPThinningTool
+thinningTools.append(PHYSTauTPThinningTool)
+
+# ID tracks associated with high-pt di-tau
+from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__DiTauTrackParticleThinning
+PHYSDiTauTPThinningTool = DerivationFramework__DiTauTrackParticleThinning(name                    = "PHYSDiTauTPThinningTool",
+                                                                          StreamName              = PHYSStream.Name,
+                                                                          DiTauKey                = "DiTauJets",
+                                                                          InDetTrackParticlesKey  = "InDetTrackParticles")
+ToolSvc += PHYSDiTauTPThinningTool
+thinningTools.append(PHYSDiTauTPThinningTool)
 
 #====================================================================
 # JET/MET   
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYSLITE.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYSLITE.py
index 3a081d2480302f6f806114023b5b0ddfdfdaa026..f0a3390bd1cc1ed17420a0e529aafcc3dda53e56 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYSLITE.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkPhys/share/PHYSLITE.py
@@ -463,7 +463,7 @@ PHYSLITESlimmingHelper.ExtraVariables = [
   "ExtrapolatedMuonTrackParticles.d0.z0.vz.definingParametersCovMatrix.truthOrigin.truthType.qOverP.theta.phi",
   "MuonSpectrometerTrackParticles.phi.d0.z0.vz.definingParametersCovMatrix.vertexLink.theta.qOverP.truthParticleLink",
   "AnalysisTauJets.pt.eta.phi.m.tauTrackLinks.jetLink.charge.isTauFlags.BDTJetScore.BDTEleScore.ptFinalCalib.etaFinalCalib.phiFinalCalib.mFinalCalib.electronLink.EleMatchLikelihoodScore.pt_combined.eta_combined.phi_combined.m_combined.BDTJetScoreSigTrans.BDTEleScoreSigTrans.PanTau_DecayMode.RNNJetScore.RNNJetScoreSigTrans.IsTruthMatched.truthOrigin.truthType.truthParticleLink.truthJetLink",
-  "AnalysisJets.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.DetectorEta.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.DFCommonJets_jetClean_LooseBad.DFCommonJets_jetClean_TightBad.Timing.btagging.btaggingLink.GhostTrack.DFCommonJets_fJvt.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1",
+  "AnalysisJets.pt.eta.phi.m.JetConstitScaleMomentum_pt.JetConstitScaleMomentum_eta.JetConstitScaleMomentum_phi.JetConstitScaleMomentum_m.NumTrkPt500.SumPtTrkPt500.DetectorEta.Jvt.JVFCorr.JvtRpt.NumTrkPt1000.TrackWidthPt1000.GhostMuonSegmentCount.PartonTruthLabelID.ConeTruthLabelID.HadronConeExclExtendedTruthLabelID.HadronConeExclTruthLabelID.TrueFlavor.DFCommonJets_jetClean_LooseBad.DFCommonJets_jetClean_TightBad.Timing.btagging.btaggingLink.GhostTrack.DFCommonJets_fJvt.DFCommonJets_QGTagger_NTracks.DFCommonJets_QGTagger_TracksWidth.DFCommonJets_QGTagger_TracksC1.PSFrac",
   "BTagging_AntiKt4EMPFlow_201903.DL1r_pu.DL1rmu_pu.DL1r_pb.DL1rmu_pb.DL1r_pc.DL1rmu_pc",
   "TruthPrimaryVertices.t.x.y.z",
   "MET_Core_AnalysisMET.name.mpx.mpy.sumet.source",
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIPileupTool.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIPileupTool.h
index f810cc7325e795d4e57be5b65c63c1dc1681931b..3dd56584eaec2bfb03b3e386831332cb850017ff 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIPileupTool.h
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/HIPileupTool.h
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef HIEVENTUTILS_HIPILEUPTOOL_H__
-#define HIEVENTUTILS_HIPILEUPTOOL_H__
+#ifndef HIEVENTUTILS_HIPILEUPTOOL_H
+#define HIEVENTUTILS_HIPILEUPTOOL_H
 
 // David Adams.
 // January 2014
@@ -32,9 +32,9 @@ namespace HI
     HIPileupTool( const std::string& myname="HIPileupTool" );
     ~HIPileupTool();
 
-    virtual StatusCode initialize();
+    virtual StatusCode initialize() override;
 
-    virtual void print() const;
+    virtual void print() const override;
     void write(TFile* fOut) const;
 
     double get_efficiency(const xAOD::HIEventShapeContainer&, double ) const;
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/ZdcRecTool.h b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/ZdcRecTool.h
index 6a71dfeff72cea027eb7b90f79d531389bd8270e..fe06e51de0a8c630291875b52b5ae854bbfc42c1 100644
--- a/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/ZdcRecTool.h
+++ b/PhysicsAnalysis/HeavyIonPhys/HIEventUtils/HIEventUtils/ZdcRecTool.h
@@ -30,7 +30,7 @@ namespace ZDC
 
     //interface from AsgTool
     virtual StatusCode initializeTool() override;
-    StatusCode initialize() {return initializeTool();}
+    virtual StatusCode initialize() override {return initializeTool();}
     virtual StatusCode recoZdcModule(const xAOD::ZdcModule& module) override;
     virtual StatusCode recoZdcModules(const xAOD::ZdcModuleContainer& moduleContainer) override;
     virtual StatusCode reprocessZdc() override;
@@ -55,8 +55,6 @@ namespace ZDC
     std::string m_zdcRecConfigPath;
 
     mutable bool m_eventReady;
-    float m_highLowTransition[2][4];
-    float m_moduleWeights[2][4];
     std::string m_zdcModuleContainerName;
     const xAOD::ZdcModuleContainer* m_zdcModules;
 
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagAugmenterTool.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagAugmenterTool.h
index eb6fc066be6e4e444327ae1db0bbfefe4ef225e7..23c3eef0709f1e1004824f3bcb7fc7938c5f8850 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagAugmenterTool.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagAugmenterTool.h
@@ -1,6 +1,6 @@
 // for text editors: this file 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 BTAG_AUGMENTER_TOOL_H
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h
index 66678e90fd0d43f31d506cb152b80100f46780d7..37e88d2ff8ac5421cbe87bb11d6db0dd9ef57d90 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h
@@ -6,6 +6,7 @@
 #define BTAG_JET_AUGMENTER_HH
 
 #include "FlavorTagDiscriminants/FlipTagEnums.h"
+#include "FlavorTagDiscriminants/ftagfloat_t.h"
 
 // ATLAS things
 #include "xAODJet/Jet.h"
@@ -73,23 +74,23 @@ private:
 
   AE::ConstAccessor<std::vector<float> > m_ip2d_weightBOfTracks;
   AE::Decorator<int> m_ip2d_nTrks;
-  AE::ConstAccessor<double> m_ip2d_pu;
-  AE::ConstAccessor<double> m_ip2d_pc;
-  AE::ConstAccessor<double> m_ip2d_pb;
+  AE::ConstAccessor<ftagfloat_t> m_ip2d_pu;
+  AE::ConstAccessor<ftagfloat_t> m_ip2d_pc;
+  AE::ConstAccessor<ftagfloat_t> m_ip2d_pb;
   AE::Decorator<char> m_ip2d_isDefaults;
-  AE::Decorator<double> m_ip2d_cu;
-  AE::Decorator<double> m_ip2d_bu;
-  AE::Decorator<double> m_ip2d_bc;
+  AE::Decorator<ftagfloat_t> m_ip2d_cu;
+  AE::Decorator<ftagfloat_t> m_ip2d_bu;
+  AE::Decorator<ftagfloat_t> m_ip2d_bc;
 
   AE::ConstAccessor<std::vector<float> > m_ip3d_weightBOfTracks;
   AE::Decorator<int> m_ip3d_nTrks;
-  AE::ConstAccessor<double> m_ip3d_pu;
-  AE::ConstAccessor<double> m_ip3d_pc;
-  AE::ConstAccessor<double> m_ip3d_pb;
+  AE::ConstAccessor<ftagfloat_t> m_ip3d_pu;
+  AE::ConstAccessor<ftagfloat_t> m_ip3d_pc;
+  AE::ConstAccessor<ftagfloat_t> m_ip3d_pb;
   AE::Decorator<char> m_ip3d_isDefaults;
-  AE::Decorator<double> m_ip3d_cu;
-  AE::Decorator<double> m_ip3d_bu;
-  AE::Decorator<double> m_ip3d_bc;
+  AE::Decorator<ftagfloat_t> m_ip3d_cu;
+  AE::Decorator<ftagfloat_t> m_ip3d_bu;
+  AE::Decorator<ftagfloat_t> m_ip3d_bc;
 
   AE::ConstAccessor<float> m_jf_deltaEta;
   AE::ConstAccessor<float> m_jf_deltaPhi;
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h
index 6c76962a2dd75009a29a58c8a36311185daa5e76..03f43afaffececf6828dab16845c445186987b54 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenter.h
@@ -1,6 +1,6 @@
 // for text editors: this file 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 BTAG_MUON_AUGMENTER_H
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenterTool.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenterTool.h
index 7b466c96588b03cf9cb5ebcc31ad29838267208e..3ac936f4d8aa3154ced0010ff5d796afb610143c 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenterTool.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagMuonAugmenterTool.h
@@ -1,6 +1,6 @@
 // for text editors: this file 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 BTAG_MUON_AUGMENTER_TOOL_H
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackAugmenter.h
index ce236e37e75c96ecd28407e403b17a9087ddd6cc..81d2812f122e99a296ae235befcf537023d492ff 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackAugmenter.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagTrackAugmenter.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
 */
 
 
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h
index f9d14abf6616173ef104ad0a8176d50a4b7d325b..1427d6c572c1acaba99041c242faf78df3b3b60d 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2.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 DL2_H
@@ -9,6 +9,7 @@
 #include "FlavorTagDiscriminants/customGetter.h"
 #include "FlavorTagDiscriminants/FlipTagEnums.h"
 #include "FlavorTagDiscriminants/DL2DataDependencyNames.h"
+#include "FlavorTagDiscriminants/ftagfloat_t.h"
 
 // EDM includes
 #include "xAODJet/Jet.h"
@@ -36,6 +37,26 @@ namespace FlavorTagDiscriminants {
   enum class TrackSelection {ALL, IP3D_2018};
   enum class OutputType {FLOAT, DOUBLE};
 
+  // classes to deal with typedefs
+  //
+  template <typename T>
+  struct EDMTypeEnum;
+  template <> struct EDMTypeEnum<float> {
+    const static EDMType type = EDMType::FLOAT;
+  };
+  template <> struct EDMTypeEnum<double> {
+    const static EDMType type = EDMType::DOUBLE;
+  };
+  template<typename T>
+  struct OutputTypeEnum;
+  template<> struct OutputTypeEnum<float> {
+    const static OutputType type = OutputType::FLOAT;
+  };
+  template<> struct OutputTypeEnum<double> {
+    const static OutputType type = OutputType::DOUBLE;
+  };
+
+
   // Structures to define DL2 input.
   //
   struct DL2InputConfig
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlavorTagDiscriminantsDict.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlavorTagDiscriminantsDict.h
index df73a2639839a57c02558de19e4ce802d50b773b..0d8d0d56eda9c332c25be25b01f8a24cd6968690 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlavorTagDiscriminantsDict.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlavorTagDiscriminantsDict.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 FLAVOR_TAG_DISCRIMINATNS_DICT_H
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlipTagEnums.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlipTagEnums.h
index 7d4351067363883a85698be6bf9cc06b2c996f3e..b40964a8a4736403e6c1e935aeb5110dc6559f56 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlipTagEnums.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/FlipTagEnums.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
 */
 
 
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecorator.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecorator.h
index 9a9b1b958d23da68fc8eac0924b148b4861e7288..92e3f0dd8a6e228f99b70a6c2aad4f2a2cf83b60 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecorator.h
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/VRJetOverlapDecorator.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 VR_JET_OVERLAP_DECORATOR_H
 #define VR_JET_OVERLAP_DECORATOR_H
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/ftagfloat_t.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/ftagfloat_t.h
new file mode 100644
index 0000000000000000000000000000000000000000..2576ccf201145feefa5fb3bccafb31be23dda54c
--- /dev/null
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/ftagfloat_t.h
@@ -0,0 +1,14 @@
+#ifndef FTAG_FLOAT_T_H
+#define FTAG_FLOAT_T_H
+
+/// This is the type that we use for IPRNN, IP3D, and DL1
+///
+/// It has historically been a double, but it should eventuall be a
+/// float. See this ticket
+///
+/// https://its.cern.ch/jira/browse/ATLASRECTS-5201
+///
+
+using ftagfloat_t = double;
+
+#endif
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/selection.xml b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/selection.xml
index 3ba7a7772baf0c0bab0aa34a2178b35a0595db07..926dcd40df8382749b293d1e19edc2d2b794fd38 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/selection.xml
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/selection.xml
@@ -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
 -->
 
 <lcgdict>
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx
index d03d6b7db17c8df9dc0ddc886f3b70f1a414c033..8c52554153b8dc6cc99b07d52e15e085f28dcde7 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenter.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 "xAODMuon/Muon.h"
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenterTool.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenterTool.cxx
index b828d21d49b65ebe912049f1e202caac2b4d36b9..8616b719b49282a1af183e757f294a52266fd2eb 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenterTool.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagMuonAugmenterTool.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 "FlavorTagDiscriminants/BTagMuonAugmenterTool.h"
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackAugmenter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackAugmenter.cxx
index 3ae5dcbd542495f17f5e62d90b986dad92a6944e..3035543edf0a4182e2ee3224e9a225082b5ee1a2 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackAugmenter.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagTrackAugmenter.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 "FlavorTagDiscriminants/BTagTrackAugmenter.h"
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx
index 0a1dd2f54e7ff7fce9ee48b2fce22b558bd559f1..339a116cc4ea5ec2fddce1ff6a97b81263e4895d 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx
@@ -69,20 +69,23 @@ namespace FlavorTagDiscriminants {
     // build the standard inputs
     //
 
+    // the ftagfloat_t is defined in this library (in ftagfloat_t.h)
+    EDMType floattype = EDMTypeEnum<ftagfloat_t>::type;
+
     // type and default value-finding regexes are hardcoded for now
     TypeRegexes type_regexes = {
       {".*_isDefaults"_r, EDMType::UCHAR},
       // TODO: in the future we should migrate RNN and IPxD
       // variables to floats. This is outside the scope of the
       // current flavor tagging developments and AFT-438.
-      {"IP[23]D(Neg)?_[pbc](b|c|u|tau)"_r, EDMType::DOUBLE},
-      {"SV1(Flip)?_[pbc](b|c|u|tau)"_r, EDMType::DOUBLE},
-      {"(rnnip|iprnn)(flip)?_p(b|c|u|tau)"_r, EDMType::DOUBLE},
+      {"IP[23]D(Neg)?_[pbc](b|c|u|tau)"_r, floattype},
+      {"SV1(Flip)?_[pbc](b|c|u|tau)"_r, floattype},
+      {"(rnnip|iprnn)(flip)?_p(b|c|u|tau)"_r, floattype},
       {"(minimum|maximum|average)TrackRelativeEta(Flip)?"_r, EDMType::FLOAT},
       {"(JetFitter|SV1|JetFitterSecondaryVertex)(Flip)?_[Nn].*"_r, EDMType::INT},
       {"(JetFitter|SV1|JetFitterSecondaryVertex).*"_r, EDMType::FLOAT},
       {"pt|abs_eta|eta"_r, EDMType::CUSTOM_GETTER},
-      {"softMuon_p[bcu]"_r, EDMType::DOUBLE},
+      {"softMuon_p[bcu]"_r, floattype},
       {"softMuon_.*"_r, EDMType::FLOAT},
     };
 
@@ -154,8 +157,16 @@ namespace FlavorTagDiscriminants {
     std::vector<DL2TrackSequenceConfig> trk_config = get_track_input_config(
       trk_names, trk_type_regexes, trk_sort_regexes, trk_select_regexes);
 
+    OutputType outtype = OutputTypeEnum<ftagfloat_t>::type;
     m_dl2.reset(
-      new DL2(config, input_config, trk_config, flip_config, var_map));
+      new DL2(
+        config,                 // lwtnn config
+        input_config,           // EDM input config
+        trk_config,             // edm track input config
+        flip_config,            // flip tagger configuration
+        var_map,                // variable remapping
+        outtype                 // output type
+        ));
   }
 
   DL2HighLevel::~DL2HighLevel() = default;
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FlipTagEnums.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FlipTagEnums.cxx
index f33f22d430895c847a683048c708a1985d8c109a..f5b495adbfc14fcff3dac3d760eb2e42eb837398 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FlipTagEnums.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/FlipTagEnums.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
 */
 
 
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/VRJetOverlapDecorator.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/VRJetOverlapDecorator.cxx
index ebb4ef4e293bb356fbc7eae8ce0d030102f6b321..1c5fcbbbe4fee4b2c4c5aab6ed4d79e0223e3387 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/VRJetOverlapDecorator.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/VRJetOverlapDecorator.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 "FlavorTagDiscriminants/VRJetOverlapDecorator.h"
 
diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx
index a766e6750e460339b239c98371b72d55951408a6..626fb19f5b841e4b81c47fa6745f8aba6b6d77c2 100644
--- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.cxx
+++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/src/components/FlavorTagDiscriminants_entries.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 "FlavorTagDiscriminants/DL2Tool.h"
diff --git a/Projects/AnalysisBase/version.txt b/Projects/AnalysisBase/version.txt
index cac3580a039cf523abe709d2467ad5587b249335..99278c76a6bb42b6cda25a73efd1ca8ca6f83084 100644
--- a/Projects/AnalysisBase/version.txt
+++ b/Projects/AnalysisBase/version.txt
@@ -1 +1 @@
-22.0.13
+22.0.14
diff --git a/Projects/AthDataQuality/version.txt b/Projects/AthDataQuality/version.txt
index cac3580a039cf523abe709d2467ad5587b249335..99278c76a6bb42b6cda25a73efd1ca8ca6f83084 100644
--- a/Projects/AthDataQuality/version.txt
+++ b/Projects/AthDataQuality/version.txt
@@ -1 +1 @@
-22.0.13
+22.0.14
diff --git a/Projects/AthGeneration/version.txt b/Projects/AthGeneration/version.txt
index cac3580a039cf523abe709d2467ad5587b249335..99278c76a6bb42b6cda25a73efd1ca8ca6f83084 100644
--- a/Projects/AthGeneration/version.txt
+++ b/Projects/AthGeneration/version.txt
@@ -1 +1 @@
-22.0.13
+22.0.14
diff --git a/Projects/AthSimulation/version.txt b/Projects/AthSimulation/version.txt
index cac3580a039cf523abe709d2467ad5587b249335..99278c76a6bb42b6cda25a73efd1ca8ca6f83084 100644
--- a/Projects/AthSimulation/version.txt
+++ b/Projects/AthSimulation/version.txt
@@ -1 +1 @@
-22.0.13
+22.0.14
diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index 9a7107070e1b4d83e6cf19f43f886b523cdc7722..f16426834fe13bad69d8c3662959d07929d0ca94 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -69,5 +69,13 @@
 - LArCalorimeter/LArSim
 - PhysicsAnalysis/HiggsPhys/HSG5/HSG5DPDUtils
 
-# MdtCalibDbAsciiTool might be removed from athena, disable compilation
+# some MDT calibration tools which might be removed from athena, disable compilation
 - MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool
+- MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools
+- MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibValidation
+- MuonSpectrometer/MuonCalib/MuonCalibAlgs
+- MuonSpectrometer/MuonCalib/MuonCalibDbScripts
+- MuonSpectrometer/MuonCalib/MuonCalibJobTransforms
+- MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleAnalysisAlg
+- MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneExtraTools
+- MuonSpectrometer/MuonCalib/MuonCalibStandAlone/MuonCalibStandAloneTools
diff --git a/Projects/Athena/version.txt b/Projects/Athena/version.txt
index cac3580a039cf523abe709d2467ad5587b249335..99278c76a6bb42b6cda25a73efd1ca8ca6f83084 100644
--- a/Projects/Athena/version.txt
+++ b/Projects/Athena/version.txt
@@ -1 +1 @@
-22.0.13
+22.0.14
diff --git a/Projects/VP1Light/version.txt b/Projects/VP1Light/version.txt
index cac3580a039cf523abe709d2467ad5587b249335..99278c76a6bb42b6cda25a73efd1ca8ca6f83084 100644
--- a/Projects/VP1Light/version.txt
+++ b/Projects/VP1Light/version.txt
@@ -1 +1 @@
-22.0.13
+22.0.14
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIEventShapeJetIteration.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIEventShapeJetIteration.h
index 279f01a366d4e9d2f67f454b4dffe0b87e8ea129..bc8902b6c6f49671ab6a05b9a2ed863e0d65fd8e 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIEventShapeJetIteration.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIEventShapeJetIteration.h
@@ -30,7 +30,7 @@ public:
 
   virtual StatusCode initialize() override;
 
-  int execute() const;
+  virtual int execute() const override;
 
   StatusCode makeClusterList(std::vector<const xAOD::CaloCluster*>& particleList, const xAOD::JetContainer* theJets,
 			     std::set<unsigned int>& used_indices, std::set<unsigned int>& used_eta_bins) const;
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterIndexAssociationTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterIndexAssociationTool.h
index 2e3fa4b7aaa0a68262d4d2286873f8a1e185abd0..b791e51a8cc19889c81cc32464d9fec1690f8339 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterIndexAssociationTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetClusterIndexAssociationTool.h
@@ -1,11 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // HIJetClusterAssociationTool.h
 
-#ifndef __HIJETREC_HIJETCLUSTERINDEXASSOCIATIONTOOL_H__
-#define __HIJETREC_HIJETCLUSTERINDEXASSOCIATIONTOOL_H__
+#ifndef HIJETREC_HIJETCLUSTERINDEXASSOCIATIONTOOL_H
+#define HIJETREC_HIJETCLUSTERINDEXASSOCIATIONTOOL_H
 
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -45,8 +45,8 @@ public:
 
   virtual StatusCode initialize() override;
 
-  StatusCode modify(xAOD::JetContainer& jets) const;
-  int modifyJet(xAOD::Jet&) const {return 1;};
+  virtual StatusCode modify(xAOD::JetContainer& jets) const override;
+  virtual int modifyJet(xAOD::Jet&) const override {return 1;};
 
 private:
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentSubtractionTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentSubtractionTool.h
index 2e75c923d691bf5ac9d3064a4a5da822f5dabc36..0e346b76c3e072c8dfef596e0832e7ac93db8f6b 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentSubtractionTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetConstituentSubtractionTool.h
@@ -4,8 +4,8 @@
 
 // HIJetConstituentSubtractionTool.h
 
-#ifndef __HIJETREC_HIJETCONSTITUENTSUBTRACTIONTOOL_H__
-#define __HIJETREC_HIJETCONSTITUENTSUBTRACTIONTOOL_H__
+#ifndef HIJETREC_HIJETCONSTITUENTSUBTRACTIONTOOL_H
+#define HIJETREC_HIJETCONSTITUENTSUBTRACTIONTOOL_H
 
 ////////////////////////////////////////////////////////////////////////////////
 ///
@@ -51,10 +51,10 @@ public:
   virtual StatusCode initialize() override;
 
   /// \brief Implementing abstract methods from base
-  StatusCode modify(xAOD::JetContainer& jets) const;
+  virtual StatusCode modify(xAOD::JetContainer& jets) const override;
 
   /// \brief Implementing abstract methods from base, not used
-  int modifyJet(xAOD::Jet&) const {return 1;};
+  virtual int modifyJet(xAOD::Jet&) const override {return 1;};
 
 private:
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDRAssociationTool.h b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDRAssociationTool.h
index aa8703181ea9bf60e0b6b0cac46d792b80c9bf75..0932c035e594f1c96be9f20e9638904663fb2b03 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDRAssociationTool.h
+++ b/Reconstruction/HeavyIonRec/HIJetRec/HIJetRec/HIJetDRAssociationTool.h
@@ -1,11 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // HIJetDRAssociationTool.h
 
-#ifndef __HIJETREC_HIJETDRASSOCIATIONTOOL_H__
-#define __HIJETREC_HIJETDRASSOCIATIONTOOL_H__
+#ifndef HIJETREC_HIJETDRASSOCIATIONTOOL_H
+#define HIJETREC_HIJETDRASSOCIATIONTOOL_H
 ////////////////////////////////////////////////////////////////////////////////
 ///
 /// \class HIJetDRAssociationTool
@@ -41,10 +41,10 @@ public:
   virtual StatusCode initialize() override;
 
   /// \brief Implementing abstract methods from base
-  StatusCode modify(xAOD::JetContainer& jets) const;
+  virtual StatusCode modify(xAOD::JetContainer& jets) const override;
 
   /// \brief Implementing abstract methods from base, not used
-  int modifyJet(xAOD::Jet&) const {return 1;};
+  virtual int modifyJet(xAOD::Jet&) const override {return 1;};
 
 private:
 
diff --git a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx
index d5326b86ecc38856fd0949ef39cec83c74c5ac3a..8349780f227b04182dd990448a362ac1a3d491e1 100644
--- a/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx
+++ b/Reconstruction/HeavyIonRec/HIJetRec/Root/HIJetClusterSubtractorTool.cxx
@@ -169,7 +169,7 @@ StatusCode HIJetClusterSubtractorTool::initializeTool()
 {
   if(m_useSamplings)
   {
-    std::string local_path=m_configDir+m_inputFile;
+    std::string local_path=static_cast<std::string>(m_configDir)+m_inputFile;
     std::string full_path=PathResolverFindCalibFile(local_path);
     TFile* f=TFile::Open(full_path.c_str());
     if(f==nullptr)
diff --git a/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py b/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py
index 6c1bed68c0e08ee1642a54d942ff47e52f217d13..bbdba4c998b64ef6aebb506c0310826048ad4a56 100644
--- a/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py
+++ b/Reconstruction/Jet/JetCalibTools/python/JetCalibToolsConfig.py
@@ -117,7 +117,7 @@ def getJetCalibTool(jetcollection, context, data_type, calibseq = "", rhoname =
         if context == "T0":
             _data_type = "data"
         _pvname = ""
-        if "Residual" in calibseq or "GSC" in calibseq and gscdepth!="EM3":
+        if "Residual" in _calibseq or "GSC" in _calibseq and gscdepth!="EM3":
             _pvname = pvname
         return defineJetCalibTool(jetcollection, _configfile, calibarea, _calibseq, _data_type, rhoname, _pvname, gscdepth)
     except KeyError as e:
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetCaloEnergies.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetCaloEnergies.cxx
index 7fd54eff1b454d77cd2f993d4e590e16c08ad389..8c0996987a2f10b39744ca424660a2b2312eaede 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetCaloEnergies.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetCaloEnergies.cxx
@@ -69,9 +69,12 @@ void JetCaloEnergies::fillEperSamplingCluster(xAOD::Jet& jet, std::vector<float>
     *xAOD::JetAttributeAccessor::accessor< float >(xAOD::JetAttribute::EMFrac);
   static const xAOD::JetAttributeAccessor::AccessorWrapper<float>& hecFracAcc =
     *xAOD::JetAttributeAccessor::accessor< float >(xAOD::JetAttribute::HECFrac);      
+  static const xAOD::JetAttributeAccessor::AccessorWrapper<float>& psFracAcc =
+    *xAOD::JetAttributeAccessor::accessor< float >(xAOD::JetAttribute::PSFrac);
   
   emFracAcc(jet) = jet::JetCaloQualityUtils::emFraction( ePerSampling );
   hecFracAcc(jet) = jet::JetCaloQualityUtils::hecF( &jet );
+  psFracAcc(jet) = jet::JetCaloQualityUtils::presamplerFraction( &jet );
 }
 
 #define FillESamplingPFO( LAYERNAME )					\
diff --git a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetMonitoringAlg.h b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetMonitoringAlg.h
index 322846245f98d33fc2e2aa94bc8254e0e25e69f7..bab697afa22e0b80a7cafcad5e8a54006cc90755 100644
--- a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetMonitoringAlg.h
+++ b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetMonitoringAlg.h
@@ -37,6 +37,8 @@ private:
   SG::ReadHandleKey<xAOD::JetContainer> m_jetContainerKey;
   
   ToolHandleArray<IJetHistoFiller> m_jetFillerTools;
+
+  bool m_failureOnMissingContainer;
   
 };
 #endif
diff --git a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
index 4ac50b8a1ac96c5410bc9131cfbccf874eef9c9e..356b646d08ac682f9bd15a5b64379d7150b833a2 100644
--- a/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
+++ b/Reconstruction/Jet/JetMonitoring/JetMonitoring/JetVariable.h
@@ -168,6 +168,39 @@ namespace JetVar {
     virtual float value(const xAOD::Jet & j) const { return j.p4().Et()*m_scale;}
   };
   
+  struct EM3FracVar : public Variable {
+    using Variable::Variable;
+    virtual float value(const xAOD::Jet & j) const {
+      float constitScaleEnergy = 0.;
+      std::vector<float> samplingFrac;
+      xAOD::JetFourMom_t fourVec;
+      bool status = false;
+
+      status = j.getAttribute<xAOD::JetFourMom_t>( "JetConstitScaleMomentum", fourVec );
+      if( status ) constitScaleEnergy = fourVec.E() * m_scale ;
+      else return 0.;
+      status = j.getAttribute<std::vector<float> >("EnergyPerSampling", samplingFrac );
+      if( status ) return (samplingFrac[3]+samplingFrac[7])/constitScaleEnergy;
+      else return 0.;
+    } 
+  };
+
+  struct Tile0FracVar : public Variable {
+    using Variable::Variable;
+    virtual float value(const xAOD::Jet & j) const {
+      float constitScaleEnergy = 0.;
+      std::vector<float> samplingFrac;
+      xAOD::JetFourMom_t fourVec;
+      bool status = false;
+
+      status = j.getAttribute<xAOD::JetFourMom_t>( "JetConstitScaleMomentum", fourVec );
+      if( status ) constitScaleEnergy = fourVec.E() * m_scale ;
+      else return 0.;
+      status = j.getAttribute<std::vector<float> >("EnergyPerSampling", samplingFrac );
+      if( status ) return (samplingFrac[12]+samplingFrac[18])/constitScaleEnergy;
+      else return 0.;
+    } 
+  };
 
 }
 
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py
index 8cedc71a23f3c041af828fb435147d6fa7ee23c8..af41a7cb530e8b46cb3519722614197df06b3bc3 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringConfig.py
@@ -468,6 +468,7 @@ class JetMonAlgSpec(ConfigDict):
         args.setdefault('FillerTools',[])
         args.setdefault('topLevelDir', 'Jets/')
         args.setdefault('bottomLevelDir', '')
+        args.setdefault('failureOnMissingContainer', True)
         ConfigDict.__init__(self, defaultPath=defaultPath, TriggerChain=TriggerChain, **args)
         tmpL = self.FillerTools
         self.FillerTools = []
@@ -482,6 +483,7 @@ class JetMonAlgSpec(ConfigDict):
         alg = monhelper.addAlgorithm(CompFactory.JetMonitoringAlg, self.name)
         alg.TriggerChain = self.TriggerChain
         alg.JetContainerName = self.JetContainerName
+        alg.FailureOnMissingContainer = self.failureOnMissingContainer
         
         path = self.defaultPath
         tools = []
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py b/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
index d6395be4a0d7ca24868cce0e0be7853067edf6c2..fb50c6effd000c17b99e9902835065658bfe9d5d 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetStandardHistoSpecs.py
@@ -15,6 +15,7 @@ from JetMonitoring.JetMonitoringConfig import HistoSpec, VarSpec, ConfigDict, To
 knownVar = dict(    
     mass = VarSpec('m:GeV', 'float'),
     JVF = VarSpec('JVF', 'vecfloat'),
+    EPS = VarSpec('EnergyPerSampling', 'vecfloat'),
 
     # this variable has an index specified. It will thus has only 1 value per jet : the JVF at pos 0
     JVF0 = VarSpec('JVF', 'vecfloat', 0),
@@ -57,7 +58,6 @@ _knownHistos = [
     HistoSpec( 'JVF[1]',  (100,0,1.2) , title='JVF for vtx 1;JVF[1];', ),
 
 
-
     # full list
     HistoSpec('ptN', (250, 0.0, 5000.0), title='Jet Pt;Pt [GeV];', xvar='pt:GeV'),
 
@@ -77,10 +77,10 @@ _knownHistos = [
     HistoSpec('OotFracClusters10', (50, -0.1, 1.2), title='OotFracClusters10; OotFracClusters10;', ),
     
     HistoSpec('Jvt', (70, -0.2, 1.2), title='Jet JVT;JVT;',  ),
-    HistoSpec('JVFCorr', (120, -1.2, 1.2), title='Jet JVT JVFCorr;;', ),
-    HistoSpec('JvtRpt', (75, 0, 1.5), title='Jet JVT Rpt;;', ),
-    
-    
+    HistoSpec('JVFCorr', (120, -1.2, 1.2), title='Jet JVT; JVFCorr;', ),
+    HistoSpec('JvtRpt', (75, 0, 1.5), title='Jet JVT Rpt; JVTRpt;', ),
+    HistoSpec('EM3Frac', (50,-0.1,0.5), title="EM3 fraction;EM3 fraction;Entries"),
+    HistoSpec('Tile0Frac', (50,-0.1,0.5), title="Tile0 fraction;Tile0 fraction;Entries"),
 
 
     HistoSpec('GhostMuonSegmentCount', (60, 0, 60), title='Number of associated muon segments;Number;', xvar=VarSpec('GhostMuonSegmentCount','int')),
@@ -95,6 +95,7 @@ _knownHistos = [
     HistoSpec('NumTrkPt500[0]', (100, 0, 100), title='Number of tracks from PV0 above 0.5 GeV:N_{tracks}(p_{T}>0.5 GeV);', ),
     HistoSpec('NumTrkPt1000[0]', (100, 0, 100), title='Number of all tracks above 1 GeV:N_{tracks}(p_{T}>1 GeV);', ),
     HistoSpec('SumPtTrkPt500:GeV', (100, 0, 200), title='Sum Pt of all tracks above 0.5 GeV:SumPt(p_{T}>0.5 GeV);', ),
+    HistoSpec('SumPtTrkPt500[0]:GeV', (100, 0, 200), title='Sum Pt of all tracks above 0.5 GeV[0]:SumPt(p_{T}>0.5 GeV)[0];', ),
 
     HistoSpec('FoxWolfram4', (100, -1, 1), title='FoxWolfram0;FoxWolfram4;', ),
     HistoSpec('FoxWolfram0', (100, -1, 1), title='FoxWolfram0;FoxWolfram0;', ),
diff --git a/Reconstruction/Jet/JetMonitoring/src/JetMonitoringAlg.cxx b/Reconstruction/Jet/JetMonitoring/src/JetMonitoringAlg.cxx
index f3f33715166a06184bd2860ff9e9e15a0888278c..f46b43c076999e88359f9169397b6c463aaf8c5e 100644
--- a/Reconstruction/Jet/JetMonitoring/src/JetMonitoringAlg.cxx
+++ b/Reconstruction/Jet/JetMonitoring/src/JetMonitoringAlg.cxx
@@ -9,11 +9,12 @@
 
 JetMonitoringAlg::JetMonitoringAlg( const std::string& name, ISvcLocator* pSvcLocator )
 :AthMonitorAlgorithm(name,pSvcLocator)
-,m_jetContainerKey("AntiKt4LCTopoJets"), m_jetFillerTools(this)
+,m_jetContainerKey("AntiKt4LCTopoJets"), m_jetFillerTools(this), m_failureOnMissingContainer(true)
 {
 
     declareProperty("JetContainerName",m_jetContainerKey);
     declareProperty("FillerTools", m_jetFillerTools);
+    declareProperty("FailureOnMissingContainer", m_failureOnMissingContainer);
 }
 
 
@@ -42,8 +43,13 @@ StatusCode JetMonitoringAlg::fillHistograms( const EventContext& ctx ) const {
   // retrieve the jet container
   SG::ReadHandle<xAOD::JetContainer> jets(m_jetContainerKey, ctx);    
   if (! jets.isValid() ) {
-    ATH_MSG_ERROR("evtStore() does not contain jet Collection with name "<< m_jetContainerKey);
-    return StatusCode::FAILURE;
+    if (m_failureOnMissingContainer){
+      ATH_MSG_ERROR("evtStore() does not contain jet Collection with name "<< m_jetContainerKey);
+      return StatusCode::FAILURE;
+    } else {
+      ATH_MSG_WARNING("evtStore() does not contain jet Collection with name "<< m_jetContainerKey);
+      return StatusCode::SUCCESS;
+    }
   }
 
   // call each histograming tool on the container
diff --git a/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx b/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx
index 838764e39ff833c45968c9620bfb57a8a74df2f8..7cddf455b6310312e77a2a74760df36686ae2760 100644
--- a/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx
+++ b/Reconstruction/Jet/JetMonitoring/src/JetVariable.cxx
@@ -17,6 +17,8 @@ namespace JetVar {
     if(name=="abseta") return std::make_unique<AbsEtaVar>(name);
     if(name=="|eta|") return std::make_unique<AbsEtaVar>(name);
     if(name=="rapidity") return std::make_unique<Rapidity>(name);
+    if(name=="EM3Frac") return std::make_unique<EM3FracVar>(name);
+    if(name=="Tile0Frac") return std::make_unique<Tile0FracVar>(name);
 
     // Else assume we're looking for an attribute attached to the jet
     if(type=="float") return std::make_unique<VariableAtt<float> >(name);
diff --git a/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h b/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3cbff98faf653e31b81a69fc7cfc2fb7ec9e6ce0
--- /dev/null
+++ b/Reconstruction/Jet/JetRec/JetRec/JetGroomer.h
@@ -0,0 +1,49 @@
+// this file is -*- C++ -*-
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef JETREC_JETGROOMER_H
+#define JETREC_JETGROOMER_H
+
+///
+/// \class JetGroomer
+///
+/// Creates a new JetContainer by grooming an input jet collection
+///
+/// This tool implements the IJetProvider interface. The JetContainer it returns is built by
+/// running an IJetGroomer tool (e.g. JetTrimmer) on the input jets.
+///
+
+#include "AsgTools/AsgTool.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "JetInterface/IJetProvider.h"
+#include "JetInterface/IJetGroomer.h"
+#include "xAODJet/JetContainer.h"
+#include "xAODJet/JetAuxContainer.h"
+
+class JetGroomer
+  : public asg::AsgTool,
+    virtual public JetProvider<xAOD::JetAuxContainer>
+{
+  ASG_TOOL_CLASS(JetGroomer, IJetProvider)
+
+  public:
+    using asg::AsgTool::AsgTool;
+
+    virtual StatusCode initialize() override;
+    virtual std::pair<std::unique_ptr<xAOD::JetContainer>, std::unique_ptr<SG::IAuxStore> > getJets() const override;
+
+  private:
+    // Handle Input JetContainer
+    SG::ReadHandleKey<xAOD::JetContainer> m_inputJetsKey {this, "UngroomedJets", "", "Jet collection to be groomed"};
+
+    // Handle Input PseudoJetContainer
+    // Needed to extract the constituents
+    SG::ReadHandleKey<PseudoJetContainer> m_inputPseudoJetsKey {this, "ParentPseudoJets", "", "Input constituents"};
+
+    ToolHandle<IJetGroomer> m_groomer ={this , "Groomer" , {} , "Tool grooming the jets (trim, prune, softdrop etc)"};
+
+};
+
+#endif
diff --git a/Reconstruction/Jet/JetRec/JetRec/PseudoJetMerger.h b/Reconstruction/Jet/JetRec/JetRec/PseudoJetMerger.h
index a94a9a681c5360eccd91ca0b86420facc70f6cb3..8759df3bc5888615040767f487caffc7403b1a85 100644
--- a/Reconstruction/Jet/JetRec/JetRec/PseudoJetMerger.h
+++ b/Reconstruction/Jet/JetRec/JetRec/PseudoJetMerger.h
@@ -46,7 +46,7 @@ protected:  // data
 
   // Job options.
 
-  Gaudi::Property<std::vector<std::string> >  m_inputPJC =  {this, "InputPJContainer", { } , "alg type : AntiKt, Kt, CA..."};
+  SG::ReadHandleKeyArray<PseudoJetContainer> m_inputPJC =  {this, "InputPJContainers", { } , "Set of input pseudojets to merge"};
 
   /// Output collection name.
   SG::WriteHandleKey<PseudoJetContainer> m_outcoll = {this, "OutputContainer", "", "Merged output container name" };      
diff --git a/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx b/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..44aefcb547a5bd9e113ea5d13be5ddac2c67b8ab
--- /dev/null
+++ b/Reconstruction/Jet/JetRec/Root/JetGroomer.cxx
@@ -0,0 +1,58 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "JetRec/JetGroomer.h"
+
+#include "JetRec/PseudoJetContainer.h"
+
+using xAOD::JetContainer;
+
+StatusCode JetGroomer::initialize() {
+
+  ATH_MSG_DEBUG("Initializing...");
+
+ if(m_inputJetsKey.empty()){
+    ATH_MSG_ERROR("Jet grooming requested with no input ungroomed jets");
+    return StatusCode::FAILURE;
+  } else if(m_inputPseudoJetsKey.empty()){
+    ATH_MSG_ERROR("Jet grooming requested with no input pseudojets");
+    return StatusCode::FAILURE;
+  }
+  else{
+    ATH_CHECK(m_inputJetsKey.initialize());
+    ATH_CHECK(m_inputPseudoJetsKey.initialize());
+    ATH_CHECK(m_groomer.retrieve());
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+std::pair<std::unique_ptr<xAOD::JetContainer>,std::unique_ptr<SG::IAuxStore> > JetGroomer::getJets() const {
+
+  // retrieve input
+  SG::ReadHandle<JetContainer> inputJets(m_inputJetsKey);
+
+  if(inputJets.isValid()) {
+    ATH_MSG_DEBUG("Retrieval of ungroomed jets succeeded");
+  } else {
+    ATH_MSG_ERROR("Retrieval of ungroomed jets failed");
+    return std::make_pair(std::unique_ptr<xAOD::JetContainer>(nullptr),std::unique_ptr<SG::IAuxStore>(nullptr));
+  }
+
+  ATH_MSG_DEBUG("Grooming jets");
+  // Create the output containers
+  // Make sure that memory is managed safely
+  auto outjets = std::make_unique<xAOD::JetContainer>();
+  auto outaux  = std::make_unique<xAOD::JetAuxContainer>();
+  outjets->setStore(outaux.get());
+
+  SG::ReadHandle<PseudoJetContainer> inputPseudoJets(m_inputPseudoJetsKey);
+
+  for (const xAOD::Jet* jet : *inputJets){
+    m_groomer->groom(*jet, *inputPseudoJets, *outjets);
+  }
+
+  return std::make_pair(std::move(outjets),std::move(outaux));
+}
diff --git a/Reconstruction/Jet/JetRec/Root/PseudoJetMerger.cxx b/Reconstruction/Jet/JetRec/Root/PseudoJetMerger.cxx
index 0e12735bbcc7739bd8054a55f32f799599cbab8e..c01b497128fdc5002ff6b91544a735a96d11edcb 100644
--- a/Reconstruction/Jet/JetRec/Root/PseudoJetMerger.cxx
+++ b/Reconstruction/Jet/JetRec/Root/PseudoJetMerger.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 "JetRec/PseudoJetMerger.h"
 
@@ -11,8 +11,8 @@ PseudoJetMerger::PseudoJetMerger(const std::string& name) : AsgTool(name)  {
 StatusCode PseudoJetMerger::initialize() {
   ATH_MSG_DEBUG("Initializing...");
 
+  ATH_CHECK( m_inputPJC.initialize() );
   ATH_CHECK( m_outcoll.initialize() );
-
   
   return StatusCode::SUCCESS;
 }
@@ -22,10 +22,10 @@ StatusCode PseudoJetMerger::createAndRecord() const {
 
   auto allPseudoJets = std::make_unique<PseudoJetContainer>();
 
-  for (const auto& pjcName : m_inputPJC) {
-    SG::ReadHandle<PseudoJetContainer> pjcHandle( pjcName );
+  for (const auto& pjcKey : m_inputPJC) {
+    SG::ReadHandle<PseudoJetContainer> pjcHandle( pjcKey );
     if(!pjcHandle.isValid()){
-      ATH_MSG_ERROR("Can't retrieve PseudoJetContainer "<< pjcName ); return StatusCode::FAILURE;
+      ATH_MSG_ERROR("Can't retrieve PseudoJetContainer "<< pjcKey.key() ); return StatusCode::FAILURE;
     }
     allPseudoJets->append(pjcHandle.get() );
   }
diff --git a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
index d6e0f52dfe178d6e3f2723713e8a3e9cb6173cbb..9c651b0526fe34c8ae4e89a038eb2cc49e907ad9 100755
--- a/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
+++ b/Reconstruction/Jet/JetRec/share/JetRecAlgTestCfg.py
@@ -53,51 +53,62 @@ def JetInputCfg(ConfigFlags):
 
     inputcfg.addSequence( CompFactory.AthSequencer(sequencename) )
 
-    # Enable dictionary for xAODType enum
-    import cppyy
-    cppyy.loadDictionary('xAODBaseObjectTypeDict')
-    from ROOT import xAODType
+    from xAODBase.xAODType import xAODType
 
     # Apply some corrections to the topoclusters
     # Example with property assignments
-    jetmodseq = CompFactory.JetConstituentModSequence("JetMod_EMOrigin")
+    jetmodseq = CompFactory.JetConstituentModSequence("JetMod_LCOrigin")
     jetmodseq.InputType=xAODType.CaloCluster
     jetmodseq.InputContainer = "CaloCalTopoClusters"
-    jetmodseq.OutputContainer = "EMOriginTopoClusters"
+    jetmodseq.OutputContainer = "LCOriginTopoClusters"
 
     # Build the list of modifiers to run
     # Configuration with constructor keywords
     modlist = [
-        CompFactory.ClusterAtEMScaleTool("ClusterEM",InputType=xAODType.CaloCluster),
         CompFactory.CaloClusterConstituentsOrigin("ClusterOrigin",InputType=xAODType.CaloCluster)
     ]
     jetmodseq.Modifiers = modlist
 
     # We need a JetAlgorithm to run the modseq, which is a tool
     jetmodalg = CompFactory.JetAlgorithm(
-        "JetModAlg_EMOrigin",
+        "JetModAlg_LCOrigin",
         Tools = [jetmodseq])
 
     # Add the alg to the sequence in the ComponentAccumulator
     inputcfg.addEventAlgo(jetmodalg,sequencename)
 
     # Create a PseudoJetGetter & corresponding algorithm
-    getter = CompFactory.PseudoJetGetter(
-        "pjg_EMTopo",
-        InputContainer = "EMOriginTopoClusters",
-        OutputContainer = "PseudoJetEMTopo",
-        Label = "EMTopo",
+    constitgetter = CompFactory.PseudoJetGetter(
+        "pjg_LCTopo",
+        InputContainer = "LCOriginTopoClusters",
+        OutputContainer = "PseudoJetLCTopo",
+        Label = "LCTopo",
         SkipNegativeEnergy=True,
         GhostScale=0.)
 
-    pjgalg = CompFactory.PseudoJetAlgorithm(
-        "pjgalg_EMTopo",
-        PJGetter = getter)
+    constitpjgalg = CompFactory.PseudoJetAlgorithm(
+        "pjgalg_LCTopo",
+        PJGetter = constitgetter)
 
-    # Add the alg to the sequence in the ComponentAccumulator
-    inputcfg.addEventAlgo(pjgalg,sequencename)
+    ghostgetter = CompFactory.PseudoJetGetter(
+        "pjg_Truth",
+        InputContainer = "TruthParticles",
+        OutputContainer = "PseudoJetTruth",
+        Label = "Truth",
+        SkipNegativeEnergy=True,
+        GhostScale=0.)
+
+    ghostpjgalg = CompFactory.PseudoJetAlgorithm(
+        "pjgalg_Truth",
+        PJGetter = ghostgetter)
+
+    pjcs = [constitgetter.OutputContainer,ghostgetter.OutputContainer]
+
+    # Add the algs to the sequence in the ComponentAccumulator
+    inputcfg.addEventAlgo(constitpjgalg,sequencename)
+    inputcfg.addEventAlgo(ghostpjgalg,sequencename)
 
-    return inputcfg
+    return inputcfg, pjcs
 
 # Return a ComponentAccumulator holding the jet building sequence
 def JetBuildAlgCfg(ConfigFlags,buildjetsname):
@@ -110,14 +121,27 @@ def JetBuildAlgCfg(ConfigFlags,buildjetsname):
     sequencename = "JetBuildSeq"
     buildcfg.addSequence( CompFactory.AthSequencer(sequencename) )
     # Merge in config to get jet inputs
-    buildcfg.merge(JetInputCfg(ConfigFlags))
+    inputcfg, pjcs = JetInputCfg(ConfigFlags)
+    buildcfg.merge(inputcfg)
+
+    # Create a merger to build the PseudoJetContainer for this specific jet collection
+    pjmerger = CompFactory.PseudoJetMerger(
+        "pjmerge_"+buildjetsname,
+        InputPJContainers = pjcs,
+        OutputContainer = "PseudoJetMerged_"+buildjetsname)
+
+    mergepjalg = CompFactory.PseudoJetAlgorithm(
+        "pjmergealg_"+buildjetsname,
+        PJGetter = pjmerger)
+
+    buildcfg.addEventAlgo(mergepjalg)
 
     # Create the JetClusterer, set some standard options
     jclust = CompFactory.JetClusterer("builder")
     jclust.JetAlgorithm = "AntiKt"
-    jclust.JetRadius = 0.4
-    jclust.PtMin = 500 # MeV
-    jclust.InputPseudoJets = "PseudoJetEMTopo"
+    jclust.JetRadius = 1.0
+    jclust.PtMin = 5e5 # MeV
+    jclust.InputPseudoJets = "PseudoJetMerged_"+buildjetsname
     jclust.JetInputType = 1 # Hardcoded "magic number" for now
     # See https://gitlab.cern.ch/atlas/athena/blob/master/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
     # This should get its own dictionary.
@@ -139,6 +163,35 @@ def JetBuildAlgCfg(ConfigFlags,buildjetsname):
     buildcfg.addEventAlgo( jra, sequencename )
     return buildcfg
 
+# Return a ComponentAccumulator holding the jet groom sequence
+def JetGroomAlgCfg(ConfigFlags,buildjetsname,groomjetsname):
+    groomcfg = ComponentAccumulator()
+
+    # Create a sequence that holds a set of algorithms
+    # -- mainly for understanding how chunks of the job
+    #    relate to each other
+    sequencename = "JetGroomSeq"
+    groomcfg.addSequence( CompFactory.AthSequencer(sequencename) )
+
+    # Create the JetGroomer, provide it with a JetTrimmer
+    jgroom = CompFactory.JetGroomer("groomer")
+    jgroom.Groomer = CompFactory.JetTrimmer("trimSmallR2Frac5",RClus=0.2,PtFrac=0.05,JetBuilder=CompFactory.JetFromPseudojet())
+    jgroom.UngroomedJets = buildjetsname
+    jgroom.ParentPseudoJets = "PseudoJetMerged_"+buildjetsname
+
+    # Create the JetRecAlg, configure it to use the builder
+    # using constructor syntax instead
+    # (equivalent to setting properties with "=")
+    jra = CompFactory.JetRecAlg(
+        "JRA_groom",
+        Provider = jgroom,       # Single ToolHandle
+        Modifiers = [], # ToolHandleArray
+        OutputContainer = groomjetsname)
+
+    # Add the alg to the ComponentAccumulator in the named sequence
+    groomcfg.addEventAlgo( jra, sequencename )
+    return groomcfg
+
 # Return a ComponentAccumulator holding the jet copy sequence
 def JetCopyAlgCfg(ConfigFlags,buildjetsname,copyjetsname):
     copycfg = ComponentAccumulator()
@@ -149,7 +202,7 @@ def JetCopyAlgCfg(ConfigFlags,buildjetsname,copyjetsname):
     sequencename = "JetCopySeq"
     copycfg.addSequence( CompFactory.AthSequencer(sequencename) )
 
-    # Create the JetClusterer, set some standard options
+    # Create the JetCopier, set some standard options
     jcopy = CompFactory.JetCopier("copier")
     jcopy.InputJets = buildjetsname
 
@@ -172,18 +225,22 @@ def JetCopyAlgCfg(ConfigFlags,buildjetsname,copyjetsname):
 
 # Add the build config to the job
 # One could add options to make it more customisable
-buildjetsname = "MyAntiKt4EMTopoJets"
-copyjetsname = "CopyAntiKt4EMTopoJets"
+buildjetsname = "MyAntiKt10LCTopoJets"
+groomjetsname = "MyAntiKt10LCTopoTrimmedSmallR5Frac20Jets"
+copyjetsname = "CopyAntiKt10LCTopoJets"
 cfg.merge( JetBuildAlgCfg(ConfigFlags, buildjetsname) )
+cfg.merge( JetGroomAlgCfg(ConfigFlags, buildjetsname, groomjetsname) )
 cfg.merge( JetCopyAlgCfg(ConfigFlags, buildjetsname, copyjetsname) )
 
 # Write what we produced to AOD
 # First define the output list
 outputlist = ["EventInfo#*"]
-jetlist = ["AntiKt4EMTopoJets",buildjetsname,copyjetsname]
+jetlist = [buildjetsname]
 for jetcoll in jetlist:
     outputlist += ["xAOD::JetContainer#"+jetcoll,
                    "xAOD::JetAuxContainer#"+jetcoll+"Aux.-PseudoJet"]
+outputlist += ["xAOD::JetContainer#"+copyjetsname,
+               "xAOD::ShallowAuxContainer#"+copyjetsname+"Aux.-PseudoJet"]
 
 # Now get the output stream components
 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
index b06706162f62f2c31355d2ea09c60622f865c95c..a7408a5781bc200824c68d09c364554d3f98f8f2 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.cxx
@@ -13,7 +13,7 @@ using std::string;
 
 PseudoJetAlgorithm::PseudoJetAlgorithm(const std::string& name, 
                            ISvcLocator* pSvcLocator )
-  : ::AthAlgorithm( name, pSvcLocator ),m_pjg(this) {
+  : ::AthReentrantAlgorithm( name, pSvcLocator ),m_pjg(this) {
   declareProperty( "PJGetter", m_pjg);
 }
 
@@ -40,7 +40,7 @@ StatusCode PseudoJetAlgorithm::finalize() {
 
 //**********************************************************************
 
-StatusCode PseudoJetAlgorithm::execute() {
+StatusCode PseudoJetAlgorithm::execute(const EventContext& /*ctx*/) const {
   ATH_MSG_VERBOSE("Executing " << name() << "...");
 
   ATH_CHECK( m_pjg->createAndRecord() );
diff --git a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h
index a8d848320492b4de98837f09ba843ab6b79cd875..4d82f4f01fb3e97f43b81ec8d17f3c30ec722da5 100644
--- a/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h
+++ b/Reconstruction/Jet/JetRec/src/PseudoJetAlgorithm.h
@@ -7,12 +7,12 @@
 #ifndef PseudoJetAlgorithm_H
 #define PseudoJetAlgorithm_H
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 
 class IPseudoJetGetter;
 
-class PseudoJetAlgorithm : public AthAlgorithm { 
+class PseudoJetAlgorithm : public AthReentrantAlgorithm { 
 
 public: 
 
@@ -24,7 +24,7 @@ public:
 
   /// Athena algorithm's Hooks
   virtual StatusCode  initialize() override;
-  virtual StatusCode  execute() override;
+  virtual StatusCode  execute(const EventContext& ctx) const override;
   virtual StatusCode  finalize() override;
 
 private: 
diff --git a/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx b/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx
index a8de4087bcdf6b6a7f15539da05b630d7fb23764..fe281cd2d77b1e94bd6f1521886ef4ad5125b1f7 100644
--- a/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx
+++ b/Reconstruction/Jet/JetRec/src/components/JetRec_entries.cxx
@@ -27,6 +27,7 @@
 #include "JetRec/JetConstitRemover.h"
 #include "JetRec/JetClusterer.h"
 #include "JetRec/JetCopier.h"
+#include "JetRec/JetGroomer.h"
 
 DECLARE_COMPONENT( JetToolRunner )
 DECLARE_COMPONENT( JetRecTool )
@@ -49,6 +50,7 @@ DECLARE_COMPONENT( JetPseudojetCopier )
 DECLARE_COMPONENT( JetConstitRemover )
 DECLARE_COMPONENT( JetClusterer )
 DECLARE_COMPONENT( JetCopier )
+DECLARE_COMPONENT( JetGroomer )
 DECLARE_COMPONENT( PseudoJetMerger )
 
 DECLARE_COMPONENT( JetAlgorithm )
diff --git a/Reconstruction/Jet/JetRecConfig/CMakeLists.txt b/Reconstruction/Jet/JetRecConfig/CMakeLists.txt
index b76e3c087ec8e2b5849f4f8afd5ba4fef410d018..c24fb465bb5942152980475fe9ce173d08e5fc3d 100644
--- a/Reconstruction/Jet/JetRecConfig/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRecConfig/CMakeLists.txt
@@ -8,4 +8,9 @@ atlas_subdir( JetRecConfig )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
+atlas_install_scripts( share/JetRecTestCfg.py test/*.sh )
 atlas_install_joboptions( share/*.py )
+
+atlas_add_test( JetRecCfgTest
+   SCRIPT test_JetRecCfg_build.sh
+   POST_EXEC_SCRIPT nopost.sh )
diff --git a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
index a3b0309027b945db6993d74c7a993a33851afc3b..4121f35dc331c6f30a82d85d214f0ef271da09b8 100644
--- a/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
+++ b/Reconstruction/Jet/JetRecConfig/python/ConstModHelpers.py
@@ -14,14 +14,10 @@ except Exception:
 from ROOT import xAODType
 xAODType.ObjectType
 
-
 from AthenaCommon import Logging
 constmodlog = Logging.logging.getLogger('ConstModHelpers')
 
-from JetRec import JetRecConf
-from JetRecTools import JetRecToolsConf
-from PFlowUtils import PFlowUtilsConf
-
+from AthenaConfiguration.ComponentFactory import CompFactory
 
 # Tool types and configs can be expanded if the user
 # wishes to add their own custom definitions
@@ -29,16 +25,16 @@ from PFlowUtils import PFlowUtilsConf
 # Maybe we need a config class in JetDefinition?
 ConstModTools = {
     # Topoclusters
-    "Origin": JetRecToolsConf.CaloClusterConstituentsOrigin,
-    "EM":     JetRecToolsConf.ClusterAtEMScaleTool,
+    "Origin": CompFactory.CaloClusterConstituentsOrigin,
+    "EM":     CompFactory.ClusterAtEMScaleTool,
     # Particle flow
-    "CorrectPFO":
-              JetRecToolsConf.CorrectPFOTool,
-    "CHS":    JetRecToolsConf.ChargedHadronSubtractionTool,
+    "CorrectPFO": 
+              CompFactory.CorrectPFOTool,
+    "CHS":    CompFactory.ChargedHadronSubtractionTool,
     # Pileup suppression
-    "Vor":    JetRecToolsConf.VoronoiWeightTool,
-    "CS":     JetRecToolsConf.ConstituentSubtractorTool,
-    "SK":     JetRecToolsConf.SoftKillerWeightTool
+    "Vor":    CompFactory.VoronoiWeightTool,
+    "CS":     CompFactory.ConstituentSubtractorTool,
+    "SK":     CompFactory.SoftKillerWeightTool
 }
 
 ConstModConfigs = {
@@ -47,7 +43,7 @@ ConstModConfigs = {
     "EM":     {},
     # Particle flow
     "CorrectPFO":
-              {"WeightPFOTool": PFlowUtilsConf.CP__WeightPFOTool("weightPFO")},
+              {"WeightPFOTool": CompFactory.getComp("CP::WeightPFOTool")("weightPFO")},
     "CHS":    {},
     # Pileup suppression
     "Vor":    {"doSpread":False, "nSigma":0},
@@ -114,14 +110,14 @@ def getConstitModAlg(constit,suffix="",tvaKey="JetTrackVtxAssociation",vtxKey="P
         inputcontainer = chopPFO(inputcontainer)
         outputcontainer = chopPFO(outputcontainer)
 
-    modseq = JetRecToolsConf.JetConstituentModSequence(seqname,
+    modseq = CompFactory.JetConstituentModSequence(seqname,
         InputType=inputtype,
         OutputContainer = outputcontainer,
         InputContainer= inputcontainer,
         Modifiers = modlist
     )
 
-    constitmodalg = JetRecConf.JetAlgorithm("jetalg_{0}".format(modseq.getName()))
+    constitmodalg = CompFactory.JetAlgorithm("jetalg_{0}".format(modseq.getName()))
     constitmodalg.Tools = [modseq]
 
     return constitmodalg
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py b/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py
index 24aa0e5e333c6eee8644b9333b0f73decd0f2c5a..b492a539e4ea25ed2a4206e36facbbcb136a4781 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetDefinition.py
@@ -13,14 +13,7 @@ __all__ =  ["JetConstit", "JetGhost", "JetDefinition","xAODType"]
 from AthenaCommon import Logging
 jetlog = Logging.logging.getLogger('JetDefinition')
 
-# Trigger xAODType.ObjectType dict entry loading
-import cppyy
-try:
-    cppyy.loadDictionary('xAODBaseObjectTypeDict')
-except Exception:
-    pass
-from ROOT import xAODType
-xAODType.ObjectType
+from xAODBase.xAODType import xAODType
 
 # Code from JetRecUtils
 # define the convention that we write R truncating the decimal point
@@ -348,7 +341,7 @@ class JetModifier(object):
 
     def getGenericModifier(self,**kwargs):
         from AthenaConfiguration.ComponentFactory import CompFactory
-        tool = getattr(CompFactory,self.tooltype)(self.toolname)
+        tool = CompFactory.getComp(self.tooltype)(self.toolname)
         return tool
 
     def getPrereqs(self,modspec="",jetdef=None):
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py
index fd01962007a735213785c75f9fb0f88460ae5de0..2f9ccf4b1448aaeb4fbdd03422b42e52f03465c6 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetGroomConfig.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
 
 ########################################################################
 #                                                                      #
@@ -17,8 +17,10 @@ import six
 
 ########################################################################
 # Get a jet groomer class given a tool name and the grooming definition object
+# The pjsin argument is for forwards compatibility when we switch to
+# using JetRecAlg
 #
-def getJetGroomer(groomdef):
+def getJetGroomer(groomdef,pjsin):
     tooltype = groomdef.groomspec["ToolType"]
     toolprops = {key:val for key,val in six.iteritems (groomdef.groomspec) if key not in ["groomalg","ToolType"]}
     return tooltype(groomdef.basename,**toolprops)
@@ -28,14 +30,13 @@ def getJetGroomer(groomdef):
 # Function for configuring the jet algorithm and groomers, given the
 # set of dependencies
 #
-def getJetGroomAlg(jetname,groomdef,modlist):
+def getJetGroomAlg(jetname,groomdef,pjsin,modlist):
     jetlog.debug("Configuring JetAlgorithm \"jetalg_{0}\"".format(jetname))
 
     from . import JetRecConfig
     builder = JetRecConfig.getJetBuilder()
 
-    groomer = getJetGroomer(groomdef)
-    print ("HERE {}".format( type(groomer)))
+    groomer = getJetGroomer(groomdef,pjsin)
     groomer.JetBuilder = builder
 
     from . import JetModConfig
diff --git a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
index ef2e9f16a4ca88849636c9df8c1137e90ea8aa2c..1af16bd0689ed266f212c0b7b21685f6c8d8f0bf 100644
--- a/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
+++ b/Reconstruction/Jet/JetRecConfig/python/JetRecConfig.py
@@ -281,7 +281,7 @@ def JetInputCfg(inputdeps, configFlags, sequenceName):
         jetlog.debug("Setting up input track containers and track-vertex association")
         from JetRecTools import JetRecToolsConfig
         # Jet track selection
-        jettrackselloose = JetRecToolsConfig.getTrackSelTool()
+        jettrackselloose = JetRecToolsConfig.getTrackSelTool(doWriteTracks=True)
         jettvassoc = JetRecToolsConfig.getTrackVertexAssocTool()
 
         jettrkprepalg = CompFactory.JetAlgorithm("jetalg_TrackPrep")
@@ -515,3 +515,6 @@ if __name__=="__main__":
     cfg.printConfig(withDetails=False,summariseProps=True)
 
     cfg.run(maxEvents=10)
+
+    import sys
+    sys.exit(0)
diff --git a/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py b/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py
index c491450ae09c2a1628ced155fdd386ada3149592..613647c79c93987f636a3e8d5d4e4d98ed96d1bc 100644
--- a/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py
+++ b/Reconstruction/Jet/JetRecConfig/python/StandardJetMods.py
@@ -89,11 +89,11 @@ jetmoddict.update(jetmomentmods)
 from ParticleJetTools import ParticleJetToolsConfig
 particlejetmods = {
     # Easy cases, no special config or prereqs, just default tool config
-    "PartonTruthLabel": JetModifier("Analysis__JetPartonTruthLabel","partontruthlabel",
+    "PartonTruthLabel": JetModifier("Analysis::JetPartonTruthLabel","partontruthlabel",
                                     prereqs=["ghost:TruthLabelPartons"]),
 
     # More complex cases here
-    "TruthPartonDR":    JetModifier("Analysis__JetConeLabeling","truthpartondr",
+    "TruthPartonDR":    JetModifier("Analysis::JetConeLabeling","truthpartondr",
                                     helperfn=ParticleJetToolsConfig.getJetConeLabeling),
     "JetDeltaRLabel":   JetModifier("ParticleJetDeltaRLabelTool","jetdrlabeler_jetptmin",
                                     helperfn=ParticleJetToolsConfig.getJetDeltaRLabelTool,
diff --git a/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py b/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
old mode 100644
new mode 100755
index d87a7d55b798f494f8a6d02cdce12d2301386140..eb332bf7503bc020fd486243636a33ed87297f7e
--- a/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
+++ b/Reconstruction/Jet/JetRecConfig/share/JetRecTestCfg.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 from JetRecConfig import JetRecConfig
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 
@@ -28,7 +29,7 @@ def JetRecTestCfg(jetdefs,configFlags,args):
     components = ComponentAccumulator()
     for ca in jetcas:
         components.merge(ca)
-    components.printConfig(args.verboseAccumulators,summariseProps=True)
+    components.printConfig(withDetails=args.verboseAccumulators,summariseProps=True)
 
     return components
 
@@ -174,11 +175,6 @@ if __name__=="__main__":
     # Add the components from our jet reconstruction job
     cfg.merge(JetRecTestCfg(jetdefs,ConfigFlags,args))
 
-    # # build eventinfo attribute list
-    # from OutputStreamAthenaPool.OutputStreamAthenaPoolConf import EventInfoAttListTool, EventInfoTagBuilder
-    # EventInfoTagBuilder = EventInfoTagBuilder(AttributeList="SimpleTag")
-    # cfg.addEventAlgo(EventInfoTagBuilder,"AthAlgSeq")
-    
     # Write what we produced to AOD
     # First define the output list
     outputlist = ["EventInfo#*"]
diff --git a/Reconstruction/Jet/JetRecConfig/test/test_JetRecCfg_build.sh b/Reconstruction/Jet/JetRecConfig/test/test_JetRecCfg_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..375b5573850e01fcbb1ae3295fda5fff3891c44d
--- /dev/null
+++ b/Reconstruction/Jet/JetRecConfig/test/test_JetRecCfg_build.sh
@@ -0,0 +1 @@
+JetRecTestCfg.py -f /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ASG/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.AOD.e5458_s3126_r9364_r9315/AOD.11182705._000001.pool.root.1
diff --git a/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx b/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx
index 9136e9dc14794c431016eb1d0906737e3bb61b5e..34ebbbcc4c14a5140561ab1fa9fdaef4b11e9372 100644
--- a/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx
+++ b/Reconstruction/Jet/JetRecTools/Root/JetTrackSelectionTool.cxx
@@ -20,8 +20,10 @@ StatusCode JetTrackSelectionTool::initialize() {
   StatusCode sc = m_hidselector.retrieve();
   if (sc.isFailure()) {ATH_MSG_ERROR("Can't retrieve ITrackSelectorTool "<< m_hidselector.name() ); return sc;}
 
-  ATH_CHECK(m_inCont_key.initialize());
-  ATH_CHECK(m_outCont_key.initialize());
+  if(!(m_inCont_key.key().empty() && m_outCont_key.key().empty())) {
+    ATH_CHECK(m_inCont_key.initialize());
+    ATH_CHECK(m_outCont_key.initialize());
+  }
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx b/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx
index 968ac534c5159966568f4fd94b2e06c07a45cf7b..eeac82f42f84367cc92e1cf77e6cbe3954c39905 100644
--- a/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.cxx
+++ b/Reconstruction/Jet/JetRecTools/Root/TrackPseudoJetGetter.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 "JetRecTools/TrackPseudoJetGetter.h"
diff --git a/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py b/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py
index 6a51a68e249df96c419ffb4744d9be8529d289ea..85753fe040b006b51e8d44560db222dfa926e21c 100644
--- a/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py
+++ b/Reconstruction/Jet/JetRecTools/python/JetRecToolsConfig.py
@@ -29,9 +29,7 @@ trackcollectionmap = {
     }
 }
 
-def getTrackSelTool(trkopt=""):
-    jettracksname = "JetSelectedTracks"
-    if trkopt: jettracksname += "_{}".format("trkopt")
+def getTrackSelTool(trkopt="",doWriteTracks=False):
 
     # Track selector needs its own hierarchical config getter in JetRecTools?
     idtrackselloose = CompFactory.getComp("InDet::InDetTrackSelectionTool")(
@@ -44,15 +42,25 @@ def getTrackSelTool(trkopt=""):
     )
     jettrackselloose = CompFactory.JetTrackSelectionTool(
         "jettrackselloose",
-        InputContainer  = trackcollectionmap[trkopt]["Tracks"],
-        OutputContainer = jettracksname,
         Selector        = idtrackselloose
     )
+    # Should phase this out completely!
+    # Make a jet track selection alg
+    # Elsewhere just use the ID track tool directly
+    if doWriteTracks:
+        jettracksname = "JetSelectedTracks"
+        if trkopt: jettracksname += "_{}".format("trkopt")
+        jettrackselloose.InputContainer  = trackcollectionmap[trkopt]["Tracks"]
+        jettrackselloose.OutputContainer = jettracksname
+
     return jettrackselloose
 
 def getTrackVertexAssocTool(trkopt=""):
     if trkopt: "_{}".format(trkopt)
     # Track-vertex association
+    # This is to be deprecated
+    # In fact can probably be switched already to match legacy master
+    # but for a future MR
     idtvassoc = CompFactory.getComp("CP::TrackVertexAssociationTool")(
         "idloosetvassoc",
         VertexContainer         = trackcollectionmap[trkopt]["Vertices"],
diff --git a/Reconstruction/MET/METUtilities/Root/METMaker.cxx b/Reconstruction/MET/METUtilities/Root/METMaker.cxx
index 87d011f76e46fd46b51391d4e745a45cd8ba6aa9..d2c2182f42a77c94339f58afcc134ec78e14eccc 100644
--- a/Reconstruction/MET/METUtilities/Root/METMaker.cxx
+++ b/Reconstruction/MET/METUtilities/Root/METMaker.cxx
@@ -67,6 +67,7 @@ namespace met {
   static const SG::AuxElement::ConstAccessor< std::vector<float> > acc_sampleE("EnergyPerSampling");
 
   static const SG::AuxElement::ConstAccessor<float> acc_emf("EMFrac");
+  static const SG::AuxElement::ConstAccessor<float> acc_psf("PSFrac");
   static const SG::AuxElement::ConstAccessor<float> acc_width("Width");
   static const SG::AuxElement::ConstAccessor<float> acc_Eloss("EnergyLoss");
 
@@ -188,7 +189,7 @@ namespace met {
                                   xAOD::MissingETContainer* metCont,
                                   const xAOD::IParticleContainer* collection,
                                   xAOD::MissingETAssociationHelper* helper,
-				  MissingETBase::UsageHandler::Policy objScale)
+                                  MissingETBase::UsageHandler::Policy objScale)
   {
     MissingETBase::Types::bitmask_t metSource;
     switch(metType) {
@@ -222,9 +223,9 @@ namespace met {
     if(metType==xAOD::Type::Muon && (m_muEloss || m_doSetMuonJetEMScale) && !(*metCont)["MuonEloss"]) {
       MissingET* met_muEloss = nullptr;
       if( fillMET(met_muEloss,metCont,"MuonEloss",
-		  MissingETBase::Source::Muon | MissingETBase::Source::Calo) != StatusCode::SUCCESS) {
-	ATH_MSG_ERROR("failed to create Muon Eloss MET term");
-	return StatusCode::FAILURE;
+                  MissingETBase::Source::Muon | MissingETBase::Source::Calo) != StatusCode::SUCCESS) {
+        ATH_MSG_ERROR("failed to create Muon Eloss MET term");
+        return StatusCode::FAILURE;
       }
     }
 
@@ -234,7 +235,7 @@ namespace met {
   StatusCode METMaker::rebuildMET(xAOD::MissingET* met,
                                   const xAOD::IParticleContainer* collection,
                                   xAOD::MissingETAssociationHelper* helper,
-				  MissingETBase::UsageHandler::Policy objScale)
+                                  MissingETBase::UsageHandler::Policy objScale)
   {
     MissingETBase::UsageHandler::Policy p = MissingETBase::UsageHandler::OnlyCluster;
     bool removeOverlap = true;
@@ -255,7 +256,7 @@ namespace met {
                                   xAOD::MissingETAssociationHelper* helper,
                                   MissingETBase::UsageHandler::Policy p,
                                   bool removeOverlap,
-				  MissingETBase::UsageHandler::Policy objScale) {
+                                  MissingETBase::UsageHandler::Policy objScale) {
     if(!met || !collection || !helper) {
       ATH_MSG_WARNING("Invalid pointer supplied for "
                       << "MET (" << met << "), "
@@ -285,60 +286,60 @@ namespace met {
       bool isShallowCopy = dynamic_cast<const xAOD::ShallowAuxContainer*>(collection->front()->container()->getConstStore());
       ATH_MSG_VERBOSE("const store = " << collection->front()->container()->getConstStore());
       if(isShallowCopy && originalInputs) {
-	ATH_MSG_WARNING("Shallow copy provided without \"originalObjectLinks\" decoration! "
-			<< "Overlap removal cannot be done. "
-			<< "Will not compute this term.");
-	ATH_MSG_WARNING("Please apply xAOD::setOriginalObjectLinks() from xAODBase/IParticleHelpers.h");
-	return StatusCode::SUCCESS;
+        ATH_MSG_WARNING("Shallow copy provided without \"originalObjectLinks\" decoration! "
+                        << "Overlap removal cannot be done. "
+                        << "Will not compute this term.");
+        ATH_MSG_WARNING("Please apply xAOD::setOriginalObjectLinks() from xAODBase/IParticleHelpers.h");
+        return StatusCode::SUCCESS;
       } else {
-	ATH_MSG_VERBOSE("Original inputs? " << originalInputs);
+        ATH_MSG_VERBOSE("Original inputs? " << originalInputs);
       }
       for(const auto& obj : *collection) {
-	const IParticle* orig = obj;
+        const IParticle* orig = obj;
         bool selected = false;
         if(!originalInputs) { orig = *acc_originalObject(*obj); }
-	std::vector<const xAOD::MissingETAssociation*> assocs = xAOD::MissingETComposition::getAssociations(map,orig);
-	if(assocs.empty()) {
-	  ATH_MSG_WARNING("Object is not in association map. Did you make a deep copy but fail to set the \"originalObjectLinks\" decoration?");
-	  ATH_MSG_WARNING("If not, Please apply xAOD::setOriginalObjectLinks() from xAODBase/IParticleHelpers.h");
-	}
-
-	// If the object has already been selected and processed, ignore it.
-	if(MissingETComposition::objSelected(helper,orig)) continue;
-	selected = MissingETComposition::selectIfNoOverlaps(helper,orig,p) || !removeOverlap;
+        std::vector<const xAOD::MissingETAssociation*> assocs = xAOD::MissingETComposition::getAssociations(map,orig);
+        if(assocs.empty()) {
+          ATH_MSG_WARNING("Object is not in association map. Did you make a deep copy but fail to set the \"originalObjectLinks\" decoration?");
+          ATH_MSG_WARNING("If not, Please apply xAOD::setOriginalObjectLinks() from xAODBase/IParticleHelpers.h");
+        }
+
+        // If the object has already been selected and processed, ignore it.
+        if(MissingETComposition::objSelected(helper,orig)) continue;
+        selected = MissingETComposition::selectIfNoOverlaps(helper,orig,p) || !removeOverlap;
         ATH_MSG_VERBOSE(obj->type() << " (" << orig <<") with pt " << obj->pt()
                         << " is " << ( selected ? "non-" : "") << "overlapping");
 
-	//Do special overlap removal for calo tagged muons
-	if(m_orCaloTaggedMuon && !removeOverlap && orig->type()==xAOD::Type::Muon && static_cast<const xAOD::Muon*>(orig)->muonType()==xAOD::Muon::CaloTagged) {
-	  for (size_t i = 0; i < assocs.size(); i++) {
-	    std::vector<size_t> ind = assocs[i]->overlapIndices(orig);
-	    std::vector<const xAOD::IParticle*> allObjects = assocs[i]->objects();
-	    for (size_t indi = 0; indi < ind.size(); indi++) if (allObjects[ind[indi]]) {
-		if (allObjects[ind[indi]]->type()==xAOD::Type::Electron
-		    && helper->objSelected(assocs[i], ind[indi])) {
-		  selected = false;
-		  break;
-		}
-	      }
-	  }
-	}
+        //Do special overlap removal for calo tagged muons
+        if(m_orCaloTaggedMuon && !removeOverlap && orig->type()==xAOD::Type::Muon && static_cast<const xAOD::Muon*>(orig)->muonType()==xAOD::Muon::CaloTagged) {
+          for (size_t i = 0; i < assocs.size(); i++) {
+            std::vector<size_t> ind = assocs[i]->overlapIndices(orig);
+            std::vector<const xAOD::IParticle*> allObjects = assocs[i]->objects();
+            for (size_t indi = 0; indi < ind.size(); indi++) if (allObjects[ind[indi]]) {
+                if (allObjects[ind[indi]]->type()==xAOD::Type::Electron
+                    && helper->objSelected(assocs[i], ind[indi])) {
+                  selected = false;
+                  break;
+                }
+              }
+          }
+        }
         // Don't overlap remove muons, but flag the non-overlapping muons to take out their tracks from jets
-	// Removed eloss from here -- clusters already flagged.
-	// To be handled in rebuildJetMET
-	if(selected) {
-	  if(objScale==MissingETBase::UsageHandler::PhysicsObject) {
-	    ATH_MSG_VERBOSE("Add object with pt " << obj->pt());
-	    *met += obj;
-	  } else {
-	    MissingETBase::Types::constvec_t constvec = MissingETComposition::getConstVec(map,obj,objScale);
-	    ATH_MSG_VERBOSE("Add truth object with pt " << constvec.cpt());
-	    met->add(constvec.cpx(),constvec.cpy(),constvec.cpt());
-	  }
-	}
+        // Removed eloss from here -- clusters already flagged.
+        // To be handled in rebuildJetMET
+        if(selected) {
+          if(objScale==MissingETBase::UsageHandler::PhysicsObject) {
+            ATH_MSG_VERBOSE("Add object with pt " << obj->pt());
+            *met += obj;
+          } else {
+            MissingETBase::Types::constvec_t constvec = MissingETComposition::getConstVec(map,obj,objScale);
+            ATH_MSG_VERBOSE("Add truth object with pt " << constvec.cpt());
+            met->add(constvec.cpx(),constvec.cpy(),constvec.cpt());
+          }
+        }
         if(selected) {
-	  uniqueLinks.emplace_back( iplink_t(*static_cast<const IParticleContainer*>(obj->container()),obj->index()) );
-	  uniqueWeights.emplace_back( 1. );
+          uniqueLinks.emplace_back( iplink_t(*static_cast<const IParticleContainer*>(obj->container()),obj->index()) );
+          uniqueWeights.emplace_back( 1. );
         }
       }
     }
@@ -375,16 +376,16 @@ namespace met {
 
       metSoftTrk = nullptr;
       if( fillMET(metSoftTrk,metCont, softKey , coreSoftTrk->source() ) != StatusCode::SUCCESS) {
-	ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
-	return StatusCode::FAILURE;
+        ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
+        return StatusCode::FAILURE;
       }
     } else {
       coreSoftClus = coreSoft;
 
       metSoftClus = nullptr;
       if( fillMET(metSoftClus, metCont, softKey , coreSoftClus->source() ) != StatusCode::SUCCESS) {
-	ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
-	return StatusCode::FAILURE;
+        ATH_MSG_ERROR("failed to fill MET term \"" << softKey << "\"");
+        return StatusCode::FAILURE;
       }
     }
 
@@ -395,12 +396,12 @@ namespace met {
   }
 
   StatusCode METMaker::rebuildTrackMET(const std::string& metJetKey,
-				       const std::string& softKey,
-				       xAOD::MissingETContainer* metCont,
-				       const xAOD::JetContainer* jets,
-				       const xAOD::MissingETContainer* metCoreCont,
-				       xAOD::MissingETAssociationHelper* helper,
-				       bool doJetJVT)
+                                       const std::string& softKey,
+                                       xAOD::MissingETContainer* metCont,
+                                       const xAOD::JetContainer* jets,
+                                       const xAOD::MissingETContainer* metCoreCont,
+                                       xAOD::MissingETAssociationHelper* helper,
+                                       bool doJetJVT)
   {
     ATH_MSG_VERBOSE("Rebuild jet term: " << metJetKey << " and soft term: " << softKey);
 
@@ -427,8 +428,8 @@ namespace met {
     }
 
     return rebuildTrackMET(metJet, jets, helper,
-			   metSoftTrk,  coreSoftTrk,
-			   doJetJVT);
+                           metSoftTrk,  coreSoftTrk,
+                           doJetJVT);
   }
 
   StatusCode METMaker::rebuildJetMET(const std::string& metJetKey,
@@ -519,9 +520,9 @@ namespace met {
       dec_constitObjLinks(*metSoftClus) = vector<iplink_t>(0);
       if(coreSoftClus) {
         ATH_MSG_VERBOSE("Building MET soft cluster term " << metSoftClus->name());
-	ATH_MSG_VERBOSE("Core soft cluster mpx " << coreSoftClus->mpx()
-			<< ", mpy " << coreSoftClus->mpy()
-			<< " sumet " << coreSoftClus->sumet());
+        ATH_MSG_VERBOSE("Core soft cluster mpx " << coreSoftClus->mpx()
+                        << ", mpy " << coreSoftClus->mpy()
+                        << " sumet " << coreSoftClus->sumet());
         *metSoftClus += *coreSoftClus;
       } else {
         ATH_MSG_WARNING("Soft cluster term provided without a core term!");
@@ -531,29 +532,29 @@ namespace met {
       // For now, only setting up to work with those corresponding to the jet constituents.
       // Can expand if needed.
       if(softConst && acc_softConst.isAvailable(*coreSoftClus)) {
-	for(const auto& constit : acc_softConst(*coreSoftClus)) {
-	  softConst->push_back(*constit);
-	}
-	ATH_MSG_DEBUG(softConst->size() << " soft constituents from core term");
+        for(const auto& constit : acc_softConst(*coreSoftClus)) {
+          softConst->push_back(*constit);
+        }
+        ATH_MSG_DEBUG(softConst->size() << " soft constituents from core term");
       }
     }
     if(metSoftTrk) {
       dec_constitObjLinks(*metSoftTrk) = vector<iplink_t>(0);
       if(coreSoftTrk) {
         ATH_MSG_VERBOSE("Building MET soft track term " << metSoftTrk->name());
-	ATH_MSG_VERBOSE("Core soft track mpx " << coreSoftTrk->mpx()
-			<< ", mpy " << coreSoftTrk->mpy()
-			<< " sumet " << coreSoftTrk->sumet());
+        ATH_MSG_VERBOSE("Core soft track mpx " << coreSoftTrk->mpx()
+                        << ", mpy " << coreSoftTrk->mpy()
+                        << " sumet " << coreSoftTrk->sumet());
         *metSoftTrk += *coreSoftTrk;
       } else {
         ATH_MSG_WARNING("Soft track term provided without a core term!");
         return StatusCode::SUCCESS;
       }
       if(softConst && acc_softConst.isAvailable(*coreSoftTrk) && !m_doPFlow && !m_doSoftTruth) {
-	for(const auto& constit : acc_softConst(*coreSoftTrk)) {
-	  softConst->push_back(*constit);
-	}
-	ATH_MSG_DEBUG(softConst->size() << " soft constituents from trk core term");
+        for(const auto& constit : acc_softConst(*coreSoftTrk)) {
+          softConst->push_back(*constit);
+        }
+        ATH_MSG_DEBUG(softConst->size() << " soft constituents from trk core term");
       }
     }
 
@@ -579,20 +580,20 @@ namespace met {
         ATH_MSG_VERBOSE( "Jet calib pt = " << jet->pt());
         bool selected = (fabs(jet->eta())<2.4 && jet->pt()>m_CenJetPtCut) || (fabs(jet->eta())>=2.4 && jet->pt()>m_FwdJetPtCut );//jjj
         bool JVT_reject(false);
-	bool isMuFSRJet(false);
-	
+        bool isMuFSRJet(false);
+        
         if(doJetJVT) {
-	  if(jet->pt()<m_JvtPtMax && fabs(jet->eta())<2.4) {
-	    float jvt;
-	    bool gotJVT = jet->getAttribute<float>(m_jetJvtMomentName,jvt);
-	    if(gotJVT) {
-	      JVT_reject = jvt<m_JvtCut;
-	      ATH_MSG_VERBOSE("Jet " << (JVT_reject ? "fails" : "passes") <<" JVT selection");
-	    } else {
-	      JVT_reject = true;
-	      ATH_MSG_WARNING("Tried to retrieve JVT but this was not set. Failing this jet.");
-	    }
-	  }
+          if(jet->pt()<m_JvtPtMax && fabs(jet->eta())<2.4) {
+            float jvt;
+            bool gotJVT = jet->getAttribute<float>(m_jetJvtMomentName,jvt);
+            if(gotJVT) {
+              JVT_reject = jvt<m_JvtCut;
+              ATH_MSG_VERBOSE("Jet " << (JVT_reject ? "fails" : "passes") <<" JVT selection");
+            } else {
+              JVT_reject = true;
+              ATH_MSG_WARNING("Tried to retrieve JVT but this was not set. Failing this jet.");
+            }
+          }
         }
         if (m_extraJetRejection && jet->auxdata<char>(m_jetRejectionDec)==0) JVT_reject = true;
         bool hardJet(false);
@@ -600,327 +601,337 @@ namespace met {
         bool caloverlap = false;
         caloverlap = calvec.ce()>0;
         ATH_MSG_DEBUG("Jet " << jet->index() << " is " << ( caloverlap ? "" : "non-") << "overlapping");
-	if(caloverlap) {
-	  for(const auto& object : assoc->objects()) {
-	    if(helper->objSelected(assoc, object)) {
-	      ATH_MSG_VERBOSE("  Jet overlaps with " << object->type() << " " << object->index() 
-			   << " with pt " << object->pt() << ", phi " << object->phi() );
-	    }
-	  }
-	}
-
-	xAOD::JetFourMom_t constjet;
-	double constSF(1);
-	if(m_jetConstitScaleMom.empty() && assoc->hasAlternateConstVec()){
-	  constjet = assoc->getAlternateConstVec();
-	} else {
-	  constjet = jet->jetP4(m_jetConstitScaleMom);//grab a constituent scale added by the JetMomentTool/JetConstitFourMomTool.cxx
-	  double denom = (assoc->hasAlternateConstVec() ? assoc->getAlternateConstVec() : jet->jetP4("JetConstitScaleMomentum")).E();
-	  constSF = denom>1e-9 ? constjet.E()/denom : 0.;
-	  ATH_MSG_VERBOSE("Scale const jet by factor " << constSF);
-	  calvec *= constSF;
-	}
-	double jpx = constjet.Px();
+        if(caloverlap) {
+          for(const auto& object : assoc->objects()) {
+            if(helper->objSelected(assoc, object)) {
+              ATH_MSG_VERBOSE("  Jet overlaps with " << object->type() << " " << object->index() 
+                           << " with pt " << object->pt() << ", phi " << object->phi() );
+            }
+          }
+        }
+
+        xAOD::JetFourMom_t constjet;
+        double constSF(1);
+        if(m_jetConstitScaleMom.empty() && assoc->hasAlternateConstVec()){
+          constjet = assoc->getAlternateConstVec();
+        } else {
+          constjet = jet->jetP4(m_jetConstitScaleMom);//grab a constituent scale added by the JetMomentTool/JetConstitFourMomTool.cxx
+          double denom = (assoc->hasAlternateConstVec() ? assoc->getAlternateConstVec() : jet->jetP4("JetConstitScaleMomentum")).E();
+          constSF = denom>1e-9 ? constjet.E()/denom : 0.;
+          ATH_MSG_VERBOSE("Scale const jet by factor " << constSF);
+          calvec *= constSF;
+        }
+        double jpx = constjet.Px();
         double jpy = constjet.Py();
         double jpt = constjet.Pt();
         double opx = jpx - calvec.cpx();
         double opy = jpy - calvec.cpy();
 
-	MissingET* met_muonEloss(0);
-	if(m_muEloss || m_doSetMuonJetEMScale) {
-	  // Get a term to hold the Eloss corrections
-	  MissingETContainer* metCont = static_cast<MissingETContainer*>(metJet->container());
-	  met_muonEloss = (*metCont)["MuonEloss"];
-	  if(!met_muonEloss) {
-	    ATH_MSG_WARNING("Attempted to apply muon Eloss correction, but corresponding MET term does not exist!");
-	    return StatusCode::FAILURE;
-	  }
-	}
-
-	float total_eloss(0);
-	MissingETBase::Types::bitmask_t muons_selflags(0);
-	std::vector<const xAOD::Muon*> muons_in_jet;
-	std::vector<const xAOD::Electron*> electrons_in_jet;
+        MissingET* met_muonEloss(0);
+        if(m_muEloss || m_doSetMuonJetEMScale) {
+          // Get a term to hold the Eloss corrections
+          MissingETContainer* metCont = static_cast<MissingETContainer*>(metJet->container());
+          met_muonEloss = (*metCont)["MuonEloss"];
+          if(!met_muonEloss) {
+            ATH_MSG_WARNING("Attempted to apply muon Eloss correction, but corresponding MET term does not exist!");
+            return StatusCode::FAILURE;
+          }
+        }
+
+        float total_eloss(0);
+        MissingETBase::Types::bitmask_t muons_selflags(0);
+        std::vector<const xAOD::Muon*> muons_in_jet;
+        std::vector<const xAOD::Electron*> electrons_in_jet;
         bool passJetForEl=false;
-	if(m_useGhostMuons) { // for backwards-compatibility
-	  if(acc_ghostMuons.isAvailable(*jet)) {
-	    for(const auto& el : acc_ghostMuons(*jet)) {
-	      if(el.isValid()) {
-     	  	muons_in_jet.push_back(static_cast<const xAOD::Muon*>(*el));
-	      } else {
-     	  	ATH_MSG_WARNING("Invalid element link to ghost muon! Quitting.");
-     	  	return StatusCode::FAILURE;
-	      }
-	    }
-	  } else {
-	    ATH_MSG_WARNING("Ghost muons requested but not found!");
-	    return StatusCode::FAILURE;
-	  }
-	}
-	for(const auto& obj : assoc->objects()) {
-	  if (!obj) { continue; }
-	  if(obj->type()==xAOD::Type::Muon && !m_useGhostMuons) {
-	    const xAOD::Muon* mu_test(static_cast<const xAOD::Muon*>(obj));
-	    ATH_MSG_VERBOSE("Muon " << mu_test->index() << " found in jet " << jet->index());
-	    if((m_doRemoveMuonJets || m_doSetMuonJetEMScale)) {
-	      if(acc_originalObject.isAvailable(*mu_test)) mu_test = static_cast<const xAOD::Muon*>(*acc_originalObject(*mu_test));
-	      if(MissingETComposition::objSelected(helper,mu_test)) { // 
-		muons_in_jet.push_back(mu_test);		
-		ATH_MSG_VERBOSE("Muon is selected by MET.");
-	      }
-	    }
-	  } else if(obj->type()==xAOD::Type::Electron && m_doRemoveElecTrks) {
-	    const xAOD::Electron* el_test(static_cast<const xAOD::Electron*>(obj));
-	    ATH_MSG_VERBOSE("Electron " << el_test->index() << " found in jet " << jet->index());
-	    if(acc_originalObject.isAvailable(*el_test)) el_test = static_cast<const xAOD::Electron*>(*acc_originalObject(*el_test));
-	    if(helper->objSelected(assoc,el_test)){
-	      if(el_test->pt()>90.0e3) { // only worry about high-pt electrons?
-		electrons_in_jet.push_back(el_test);
-		ATH_MSG_VERBOSE("High-pt electron is selected by MET.");
-	      }
-	    }
-	  }
-	}
-	if(m_doRemoveElecTrks) {
-	  MissingETBase::Types::constvec_t initialTrkMom = assoc->jetTrkVec();
-	  float jet_ORtrk_sumpt = assoc->overlapTrkVec(helper).sumpt();
-	  float jet_all_trk_pt =  initialTrkMom.sumpt();
-	  float jet_unique_trk_pt = jet_all_trk_pt - jet_ORtrk_sumpt;
-	  MissingETBase::Types::constvec_t el_calvec;
-	  MissingETBase::Types::constvec_t el_trkvec;
-	  for(const auto& elec : electrons_in_jet) {
-	      el_calvec += assoc->calVec(elec);
-	      el_trkvec += assoc->trkVec(elec);
-	  }
-	  float el_cal_pt = el_calvec.cpt();
-	  float el_trk_pt = el_trkvec.cpt();
-	  ATH_MSG_VERBOSE("Elec trk: " << el_trk_pt
-			  << " jetalltrk: " << jet_all_trk_pt
-			  << " jetORtrk: " << jet_ORtrk_sumpt
-			  << " electrk-jetORtrk: " << (el_trk_pt-jet_ORtrk_sumpt)
-			  << " elec cal: " << el_cal_pt
-			  << " jetalltrk-electrk: " << (jet_all_trk_pt-el_trk_pt)
-			  << " jetalltrk-jetORtrk: " << (jet_all_trk_pt-jet_ORtrk_sumpt) );
-	  // Want to use the jet calo measurement if we had at least one electron
-	  // and the jet has a lot of residual track pt
-	  // Is the cut appropriate?
-	  if(el_trk_pt>1e-9 && jet_unique_trk_pt>10.0e3) passJetForEl=true;
-	} // end ele-track removal
-
-	for(const xAOD::Muon* mu_in_jet : muons_in_jet) {
-	  float mu_Eloss = acc_Eloss(*mu_in_jet);
-
-	  if(!JVT_reject && mu_in_jet) {
-	    if (m_doRemoveMuonJets) {
-	      // need to investigate how this is affected by the recording of muon clusters in the map
-	      float mu_id_pt = mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) ? mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle)->pt() : 0.;
-	      float jet_trk_sumpt = acc_trksumpt.isAvailable(*jet) && this->getPV() ? acc_trksumpt(*jet)[this->getPV()->index()] : 0.;
-
-	      // missed the muon, so we should add it back
-	      if(0.9999*mu_id_pt>jet_trk_sumpt)
-		jet_trk_sumpt+=mu_id_pt;
-	      float jet_trk_N = acc_trkN.isAvailable(*jet) && this->getPV() ? acc_trkN(*jet)[this->getPV()->index()] : 0.;
-	      ATH_MSG_VERBOSE("Muon has ID pt " << mu_id_pt);
-	      ATH_MSG_VERBOSE("Jet has pt " << jet->pt() << ", trk sumpt " << jet_trk_sumpt << ", trk N " << jet_trk_N);
-	      bool jet_from_muon = mu_id_pt>1e-9 && jet_trk_sumpt>1e-9 && (jet->pt()/mu_id_pt < 2 && mu_id_pt/jet_trk_sumpt>0.8) && jet_trk_N<5;
-	      if(jet_from_muon) {
-		ATH_MSG_VERBOSE("Jet is from muon -- remove.");
-		JVT_reject = true;
-	      }
-	    }
-
-	    if (m_doSetMuonJetEMScale) {
-	      // need to investigate how this is affected by the recording of muon clusters in the map
-	      float mu_id_pt = mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) ? mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle)->pt() : 0.;
-	      float jet_trk_sumpt = acc_trksumpt.isAvailable(*jet) && this->getPV() ? acc_trksumpt(*jet)[this->getPV()->index()] : 0.;
-	      // missed the muon, so we should add it back
-	      if(0.9999*mu_id_pt>jet_trk_sumpt)
-		jet_trk_sumpt+=mu_id_pt;
-	      float jet_trk_N = acc_trkN.isAvailable(*jet) && this->getPV() ? acc_trkN(*jet)[this->getPV()->index()] : 0.;
-	      float jet_psE = acc_sampleE(*jet)[0] + acc_sampleE(*jet)[4];
-	      bool jet_from_muon = jet_trk_sumpt>1e-9 && jet_trk_N<3 && mu_id_pt / jet_trk_sumpt > 0.8 && acc_emf(*jet)>0.9 && acc_width(*jet)<0.1 && jet_psE>2500;
-	      ATH_MSG_VERBOSE("Muon has ID pt " << mu_id_pt);
-	      ATH_MSG_VERBOSE("Jet has trk sumpt " << jet_trk_sumpt << ", trk N " << jet_trk_N << ", PS E " << jet_psE << ", width " << acc_width(*jet) << ", emfrac " << acc_emf(*jet));
-
-	      if(jet_from_muon) {
-		ATH_MSG_VERBOSE("Jet is from muon -- set to EM scale and subtract Eloss.");
-		// Using constjet now because we focus on AntiKt4EMTopo.
-		// Probably not a massive difference to LC, but PF needs some consideration
-		ATH_MSG_VERBOSE("Jet e: " << constjet.E() << ", mu Eloss: " << mu_Eloss);
-		float elosscorr = mu_Eloss >= constjet.e() ? 0. : 1.-mu_Eloss/constjet.e();
-		// Effectively, take the unique fraction of the jet times the eloss-corrected fraction
-		// This might in some cases oversubtract, but should err on the side of undercounting the jet contribution
-		opx *= elosscorr;
-		opy *= elosscorr;
-		ATH_MSG_VERBOSE(" Jet eloss factor " << elosscorr << ", final pt: " << sqrt(opx*opx+opy*opy));
-		// Don't treat this jet normally. Instead, just add to the Eloss term
-		isMuFSRJet = true;
-	      }
-	    }
-	  } // end muon-jet overlap-removal
-
-	  switch(mu_in_jet->energyLossType()) {
-	    case xAOD::Muon::Parametrized:
-	    case xAOD::Muon::MOP:
-	    case xAOD::Muon::Tail:
-	    case xAOD::Muon::FSRcandidate:
-	    case xAOD::Muon::NotIsolated:
-	      // For now don't differentiate the behaviour
-	      // Remove the Eloss assuming the parameterised value
-	      // The correction is limited to the selected clusters
-	      total_eloss += mu_Eloss;
-	      muons_selflags |= (1<<assoc->findIndex(mu_in_jet));
-	  }
-	}
-	ATH_MSG_VERBOSE("Muon selection flags: " << muons_selflags);
-	ATH_MSG_VERBOSE("Muon total eloss: " << total_eloss);
-
-	MissingETBase::Types::constvec_t mu_calovec;
-	// borrowed from overlapCalVec
-	for(size_t iKey = 0; iKey < assoc->sizeCal(); iKey++) {
-	  bool selector = (muons_selflags & assoc->calkey()[iKey]);
-	  if(selector) mu_calovec += assoc->calVec(iKey);
-	  ATH_MSG_VERBOSE("This key: " << assoc->calkey()[iKey] << ", selector: " << selector);
-	}
-	ATH_MSG_VERBOSE("Mu calovec pt, no Eloss:   " << mu_calovec.cpt());
-	if(m_muEloss) mu_calovec *= std::max(0.,1-(total_eloss/mu_calovec.ce()));
-	ATH_MSG_VERBOSE("Mu calovec pt, with Eloss: " << mu_calovec.cpt());
-
-	// re-add calo components of muons beyond Eloss correction
-	ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT before OR " << jpt);
-	ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT after OR " << sqrt(opx*opx+opy*opy));
-	opx += mu_calovec.cpx();
-	opy += mu_calovec.cpy();
-	double opt = sqrt( opx*opx+opy*opy );
-	ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT diff after OR readding muon clusters " << opt-jpt);
-	double uniquefrac = 1. - (calvec.ce() - mu_calovec.ce()) / constjet.E();
-	ATH_MSG_VERBOSE( "Jet constscale px, py, pt, E = " << jpx << ", " << jpy << ", " << jpt << ", " << constjet.E() );
-	ATH_MSG_VERBOSE( "Jet overlap E = " << calvec.ce() - mu_calovec.ce() );
-	ATH_MSG_VERBOSE( "Jet OR px, py, pt, E = " << opx << ", " << opy << ", " << opt << ", " << constjet.E() - calvec.ce() );
-	  
-	if(isMuFSRJet) {
-	  if(met_muonEloss) {
-	    met_muonEloss->add(opx,opy,opt);
-	  } else {
-	    ATH_MSG_WARNING("Attempted to apply muon Eloss correction, but corresponding MET term does not exist!");
-	    return StatusCode::FAILURE;
-	  }
-	} else {
-	  if(selected && !JVT_reject) {
-	    if(!caloverlap) {
-	      // add jet full four-vector
-	      hardJet = true;
-	      if (!tracksForHardJets) {
-		if(m_doConstJet) {
-		  metJet->add(jpx,jpy,jpt);
-		} else {*metJet += jet;}
-	      }
-	    } else {
-	      // check unique fraction
-	      if((uniquefrac>m_jetMinEfrac || passJetForEl) && opt>m_jetMinWeightedPt) {
-		// add jet corrected for overlaps
-		hardJet = true;
-		if(!tracksForHardJets) {
-		  if(m_jetCorrectPhi) {
-		    if (m_doConstJet) metJet->add(opx,opy,opt);
-		    else {
-		      double jesF = jet->pt() / jpt;
-		      metJet->add(opx*jesF,opy*jesF,opt*jesF);
-		    }
-		  } else {
-		    if (m_doConstJet){
-		      metJet->add(uniquefrac*jpx,uniquefrac*jpy,uniquefrac*jpt);
-		    }
-		    else{
-		      if(passJetForEl){
-			if(m_doRemoveElecTrksEM) metJet->add(opx,opy,opt);
-			else metJet->add(uniquefrac*jet->px(),uniquefrac*jet->py(),uniquefrac*jet->pt());
-		      }else{
-			metJet->add(uniquefrac*jet->px(),uniquefrac*jet->py(),uniquefrac*jet->pt());
-		      }
-		    }
-		  }
-		}
-	      }
-	    }
-	  }  // hard jet selection
-
-	  if(hardJet){
-	    ATH_MSG_VERBOSE("Jet added at full scale");
-	    uniqueLinks.emplace_back( iplink_t(*static_cast<const IParticleContainer*>(jet->container()),jet->index()) );
-	    uniqueWeights.emplace_back( uniquefrac );
-	  } else {
-	    if(metSoftClus && !JVT_reject) {
-	      // add fractional contribution
-	      ATH_MSG_VERBOSE("Jet added at const scale");
-	      if (fabs(jet->eta())<2.5 || !(coreSoftClus->source()&MissingETBase::Source::Central)) {
-		softJetLinks.emplace_back( iplink_t(*static_cast<const xAOD::JetContainer*>(jet->container()),jet->index()) );
-		softJetWeights.emplace_back( uniquefrac );
-		metSoftClus->add(opx,opy,opt);
-	      }
-
-	      // Fill a vector with the soft constituents, if one was provided.
-	      // For now, only setting up to work with those corresponding to the jet constituents.
-	      // Can expand if needed.
-	      // This ignores overlap removal.
-	      //
-	      if(softConst) {
-		for(size_t iConst=0; iConst<jet->numConstituents(); ++iConst) {
-		  const IParticle* constit = jet->rawConstituent(iConst);
-		  softConst->push_back(constit);
-		}
-	      }
-	    }
-	  } // hard jet or CST
-
-	  if(metSoftTrk && (!hardJet || tracksForHardJets)) {
-	    // use jet tracks
-	    // remove any tracks already used by other objects
-	    MissingETBase::Types::constvec_t trkvec = assoc->overlapTrkVec(helper);
-	    MissingETBase::Types::constvec_t jettrkvec = assoc->jetTrkVec();
-	    if(jettrkvec.ce()>1e-9) {
-	      jpx = jettrkvec.cpx();
-	      jpy = jettrkvec.cpy();
-	      jpt = jettrkvec.sumpt();
-	      jettrkvec -= trkvec;
-	      opx = jettrkvec.cpx();
-	      opy = jettrkvec.cpy();
-	      opt = jettrkvec.sumpt();
-	      ATH_MSG_VERBOSE( "Jet track px, py, sumpt = " << jpx << ", " << jpy << ", " << jpt );
-	      ATH_MSG_VERBOSE( "Jet OR px, py, sumpt = " << opx << ", " << opy << ", " << opt );
-	    } else {
-	      opx = opy = opt = 0;
-	      ATH_MSG_VERBOSE( "This jet has no associated tracks" );
-	    }
-	    if (hardJet) metJet->add(opx,opy,opt);
-	    else if (fabs(jet->eta())<2.5 || !(coreSoftTrk->source()&MissingETBase::Source::Central)) {
-	      metSoftTrk->add(opx,opy,opt);
-	      // Don't need to add if already done for softclus.
-	      if(!metSoftClus) {
-		softJetLinks.emplace_back( iplink_t(*static_cast<const xAOD::JetContainer*>(jet->container()),jet->index()) );
-		softJetWeights.emplace_back( uniquefrac );
-	      }
-
-	      // Fill a vector with the soft constituents, if one was provided.
-	      // For now, only setting up to work with those corresponding to the jet constituents.
-	      // Can expand if needed.
-	      // This ignores overlap removal.
-	      //
-	      if(softConst && !m_doPFlow && !m_doSoftTruth) {
-		std::vector<const IParticle*> jettracks;
-		jet->getAssociatedObjects<IParticle>(xAOD::JetAttribute::GhostTrack,jettracks);
-		for(size_t iConst=0; iConst<jettracks.size(); ++iConst) {
-		  const TrackParticle* pTrk = static_cast<const TrackParticle*>(jettracks[iConst]);
-		  if (acceptTrack(pTrk,pv)) softConst->push_back(pTrk);
-		}
-	      }
-	    }
-	  } // soft track
-
-	} // is not from muon FSR
+        if(m_useGhostMuons) { // for backwards-compatibility
+          if(acc_ghostMuons.isAvailable(*jet)) {
+            for(const auto& el : acc_ghostMuons(*jet)) {
+              if(el.isValid()) {
+                       muons_in_jet.push_back(static_cast<const xAOD::Muon*>(*el));
+              } else {
+                       ATH_MSG_WARNING("Invalid element link to ghost muon! Quitting.");
+                       return StatusCode::FAILURE;
+              }
+            }
+          } else {
+            ATH_MSG_WARNING("Ghost muons requested but not found!");
+            return StatusCode::FAILURE;
+          }
+        }
+        for(const auto& obj : assoc->objects()) {
+          if (!obj) { continue; }
+          if(obj->type()==xAOD::Type::Muon && !m_useGhostMuons) {
+            const xAOD::Muon* mu_test(static_cast<const xAOD::Muon*>(obj));
+            ATH_MSG_VERBOSE("Muon " << mu_test->index() << " found in jet " << jet->index());
+            if((m_doRemoveMuonJets || m_doSetMuonJetEMScale)) {
+              if(acc_originalObject.isAvailable(*mu_test)) mu_test = static_cast<const xAOD::Muon*>(*acc_originalObject(*mu_test));
+              if(MissingETComposition::objSelected(helper,mu_test)) { // 
+                muons_in_jet.push_back(mu_test);                
+                ATH_MSG_VERBOSE("Muon is selected by MET.");
+              }
+            }
+          } else if(obj->type()==xAOD::Type::Electron && m_doRemoveElecTrks) {
+            const xAOD::Electron* el_test(static_cast<const xAOD::Electron*>(obj));
+            ATH_MSG_VERBOSE("Electron " << el_test->index() << " found in jet " << jet->index());
+            if(acc_originalObject.isAvailable(*el_test)) el_test = static_cast<const xAOD::Electron*>(*acc_originalObject(*el_test));
+            if(helper->objSelected(assoc,el_test)){
+              if(el_test->pt()>90.0e3) { // only worry about high-pt electrons?
+                electrons_in_jet.push_back(el_test);
+                ATH_MSG_VERBOSE("High-pt electron is selected by MET.");
+              }
+            }
+          }
+        }
+        if(m_doRemoveElecTrks) {
+          MissingETBase::Types::constvec_t initialTrkMom = assoc->jetTrkVec();
+          float jet_ORtrk_sumpt = assoc->overlapTrkVec(helper).sumpt();
+          float jet_all_trk_pt =  initialTrkMom.sumpt();
+          float jet_unique_trk_pt = jet_all_trk_pt - jet_ORtrk_sumpt;
+          MissingETBase::Types::constvec_t el_calvec;
+          MissingETBase::Types::constvec_t el_trkvec;
+          for(const auto& elec : electrons_in_jet) {
+              el_calvec += assoc->calVec(elec);
+              el_trkvec += assoc->trkVec(elec);
+          }
+          float el_cal_pt = el_calvec.cpt();
+          float el_trk_pt = el_trkvec.cpt();
+          ATH_MSG_VERBOSE("Elec trk: " << el_trk_pt
+                          << " jetalltrk: " << jet_all_trk_pt
+                          << " jetORtrk: " << jet_ORtrk_sumpt
+                          << " electrk-jetORtrk: " << (el_trk_pt-jet_ORtrk_sumpt)
+                          << " elec cal: " << el_cal_pt
+                          << " jetalltrk-electrk: " << (jet_all_trk_pt-el_trk_pt)
+                          << " jetalltrk-jetORtrk: " << (jet_all_trk_pt-jet_ORtrk_sumpt) );
+          // Want to use the jet calo measurement if we had at least one electron
+          // and the jet has a lot of residual track pt
+          // Is the cut appropriate?
+          if(el_trk_pt>1e-9 && jet_unique_trk_pt>10.0e3) passJetForEl=true;
+        } // end ele-track removal
+
+        for(const xAOD::Muon* mu_in_jet : muons_in_jet) {
+          float mu_Eloss = acc_Eloss(*mu_in_jet);
+
+          if(!JVT_reject && mu_in_jet) {
+            if (m_doRemoveMuonJets) {
+              // need to investigate how this is affected by the recording of muon clusters in the map
+              float mu_id_pt = mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) ? mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle)->pt() : 0.;
+              float jet_trk_sumpt = acc_trksumpt.isAvailable(*jet) && this->getPV() ? acc_trksumpt(*jet)[this->getPV()->index()] : 0.;
+
+              // missed the muon, so we should add it back
+              if(0.9999*mu_id_pt>jet_trk_sumpt)
+                jet_trk_sumpt+=mu_id_pt;
+              float jet_trk_N = acc_trkN.isAvailable(*jet) && this->getPV() ? acc_trkN(*jet)[this->getPV()->index()] : 0.;
+              ATH_MSG_VERBOSE("Muon has ID pt " << mu_id_pt);
+              ATH_MSG_VERBOSE("Jet has pt " << jet->pt() << ", trk sumpt " << jet_trk_sumpt << ", trk N " << jet_trk_N);
+              bool jet_from_muon = mu_id_pt>1e-9 && jet_trk_sumpt>1e-9 && (jet->pt()/mu_id_pt < 2 && mu_id_pt/jet_trk_sumpt>0.8) && jet_trk_N<5;
+              if(jet_from_muon) {
+                ATH_MSG_VERBOSE("Jet is from muon -- remove.");
+                JVT_reject = true;
+              }
+            }
+
+            if (m_doSetMuonJetEMScale) {
+              // need to investigate how this is affected by the recording of muon clusters in the map
+              float mu_id_pt = mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) ? mu_in_jet->trackParticle(xAOD::Muon::InnerDetectorTrackParticle)->pt() : 0.;
+              float jet_trk_sumpt = acc_trksumpt.isAvailable(*jet) && this->getPV() ? acc_trksumpt(*jet)[this->getPV()->index()] : 0.;
+              // missed the muon, so we should add it back
+              if(0.9999*mu_id_pt>jet_trk_sumpt)
+                jet_trk_sumpt+=mu_id_pt;
+              float jet_trk_N = acc_trkN.isAvailable(*jet) && this->getPV() ? acc_trkN(*jet)[this->getPV()->index()] : 0.;
+
+              float jet_psE = 0.;
+              if (acc_psf.isAvailable(*jet)){
+                jet_psE = acc_psf(*jet);
+              } else if (acc_sampleE.isAvailable(*jet)){
+                jet_psE = acc_sampleE(*jet)[0] + acc_sampleE(*jet)[4];
+              } else {
+                ATH_MSG_ERROR("Jet PS fraction or sampling energy must be available to calculate MET with doSetMuonJetEMScale");
+                return StatusCode::FAILURE;
+              }
+
+              bool jet_from_muon = jet_trk_sumpt>1e-9 && jet_trk_N<3 && mu_id_pt / jet_trk_sumpt > 0.8 && acc_emf(*jet)>0.9 && acc_width(*jet)<0.1 && jet_psE>2500;
+              ATH_MSG_VERBOSE("Muon has ID pt " << mu_id_pt);
+              ATH_MSG_VERBOSE("Jet has trk sumpt " << jet_trk_sumpt << ", trk N " << jet_trk_N << ", PS E " << jet_psE << ", width " << acc_width(*jet) << ", emfrac " << acc_emf(*jet));
+
+              if(jet_from_muon) {
+                ATH_MSG_VERBOSE("Jet is from muon -- set to EM scale and subtract Eloss.");
+                // Using constjet now because we focus on AntiKt4EMTopo.
+                // Probably not a massive difference to LC, but PF needs some consideration
+                ATH_MSG_VERBOSE("Jet e: " << constjet.E() << ", mu Eloss: " << mu_Eloss);
+                float elosscorr = mu_Eloss >= constjet.e() ? 0. : 1.-mu_Eloss/constjet.e();
+                // Effectively, take the unique fraction of the jet times the eloss-corrected fraction
+                // This might in some cases oversubtract, but should err on the side of undercounting the jet contribution
+                opx *= elosscorr;
+                opy *= elosscorr;
+                ATH_MSG_VERBOSE(" Jet eloss factor " << elosscorr << ", final pt: " << sqrt(opx*opx+opy*opy));
+                // Don't treat this jet normally. Instead, just add to the Eloss term
+                isMuFSRJet = true;
+              }
+            }
+          } // end muon-jet overlap-removal
+
+          switch(mu_in_jet->energyLossType()) {
+            case xAOD::Muon::Parametrized:
+            case xAOD::Muon::MOP:
+            case xAOD::Muon::Tail:
+            case xAOD::Muon::FSRcandidate:
+            case xAOD::Muon::NotIsolated:
+              // For now don't differentiate the behaviour
+              // Remove the Eloss assuming the parameterised value
+              // The correction is limited to the selected clusters
+              total_eloss += mu_Eloss;
+              muons_selflags |= (1<<assoc->findIndex(mu_in_jet));
+          }
+        }
+        ATH_MSG_VERBOSE("Muon selection flags: " << muons_selflags);
+        ATH_MSG_VERBOSE("Muon total eloss: " << total_eloss);
+
+        MissingETBase::Types::constvec_t mu_calovec;
+        // borrowed from overlapCalVec
+        for(size_t iKey = 0; iKey < assoc->sizeCal(); iKey++) {
+          bool selector = (muons_selflags & assoc->calkey()[iKey]);
+          if(selector) mu_calovec += assoc->calVec(iKey);
+          ATH_MSG_VERBOSE("This key: " << assoc->calkey()[iKey] << ", selector: " << selector);
+        }
+        ATH_MSG_VERBOSE("Mu calovec pt, no Eloss:   " << mu_calovec.cpt());
+        if(m_muEloss) mu_calovec *= std::max(0.,1-(total_eloss/mu_calovec.ce()));
+        ATH_MSG_VERBOSE("Mu calovec pt, with Eloss: " << mu_calovec.cpt());
+
+        // re-add calo components of muons beyond Eloss correction
+        ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT before OR " << jpt);
+        ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT after OR " << sqrt(opx*opx+opy*opy));
+        opx += mu_calovec.cpx();
+        opy += mu_calovec.cpy();
+        double opt = sqrt( opx*opx+opy*opy );
+        ATH_MSG_VERBOSE("Jet " << jet->index() << " const pT diff after OR readding muon clusters " << opt-jpt);
+        double uniquefrac = 1. - (calvec.ce() - mu_calovec.ce()) / constjet.E();
+        ATH_MSG_VERBOSE( "Jet constscale px, py, pt, E = " << jpx << ", " << jpy << ", " << jpt << ", " << constjet.E() );
+        ATH_MSG_VERBOSE( "Jet overlap E = " << calvec.ce() - mu_calovec.ce() );
+        ATH_MSG_VERBOSE( "Jet OR px, py, pt, E = " << opx << ", " << opy << ", " << opt << ", " << constjet.E() - calvec.ce() );
+          
+        if(isMuFSRJet) {
+          if(met_muonEloss) {
+            met_muonEloss->add(opx,opy,opt);
+          } else {
+            ATH_MSG_WARNING("Attempted to apply muon Eloss correction, but corresponding MET term does not exist!");
+            return StatusCode::FAILURE;
+          }
+        } else {
+          if(selected && !JVT_reject) {
+            if(!caloverlap) {
+              // add jet full four-vector
+              hardJet = true;
+              if (!tracksForHardJets) {
+                if(m_doConstJet) {
+                  metJet->add(jpx,jpy,jpt);
+                } else {*metJet += jet;}
+              }
+            } else {
+              // check unique fraction
+              if((uniquefrac>m_jetMinEfrac || passJetForEl) && opt>m_jetMinWeightedPt) {
+                // add jet corrected for overlaps
+                hardJet = true;
+                if(!tracksForHardJets) {
+                  if(m_jetCorrectPhi) {
+                    if (m_doConstJet) metJet->add(opx,opy,opt);
+                    else {
+                      double jesF = jet->pt() / jpt;
+                      metJet->add(opx*jesF,opy*jesF,opt*jesF);
+                    }
+                  } else {
+                    if (m_doConstJet){
+                      metJet->add(uniquefrac*jpx,uniquefrac*jpy,uniquefrac*jpt);
+                    }
+                    else{
+                      if(passJetForEl){
+                        if(m_doRemoveElecTrksEM) metJet->add(opx,opy,opt);
+                        else metJet->add(uniquefrac*jet->px(),uniquefrac*jet->py(),uniquefrac*jet->pt());
+                      }else{
+                        metJet->add(uniquefrac*jet->px(),uniquefrac*jet->py(),uniquefrac*jet->pt());
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }  // hard jet selection
+
+          if(hardJet){
+            ATH_MSG_VERBOSE("Jet added at full scale");
+            uniqueLinks.emplace_back( iplink_t(*static_cast<const IParticleContainer*>(jet->container()),jet->index()) );
+            uniqueWeights.emplace_back( uniquefrac );
+          } else {
+            if(metSoftClus && !JVT_reject) {
+              // add fractional contribution
+              ATH_MSG_VERBOSE("Jet added at const scale");
+              if (fabs(jet->eta())<2.5 || !(coreSoftClus->source()&MissingETBase::Source::Central)) {
+                softJetLinks.emplace_back( iplink_t(*static_cast<const xAOD::JetContainer*>(jet->container()),jet->index()) );
+                softJetWeights.emplace_back( uniquefrac );
+                metSoftClus->add(opx,opy,opt);
+              }
+
+              // Fill a vector with the soft constituents, if one was provided.
+              // For now, only setting up to work with those corresponding to the jet constituents.
+              // Can expand if needed.
+              // This ignores overlap removal.
+              //
+              if(softConst) {
+                for(size_t iConst=0; iConst<jet->numConstituents(); ++iConst) {
+                  const IParticle* constit = jet->rawConstituent(iConst);
+                  softConst->push_back(constit);
+                }
+              }
+            }
+          } // hard jet or CST
+
+          if(metSoftTrk && (!hardJet || tracksForHardJets)) {
+            // use jet tracks
+            // remove any tracks already used by other objects
+            MissingETBase::Types::constvec_t trkvec = assoc->overlapTrkVec(helper);
+            MissingETBase::Types::constvec_t jettrkvec = assoc->jetTrkVec();
+            if(jettrkvec.ce()>1e-9) {
+              jpx = jettrkvec.cpx();
+              jpy = jettrkvec.cpy();
+              jpt = jettrkvec.sumpt();
+              jettrkvec -= trkvec;
+              opx = jettrkvec.cpx();
+              opy = jettrkvec.cpy();
+              opt = jettrkvec.sumpt();
+              ATH_MSG_VERBOSE( "Jet track px, py, sumpt = " << jpx << ", " << jpy << ", " << jpt );
+              ATH_MSG_VERBOSE( "Jet OR px, py, sumpt = " << opx << ", " << opy << ", " << opt );
+            } else {
+              opx = opy = opt = 0;
+              ATH_MSG_VERBOSE( "This jet has no associated tracks" );
+            }
+            if (hardJet) metJet->add(opx,opy,opt);
+            else if (fabs(jet->eta())<2.5 || !(coreSoftTrk->source()&MissingETBase::Source::Central)) {
+              metSoftTrk->add(opx,opy,opt);
+              // Don't need to add if already done for softclus.
+              if(!metSoftClus) {
+                softJetLinks.emplace_back( iplink_t(*static_cast<const xAOD::JetContainer*>(jet->container()),jet->index()) );
+                softJetWeights.emplace_back( uniquefrac );
+              }
+
+              // Fill a vector with the soft constituents, if one was provided.
+              // For now, only setting up to work with those corresponding to the jet constituents.
+              // Can expand if needed.
+              // This ignores overlap removal.
+              //
+              if(softConst && !m_doPFlow && !m_doSoftTruth) {
+                std::vector<const IParticle*> jettracks;
+                jet->getAssociatedObjects<IParticle>(xAOD::JetAttribute::GhostTrack,jettracks);
+                for(size_t iConst=0; iConst<jettracks.size(); ++iConst) {
+                  const TrackParticle* pTrk = static_cast<const TrackParticle*>(jettracks[iConst]);
+                  if (acceptTrack(pTrk,pv)) softConst->push_back(pTrk);
+                }
+              }
+            }
+          } // soft track
+
+        } // is not from muon FSR
       } // association exists
       else {
-	ATH_MSG_WARNING( "Jet without association found!" );
+        ATH_MSG_WARNING( "Jet without association found!" );
       }
     } // jet loop
 
@@ -943,15 +954,15 @@ namespace met {
       // these are recorded in the misc association
       const MissingETAssociation* assoc = map->getMiscAssociation();
       if(assoc) {
-	MissingETBase::Types::constvec_t trkvec = assoc->overlapTrkVec(helper);
-	double opx = trkvec.cpx();
-	double opy = trkvec.cpy();
-	double osumpt = trkvec.sumpt();
-	ATH_MSG_VERBOSE( "Misc track px, py, sumpt = " << opx << ", " << opy << ", " << osumpt );
-	metSoftTrk->add(opx,opy,osumpt);
-	ATH_MSG_VERBOSE("Final soft track mpx " << metSoftTrk->mpx()
-			<< ", mpy " << metSoftTrk->mpy()
-			<< " sumet " << metSoftTrk->sumet());
+        MissingETBase::Types::constvec_t trkvec = assoc->overlapTrkVec(helper);
+        double opx = trkvec.cpx();
+        double opy = trkvec.cpy();
+        double osumpt = trkvec.sumpt();
+        ATH_MSG_VERBOSE( "Misc track px, py, sumpt = " << opx << ", " << opy << ", " << osumpt );
+        metSoftTrk->add(opx,opy,osumpt);
+        ATH_MSG_VERBOSE("Final soft track mpx " << metSoftTrk->mpx()
+                        << ", mpy " << metSoftTrk->mpy()
+                        << " sumet " << metSoftTrk->sumet());
       }
     }
 
@@ -960,59 +971,59 @@ namespace met {
       // these are recorded in the misc association
       const MissingETAssociation* assoc = map->getMiscAssociation();
       if(assoc) {
-	float total_eloss(0.);
-	MissingETBase::Types::bitmask_t muons_selflags(0);
-	MissingETBase::Types::constvec_t calvec = assoc->overlapCalVec(helper);
-	double opx = calvec.cpx();
-	double opy = calvec.cpy();
-	double osumpt = calvec.sumpt();
-	for(const auto& obj : assoc->objects()) {
-	  if (!obj) continue;
-	  if(obj->type()==xAOD::Type::Muon) {
-	    const xAOD::Muon* mu_test(static_cast<const xAOD::Muon*>(obj));
-	    if(acc_originalObject.isAvailable(*mu_test)) mu_test = static_cast<const xAOD::Muon*>(*acc_originalObject(*mu_test));
-	    if(MissingETComposition::objSelected(helper,mu_test)) { // 
-	      float mu_Eloss = acc_Eloss(*mu_test);
-	      switch(mu_test->energyLossType()) {
-	      case xAOD::Muon::Parametrized:
-	      case xAOD::Muon::MOP:
-	      case xAOD::Muon::Tail:
-	      case xAOD::Muon::FSRcandidate:
-	      case xAOD::Muon::NotIsolated:
-		// For now don't differentiate the behaviour
-		// Remove the Eloss assuming the parameterised value
-		// The correction is limited to the selected clusters
-		total_eloss += mu_Eloss;
-		muons_selflags |= (1<<assoc->findIndex(mu_test));
-	      }
-	      ATH_MSG_VERBOSE("Mu index " << mu_test->index());
-	    }
-	  }
-	}
-	ATH_MSG_VERBOSE("Mu selection flags " << muons_selflags);
-	ATH_MSG_VERBOSE("Mu total eloss " << total_eloss);
-
-	MissingETBase::Types::constvec_t mu_calovec;
-	// borrowed from overlapCalVec
-	for(size_t iKey = 0; iKey < assoc->sizeCal(); iKey++) {
-	  bool selector = (muons_selflags & assoc->calkey()[iKey]);
-	  ATH_MSG_VERBOSE("This key: " << assoc->calkey()[iKey] << ", selector: " << selector
-			  << " this calvec E: " << assoc->calVec(iKey).ce());
-	  if(selector) mu_calovec += assoc->calVec(iKey);
-	}
-	if(m_muEloss){
+        float total_eloss(0.);
+        MissingETBase::Types::bitmask_t muons_selflags(0);
+        MissingETBase::Types::constvec_t calvec = assoc->overlapCalVec(helper);
+        double opx = calvec.cpx();
+        double opy = calvec.cpy();
+        double osumpt = calvec.sumpt();
+        for(const auto& obj : assoc->objects()) {
+          if (!obj) continue;
+          if(obj->type()==xAOD::Type::Muon) {
+            const xAOD::Muon* mu_test(static_cast<const xAOD::Muon*>(obj));
+            if(acc_originalObject.isAvailable(*mu_test)) mu_test = static_cast<const xAOD::Muon*>(*acc_originalObject(*mu_test));
+            if(MissingETComposition::objSelected(helper,mu_test)) { // 
+              float mu_Eloss = acc_Eloss(*mu_test);
+              switch(mu_test->energyLossType()) {
+              case xAOD::Muon::Parametrized:
+              case xAOD::Muon::MOP:
+              case xAOD::Muon::Tail:
+              case xAOD::Muon::FSRcandidate:
+              case xAOD::Muon::NotIsolated:
+                // For now don't differentiate the behaviour
+                // Remove the Eloss assuming the parameterised value
+                // The correction is limited to the selected clusters
+                total_eloss += mu_Eloss;
+                muons_selflags |= (1<<assoc->findIndex(mu_test));
+              }
+              ATH_MSG_VERBOSE("Mu index " << mu_test->index());
+            }
+          }
+        }
+        ATH_MSG_VERBOSE("Mu selection flags " << muons_selflags);
+        ATH_MSG_VERBOSE("Mu total eloss " << total_eloss);
+
+        MissingETBase::Types::constvec_t mu_calovec;
+        // borrowed from overlapCalVec
+        for(size_t iKey = 0; iKey < assoc->sizeCal(); iKey++) {
+          bool selector = (muons_selflags & assoc->calkey()[iKey]);
+          ATH_MSG_VERBOSE("This key: " << assoc->calkey()[iKey] << ", selector: " << selector
+                          << " this calvec E: " << assoc->calVec(iKey).ce());
+          if(selector) mu_calovec += assoc->calVec(iKey);
+        }
+        if(m_muEloss){
           mu_calovec *= std::max(0.,1-(total_eloss/mu_calovec.ce()));
-	  opx += mu_calovec.cpx();
-	  opy += mu_calovec.cpy();
-	  osumpt += mu_calovec.sumpt();
-	}
+          opx += mu_calovec.cpx();
+          opy += mu_calovec.cpy();
+          osumpt += mu_calovec.sumpt();
+        }
         ATH_MSG_VERBOSE("Mu cluster sumpt " << mu_calovec.sumpt());
 
-	ATH_MSG_VERBOSE( "Misc cluster px, py, sumpt = " << opx << ", " << opy << ", " << osumpt );
-	metSoftClus->add(opx,opy,osumpt);
-	ATH_MSG_VERBOSE("Final soft cluster mpx " << metSoftClus->mpx()
-			<< ", mpy " << metSoftClus->mpy()
-			<< " sumet " << metSoftClus->sumet());
+        ATH_MSG_VERBOSE( "Misc cluster px, py, sumpt = " << opx << ", " << opy << ", " << osumpt );
+        metSoftClus->add(opx,opy,osumpt);
+        ATH_MSG_VERBOSE("Final soft cluster mpx " << metSoftClus->mpx()
+                        << ", mpy " << metSoftClus->mpy()
+                        << " sumet " << metSoftClus->sumet());
       }
     }
 
@@ -1020,19 +1031,19 @@ namespace met {
   }
 
   StatusCode METMaker::rebuildTrackMET(xAOD::MissingET* metJet,
-				       const xAOD::JetContainer* jets,
-				       xAOD::MissingETAssociationHelper* helper,
-				       xAOD::MissingET* metSoftTrk,
-				       const xAOD::MissingET* coreSoftTrk,
-				       bool doJetJVT) {
+                                       const xAOD::JetContainer* jets,
+                                       xAOD::MissingETAssociationHelper* helper,
+                                       xAOD::MissingET* metSoftTrk,
+                                       const xAOD::MissingET* coreSoftTrk,
+                                       bool doJetJVT) {
     return rebuildJetMET(metJet,jets,helper,NULL,NULL,metSoftTrk,coreSoftTrk,doJetJVT,true);
   }
 
   // **** Remove objects and any overlaps from MET calculation ****
 
   StatusCode METMaker::markInvisible(const xAOD::IParticleContainer* collection,
-				     xAOD::MissingETAssociationHelper* helper,
-				     xAOD::MissingETContainer* metCont)
+                                     xAOD::MissingETAssociationHelper* helper,
+                                     xAOD::MissingETContainer* metCont)
   {
 
     MissingET* met = nullptr;
@@ -1047,8 +1058,8 @@ namespace met {
   // **** Sum up MET terms ****
 
   StatusCode METMaker::buildMETSum(const std::string& totalName,
-				   xAOD::MissingETContainer* metCont,
-				   MissingETBase::Types::bitmask_t softTermsSource)
+                                   xAOD::MissingETContainer* metCont,
+                                   MissingETBase::Types::bitmask_t softTermsSource)
   {
     ATH_MSG_DEBUG("Build MET total: " << totalName);
 
@@ -1062,16 +1073,16 @@ namespace met {
       if(MissingETBase::Source::isTotalTerm(met->source())) continue;
       if(met->source()==invisSource) continue;
       if(softTermsSource && MissingETBase::Source::isSoftTerm(met->source())) {
-	if(!MissingETBase::Source::hasPattern(met->source(),softTermsSource)) continue;
+        if(!MissingETBase::Source::hasPattern(met->source(),softTermsSource)) continue;
       }
       ATH_MSG_VERBOSE("Add MET term " << met->name() );
       *metFinal += *met;
     }
 
     ATH_MSG_DEBUG( "Rebuilt MET Final --"
-		   << " mpx: " << metFinal->mpx()
-		   << " mpy: " << metFinal->mpy()
-		   );
+                   << " mpx: " << metFinal->mpx()
+                   << " mpy: " << metFinal->mpy()
+                   );
 
     return StatusCode::SUCCESS;
   }
@@ -1079,9 +1090,9 @@ namespace met {
   //this is used to not create a private store
   //it puts the given new MET object into the container
   StatusCode METMaker::fillMET(xAOD::MissingET *& met,
-			       xAOD::MissingETContainer * metCont,
-			       const std::string& metKey,
-			       const MissingETBase::Types::bitmask_t metSource){
+                               xAOD::MissingETContainer * metCont,
+                               const std::string& metKey,
+                               const MissingETBase::Types::bitmask_t metSource){
     if(met != nullptr){
       ATH_MSG_ERROR("You can't fill a filled MET value");
       return StatusCode::FAILURE;
@@ -1124,7 +1135,7 @@ namespace met {
 
       for(const auto& vx : *h_PV) {
 
-	       if(vx->vertexType()==xAOD::VxType::PriVtx) {
+         if(vx->vertexType()==xAOD::VxType::PriVtx) {
 
            pv = vx; break;
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
index 9db1e8a4c6641c63465f6361c82f9d4a8ee64e37..eefb5bf3a6d6b8dfa2e3d64abc52c7d948f1d579 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedFitTools.py
@@ -45,6 +45,8 @@ def iPatFitter( name='iPatFitter', **kwargs):
     kwargs.setdefault("AggregateMaterial",True)
     kwargs.setdefault("FullCombinedFit", True )
     kwargs.setdefault("MaterialAllocator",getPublicTool("MuidMaterialAllocator"))
+    from InDetRecExample import TrackingCommon
+    kwargs.setdefault("SolenoidalIntersector",TrackingCommon.getSolenoidalIntersector())
     if TriggerFlags.MuonSlice.doTrigMuonConfig:
         kwargs.setdefault("MaxIterations", 15)
     else:
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py
index 0f56381a9df448391329c7fad48b3d273c491612..130a273041e9010a1732ed6186abc74abf5756f5 100644
--- a/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RDOtoRDOtrigger.py
@@ -261,7 +261,8 @@ StreamRDO.ItemList +=["2721#*"]
 StreamRDO.ItemList +=["2927#*"]
 StreamRDO.ItemList +=["2934#*"]
 StreamRDO.ItemList += [ "xAOD::EventInfo#*", "xAOD::EventAuxInfo#*" ]
-if not hasattr( topSequence, "LumiBlockMuWriter" ):
+condSeq = AthSequencer("AthCondSeq")
+if not hasattr( condSeq, "LumiBlockMuWriter" ):
     include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
 
 rec.OutputFileNameForRecoStep="RDOtoRDO_TRIG"
diff --git a/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx b/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx
index 1a33a721264fbff34f31620da7685e37f5fa3bc6..7cac5c16162bf9dbc8672d1cda0d2ec5abe4a4bb 100644
--- a/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx
+++ b/Reconstruction/egamma/egammaValidation/src/TruthElectronHistograms.cxx
@@ -18,7 +18,7 @@ StatusCode TruthElectronHistograms::initializePlots() {
   histoMap["deltaPhiRescaled2"] = new TH1D(Form("%s_%s",m_name.c_str(),"deltaPhiRescaled2"), ";deltaPhi2; Events", 20, -0.04, 0.04);
 
   histoMap["d0Oversigmad0"] = new TH1D(Form("%s_%s",m_name.c_str(),"d0Oversigmad0"), "; d0Oversigmad0; Events", 20, -10, 10);
-  histoMap["qOverp_resolution"] = new TH1D(Form("%s_%s",m_name.c_str(),"qOverp_resolution"), ";(q/P reco - q/P truth)/ q/p truth; Events", 20, -2, 2);
+  histoMap["qOverp_resolution"] = new TH1D(Form("%s_%s",m_name.c_str(),"qOverp_resolution"), ";(q/P reco - q/P truth)/ q/p truth; Events", 60, -1, 1.5);
 
 
   ATH_CHECK(m_rootHistSvc->regHist(m_folder+"deltaPhi2", histoMap["deltaPhi2"]));
diff --git a/Reconstruction/tauRecTools/Root/TauJetRNNEvaluator.cxx b/Reconstruction/tauRecTools/Root/TauJetRNNEvaluator.cxx
index 7479447354c58b22655bc01dd6bee28ac200af1c..069a006b53ccb0dbe434b86c745b52c4a6cc3529 100644
--- a/Reconstruction/tauRecTools/Root/TauJetRNNEvaluator.cxx
+++ b/Reconstruction/tauRecTools/Root/TauJetRNNEvaluator.cxx
@@ -176,7 +176,6 @@ StatusCode TauJetRNNEvaluator::get_tracks(
 
 StatusCode TauJetRNNEvaluator::get_clusters(
     const xAOD::TauJet &tau, std::vector<const xAOD::CaloCluster *> &out) {
-    std::vector<const xAOD::CaloCluster *> clusters;
 
     const xAOD::Jet *jet_seed = *tau.jetLink();
     if (!jet_seed) {
@@ -184,15 +183,15 @@ StatusCode TauJetRNNEvaluator::get_clusters(
         return StatusCode::FAILURE;
     }
 
-    std::vector<const xAOD::CaloCluster*> clusterList;
-    ATH_CHECK(tauRecTools::GetJetClusterList(jet_seed, clusterList, m_incShowerSubtr));
+    std::vector<const xAOD::CaloCluster*> clusters;
+    ATH_CHECK(tauRecTools::GetJetClusterList(jet_seed, clusters, m_incShowerSubtr));
 
     // remove clusters that do not meet dR requirement
-    auto cItr = clusterList.begin();
-    while( cItr != clusterList.end() ){
+    auto cItr = clusters.begin();
+    while( cItr != clusters.end() ){
       const auto lc_p4 = tau.p4(xAOD::TauJetParameters::DetectorAxis);
       if (lc_p4.DeltaR((*cItr)->p4()) > m_max_cluster_dr) {
-	clusterList.erase(cItr);
+        clusters.erase(cItr);
       }
       else ++cItr;
     }
diff --git a/Simulation/FastShower/FastCaloSim/python/AddNoiseCellBuilderToolConfig.py b/Simulation/FastShower/FastCaloSim/python/AddNoiseCellBuilderToolConfig.py
index 313eaddfef4efff6f5f6a7c3a9b42a6f3fbddecc..8eba5f575fa08ff7244a8245e171338b543d9f53 100644
--- a/Simulation/FastShower/FastCaloSim/python/AddNoiseCellBuilderToolConfig.py
+++ b/Simulation/FastShower/FastCaloSim/python/AddNoiseCellBuilderToolConfig.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # File: FastCaloSim/python/AddNoiseCellBuilderTool.py
 # Created: Aug 2019, sss
@@ -46,5 +46,14 @@ if __name__ == "__main__":
     only = ['AddNoiseCellBuilderTool',
             'CaloNoiseCondAlg-']
     acc1.printCondAlgs(summariseProps=True, onlyComponents = only)
-    print ('ComponentAccumulator:', acc1.popPrivateTools())
+
+    # Print a configurable with properties in sorted order.
+    Configurable = CompFactory.AddNoiseCellBuilderTool.__bases__[0]
+    def sorted_repr (c):
+        if not isinstance(c, Configurable): return str(c)
+        args = [c.name] + ['{}={!r}'.format(item[0], sorted_repr(item[1])) for item in sorted(c._properties.items())]
+        return '{}({})'.format(type(c).__name__, ', '.join(args))
+
+    print ('ComponentAccumulator:', sorted_repr (acc1.popPrivateTools()))
+
     acc1.wasMerged()
diff --git a/Simulation/FastShower/FastCaloSim/share/AddNoiseCellBuilderToolConfigTest_test.ref b/Simulation/FastShower/FastCaloSim/share/AddNoiseCellBuilderToolConfigTest_test.ref
index 148c0a3c8d24bf91a3def1be42e09830951bbb38..6fe049479f1b35f2e1681b42a80682f67135751b 100644
--- a/Simulation/FastShower/FastCaloSim/share/AddNoiseCellBuilderToolConfigTest_test.ref
+++ b/Simulation/FastShower/FastCaloSim/share/AddNoiseCellBuilderToolConfigTest_test.ref
@@ -1,4 +1,4 @@
-Py:Athena            INFO using release [WorkDir-22.0.12] [x86_64-centos7-gcc8-opt] [GaudiConfig2_CA/b8a12fd] -- built on [2020-04-01T1621]
+Py:Athena            INFO using release [WorkDir-22.0.13] [x86_64-centos7-gcc8-opt] [atlas-work3g/1ba9fbe2a95] -- built on [2020-05-11T1708]
 Py:AutoConfigFlags    INFO Obtaining metadata of auto-configuration by peeking into /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root
 Py:MetaReader        INFO Current mode used: peeker
 Py:MetaReader        INFO Current filenames: ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/q221/21.0/v1/myRDO.pool.root']
@@ -10,4 +10,4 @@ Py:TileCablingSvc    INFO Forcing RUN2 (2014-2017) cabling for run 284500 with g
 Py:CaloNoiseToolCfg    INFO Configuring CaloNoiseCondAlg for MC data processing
 Py:CaloNoiseToolCfg    INFO offline mode: use luminosity from /CALO/Ofl/Noise/PileuUpNoiseLumi to scale pileup noise
 Py:ComponentAccumulator    INFO Condition Algorithms
-ComponentAccumulator: AddNoiseCellBuilderTool('AddNoiseCellBuilderTool', NoiseKey='electronicNoise', CaloEstimatedGainTool=CaloEstimatedGainTool('CaloEstimatedGainTool', TileCondIdTransforms=TileCondIdTransforms('TileCondIdTransforms'), TileCondToolNoiseSample=TileCondToolNoiseSample('TileCondToolNoiseSample', TileOnlineSampleNoise='', TileSampleNoise='TileSampleNoise'), ADC2MeVKey='LArADC2MeV', TileCondToolEmscale=TileCondToolEmscale('TileCondToolEmscale', TileEMScale='TileEMScale')))
+ComponentAccumulator: AddNoiseCellBuilderTool(AddNoiseCellBuilderTool, CaloEstimatedGainTool='CaloEstimatedGainTool(CaloEstimatedGainTool, ADC2MeVKey=\'LArADC2MeV\', TileCondIdTransforms=\'TileCondIdTransforms(TileCondIdTransforms)\', TileCondToolEmscale="TileCondToolEmscale(TileCondToolEmscale, TileEMScale=\'TileEMScale\')", TileCondToolNoiseSample="TileCondToolNoiseSample(TileCondToolNoiseSample, TileOnlineSampleNoise=\'\', TileSampleNoise=\'TileSampleNoise\')")', NoiseKey='electronicNoise')
diff --git a/Simulation/G4Utilities/G4DebuggingTools/CMakeLists.txt b/Simulation/G4Utilities/G4DebuggingTools/CMakeLists.txt
index 7cfd1339c881b6cba3c6a4e4a46a94368ff91339..d223876f83dd1770ce0e44775a670ec6ba8b5dbb 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/CMakeLists.txt
+++ b/Simulation/G4Utilities/G4DebuggingTools/CMakeLists.txt
@@ -26,7 +26,7 @@ find_package( XercesC )
 
 # Component(s) in the package:
 atlas_add_library( G4DebuggingHelperLib
-                   src/G4DebuggingHelper.cxx
+                   src/helper/G4DebuggingHelper.cxx
                    PUBLIC_HEADERS G4DebuggingTools
                    INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} )
@@ -35,7 +35,7 @@ atlas_add_component( G4DebuggingTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} GaudiKernel AthenaBaseComps StoreGateLib SGtests EventInfo G4AtlasInterfaces G4AtlasToolsLib MCTruth MCTruthBaseLib SimHelpers )
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${TBB_LIBRARIES} GaudiKernel AthenaBaseComps StoreGateLib SGtests EventInfo G4AtlasInterfaces G4AtlasToolsLib MCTruth MCTruthBaseLib SimHelpers G4DebuggingHelperLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/G4DebuggingHelper.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/helper/G4DebuggingHelper.cxx
similarity index 100%
rename from Simulation/G4Utilities/G4DebuggingTools/src/G4DebuggingHelper.cxx
rename to Simulation/G4Utilities/G4DebuggingTools/src/helper/G4DebuggingHelper.cxx
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt
index c1e6bab44ee6c4fec7dab587032563abad354cf5..3d32cc5359aafde2f78e5027c7c4385ff8aa74fc 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/CMakeLists.txt
@@ -66,7 +66,7 @@ atlas_add_root_dictionary( ISF_FastCaloSimParametrizationLib
                            EXTERNAL_PACKAGES  ROOT HepPDT XercesC CLHEP HepMC Geant4 )
 
 atlas_add_library( ISF_FastCaloSimParametrizationLib
-                   Root/*.cxx src/CaloGeometryFromCaloDDM.cxx src/CaloGeometryLookup.cxx src/CaloGeometry.cxx
+                   Root/*.cxx src/lib/CaloGeometryFromCaloDDM.cxx src/lib/CaloGeometryLookup.cxx src/lib/CaloGeometry.cxx
                    ${ISF_FastCaloSimParametrizationLibDictSource}
                    PUBLIC_HEADERS ISF_FastCaloSimParametrization
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/CaloGeometry.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/lib/CaloGeometry.cxx
similarity index 100%
rename from Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/CaloGeometry.cxx
rename to Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/lib/CaloGeometry.cxx
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/CaloGeometryFromCaloDDM.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/lib/CaloGeometryFromCaloDDM.cxx
similarity index 100%
rename from Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/CaloGeometryFromCaloDDM.cxx
rename to Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/lib/CaloGeometryFromCaloDDM.cxx
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/CaloGeometryLookup.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/lib/CaloGeometryLookup.cxx
similarity index 100%
rename from Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/CaloGeometryLookup.cxx
rename to Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/lib/CaloGeometryLookup.cxx
diff --git a/Simulation/Tests/DigitizationTests/CMakeLists.txt b/Simulation/Tests/DigitizationTests/CMakeLists.txt
index 06c3cf0c96bfd795808d9ab8eec7720b6256fbc2..455235174d1861973b8ecefa7bb9c3a276a22099 100644
--- a/Simulation/Tests/DigitizationTests/CMakeLists.txt
+++ b/Simulation/Tests/DigitizationTests/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
                           PRIVATE
                           Control/AthenaKernel
-                          Event/EventInfo
+                          Event/xAOD/xAODEventInfo
                           Generators/GeneratorObjects
                           InnerDetector/InDetDetDescr/InDetIdentifier
                           InnerDetector/InDetRawEvent/InDetRawData
@@ -26,7 +26,7 @@ atlas_add_component( DigitizationTests
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel AthenaKernel EventInfo GeneratorObjects InDetIdentifier InDetRawData InDetSimData )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel AthenaKernel GeneratorObjects InDetIdentifier InDetRawData InDetSimData xAODEventInfo )
 
 # Install files from the package:
 atlas_install_headers( DigitizationTests )
diff --git a/Simulation/Tests/DigitizationTests/DigitizationTests/EventInfoTest.h b/Simulation/Tests/DigitizationTests/DigitizationTests/EventInfoTest.h
new file mode 100644
index 0000000000000000000000000000000000000000..7bad30f58a5b23b609f618db6dfb42adf1a174f2
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/DigitizationTests/EventInfoTest.h
@@ -0,0 +1,24 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef DIGITIZATIONTESTS_EVENTINFOTEST_H
+#define DIGITIZATIONTESTS_EVENTINFOTEST_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "xAODEventInfo/EventInfo.h"
+
+class EventInfoTest : public AthAlgorithm {
+ public:
+  EventInfoTest(const std::string& name, ISvcLocator* pSvcLocator);
+
+  StatusCode initialize();
+  StatusCode execute();
+
+ private:
+  // SG::ReadHandleKey<xAOD::EventInfo> m_rhkEventInfo;
+  SG::ReadHandleKey<xAOD::EventInfo> m_rhkEventInfo{
+      this, "EventInfoName", "EventInfo", "EventInfo name"};
+};
+
+#endif
diff --git a/Simulation/Tests/DigitizationTests/DigitizationTests/PileUpEventInfoTest.h b/Simulation/Tests/DigitizationTests/DigitizationTests/PileUpEventInfoTest.h
deleted file mode 100644
index ad4453847d8e8a2afc507a12204b648a624a671c..0000000000000000000000000000000000000000
--- a/Simulation/Tests/DigitizationTests/DigitizationTests/PileUpEventInfoTest.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef DIGITIZATIONTESTS_PILEUPEVENTINFOTEST_H
-#define DIGITIZATIONTESTS_PILEUPEVENTINFOTEST_H
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-
-class PileUpEventInfoTest : public AthAlgorithm {
-
-public:
-
-  PileUpEventInfoTest(const std::string& name, ISvcLocator* pSvcLocator);
-
-  StatusCode initialize();
-  StatusCode execute();
-  StringProperty m_pileupInfo;
-};
-
-#endif
diff --git a/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfig.py b/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfig.py
index d9f3d2d69f8a98e9c78e622d855e523d69a00940..08255549d106c5d394867146231c20e28f727651 100644
--- a/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfig.py
+++ b/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfig.py
@@ -1,15 +1,23 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
 
+
 def McEventCollectionTestTool(name="McEventCollectionTestTool", **kwargs):
     return CfgMgr.McEventCollectionTestTool(name, **kwargs)
-def PileUpEventInfoTestTool(name="PileUpEventInfoTestTool", **kwargs):
-    return CfgMgr.PileUpEventInfoTestTool(name, **kwargs)
+
+
+def EventInfoTestTool(name="EventInfoTestTool", **kwargs):
+    return CfgMgr.EventInfoTestTool(name, **kwargs)
+
+
 def PixelRDOsTestTool(name="PixelRDOsTestTool", **kwargs):
     return CfgMgr.PixelRDOsTestTool(name, **kwargs)
+
+
 def SCT_RDOsTestTool(name="SCT_RDOsTestTool", **kwargs):
     return CfgMgr.SCT_RDOsTestTool(name, **kwargs)
+
+
 def TRT_RDOsTestTool(name="TRT_RDOsTestTool", **kwargs):
     return CfgMgr.TRT_RDOsTestTool(name, **kwargs)
-
diff --git a/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfigDb.py b/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfigDb.py
index 3f440b76a0e7e74acf6c926089c3b3b05ea40064..1ab8de5490538ecd9d41e01206ee0af4d8f36dd6 100644
--- a/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfigDb.py
+++ b/Simulation/Tests/DigitizationTests/python/DigitizationTestsConfigDb.py
@@ -1,9 +1,14 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.CfgGetter import addTool
 
-addTool("DigitizationTests.DigitizationTestsConfig.McEventCollectionTestTool", "McEventCollectionTestTool")
-addTool("DigitizationTests.DigitizationTestsConfig.PileUpEventInfoTestTool", "PileUpEventInfoTestTool")
-addTool("DigitizationTests.DigitizationTestsConfig.PixelRDOsTestTool", "PixelRDOsTestTool")
-addTool("DigitizationTests.DigitizationTestsConfig.SCT_RDOsTestTool", "SCT_RDOsTestTool")
-addTool("DigitizationTests.DigitizationTestsConfig.TRT_RDOsTestTool", "TRT_RDOsTestTool")
+addTool("DigitizationTests.DigitizationTestsConfig.McEventCollectionTestTool",
+        "McEventCollectionTestTool")
+addTool("DigitizationTests.DigitizationTestsConfig.EventInfoTestTool",
+        "EventInfoTestTool")
+addTool("DigitizationTests.DigitizationTestsConfig.PixelRDOsTestTool",
+        "PixelRDOsTestTool")
+addTool("DigitizationTests.DigitizationTestsConfig.SCT_RDOsTestTool",
+        "SCT_RDOsTestTool")
+addTool("DigitizationTests.DigitizationTestsConfig.TRT_RDOsTestTool",
+        "TRT_RDOsTestTool")
diff --git a/Simulation/Tests/DigitizationTests/share/postInclude.RDO_Plots.py b/Simulation/Tests/DigitizationTests/share/postInclude.RDO_Plots.py
index 78144701fef699d6959dd193041e86326071dc76..c009af60b1c8b2be5b246130eba842ed3616c9cc 100644
--- a/Simulation/Tests/DigitizationTests/share/postInclude.RDO_Plots.py
+++ b/Simulation/Tests/DigitizationTests/share/postInclude.RDO_Plots.py
@@ -1,22 +1,27 @@
+from DigitizationTests.DigitizationTestsConf import DigiTestAlg, McEventCollectionTestTool, PixelRDOsTestTool, SCT_RDOsTestTool, TRT_RDOsTestTool
+from AthenaCommon import CfgGetter
+from AthenaCommon.AlgSequence import AlgSequence
 from AthenaCommon.AppMgr import ServiceMgr
 from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc("THistSvc")
 #ServiceMgr.THistSvc.Output  = ["atlasTest DATAFILE='atlasTest.muons.histo.root' OPT='RECREATE'"];
-ServiceMgr.THistSvc.Output  = ["truth DATAFILE='RDO_truth.root' OPT='RECREATE'"];
+ServiceMgr.THistSvc.Output = ["truth DATAFILE='RDO_truth.root' OPT='RECREATE'"]
 
-from AthenaCommon.AlgSequence import AlgSequence
 job = AlgSequence()
-from AthenaCommon import CfgGetter
-from DigitizationTests.DigitizationTestsConf import DigiTestAlg,McEventCollectionTestTool,PixelRDOsTestTool,SCT_RDOsTestTool,TRT_RDOsTestTool
 job += DigiTestAlg()
 if DetFlags.Truth_on():
-  job.DigiTestAlg.DigiTestTools += [CfgGetter.getPublicTool("McEventCollectionTestTool", checkType=True)]
+    job.DigiTestAlg.DigiTestTools += [CfgGetter.getPublicTool(
+        "McEventCollectionTestTool", checkType=True)]
 if DetFlags.Truth_on():
-  if DetFlags.pileup.any_on():
-    job.DigiTestAlg.DigiTestTools += [CfgGetter.getPublicTool("PileUpEventInfoTestTool", checkType=True)]
+    if DetFlags.pileup.any_on():
+        job.DigiTestAlg.DigiTestTools += [
+            CfgGetter.getPublicTool("EventInfoTestTool", checkType=True)]
 if DetFlags.pixel_on():
-  job.DigiTestAlg.DigiTestTools += [CfgGetter.getPublicTool("PixelRDOsTestTool", checkType=True)]
+    job.DigiTestAlg.DigiTestTools += [
+        CfgGetter.getPublicTool("PixelRDOsTestTool", checkType=True)]
 if DetFlags.SCT_on():
-  job.DigiTestAlg.DigiTestTools += [CfgGetter.getPublicTool("SCT_RDOsTestTool", checkType=True)]
+    job.DigiTestAlg.DigiTestTools += [
+        CfgGetter.getPublicTool("SCT_RDOsTestTool", checkType=True)]
 if DetFlags.TRT_on():
-  job.DigiTestAlg.DigiTestTools += [CfgGetter.getPublicTool("TRT_RDOsTestTool", checkType=True)]
+    job.DigiTestAlg.DigiTestTools += [
+        CfgGetter.getPublicTool("TRT_RDOsTestTool", checkType=True)]
diff --git a/Simulation/Tests/DigitizationTests/src/EventInfoTest.cxx b/Simulation/Tests/DigitizationTests/src/EventInfoTest.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6457d3aab0249b4cd460d2fe88ba4711d19b702c
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/src/EventInfoTest.cxx
@@ -0,0 +1,65 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "DigitizationTests/EventInfoTest.h"
+
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "AthenaKernel/errorcheck.h"
+
+EventInfoTest::EventInfoTest(const std::string& name, ISvcLocator* pSvcLocator)
+    : AthAlgorithm(name, pSvcLocator) {
+  declareProperty("EventInfoName", m_rhkEventInfo);
+}
+
+StatusCode EventInfoTest::initialize() {
+  ATH_MSG_INFO("Initializing " << name() << " - package version "
+                               << PACKAGE_VERSION);
+  ATH_CHECK(m_rhkEventInfo.initialize());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode EventInfoTest::execute() {
+  SG::ReadHandle<xAOD::EventInfo> pevt(m_rhkEventInfo);
+  if (!pevt.isValid()) {
+    ATH_MSG_ERROR("Could not get xAOD::EventInfo with key "
+                  << m_rhkEventInfo.key());
+    return StatusCode::SUCCESS;
+  }
+
+  ATH_MSG_DEBUG("Successfully retrieved event info as xAOD::EventInfo");
+
+  //+++ Get sub-event info object
+  ATH_MSG_DEBUG("Main Event Info: ");
+  ATH_MSG_INFO("RunNumber = " << pevt->runNumber());
+  ATH_MSG_INFO("Event Number = " << pevt->eventNumber());
+  ATH_MSG_INFO("LumiBlock = " << pevt->lumiBlock());
+  ATH_MSG_INFO("TimeStamp = " << pevt->timeStamp());
+  ATH_MSG_INFO("BCID = " << pevt->bcid());
+  ATH_MSG_INFO("mu = " << pevt->actualInteractionsPerCrossing());
+  ATH_MSG_INFO("<mu> = " << pevt->averageInteractionsPerCrossing());
+
+  ATH_MSG_INFO("xAOD::EventInfo::SubEvent info: ");
+  std::vector<xAOD::EventInfo::SubEvent>::const_iterator it =
+      pevt->subEvents().begin();
+  std::vector<xAOD::EventInfo::SubEvent>::const_iterator end =
+      pevt->subEvents().end();
+  if (it == end) ATH_MSG_INFO("No xAOD::EventInfo::SubEvent found");
+  for (auto sevt : pevt->subEvents()) {
+    if (sevt.ptr() != NULL) {
+      ATH_MSG_INFO("SubEvent info:");
+      ATH_MSG_INFO("  Time         : "
+                   << (*it).time() << endmsg
+                   << "  Index        : " << (*it).index() << endmsg
+                   << "  Run Number   : " << sevt.ptr()->runNumber() << endmsg
+                   << "  Event Number : " << sevt.ptr()->eventNumber() << endmsg
+                   << "  ns Offset    : " << sevt.ptr()->timeStampNSOffset()
+                   << endmsg << "  Lumi Block   : " << sevt.ptr()->lumiBlock()
+                   << endmsg << "  BCID         : " << sevt.ptr()->bcid()
+                   << endmsg << "  PileUpType   : " << (*it).type());
+      ++it;
+    } else
+      ATH_MSG_INFO("xAOD::EventInfo::SubEvent is null");
+  }
+  return StatusCode::SUCCESS;
+}
diff --git a/Simulation/Tests/DigitizationTests/src/EventInfoTestTool.cxx b/Simulation/Tests/DigitizationTests/src/EventInfoTestTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..59fcf8c3e0b3c1c8459b8df7e624fe3fe38ddc0a
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/src/EventInfoTestTool.cxx
@@ -0,0 +1,70 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "EventInfoTestTool.h"
+
+#include "AthenaBaseComps/AthMsgStreamMacros.h"
+#include "AthenaKernel/errorcheck.h"
+
+EventInfoTestTool::EventInfoTestTool(const std::string& type,
+                                     const std::string& name,
+                                     const IInterface* parent)
+    : DigiTestToolBase(type, name, parent) {
+  declareProperty("EventInfoName", m_rhkEventInfo);
+}
+
+StatusCode EventInfoTestTool::initialize() {
+  ATH_MSG_INFO("Initializing " << name() << " - package version "
+                               << PACKAGE_VERSION);
+  ATH_CHECK(m_rhkEventInfo.initialize());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode EventInfoTestTool::processEvent() {
+  SG::ReadHandle<xAOD::EventInfo> pevt(m_rhkEventInfo);
+  if (!pevt.isValid()) {
+    ATH_MSG_ERROR("Could not get xAOD::EventInfo with key "
+                  << m_rhkEventInfo.key());
+    return StatusCode::SUCCESS;
+  }
+
+  ATH_MSG_DEBUG("Successfully retrieved event info as xAOD::EventInfo");
+
+  //+++ Get sub-event info object
+  ATH_MSG_DEBUG("Main Event Info: ");
+  ATH_MSG_INFO("RunNumber = " << pevt->runNumber());
+  ATH_MSG_INFO("Event Number = " << pevt->eventNumber());
+  ATH_MSG_INFO("LumiBlock = " << pevt->lumiBlock());
+  ATH_MSG_INFO("TimeStamp = " << pevt->timeStamp());
+  ATH_MSG_INFO("BCID = " << pevt->bcid());
+  ATH_MSG_INFO("mu = " << pevt->actualInteractionsPerCrossing());
+  ATH_MSG_INFO("<mu> = " << pevt->averageInteractionsPerCrossing());
+
+  ATH_MSG_INFO("xAOD::EventInfo::SubEvent info: ");
+  std::vector<xAOD::EventInfo::SubEvent>::const_iterator it =
+      pevt->subEvents().begin();
+  std::vector<xAOD::EventInfo::SubEvent>::const_iterator end =
+      pevt->subEvents().end();
+  if (it == end) ATH_MSG_INFO("No xAOD::EventInfo::SubEvent found");
+  for (auto sevt : pevt->subEvents()) {
+    if (sevt.ptr() != NULL) {
+      ATH_MSG_INFO("SubEvent info:");
+      ATH_MSG_INFO("  Time         : "
+                   << (*it).time() << endmsg
+                   << "  Index        : " << (*it).index() << endmsg
+                   << "  Run Number   : " << sevt.ptr()->runNumber() << endmsg
+                   << "  Event Number : " << sevt.ptr()->eventNumber() << endmsg
+                   << "  ns Offset    : " << sevt.ptr()->timeStampNSOffset()
+                   << endmsg << "  Lumi Block   : " << sevt.ptr()->lumiBlock()
+                   << endmsg << "  BCID         : " << sevt.ptr()->bcid()
+                   << endmsg << "  PileUpType   : " << (*it).type());
+      ++it;
+    } else
+      ATH_MSG_INFO("xAOD::EventInfo::SubEvent is null");
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode EventInfoTestTool::finalize() { return StatusCode::SUCCESS; }
diff --git a/Simulation/Tests/DigitizationTests/src/EventInfoTestTool.h b/Simulation/Tests/DigitizationTests/src/EventInfoTestTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..014a713f55e1c8e531676c92b2fb1531104a5b18
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/src/EventInfoTestTool.h
@@ -0,0 +1,27 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4AT_EVENTINFOTESTTOOL
+#define G4AT_EVENTINFOTESTTOOL
+
+#include "DigiTestToolBase.h"
+#include "xAODEventInfo/EventInfo.h"
+
+class EventInfoTestTool : public DigiTestToolBase {
+ public:
+  EventInfoTestTool(const std::string& name, const std::string& type,
+                    const IInterface* parent);
+
+  StatusCode initialize();
+
+  StatusCode processEvent();
+
+  StatusCode finalize();
+
+ private:
+  SG::ReadHandleKey<xAOD::EventInfo> m_rhkEventInfo{
+      this, "EventInfoName", "EventInfo", "EventInfo name"};
+};
+
+#endif
diff --git a/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTest.cxx b/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTest.cxx
deleted file mode 100644
index 8988f89fd5b9358657fbe82703382932c0462dd7..0000000000000000000000000000000000000000
--- a/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTest.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "DigitizationTests/PileUpEventInfoTest.h"
-
-#include "EventInfo/PileUpEventInfo.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-#include "EventInfo/PileUpTimeEventIndex.h"
-#include "EventInfo/EventType.h"
-
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-#include "AthenaKernel/errorcheck.h"
-PileUpEventInfoTest::PileUpEventInfoTest(const std::string& name, ISvcLocator* pSvcLocator)
-  : AthAlgorithm(name, pSvcLocator),
-    m_pileupInfo("McEventInfo")
-{
-  declareProperty("EventInfoName", m_pileupInfo);
-}
-
-
-StatusCode PileUpEventInfoTest::initialize()
-{
-  ATH_MSG_INFO ( "Initializing " << name() << " - package version " << PACKAGE_VERSION );
-  return StatusCode::SUCCESS;
-}
-
-
-StatusCode PileUpEventInfoTest::execute()
-{
-  const PileUpEventInfo* pevt = 0;
-  if ( evtStore()->retrieve(pevt, m_pileupInfo.value()).isFailure() ) {
-    ATH_MSG_ERROR ( "** Could not get pileup event info" );
-    return StatusCode::SUCCESS;
-  }
-  else {
-    ATH_MSG_DEBUG ( "Pileup Info Retrieved Successfully as 'PileUpEventInfo' Object " );
-    //+++ Get sub-event info object
-    const EventID *eventid = pevt->event_ID();
-    ATH_MSG_DEBUG ( "Main Event Info: " );
-    ATH_MSG_INFO ( "RunNumber = " << eventid->run_number() );
-    ATH_MSG_INFO ( "Event Number = " << eventid->event_number() );
-    ATH_MSG_INFO ( "LumiBlock = " << eventid->lumi_block() );
-    ATH_MSG_INFO ( "TimeStamp = " << eventid->time_stamp() );
-    ATH_MSG_INFO ( "BCID = " << eventid->bunch_crossing_id() );
-    ATH_MSG_INFO ( "mu = " << pevt->actualInteractionsPerCrossing() );
-    ATH_MSG_INFO ( "<mu> = " << pevt->averageInteractionsPerCrossing() );
-
-    ATH_MSG_INFO ( "Sub Event Infos: " );
-    PileUpEventInfo::SubEvent::const_iterator it  = pevt->beginSubEvt();
-    PileUpEventInfo::SubEvent::const_iterator end = pevt->endSubEvt();
-    if (it == end) ATH_MSG_INFO ( "None found" );
-    for (; it != end; ++it) {
-      const EventInfo* sevt = (*it).pSubEvt;
-      if (sevt!=NULL) {
-        ATH_MSG_INFO ( "Sub Event Info:" );
-        ATH_MSG_INFO ( "  Time         : " << (*it).time()                             << endmsg
-                       << "  Index        : " << (*it).index()                            << endmsg
-                       << "  Provenance   : " << (*it).type()                        << endmsg // This is the provenance stuff: signal, minbias, cavern, etc
-                        << "  Run Number   : " << sevt->event_ID()->run_number()           << endmsg
-                        << "  Event Number : " << sevt->event_ID()->event_number()         << endmsg
-                        << "  ns Offset    : " << sevt->event_ID()->time_stamp_ns_offset() << endmsg
-                        << "  Lumi Block   : " << sevt->event_ID()->lumi_block()           << endmsg
-                        << "  BCID         : " << sevt->event_ID()->bunch_crossing_id()    << endmsg
-                        << "  User Type    : " << sevt->event_type()->user_type()          );
-        // if ((*it).time() == 0) {
-        //   NInTimeEvents++;
-        //   if ((*it).index() > 0) NInTimePileup++;
-        // }
-      }
-      else ATH_MSG_INFO ( "Subevent is null ptr " );
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
diff --git a/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTestTool.cxx b/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTestTool.cxx
deleted file mode 100644
index 0ded0d32a81bffc8272847ffc105304f07f9ed8a..0000000000000000000000000000000000000000
--- a/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTestTool.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include "PileUpEventInfoTestTool.h"
-
-#include "EventInfo/PileUpEventInfo.h"
-#include "EventInfo/EventInfo.h"
-#include "EventInfo/EventID.h"
-#include "EventInfo/PileUpTimeEventIndex.h"
-#include "EventInfo/EventType.h"
-
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-#include "AthenaKernel/errorcheck.h"
-
-PileUpEventInfoTestTool::PileUpEventInfoTestTool(const std::string& type,
-                                                     const std::string& name,
-                                                     const IInterface* parent)
-  : DigiTestToolBase(type, name, parent),
-    //m_numberOfEventsSelected(0),
-    //m_collection("TruthEvent"), //("GEN_EVENT"),
-    m_pileupInfo("McEventInfo")
-{
-  declareProperty("PileUpEventInfoName", m_pileupInfo);
-}
-
-StatusCode PileUpEventInfoTestTool::initialize()
-{
-  ATH_MSG_INFO ( "Initializing " << name() << " - package version " << PACKAGE_VERSION );
-  return StatusCode::SUCCESS;
-}
-
-StatusCode PileUpEventInfoTestTool::processEvent() {
-
-  const PileUpEventInfo* pevt;
-  if ( evtStore()->retrieve(pevt, m_pileupInfo.value()).isFailure() ) {
-    ATH_MSG_ERROR ( "** Could not get pileup event info" );
-    return StatusCode::SUCCESS;
-  }
-	      
-
-  ATH_MSG_DEBUG ( "Pileup Info Retrieved Successfully as 'PileUpEventInfo' Object " );
-  //+++ Get sub-event info object
-  const EventID *eventid = pevt->event_ID();
-  ATH_MSG_DEBUG ( "Main Event Info: " );
-  ATH_MSG_INFO ( "RunNumber = " << eventid->run_number() );
-  ATH_MSG_INFO ( "Event Number = " << eventid->event_number() );
-  ATH_MSG_INFO ( "LumiBlock = " << eventid->lumi_block() );
-  ATH_MSG_INFO ( "TimeStamp = " << eventid->time_stamp() );
-  ATH_MSG_INFO ( "BCID = " << eventid->bunch_crossing_id() );
-  ATH_MSG_INFO ( "mu = " << pevt->actualInteractionsPerCrossing() );
-  ATH_MSG_INFO ( "<mu> = " << pevt->averageInteractionsPerCrossing() );
-
-  ATH_MSG_INFO ( "Sub Event Infos: " );
-  PileUpEventInfo::SubEvent::const_iterator it  = pevt->beginSubEvt();
-  PileUpEventInfo::SubEvent::const_iterator end = pevt->endSubEvt();
-  if (it == end) ATH_MSG_INFO ( "None found" );
-  for (; it != end; ++it) {
-    const EventInfo* sevt = (*it).pSubEvt;
-    if (sevt!=NULL) {
-      ATH_MSG_INFO ( "Sub Event Info:" );
-      ATH_MSG_INFO ( "  Time         : " << (*it).time()                             << endmsg
-		     << "  Index        : " << (*it).index()                            << endmsg
-		     << "  Provenance   : " << (*it).type()                        << endmsg // This is the provenance stuff: signal, minbias, cavern, etc
-		     << "  Run Number   : " << sevt->event_ID()->run_number()           << endmsg
-		     << "  Event Number : " << sevt->event_ID()->event_number()         << endmsg
-		     << "  ns Offset    : " << sevt->event_ID()->time_stamp_ns_offset() << endmsg
-		     << "  Lumi Block   : " << sevt->event_ID()->lumi_block()           << endmsg
-		     << "  BCID         : " << sevt->event_ID()->bunch_crossing_id()    << endmsg
-		     << "  User Type    : " << sevt->event_type()->user_type()          );
-      // if ((*it).time() == 0) {
-      //   NInTimeEvents++;
-      //   if ((*it).index() > 0) NInTimePileup++;
-      // }
-    }
-    else ATH_MSG_INFO ( "Subevent is null ptr " );
-  }
-
-  
-  return StatusCode::SUCCESS;
-}
-
-StatusCode PileUpEventInfoTestTool::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
diff --git a/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTestTool.h b/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTestTool.h
deleted file mode 100644
index 9615965b257f9afa4e6b3bd115388e6790f818af..0000000000000000000000000000000000000000
--- a/Simulation/Tests/DigitizationTests/src/PileUpEventInfoTestTool.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4AT_PILEUPEVENTINFOTESTTOOL
-#define G4AT_PILEUPEVENTINFOTESTTOOL
-
-#include "DigiTestToolBase.h"
-
-class PixelID;
-
-class PileUpEventInfoTestTool : public DigiTestToolBase {
-
- public:
-
-  PileUpEventInfoTestTool(const std::string& name,
-                            const std::string& type,
-                            const IInterface* parent);
-
-  StatusCode initialize();
-
-  StatusCode processEvent();
-
-  StatusCode finalize();
-
- private:
-
-  StringProperty m_pileupInfo;
-
-};
-
-#endif
diff --git a/Simulation/Tests/DigitizationTests/src/components/DigitizationTests_entries.cxx b/Simulation/Tests/DigitizationTests/src/components/DigitizationTests_entries.cxx
index 4586a77e4294bc8ac4c6dd41b7271c2dfd34e819..4bb919fcc93ebc2f769694b44aad2c8f60b54899 100644
--- a/Simulation/Tests/DigitizationTests/src/components/DigitizationTests_entries.cxx
+++ b/Simulation/Tests/DigitizationTests/src/components/DigitizationTests_entries.cxx
@@ -1,17 +1,13 @@
-#include "DigitizationTests/DigiTestAlg.h"
-//#include "DigitizationTests/PileUpEventInfoTest.h"
+#include "../EventInfoTestTool.h"
 #include "../McEventCollectionTestTool.h"
-#include "../PileUpEventInfoTestTool.h"
 #include "../PixelRDOsTestTool.h"
 #include "../SCT_RDOsTestTool.h"
 #include "../TRT_RDOsTestTool.h"
+#include "DigitizationTests/DigiTestAlg.h"
 
-
-DECLARE_COMPONENT( McEventCollectionTestTool )
-DECLARE_COMPONENT( PileUpEventInfoTestTool )
-DECLARE_COMPONENT( PixelRDOsTestTool )
-DECLARE_COMPONENT( SCT_RDOsTestTool )
-DECLARE_COMPONENT( TRT_RDOsTestTool )
-DECLARE_COMPONENT( DigiTestAlg )
-//DECLARE_COMPONENT( PileUpEventInfoTest )
-
+DECLARE_COMPONENT(McEventCollectionTestTool)
+DECLARE_COMPONENT(EventInfoTestTool)
+DECLARE_COMPONENT(PixelRDOsTestTool)
+DECLARE_COMPONENT(SCT_RDOsTestTool)
+DECLARE_COMPONENT(TRT_RDOsTestTool)
+DECLARE_COMPONENT(DigiTestAlg)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
index 8c7be171527cee64d989818d399c202123587f4a..e41cd2b3931a0cb23b7985cfd600c1c07cd594fe 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
@@ -119,7 +119,7 @@ class TileBchMgr(TileCalibLogger):
                             self.__oldStat[self.__getAdcIdx(ros,mod,chn,adc)] = status1
 
     #____________________________________________________________________
-    def getComment(self):                            
+    def getComment(self):
         return self.__comment
 
     #____________________________________________________________________
@@ -162,7 +162,7 @@ class TileBchMgr(TileCalibLogger):
         status = self.getBadDefinition()
         if status.isGood():
             self.log().info("No TileBchStatus::isBad() definition found in DB, using defaults")
-        else:    
+        else:
             TileBchStatus.defineBad(status)
 
         #=== update TileBchStatus::isBadTiming() definition from DB
@@ -170,7 +170,7 @@ class TileBchMgr(TileCalibLogger):
         status = self.getBadTimingDefinition()
         if status.isGood():
             self.log().info("No TileBchStatus::isBadTiming() definition found in DB, using defaults")
-        else:    
+        else:
             TileBchStatus.defineBadTiming(status)
 
 
@@ -318,7 +318,7 @@ class TileBchMgr(TileCalibLogger):
         self.log().info("==============================================================")
         for ros in range(rosBeg,rosEnd):
             for mod in range(modBeg, min(modEnd,TileCalibUtils.getMaxDrawer(ros))):
-                modName = TileCalibUtils.getDrawerString(ros,mod)        
+                modName = TileCalibUtils.getDrawerString(ros,mod)
                 for chn in range(TileCalibUtils.max_chan()):
                     chnName = "channel %2i" % chn
                     for adc in range(TileCalibUtils.max_gain()):
@@ -330,18 +330,18 @@ class TileBchMgr(TileCalibLogger):
                             prbDesc = prbs[prbCode]
                             msg = "%s %s %s %2i (%s)" % (modName,chnName,gainName,prbCode,prbDesc)
                             self.log().info( msg )
-                            modName  = " " *  5 
+                            modName  = " " *  5
                             chnName  = " " * 10
-                            gainName = " " *  3 
+                            gainName = " " *  3
         self.log().info("==============================================================")
 
     #____________________________________________________________________
     def checkModuleForChanges(self, ros, drawer):
         """
         Returns:
-        - if nothing changed                                    :  0 
+        - if nothing changed                                    :  0
         - if something changed and complete drawer is now good  : -1
-        - if something changed but drawer is not completely good: >0 
+        - if something changed but drawer is not completely good: >0
         """
         diffCnt = 0
         allGood = True
@@ -358,15 +358,14 @@ class TileBchMgr(TileCalibLogger):
         if diffCnt>0 and allGood:
             return -1
         return diffCnt
-        
-                        
+
     #____________________________________________________________________
     def updateFromFile(self, fileName):
         """
         Updates the internal bad channel cache with the content
         found in the file. The layout of the file has to follow the
         TileConditions ASCII file layout.
-        
+
         NGO: change this at some point. In a file, not the status word (which
         depends on the bit pattern version) should be encoded, but the individual problems (enums).
         For this we need one line per ADC... this requires some modification in the reader.
@@ -397,7 +396,7 @@ class TileBchMgr(TileCalibLogger):
 
     #____________________________________________________________________
     def commitToDb(self, db, folderPath, tag, bitPatVer, author, comment,
-                   since, until=(MAXRUN,MAXLBK)):
+                   since, until=(MAXRUN,MAXLBK), untilCmt=None, moduleList=[]):
         """
         Commits the differences compared to the set of bad channels read in with the
         initialze function to the provided database.
@@ -414,107 +413,118 @@ class TileBchMgr(TileCalibLogger):
             raise( e )
 
         multiVersion = self.__multiVersion
-        #=== get latest state from db
-        if since != (MINRUN,MINLBK):
-            justBefore = list(since)
-            if justBefore[1]>MINLBK:
-                justBefore[1] = justBefore[1]-1
-            else:
-                justBefore[0] = justBefore[0]-1
-                justBefore[1] = MAXLBK                                
-            justBefore = tuple(justBefore)
-            if self.__mode!=2:
-                self.log().info("Reading db state just before %s, i.e. at %s", since,justBefore)
-                self.__updateFromDb(db, folderPath, tag, justBefore, 0)
-            else:
-                self.log().info("Using previous bad channel list from input DB")
-            self.log().info("And comparing it with new list of bad channels")
-        else:
-            if self.__mode!=2:
-                reader = TileCalibTools.TileBlobReader(db,folderPath,tag)
-                multiVersion = reader.folderIsMultiVersion()
-            self.log().info("Filling db from %s, resetting old status cache", list(since))
-            self.__oldStat = len(self.__oldStat) * [TileBchStatus()]
-
-        #=== print status information
-        self.log().info("Committing changes to DB \'%s\'", db.databaseId())
-        self.log().info("... using tag \'%s\' and [run,lumi] range: [%i,%i] - [%i,%i]",
-                 tag,since[0],since[1],until[0],until[1])
-        self.log().info("... author : \'%s\'", author  )
-        self.log().info("... comment: \'%s\'", comment )
-
-        #=== default for drawer initialization
-        loGainDefVec = cppyy.gbl.std.vector('unsigned int')()
-        loGainDefVec.push_back(0)
-        hiGainDefVec = cppyy.gbl.std.vector('unsigned int')()
-        hiGainDefVec.push_back(0)
-        comChnDefVec = cppyy.gbl.std.vector('unsigned int')()
-        comChnDefVec.push_back(0)
-        cppyy.makeClass('std::vector<unsigned int>')
-        defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()
-        defVec.push_back(loGainDefVec)
-        defVec.push_back(hiGainDefVec)
-        defVec.push_back(comChnDefVec)
-        
-        #=== loop over the whole detector
         writer = TileCalibTools.TileBlobWriter(db,folderPath,'Bch',multiVersion)
-        if len(comment):
+        if len(comment) or isinstance(author,tuple):
             writer.setComment(author, comment)
-        bchDecoder = TileBchDecoder(bitPatVer)
         nUpdates = 0
         goodComment = True
-        for ros in range(0,TileCalibUtils.max_ros()):
-            for mod in range(TileCalibUtils.getMaxDrawer(ros)):
-                modName = TileCalibUtils.getDrawerString(ros,mod)
-                nChange = self.checkModuleForChanges(ros,mod)
-                if nChange == 0:
-                    #=== do nothing if nothing changed
-                    continue
-                if nChange==-1:
-                    nUpdates += 1
-                    self.log().info("Drawer %s reset to GOOD", modName)
-                    if modName not in comment and not ("ONL" not in folderPath or "syncALL" not in comment):
-                        goodComment = False
-                        self.log().error("Comment string - '%s' - doesn't contain drawer %s", comment,modName)
-                    writer.zeroBlob(ros,mod)
+        #=== get latest state from db
+        if moduleList!=['CMT']:
+            if since != (MINRUN,MINLBK):
+                justBefore = list(since)
+                if justBefore[1]>MINLBK:
+                    justBefore[1] = justBefore[1]-1
                 else:
-                    nUpdates += 1
-                    self.log().info("Applying %2i changes to drawer %s", nChange,modName)
-                    if modName not in comment and ("ONL" not in folderPath or "syncALL" not in comment):
-                        goodComment = False
-                        self.log().error("Comment string - '%s' - doesn't contain drawer %s", comment,modName)
-                    drawer = writer.getDrawer(ros,mod)
-                    drawer.init(defVec,TileCalibUtils.max_chan(),bitPatVer)
-                    for chn in range(TileCalibUtils.max_chan()):
-                        #=== get low gain bit words
-                        wordsLo = bchDecoder.encode(self.getAdcStatus(ros,mod,chn,0))
-                        chBits = wordsLo[0]
-                        loBits = wordsLo[1]
-                        #=== get high gain bit words
-                        wordsHi = bchDecoder.encode(self.getAdcStatus(ros,mod,chn,1))
-                        chBits = wordsHi[0] | chBits
-                        hiBits = wordsHi[1]
-                        #=== set low, high and common channel word in calibDrawer
-                        drawer.setData(chn,0,0, loBits)
-                        drawer.setData(chn,1,0, hiBits)
-                        drawer.setData(chn,2,0, chBits)
-                        #=== synchronizing channel status in low and high gain
-                        if wordsLo[0] != chBits:
-                           self.log().info("Drawer %s ch %2d - sync LG status with HG ", modName,chn)
-                           status = TileBchStatus( bchDecoder.decode(chBits,loBits) )
-                           self.setAdcStatus(ros,mod,chn,0,status)
-                        if wordsHi[0] != chBits:
-                           self.log().info("Drawer %s ch %2d - sync HG status with LG ", modName,chn)
-                           status = TileBchStatus( bchDecoder.decode(chBits,hiBits) )
-                           self.setAdcStatus(ros,mod,chn,1,status)
+                    justBefore[0] = justBefore[0]-1
+                    justBefore[1] = MAXLBK
+                justBefore = tuple(justBefore)
+                if self.__mode!=2:
+                    self.log().info("Reading db state just before %s, i.e. at %s", since,justBefore)
+                    self.__updateFromDb(db, folderPath, tag, justBefore, 0)
+                else:
+                    self.log().info("Using previous bad channel list from input DB")
+                self.log().info("And comparing it with new list of bad channels")
+            else:
+                if self.__mode!=2:
+                    reader = TileCalibTools.TileBlobReader(db,folderPath,tag)
+                    multiVersion = reader.folderIsMultiVersion()
+                self.log().info("Filling db from %s, resetting old status cache", list(since))
+                self.__oldStat = len(self.__oldStat) * [TileBchStatus()]
+
+            #=== print status information
+            self.log().info("Committing changes to DB \'%s\'", db.databaseId())
+            self.log().info("... using tag \'%s\' and [run,lumi] range: [%i,%i] - [%i,%i]",
+                     tag,since[0],since[1],until[0],until[1])
+            if isinstance(author,tuple) and len(author)==3:
+                self.log().info("... author : \'%s\'", author[0] )
+                self.log().info("... comment: \'%s\'", author[1] )
+            else:
+                self.log().info("... author : \'%s\'", author  )
+                self.log().info("... comment: \'%s\'", comment )
+
+            #=== default for drawer initialization
+            loGainDefVec = cppyy.gbl.std.vector('unsigned int')()
+            loGainDefVec.push_back(0)
+            hiGainDefVec = cppyy.gbl.std.vector('unsigned int')()
+            hiGainDefVec.push_back(0)
+            comChnDefVec = cppyy.gbl.std.vector('unsigned int')()
+            comChnDefVec.push_back(0)
+            cppyy.makeClass('std::vector<unsigned int>')
+            defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()
+            defVec.push_back(loGainDefVec)
+            defVec.push_back(hiGainDefVec)
+            defVec.push_back(comChnDefVec)
+
+            #=== loop over the whole detector
+            bchDecoder = TileBchDecoder(bitPatVer)
+            for ros in range(0,TileCalibUtils.max_ros()):
+                for mod in range(TileCalibUtils.getMaxDrawer(ros)):
+                    modName = TileCalibUtils.getDrawerString(ros,mod)
+                    nChange = self.checkModuleForChanges(ros,mod)
+                    if nChange == 0 and (len(moduleList)==0 or modName not in moduleList or 'ALL' not in moduleList):
+                        #=== do nothing if nothing changed
+                        continue
+                    if nChange==-1:
+                        nUpdates += 1
+                        self.log().info("Drawer %s reset to GOOD", modName)
+                        if modName not in comment and not ("ONL" not in folderPath or "syncALL" not in comment):
+                            goodComment = False
+                            self.log().error("Comment string - '%s' - doesn't contain drawer %s", comment,modName)
+                        writer.zeroBlob(ros,mod)
+                    else:
+                        nUpdates += 1
+                        self.log().info("Applying %2i changes to drawer %s", nChange,modName)
+                        if modName not in comment and ("ONL" not in folderPath or "syncALL" not in comment):
+                            goodComment = False
+                            self.log().error("Comment string - '%s' - doesn't contain drawer %s", comment,modName)
+                        drawer = writer.getDrawer(ros,mod)
+                        drawer.init(defVec,TileCalibUtils.max_chan(),bitPatVer)
+                        for chn in range(TileCalibUtils.max_chan()):
+                            #=== get low gain bit words
+                            wordsLo = bchDecoder.encode(self.getAdcStatus(ros,mod,chn,0))
+                            chBits = wordsLo[0]
+                            loBits = wordsLo[1]
+                            #=== get high gain bit words
+                            wordsHi = bchDecoder.encode(self.getAdcStatus(ros,mod,chn,1))
+                            chBits = wordsHi[0] | chBits
+                            hiBits = wordsHi[1]
+                            #=== set low, high and common channel word in calibDrawer
+                            drawer.setData(chn,0,0, loBits)
+                            drawer.setData(chn,1,0, hiBits)
+                            drawer.setData(chn,2,0, chBits)
+                            #=== synchronizing channel status in low and high gain
+                            if wordsLo[0] != chBits:
+                               self.log().info("Drawer %s ch %2d - sync LG status with HG ", modName,chn)
+                               status = TileBchStatus( bchDecoder.decode(chBits,loBits) )
+                               self.setAdcStatus(ros,mod,chn,0,status)
+                            if wordsHi[0] != chBits:
+                               self.log().info("Drawer %s ch %2d - sync HG status with LG ", modName,chn)
+                               status = TileBchStatus( bchDecoder.decode(chBits,hiBits) )
+                               self.setAdcStatus(ros,mod,chn,1,status)
 
         #=== register
-        if nUpdates>0:
+        if nUpdates>0 or moduleList==['CMT']:
             if goodComment:
                 self.log().info("Attempting to register %i modified drawers..." , nUpdates)
-                writer.register(since,until,tag)
+                if untilCmt is not None and untilCmt!=until:
+                    if moduleList!=['CMT'] and until>since:
+                        writer.register(since,until,tag,1)
+                    if untilCmt>since:
+                        writer.register(since,untilCmt,tag,-1)
+                else:
+                    writer.register(since,until,tag)
             else:
-                self.log().error("Aborting update due to errors in comment string") 
+                self.log().error("Aborting update due to errors in comment string")
         else:
             self.log().warning("No drawer modifications detected, ignoring commit request")
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py
index 71efe83baf31b0916a370f287ea895044975ac5d..0bb4b2433d1f2ff9ffdca75f8cd301ea59a3b8c3 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibDefaultWriter.py
@@ -15,7 +15,7 @@ Note the COOL channels for default values:
 - default for EBA = channel 12
 - default for EBA = channel 16
 
-All offline constants are written to OFL02 folder 
+All offline constants are written to OFL02 folder
 In the COOLONL_TILE schema and COMP200 DB
 some constants exist also in OFL01 folder
 To write constants to this folder special prefix can be used:
@@ -50,8 +50,8 @@ class TileCalibDefaultWriter(TileCalibLogger):
     def __init__(self, db):
         """
         Input:
-        - db       : db should be an open database connection 
-        - globalTag: A tag used if nothing is specified in specialized functions 
+        - db       : db should be an open database connection
+        - globalTag: A tag used if nothing is specified in specialized functions
         """
         TileCalibLogger.__init__(self,"DefaultWriter")
         self.__author = os.getlogin()
@@ -62,7 +62,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 self.__db = db
                 self.__tilePrefixOfl1 = TileCalibTools.getTilePrefix(True,False)
                 #--- splitOnlineFolders in offline schema
-                self.__tilePrefixOfl  = TileCalibTools.getTilePrefix(True,True) 
+                self.__tilePrefixOfl  = TileCalibTools.getTilePrefix(True,True)
                 self.__tilePrefixOnl  = TileCalibTools.getTilePrefix(False)
                 #=== force the creation of template classes
                 cppyy.makeClass('std::vector<float>')
@@ -94,7 +94,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
         #            self.__tilePrefixOfl+"CALIB/CIS/FLT/"]
         folders = [self.__tilePrefixOfl+"CALIB/CIS/LIN",
                    self.__tilePrefixOnl+"CALIB/CIS/LIN"]
-        
+
         for folder in folders:
             multiVers=('OFL' in folder)
             blobWriter = TileCalibTools.TileBlobWriter(self.__db,folder,'Flt',multiVers)
@@ -123,7 +123,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
         folders = [self.__tilePrefixOfl+"CALIB/CIS/NLN",
                    self.__tilePrefixOnl+"CALIB/CIS/NLN"]
-        
+
         for folder in folders:
             multiVers=('OFL' in folder)
             blobWriter = TileCalibTools.TileBlobWriter(self.__db,folder,'Flt',multiVers)
@@ -173,13 +173,13 @@ class TileCalibDefaultWriter(TileCalibLogger):
             #=== register
             folderTag = TileCalibUtils.getFullTag(folder, tag) if multiVers else ""
             blobWriter.register((MINRUN,MINLBK),(MAXRUN,MAXLBK),folderTag)
-        
+
         #=== fill NLN (non-linear) folders with unit corretion
         lut = cppyy.gbl.std.vector('float')()
         lut.push_back(0.) # x1
         lut.push_back(1.) # y1
         defVec.clear()
-        defVec.push_back(lut) 
+        defVec.push_back(lut)
 
         #=== write both to offline and online folders
         folders = [self.__tilePrefixOfl+"CALIB/LAS/NLN",
@@ -224,7 +224,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
         fltDrawer = blobWriter.getDrawer(0,0)
         fltDrawer.init(defVec,1,1)
 
-        #=== partition variation: write to the 1st drawer of each partition into an empty channel 43 (LASPARTCHAN)       
+        #=== partition variation: write to the 1st drawer of each partition into an empty channel 43 (LASPARTCHAN)
         adc = 0
         idx = 0
         val = 1.0
@@ -248,8 +248,8 @@ class TileCalibDefaultWriter(TileCalibLogger):
         Mode = 'DEFAULT' means standard settings, any other mode means put 1 everywhere
         and ignore weight for D-sampling.
         """
-        
-        self.log().info( "*** Writing Ces with tag %s", tag ) 
+
+        self.log().info( "*** Writing Ces with tag %s", tag )
 
         #=== special values != 1
         #=== some info available here: https://twiki.cern.ch/twiki/bin/view/Atlas/SpecialModules
@@ -317,7 +317,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
         #=== Mean value of beta used for PMTs whose beta was not measured
         betaMean = 7.07
 
-        #=== Nominal HV and beta (must specify as floats for division later) 
+        #=== Nominal HV and beta (must specify as floats for division later)
         nomHV_EBA_inner = [  694., 692.3,   697.,   698.,   695.,   697.,  696., 695.3 ]
         beta_EBA_inner  = [ 7.099,    7.,  7.188,  6.995,  6.917,  7.217, 6.863,  6.97 ]
 
@@ -345,7 +345,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
             #=== For inner counters, just scale mean outer peak by relative N_pe
             for i in range(8):
-                mbtsMipInnerC.append(0.155 * 8.2/5.9)  
+                mbtsMipInnerC.append(0.155 * 8.2/5.9)
                 mbtsMipInnerA.append(0.155 * 8.2/5.9)
 
             #=== MIP values, outer counters from 900 GeV data
@@ -366,7 +366,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
             #=== Further tune 900 GeV cesium constants
             newCesMbtsOuterC[0] *= 1.15
 
-            if not MBTSflag=="13TeV" and not MBTSflag=="8TeV" and not MBTSflag=="7TeV" and not MBTSflag=="900GeV":  
+            if not MBTSflag=="13TeV" and not MBTSflag=="8TeV" and not MBTSflag=="7TeV" and not MBTSflag=="900GeV":
                 print ("MBTS flag",MBTSflag,"is not recognized, assuming 7TeV")
                 MBTSflag="7TeV"
             else:
@@ -376,7 +376,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 RUN=2
                 print ("RUN2 configuration for MC")
 
-                # Cesium constants to have pC afer deposited energy is multiplied by EMS(0.0105) and CES  
+                # Cesium constants to have pC afer deposited energy is multiplied by EMS(0.0105) and CES
                 ces_mbts_inner = 157.5/1.05 # connected to PMT5 of special C10
                 ces_mbts_outer = 157.5/1.05 # connected instead of E1
                 chan_mbts_inner = 5-1 # connected to PMT5 of special C10
@@ -406,7 +406,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
                 #=== Changes for 7 TeV ======================================================
                 if MBTSflag=="7TeV" or MBTSflag=="8TeV" :
-        
+
                     #=== PMT HV was increased from nominal to 850V (must specify as float for later division)
                     newHV = 850.
                     for i in range(8):
@@ -414,17 +414,17 @@ class TileCalibDefaultWriter(TileCalibLogger):
                         newCesMbtsOuterA[i] *= pow( newHV/nomHV_EBA_outer[i], beta_EBA_outer[i] )
                         newCesMbtsInnerC[i] *= pow( newHV/nomHV_EBC_inner[i], beta_EBC_inner[i] )
                         newCesMbtsInnerA[i] *= pow( newHV/nomHV_EBA_inner[i], beta_EBA_inner[i] )
-        
+
                     #=== EBA03 and EBA12 have HV = 820V instead of 850V; so rescale back down
-                    for i in [0, 1]:  
+                    for i in [0, 1]:
                         newCesMbtsOuterA[i] *= pow( 820./newHV, beta_EBA_outer[i] )
-        
+
                     #=== EBC05 is dead, so set calibration constant to 0 (disable by hand)
                     if MBTSflag=="7TeV" :
                         newCesMbtsInnerC[0] = 1.0e-20
-        
+
                 #=========================================================================
-                
+
                 #----- EBA inner
                 for i,mod in enumerate(eba_mbts_inner):
                     special[(3,mod,0)] = newCesMbtsInnerA[i]
@@ -448,7 +448,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 RUN=2
                 print ("RUN2 configuration for DATA")
 
-                # Cesium constants to have fC in BS file for MBTS 
+                # Cesium constants to have fC in BS file for MBTS
                 ces_mbts_inner = (1.036 * 0.987)/1.05 # connected to PMT5 of special C10
                 ces_mbts_outer = 1.0/1.05 # connected instead of E1
                 chan_mbts_inner = 5-1 # connected to PMT5 of special C10
@@ -475,10 +475,10 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 RUN=1
                 print ("RUN1 configuration for DATA")
 
-                # Cesium constants to have fC in BS file for MBTS 
+                # Cesium constants to have fC in BS file for MBTS
                 ces_mbts_inner = 1.0/1.05
                 ces_mbts_outer = 1.0/1.05
-        
+
                 #----- EBA inner
                 for mod in eba_mbts_inner:
                     special[(3,mod,0)] = ces_mbts_inner
@@ -568,7 +568,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 #=== set comment
                 blobWriter.setComment(self.__author,"default cesium constants for Run %d and %s MBTS weights for %s" % (RUN,NEW,MBTSflag))
 
-            #=== special case: write cesium = 1 everywhere    
+            #=== special case: write cesium = 1 everywhere
             else:    # (mode != 'DEFAULT')
                 self.log().info( "*** Writing Ces = 1 everywhere" )
                 #=== set comment
@@ -587,8 +587,8 @@ class TileCalibDefaultWriter(TileCalibLogger):
         MBTS in EBs connected in channel 47. No module type 11 anomaly.
         These values with dCellWeight = 1.2 correspond to simulation with CSC and FDR global tags.
         """
-        
-        self.log().info( "*** Writing Ces with tag %s", tag ) 
+
+        self.log().info( "*** Writing Ces with tag %s", tag )
 
         #=== special values != 1
         special = {}
@@ -669,7 +669,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
             for drawer in range(util.getMaxDrawer(ros)):
                 fltOfl = blobWriterOfl.zeroBlob(ros,drawer)
                 fltOnl = blobWriterOnl.zeroBlob(ros,drawer)
-                
+
         #=== global detector default
         detOfl = blobWriterOfl.getDrawer(0,0)
         detOfl.init(defVec,48,1)
@@ -694,7 +694,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
             lbaOnl.setData(chan,0,0,ces)
             lbcOfl.setData(chan,0,0,ces)
             lbcOnl.setData(chan,0,0,ces)
-            
+
         #=== defaults for EBA & EBC
         #=== store each drawer individually
         for ros in range(3,5):
@@ -708,7 +708,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                     ces = special.get(key,1.)
                     fltOfl.setData(chan,0,0,ces)
                     fltOnl.setData(chan,0,0,ces)
-                    
+
         #=== set comment
         blobWriterOfl.setComment(self.__author,"default old cesium constants (CSC,FDR) with dCellWeight=%.1f" % dCellWeight)
         blobWriterOnl.setComment(self.__author,"default old cesium constants (CSC,FDR) with dCellWeight=%.1f" % dCellWeight)
@@ -739,7 +739,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
         clbA = [1, 4, 5, 8,  9, 10, 15, 18, 19, 20, 23, 26, 29, 32, 35, 36, 37, 38, 45, 46]
         clbB = [2, 3, 6, 7, 11, 12, 16, 17, 21, 22, 27, 28, 33, 34, 39, 40]
         clbB9= [42, 47]
-        clbD = [0, 13, 14, 24, 25, 41, 44]        
+        clbD = [0, 13, 14, 24, 25, 41, 44]
 
         #--- extended barrel modules
         febA = 1.000
@@ -775,11 +775,11 @@ class TileCalibDefaultWriter(TileCalibLogger):
             for ros in range(util.max_ros()):
                 for drawer in range(util.getMaxDrawer(ros)):
                     flt = blobWriter.zeroBlob(ros,drawer)
-                    
+
             #=== write EM scale as global default and explicitly too
             flt = blobWriter.getDrawer(0,0)
             flt.init(defVec,1,1)
-        
+
             #=== LB values
             for ros in range(1,3):
                 for mod in range(64):
@@ -793,7 +793,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                         flt.setData(chan,0,0,emscale/flbB9)
                     for chan in clbD:
                         flt.setData(chan,0,0,emscale/flbD)
-        
+
             #=== EB and ITC values
             for ros in range(3,5):
                 for mod in range(64):
@@ -809,7 +809,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                         flt.setData(chan,0,0,emscale/fC10)
                     for chan in cD4:
                         flt.setData(chan,0,0,emscale/fD4)
-                                       
+
             blobWriter.setComment(self.__author,"EMS with particle/Cesium factors (pC/MeV)")
             folderTag = TileCalibUtils.getFullTag(folder, tag) if multiVers else ""
             blobWriter.register(since,until,folderTag)
@@ -847,7 +847,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
     #________________________________________________________________________
     def writeIntegrator(self, tag=""):
-    
+
         #=== construct folder path
         folder = self.__tilePrefixOfl+"INTEGRATOR"
 
@@ -860,12 +860,12 @@ class TileCalibDefaultWriter(TileCalibLogger):
         # DAC for pedestal, sigma of pedestal distribution
         # RMS of pedestal distribution, sigma of the RMS
 
-        dv = []        
-        dv.append((  2.814, 0.023, -1, -1, 80, -1, -1, -1)) 
-        dv.append(( 26.010, 0.230, -1, -1, 80, -1, -1, -1)) 
-        dv.append(( 28.810, 0.240, -1, -1, 80, -1, -1, -1)) 
-        dv.append(( 54.810, 0.480, -1, -1, 70, -1, -1, -1)) 
-        dv.append(( 75.790, 0.677, -1, -1, 70, -1, -1, -1)) 
+        dv = []
+        dv.append((  2.814, 0.023, -1, -1, 80, -1, -1, -1))
+        dv.append(( 26.010, 0.230, -1, -1, 80, -1, -1, -1))
+        dv.append(( 28.810, 0.240, -1, -1, 80, -1, -1, -1))
+        dv.append(( 54.810, 0.480, -1, -1, 70, -1, -1, -1))
+        dv.append(( 75.790, 0.677, -1, -1, 70, -1, -1, -1))
         dv.append((101.800, 0.900, -1, -1, 70, -1, -1, -1))
 
         #=== number of integrator gains and value per gain
@@ -878,9 +878,9 @@ class TileCalibDefaultWriter(TileCalibLogger):
             for v in dv[i]:
                 defaultGain.push_back(v)
             defVec.push_back(defaultGain)
-    
+
         #=====================================================
-        #=== fill 
+        #=== fill
         #=====================================================
         writer = TileCalibTools.TileBlobWriter(self.__db,folder,'Flt')
         writer.setComment(self.__author,"Integrator gain defaults")
@@ -1019,7 +1019,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 for drawer in range(util.getMaxDrawer(ros)):
                     blobWriter.zeroBlob(ros,drawer)
             calibDrawer = blobWriter.getDrawer(0,0)
-            calibDrawer.init(defVec,1,1)        
+            calibDrawer.init(defVec,1,1)
 
             #=== loop over the partitions
             ros = 0
@@ -1058,7 +1058,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
         self.log().info( "*** Writing Fit Method Noise with defaults (ADC counts) loGain=%f, hiGain=%f and tag %s" ,
                          loGainDef,hiGainDef,tag )
 
-        #=== fill folders 
+        #=== fill folders
         loGainDefVec = cppyy.gbl.std.vector('float')()
         loGainDefVec.push_back(loGainDef)
         hiGainDefVec = cppyy.gbl.std.vector('float')()
@@ -1096,21 +1096,21 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
         self.log().info( "*** Writing sample noise (lo=%f, hi=%f) defaults using tag %s",
                   loGainDef,hiGainDef,tag                                  )
-        
+
         #=== common noise defaults
         defaultLo = cppyy.gbl.std.vector('float')()
-        defaultLo.push_back(      40.) # pedestal value  
+        defaultLo.push_back(      40.) # pedestal value
         defaultLo.push_back(loGainDef) # pedestal rms (high frequency noise)
         defaultLo.push_back(       0.) #              (low  frequency noise)
-        defaultLo.push_back(loGainDef) # sigma 1 of HFN 
-        defaultLo.push_back(       0.) # sigma 2 of HFN 
+        defaultLo.push_back(loGainDef) # sigma 1 of HFN
+        defaultLo.push_back(       0.) # sigma 2 of HFN
         defaultLo.push_back(       0.) # HFN2/HFN1 ratio
         defaultHi = cppyy.gbl.std.vector('float')()
         defaultHi.push_back(      40.) # pedestal value
         defaultHi.push_back(hiGainDef) # pedestal rms (high frequency noise)
         defaultHi.push_back(       0.) #              (low  frequency noise)
-        defaultHi.push_back(hiGainDef) # sigma 1 of HFN 
-        defaultHi.push_back(       0.) # sigma 2 of HFN 
+        defaultHi.push_back(hiGainDef) # sigma 1 of HFN
+        defaultHi.push_back(       0.) # sigma 2 of HFN
         defaultHi.push_back(       0.) # HFN2/HFN1 ratio
         defVec = cppyy.gbl.std.vector('std::vector<float>')()
         defVec.push_back(defaultLo)
@@ -1142,10 +1142,10 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
         self.log().info( "*** Writing 1-g noise(ADC counts)+pileup(MeV) defaults loGain=%f, hiGain=%f and tag %s",
                          loGainDef,hiGainDef,tag )
-        
+
         #=== common noise defaults
         defaultLo = cppyy.gbl.std.vector('float')()
-        defaultLo.push_back(loGainDef) # el. noise  
+        defaultLo.push_back(loGainDef) # el. noise
         defaultLo.push_back(0.) # pileup noise
         defaultHi = cppyy.gbl.std.vector('float')()
         defaultHi.push_back(hiGainDef) # el. noise
@@ -1182,13 +1182,13 @@ class TileCalibDefaultWriter(TileCalibLogger):
     def writeNoiseSampleMC(self, tag="", loGainDef=0.8, hiGainDef=1.6):
         """
         To be compatible with previous defaults for MC, the low and high
-        gain pedestals are set to ped+(channel+1)/48. with 
+        gain pedestals are set to ped+(channel+1)/48. with
         ped = 30 and 50 ADC counts respecively
         """
 
         self.log().info( "*** Writing sample noise MC defaults (lo=%f, hi=%f) using tag %s",
                   loGainDef,hiGainDef,tag                                  )
-        
+
         folders = [self.__tilePrefixOfl+"NOISE/SAMPLE",
                    self.__tilePrefixOnl+"NOISE/SAMPLE"]
 
@@ -1204,27 +1204,27 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 flt = blobWriter.getDrawer(0, 0)
 
                 #=== initialize all channels in the drawer
-                
+
                 defaultLo = cppyy.gbl.std.vector('float')()
-                defaultLo.push_back(0.) # pedestal value  
+                defaultLo.push_back(0.) # pedestal value
                 defaultLo.push_back(0.) # pedestal rms (high frequency noise)
                 defaultLo.push_back(0.) # (low  frequency noise)
-                defaultLo.push_back(0.) # sigma1 of high frequency noise 
+                defaultLo.push_back(0.) # sigma1 of high frequency noise
                 defaultLo.push_back(0.) # sigma2 of high frequency noise
                 defaultLo.push_back(0.) # HFN2/HFN1 normalization
-                
+
                 defaultHi = cppyy.gbl.std.vector('float')()
                 defaultHi.push_back(0.) # pedestal value
                 defaultHi.push_back(0.) # pedestal rms (high frequency noise)
                 defaultHi.push_back(0.) # (low  frequency noise)
-                defaultHi.push_back(0.) # sigma1 of high frequency noise 
+                defaultHi.push_back(0.) # sigma1 of high frequency noise
                 defaultHi.push_back(0.) # sigma2 of high frequency noise)
                 defaultHi.push_back(0.) # HFN2/HFN1 normalization
-                
+
                 defVec = cppyy.gbl.std.vector('std::vector<float>')()
                 defVec.push_back(defaultLo)
                 defVec.push_back(defaultHi)
-                
+
                 flt.init(defVec,48,0)
 
                 #=== set common noise defaults per channel
@@ -1346,9 +1346,9 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 if not len(fields)          :
                     continue
                 if fields[0].startswith("#"):
-                    continue 
+                    continue
                 if fields[0].startswith("*"):
-                    continue 
+                    continue
                 if len(fields) != 2         :
                     continue
 
@@ -1365,7 +1365,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 if not len(fields)          :
                     continue
                 if fields[0].startswith("#"):
-                    continue 
+                    continue
                 if fields[0].startswith("*"):
                     continue
                 if len(fields) != 2         :
@@ -1378,12 +1378,12 @@ class TileCalibDefaultWriter(TileCalibLogger):
             fileStr = "OBJVERSION 200"
             fileStr+= "\n0x000\t0\t0\t"
             for x in xlo:
-                fileStr += "%f " % x 
+                fileStr += "%f " % x
             for y in ylo:
                 fileStr += "%f " % y
             fileStr+= "\n0x000\t0\t1\t"
             for x in xhi:
-                fileStr += "%f " % x 
+                fileStr += "%f " % x
             for y in yhi:
                 fileStr += "%f " % y
             fileStr+="\n"
@@ -1445,11 +1445,11 @@ class TileCalibDefaultWriter(TileCalibLogger):
             fields = line.strip().split()
             #=== ignore empty and comment lines
             if not len(fields)          :
-                continue            
+                continue
             if fields[0].startswith("#"):
-                continue 
+                continue
             if fields[0].startswith("*"):
-                continue 
+                continue
             if len(fields) != 2         :
                 continue
 
@@ -1460,7 +1460,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
         fileStr = "OBJVERSION 200"
         fileStr += "\n0x000\t0\t0\t"
         for phase in phases:
-            fileStr += "%f " % phase 
+            fileStr += "%f " % phase
         for amplitude in amplitudes:
             fileStr += "%f " % amplitude
         fileStr += "\n"
@@ -1511,7 +1511,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
 
         #=== construct folder path
         folder = self.__tilePrefixOnl+"MUID"
-    
+
         #=== common TileMuId defaults
         default = cppyy.gbl.std.vector('float')()
         for i in range(20):
@@ -1519,12 +1519,12 @@ class TileCalibDefaultWriter(TileCalibLogger):
             default.push_back(5000.)
         defVec = cppyy.gbl.std.vector('std::vector<float>')()
         defVec.push_back(default)
-        defVec.push_back(default)    
-        
+        defVec.push_back(default)
+
         #=== get a writer
         writer = TileCalibTools.TileBlobWriter(self.__db,folder,'Flt',False)
         writer.setComment(self.__author,"TileMuId default values")
-    
+
         #=== initialize all channels and write global default
         util = cppyy.gbl.TileCalibUtils()
         for ros in range(util.max_ros()):
@@ -1532,7 +1532,7 @@ class TileCalibDefaultWriter(TileCalibLogger):
                 writer.zeroBlob(ros,drawer)
         calibDrawer = writer.getDrawer(0,0)
         calibDrawer.init(defVec,1,1)
-    
+
         #=== register in DB
         writer.register((MINRUN,MINLBK),(MAXRUN,MAXLBK), "")
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py
index b75e68f2565bc04a13c6da428e52908376c2b45a..af96fc59544dcff9e45693f0064f216f2c247bce 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibLogger.py
@@ -33,7 +33,7 @@ class TileCalibLogger:
         self._log.getEffectiveLevel()
     def log(self):
         return self._log
-    
+
 
 #=== setup format
 setupFormat()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
index f6fdfb80730b190c2b85016132651b64523434bf..73de43faa04131abbe3bc1277db9ea6047f97a1e 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
@@ -4,11 +4,11 @@
 # TileCalibTools.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-23
 # Carlos Solans <carlos.solans@cern.ch>, 2012-10-19
-# Andrey Kamenshchikov <akamensh@cern.ch>, 23-10-2013 
+# Andrey Kamenshchikov <akamensh@cern.ch>, 23-10-2013
 # Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
 ################################################################
 """
-Python helper module for managing COOL DB connections and TileCalibBlobs. 
+Python helper module for managing COOL DB connections and TileCalibBlobs.
 """
 
 from __future__ import print_function
@@ -58,11 +58,11 @@ log = getLogger("TileCalibTools")
 MINRUN      = 0
 MINLBK      = 0
 MAXRUN      = cool.Int32Max
-MAXLBK      = cool.UInt32Max 
-UNIX2COOL   = 1000000000 
+MAXLBK      = cool.UInt32Max
+UNIX2COOL   = 1000000000
 UNIXTMAX    = cool.Int32Max
 # empty Tile channel for storing laser partition variation. DO NOT CHANGE.
-LASPARTCHAN = 43 
+LASPARTCHAN = 43
 
 #
 #______________________________________________________________________
@@ -188,7 +188,7 @@ def openDb(db, instance, mode="READONLY",schema="COOLONL_TILE",sqlfn="tileSqlite
     VALIDSCHEMAS = ["COOLONL_TILE","COOLOFL_TILE"]
     if schema not in VALIDSCHEMAS:
         raise Exception( "Schema not valid: %s, valid schemas are: %s" % (schema,VALIDSCHEMAS) )
-    
+
     #=== construct connection string
     connStr = ""
     if db=='SQLITE':
@@ -272,7 +272,7 @@ def openDbConn(connStr, mode="READONLY"):
         return None
 
 
-    
+
 #
 #______________________________________________________________________
 def coolTimeFromRunLumi(runNum, lbkNum):
@@ -294,13 +294,13 @@ def decodeTimeString(timeString):
 def getCoolValidityKey(pointInTime, isSince=True):
     """
     The interpretation of pointInTime depends on their type:
-    - tuple(int,int) : run and lbk number 
+    - tuple(int,int) : run and lbk number
     - integer        : Values are interpreted as unix time stamps
     - string         : time stamp of format 'yyyy-mm-dd hh:mm:ss'
     """
 
     validityKey = None
-    
+
     #=== string: convert to unix time and treat as latter
     if isinstance(pointInTime, str):
         pointInTime = decodeTimeString(pointInTime)
@@ -403,12 +403,12 @@ def copyFolder(dbr, dbw, folder, tagr, tagw, chanNum, pointInTime1, pointInTime2
 
     folderR = dbr.getFolder(folder)
     folderW = dbw.getFolder(folder)
-    
+
     chansel = cool.ChannelSelection(chanNum)
 
     iov1 = getCoolValidityKey(pointInTime1,False)
     iov2 = getCoolValidityKey(pointInTime2,False)
-    
+
     if tagr=='':
         multiVersion = False
         objs = folderR.browseObjects(iov1,iov2,chansel)
@@ -431,7 +431,7 @@ def copyFolder(dbr, dbw, folder, tagr, tagw, chanNum, pointInTime1, pointInTime2
 
 #======================================================================
 #===
-#=== TileBlobWriter 
+#=== TileBlobWriter
 #===
 #======================================================================
 
@@ -495,21 +495,21 @@ class TileBlobWriter(TileCalibLogger):
         #=== initialize channel dictionaries
         self.__chanDictRecord = {} # <int, cool.Record    >
         self.__chanDictDrawer = {} # <int, TileCalibDrawer>
-        
+
         #=== create default vectors based on calibDrawerType
         self.__calibDrawerType = calibDrawerType
         if   calibDrawerType=='Flt':
             cppyy.makeClass('std::vector<float>')
             self.__defVec = cppyy.gbl.std.vector('std::vector<float>')()
-        elif calibDrawerType=='Bch' or calibDrawerType=='Int':                    
+        elif calibDrawerType=='Bch' or calibDrawerType=='Int':
             cppyy.makeClass('std::vector<unsigned int>')
             self.__defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()
         else:
             raise Exception("Unknown calibDrawerType: %s" % calibDrawerType)
-        
+
 
     #____________________________________________________________________
-    def register(self, since=(MINRUN,MINLBK), until=(MAXRUN,MAXLBK), tag=""):
+    def register(self, since=(MINRUN,MINLBK), until=(MAXRUN,MAXLBK), tag="", option=0):
         """
         Registers the folder in the database.
         - since: lower limit of IOV
@@ -517,7 +517,7 @@ class TileBlobWriter(TileCalibLogger):
         - tag  : The cool folder tag to write to
 
         The interpretation of the 'since' and 'until' inputs depends on their type:
-        - tuple(int,int) : run and lbk number 
+        - tuple(int,int) : run and lbk number
         - integer        : Values are interpreted as unix time stamps
                            If since<0, current time is assumed
                            If until<0, infinity is assumed
@@ -545,7 +545,7 @@ class TileBlobWriter(TileCalibLogger):
             raise Exception("Until(%i) <= Since(%i)" % (untilCool,sinceCool))
 
         #=== build IOV string
-        iovString = ""       
+        iovString = ""
         if isinstance(since, tuple):
             iovString = "[%i,%i] - [%i,%i]" % (since[0],since[1],until[0],until[1])
         else:
@@ -563,16 +563,21 @@ class TileBlobWriter(TileCalibLogger):
 
         #=== print info
         comment=self.getComment()
-        noComment = (comment is None) or (comment == "None") or (comment.startswith("None") and comment.endswith("None"))
+        onlyComment = (option<0)
+        noComment = (comment is None) or (comment == "None") or (comment.startswith("None") and comment.endswith("None")) or (option>0)
         self.log().info( "Registering folder %s with tag \"%s\"", self.__folder.fullPath(),folderTag)
         self.log().info( "... with IOV          : %s" , iovString                          )
         if noComment:
-            self.log().info( "... WITHOUT comment field" )
+            if (option<=0):
+                self.log().info( "... WITHOUT comment field" )
         else:
             self.log().info( "... with comment field: \"%s\"", self.getComment()                  )
 
         #=== register all channels by increasing channel number
-        chanList = sorted(self.__chanDictRecord.keys())
+        if onlyComment:
+            chanList = [1000]
+        else:
+            chanList = sorted(self.__chanDictRecord.keys())
         cnt=0
         for chanNum in chanList:
             if chanNum==1000 and noComment:
@@ -585,6 +590,8 @@ class TileBlobWriter(TileCalibLogger):
             cnt+=1
         if noComment:
             self.log().info( "... %d cool channels have been written in total", cnt )
+        elif onlyComment:
+            self.log().info( "... 1 cool channel with comment field has been written" )
         else:
             self.log().info( "... %d cool channels have been written in total (including comment field)", cnt )
 
@@ -608,7 +615,7 @@ class TileBlobWriter(TileCalibLogger):
                 TileCalibDrawerCmt.getInstance(blob,author,comment)
         except Exception as e:
             self.log().critical( e )
-        
+
     #____________________________________________________________________
     def getComment(self, split=False):
         """
@@ -662,7 +669,7 @@ class TileBlobWriter(TileCalibLogger):
             #=== clone if requested
             if calibDrawerTemplate:
                 calibDrawer.clone(calibDrawerTemplate)
-            
+
             #=== put updated calibDrawer in dictionary and return
             self.__chanDictDrawer[chanNum] = calibDrawer
             return calibDrawer
@@ -693,7 +700,7 @@ class TileBlobWriter(TileCalibLogger):
 
 #======================================================================
 #===
-#=== TileBlobReader 
+#=== TileBlobReader
 #===
 #======================================================================
 
@@ -709,7 +716,7 @@ class TileBlobReader(TileCalibLogger):
     def __init__(self, db, folder, tag=""):
         """
         Input:
-        - db    : db should be an open database connection 
+        - db    : db should be an open database connection
         - folder: full folder path
         - tag   : The folder tag, e.g. \"000-00\"
         """
@@ -756,7 +763,7 @@ class TileBlobReader(TileCalibLogger):
                 return cmt.getFullComment()
         except Exception:
             return "<no comment found>"
-        
+
     #____________________________________________________________________
     def getDefault(self, ros, drawer):
         """
@@ -783,7 +790,7 @@ class TileBlobReader(TileCalibLogger):
            drawer1 = 12 + OffsetEBA[drawer]
         elif ros==4:
            OffsetEBC = [ 0, 0, 0, 0, 0, 0, 3, 2, #// Merged E-1: EBC07; Outer MBTS: EBC08
-                         0, 0, 0, 0, 7, 6, 6, 7, # // D-4: EBC13, EBC16; Special D-4: EBC14, EBC15; 
+                         0, 0, 0, 0, 7, 6, 6, 7, # // D-4: EBC13, EBC16; Special D-4: EBC14, EBC15;
                          7, 5, 6, 7, 0, 0, 0, 2, #// D-4: EBC17, EBC20; Special D-40 EBC18; Special D-4: EBC19; Outer MBTS: EBC24
                          3, 0, 0, 3, 4, 0, 3, 4, #// Merged E-1:  EBC25, EBC28, EBC31; E-4': EBC29, EBC32
                          0, 4, 3, 0, 4, 3, 1, 1, #// E-4': EBC34, EBC37; Merged E-1: EBC35, EBC38; Inner MBTS + special C-10: EBC39, EBC40
@@ -816,7 +823,7 @@ class TileBlobReader(TileCalibLogger):
                 self.log().debug("Fetching from DB: %s", obj)
                 blob = obj.payload()[0]
                 self.log().debug("blob size: %d", blob.size())
-                #=== default policy 
+                #=== default policy
                 if not useDefault and blob.size()==0:
                     return 0
                 while blob.size()==0:
@@ -833,7 +840,7 @@ class TileBlobReader(TileCalibLogger):
             #=== get blob
             blob = obj.payload()[0]
             self.log().debug("blob size: %d", blob.size())
-                
+
             #=== create calibDrawer depending on type
             calibDrawer = TileCalibDrawerCmt.getInstance(blob)
             typeName =    TileCalibType.getClassName(calibDrawer.getObjType())
@@ -878,7 +885,7 @@ class TileBlobReader(TileCalibLogger):
                 self.log().debug("Fetching from DB: %s", obj)
                 blob = obj.payload()[0]
                 self.log().debug("blob size: %d", blob.size())
-                #=== default policy 
+                #=== default policy
                 while blob.size()==0:
                     #=== no default at all?
                     if ros==0 and drawer==0:
@@ -893,7 +900,7 @@ class TileBlobReader(TileCalibLogger):
             #=== get blob
             blob = obj.payload()[0]
             self.log().debug("blob size: %d", blob.size())
-                
+
             #=== create calibDrawer depending on type
             calibDrawer = TileCalibDrawerCmt.getInstance(blob)
             typeName =    TileCalibType.getClassName(calibDrawer.getObjType())
@@ -943,6 +950,25 @@ class TileBlobReader(TileCalibLogger):
 
         return objs
 
+    #____________________________________________________________________
+    def getIOVsWithinRange(self, ros, drawer, point1inTime=(0,0), point2inTime=(2147483647,4294967295), printError=True):
+        """
+        Returns list of IOVS for the given ROS and drawer, within given validity range -- default: [0-Infty)
+        """
+        iovs=[]
+        dbobjs = self.getDBobjsWithinRange(ros,drawer,point1inTime, point2inTime, printError)
+        if (dbobjs is None):
+            log.warning( "Warning: can not read IOVs for ros %d drawer %d from input DB file", ros,drawer )
+        else:
+            while dbobjs.goToNext():
+                obj = dbobjs.currentRef()
+                objsince = obj.since()
+                sinceRun = objsince >> 32
+                sinceLum = objsince & 0xFFFFFFFF
+                since    = (sinceRun, sinceLum)
+                iovs.append(since)
+        return iovs
+
     #____________________________________________________________________
     def getBlobsWithinRange(self, ros, drawer, point1inTime=(0,0), point2inTime=(2147483647,4294967295)):
         """
@@ -971,7 +997,7 @@ class TileBlobReader(TileCalibLogger):
             print ("[%d,%d)-[%d,%d) - %s" % ((sinceCool>>32),(sinceCool&0xFFFFFFFF),(untilCool>>32),(untilCool&0xFFFFFFFF),blob))
             self.log().debug("blob size: %d", blob.size())
 
-            #=== default policy 
+            #=== default policy
             while blob.size()==0:
                 #=== no default at all?
                 if ros==0 and drawer==0:
@@ -1031,7 +1057,7 @@ class TileBlobReader(TileCalibLogger):
 class TileASCIIParser(TileCalibLogger):
     """
     This is a class capable of parsing TileCal conditions data stored in
-    ASCII files. Both the single and multi-line formats are supported. 
+    ASCII files. Both the single and multi-line formats are supported.
     """
 
     #____________________________________________________________________
@@ -1041,7 +1067,7 @@ class TileASCIIParser(TileCalibLogger):
         - fileName          : input file name
         - isSingleLineFormat: if False, multi line format is assumed
         """
-        
+
         TileCalibLogger.__init__(self,"TileASCIIParser")
         self.__dataDict = {}
         try:
@@ -1049,7 +1075,7 @@ class TileASCIIParser(TileCalibLogger):
         except Exception as e:
             self.log().error( "TileCalibASCIIParser::ERROR: Problem opening input file:" )
             self.log().error( e )
-            return 
+            return
 
         for line in lines:
             fields = line.strip().split()
@@ -1057,13 +1083,13 @@ class TileASCIIParser(TileCalibLogger):
             if not len(fields)          :
                 continue
             if fields[0].startswith("#"):
-                continue 
+                continue
 
             #=== read in fields
             type = fields[0]
             frag = fields[1]
             chan = fields[2]
-            data = fields[3:] 
+            data = fields[3:]
             if not isSingleLineFormat:
                 raise Exception("Multiline format not implemented yet")
 
@@ -1107,40 +1133,40 @@ class TileASCIIParser(TileCalibLogger):
     def getDict(self):
         import copy
         return copy.deepcopy(self.__dataDict)
-    
+
     #____________________________________________________________________
     def PMT2channel(self,ros,drawer,pmt):
         "Reorder the PMTs (SV: how to get that from region.py???)"
-        "This takes ros [1-4], drawer [0-63], pmt [1-48]"     
+        "This takes ros [1-4], drawer [0-63], pmt [1-48]"
 
-        PMT2chan_Special={1:0,2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,10:9, 
-                      11:10,12:11,13:12,14:13,15:14,16:15,17:16,18:17, 19:18, 20:19, 
-                      21:20,22:21,23:22,24:23,27:24,26:25,25:26,31:27,32:28,28:29, 
-                      33:30,29:31,30:32,36:33,35:34,34:35,44:36,38:37,37:38,43:39,42:40, 
+        PMT2chan_Special={1:0,2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,10:9,
+                      11:10,12:11,13:12,14:13,15:14,16:15,17:16,18:17, 19:18, 20:19,
+                      21:20,22:21,23:22,24:23,27:24,26:25,25:26,31:27,32:28,28:29,
+                      33:30,29:31,30:32,36:33,35:34,34:35,44:36,38:37,37:38,43:39,42:40,
                       41:41,45:42,39:43,40:44,48:45,47:46,46:47}
-  
+
 
         PMT2chan_LB={1:0,2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,10:9,
                      11:10,12:11,13:12,14:13,15:14,16:15,17:16,18:17,19:18,20:19,
                      21:20,22:21,23:22,24:23,27:24,26:25,25:26,30:27,29:28,28:29,
                      33:30,32:31,31:32,36:33,35:34,34:35,39:36,38:37,37:38,42:39,41:40,
                      40:41,45:42,44:43,43:44,48:45,47:46,46:47}
-        
-        
+
+
         PMT2chan_EB={1:0,2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,10:9,
                      11:10,12:11,13:12,14:13,15:14,16:15,17:16,18:17,19:18,20:19,
                      21:20,22:21,23:22,24:23,25:24,26:25,27:26,28:27,31:28,32:29,
                      33:30,29:31,30:32,35:33,36:34,34:35,44:36,38:37,37:38,43:39,42:40,
                      41:41,39:42,40:43,45:44,46:45,47:46,48:47}
 
-        if ros <= 2: 
+        if ros <= 2:
             chan = PMT2chan_LB[pmt]
         elif (ros == 3 and drawer == 14) or (ros == 4 and drawer == 17):
             chan = PMT2chan_Special[pmt]
         else:
             chan = PMT2chan_EB[pmt]
-    
-        return chan    
+
+        return chan
 
 #======================================================================
 #===
@@ -1165,7 +1191,7 @@ class TileASCIIParser2(TileCalibLogger):
         - calibId           : like Ped, Las, ... or (r,l) or (run,lumi) but can be empty string as well
         - readGain          : if False, no gain field in input file
         """
-        
+
         TileCalibLogger.__init__(self,"TileASCIIParser2")
         self.__dataDict = {}
         self.__manyIOVs = (calibId=="(run,lumi)" or calibId=="(r,l)" )
@@ -1178,7 +1204,7 @@ class TileASCIIParser2(TileCalibLogger):
         except Exception as e:
             self.log().error( "TileCalibASCIIParser2::ERROR: Problem opening input file:" )
             self.log().error( e )
-            return 
+            return
 
         self.log().info("Parsing file %s",fileName)
         if len(calibId)>0:
@@ -1190,7 +1216,7 @@ class TileASCIIParser2(TileCalibLogger):
             if not len(fields)          :
                 continue
             if fields[0].startswith("#"):
-                continue 
+                continue
 
             #=== read in fields
             if len(calibId)>0:
@@ -1219,7 +1245,7 @@ class TileASCIIParser2(TileCalibLogger):
                 else:
                     data = fields[2:]
 
-            #=== decode fragment 
+            #=== decode fragment
             if frag.startswith('0x') or frag.startswith('-0x'):
                 frg = int(frag,16)
                 ros = frg>>8
@@ -1227,10 +1253,10 @@ class TileASCIIParser2(TileCalibLogger):
                     mod = (-frg)&255
                 else:
                     mod = frg&255
-            elif (frag.startswith("AUX") or 
-                  frag.startswith("LBA") or 
-                  frag.startswith("LBC") or 
-                  frag.startswith("EBA") or 
+            elif (frag.startswith("AUX") or
+                  frag.startswith("LBA") or
+                  frag.startswith("LBC") or
+                  frag.startswith("EBA") or
                   frag.startswith("EBC") or
                   frag.startswith("ALL") or
                   frag.startswith("XXX") ):
@@ -1243,7 +1269,7 @@ class TileASCIIParser2(TileCalibLogger):
 
             chn = int(chan)
             adc = int(gain)
-            
+
             #=== fill dictionary
             if ros<0:
                rosmin=0
@@ -1287,7 +1313,7 @@ class TileASCIIParser2(TileCalibLogger):
             for ros in range(rosmin,rosmax):
                for mod in range(modmin,modmax):
                   for chn in range(chnmin,chnmax):
-                     if allchannels or self.channel2PMT(ros,mod,chn)>0: 
+                     if allchannels or self.channel2PMT(ros,mod,chn)>0:
                         for adc in range (adcmin,adcmax):
                            dictKey = (ros,mod,chn,adc)
                            if self.__manyIOVs:
@@ -1314,17 +1340,17 @@ class TileASCIIParser2(TileCalibLogger):
     def getDict(self):
         import copy
         return copy.deepcopy(self.__dataDict)
-        
+
     #____________________________________________________________________
     def channel2PMT(self,ros,drawer,chan):
         "Convert channel numbet to PMT number, negative for disconnected channels"
-        "This takes ros [1-4], drawer [0-63], chan [0-47]"     
+        "This takes ros [1-4], drawer [0-63], chan [0-47]"
 
         chan2PMT_LB=[  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
                       13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
                       27, 26, 25, 30, 29, 28,-33,-32, 31, 36, 35, 34,
                       39, 38, 37, 42, 41, 40, 45,-44, 43, 48, 47, 46 ]
-        
+
         chan2PMT_EB=[  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
                       13, 14, 15, 16, 17, 18,-19,-20, 21, 22, 23, 24,
                      -27,-26,-25,-31,-32,-28, 33, 29, 30,-36,-35, 34,
@@ -1335,13 +1361,13 @@ class TileASCIIParser2(TileCalibLogger):
                      -27,-26,-25,-31,-32,-28, 33, 29, 30,-36,-35, 34,
                       44, 38, 37, 43, 42, 41,-45,-39,-40,-48,-47,-46 ]
 
-        if ros <= 2: 
+        if ros <= 2:
             pmt = chan2PMT_LB[chan]
         elif (ros == 3 and drawer == 14) or (ros == 4 and drawer == 17):
             pmt = chan2PMT_Sp[chan]
         else:
             pmt = chan2PMT_EB[chan]
-    
+
         return pmt
 
 #======================================================================
@@ -1364,7 +1390,7 @@ class TileASCIIParser3(TileCalibLogger):
         - fileName          : input file name
         - calibId           : like Trip, ...
         """
-        
+
         TileCalibLogger.__init__(self,"TileASCIIParser3")
         self.__dataDict = {}
         try:
@@ -1372,7 +1398,7 @@ class TileASCIIParser3(TileCalibLogger):
         except Exception as e:
             self.log().error( "TileCalibASCIIParser3::ERROR: Problem opening input file:" )
             self.log().error( e )
-            return 
+            return
 
         for line in lines:
             fields = line.strip().split()
@@ -1380,18 +1406,18 @@ class TileASCIIParser3(TileCalibLogger):
             if not len(fields)          :
                 continue
             if fields[0].startswith("#"):
-                continue 
+                continue
 
             #=== read in fields
             type = fields[0]
             frag = fields[1]
-            data = fields[2:] 
+            data = fields[2:]
 
             #=== check for correct calibId
             if type != calibId:
                 raise Exception("%s is not calibId=%s" % (type, calibId))
 
-            #=== decode fragment 
+            #=== decode fragment
             if not (frag.startswith('0x') or frag.startswith('-0x')):
                 raise Exception("Misformated fragment %s" % frag)
 
@@ -1401,7 +1427,7 @@ class TileASCIIParser3(TileCalibLogger):
                 mod = (-frg)&255
             else:
                 mod = frg&255
-            
+
             #=== fill dictionary
             dictKey = (ros, mod)
             self.__dataDict[dictKey] = data
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
index d54b63416cea17df6324f550f41822b6c0911ad6..288c805266d2bf22b742ba36e6e726c3718ab790 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
@@ -29,7 +29,7 @@ def usage():
     print ("")
 
 def showAdcProblems(mgr,ros,mod):
-    modName = TileCalibUtils.getDrawerString(ros,mod)        
+    modName = TileCalibUtils.getDrawerString(ros,mod)
     for chn in range(TileCalibUtils.max_chan()):
         for adc in range(TileCalibUtils.max_gain()):
 
@@ -104,7 +104,7 @@ if __name__ == "__main__":
     usage()
     sys.exit(2)
 
-  # defaults 
+  # defaults
   instance='OFLP200'
   folderPath =  "/TILE/OFL02/STATUS/ADC"
   tag = "OFLCOND-MC16-SDR-28"
@@ -123,7 +123,7 @@ if __name__ == "__main__":
     #elif o in ("-s","--schema"):
     #    schema = a
     #elif o in ("-r","--run"):
-    #    run = int(a) 
+    #    run = int(a)
     #elif o in ("-l","--lumi"):
     #    lumi = int(a)
     elif o in ("-h","--help"):
@@ -199,7 +199,7 @@ if __name__ == "__main__":
   for ros in range(rosmin,rosmax):
     for mod in range(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
 
-      modName = TileCalibUtils.getDrawerString(ros,mod)        
+      modName = TileCalibUtils.getDrawerString(ros,mod)
       log.info(40*'='+" ros %d, drawer %s", ros, modName)
 
       dbobjs = blobReader.getDBobjsWithinRange(ros, mod)
@@ -271,7 +271,7 @@ if __name__ == "__main__":
                 continue
 
             else:
-                # non-identical blobs: write previous blob with new saved validity range...  
+                # non-identical blobs: write previous blob with new saved validity range...
                 log.info("types: %s  %s", type(blob), type(calibDrawerPrev))
                 #writeMergedIOV(outFolder, outtagFull, ros, mod, calibDrawerPrev, mergedSince, mergedUntil)
                 writeMergedIOV(ros, mod, mergedSince, mergedUntil)
@@ -350,7 +350,7 @@ if __name__ == "__main__":
                     chnhi = calibDrawer.getData(chn,   2, ind)
                     diff = adclo - adchi + chnlo - chnhi
 
-                    if not (status==statusPrev): 
+                    if not (status==statusPrev):
                       identical = False
                       log.info("chn=%i adc=%i ind=%i - vlo=%i, vhi=%i, diffs=%i %i", chn, adc, ind, adclo+chnlo, adchi+chnhi, adclo-adchi, chnlo-chnhi)
                       #break
@@ -361,7 +361,7 @@ if __name__ == "__main__":
             mergedUntil = objuntil
           else:
             showAdcProblems(mgr,ros,mod)
-            # non-identical blobs: write previous blob with new saved validity range...  
+            # non-identical blobs: write previous blob with new saved validity range...
             log.info("types: %s  %s", type(blob), type(calibDrawerPrev))
             writeMergedIOV(ros, mod, mergedSince, mergedUntil)
             #writeMergedIOV(outFolder,outtagFull,ros,mod,calibDrawerPrev,mergedSince,mergedUntil)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
index 058418a47fc4dbbc64e2015f65b259b84d62df30..0bce3987f0413276caa8cf2d9c6f6f01b0f969a0 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
@@ -107,11 +107,11 @@ else:
     taglist=rfolder.listTags()
 #    print (taglist)
     for tag in taglist:
-        try: 
+        try:
             foldertag = TileCalibTools.getFolderTag(db, folder, tag)
             if localtag == foldertag:
                 print (" leaf tag %s linked to global tag %s " % (localtag, tag))
         except Exception:
             print (" ")
 #            print (" WARNING !, existing global tag %s is not linked to local tag %s " % (tag,localtag))
-                 
+
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
index 43cf806be71b67ee31fd0e141d08f8d74bf0601b..ff193713859a7aceaa452c157737bf189c5503a8 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
@@ -16,7 +16,7 @@ pointInTime = (999999999,0)
 #=== get a logger
 from TileCalibBlobPython.TileCalibLogger import getLogger
 log = getLogger("ps_readDb")
-    
+
 #=== open the database
 db = TileCalibTools.openDb('ORACLE', 'CONDBR2', 'READONLY', 'COOLOFL_TILE')
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
index c54f09636eb9c2f67132ea75f9251f3152590585..cd58b4132c53b2f69ae3e529ab5dd06b051d0c02 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
@@ -22,7 +22,7 @@ def usage():
     print ("-s, --schema=   specify schema to use, like 'COOLOFL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2' or tileSqlite.db")
     print ("-D, --dbname=   specify dbname part of schema if schema only contains file name, default is CONDBR2'")
     print ("-w, --warning   suppress warning messages about missing drawers in DB")
-    
+
 letters = "hr:l:s:t:f:D:w"
 keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","warning"]
 
@@ -33,7 +33,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLOFL_TILE/CONDBR2'
@@ -52,7 +52,7 @@ for o, a in opts:
     elif o in ("-D","--dbname"):
         dbname = a
     elif o in ("-r","--run"):
-        run = int(a) 
+        run = int(a)
     elif o in ("-l","--lumi"):
         lumi = int(a)
     elif o in ("-w","--warning"):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
index fc1d2be13f596d0a7587b59a83d1162734e9c438..802631967f59e3ea8f20e9e3a031c185d7c29a6b 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
@@ -35,7 +35,7 @@ def usage():
     print ("-s, --schema=   specify schema to use, like 'COOLOFL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2' or tileSqlite.db")
     print ("-D, --dbname=   specify dbname part of schema if schema only contains file name, default is CONDBR2'")
     print ("-w, --warning   suppress warning messages about missing drawers in DB")
-    
+
 letters = "hr:l:s:t:f:D:dBHPwm:b:e:a:g:c:N:X:C"
 keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","default","blob","hex","pmt","warning","module=","begin=","end=","chmin=","chmax=","gain=","adc=","chan=","comment"]
 
@@ -46,7 +46,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLOFL_TILE/CONDBR2'
@@ -90,7 +90,7 @@ for o, a in opts:
     elif o in ("-D","--dbname"):
         dbname = a
     elif o in ("-r","--run"):
-        run = int(a) 
+        run = int(a)
     elif o in ("-l","--lumi"):
         lumi = int(a)
     elif o in ("-b","--begin"):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
index 413bd5167618a08f4ef2b344915e0d540bab8514..594dfe326213c4133f71b879c56805f351e50bbf 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
@@ -7,7 +7,7 @@
 # Each Tile cell has 5 values stored in COOL.
 # The first two values are the RMS of a sigle gaussian model of the electronic noise
 # and the pile-up noise normalized at 10^33cm-2s-1, (backwards compatibility)
-# The next three values are used for a two gaussian model. 
+# The next three values are used for a two gaussian model.
 # These are: ratio between first and second gaussian, RMS of the first gaussian, and RMS of the second gaussian
 # change Yuri Smirnov <iouri.smirnov@cern.ch> 2014-12-24
 
@@ -32,7 +32,7 @@ def usage():
     print ("-i, --index=    specify parameter index (0-4), default is -1, means all parameters")
     print ("-b, --brief     print only numbers without character names")
     print ("-d, --double    print values with double precision")
-    
+
 letters = "hs:t:f:r:l:n:c:g:i:bd"
 keywords = ["help","schema=","tag=","folder=","run=","lumi=","channel=","cell=","gain=","index=","brief","double"]
 
@@ -43,7 +43,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run    = 2147483647
 lumi   = 0
 schema = 'OFL2'
@@ -85,7 +85,7 @@ for o, a in opts:
     else:
         usage()
         sys.exit(2)
-        
+
 tile=(chan==48)
 
 import cppyy
@@ -127,7 +127,7 @@ elif schema=='OFL2': # shortcut for COOLOFL_TILE/CONDBR2 or COOLOFL_LAR/CONDBR2
     else:
         schema='COOLOFL_TILE/CONDBR2'
         folderPath='/TILE/OFL02/NOISE/CELL'
-elif schema=='ONLMC': # shortcut for COOLONL_CALO/OFLP200 
+elif schema=='ONLMC': # shortcut for COOLONL_CALO/OFLP200
     schema='COOLONL_CALO/OFLP200'
     folderPath='/CALO/Noise/CellNoise'
     if tag=='UPD4':
@@ -238,7 +238,7 @@ else:
   dm="\t"
 for cell in range(cellmin,cellmax):
   if tile and len(name1[0]):
-    name1[0] = "%s %6s hash " % hashMgr.getNames(cell) 
+    name1[0] = "%s %6s hash " % hashMgr.getNames(cell)
   for gain in range(gainmin,gainmax):
     msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain)
     for index in range(indexmin,indexmax):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
index b8dbc5b6b2c10fc5e3ce3ceb028855b48b290a2d..730d06a13f8e58045babf19a363ef1ad001d0472 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
@@ -5,7 +5,7 @@
 # ReadCellNoiseFromCoolCompare.py
 # based on ReadCellNoiseFromCool.py and ReadFromCoolCompare.py
 # Yuri Smirnov 2015-03-19
-# 
+#
 
 from __future__ import print_function
 
@@ -37,7 +37,7 @@ def usage():
     print ("-w, --wide      wide format - print all values per cell in one line")
     print ("-b, --brief     print only numbers without character names")
     print ("-d, --double    print values with double precision")
-    
+
 letters = "hs:t:f:r:l:s2:t2:f2:r2:l2:m:m2:n:c:g:i:z:wbd"
 keywords = ["help","schema=","tag=","folder=","run=","lumi=","schema2=","tag2=","folder2=","run2=","lumi2=","maxdiff=","maxdiffpercent=","channel=","cell=","gain=","index=","zero=","wide","brief","double"]
 
@@ -48,7 +48,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run    = 2147483647
 run2   = 0      # will be set to "run" if not on command line
 lumi   = 0
@@ -130,7 +130,7 @@ if tag2=="none":
     tag2=tag
 if schema2=="none":
     schema2=schema
-        
+
 tile=(chan==48)
 
 import cppyy
@@ -172,7 +172,7 @@ elif schema=='OFL2': # shortcut for COOLOFL_TILE/CONDBR2 or COOLOFL_LAR/CONDBR2
     else:
         schema='COOLOFL_TILE/CONDBR2'
         folderPath='/TILE/OFL02/NOISE/CELL'
-elif schema=='ONLMC': # shortcut for COOLONL_CALO/OFLP200 
+elif schema=='ONLMC': # shortcut for COOLONL_CALO/OFLP200
     schema='COOLONL_CALO/OFLP200'
     folderPath='/CALO/Noise/CellNoise'
     if tag=='UPD4':
@@ -214,57 +214,57 @@ elif folderPath.startswith('/CALO'):
 elif folderPath.startswith('/LAR'):
     folderTag = 'LARNoiseOflCellNoise-'+tag
 
-#=== Read from COOL server 2:                                                                                                                                                  
+#=== Read from COOL server 2:
 
-if schema2=='ONL': # shortcut for COOLONL_CALO/COMP200                                                                                                                          
+if schema2=='ONL': # shortcut for COOLONL_CALO/COMP200
     schema2='COOLONL_CALO/COMP200'
     folderPath2='/CALO/Noise/CellNoise'
     if tag2=='UPD4':
-        tag2='UPD1-00' # change default to latest RUN1 tag                                                                                                          
-elif schema2=='ONL2': # shortcut for COOLONL_CALO/CONDBR2                                                                                                                       
+        tag2='UPD1-00' # change default to latest RUN1 tag
+elif schema2=='ONL2': # shortcut for COOLONL_CALO/CONDBR2
     schema2='COOLONL_CALO/CONDBR2'
     folderPath2='/CALO/Noise/CellNoise'
     if tag2=='UPD4':
-        tag2='RUN2-UPD1-00' # change default to latest RUN2 tag                                                                                                     
-elif schema2=='OFL': # shortcut for COOLOFL_TILE/COMP200 or COOLOFL_LAR/COMP200                                                                                                 
+        tag2='RUN2-UPD1-00' # change default to latest RUN2 tag
+elif schema2=='OFL': # shortcut for COOLOFL_TILE/COMP200 or COOLOFL_LAR/COMP200
     if chan!=48:
         schema2='COOLOFL_LAR/COMP200'
         folderPath2='/LAR/NoiseOfl/CellNoise'
         if tag2=='UPD4':
-            tag2='UPD4-02' # change default to latest RUN1 tag                                                                                                      
+            tag2='UPD4-02' # change default to latest RUN1 tag
     else:
         schema2='COOLOFL_TILE/COMP200'
         folderPath='/TILE/OFL02/NOISE/CELL'
         if tag2=='UPD4':
-            tag2='UPD4-10' # change default to latest RUN1 tag                                                                                                      
-elif schema2=='OFL2': # shortcut for COOLOFL_TILE/CONDBR2 or COOLOFL_LAR/CONDBR2                                                                                                
+            tag2='UPD4-10' # change default to latest RUN1 tag
+elif schema2=='OFL2': # shortcut for COOLOFL_TILE/CONDBR2 or COOLOFL_LAR/CONDBR2
     if chan!=48:
         schema2='COOLOFL_LAR/CONDBR2'
         folderPath2='/LAR/NoiseOfl/CellNoise'
     else:
         schema2='COOLOFL_TILE/CONDBR2'
         folderPath2='/TILE/OFL02/NOISE/CELL'
-elif schema2=='ONLMC': # shortcut for COOLONL_CALO/OFLP200                                                                                                                      
+elif schema2=='ONLMC': # shortcut for COOLONL_CALO/OFLP200
     schema2='COOLONL_CALO/OFLP200'
     folderPath2='/CALO/Noise/CellNoise'
     if tag2=='UPD4':
-        tag2='IOVDEP-10' # change default to tag used in DC14                                                                                                       
-elif schema2=='OFLMC': # shortcut for COOLOFL_CALO/OFLP200                                                                                                                      
+        tag2='IOVDEP-10' # change default to tag used in DC14
+elif schema2=='OFLMC': # shortcut for COOLOFL_CALO/OFLP200
     schema2='COOLOFL_CALO/OFLP200'
     folderPath2='/CALO/Ofl/Noise/CellNoise'
     if tag2=='UPD4':
-        tag2='IOVDEP-10' # change default to tag used in DC14                                                                                                       
-elif schema2=='MC': # shortcut for COOLOFL_TILE/OFLP200 or COOLOFL_LAR/OFLP200                                                                                                  
+        tag2='IOVDEP-10' # change default to tag used in DC14
+elif schema2=='MC': # shortcut for COOLOFL_TILE/OFLP200 or COOLOFL_LAR/OFLP200
     if chan!=48:
         schema2='COOLOFL_LAR/OFLP200'
         folderPath2='/LAR/NoiseOfl/CellNoise'
         if tag2=='UPD4':
-            tag2='IOVDEP-00' # change default to tag used in DC14                                                                                                   
+            tag2='IOVDEP-00' # change default to tag used in DC14
     else:
         schema2='COOLOFL_TILE/OFLP200'
         folderPath2='/TILE/OFL02/NOISE/CELL'
         if tag2=='UPD4':
-            tag2='IOVDEP-02' # change default to tag used in DC14                                                                                                   
+            tag2='IOVDEP-02' # change default to tag used in DC14
 
 db2 = CaloCondTools.openDbConn(schema2, "READONLY")
 
@@ -342,7 +342,7 @@ else:
   dm="\t"
 for cell in range(cellmin,cellmax):
   if tile and len(name1[0]):
-    name1[0] = "%s %6s hash " % hashMgr.getNames(cell) 
+    name1[0] = "%s %6s hash " % hashMgr.getNames(cell)
   for gain in range(gainmin,gainmax):
     msg="%s%4d %s%d\t" % ( name1[0], cell, name1[1], gain)
     l0=len(msg)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
index 060464dab25f2366c3eb09d68a0fe0a62d12fd56..5b963ca2b28beb608a73a022904457b9a2804ac3 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
@@ -36,7 +36,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLOFL_TILE/CONDBR2'
@@ -81,12 +81,12 @@ if schema=='COOLONL_TILE/COMP200':
     if '/TILE/ONL01' not in folderPath and '/TILE/OFL01' not in folderPath:
         print ("Folder %s doesn't exist in schema %s " % (folderPath,schema) )
         sys.exit(2)
-        
+
 if schema=='COOLONL_TILE/CONDBR2':
     if '/TILE/ONL01' not in folderPath:
         print ("Folder %s doesn't exist in schema %s " % (folderPath,schema) )
         sys.exit(2)
-        
+
 if schema=='COOLOFL_TILE/COMP200' or schema=='COOLOFL_TILE/CONDBR2':
     if '/TILE/OFL02' not in folderPath:
         print ("Folder %s doesn't exist in schema %s " % (folderPath,schema) )
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
index 404d8953d3d3c7e17c387dd985757c1e17819a2f..52667365463343fb9377d71798a625678d9f6f82 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
@@ -144,7 +144,7 @@ connStr2=schema2+'/'+instance2
 if sqlfn == 'none':
     db = TileCalibTools.openDbConn(connStr, 'READONLY')
 else:
-    db = TileCalibTools.openDb('SQLITE', instance, 'READONLY',schema,sqlfn)        
+    db = TileCalibTools.openDb('SQLITE', instance, 'READONLY',schema,sqlfn)
 if sqlfn2 == 'none':
     db2 = TileCalibTools.openDbConn(connStr2, 'READONLY')
 else:
@@ -261,7 +261,7 @@ answ='n'
 #=== get value for a gived channel
 for ros in range(0,5):
     for mod in range(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
-        modName = TileCalibUtils.getDrawerString(ros,mod)        
+        modName = TileCalibUtils.getDrawerString(ros,mod)
         #log.info("ros %d, drawer %s at run %d" % (ros, modName, run))
         flt = blobReader.getDrawer(ros, mod,(run,lumi), False, False)
         flt2 = blobReader2.getDrawer(ros, mod,(run2,lumi2), False, False)
@@ -298,14 +298,14 @@ for ros in range(0,5):
                             if ot==30: # integers
                                 f.write('%s chann %2d adc %d ind %d val1 %d val2 %d  diff %d \n' % (modName,chn,adc,ind,v[ind],v2[ind],dv12))
                             elif ot==20: # bad channels
-                                f.write('%s chann %2d adc %d ind %d val1 %s val2 %s  diff %f \n' % (modName,chn,adc,ind,hex(int(v[ind])),hex(int(v2[ind])),dv12))                             
+                                f.write('%s chann %2d adc %d ind %d val1 %s val2 %s  diff %f \n' % (modName,chn,adc,ind,hex(int(v[ind])),hex(int(v2[ind])),dv12))
                             else:       # floats
                                 f.write('%s chann %2d adc %d ind %d val1 %.4f val2 %.4f  diff %.4f %.2f%%\n' % (modName,chn,adc,ind,v[ind],v2[ind],dv12,dv12percent))
                                 if writedif and adc==0 and ind==0:
                                     fd.write("%s ch %2d %.4f\n" % (modName,chn,dv12))
-                                
+
 #                        f.write(s + "\n")
-                    
+
 #=== close DB and output file
 db.closeDatabase()
 db2.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
index f3239937b502224bb78f63b37eed640b23b5ac23..ca5b14d60b8764fbd935d0dc88e1ea82186e0c67 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
@@ -24,7 +24,7 @@ def usage():
     print ("-c, --channel=  specify channel number, default is 0")
     print ("-g, -a, --adc=  specify gain (adc number), default is 0")
     print ("-s, --schema=   specify schema to use, like 'COOLOFL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2'")
-    
+
 letters = "hr:l:s:t:f:p:d:c:a:g:"
 keywords = ["help","run=","lumi=","schema=","tag=","folder=","ros=","drawer=","channel=","adc=","gain="]
 
@@ -35,7 +35,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLOFL_TILE/CONDBR2'
@@ -76,12 +76,12 @@ if schema=='COOLONL_TILE/COMP200':
     if '/TILE/ONL01' not in folderPath and '/TILE/OFL01' not in folderPath:
         print ("Folder %s doesn't exist in schema %s " % (folderPath,schema) )
         sys.exit(2)
-        
+
 if schema=='COOLONL_TILE/CONDBR2':
     if '/TILE/ONL01' not in folderPath:
         print ("Folder %s doesn't exist in schema %s " % (folderPath,schema) )
         sys.exit(2)
-        
+
 if schema=='COOLOFL_TILE/COMP200' or schema=='COOLOFL_TILE/CONDBR2':
     if '/TILE/OFL02' not in folderPath:
         print ("Folder %s doesn't exist in schema %s " % (folderPath,schema) )
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
index 0431da2bf72612ae918b9ecf2bf88072e68635ef..a8410a77b56614be85f1dc43a3e3851bcc2c6c37 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
@@ -23,7 +23,7 @@ def usage():
     print ("-c, --channel=  specify channel number, default is 0")
     print ("-g, -a, --adc=  specify gain (adc number), default is 0")
     print ("-s, --schema=   specify schema to use, like 'COOLONL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2'")
-    
+
 letters = "hr:l:s:t:p:d:c:a:g:"
 keywords = ["help","run=","lumi=","schema=","tag=","ros=","drawer=","channel=","adc=","gain="]
 
@@ -34,7 +34,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLONL_TILE/CONDBR2'
@@ -50,7 +50,7 @@ for o, a in opts:
     elif o in ("-s","--schema"):
         schema = a
     elif o in ("-r","--run"):
-        run = int(a) 
+        run = int(a)
     elif o in ("-l","--lumi"):
         lumi = int(a)
     elif o in ("-p","--ros"):
@@ -67,12 +67,12 @@ for o, a in opts:
     else:
         assert False, "unhandeled option"
 
-        
+
 if 'COOLONL_TILE' not in schema and 'sqlite' not in schema:
     print ("This script works on the 'COOLONL_TILE/COMP200' or 'COOLONL_TILE/CONDBR2' schema" )
     sys.exit(2)
 
-        
+
 from TileCalibBlobPython import TileCalibTools
 from TileCalibBlobObjs.Classes import TileCalibUtils
 
@@ -102,10 +102,10 @@ for folderPath in [folder1, folder2]:
         ped = blob.getData(channel, adc, 0)
         hfn = blob.getData(channel, adc, 1)
         lfn = blob.getData(channel, adc, 2)
-    else:    
+    else:
         rms = blob.getData(channel, adc, 0)
         plp = blob.getData(channel, adc, 1)
-        
+
 log.info( "\n" )
 print ( "%s ch %i gn %i :  PED = %f  HFN = %f  LFN = %f    OF_RMS = %f  PILEUP = %f" %
         ( TileCalibUtils.getDrawerString(ros,drawer), channel, adc,
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
index 505f8eb31b5709cb82aa36cffcf1c7a0bf0df783..ab85b4a6238f9a4d0c74e6a67eb2b471287a2376 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
@@ -24,7 +24,7 @@ def usage():
     print ("-g, -a, --adc=  specify gain (adc number), default is 0")
     print ("-i, --field=    specify field number, default is 0")
     print ("-s, --schema=   specify schema to use, like 'COOLONL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2'")
-    
+
 letters = "hr:l:s:t:f:p:d:c:a:g:i:"
 keywords = ["help","run=","lumi=","schema=","tag=","folder=","ros=","drawer=","channel=","adc=","gain=","field="]
 
@@ -35,7 +35,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLONL_TILE/CONDBR2'
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
index d2e753d1903186b847981b0c0b663480379fe30b..e6e40e5985fbef50dbc308438d466be06ab3e707 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
@@ -19,7 +19,7 @@ def usage():
     print ("-r, --run=     specify run  number, by default uses latest iov")
     print ("-l, --lumi=    specify lumi block number, default is 0")
     print ("-s, --schema=  specify schema to use, like 'COOLOFL_TILE/OFLP200' or 'sqlite://;schema=tileSqlite.db;dbname=OFLP200'")
-    
+
 letters = "hr:l:s:t:f:"
 keywords = ["help","run=","lumi=","schema=","tag=","folder="]
 
@@ -30,7 +30,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLOFL_TILE/OFLP200'
@@ -39,13 +39,13 @@ tag = "SDR-BS8T-10"
 
 for o, a in opts:
     if o in ("-f","--folder"):
-        folderPath = "/TILE/%s/STATUS/ADC" % a 
+        folderPath = "/TILE/%s/STATUS/ADC" % a
     elif  o in ("-t","--tag"):
         tag = a
     elif o in ("-s","--schema"):
         schema = a
     elif o in ("-r","--run"):
-        run = int(a) 
+        run = int(a)
     elif o in ("-l","--lumi"):
         lumi = int(a)
     elif o in ("-h","--help"):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py
index 9ff49c43e812c72ab151e4071705e436d9b15679..9bdce3d1f954d61277933c3605810194762b6ab2 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py
@@ -23,7 +23,7 @@ log.setLevel(logging.DEBUG)
 #________________________________________________________________________
 def fillAutoCr(filePed, tag, since,
                until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
-    
+
     #=== construct folder path
     folder = TileCalibTools.getTilePrefix(True,True)+"NOISE/AUTOCR"
 
@@ -36,10 +36,10 @@ def fillAutoCr(filePed, tag, since,
         default.push_back(0.)
     defVec = cppyy.gbl.std.vector('std::vector<float>')()
     defVec.push_back(default)
-    defVec.push_back(default)    
-    
+    defVec.push_back(default)
+
     #=====================================================
-    #=== fill 
+    #=== fill
     #=====================================================
     writer = TileCalibTools.TileBlobWriter(db,folder,'Flt')
     writer.setComment(os.getlogin(),"Giulio's file for LBC test n.0, 2009-02-27")
@@ -70,7 +70,7 @@ def fillAutoCr(filePed, tag, since,
                     calibDrawer.init(defVec,48,1)
                 #=== fill in realistic values
                 for adc in range(2):
-                    line = "%i/%2i/%2i/%i: " % (ros,mod,chn,adc)            
+                    line = "%i/%2i/%2i/%i: " % (ros,mod,chn,adc)
                     for i in range(6):
                         value = float(values[adc*6+i])
                         calibDrawer.setData(chn,adc,i,value)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
index 408041a9431a1e836143e3f5bcdbedaca58a3f87..bec47e9657c16a53d476d22924c19a4792b3ec42 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
@@ -20,18 +20,18 @@ log.setLevel(logging.DEBUG)
 #_______________________________________________________________________________
 def fillBadChannels(db ,tag, bchFile,
                     since, until=(TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)):
-    
+
     #=== ADC status folder (write to ONLINE from M7 onwards!)
 ##    folder = TileCalibTools.getTilePrefix(False)+"STATUS/ADC"
     folder="/TILE/OFL02/STATUS/ADC"
     #=== create bad channel manager
     mgr = TileBchTools.TileBchMgr()
     mgr.setLogLvl(logging.DEBUG)
-    
+
     #=== always initialize with no bad channels
     log.info("Initializing with no bad channels at tag=%s and time=%s", tag,(0,0))
     mgr.initialize(db, folder, tag, since)
-    
+
     #=== update from file
     log.info("Updating from file %s", bchFile)
     mgr.updateFromFile(bchFile)
@@ -43,7 +43,7 @@ def fillBadChannels(db ,tag, bchFile,
     #=== print bad channels
     log.info("bad channels after update")
     mgr.listBadAdcs()
-    
+
     #=== commit changes
     #--- to ONLINE folder, i.e. tag="" and using onl01 bit pattern
 ##    mgr.commitToDb(db, folder, "", TileBchDecoder.BitPat_onl01, os.getlogin(), bchFile, since, until)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
index 8b2d5b2ef8a44e9e5591223d636800e68c064b34..93dfc011cd60e784b079ad599596338a0c1fee54 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
@@ -26,7 +26,7 @@ folder = TileCalibTools.getTilePrefix(True,True)+"STATUS/ADC"
 
 #=== specify folder and tag
 folderTag = TileCalibUtils.getFullTag(folder, "COM-04")
-    
+
 #=== create bad channel manager
 mgr = TileBchTools.TileBchMgr()
 mgr.setLogLvl(logging.DEBUG)
@@ -40,35 +40,35 @@ mgr.initialize(db, folder, folderTag, (0,0))
 
 #=== ADC problems
 mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.GeneralMaskAdc)
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.AdcDead)                    
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.StuckBit)                   
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.DataCorruption)             
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.VeryLargeHfNoise)           
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoData)                     
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.WrongDspConfig)             
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.AdcDead)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.StuckBit)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.DataCorruption)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.VeryLargeHfNoise)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoData)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.WrongDspConfig)
 #--- impact on data quality
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.LargeHfNoise)               
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.CorrelatedNoise)            
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.LargeLfNoise)               
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoCis)                      
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.BadCis)                     
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.LargeHfNoise)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.CorrelatedNoise)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.LargeLfNoise)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoCis)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.BadCis)
 
 #=== Channel problems
 #--- serious problems
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.GeneralMaskChannel)         
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoPmt)                      
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoHV)                       
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.WrongHV)                    
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.GeneralMaskChannel)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoPmt)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoHV)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.WrongHV)
 #--- impact on data quality
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoLaser)                    
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.BadLaser)                   
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoCesium)                   
-mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.BadCesium)                  
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoLaser)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.BadLaser)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.NoCesium)
+mgr.addAdcProblem(0, 1, 0, 0, TileBchPrbs.BadCesium)
 
 #=== Define TileBchStatus.isNoisy()
-# mgr.addAdcProblem(0, 1, 1, 0, TileBchPrbs.LargeHfNoise)               
+# mgr.addAdcProblem(0, 1, 1, 0, TileBchPrbs.LargeHfNoise)
 # mgr.addAdcProblem(0, 1, 1, 0, TileBchPrbs.CorrelatedNoise)
-# mgr.addAdcProblem(0, 1, 1, 0, TileBchPrbs.LargeLfNoise)               
+# mgr.addAdcProblem(0, 1, 1, 0, TileBchPrbs.LargeLfNoise)
 
 #=== Tuples of empty channels
 emptyChannelLongBarrel =     (30, 31, 43)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
index 6a9b012f01d20519e5c52019626611b89cd8d4fb..fc9500b903c3f25b5f4b40d3ee02aa812c970ca5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
@@ -26,7 +26,7 @@ folder = TileCalibTools.getTilePrefix(ofl=False)+"STATUS/ADC"
 
 #=== no tag for online folder
 folderTag = ""
-    
+
 #=== create bad channel manager
 mgr = TileBchTools.TileBchMgr()
 mgr.setLogLvl(logging.DEBUG)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py
index 2d82f8982ccca73054d02ab3957e02adde5081a2..adcfa6c5ab4861babfc4180c35183efad347ca1e 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py
@@ -22,7 +22,7 @@ log.setLevel(logging.DEBUG)
 #________________________________________________________________________
 def fillIntegrator(fileInt, tag, since,
                    until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
-    
+
     #=== construct folder path
     folder = TileCalibTools.getTilePrefix(True,True)+"INTEGRATOR"
 
@@ -36,11 +36,11 @@ def fillIntegrator(fileInt, tag, since,
     # RMS of pedestal distribution, sigma of the RMS
 
     dv = []
-    dv.append((  2.814, 0.023, -1, -1, 80, -1, -1, -1)) 
-    dv.append(( 26.010, 0.230, -1, -1, 80, -1, -1, -1)) 
-    dv.append(( 28.810, 0.240, -1, -1, 80, -1, -1, -1)) 
-    dv.append(( 54.810, 0.480, -1, -1, 70, -1, -1, -1)) 
-    dv.append(( 75.790, 0.677, -1, -1, 70, -1, -1, -1)) 
+    dv.append((  2.814, 0.023, -1, -1, 80, -1, -1, -1))
+    dv.append(( 26.010, 0.230, -1, -1, 80, -1, -1, -1))
+    dv.append(( 28.810, 0.240, -1, -1, 80, -1, -1, -1))
+    dv.append(( 54.810, 0.480, -1, -1, 70, -1, -1, -1))
+    dv.append(( 75.790, 0.677, -1, -1, 70, -1, -1, -1))
     dv.append((101.800, 0.900, -1, -1, 70, -1, -1, -1))
 
     #=== number of integrator gains and value per gain
@@ -54,9 +54,9 @@ def fillIntegrator(fileInt, tag, since,
         for v in dv[i]:
             defaultGain.push_back(v)
         defVec.push_back(defaultGain)
-    
+
     #=====================================================
-    #=== fill 
+    #=== fill
     #=====================================================
     writer = TileCalibTools.TileBlobWriter(db,folder,'Flt')
     writer.setComment(os.getlogin(),"Jalal's values with non-zero defaults, 2008-12-05")
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
index 1d23bb36106b6a395afae0fd0eef9de05a59d68a..832d1a6ff239d47fd97314b1d021dea274471fe4 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
@@ -76,7 +76,7 @@ for fileName in [ofcFiles[0]]:
 
     #=== loop over all drawers (COOL channels)
     for chan in range(276):
-        
+
         data = cool.Record( spec )
         blob = data['TileCalibBlobOfc']
 
@@ -90,7 +90,7 @@ for fileName in [ofcFiles[0]]:
             for phase in range(-1000,1001):
                 phases.push_back(phase/10.)
             drawerOfc.setPhases(0,0,phases)
-    
+
             #=== read file and fill OFCs
             phase   = -1000
             channel = 0
@@ -130,7 +130,7 @@ for fileName in [ofcFiles[0]]:
                 if sample>6:
                     sample = 0
                     phase += 1
-                    
+
         #=== store blob in folder/channel
         channelId = cool.ChannelId(chan)
         folder.storeObject(iovSince, iovUntil, data, channelId)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py
index 55efd88267cf001e90b736a64162337ccf11e7cb..fce96def64f3872fb3c4bd8a94bcaa52e937a8d3 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py
@@ -23,7 +23,7 @@ log.setLevel(logging.DEBUG)
 #________________________________________________________________________
 def fillPed(filePed, tag, comment, since,
             until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
-    
+
     #=== construct folder path
     folder = TileCalibTools.getTilePrefix(True,True)+"NOISE/SAMPLE"
 
@@ -35,12 +35,12 @@ def fillPed(filePed, tag, comment, since,
     loGainDef = 0.8
     hiGainDef = 1.6
     defaultLo = cppyy.gbl.std.vector('float')()
-    defaultLo.push_back(pedDef[0]) # pedestal mean value  
+    defaultLo.push_back(pedDef[0]) # pedestal mean value
     defaultLo.push_back(loGainDef) # pedestal rms
     defaultLo.push_back(0.0)       # pedestal low frequency noise
-    defaultLo.push_back(loGainDef) # pedestal HFN1 
-    defaultLo.push_back(0.0)       # pedestal HFN2 
-    defaultLo.push_back(0.0)       # pedestal HFN2/HFN1 ratio 
+    defaultLo.push_back(loGainDef) # pedestal HFN1
+    defaultLo.push_back(0.0)       # pedestal HFN2
+    defaultLo.push_back(0.0)       # pedestal HFN2/HFN1 ratio
     defaultHi = cppyy.gbl.std.vector('float')()
     defaultHi.push_back(pedDef[1]) # pedestal mean value
     defaultHi.push_back(hiGainDef) # pedestal rms
@@ -51,9 +51,9 @@ def fillPed(filePed, tag, comment, since,
     defVec = cppyy.gbl.std.vector('std::vector<float>')()
     defVec.push_back(defaultLo)
     defVec.push_back(defaultHi)
-    
+
     #=====================================================
-    #=== fill 
+    #=== fill
     #=====================================================
     writer = TileCalibTools.TileBlobWriter(db,folder,'Flt')
     writer.setComment(os.getlogin(),comment)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py
index 4c9cd2aa82cd31878e0577771b0897147504f841..27793d0c8c741f3944c62db1997a27cd1138ebce 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py
@@ -21,7 +21,7 @@ log.setLevel(logging.DEBUG)
 #________________________________________________________________________
 def fillTileMuId(file, since,
                until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
-    
+
     #=== construct folder path
     folder = TileCalibTools.getTilePrefix(False)+"MUID"
 
@@ -32,10 +32,10 @@ def fillTileMuId(file, since,
         default.push_back(5000.)
     defVec = cppyy.gbl.std.vector('std::vector<float>')()
     defVec.push_back(default)
-    defVec.push_back(default)    
-    
+    defVec.push_back(default)
+
     #=====================================================
-    #=== fill 
+    #=== fill
     #=====================================================
     writer = TileCalibTools.TileBlobWriter(db,folder,'Flt',False)
     writer.setComment(os.getlogin(),"Arantxa's values, april 2009.")
@@ -67,7 +67,7 @@ def fillTileMuId(file, since,
                 calibDrawer.init(defVec,48,1)
             #=== fill in realistic values (just for the low gain index, store 40 values)
             adc = 0
-            line = "%i/%2i/%2i/%i: " % (ros,mod,chn,adc)            
+            line = "%i/%2i/%2i/%i: " % (ros,mod,chn,adc)
             for i in range(40):
                 value = float(values[i])
                 calibDrawer.setData(chn,adc,i,value)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
index 026e2130c05049d5797983bdd65cdfb21ad95c9c..57533148149bba6186c5d86e6dc2a50e4bba6215 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
@@ -45,7 +45,7 @@ def fillTimingTc(fileTclas, tag, since,
     for mod in range(20):
         flt = tclasWriter.zeroBlob(ros,mod)
     flt = tclasWriter.getDrawer(0, 0)
-    flt.init(defTclas,1,0)        
+    flt.init(defTclas,1,0)
     #=== loop over whole detector
     for ros in range(1,5):
         for mod in range(64):
@@ -98,7 +98,7 @@ def fillTimingTd(fileTdlas, tag, since,
     for mod in range(20):
         flt = tdlasWriter.zeroBlob(ros,mod)
     flt = tdlasWriter.getDrawer(0, 0)
-    flt.init(defTdlas,1,0)    
+    flt.init(defTdlas,1,0)
     #=== loop over whole detector
     for ros in range(1,5):
         for mod in range(64):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
index 74e3e3bb0e0442016463f480cef054654a76b85b..b7cdb027f27cb640f8f3fb38260226d279477736 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
@@ -6,7 +6,7 @@
 from __future__ import print_function
 
 import getopt,sys
- 
+
 def usage():
     print ("Usage: ",sys.argv[0]," [OPTION] ... ")
     print ("Write the TileCal drawer trips probabilities from ASCII file into local sqlite file")
@@ -42,14 +42,14 @@ for o, a in opts:
     elif o in ("-t","--tag"):
         tag = a
     elif o in ("-f","--folder"):
-        folderPath = "/TILE/%s/STATUS/ADC" % a    
+        folderPath = "/TILE/%s/STATUS/ADC" % a
     elif o in ("-h","--help"):
         usage()
         sys.exit(2)
     else:
         assert False, "unhandled option"
 
- 
+
 import cppyy
 
 from TileCalibBlobPython import TileCalibTools
@@ -65,25 +65,25 @@ log.setLevel(logging.DEBUG)
 #________________________________________________________________________
 def fillTripsProbs(fileTrips, folderPath, tag, since
                    , until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)):
-    
+
 
     #=== get full folder tag
     folderTag = TileCalibUtils.getFullTag(folderPath, tag)
 
     util = cppyy.gbl.TileCalibUtils()
-    
+
     default = cppyy.gbl.std.vector('unsigned int')()
     for i in range(util.max_drawer() + 1):
         default.push_back( 0 )
 
-    defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()  
+    defVec = cppyy.gbl.std.vector('std::vector<unsigned int>')()
     defVec.push_back(default)
-    
+
     #=====================================================
-    #=== fill 
+    #=== fill
     #=====================================================
     writer = TileCalibTools.TileBlobWriter(db, folderPath, 'Bch')
-   
+
     precisions = [[0 for drawer in range(util.max_drawer())] for ros in range(util.max_ros())]
     trips = [[0 for drawer in range(util.max_drawer())] for ros in range(util.max_ros())]
 
@@ -97,7 +97,7 @@ def fillTripsProbs(fileTrips, folderPath, tag, since
         precisions[ros][mod] = len(trip[0]) - 2
         trips[ros][mod] = float(trip[0])
 
-    
+
     tripsCalibDrawer = writer.getDrawer(util.trips_ros(), util.trips_drawer())
     tripsCalibDrawer.init(defVec, util.max_ros(), 1)
 
@@ -113,7 +113,7 @@ def fillTripsProbs(fileTrips, folderPath, tag, since
     #=== register in DB
     writer.register(since, until, folderTag)
 
-    
+
 #===================================================================
 #====================== FILL DB BELOW ==============================
 #===================================================================
@@ -128,6 +128,6 @@ fillTripsProbs(fileName, folderPath, tag, (runfrom,0))
 #=== close the database connection
 db.closeDatabase()
 
-   
-    
-    
+
+
+
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
index 2ed4cdd0b0d0366029a7f83da526cfd7e300e9a0..409fe2f72c73ce954d2f514e91b467a44e3cf6ca 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
@@ -135,7 +135,7 @@ for ros in range(1,5):
 
                 if copyall or statlo.isBad() or stathi.isBad():
                     #--- add IgnoreInHlt if either of the ADCs has isBad
-                    #--- add OnlineGeneralMaskAdc if the ADCs has isBad            
+                    #--- add OnlineGeneralMaskAdc if the ADCs has isBad
                     if statlo.isBad() and stathi.isBad():
                         mgr2.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.IgnoredInHlt)
                         mgr2.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.OnlineGeneralMaskAdc)
@@ -157,7 +157,7 @@ for ros in range(1,5):
                         mgr2.delAdcProblem(ros, mod, chn, 0, TileBchPrbs.OnlineGeneralMaskAdc)
                         mgr2.delAdcProblem(ros, mod, chn, 1, TileBchPrbs.IgnoredInHlt)
                         mgr2.delAdcProblem(ros, mod, chn, 1, TileBchPrbs.OnlineGeneralMaskAdc)
-            
+
                     #--- add OnlineBadTiming if either of the ADCs has isBadTiming
                     if statlo.isBadTiming() or stathi.isBadTiming():
                         mgr2.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.OnlineBadTiming)
@@ -176,7 +176,7 @@ for ros in range(1,5):
                         mgr2.delAdcProblem(ros, mod, chn, 0, TileBchPrbs.OnlineTimingDmuBcOffset)
                         mgr2.delAdcProblem(ros, mod, chn, 1, TileBchPrbs.OnlineTimingDmuBcOffset)
             else:
-                if copyall or (statlo.isBad() and not mgr2.getAdcStatus(ros, mod, chn, 0).isBad()): 
+                if copyall or (statlo.isBad() and not mgr2.getAdcStatus(ros, mod, chn, 0).isBad()):
                     mgr2.setAdcStatus(ros,mod,chn,0,statlo)
                 if copyall or (stathi.isBad() and not mgr2.getAdcStatus(ros, mod, chn, 1).isBad()):
                     mgr2.setAdcStatus(ros,mod,chn,1,stathi)
@@ -195,7 +195,7 @@ for ros in range(1,5):
                             if pb:
                                 msg += "  =>"
                             else:
-                                msg = "%s %2i %1i " % (modName, chn, adc) 
+                                msg = "%s %2i %1i " % (modName, chn, adc)
                             prbs = pbm[adc+pb*2]
                             if len(prbs):
                                 for prbCode in sorted(prbs.keys()):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
index 05d3b04adfe53f968a23f9bababd0db517a96c91..4cc28c918575eeb965ea43da7cc13d8350e0953a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
@@ -106,7 +106,7 @@ for ros in range(1,5):
                         mgrOnl.addAdcProblem(ros, mod, chn, 1, prb)
 
             #--- add IgnoreInHlt if either of the ADCs has isBad
-            #--- add OnlineGeneralMaskAdc if the ADCs has isBad            
+            #--- add OnlineGeneralMaskAdc if the ADCs has isBad
             if statlo.isBad() and stathi.isBad():
                 mgrOnl.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.IgnoredInHlt)
                 mgrOnl.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.OnlineGeneralMaskAdc)
@@ -160,7 +160,7 @@ for ros in range(1,5):
                             if pb:
                                 msg += "  =>"
                             else:
-                                msg = "%s %2i %1i " % (modName, chn, adc) 
+                                msg = "%s %2i %1i " % (modName, chn, adc)
                             prbs = pbm[adc+pb*2]
                             if len(prbs):
                                 for prbCode in sorted(prbs.keys()):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileTcfib.dat b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileTcfib.dat
index fe8d73ff98efd842c8ebd52f60ae222fd0894f03..8e2b48c706b40253516cabde392546bdba109a8d 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileTcfib.dat
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileTcfib.dat
@@ -1,4 +1,4 @@
-# This file contains the relative length of 
+# This file contains the relative length of
 # fibers to each pmt within a drawer in ns
 #
 Tfib    0x100   0    0
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
index 65c6ab0c06f5a2fd017eba69cdc4cb2c42f7291a..ea5ffa429817183b88bfc08f7d01c180249d716d 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
@@ -8,7 +8,7 @@
 
 from __future__ import print_function
 
-import getopt,sys,os
+import getopt,sys,os,bisect
 os.environ['TERM'] = 'linux'
 
 def usage():
@@ -20,10 +20,16 @@ def usage():
     print ("-t, --tag=      specify tag to use, default is RUN2-HLT-UPD1-00")
     print ("-r, --run=      specify run  number, default is 0")
     print ("-l, --lumi=     specify lumi block number, default is 0")
+    print ("-b, --begin=    specify run number of first iov in multi-iov mode, by default uses very first iov")
+    print ("-e, --end=      specify run number of last iov in multi-iov mode, by default uses latest iov")
+    print ("-L, --endlumi=  specify lumi block number for last iov in multi-iov mode, default is 0")
+    print ("-A, --adjust    in multi-iov mode adjust iov boundaries to nearest iov available in DB, default is False")
+    print ("-M, --module=   specify module to use in multi-IOV update, default is all")
     print ("-m, --mode=     specify update mode: 1 or 2; if not set - choosen automatically, depending on schema")
-    print ("-c, --comment=    specify comment which should be written to DB")
+    print ("-c, --comment=    specify comment which should be written to DB, in multi-iov mode it is appended to old comment")
+    print ("-C, --Comment=    specify comment which should be written to DB, in mutli-iov mode it overwrites old comment")
     print ("-U, --user=       specify username for comment")
-    print ("-e, --execfile=   specify python file which should be executed, default is bch.py")
+    print ("-x, --execfile=   specify python file which should be executed, default is bch.py")
     print ("-i, --inschema=   specify the input schema to use, default is 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_TILE;dbname=CONDBR2'")
     print ("-o, --outschema=  specify the output schema to use, default is 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2'")
     print ("-n, --online      write additional sqlite file with online bad channel status")
@@ -31,9 +37,9 @@ def usage():
     print ("-v, --verbose     verbose mode")
     print ("-s, --schema=     specify input/output schema to use when both input and output schemas are the same")
     print ("-u  --update      set this flag if output sqlite file should be updated, otherwise it'll be recreated")
-    
-letters = "hr:l:m:s:i:o:t:f:e:c:U:npvu"
-keywords = ["help","run=","lumi=","mode=","schema=","inschema=","outschema=","tag=","folder=","execfile=","comment=","user=","online","upd4","verbose","update"]
+
+letters = "hr:l:b:e:L:AM:m:s:i:o:t:f:x:c:C:U:npvu"
+keywords = ["help","run=","lumi=","begin=","end=","endlumi=","adjust","module=","mode=","schema=","inschema=","outschema=","tag=","folder=","execfile=","comment=","Comment=","user=","online","upd4","verbose","update"]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:], letters, keywords)
@@ -42,7 +48,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = -1
 lumi = 0
 mode = 0
@@ -56,8 +62,16 @@ curSuffix = ""
 tag = "UPD1"
 execFile = "bch.py"
 comment = ""
+Comment = None
 verbose = False
 update = False
+iov = False
+beg = 0
+end = 2147483647
+endlumi = 0
+moduleList = []
+adjust = False
+
 try:
     user=os.getlogin()
 except Exception:
@@ -86,12 +100,27 @@ for o, a in opts:
         run = int(a)
     elif o in ("-l","--lumi"):
         lumi = int(a)
+    elif o in ("-b","--begin"):
+        beg = int(a)
+        iov = True
+    elif o in ("-e","--end"):
+        end = int(a)
+        iov = True
+    elif o in ("-L","--endlumi"):
+        endlumi = int(a)
+    elif o in ("-A","--adjust"):
+        adjust = True
+    elif o in ("-M","--module"):
+        moduleList += a.split(",")
     elif o in ("-m","--mode"):
         mode = int(a)
-    elif o in ("-e","--execfile"):
+    elif o in ("-x","--execfile"):
         execFile = a
     elif o in ("-c","--comment"):
         comment = a
+    elif o in ("-C","--Comment"):
+        Comment = a
+        comment = a
     elif o in ("-U","--user"):
         user = a
     elif o in ("-v","--verbose"):
@@ -103,7 +132,7 @@ for o, a in opts:
         assert False, "unhandeled option"
 
 onl=("/TILE/ONL01" in folderPath)
-if onl: 
+if onl:
     if inSchema == oraSchema:
         inSchema = inSchema.replace("COOLOFL","COOLONL")
     oraSchema = oraSchema.replace("COOLOFL","COOLONL")
@@ -117,7 +146,12 @@ update = update or (inSchema==outSchema)
 
 from TileCalibBlobPython import TileCalibTools
 from TileCalibBlobPython import TileBchTools
-from TileCalibBlobObjs.Classes import TileBchPrbs, TileBchDecoder
+from TileCalibBlobObjs.Classes import TileBchPrbs, TileBchDecoder, TileCalibUtils
+
+if iov and end >= TileCalibTools.MAXRUN:
+    end = TileCalibTools.MAXRUN
+    endlumi = TileCalibTools.MAXLBK
+until = (TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)
 
 from TileCalibBlobPython.TileCalibLogger import getLogger
 log = getLogger("WriteBchToCool")
@@ -126,12 +160,125 @@ log.setLevel(logging.DEBUG)
 
 dbr = TileCalibTools.openDbConn(inSchema,'READONLY')
 folderTag = TileCalibTools.getFolderTag(dbr, folderPath, tag)
+log.info("Initializing bad channels from %s folder %s with tag %s", inSchema, folderPath, tag)
+
+iovList = []
+iovUntil = []
+iovListMOD = []
+iovListCMT = []
+iovUntilCMT = []
+blobReader = TileCalibTools.TileBlobReader(dbr,folderPath, folderTag)
+if iov:
+    #=== filling the iovList
+    log.info( "Looking for IOVs" )
+    if moduleList!=['CMT']:
+        for ros in range(1,5):
+            for mod in range(0,64):
+                modName = TileCalibUtils.getDrawerString(ros,mod)
+                if len(moduleList)>0 and modName not in moduleList and 'ALL' not in moduleList:
+                    continue
+                iovList += blobReader.getIOVsWithinRange(ros,mod)
+    if 'CMT' in moduleList:
+        iovListMOD = iovList
+        iovListCMT = blobReader.getIOVsWithinRange(-1,1000)
+        if len(iovList)==0:
+            iovList = iovListCMT
+
+    import functools
+    def compare(item1,item2):
+        if item1[0]!=item2[0]:
+            return item1[0]-item2[0]
+        else:
+            return item1[1]-item2[1]
+    iovList=list(set(iovList))
+    iovList=sorted(iovList,key=functools.cmp_to_key(compare))
+    iovList+=[until]
+    iovListCMT+=[until]
+
+    since=(beg,lumi)
+    ib=bisect.bisect(iovList,since)-1
+    if ib<0:
+        ib=0
+    if iovList[ib] != since:
+        if adjust:
+            since = iovList[ib]
+            log.info( "Moving beginning of first IOV with new bad channels from (%d,%d) to (%d,%d)", beg,lumi,since[0],since[1])
+        else:
+            iovList[ib] = since
+            log.info( "Creating new IOV starting from (%d,%d) with new bad channels", beg,lumi)
+
+    if end<0:
+        ie=ib+1
+        if ie>=len(iovList):
+            ie=ib
+        until=iovList[ie]
+        log.info( "Next IOV without new bad channels starts from (%d,%d)", until[0],until[1])
+    else:
+        until=(end,endlumi)
+        ie=bisect.bisect_left(iovList,until)
+        if ie>=len(iovList):
+            ie=len(iovList)-1
+
+        if iovList[ie] != until:
+            if adjust:
+                until=iovList[ie]
+                log.info( "Moving end of last IOV from (%d,%d) to (%d,%d)", end,endlumi,until[0],until[1])
+            else:
+                log.info( "Keeping end of last IOV at (%d,%d) - new IOV is shorter than IOV in input DB", end,endlumi)
+                iovList[ie] = until
+
+
+    iovList = iovList[ib:ie]
+    iovUntil = iovList[1:] + [until]
+    begin = since
+    run = since[0]
+    lumi = since[1]
+    log.info( "IOVs: %s", str(iovList) )
+
+    if len(iovListMOD)>0 and len(iovListCMT)>0:
+        if Comment is None:
+            iovList += [until]  # one more IOV for "UNDO" comment
+            iovUntil += [until] # one more IOV for "UNDO" comment
+        iovUntilCMT = []
+        for io,since in enumerate(iovList):
+            p = bisect.bisect(iovListCMT,since)
+            if p<len(iovListCMT):
+                iovUntilCMT += [iovListCMT[p]]
+                if iovUntil[io] != iovListCMT[p]:
+                    log.info( "End of iov %s in comments record is %s", str(since),str(iovListCMT[p]))
+            else:
+                if since!=until:
+                    iovUntilCMT += [since]
+                else:
+                    iovList.pop(-1)
+                    break
+    else:
+        iovUntilCMT = iovUntil
+
+    log.info( "%d IOVs in total, end of last IOV is %s", ie-ib,str(until))
 
-if run < 0:
-    since = (TileCalibTools.MAXRUN, TileCalibTools.MAXLBK - 1) 
 else:
+    #=== set run number
+    if run<0:
+        lumi=0
+        if "UPD4" in folderTag:
+            run=TileCalibTools.getPromptCalibRunNumber()
+            log.warning( "Run number is not specified, using minimal run number in calibration loop %d", run )
+        else:
+            run=TileCalibTools.getLastRunNumber()
+            log.warning( "Run number is not specified, using current run number %d", run )
+        if run<0:
+            log.error( "Bad run number" )
+            sys.exit(2)
+
     since = (run, lumi)
-until = (TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)
+    iovList = [since]
+    iovUntil = [until]
+    iovUntilCMT = [until]
+    begin=since
+
+    log.info("Initializing for run %d, lumiblock %d", run,lumi)
+
 
 if mode == 0:
     if inSchema == outSchema:
@@ -144,11 +291,21 @@ elif mode != 1 and mode != 2:
 
 #=== create bad channel manager
 log.info("")
-log.info("Initializing bad channels from %s", inSchema)
-log.info("with tag=%s and IOV=%s", folderTag, since)
-mgr = TileBchTools.TileBchMgr()
-mgr.setLogLvl(logging.DEBUG)
-mgr.initialize(dbr, folderPath, folderTag, since, mode)
+comments = []
+mgrWriters = []
+nvalUpdated = []
+commentsSplit = []
+for since in iovList:
+    comm=blobReader.getComment(since)
+    #log.info("Comment: %s", comm)
+    comments+=[comm]
+    nvalUpdated += [0]
+    commentsSplit+=[blobReader.getComment(since,True)]
+    mgr = TileBchTools.TileBchMgr()
+    mgr.setLogLvl(logging.DEBUG)
+    mgr.initialize(dbr, folderPath, folderTag, since, mode)
+    mgrWriters += [mgr]
+log.info("")
 
 #=== Tuples of empty channels
 emptyChannelLongBarrel =     (30, 31, 43)
@@ -164,7 +321,7 @@ emptyChannelExtendedBarrel = (18, 19, 24, 25, 26, 27, 28, 29, 33, 34, 42, 43, 44
 # adc: 0 = low gain, 1 = high gain.
 
 #=== print bad channels
-if verbose:
+if verbose and not iov:
     log.info("============================================================== ")
     log.info("bad channels before update")
     mgr.listBadAdcs()
@@ -172,46 +329,72 @@ if verbose:
 #=== Add problems with mgr.addAdcProblem(ros, drawer, channel, adc, problem)
 #=== Remove problems with mgr.delAdcProblem(ros, drawer, channel, adc, problem)
 
-if run<0:
-    if "UPD4" in folderTag:
-        run=TileCalibTools.getPromptCalibRunNumber()
-        log.warning( "Run number is not specified, using minimal run number in calibration loop %d", run )
-    else:
-        run=TileCalibTools.getLastRunNumber()
-        log.warning( "Run number is not specified, using current run number %d", run )
-    if run<0:
-        log.error( "Bad run number" )
-        sys.exit(2)
-since = (run, lumi)
 
 if len(execFile):
     log.info("Masking new bad channels, including file %s", execFile )
-
-    try:
-        exec(compile(open(execFile).read(),execFile,'exec'))
-        if len(comment)==0:
-            log.error( "Comment string is not provided, pleae put comment='bla-bla-bla' line in %s", execFile )
-            sys.exit(2)
-    except Exception as e:
-        log.error( e )
-        log.error( "Problem reading include file %s", execFile )
-        sys.exit(2)
-
-    #=== print bad channels
-    if verbose:
-        log.info("============================================================== ")
-        log.info("bad channels after update")
-        mgr.listBadAdcs()
-
-    #====================== Write new bad channel list =================
-
-    #=== commit changes
     dbw = TileCalibTools.openDbConn(outSchema,('UPDATE' if update else 'RECREATE'))
-    mgr.commitToDb(dbw, folderPath, folderTag, (TileBchDecoder.BitPat_onl01 if onl else TileBchDecoder.BitPat_ofl01), user, comment, since, until)
+
+    #=== loop over all IOVs
+    for io,since in enumerate(iovList):
+
+        until=iovUntil[io]
+        untilCmt=iovUntilCMT[io]
+        if since==until and since==untilCmt:
+            continue # nothing to do
+
+        log.info( "Updating IOV %s", str(since) )
+        mgr = mgrWriters[io]
+
+        if since==until or (since in iovListCMT and since not in iovListMOD):
+            mList = ['CMT']
+        else:
+            mList = moduleList
+            try:
+                exec(compile(open(execFile).read(),execFile,'exec'))
+                if len(comment)==0:
+                    log.error( "Comment string is not provided, please put comment='bla-bla-bla' line in %s", execFile )
+                    sys.exit(2)
+            except Exception as e:
+                log.error( e )
+                log.error( "Problem reading include file %s", execFile )
+                sys.exit(2)
+
+            #=== print bad channels
+            if verbose:
+                log.info("============================================================== ")
+                log.info("bad channels after update")
+                mgr.listBadAdcs()
+
+        #====================== Write new bad channel list =================
+
+        #=== commit changes
+        if Comment is not None:
+            comment = Comment
+            author = user
+        else:
+            if comment=="None":
+                comment = comments[io]
+            elif comments[io] not in comment:
+                comment += "  //  " + comments[io]
+            if io>0 and since!=until and 'ALL' not in moduleList:
+                author=commentsSplit[io]
+                for m in moduleList:
+                    if m in comments[io]:
+                        author=user
+                        break
+            else:
+                author=user
+        # UNDO comment in IOV after the "end"
+        if since==until and comment!=comments[io]:
+            comment = "UNDO " + comment
+        mgr.commitToDb(dbw, folderPath, folderTag, (TileBchDecoder.BitPat_onl01 if onl else TileBchDecoder.BitPat_ofl01), author, comment, since, until, untilCmt, mList)
 else:
     dbw = None
 
 
+since = iovList[0]
+until = (TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)
+
 if len(curSuffix) and not onl and "sqlite" in outSchema:
 
     if len(comment) == 0:
@@ -318,7 +501,7 @@ if len(onlSuffix) and not onl and "sqlite" in outSchema:
                             mgrOnl.addAdcProblem(ros, mod, chn, 1, prb)
 
                 #--- add IgnoreInHlt if either of the ADCs has isBad
-                #--- add OnlineGeneralMaskAdc if the ADCs has isBad            
+                #--- add OnlineGeneralMaskAdc if the ADCs has isBad
                 if statlo.isBad() and stathi.isBad():
                     mgrOnl.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.IgnoredInHlt)
                     mgrOnl.addAdcProblem(ros, mod, chn, 0, TileBchPrbs.OnlineGeneralMaskAdc)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py
index 815a68af43c41c64ebc5561cbe5021c9b700748d..4febd99509895c907a374a73eaeabc1fc1d3af6a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py
@@ -8,7 +8,7 @@
 
 from __future__ import print_function
 
-import getopt,sys,os
+import getopt,sys,os,bisect
 os.environ['TERM'] = 'linux'
 
 def usage():
@@ -26,6 +26,8 @@ def usage():
     print ("-L, --lumi2=    specify lumi block number for new IOV where correction is undone")
     print ("-b, --begin=    specify run number of first iov in multi-iov mode, by default uses very first iov")
     print ("-e, --end=      specify run number of last iov in multi-iov mode, by default uses latest iov")
+    print ("-A, --adjust    in multi-iov mode adjust iov boundaries to nearest iov available in DB, default is False")
+    print ("-D, --module=   specify module to use in multi-IOV update, default is all")
     print ("-c, --channel   if present, means that one constant per channel is expected (i.e. no gain field)")
     print ("-d, --default   if present, means that also default values stored in AUX01-AUX20 should be updated")
     print ("-a, --all       if present, means that all drawers are saved, otherwise only those which were updated")
@@ -36,7 +38,8 @@ def usage():
     print ("-n, --nval=     specify number of values to store to DB, default is 0 - means all")
     print ("-v, --version=  specify blob version, by default version from input DB is used" )
     print ("-x, --txtfile=  specify the text file with the new constants for reading")
-    print ("-m, --comment=  specify comment to write")
+    print ("-m, --comment=  specify comment which should be written to DB, in multi-iov mode it is appended to old comment")
+    print ("-M, --Comment=  specify comment which should be written to DB, in mutli-iov mode it overwrites old comment")
     print ("-U, --user=     specify username for comment")
     print ("-p, --prefix=   specify prefix which is expected on every line in input file, default - no prefix")
     print ("-k, --keep=     field numbers or channel numbers to ignore, e.g. '0,2,3,EBch0,EBch1,EBch12,EBch13,EBspD4ch18,EBspD4ch19,EBspC10ch4,EBspC10ch5' ")
@@ -44,9 +47,9 @@ def usage():
     print ("-o, --outschema=  specify the output schema to use, default is 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2'")
     print ("-s, --schema=     specify input/output schema to use when both input and output schemas are the same")
     print ("-u  --update      set this flag if output sqlite file should be updated, otherwise it'll be recreated")
-    
-letters = "hr:l:R:L:b:e:s:i:o:t:T:f:F:C:G:n:v:x:m:U:p:dcazZuk:"
-keywords = ["help","run=","lumi=","run2=","lumi2=","begin=","end=","schema=","inschema=","outschema=","tag=","outtag=","folder=","outfolder=","nchannel=","ngain=","nval=","version=","txtfile=","comment=","user=","prefix=","default","channel","all","zero","allzero","update","keep="]
+
+letters = "hr:l:R:L:b:e:AD:s:i:o:t:T:f:F:C:G:n:v:x:m:M:U:p:dcazZuk:"
+keywords = ["help","run=","lumi=","run2=","lumi2=","begin=","end=","adjust","module=","schema=","inschema=","outschema=","tag=","outtag=","folder=","outfolder=","nchannel=","ngain=","nval=","version=","txtfile=","comment=","Comment=","user=","prefix=","default","channel","all","zero","allzero","update","keep="]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
@@ -55,7 +58,7 @@ except getopt.GetoptError as err:
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = -1
 lumi = 0
 run2 = -1
@@ -78,12 +81,16 @@ nval = 0
 blobVersion = -1
 txtFile= ""
 comment = ""
+Comment = None
 prefix = ""
 update = False
 keep=[]
 iov = False
 beg = 0
 end = 2147483647
+moduleList = []
+adjust = False
+
 try:
     user=os.getlogin()
 except Exception:
@@ -140,10 +147,17 @@ for o, a in opts:
     elif o in ("-e","--end"):
         end = int(a)
         iov = True
+    elif o in ("-A","--adjust"):
+        adjust = True
+    elif o in ("-D","--module"):
+        moduleList += a.split(",")
     elif o in ("-x","--txtfile"):
         txtFile = a
     elif o in ("-m","--comment"):
         comment = a
+    elif o in ("-M","--Comment"):
+        Comment = a
+        comment = a
     elif o in ("-U","--user"):
         user = a
     elif o in ("-p","--prefix"):
@@ -177,6 +191,11 @@ import cppyy
 from TileCalibBlobPython import TileCalibTools
 from TileCalibBlobObjs.Classes import TileCalibUtils
 
+if iov and end >= TileCalibTools.MAXRUN:
+    end = TileCalibTools.MAXRUN
+    lumi2 = TileCalibTools.MAXLBK
+until = (TileCalibTools.MAXRUN,TileCalibTools.MAXLBK)
+
 from TileCalibBlobPython.TileCalibLogger import getLogger
 log = getLogger("WriteCalibToCool")
 import logging
@@ -206,29 +225,38 @@ log.info("Initializing folder %s with tag %s", folderPath, folderTag)
 
 iovAll = []
 iovList = []
+iovUntil = []
+iovListMOD = []
+iovListCMT = []
+iovUntilCMT = []
 blobReader = TileCalibTools.TileBlobReader(dbr,folderPath, folderTag)
 if iov:
     #=== filling the iovList
     log.info( "Looking for IOVs" )
-    for ros in range(rosmin,5):
-        for mod in range(min(64,TileCalibUtils.getMaxDrawer(ros))):
-            iovMod=[]
-            try:
-              dbobjs = blobReader.getDBobjsWithinRange(ros,mod)
-              if (dbobjs is None):
-                  raise Exception("No DB objects retrieved when building IOV list!")
-              while dbobjs.goToNext():
-                obj = dbobjs.currentRef()
-                objsince = obj.since()
-                sinceRun = objsince >> 32
-                sinceLum = objsince & 0xFFFFFFFF
-                since    = (sinceRun, sinceLum)
-                iovMod.append(since)
-            except Exception:
-              log.warning( "Warning: can not read IOVs from input DB file" )
-              sys.exit(2)
-            iovAll+=[iovMod]
-            iovList+=iovMod
+    if moduleList!=['CMT']:
+        for ros in range(rosmin,5):
+            for mod in range(min(64,TileCalibUtils.getMaxDrawer(ros))):
+                modName = TileCalibUtils.getDrawerString(ros,mod)
+                if len(moduleList)>0 and modName not in moduleList and 'ALL' not in moduleList:
+                    iovAll+=[[]]
+                else:
+                    iovMod = blobReader.getIOVsWithinRange(ros,mod)
+                    iovAll+=[iovMod]
+                    iovList+=iovMod
+        if 'ALL' in moduleList:
+            moduleList.remove('ALL')
+    else:
+        for ros in range(rosmin,5):
+            iovAll+=[[]]*min(64,TileCalibUtils.getMaxDrawer(ros))
+    if 'CMT' in moduleList:
+        iovListMOD = iovList
+        iovListCMT = blobReader.getIOVsWithinRange(-1,1000)
+        if len(iovList)==0:
+            iovList = iovListCMT
+            iovAll+=[iovListCMT]
+        else:
+            moduleList.remove('CMT')
+
     import functools
     def compare(item1,item2):
         if item1[0]!=item2[0]:
@@ -237,38 +265,72 @@ if iov:
             return item1[1]-item2[1]
     iovList=list(set(iovList))
     iovList=sorted(iovList,key=functools.cmp_to_key(compare))
+    iovList+=[until]
+    iovListCMT+=[until]
 
-    be=iovList[0][0]
-    en=iovList[-1][0]
-
-    if beg != be or end != en:
+    since=(beg,lumi)
+    ib=bisect.bisect(iovList,since)-1
+    if ib<0:
         ib=0
-        ie=len(iovList)
-        for i,iovs in enumerate(iovList):
-            run = iovs[0]
-            if (run<beg and run>be) or run==beg :
-                be=run
-                ib=i
-            if (run>end and run<en) :
-                en=run
-                ie=i
-        if ie>0:
-            en=iovList[ie-1][0]
-        if be != beg:
-            log.info( "Changing begin run from %d to %d (start of IOV)", beg,be)
-            beg=be
-        if en != end:
-            log.info( "Changing end run from %d to %d (start of IOV)", end,en)
-            end=en
-        iovList=iovList[ib:ie]
-
-    since = iovList[0]
-    run=since[0]
-    lumi=since[1]
-    undo = False
+    if iovList[ib] != since:
+        if adjust:
+            since = iovList[ib]
+            log.info( "Moving beginning of first IOV with new constants from (%d,%d) to (%d,%d)", beg,lumi,since[0],since[1])
+        else:
+            iovList[ib] = since
+            log.info( "Creating new IOV starting from (%d,%d) with new constants", beg,lumi)
+
+    if end<0:
+        ie=ib+1
+        if ie>=len(iovList):
+            ie=ib
+        until=iovList[ie]
+        log.info( "Next IOV without new constants starts from (%d,%d)", until[0],until[1])
+    else:
+        until=(end,lumi2)
+        ie=bisect.bisect_left(iovList,until)
+        if ie>=len(iovList):
+            ie=len(iovList)-1
+
+        if iovList[ie] != until:
+            if adjust:
+                until=iovList[ie]
+                log.info( "Moving end of last IOV from (%d,%d) to (%d,%d)", end,lumi2,until[0],until[1])
+            else:
+                log.info( "Keeping end of last IOV at (%d,%d) - new IOV is shorter than IOV in input DB", end,lumi2)
+                iovList[ie] = until
+
 
+    iovList = iovList[ib:ie]
+    iovUntil = iovList[1:] + [until]
+    begin = since
+    run = since[0]
+    lumi = since[1]
+    undo = False
     log.info( "IOVs: %s", str(iovList))
-    log.info( "%d IOVs in total", len(iovList))
+
+    if len(iovListMOD)>0 and len(iovListCMT)>0:
+        if Comment is None:
+            iovList += [until]  # one more IOV for "UNDO" comment
+            iovUntil += [until] # one more IOV for "UNDO" comment
+        iovUntilCMT = []
+        for io,since in enumerate(iovList):
+            p = bisect.bisect(iovListCMT,since)
+            if p<len(iovListCMT):
+                iovUntilCMT += [iovListCMT[p]]
+                if iovUntil[io] != iovListCMT[p]:
+                    log.info( "End of iov %s in comments record is %s", str(since),str(iovListCMT[p]))
+            else:
+                if since!=until:
+                    iovUntilCMT += [since]
+                else:
+                    iovList.pop(-1)
+                    break
+        since = begin
+    else:
+        iovUntilCMT = iovUntil
+
+    log.info( "%d IOVs in total, end of last IOV is %s", ie-ib,str(until))
 
 else:
     #=== set run number
@@ -287,6 +349,8 @@ else:
 
     since = (run, lumi)
     iovList = [since]
+    iovUntil = [until]
+    iovUntilCMT = [until]
     if "begin" not in dir():
         begin=since
     if run2<0:
@@ -318,8 +382,10 @@ if flt:
     mval=flt.getObjSizeUint32()
     log.info( "Blob type: %d  version: %d  Nchannels: %d  Ngains: %d  Nval: %d", blobT,blobV,mchan,mgain,mval)
     if blobVersion<0:
-        blobVersion = blobV 
+        blobVersion = blobV
 else:
+    mchan=-1
+    mgain=-1
     mval=-1
 nchanDef=nchan
 ngainDef=ngain
@@ -353,6 +419,9 @@ if len(txtFile)>0:
     #=== loop over all IOVs
     for io,since in enumerate(iovList):
 
+        if since==iovUntil[io]: # dummy IOV without update
+            continue
+
         log.info( "Updating IOV %s", str(since) )
         nold=0
         nnew=0
@@ -367,7 +436,7 @@ if len(txtFile)>0:
         for ros in range(rosmin,5):
             for mod in range(min(64,TileCalibUtils.getMaxDrawer(ros))):
                 irm+=1
-                if iov and since not in iovAll[irm]:
+                if iov and since!=begin and (since not in iovAll[irm]):
                     continue
                 modName = TileCalibUtils.getDrawerString(ros,mod)
                 if modName in ['EBA39','EBA40','EBA41','EBA42','EBA55','EBA56','EBA57','EBA58',
@@ -528,30 +597,77 @@ if len(txtFile)>0:
             log.info("%d/%d new channels*gains/values have been added to database", nnew-nold,nvnew-nvold-nvnewdef)
         if ndef or nvdef:
             log.info("%d/%d new channels*gains/values with default values have been added to database", ndef,nvdef)
-    
+
 #=== commit changes
-if mval!=0 and (len(comment)>0 or len(txtFile)>0):
+if (mval!=0 or Comment is not None) and (len(comment)>0 or len(txtFile)>0):
     if not iov:
         iovList = [begin]
-    until=(TileCalibTools.MAXRUN, TileCalibTools.MAXLBK)
-    for io,begin in enumerate(iovList):
-        if (comment is None) or (comment == "None"):
-            blobWriters[io].setComment("None","None")
+
+    #=== loop over all IOVs
+    for io,since in enumerate(iovList):
+
+        untilMod = iovUntil[io]
+        untilCmt = iovUntilCMT[io]
+        appendCmt = (untilCmt < (TileCalibTools.MAXRUN,TileCalibTools.MAXLBK))
+
+        if since==untilMod: # empty IOV
+            if since==untilCmt:
+                continue # nothing to do
+            undoCmt = True # only comments with UNDO text will be written
         else:
-            if len(comment)==0:
-                if begin[1]==0:
-                    comm="Update for run %i from file %s" % (begin[0],txtFile)
-                else:
-                    comm="Update for run,lumi %i,%i from file %s" % (begin[0],begin[1],txtFile)
-            else:
-                comm=comment
-            if iov:
-                comm+=" - "+comments[io]
-            if iov and (nvalUpdated[io]==0 or comment=="keep"):
-                blobWriters[io].setComment(commentsSplit[io])
+            undoCmt = False
+            if len(moduleList)!=1:
+                untilMod = until # more than one module updated
+                untilCmt = until # will use IOV till very end
+            elif untilCmt>untilMod:
+                untilCmt = untilMod
+
+        log.info( "Updating IOV %s", str(since) )
+
+        #=== set comment
+        if Comment is not None:
+            comm = Comment
+            if undoCmt:
+                comm = "UNDO " + comm
+            author = user
+        else:
+            if (comment is None) or (comment == "None"):
+                comm = "None"
+                author = "None"
             else:
-                blobWriters[io].setComment(user,comm)
-        blobWriters[io].register(begin, until, outfolderTag)
+                if len(comment)==0:
+                    if undoCmt:
+                        if since[1]==0 and begin[1]==0:
+                            comm="Update for run %i - undoing changes done for run %i from file %s" % (since[0],begin[0],txtFile)
+                        else:
+                            comm="Update for run,lumi %i,%i - undoing changes done for %i,%i from file %s" % (since[0],since[1],begin[0],begin[1],txtFile)
+                    else:
+                        if since[1]==0:
+                            comm="Update for run %i from file %s" % (since[0],txtFile)
+                        else:
+                            comm="Update for run,lumi %i,%i from file %s" % (since[0],since[1],txtFile)
+                else:
+                    comm = comment
+                    if undoCmt:
+                        comm = "UNDO " + comm
+                if iov and appendCmt:
+                    comm += "  //  " + comments[io]
+                if not undoCmt and iov and (nvalUpdated[io]==0 or comment=="keep"):
+                    author = commentsSplit[io]
+                else:
+                    author = user
+        blobWriters[io].setComment(author,comm)
+
+        #=== commit changes
+        if untilCmt!=untilMod:
+            cmtOnly = (since in iovListCMT and since not in iovListMOD)
+            if not cmtOnly and untilMod>since:
+                blobWriters[io].register(since,untilMod,outfolderTag,1)
+            if untilCmt>since:
+                blobWriters[io].register(since,untilCmt,outfolderTag,-1)
+        else:
+            blobWriters[io].register(since,untilMod,outfolderTag)
+
     if undo:
         if (comment is None) or (comment == "None"):
             blobWriter2.setComment("None","None")
@@ -566,7 +682,7 @@ if mval!=0 and (len(comment)>0 or len(txtFile)>0):
         log.warning("(run2,lumi2)=(%i,%i) is smaller than (run,lumi)=(%i,%i) - will not create second IOV", run2,lumi2,begin[0],begin[1])
 else:
     log.warning("Nothing to update")
-    
+
 #=== close DB
 dbr.closeDatabase()
 dbw.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
index 4cfa800917df22ab19d9ddcfe13fd21073ba9947..58dc6a6ef34cc5951c79c97eb73804ae2aa7a965 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
@@ -65,7 +65,7 @@ scaleD4     = 0.0 # scale for pileup term in D4
 scaleC10    = 0.0 # scale for pileup term in C10
 scaleD4sp   = 0.0 # scale for pileup term in D4 special
 scaleC10sp  = 0.0 # scale for pileup term in C10 special
-scaleElec   = 0.0 # scale for electronic noise 
+scaleElec   = 0.0 # scale for electronic noise
 
 for o, a in opts:
     if o in ("-i","--infile"):
@@ -273,7 +273,7 @@ if len(txtFile):
       if not len(fields)          :
           continue
       if fields[0].startswith("#"):
-          continue 
+          continue
 
       if fields[0][:1].isalpha():
           print (fields)
@@ -387,7 +387,7 @@ if run>=0 and len(iovList)>0:
   for iov in iovList:
     until    = iov[1]
     untilRun = until[0]
-    if untilRun<run: 
+    if untilRun<run:
       start+=1
     elif untilRun==run:
       untilLumi = until[1]
@@ -413,7 +413,7 @@ if (ncell>0 and nval>2):
       iov = (since, until)
       iovList = [ iov ]
   else:
-    if (len(iovList)>1): 
+    if (len(iovList)>1):
       print ("Updating only last IOV")
       iovList = iovList[len(iovList)-1:]
 
@@ -427,15 +427,15 @@ if not tile:
 
 #=== loop over all iovs
 for iov in iovList:
-  
+
   since    = iov[0]
   sinceRun = since[0]
   sinceLum = since[1]
-  
+
   until    = iov[1]
   untilRun = until[0]
   untilLum = until[1]
-  
+
   print ("IOV in input DB [%d,%d]-[%d,%d)" % (sinceRun, sinceLum, untilRun, untilLum))
 
   blobR = reader.getCells(chan,(sinceRun,sinceLum))
@@ -484,7 +484,7 @@ for iov in iovList:
   try:
     for cell in range(ncell):
       exist0 = (cell<mcell)
-      if tile: 
+      if tile:
         (modName,cellName)=hashMgr.getNames(cell)
         fullName="%s %6s" % (modName,cellName)
       for gain in range(ngain):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py
index 4086be0de0f5423f751039b5cac2e3593d0aa0a3..db3fcc3f7d8ea8313a415b55ff4d0248cbddd378 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py
@@ -41,7 +41,7 @@ while len(sys.argv)>0:
             fileList.append(arg)
         else:
             log.error("File \"%s\" does not exist, ignoring input!", arg)
-        
+
 
 import cppyy
 from TileCalibBlobPython import TileCalibTools
@@ -136,12 +136,12 @@ for fileName in fileList:
             flt.setData(pmtIdx,gainIdx,5,pedErr)
             flt.setData(pmtIdx,gainIdx,6,rms)
             flt.setData(pmtIdx,gainIdx,7,rmsErr)
-            pedCount += 1 
+            pedCount += 1
 
     log.info("---> %s%s, registered %3i Res and %3i Ped lines", result_file.groups()[0],
              result_file.groups()[1],
              resCount, pedCount)
-             
+
 #=== register all drawers in the database
 blobWriter.setComment(author,comment)
 blobWriter.register(regFrom,-1)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py
index 6c41d62cc92f2c54b1aa417f6ed5c7ea5f319587..2e0c227b3ca88318dd10b2c8eca5bbba1acaed72 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py
@@ -18,7 +18,7 @@ sys.argv.pop(0)
 pointInTime = -1
 if len(sys.argv)>0:
     pointInTime = sys.argv.pop(0)
-    
+
 #=== get a logger
 from TileCalibBlobPython.TileCalibLogger import getLogger
 log = getLogger("int_readDb")
@@ -43,7 +43,7 @@ for ros in range(1,5):
         #=== check if data is avialable and continue if not
         if not cd:
             continue
-        
+
         for pmt in range(48):
             for gain in range(6):
                 outStr = "ros/mod/pmt/gain = %i/%2i/%2i/%i : " % (ros,mod,pmt,gain)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
index 115764a5dbd32cd2b96d29dca04480240e9bdfa5..3540b273453566d6360850fdc025f4af02964dcd 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
@@ -29,7 +29,7 @@ folder = "/TILE/OFL02/STATUS/ADC"
 tag = "clean"
 instance="OFLP200"
 
-#.. Parsing arguments 
+#.. Parsing arguments
 
 import sys
 ros=int(sys.argv[1])
diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/TileRODMonTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/TileRODMonTool.h
index 9ab72d1a7379bce574ce11d5625f1051d11e487f..888dde6273924cea2741d833650e36d4ee819ba4 100644
--- a/TileCalorimeter/TileMonitoring/TileMonitoring/TileRODMonTool.h
+++ b/TileCalorimeter/TileMonitoring/TileMonitoring/TileRODMonTool.h
@@ -79,11 +79,11 @@ class TileRODMonTool: public TileFatherMonTool {
     std::vector<TH1F *> m_TileDspRefTimSummary[4];    // 4 partitions - 8 RODs - 4 DSPs
     std::vector<TProfile *> m_TileDspRefSummary[2];
 
-
+#define N_TILE_ROBS 32
     std::vector<TProfile2D*> m_TdspProfile[4]; //4 partitions
     std::vector<TProfile2D*> m_tileRodFragmentSize; //
     std::vector<TProfile*> m_tileRodFragmentSizeLB; 
-    std::vector<TH1F*> m_tileRodFragmentSize1D[5][16];    // 4 partitions - 16 ROD fragments
+    std::vector<TH1F*> m_tileRodFragmentSize1D[5][N_TILE_ROBS];    // 4 partitions with N_TILE_ROBS fragments
 
     double m_evEref[4][64][48];    //partitions - 64 modules - 48 channels
     double m_evTref[4][64][48];    //partitions - 64 modules - 48 channels
@@ -95,9 +95,10 @@ class TileRODMonTool: public TileFatherMonTool {
     int m_nLumiblocks;
     bool m_fillDetailFragmentSize;
     int m_nEvents4FragmentSize;
+    unsigned int m_nROBs;
     SG::ReadHandleKey<TileDQstatus> m_DQstatusKey;
-    float m_rodFragmentSizeSum[5][16][9]; // accumulator of ROD fragment size per trigger
-    float m_lastRodFragmentSize[5][16][9]; // ROD fragment size per trigger in the last event
+    float m_rodFragmentSizeSum[5][N_TILE_ROBS][9]; // accumulator of ROD fragment size per trigger
+    float m_lastRodFragmentSize[5][N_TILE_ROBS][9]; // ROD fragment size per trigger in the last event
 };
 
 #endif
diff --git a/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx
index 9807e8976dad3d3d4d34032ccbb5b4ef4f429a84..47af88164b1662af7331f0577e092a9eabd5f3b4 100644
--- a/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx
@@ -68,6 +68,7 @@ TileRODMonTool::TileRODMonTool(const std::string & type, const std::string & nam
   declareProperty("NumberOfLumiblocks", m_nLumiblocks = 3000);
   declareProperty("FillDetailRODFragmentSize", m_fillDetailFragmentSize = true);
   declareProperty("NumberOfEventsToAverageFragmentSize", m_nEvents4FragmentSize = 50);
+  declareProperty("NumberOfROBFragments", m_nROBs = N_TILE_ROBS);
   declareProperty("TileDQstatus", m_DQstatusKey = "TileDQstatus");
 
   m_path = "/Tile/ROD"; //ROOT File directory
@@ -86,12 +87,18 @@ StatusCode TileRODMonTool:: initialize() {
 
   ATH_MSG_INFO( "in initialize()" );
 
-  m_tileRobIds.reserve(4 * 16); // partitions * fragments
-  
-  for (uint32_t robId = 0x510000; robId < 0x510010; ++robId) m_tileRobIds.push_back(robId); // LBA
-  for (uint32_t robId = 0x520000; robId < 0x520010; ++robId) m_tileRobIds.push_back(robId); // LBC
-  for (uint32_t robId = 0x530000; robId < 0x530010; ++robId) m_tileRobIds.push_back(robId); // EBA
-  for (uint32_t robId = 0x540000; robId < 0x540010; ++robId) m_tileRobIds.push_back(robId); // EBC
+  if (m_nROBs > N_TILE_ROBS) {
+    ATH_MSG_INFO( "Decreasing number of ROBs from "  << m_nROBs << " to " << N_TILE_ROBS );
+    m_nROBs = N_TILE_ROBS;
+  }
+
+  m_tileRobIds.reserve(4 * m_nROBs); // partitions * fragments
+  uint32_t robIds[4] = {0x510000,0x520000,0x530000,0x540000};
+  for (unsigned int p=0; p<4; ++p) {
+    for (unsigned int f=0; f<m_nROBs; ++f) {
+      m_tileRobIds.push_back(robIds[p]+f);
+    }
+  }
  
   CHECK( m_tileToolEmscale.retrieve() );
   CHECK( m_robSvc.retrieve() );
@@ -503,7 +510,7 @@ StatusCode TileRODMonTool::bookHistTrig( int trig )
                                                  , "tileRodFragmentSize_" + m_TrigNames[trig]
                                                  , "Run " + runNumStr + " Trigger " + m_TrigNames[trig] +
                                                  ": Tile ROD fragment size (word) (entries = events)"
-                                                 , 16, -0.5, 15.5, 4, 1, 5, 0, 2.e6)) ;
+                                                 , m_nROBs, -0.5, m_nROBs-0.5, 4, 1, 5, 0, 2.e6)) ;
   
   m_tileRodFragmentSize[element]->GetXaxis()->SetTitle("Fragment Number");
   m_tileRodFragmentSize[element]->GetYaxis()->SetTitle("Partition Number");
@@ -534,7 +541,7 @@ StatusCode TileRODMonTool::bookHistTrig( int trig )
   if (m_fillDetailFragmentSize) {
     std::vector<std::string> partitions = {"AUX", "LBA", "LBC", "EBA", "EBC"};
     for (unsigned int ros = 1; ros < TileCalibUtils::MAX_ROS; ++ros) {
-      for (unsigned int fragment = 0; fragment < 16; ++fragment) {
+      for (unsigned int fragment = 0; fragment < m_nROBs; ++fragment) {
         m_tileRodFragmentSize1D[ros][fragment].push_back( book1F(m_TrigNames[trig]
                                                                  , "tileRodFragmentSize_" + partitions[ros] + 
                                                                  "_Fragment" + std::to_string(fragment) + "_" + m_TrigNames[trig]
@@ -604,7 +611,7 @@ void TileRODMonTool::cleanHistVec()
 
   if (m_fillDetailFragmentSize) {
     for (unsigned int ros = 1; ros < TileCalibUtils::MAX_ROS; ++ros) {
-      for (unsigned int fragment = 0; fragment < 16; ++fragment) {
+      for (unsigned int fragment = 0; fragment < m_nROBs; ++fragment) {
         m_tileRodFragmentSize1D[ros][fragment].clear();
       }
     }
@@ -853,24 +860,26 @@ StatusCode TileRODMonTool::fillHistograms()
   for (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment* robFragment : robFragments) {
     uint32_t rodSourceId = robFragment->rod_source_id();
     unsigned int ros = (rodSourceId & 0x0F0000) >> 16;
-    unsigned int fragment = rodSourceId & 0x00000F;
+    unsigned int fragment = rodSourceId & 0x0000FF;
     allTileRodSize += robFragment->rod_fragment_size_word();
-    
-    for (unsigned int element = 0; element < m_eventTrigs.size(); ++element) {
-      int trigger = m_eventTrigs[element];
 
-      m_tileRodFragmentSize[vecIndx(element)]->Fill(fragment, ros, robFragment->rod_fragment_size_word());
-      if (m_fillDetailFragmentSize) {
+    if (ros > 0 && ros < 5 && fragment < m_nROBs) {
+      for (unsigned int element = 0; element < m_eventTrigs.size(); ++element) {
+        int trigger = m_eventTrigs[element];
 
-        m_rodFragmentSizeSum[ros][fragment][m_eventTrigs[element]] += robFragment->rod_fragment_size_word();
-        if (m_nEventsProcessed[trigger] > m_nEvents4FragmentSize) {
+        m_tileRodFragmentSize[vecIndx(element)]->Fill(fragment, ros, robFragment->rod_fragment_size_word());
+        if (m_fillDetailFragmentSize) {
 
-          m_rodFragmentSizeSum[ros][fragment][trigger] -= m_lastRodFragmentSize[ros][fragment][trigger];
-          float averageRodFragmentSize = m_rodFragmentSizeSum[ros][fragment][trigger] / m_nEvents4FragmentSize;
-          m_tileRodFragmentSize1D[ros][fragment][vecIndx(element)]->Fill(averageRodFragmentSize);
-        }
+          m_rodFragmentSizeSum[ros][fragment][m_eventTrigs[element]] += robFragment->rod_fragment_size_word();
+          if (m_nEventsProcessed[trigger] > m_nEvents4FragmentSize) {
 
-        m_lastRodFragmentSize[ros][fragment][trigger] = robFragment->rod_fragment_size_word();
+            m_rodFragmentSizeSum[ros][fragment][trigger] -= m_lastRodFragmentSize[ros][fragment][trigger];
+            float averageRodFragmentSize = m_rodFragmentSizeSum[ros][fragment][trigger] / m_nEvents4FragmentSize;
+            m_tileRodFragmentSize1D[ros][fragment][vecIndx(element)]->Fill(averageRodFragmentSize);
+          }
+
+          m_lastRodFragmentSize[ros][fragment][trigger] = robFragment->rod_fragment_size_word();
+        }
       }
     }
   }
diff --git a/TileCalorimeter/TileRawUtils/src/RegSelCondAlg_Tile.cxx b/TileCalorimeter/TileRawUtils/src/RegSelCondAlg_Tile.cxx
index a3c0642085587eae89d3f1e596ff10c8fd980b64..6c99ac143f037ecc78718a18ba88f978432fc408 100644
--- a/TileCalorimeter/TileRawUtils/src/RegSelCondAlg_Tile.cxx
+++ b/TileCalorimeter/TileRawUtils/src/RegSelCondAlg_Tile.cxx
@@ -73,6 +73,18 @@ StatusCode RegSelCondAlg_Tile::execute(const EventContext& ctx)  const {
    /// do stuff here ...  
   ATH_MSG_DEBUG( "Creating region selector table " << m_tableKey );
    
+
+  SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  if (lutCondData.isValid()) {
+    /// inpractice, this should never be called, although in serial athena,                                                                          
+    /// because the implementation of the conditions behaviour is flawed in                                                                          
+    /// the framework, this routine will be called every event (!) regardless                                                                        
+    /// of whether it should be called or not so we need this check to                                                                               
+    /// prevent unecessary code execution on out our side                                                                                            
+    ATH_MSG_DEBUG("CondHandle " << lutCondData.fullKey() << " is already valid." );
+    return StatusCode::SUCCESS;
+  }
+
   /// annoyingly take the pixel cabling to determine whether to build this
   /// calorimeter table using the EventIDRange.
   /// Once the calorimeter has it own conditions data cabling, then we can
@@ -102,8 +114,11 @@ StatusCode RegSelCondAlg_Tile::execute(const EventContext& ctx)  const {
 
   IRegSelLUTCondData* rcd = new IRegSelLUTCondData( std::move(rd) );  
 
-  try { 
-    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
+  try {
+    /// leave this commented here since this is where it should really be,
+    /// but we had to move it up in the code to handle the flawed conditions 
+    /// handling in the serial athena use case 
+    ///    SG::WriteCondHandle<IRegSelLUTCondData> lutCondData( m_tableKey, ctx );
     if( lutCondData.record( id_range, rcd ).isFailure() ) {
       ATH_MSG_ERROR( "Could not record " << m_tableKey 
 		     << " " << lutCondData.key()
diff --git a/Tools/PROCTools/CMakeLists.txt b/Tools/PROCTools/CMakeLists.txt
index 4b8d4131e3921ee3cdaeffbae0136fa84a4966be..e96ecb6a51a1aedea2dedc52547d2508690c2e16 100644
--- a/Tools/PROCTools/CMakeLists.txt
+++ b/Tools/PROCTools/CMakeLists.txt
@@ -9,3 +9,5 @@ atlas_subdir( PROCTools )
 atlas_install_python_modules( python/*.py )
 atlas_install_scripts( python/compareTCTs.py python/UploadAMITag.py python/UploadTfAMITag.py python/getCurrentCOMCONDTag.py python/RunTier0Tests.py python/ExtractEvents.py python/checkUPD1.py python/runDiffRootOnChanged.py python/provideTwikiSummary.py python/evaluateDiffRoot.py python/outputTest_v2.py  python/CreateTierZeroArgdict.py python/root_lsr_rank.py python/xAODDigest.py )
 
+# Install digest reference files for easy access
+atlas_install_data( data/*.ref )
diff --git a/Tools/PROCTools/data/master_q221_AOD_digest.ref b/Tools/PROCTools/data/master_q221_AOD_digest.ref
new file mode 100644
index 0000000000000000000000000000000000000000..001ee93bf6510ccc06c3461a7849d264f791b022
--- /dev/null
+++ b/Tools/PROCTools/data/master_q221_AOD_digest.ref
@@ -0,0 +1,26 @@
+         run       event       nTopo   nIdTracks       nJets      nMuons       nElec       nPhot
+      284500    87473001         118         128           4           1           9           7
+      284500    87473014          85          79           6           0           9           7
+      284500    87473022          38          30           4           0           5           2
+      284500    87473032          27          33           4           1           9           2
+      284500    87473037          60          43           7           0          10           6
+      284500    87473040         101          96           9           0          17           7
+      284500    87473051         142         114          12           1          15          21
+      284500    87473063          62          76           5           2           6           6
+      284500    87473068          26          35           1           1           0           0
+      284500    87473075          72          87           6           0           5           5
+      284500    87473084          83          86           7           3          15          10
+      284500    87473091          43          49           3           0           3           5
+      284500    87473096          72          75           3           2           2           3
+      284500    87473104          61          66           6           0           6           5
+      284500    87473114          93          84           7           2          14           8
+      284500    87473121          93         101           6           3          15           7
+      284500    87473132          81          59           9           1          10           5
+      284500    87473137          81          71           8           3          14           7
+      284500    87473144          83          70           7           1           6           8
+      284500    87473154          89          88           7           0          10           7
+      284500    87473162          52          52           3           0           8           4
+      284500    87473167          74          54           6           3          12          13
+      284500    87473171          82          71           8           3           4           5
+      284500    87473184          74          88           5           2           8           8
+      284500    87473192          54          53           4           1           7           5
diff --git a/Tools/PROCTools/data/master_q431_AOD_digest.ref b/Tools/PROCTools/data/master_q431_AOD_digest.ref
new file mode 100644
index 0000000000000000000000000000000000000000..27b561a56e57e35b268c3f8fb925f055d30dccc0
--- /dev/null
+++ b/Tools/PROCTools/data/master_q431_AOD_digest.ref
@@ -0,0 +1,26 @@
+         run       event       nTopo   nIdTracks       nJets      nMuons       nElec       nPhot
+      330470  1183722158           1           0           0           0           0           0
+      330470  1183722342         394         429          20           0           2          15
+      330470  1183727953         532         595          13           4           6          24
+      330470  1183732647         467         483          12           1           8          19
+      330470  1183733040         381         293           6           1           5          11
+      330470  1183734651         361         375          14           3           5          18
+      330470  1183735332         406         396           9           1           5          11
+      330470  1183736475         741         723          15           2           2          23
+      330470  1183738728           1           0           0           0           0           0
+      330470  1183738949         368         443           9           1           5          10
+      330470  1183742489         152         126           2           1           1           1
+      330470  1183743040         285         313           5           0           3           5
+      330470  1183746343         492         504          14           0           3          16
+      330470  1183746710           6           0           0           0           0           0
+      330470  1183751782         239         240           5           0           0           6
+      330470  1183752624         347         369           8           3           5          14
+      330470  1183753006         357         396          11           3           4          12
+      330470  1183754806         470         427          14           0           3          17
+      330470  1183769295         342         335           8           1           0           6
+      330470  1183769939         348         353          11           3           8          11
+      330470  1183773832         307         204           7           0           2          13
+      330470  1183775209          57           0           0           0           0           0
+      330470  1183787124         431         381          11           2           3          17
+      330470  1183787946         321         325           5           1           2           9
+      330470  1183795329         458         345          19           0           4          13
diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt
index a86c7937191ff3ebd14f381e1c52f96d26603ba0..369cbd51addbff5680b5582482016fa46f845cf5 100644
--- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt
+++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/CMakeLists.txt
@@ -11,7 +11,8 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/GeoPrimitives
                           Event/EventPrimitives
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagneticField/MagFieldConditions
+                          MagneticField/MagFieldElements
                           Tracking/TrkExtrapolation/TrkExInterfaces
                           Tracking/TrkExtrapolation/TrkExUtils
                           PRIVATE
@@ -20,7 +21,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkDetDescr/TrkDetDescrUtils
                           Tracking/TrkDetDescr/TrkGeometry
                           Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkParameters )
+                          Tracking/TrkEvent/TrkParameters
+                          Tools/PathResolver )
 
 # External dependencies:
 find_package( Eigen )
@@ -33,7 +35,7 @@ atlas_add_component( TrkExRungeKuttaIntersector
                      src/RungeKuttaIntersector.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives EventPrimitives GaudiKernel MagFieldInterfaces TrkExInterfaces TrkExUtils TrkDetDescrUtils TrkGeometry TrkSurfaces TrkParameters )
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives EventPrimitives GaudiKernel MagFieldConditions MagFieldElements TrkExInterfaces TrkExUtils TrkDetDescrUtils TrkGeometry TrkSurfaces TrkParameters )
 
 # Install files from the package:
 atlas_install_headers( TrkExRungeKuttaIntersector )
@@ -42,7 +44,7 @@ atlas_install_headers( TrkExRungeKuttaIntersector )
 atlas_add_test( RungeKuttaIntersector_test
                 SOURCES test/RungeKuttaIntersector_test.cxx
                 INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES TrkExUtils GaudiKernel TestTools CxxUtils ${ROOT_LIBRARIES}
+                LINK_LIBRARIES TrkExUtils GaudiKernel TestTools PathResolver CxxUtils ${ROOT_LIBRARIES} MagFieldElements MagFieldConditions
                 LOG_IGNORE_PATTERN "^AtlasFieldSvc +INFO"
                 PROPERTIES TIMEOUT 300
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h
index 797d3cf2b17adea2d47535bca9de9797059eb12c..4b0b367c75deebbd844f7f2d3550ee6f90a0a030 100755
--- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h
+++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/TrkExRungeKuttaIntersector/RungeKuttaIntersector.h
@@ -12,15 +12,17 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/PhysicalConstants.h"
-#include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "EventPrimitives/EventPrimitives.h"
 #include "GeoPrimitives/GeoPrimitives.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TrkExInterfaces/IIntersector.h"
 #include "TrkExUtils/TrackSurfaceIntersection.h"
 #include <atomic>
 
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadCondHandle.h"
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+
 namespace Trk
 {
     
@@ -107,8 +109,9 @@ private:
                                                          const Amg::Vector3D&	planePosition,
                                                          const Amg::Vector3D&	planeNormal,
                                                          double& stepLength) const;
-    Amg::Vector3D			field (const Amg::Vector3D&	point) const;
-    
+    Amg::Vector3D			field (const Amg::Vector3D&	point, MagField::AtlasFieldCache &fieldCache) const;
+    void                                initializeFieldCache(MagField::AtlasFieldCache& fieldCache) const;
+
     bool				isTrapped (const double distance,
                            double& previousDistance,
                            unsigned long long& stepsUntilTrapped) const;
@@ -127,10 +130,11 @@ private:
     void				step (TrackSurfaceIntersection& isect,
                                               Amg::Vector3D& fieldValue,
                                               double& stepLength,
-                                              const double qOverP) const;
+                                              const double qOverP,
+                                              MagField::AtlasFieldCache &fieldCache) const;
 
-    // field access:
-    ServiceHandle<MagField::IMagFieldSvc>	m_magFieldSvc;
+    SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey
+       {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
 
     // additional configuration
     bool					m_productionMode;
@@ -256,12 +260,21 @@ RungeKuttaIntersector::distanceToPlane (const TrackSurfaceIntersection& isect,
     return		  std::abs(distance);
 }
 
+inline void
+RungeKuttaIntersector::initializeFieldCache(MagField::AtlasFieldCache &fieldCache) const {
+    SG::ReadCondHandle<AtlasFieldCacheCondObj> fieldCondObj{m_fieldCacheCondObjInputKey};
+    if (!fieldCondObj.isValid()) {
+       ATH_MSG_FATAL("Failed to get magnetic field conditions data " << m_fieldCacheCondObjInputKey.key() );
+    }
+    fieldCondObj->getInitializedCache (fieldCache);
+}
+
 inline Amg::Vector3D
-RungeKuttaIntersector::field (const Amg::Vector3D& position) const
+RungeKuttaIntersector::field (const Amg::Vector3D& position, MagField::AtlasFieldCache &fieldCache) const
 {
-    Amg::Vector3D field;
-    m_magFieldSvc->getField(&position,&field);
-    return field;
+    Amg::Vector3D fieldValue;
+    fieldCache.getField(position.data(),fieldValue.data());
+    return fieldValue;
 }
     
 inline const TrackSurfaceIntersection*
diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.ref b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.ref
index a579c78cadc74322207551cd393f4f521ad4a36f..2bf2e191c4e7cfdf59b2541823bd68e4c9d613c1 100644
--- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.ref
+++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.ref
@@ -1,16 +1,16 @@
 RungeKuttaIntersector_test
 
 
-Initializing Gaudi ApplicationMgr using job opts ../share/RungeKuttaIntersector_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/RungeKuttaIntersector_test.txt
+Initializing Gaudi ApplicationMgr using job opts /data/goetz/ws/MagneticFieldSvc/build/../source/athena/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.txt
+JobOptionsSvc        INFO # =======> /data/goetz/ws/MagneticFieldSvc/build/../source/athena/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.txt
 JobOptionsSvc        INFO # (1,1): ApplicationMgr.ExtSvc = ["MagField::AtlasFieldSvc/AtlasFieldSvc"]
 JobOptionsSvc        INFO # (2,1): AtlasFieldSvc.UseDCS = 0
 JobOptionsSvc        INFO # (3,1): AtlasFieldSvc.UseMapsFromCool = 0
-JobOptionsSvc        INFO Job options successfully read in from ../share/RungeKuttaIntersector_test.txt
+JobOptionsSvc        INFO Job options successfully read in from /data/goetz/ws/MagneticFieldSvc/build/../source/athena/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/share/RungeKuttaIntersector_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Sun Jan 27 10:54:23 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on atdesy14 on Mon May 11 11:58:58 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AtlasFieldSvc        INFO initialize() ...
@@ -19,18 +19,11 @@ AtlasFieldSvc        INFO Added listener to BeginRun incident
 AtlasFieldSvc        INFO initialize() successful
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
-ToolSvc.Trk::Ru...   INFO Retrieved service MagFieldSvc = ServiceHandle('MagField::AtlasFieldSvc/AtlasFieldSvc')
-AtlasFieldSvc        INFO handling incidents ...
-AtlasFieldSvc        INFO importCurrents() ...
-AtlasFieldSvc        INFO Initializing the field map (solenoidCurrent=7730 toroidCurrent=20400)
-AtlasFieldSvc        INFO reading the map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Initialized the field map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Currents imported and map initialized
-AtlasFieldSvc        INFO BeginRun incident handled
-AtlasFieldSvc        INFO incidents handled successfully
+ClassIDSvc           INFO  getRegistryEntries: read 1776 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 372 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2267 CLIDRegistry entries for module ALL
 test_plane
 test_line
 test_cylinder
diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx
index 3f34d71457c143751a81b6cc95cb4707a73baa3f..3d03b69aaf4fe0adc7fb1afdb8d609ec66fbdc7e 100755
--- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx
+++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/src/RungeKuttaIntersector.cxx
@@ -26,7 +26,6 @@ RungeKuttaIntersector::RungeKuttaIntersector (const std::string&	type,
 					      const std::string&	name, 
 					      const IInterface*		parent)
     :	base_class		(type, name, parent),
-	m_magFieldSvc		("MagField::AtlasFieldSvc/AtlasFieldSvc", name),
 	m_productionMode	(true),
 	m_caloR0		(1900.*Gaudi::Units::mm),	// r min for calo high field gradient region
 	m_caloR1		(2500.*Gaudi::Units::mm),	// r max for calo high field gradient region
@@ -76,7 +75,6 @@ RungeKuttaIntersector::RungeKuttaIntersector (const std::string&	type,
 	m_countStep		(0),
 	m_countStepReduction	(0)
 {
-    declareProperty("MagFieldSvc",		m_magFieldSvc ); 
     declareProperty("ProductionMode",		m_productionMode);
 }
 
@@ -89,10 +87,8 @@ RungeKuttaIntersector::initialize(){
     if (StatusCode::SUCCESS != AlgTool::initialize()) return StatusCode::FAILURE;
 
     // retrieve MagneticFieldTool and StraightLineIntersector
-    if (! m_magFieldSvc.empty()) ATH_CHECK(m_magFieldSvc.retrieve());
-	
-	  ATH_MSG_INFO( "Retrieved service " << m_magFieldSvc );
-	
+    ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
+
     // productionMode gives steplengths tuned for use in production (adequate precision),
     // otherwise take very small steps for maximum precision but with a heavy execution penalty
     if (! m_productionMode){
@@ -171,7 +167,9 @@ RungeKuttaIntersector::approachPerigeeSurface(const PerigeeSurface&		surface,
     const Amg::Vector3D& pos = isect->position();
     const double rStart = pos.perp();
     const double zStart = pos.z();
-    Amg::Vector3D fieldValue = field(pos);
+    MagField::AtlasFieldCache fieldCache;
+    initializeFieldCache(fieldCache);
+    Amg::Vector3D fieldValue = field(pos, fieldCache);
 
     // straight line distance along track to closest approach to line
     const Amg::Vector3D& lineDirection	= (surface.transform().rotation()).col(2);
@@ -190,7 +188,7 @@ RungeKuttaIntersector::approachPerigeeSurface(const PerigeeSurface&		surface,
             return nullptr;
         }
         assignStepLength(*isect, stepLength);
-	step(*isect, fieldValue, stepLength, qOverP);
+	step(*isect, fieldValue, stepLength, qOverP, fieldCache);
 	distance = distanceToLine (*isect, surface.center(),lineDirection, stepLength);
     }
 
@@ -211,7 +209,9 @@ RungeKuttaIntersector::approachStraightLineSurface(const StraightLineSurface&		s
     const Amg::Vector3D& pos = isect->position();
     const double rStart = pos.perp();
     const double zStart = pos.z();
-    Amg::Vector3D fieldValue = field(pos);
+    MagField::AtlasFieldCache fieldCache;
+    initializeFieldCache(fieldCache);
+    Amg::Vector3D fieldValue = field(pos, fieldCache);
 
     // straight line distance along track to closest approach to line
     const Amg::Vector3D& lineDirection	= (surface.transform().rotation()).col(2);
@@ -230,7 +230,7 @@ RungeKuttaIntersector::approachStraightLineSurface(const StraightLineSurface&		s
             return nullptr;
         }
 	assignStepLength(*isect, stepLength);
-	step(*isect, fieldValue, stepLength, qOverP);
+	step(*isect, fieldValue, stepLength, qOverP,fieldCache);
 	distance = distanceToLine (*isect, surface.center(),lineDirection, stepLength);
     }
 
@@ -251,7 +251,9 @@ RungeKuttaIntersector::intersectCylinderSurface (const CylinderSurface&			surfac
     const Amg::Vector3D& pos = isect->position();
     const double rStart = pos.perp();
     const double zStart = pos.z();
-    Amg::Vector3D fieldValue = field(pos);
+    MagField::AtlasFieldCache fieldCache;
+    initializeFieldCache(fieldCache);
+    Amg::Vector3D fieldValue = field(pos, fieldCache);
 
     // calculate straight line distance along track to intersect with cylinder radius
     double cylinderRadius	= (surface.globalReferencePoint() - surface.center()).perp();
@@ -272,7 +274,7 @@ RungeKuttaIntersector::intersectCylinderSurface (const CylinderSurface&			surfac
         }
 	assignStepLength(*isect, stepLength);
 	double rPrevious= rCurrent;
-	step(*isect, fieldValue, stepLength, qOverP);
+	step(*isect, fieldValue, stepLength, qOverP,fieldCache);
 	offset		= surface.center() - isect->position();
 	rCurrent	= offset.perp();
 	double deltaR1	= rCurrent - rPrevious;
@@ -321,7 +323,9 @@ RungeKuttaIntersector::intersectDiscSurface (const DiscSurface&			surface,
     const Amg::Vector3D& pos = isect->position();
     const double rStart = pos.perp();
     const double zStart = pos.z();
-    Amg::Vector3D fieldValue = field(pos);
+    MagField::AtlasFieldCache fieldCache;
+    initializeFieldCache(fieldCache);
+    Amg::Vector3D fieldValue = field(pos, fieldCache);
 
     // straight line distance along track to intersect with disc
     double stepLength = 0;
@@ -339,7 +343,7 @@ RungeKuttaIntersector::intersectDiscSurface (const DiscSurface&			surface,
             return nullptr;
         }
         assignStepLength(*isect, stepLength);
-	step(*isect, fieldValue, stepLength, qOverP);
+	step(*isect, fieldValue, stepLength, qOverP,fieldCache);
 	distance = distanceToDisc (*isect, surface.center().z(), stepLength);
     }
 
@@ -360,7 +364,9 @@ RungeKuttaIntersector::intersectPlaneSurface(const PlaneSurface&		surface,
     const Amg::Vector3D& pos = isect->position();
     const double rStart = pos.perp();
     const double zStart = pos.z();
-    Amg::Vector3D fieldValue = field(pos);
+    MagField::AtlasFieldCache fieldCache;
+    initializeFieldCache(fieldCache);
+    Amg::Vector3D fieldValue = field(pos, fieldCache);
 
     // straight line distance along track to intersect with plane
     double stepLength = 0;
@@ -378,7 +384,7 @@ RungeKuttaIntersector::intersectPlaneSurface(const PlaneSurface&		surface,
             return nullptr;
         }
         assignStepLength(*isect, stepLength);
-	step(*isect, fieldValue, stepLength, qOverP);
+	step(*isect, fieldValue, stepLength, qOverP, fieldCache);
 	distance = distanceToPlane (*isect, surface.center(),surface.normal(), stepLength);
     }
 
@@ -806,7 +812,8 @@ void
 RungeKuttaIntersector::step (TrackSurfaceIntersection& isect,
                              Amg::Vector3D& fieldValue,
                              double& stepLength,
-                             const double qOverP) const
+                             const double qOverP,
+                             MagField::AtlasFieldCache &fieldCache) const
 {
     Amg::Vector3D& pos = isect.position();
     Amg::Vector3D& dir = isect.direction();
@@ -817,7 +824,7 @@ RungeKuttaIntersector::step (TrackSurfaceIntersection& isect,
 
     // intermediate field look-up point (half way through step)
     Amg::Vector3D position1	=  pos + 0.5*stepLength*(dir + 0.5*product0);
-    Amg::Vector3D fieldValue1	=  field(position1);
+    Amg::Vector3D fieldValue1	=  field(position1, fieldCache);
     Amg::Vector3D direction1	=  dir + product0;
     Amg::Vector3D product1	=  stepOverP*direction1.cross(fieldValue1);
     Amg::Vector3D direction2	=  dir + product1;
@@ -825,7 +832,7 @@ RungeKuttaIntersector::step (TrackSurfaceIntersection& isect,
 
     // field look-up at step end point
     Amg::Vector3D offsetAtEnd	=  stepLength*(dir + m_third*(product0+product1+product2));
-    Amg::Vector3D fieldAtEnd	=  field(pos+offsetAtEnd);
+    Amg::Vector3D fieldAtEnd	=  field(pos+offsetAtEnd, fieldCache);
 
     // redo with reduced stepLength if non-uniform field derivative detected
     if ((fieldValue1 - 0.5*(fieldValue + fieldAtEnd)).mag() > 0.00001
@@ -873,7 +880,7 @@ RungeKuttaIntersector::step (TrackSurfaceIntersection& isect,
 	product0			=  stepOverP*dir.cross(fieldValue);
 	// intermediate point (half way through step)
 	Amg::Vector3D position1p	=  pos + 0.5*stepLength*(dir + 0.5*product0);
-	Amg::Vector3D fieldValue1p	=  field(position1p);
+	Amg::Vector3D fieldValue1p	=  field(position1p,fieldCache);
 	Amg::Vector3D direction1p	=  dir + product0;
 	product1			=  stepOverP*direction1p.cross(fieldValue1p);
 	Amg::Vector3D direction2p	=  dir + product1;
@@ -881,7 +888,7 @@ RungeKuttaIntersector::step (TrackSurfaceIntersection& isect,
 	// step end point
 	offsetAtEnd			=  stepLength *
 					   (dir + m_third*(product0+product1+product2));
-	fieldAtEnd			=  field(pos+offsetAtEnd);
+	fieldAtEnd			=  field(pos+offsetAtEnd,fieldCache);
     }
 
     Amg::Vector3D direction3	=  dir + 2.*product2;
diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx
index f0c0809b019ae46ea9c49cf8eec832bbfe0f983c..54362474e96a6903574fe4deda194912f75ae278 100644
--- a/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx
+++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.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 TrkExRungeKuttaIntersector/test/RungeKuttaIntersector_test.cxx
@@ -10,7 +10,6 @@
 
 #undef NDEBUG
 #include "TrkExInterfaces/IIntersector.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TestTools/initGaudi.h"
 #include "TestTools/FLOATassert.h"
 #include "AthenaKernel/Units.h"
@@ -23,6 +22,18 @@
 #include <cassert>
 #include <cmath>
 
+// for the field map
+#include "PathResolver/PathResolver.h"
+#include "TFile.h"
+#include "TTree.h"
+
+// for populating conditions store
+#include "SGTools/TestStore.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "StoreGate/WriteCondHandle.h"
+
+// for the conditions data
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 
 using Athena::Units::meter;
 using Athena::Units::GeV;
@@ -268,18 +279,68 @@ void test_perigee (Trk::IIntersector& tool)
 }
 
 
+std::unique_ptr<MagField::AtlasFieldMap> getFieldMap(const std::string mapFile, double sol_current, double tor_current) {
+       // find the path to the map file
+    std::string resolvedMapFile = PathResolver::find_file( mapFile.c_str(), "DATAPATH" );
+    assert ( !resolvedMapFile.empty() );
+    // Do checks and extract root file to initialize the map
+    assert ( resolvedMapFile.find(".root") != std::string::npos );
+
+    std::unique_ptr<TFile> rootfile( std::make_unique<TFile>(resolvedMapFile.c_str(), "OLD") );
+    assert ( rootfile );
+    assert ( rootfile->cd() );
+    // open the tree
+    TTree* tree = (TTree*)rootfile->Get("BFieldMap");
+    assert(tree);
+
+    // create map
+    std::unique_ptr<MagField::AtlasFieldMap> field_map=std::make_unique<MagField::AtlasFieldMap>();
+
+    // initialize map
+    assert (field_map->initializeMap( rootfile.get(), sol_current, tor_current ));
+    return field_map;
+
+}
+
+void createAtlasFieldCacheCondObj(SGTest::TestStore &store) {
+   SG::WriteCondHandleKey<AtlasFieldCacheCondObj> fieldKey {"fieldCondObj"};
+   assert( fieldKey.initialize().isSuccess());
+
+   // from StoreGate/test/WriteCondHandle_test.cxx
+   EventIDBase now(0, EventIDBase::UNDEFEVT, 1);
+   EventContext ctx(1, 1);
+   ctx.setEventID( now );
+   ctx.setExtension( Atlas::ExtendedEventContext(&store) );
+   Gaudi::Hive::setCurrentContext(ctx);
+
+   EventIDBase s1_1(0, EventIDBase::UNDEFEVT, 0);
+   EventIDBase e1_1(0, EventIDBase::UNDEFEVT, 3);
+   EventIDRange r1_1 (s1_1,e1_1);
+
+
+   SG::WriteCondHandle<AtlasFieldCacheCondObj> fieldHandle {fieldKey};
+   std::unique_ptr<MagField::AtlasFieldMap> fieldMap=getFieldMap("MagneticFieldMaps/bfieldmap_7730_20400_14m.root",7730,20400);
+   auto fieldCondObj = std::make_unique<AtlasFieldCacheCondObj>();
+   assert( fieldCondObj->initialize(1. /*solenoid current scale factor*/, 1. /*toroid current scale factor*/, fieldMap.release()));
+   assert( fieldHandle.record(r1_1, std::move(fieldCondObj)).isSuccess());
+}
+
 int main()
 {
   std::cout << "RungeKuttaIntersector_test\n";
   CxxUtils::ubsan_suppress ([]() { TInterpreter::Instance(); });
   ISvcLocator* svcloc = nullptr;
   Athena_test::initGaudi ("RungeKuttaIntersector_test.txt", svcloc);
+
+  StoreGateSvc *cs=nullptr;
+  assert (svcloc->service("StoreGateSvc/ConditionStore",cs).isSuccess());
+
+  SGTest::TestStore dumstore;
+  createAtlasFieldCacheCondObj(dumstore);
+
   ToolHandle<Trk::IIntersector> tool ("Trk::RungeKuttaIntersector");
   assert( tool.retrieve().isSuccess() );
-  ServiceHandle<MagField::IMagFieldSvc> field ("MagField::AtlasFieldSvc/AtlasFieldSvc", "test");
-  Incident inc ("test", IncidentType::BeginRun);
-  dynamic_cast<IIncidentListener*>(&*field)->handle (inc);
-  
+
   test_plane (*tool);
   test_line (*tool);
   test_cylinder (*tool);
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt
index ddecd210593c3bccb18bde60f620678b02db6ee5..b634a52c8db565e242150580a753df2b0ce9957c 100644
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/CMakeLists.txt
@@ -10,26 +10,33 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           DetectorDescription/GeoPrimitives
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagneticField/MagFieldConditions
+                          MagneticField/MagFieldElements
                           Tracking/TrkExtrapolation/TrkExInterfaces
                           Tracking/TrkExtrapolation/TrkExUtils
                           PRIVATE
                           Control/CxxUtils
                           Event/EventPrimitives
                           Tracking/TrkDetDescr/TrkSurfaces
-                          Tracking/TrkEvent/TrkParameters )
+                          Tracking/TrkEvent/TrkParameters
+                          Tools/PathResolver )
 
 # External dependencies:
 find_package( Eigen )
 find_package( ROOT )
 
+atlas_add_library( TrkExSolenoidalIntersectorLib
+                   src/SolenoidalIntersector.cxx
+                   src/SolenoidParametrization.cxx
+                   src/SolenoidParametrizationCondAlg.cxx
+                   PUBLIC_HEADERS TrkExSolenoidalIntersector
+                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel MagFieldElements MagFieldConditions TrkExInterfaces TrkExUtils EventPrimitives TrkSurfaces TrkParameters )
+
 # Component(s) in the package:
 atlas_add_component( TrkExSolenoidalIntersector
-                     src/SolenoidalIntersector.cxx
-                     src/SolenoidParametrization.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel MagFieldInterfaces TrkExInterfaces TrkExUtils EventPrimitives TrkSurfaces TrkParameters )
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} TrkExSolenoidalIntersectorLib )
 
 # Install files from the package:
 atlas_install_headers( TrkExSolenoidalIntersector )
@@ -37,7 +44,7 @@ atlas_install_headers( TrkExSolenoidalIntersector )
 
 atlas_add_test( SolenoidParametrization_test
                 SOURCES test/SolenoidParametrization_test.cxx
-                LINK_LIBRARIES TrkExUtils GaudiKernel TestTools
+                LINK_LIBRARIES TrkExUtils GaudiKernel TestTools PathResolver MagFieldElements MagFieldConditions
                 LOG_IGNORE_PATTERN "^AtlasFieldSvc +INFO"
                 PROPERTIES TIMEOUT 300
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
@@ -46,7 +53,7 @@ atlas_add_test( SolenoidParametrization_test
 atlas_add_test( SolenoidalIntersector_test
                 SOURCES test/SolenoidalIntersector_test.cxx
                 INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES TrkExUtils GaudiKernel TestTools CxxUtils ${ROOT_LIBRARIES}
+                LINK_LIBRARIES TrkExUtils GaudiKernel TestTools CxxUtils ${ROOT_LIBRARIES} MagFieldElements MagFieldConditions PathResolver TrkExSolenoidalIntersectorLib
                 LOG_IGNORE_PATTERN "^AtlasFieldSvc +INFO"
                 PROPERTIES TIMEOUT 300
                 ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidParametrization.h b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidParametrization.h
index 7614d637076cd4e5ce0ea102bd403c6747026d3d..48de4fa26691b1fa980aff556eb1145f3c07512d 100755
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidParametrization.h
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidParametrization.h
@@ -15,8 +15,7 @@
 #include <cassert>
 #include <cmath>
 #include "GeoPrimitives/GeoPrimitives.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
-
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 class MsgStream;
 
 //  class SolenoidParametrization
@@ -57,16 +56,19 @@ public:
       double m_cubicTerm;
     };
 
-    SolenoidParametrization		(MagField::IMagFieldSvc* magFieldSvc);	// configuration from Intersector
+    SolenoidParametrization		(const AtlasFieldCacheCondObj &field_cond_obj);	// configuration from Intersector
     ~SolenoidParametrization() = default;
     
     // forbidden copy constructor
     // forbidden assignment operator
 
     double			centralField() const;
-    double			fieldComponent (double z,
+    double		fieldComponent (double z,
                                                 const Parameters& parms) const;		// parametrized - perp to track in rz-plane
-    double			fieldComponent (double r, double z, double cotTheta) const; // from MagFieldSvc
+    double		fieldComponent (double r,
+                                                double z,
+                                                double cotTheta,
+                                                MagField::AtlasFieldCache &fieldCache) const; // from MagFieldSvc
     void			fieldIntegrals (double& firstIntegral,
                                                 double& secondIntegral,
                                                 double zBegin,
@@ -112,7 +114,7 @@ private:
     static const double		s_zInner;
     static const double		s_zOuter;
 
-    MagField::IMagFieldSvc*	m_magFieldSvc;
+    const AtlasFieldCacheCondObj *m_fieldCondObj;
     double                      m_currentMin;
     double                      m_currentMax;
     double		        m_centralField;
@@ -231,11 +233,11 @@ SolenoidParametrization::fieldComponent (double z, const Parameters& parms) cons
 }
 
 inline double
-SolenoidParametrization::fieldComponent (double r, double z, double cotTheta) const
+SolenoidParametrization::fieldComponent (double r, double z, double cotTheta, MagField::AtlasFieldCache &fieldCache) const
 {
     Amg::Vector3D field;
     Amg::Vector3D position(r, 0., z);
-    m_magFieldSvc->getField(&position,&field);
+    fieldCache.getField(position.data(),field.data());
     return	s_lightSpeed*(field.z() - field.perp()*cotTheta);
 }
 
@@ -276,4 +278,9 @@ SolenoidParametrization::validOrigin(const Amg::Vector3D& origin) const
 
 } // end of namespace
 
+#include "AthenaKernel/CLASS_DEF.h"
+CLASS_DEF( Trk::SolenoidParametrization, 49459850, 1)
+#include "AthenaKernel/CondCont.h"
+CONDCONT_DEF (Trk::SolenoidParametrization, 19878742);
+
 #endif // TRKEXSOLENOIDALINTERSECTOR_SOLENOIDPARAMETRIZATION_H
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidalIntersector.h b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidalIntersector.h
index 3c01899fc414070e7cff39aca672f866dae3ec9c..0259abedf4b68a03294b149cda37d81fab1ad583 100755
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidalIntersector.h
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/TrkExSolenoidalIntersector/SolenoidalIntersector.h
@@ -10,11 +10,11 @@
 #define TRKEXSOLENOIDALINTERSECTOR_SOLENOIDALINTERSECTOR_H
 
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ServiceHandle.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/ReadCondHandle.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ContextSpecificPtr.h"
 #include "GeoPrimitives/GeoPrimitives.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TrkExInterfaces/IIntersector.h"
 #include "TrkExUtils/TrackSurfaceIntersection.h"
 #include "TrkExSolenoidalIntersector/SolenoidParametrization.h"
@@ -22,6 +22,8 @@
 #include <mutex>
 #include <cmath>
 
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+
 namespace Trk
 {
 
@@ -53,9 +55,7 @@ public:
       Constants (const SolenoidParametrization& solpar,
                  const TrackSurfaceIntersection& trackTrackSurfaceIntersection,
                  const double qOverP);
-      virtual std::unique_ptr<IIntersectionCache> clone() const override
-      { return std::make_unique<Constants> (*this); }
-
+      virtual std::unique_ptr<IIntersectionCache> clone() const override { return std::unique_ptr<IIntersectionCache>(new Constants(*this)); }
       double m_sinTheta;
       double m_oneOverSinTheta;
       double m_cotTheta;
@@ -115,9 +115,17 @@ public:
 
     /** tabulate parametrization details */
     virtual void		validationAction() const override;
-    
+
 private:
-    const SolenoidParametrization*              getSolenoidParametrization() const;
+
+    void throwMissingCondData() const;
+    const SolenoidParametrization*              getSolenoidParametrization() const {
+       SG::ReadCondHandle<SolenoidParametrization> handle(m_solenoidParametrizationKey);
+       if (!handle.isValid()) {
+          throwMissingCondData();
+       }
+       return handle.cptr();
+    }
 
     double					circularArcLength(double, double, double, double, double,
 								    double, double&, double&) const;
@@ -142,7 +150,8 @@ private:
                     const double qOverP,
                     Constants*& com) const;
 
-    ServiceHandle<MagField::IMagFieldSvc>	m_magFieldSvc;
+    SG::ReadCondHandleKey<SolenoidParametrization> m_solenoidParametrizationKey
+       { this, "SolenoidParameterizationKey", "SolenoidParametrization",""};
     ToolHandle<IIntersector>			m_rungeKuttaIntersector;
 
     double					m_deltaPhiTolerance;
@@ -152,12 +161,6 @@ private:
     mutable std::atomic<unsigned long long>	m_countExtrapolations;
     mutable std::atomic<unsigned long long>	m_countRKSwitches;
 
-    mutable std::mutex m_mutex;
-    mutable Gaudi::Hive::ContextSpecificPtr<const SolenoidParametrization> m_lastSolenoidParametrization ATLAS_THREAD_SAFE;
-    // List of active solenoid parametrizations.  Second element of the pair
-    // is a use count.
-    typedef std::list<std::pair<SolenoidParametrization, int> > Parmlist_t;
-    mutable Parmlist_t m_solenoidParametrizations ATLAS_THREAD_SAFE;
 };
 
 
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidParametrization_test.ref b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidParametrization_test.ref
index effd074f524bef3115aec3f8dcbc6da29ce80998..c0be9310651fffcc3a14b6ef443e3c0d5d5547b5 100644
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidParametrization_test.ref
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidParametrization_test.ref
@@ -1,33 +1,2 @@
 SolenoidParametrization_test
-
-
-Initializing Gaudi ApplicationMgr using job opts ../share/SolenoidalIntersector_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build-dvtest/../tests/../share/SolenoidalIntersector_test.txt
-JobOptionsSvc        INFO # (1,1): ApplicationMgr.ExtSvc = ["MagField::AtlasFieldSvc/AtlasFieldSvc"]
-JobOptionsSvc        INFO # (2,1): AtlasFieldSvc.UseDCS = 0
-JobOptionsSvc        INFO # (3,1): AtlasFieldSvc.UseMapsFromCool = 0
-JobOptionsSvc        INFO Job options successfully read in from ../share/SolenoidalIntersector_test.txt
-ApplicationMgr    SUCCESS 
-====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Sun Feb  3 22:37:00 2019
-====================================================================================================================================
-ApplicationMgr       INFO Application Manager Configured successfully
-AtlasFieldSvc        INFO initialize() ...
-AtlasFieldSvc        INFO Currents are set-up by jobOptions - delaying map initialization until BeginRun incident happens
-AtlasFieldSvc        INFO Added listener to BeginRun incident
-AtlasFieldSvc        INFO initialize() successful
-EventLoopMgr      WARNING Unable to locate service "EventSelector" 
-EventLoopMgr      WARNING No events will be processed from external input.
-HistogramPersis...WARNING Histograms saving not required.
-ApplicationMgr       INFO Application Manager Initialized successfully
-ApplicationMgr Ready
-AtlasFieldSvc        INFO handling incidents ...
-AtlasFieldSvc        INFO importCurrents() ...
-AtlasFieldSvc        INFO Initializing the field map (solenoidCurrent=7730 toroidCurrent=20400)
-AtlasFieldSvc        INFO reading the map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Initialized the field map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Currents imported and map initialized
-AtlasFieldSvc        INFO BeginRun incident handled
-AtlasFieldSvc        INFO incidents handled successfully
 test1
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.ref b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.ref
index 013b4a958ac5709daf96ef0dd3c97795f38e73c8..b31f3b0810a4ba9e3734969d7cdb8f719d76af3a 100644
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.ref
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.ref
@@ -1,16 +1,16 @@
 SolenoidalIntersector_test
 
 
-Initializing Gaudi ApplicationMgr using job opts ../share/SolenoidalIntersector_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/SolenoidalIntersector_test.txt
+Initializing Gaudi ApplicationMgr using job opts /data/goetz/ws/MagneticFieldSvc/build/../source/athena/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.txt
+JobOptionsSvc        INFO # =======> /data/goetz/ws/MagneticFieldSvc/build/../source/athena/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.txt
 JobOptionsSvc        INFO # (1,1): ApplicationMgr.ExtSvc = ["MagField::AtlasFieldSvc/AtlasFieldSvc"]
 JobOptionsSvc        INFO # (2,1): AtlasFieldSvc.UseDCS = 0
 JobOptionsSvc        INFO # (3,1): AtlasFieldSvc.UseMapsFromCool = 0
-JobOptionsSvc        INFO Job options successfully read in from ../share/SolenoidalIntersector_test.txt
+JobOptionsSvc        INFO Job options successfully read in from /data/goetz/ws/MagneticFieldSvc/build/../source/athena/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/share/SolenoidalIntersector_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Sun Feb  3 21:41:27 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r1)
+                                          running on atdesy14 on Mon May 11 11:36:57 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 AtlasFieldSvc        INFO initialize() ...
@@ -19,19 +19,22 @@ AtlasFieldSvc        INFO Added listener to BeginRun incident
 AtlasFieldSvc        INFO initialize() successful
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
-HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
-ToolSvc.Trk::So...   INFO SolenoidalIntersector::initialize() - package version TrkExSolenoidalIntersector-00-00-00
-ToolSvc.Trk::So...   INFO Retrieved service MagFieldSvc = ServiceHandle('MagField::AtlasFieldSvc/AtlasFieldSvc')
+ClassIDSvc           INFO  getRegistryEntries: read 1896 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 372 CLIDRegistry entries for module ALL
 AtlasFieldSvc        INFO handling incidents ...
 AtlasFieldSvc        INFO importCurrents() ...
 AtlasFieldSvc        INFO Initializing the field map (solenoidCurrent=7730 toroidCurrent=20400)
-AtlasFieldSvc        INFO reading the map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
-AtlasFieldSvc        INFO Initialized the field map from /home/sss/nobackup/atlas/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO reading the map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO Initialized the field map from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/atlas/offline/ReleaseData/v20/MagneticFieldMaps/bfieldmap_7730_20400_14m.root
+AtlasFieldSvc        INFO Solenoid zone id 7000
 AtlasFieldSvc        INFO Currents imported and map initialized
 AtlasFieldSvc        INFO BeginRun incident handled
 AtlasFieldSvc        INFO incidents handled successfully
+ClassIDSvc           INFO  getRegistryEntries: read 2161 CLIDRegistry entries for module ALL
+ToolSvc.Trk::So...   INFO SolenoidalIntersector::initialize() - package version TrkExSolenoidalIntersector-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 163 CLIDRegistry entries for module ALL
 test_plane
 test_line
 test_cylinder
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrization.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrization.cxx
index 90825896e51f51b786c6142c7b46700238b6ca1a..bc408c1bd6a699d6c97a9a48cff8f4d8aa7dc337 100755
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrization.cxx
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrization.cxx
@@ -15,6 +15,9 @@
 #include "GaudiKernel/SystemOfUnits.h"
 #include "TrkExSolenoidalIntersector/SolenoidParametrization.h"
 #include "GaudiKernel/MsgStream.h"
+
+#include "MagFieldElements/AtlasFieldCache.h"
+
 namespace {
     class RestoreIOSFlags 
     {
@@ -87,19 +90,14 @@ SolenoidParametrization::Parameters::Parameters (const SolenoidParametrization&
 
 
 
-SolenoidParametrization::SolenoidParametrization(MagField::IMagFieldSvc* magFieldSvc)
-  : m_magFieldSvc	    (magFieldSvc),
+   SolenoidParametrization::SolenoidParametrization(const AtlasFieldCacheCondObj &field_cond_obj)
+  : m_fieldCondObj	    (&field_cond_obj),
     m_parameters            ()
 {
-    // allow 0.1% fluctuation in current.
-    double current = magFieldSvc->solenoidCurrent();
-    m_currentMax	 = 1.001*current;
-    m_currentMin	 = 0.999*current;
-
-  // get central field value in units required for fast tracking (i.e. field = B*c)
-    if (!m_magFieldSvc)
-       throw std::logic_error("fieldComponent not defined without magnetic field service.");
-    m_centralField    	= fieldComponent(0.,0.,0.);
+
+    MagField::AtlasFieldCache fieldCache;
+    m_fieldCondObj->getInitializedCache (fieldCache);
+    m_centralField    	= fieldComponent(0.,0.,0., fieldCache);
     // now parametrise field - if requested
     {
       parametrizeSolenoid();
@@ -115,7 +113,9 @@ SolenoidParametrization::parametrizeSolenoid(void){
   // 'fit' to average over cotTheta lines
   double	smallOffset	= 0.0000000000001; // avoid FPE
   double zAtAxis 	= s_binZeroZ;	// + smallOffset ? 
-  //
+  MagField::AtlasFieldCache fieldCache;
+  m_fieldCondObj->getInitializedCache (fieldCache);
+  
   for (int binZ = 0; binZ < s_maxBinZ; ++binZ){ 
     double cotTheta	= smallOffset; 
     for (int binTheta = 0; binTheta < s_maxBinTheta - 1; ++binTheta){
@@ -144,7 +144,7 @@ SolenoidParametrization::parametrizeSolenoid(void){
             derivative(k,1)	= w*zLocal*zLocal;
             derivative(k,2)	= w*zLocal*zLocal*zLocal;
         }
-        difference(k)		= w*(fieldComponent(r,z,cotTheta) - m_centralField);
+        difference(k)		= w*(fieldComponent(r,z,cotTheta, fieldCache) - m_centralField);
       }
       // solve for parametrization coefficients
       Amg::VectorX solution	= derivative.colPivHouseholderQr().solve(difference);
@@ -222,6 +222,9 @@ SolenoidParametrization::printFieldIntegrals (MsgStream& msg) const
     double maxZ		= 2650.*Gaudi::Units::mm;
     int numSteps	= 1000;
 
+    MagField::AtlasFieldCache fieldCache;
+    m_fieldCondObj->getInitializedCache (fieldCache);
+
     // step through eta-range
     double eta	= 0.;
     for (int i = 0; i != 31; ++i)
@@ -249,7 +252,7 @@ SolenoidParametrization::printFieldIntegrals (MsgStream& msg) const
 	{
 	    position			+= 0.5*step*direction;
 	    Amg::Vector3D field;
-	    m_magFieldSvc->getField(&position,&field);
+	    fieldCache.getField(position.data(),field.data());
 	    Amg::Vector3D vCrossB	=  direction.cross(field);
 	    position			+= 0.5*step*direction;
 	    double BZ			=  field.z();
@@ -316,7 +319,7 @@ SolenoidParametrization::printFieldIntegrals (MsgStream& msg) const
 	    {
         position		+= 0.5*step*direction;
         Amg::Vector3D field;
-        m_magFieldSvc->getField(&position,&field);
+        fieldCache.getField(position.data(),field.data());
         Amg::Vector3D vCrossB	=  direction.cross(field);
         position		+= 0.5*step*direction;
         double BT		=  vCrossB.x()*direction.y() - vCrossB.y()*direction.x();
@@ -389,9 +392,11 @@ SolenoidParametrization::printResidualForEtaLine (double eta, double zOrigin, Ms
     double 	worstDiff     	= -1.;
     double 	worstR		= 0.;
     double 	worstZ		= 0.;
+    MagField::AtlasFieldCache fieldCache;
+    m_fieldCondObj->getInitializedCache (fieldCache);
     for (int k = 0; k < n; ++k)
     {
-	double	b 	= fieldComponent(r,z,cotTheta);
+       double	b 	= fieldComponent(r,z,cotTheta,fieldCache);
         Parameters parms (*this, r, z, cotTheta);
 	double	diff 	= (fieldComponent(z, parms) - b)/s_lightSpeed;
 	
@@ -435,11 +440,6 @@ SolenoidParametrization::printResidualForEtaLine (double eta, double zOrigin, Ms
 }
 
 
-bool SolenoidParametrization::currentMatches (double current) const
-{
-  // allow 0.1% fluctuation
-  return current >= m_currentMin && current < m_currentMax;
-}
 
 
 } // end of namespace
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrizationCondAlg.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrizationCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b86f9bb2dba03c8236ddab992423f54d32296e0d
--- /dev/null
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrizationCondAlg.cxx
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SolenoidParametrizationCondAlg.h"
+#include <limits>
+namespace Trk
+{
+
+SolenoidParametrizationCondAlg::SolenoidParametrizationCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
+  : ::AthReentrantAlgorithm(name, pSvcLocator)
+  , m_condSvc{"CondSvc", name}
+{
+}
+
+StatusCode SolenoidParametrizationCondAlg::initialize() {
+  ATH_CHECK( m_condSvc.retrieve());
+  ATH_CHECK( m_fieldCacheCondObjInputKey.initialize());
+  ATH_CHECK( m_writeKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode SolenoidParametrizationCondAlg::execute(const EventContext &ctx) const {
+   SG::WriteCondHandle<SolenoidParametrization> write_handle(m_writeKey,ctx);
+   if (write_handle.isValid()) {
+      return StatusCode::SUCCESS;
+   }
+
+   SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
+   if (!readHandle.isValid()) {
+      ATH_MSG_FATAL("Failed to get magnetic field conditions data " << m_fieldCacheCondObjInputKey.key() );
+      return StatusCode::FAILURE;
+   }
+
+   write_handle.addDependency(readHandle);
+   ATH_CHECK( write_handle.record(std::make_unique<SolenoidParametrization>(*(readHandle.cptr())) ));
+   return StatusCode::SUCCESS;
+}
+
+
+StatusCode SolenoidParametrizationCondAlg::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+}
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrizationCondAlg.h b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrizationCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..56cd24ddfcca28283f8b25f35fc4786290a32084
--- /dev/null
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidParametrizationCondAlg.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/ 
+
+#ifndef _SolenoidParametrizationCondAlg_H_
+#define _SolenoidParametrizationCondAlg_H_
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+
+#include "TrkExSolenoidalIntersector/SolenoidParametrization.h"
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+
+#include "GaudiKernel/ICondSvc.h"
+
+namespace Trk
+{
+
+class SolenoidParametrizationCondAlg : public AthReentrantAlgorithm
+{
+ public:
+  SolenoidParametrizationCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~SolenoidParametrizationCondAlg() = default;
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute(const EventContext &ctx) const override;
+  virtual StatusCode finalize() override;
+
+ private:
+   SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey
+      {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
+
+   SG::WriteCondHandleKey<SolenoidParametrization> m_writeKey
+      { this, "WriteKey", "SolenoidParametrization"};
+
+   ServiceHandle<ICondSvc> m_condSvc
+      { this, "CondSvc", "CondSvc"};
+};
+}
+#endif // SCT_CONDITIONSPARAMETERCONDALG
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidalIntersector.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidalIntersector.cxx
index f932b23639e28b606b15a55d91ecf58d7b10bee1..c90004957b84012fb1afabdd4a3ad877237116d0 100755
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidalIntersector.cxx
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/SolenoidalIntersector.cxx
@@ -40,14 +40,12 @@ SolenoidalIntersector::SolenoidalIntersector (const std::string&	type,
 					      const std::string&	name, 
 					      const IInterface*		parent)
     :	base_class			(type, name, parent),
-	m_magFieldSvc			("MagField::AtlasFieldSvc/AtlasFieldSvc", name),
 	m_rungeKuttaIntersector		("Trk::RungeKuttaIntersector/RungeKuttaIntersector", this),
 	m_deltaPhiTolerance		(0.01),	// upper limit for small angle approx
 	m_surfaceTolerance		(2.0*Gaudi::Units::micrometer),
 	m_countExtrapolations		(0),
 	m_countRKSwitches		(0)
 {
-    declareProperty("MagFieldSvc",		m_magFieldSvc );
     declareProperty("RungeKuttaIntersector",	m_rungeKuttaIntersector);
     declareProperty("SurfaceTolerance",		m_surfaceTolerance);
 }
@@ -57,11 +55,7 @@ SolenoidalIntersector::initialize()
 {
     // print name and package version
     ATH_MSG_INFO( "SolenoidalIntersector::initialize() - package version " << PACKAGE_VERSION );
-    if (! m_magFieldSvc.empty())
-    {
-	    ATH_CHECK(m_magFieldSvc.retrieve());
-    }
-
+    ATH_CHECK( m_solenoidParametrizationKey.initialize() );
     ATH_CHECK(m_rungeKuttaIntersector.retrieve());
     return StatusCode::SUCCESS;
 }
@@ -76,55 +70,6 @@ SolenoidalIntersector::finalize()
 }
 
 
-const SolenoidParametrization*
-SolenoidalIntersector::getSolenoidParametrization() const
-{
-  double current = m_magFieldSvc->solenoidCurrent();
-
-  // Check to see if the last one we used is ok.
-  const SolenoidParametrization* lastpar = m_lastSolenoidParametrization.get();
-  if (lastpar && lastpar->currentMatches (current)) {
-    return lastpar;
-  }
-
-  std::lock_guard<std::mutex> lock (m_mutex);
-
-  // Search for a new one, and release the reference count on the old one.
-  const SolenoidParametrization* thispar = nullptr;
-  Parmlist_t::iterator todel = m_solenoidParametrizations.end();
-  for (Parmlist_t::iterator it = m_solenoidParametrizations.begin();
-       it != m_solenoidParametrizations.end() && (lastpar || !thispar);
-       ++it)
-  {
-    if (&it->first == lastpar) {
-      lastpar = nullptr;
-      if (--it->second <= 0) {
-        todel = it;
-      }
-    }
-    else if (!thispar && it->first.currentMatches (current)) {
-      thispar = &it->first;
-      ++it->second;
-    }
-  }
-
-  if (todel != m_solenoidParametrizations.end()) {
-    m_solenoidParametrizations.erase (todel);
-  }
-
-  if (!thispar) {
-    // Didn't find one; make a new one.
-    m_solenoidParametrizations.emplace_back (&*m_magFieldSvc, 1);
-    thispar = &m_solenoidParametrizations.back().first;
-  }
-
-  // Remember which one we used last.
-  m_lastSolenoidParametrization.set (thispar);
-
-  return thispar;
-}
-
-
 /**IIntersector interface method for general Surface type */
 const Trk::TrackSurfaceIntersection*
 SolenoidalIntersector::intersectSurface(const Surface&		surface,
@@ -295,7 +240,8 @@ SolenoidalIntersector::intersectPlaneSurface(const PlaneSurface&	surface,
 
 /**IIntersector interface method to check validity of parametrization within extrapolation range */
 bool
-SolenoidalIntersector::isValid (Amg::Vector3D startPosition, Amg::Vector3D endPosition) const
+SolenoidalIntersector::isValid (Amg::Vector3D startPosition,
+                                Amg::Vector3D endPosition) const
 {
     const SolenoidParametrization* solenoidParametrization =
       getSolenoidParametrization();
@@ -508,5 +454,10 @@ SolenoidalIntersector::newIntersection (const TrackSurfaceIntersection& isect,
   return newIsect;
 }
 
+void SolenoidalIntersector::throwMissingCondData() const {
+   std::stringstream msg;
+   msg << "Invalid read handle for SolenoidParametrization  " << m_solenoidParametrizationKey.key();
+   throw std::logic_error(msg.str());
+}
 
 } // end of namespace
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/components/TrkExSolenoidalIntersector_entries.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/components/TrkExSolenoidalIntersector_entries.cxx
index e6056cb6eb1206d7ba4f65cff6af07e53ab87871..8e7081f0007771d2a6ebaf497d743d08c6c663bd 100644
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/components/TrkExSolenoidalIntersector_entries.cxx
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/src/components/TrkExSolenoidalIntersector_entries.cxx
@@ -1,5 +1,7 @@
 #include "TrkExSolenoidalIntersector/SolenoidalIntersector.h"
+#include "../SolenoidParametrizationCondAlg.h"
 
 typedef Trk::SolenoidalIntersector TrkSolenoidalIntersector;
 DECLARE_COMPONENT( TrkSolenoidalIntersector )
+DECLARE_COMPONENT( Trk::SolenoidParametrizationCondAlg )
 
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidParametrization_test.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidParametrization_test.cxx
index 24348ab7dbe290620b4e3864a7c4c7705419c04a..58f4d34803021296a0c8929b1756190b241e58d0 100644
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidParametrization_test.cxx
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidParametrization_test.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 TrkExSolenoidalIntersector/test/SolenoidParametrization_test.cxx
@@ -10,7 +10,8 @@
 
 #undef NDEBUG
 #include "TrkExSolenoidalIntersector/SolenoidParametrization.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+#include "MagFieldElements/AtlasFieldCache.h"
 #include "TestTools/initGaudi.h"
 #include "TestTools/FLOATassert.h"
 #include "AthenaKernel/Units.h"
@@ -23,13 +24,19 @@
 
 #include "../src/SolenoidParametrization.cxx"
 
+// for the field map
+#include "PathResolver/PathResolver.h"
+#include "TFile.h"
+#include "TTree.h"
 
 using Athena::Units::meter;
 using Athena::Units::cm;
 
 
-void test1 (Trk::SolenoidParametrization& sol)
+void test1 (Trk::SolenoidParametrization& sol, const AtlasFieldCacheCondObj &fieldCondObj)
 {
+  MagField::AtlasFieldCache fieldCache;
+  fieldCondObj.getInitializedCache (fieldCache);
   std::cout << "test1\n";
 
   Trk::SolenoidParametrization::Parameters parms (sol, /*r=*/30*cm, /*z=*/123*cm, /*cotTheta=*/1);
@@ -43,7 +50,7 @@ void test1 (Trk::SolenoidParametrization& sol)
   assert( Athena_test::isEqual (sol.centralField(), -0.598746) );
 
   assert( Athena_test::isEqual (sol.fieldComponent (123*cm, parms), -0.592178) );
-  assert( Athena_test::isEqual (sol.fieldComponent (30*cm, 123*cm, 1),
+  assert( Athena_test::isEqual (sol.fieldComponent (30*cm, 123*cm, 1, fieldCache),
                                 -0.551903) );
 
   double firstIntegral = 0;
@@ -54,18 +61,42 @@ void test1 (Trk::SolenoidParametrization& sol)
   assert( Athena_test::isEqual (secondIntegral, -296.768) );
 }
 
+std::unique_ptr<MagField::AtlasFieldMap> getFieldMap(const std::string mapFile, double sol_current, double tor_current) {
+       // find the path to the map file
+    std::string resolvedMapFile = PathResolver::find_file( mapFile.c_str(), "DATAPATH" );
+    assert ( !resolvedMapFile.empty() );
+    // Do checks and extract root file to initialize the map
+    assert ( resolvedMapFile.find(".root") != std::string::npos );
+
+    std::unique_ptr<TFile> rootfile( std::make_unique<TFile>(resolvedMapFile.c_str(), "OLD") );
+    assert ( rootfile );
+    assert ( rootfile->cd() );
+    // open the tree
+    TTree* tree = (TTree*)rootfile->Get("BFieldMap");
+    assert(tree);
+
+    // create map
+    std::unique_ptr<MagField::AtlasFieldMap> field_map=std::make_unique<MagField::AtlasFieldMap>();
+
+    // initialize map
+    assert (field_map->initializeMap( rootfile.get(), sol_current, tor_current ));
+    return field_map;
+
+}
+
 
 int main()
 {
   std::cout << "SolenoidParametrization_test\n";
-  ISvcLocator* svcloc = nullptr;
-  Athena_test::initGaudi ("SolenoidalIntersector_test.txt", svcloc);
-  ServiceHandle<MagField::IMagFieldSvc> field ("MagField::AtlasFieldSvc/AtlasFieldSvc", "test");
-  Incident inc_br ("test", IncidentType::BeginRun);
-  dynamic_cast<IIncidentListener*>(&*field)->handle (inc_br);
-
-  Trk::SolenoidParametrization sol (&*field);
-  test1 (sol);
+
+  std::unique_ptr<MagField::AtlasFieldMap> fieldMap=getFieldMap("MagneticFieldMaps/bfieldmap_7730_20400_14m.root",7730,20400);
+  auto fieldCondObj = std::make_unique<AtlasFieldCacheCondObj>();
+
+    // initialize cond obj with current scale factors and the field svc (needed to setup cache)
+  assert( fieldCondObj->initialize(1. /*solenoid current scale factor*/, 1. /*toroid current scale factor*/, fieldMap.get()));
+
+  Trk::SolenoidParametrization sol (*fieldCondObj);
+  test1 (sol, *fieldCondObj);
   
   return 0;
 }
diff --git a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx
index 75b8181d811a1f0eb5125006bacc9cc2c17bfce6..07b7005d0ea72b591a8a2db4672f19705f1f7bb4 100644
--- a/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx
+++ b/Tracking/TrkExtrapolation/TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.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 TrkExSolenoidalIntersector/test/SolenoidalIntersector_test.cxx
@@ -10,7 +10,6 @@
 
 #undef NDEBUG
 #include "TrkExInterfaces/IIntersector.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TestTools/initGaudi.h"
 #include "TestTools/FLOATassert.h"
 #include "AthenaKernel/Units.h"
@@ -23,6 +22,20 @@
 #include <cassert>
 #include <cmath>
 
+// for the field map
+#include "PathResolver/PathResolver.h"
+#include "TFile.h"
+#include "TTree.h"
+
+// for populating conditions store
+#include "SGTools/TestStore.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "StoreGate/WriteCondHandle.h"
+
+// for the conditions data
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+#include "MagFieldElements/AtlasFieldCache.h"
+#include "TrkExSolenoidalIntersector/SolenoidParametrization.h"
 
 using Athena::Units::meter;
 using Athena::Units::GeV;
@@ -282,18 +295,80 @@ void test_perigee (Trk::IIntersector& tool)
 }
 
 
+std::unique_ptr<MagField::AtlasFieldMap> getFieldMap(const std::string mapFile, double sol_current, double tor_current) {
+       // find the path to the map file
+    std::string resolvedMapFile = PathResolver::find_file( mapFile.c_str(), "DATAPATH" );
+    assert ( !resolvedMapFile.empty() );
+    // Do checks and extract root file to initialize the map
+    assert ( resolvedMapFile.find(".root") != std::string::npos );
+
+    std::unique_ptr<TFile> rootfile( std::make_unique<TFile>(resolvedMapFile.c_str(), "OLD") );
+    assert ( rootfile );
+    assert ( rootfile->cd() );
+    // open the tree
+    TTree* tree = (TTree*)rootfile->Get("BFieldMap");
+    assert(tree);
+
+    // create map
+    std::unique_ptr<MagField::AtlasFieldMap> field_map=std::make_unique<MagField::AtlasFieldMap>();
+
+    // initialize map
+    assert (field_map->initializeMap( rootfile.get(), sol_current, tor_current ));
+    return field_map;
+
+}
+
+void createSolenoidParametrizationCondData(SGTest::TestStore &store) {
+   SG::WriteCondHandleKey<AtlasFieldCacheCondObj> fieldKey {"fieldCondObj"};
+   SG::WriteCondHandleKey<Trk::SolenoidParametrization> parmKey {"SolenoidParametrization"};
+   assert( fieldKey.initialize().isSuccess());
+   assert( parmKey.initialize().isSuccess());
+
+   // from StoreGate/test/WriteCondHandle_test.cxx
+   EventIDBase now(0, EventIDBase::UNDEFEVT, 1);
+   EventContext ctx(1, 1);
+   ctx.setEventID( now );
+   ctx.setExtension( Atlas::ExtendedEventContext(&store) );
+   Gaudi::Hive::setCurrentContext(ctx);
+
+   EventIDBase s1_1(0, EventIDBase::UNDEFEVT, 0);
+   EventIDBase e1_1(0, EventIDBase::UNDEFEVT, 3);
+   EventIDRange r1_1 (s1_1,e1_1);
+
+
+   SG::WriteCondHandle<AtlasFieldCacheCondObj> fieldHandle {fieldKey};
+   std::unique_ptr<Trk::SolenoidParametrization> parm_ptr;
+   {
+      std::unique_ptr<MagField::AtlasFieldMap> fieldMap=getFieldMap("MagneticFieldMaps/bfieldmap_7730_20400_14m.root",7730,20400);
+      auto fieldCondObj = std::make_unique<AtlasFieldCacheCondObj>();
+      assert( fieldCondObj->initialize(1. /*solenoid current scale factor*/, 1. /*toroid current scale factor*/, fieldMap.release()));
+
+      parm_ptr = std::make_unique<Trk::SolenoidParametrization>(*fieldCondObj);
+      assert( fieldHandle.record(r1_1, std::move(fieldCondObj)).isSuccess());
+   }
+   assert( parm_ptr.get());
+
+   SG::WriteCondHandle<Trk::SolenoidParametrization> parmHandle {parmKey};
+   assert( parmHandle.record(r1_1,std::move(parm_ptr) ).isSuccess());
+}
+
 int main()
 {
   std::cout << "SolenoidalIntersector_test\n";
   CxxUtils::ubsan_suppress ([]() { TInterpreter::Instance(); });
   ISvcLocator* svcloc = nullptr;
   Athena_test::initGaudi ("SolenoidalIntersector_test.txt", svcloc);
+
+  StoreGateSvc *cs=nullptr;
+  assert (svcloc->service("StoreGateSvc/ConditionStore",cs).isSuccess());
+
+  SGTest::TestStore dumstore;
+  createSolenoidParametrizationCondData(dumstore);
+  // initialize cond obj with current scale factors and the field svc (needed to setup cache)
+
   ToolHandle<Trk::IIntersector> tool ("Trk::SolenoidalIntersector");
   assert( tool.retrieve().isSuccess() );
-  ServiceHandle<MagField::IMagFieldSvc> field ("MagField::AtlasFieldSvc/AtlasFieldSvc", "test");
-  Incident inc_br ("test", IncidentType::BeginRun);
-  dynamic_cast<IIncidentListener*>(&*field)->handle (inc_br);
-  
+
   test_plane (*tool);
   test_line (*tool);
   test_cylinder (*tool);
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/CMakeLists.txt b/Tracking/TrkFitter/TrkDistributedKalmanFilter/CMakeLists.txt
index f3a55e716de330afddee800e7bf5e666f2c1eae7..dad08f932a1241a07c40a00dc407b8a57e6ed9d4 100644
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/CMakeLists.txt
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/CMakeLists.txt
@@ -9,7 +9,8 @@ atlas_subdir( TrkDistributedKalmanFilter )
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagneticField/MagFieldConditions
+                          MagneticField/MagFieldElements
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkFitter/TrkFitterInterfaces
                           Tracking/TrkFitter/TrkFitterUtils
@@ -31,12 +32,12 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( TrkDistributedKalmanFilterLib
                    src/*.cxx
                    PUBLIC_HEADERS TrkDistributedKalmanFilter
-                   LINK_LIBRARIES AthenaBaseComps GaudiKernel MagFieldInterfaces TrkEventPrimitives TrkFitterInterfaces TrkFitterUtils StoreGateLib SGtests
+                   LINK_LIBRARIES AthenaBaseComps GaudiKernel MagFieldElements MagFieldConditions TrkEventPrimitives TrkFitterInterfaces TrkFitterUtils StoreGateLib SGtests
                    PRIVATE_LINK_LIBRARIES AtlasDetDescr TrkDetElementBase TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkExInterfaces TrkToolInterfaces )
 
 atlas_add_component( TrkDistributedKalmanFilter
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel MagFieldInterfaces TrkEventPrimitives TrkFitterInterfaces TrkFitterUtils StoreGateLib SGtests AtlasDetDescr TrkDetElementBase TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkExInterfaces TrkToolInterfaces TrkDistributedKalmanFilterLib )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel MagFieldElements MagFieldConditions TrkEventPrimitives TrkFitterInterfaces TrkFitterUtils StoreGateLib SGtests AtlasDetDescr TrkDetElementBase TrkSurfaces TrkEventUtils TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrack TrkExInterfaces TrkToolInterfaces TrkDistributedKalmanFilterLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h b/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h
index 8cf2ec70ef7762289f4b0fff49435d4542cbb3f8..06a21e3500a60cce2a2f513366910592ae2703c9 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.h
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/TrkDistributedKalmanFilter/DistributedKalmanFilter.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
 */
 
 //////////////////////////////////////////////////////////////////
@@ -21,17 +21,15 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "TrkEventPrimitives/ParticleHypothesis.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h" 
+
+#include "StoreGate/ReadCondHandleKey.h"
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 
 #include <vector>
 
 class IAlgTool;
 class AtlasDetectorID;
 
-namespace MagField {	
-  class IMagFieldSvc;
-}
-
 namespace Trk {
 	
     class Track;                   //!> ATLAS standard track class
@@ -102,10 +100,12 @@ private:
 	// Private functions:
 	///////////////////////////////////////////////////////////////////
 
-	Trk::TrkTrackState* extrapolate(TrkTrackState*, 
+	Trk::TrkTrackState* extrapolate(TrkTrackState*,
                                         TrkPlanarSurface*,
-                                        TrkPlanarSurface*) const;
-	bool runForwardKalmanFilter(TrkTrackState*) const;
+                                        TrkPlanarSurface*,
+                                        MagField::AtlasFieldCache &fieldCache) const;
+        bool runForwardKalmanFilter(TrkTrackState*,
+                                    MagField::AtlasFieldCache &fieldCache) const;
 	void runSmoother() const;
 	int  findOutliers(double) const;
 	void calculateLRsolution() const;
@@ -115,15 +115,22 @@ private:
 	void deleteTrackStates() const;
 	void report();
 	void report(char fileName[]);
-	void getMagneticField(double[3],double*) const;
+	void getMagneticField(double[3],
+                              double*,
+                              MagField::AtlasFieldCache &fieldCache) const;
 	void matrixInversion5x5(double a[5][5]) const;
 	Perigee* createMeasuredPerigee(TrkTrackState*) const;
 
-	void numericalJacobian(TrkTrackState*, TrkPlanarSurface*,TrkPlanarSurface*,
-                               double A[5][5]) const;
-	double integrate(double Rk[5], 
+	void numericalJacobian(TrkTrackState*,
+                               TrkPlanarSurface*,
+                               TrkPlanarSurface*,
+                               double A[5][5],
+                               MagField::AtlasFieldCache &fieldCache) const;
+	double integrate(double Rk[5],
                          TrkPlanarSurface* pSB,
-                         TrkPlanarSurface* pSE, double* Rf) const;
+                         TrkPlanarSurface* pSE,
+                         double* Rf,
+                         MagField::AtlasFieldCache &fieldCache) const;
 
 	///////////////////////////////////////////////////////////////////
 	// Private data:
@@ -136,7 +143,9 @@ private:
 	ToolHandle<IExtrapolator>                m_extrapolator;
 	const AtlasDetectorID*      m_idHelper;
 
-	ServiceHandle<MagField::IMagFieldSvc> m_MagFieldSvc;  
+        SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey
+           {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
+
 	std::vector<TrkBaseNode*>* m_pvpNodes;
 	std::vector<TrkPlanarSurface*>* m_pvpSurfaces;
 	std::vector<TrkTrackState*>* m_pvpTrackStates;
@@ -144,7 +153,18 @@ private:
 	// ME temporary fix
 	std::vector<double> m_option_sortingRefPoint;
 
-    };	
+    };
+
+   inline
+   void Trk::DistributedKalmanFilter::getMagneticField(double gP[3],
+                                                       double* pB,
+                                                       MagField::AtlasFieldCache &fieldCache) const
+   {
+      pB[0]=0.0;pB[1]=0.0;pB[2]=0.0;
+      double field[3];
+      fieldCache.getField(gP,field);//field is returned in kT
+      for(int i=0;i<3;i++) pB[i]=field[i]/Gaudi::Units::kilogauss;//convert to kG
+   }
 
 } // end of namespace
 
diff --git a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx
index 507481961aedf46c7b3a53e38a885b0884ab6b3d..bf224ed5e4740d9da2299c56bd1ff420e8417ed8 100755
--- a/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.cxx
+++ b/Tracking/TrkFitter/TrkDistributedKalmanFilter/src/DistributedKalmanFilter.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
 */
 
 //////////////////////////////////////////////////////////////////
@@ -63,8 +63,7 @@ Trk::DistributedKalmanFilter::DistributedKalmanFilter(const std::string& t,const
   AthAlgTool(t,n,p),
   m_ROTcreator("Trk::RIO_OnTrackCreator/RIO_OnTrackCreator"),
   m_extrapolator("Trk::Extrapolator/Extrapolator"),
-  m_idHelper(nullptr),
-  m_MagFieldSvc("AtlasFieldSvc",this->name())
+  m_idHelper(nullptr)
 {
   // AlgTool stuff
   declareInterface<ITrackFitter>( this );
@@ -72,7 +71,6 @@ Trk::DistributedKalmanFilter::DistributedKalmanFilter(const std::string& t,const
   m_pvpSurfaces=new std::vector<TrkPlanarSurface*>;
   m_pvpTrackStates=new std::vector<TrkTrackState*>;
 
-  declareProperty( "AthenaFieldService", m_MagFieldSvc, "AlasFieldService");
   declareProperty( "ExtrapolatorTool", m_extrapolator, "Extrapolator" );
   declareProperty( "ROTcreator", m_ROTcreator, "ROTcreatorTool" );
   // ME temporary fix
@@ -94,8 +92,7 @@ StatusCode Trk::DistributedKalmanFilter::initialize()
 
   ATH_CHECK(detStore()->retrieve(m_idHelper, "AtlasID"));
 
-  ATH_CHECK( m_MagFieldSvc.retrieve());
-  
+  ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
   ATH_CHECK(m_ROTcreator.retrieve());
   
   ATH_CHECK(m_extrapolator.retrieve());
@@ -170,9 +167,11 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::Track&       inputTrack
   return fit(prepRDColl,*minPar,runOutlier,matEffects);
 }
 
-double Trk::DistributedKalmanFilter::integrate(double Rk[5], 
+// @TODO remove ? unused :
+double Trk::DistributedKalmanFilter::integrate(double Rk[5],
                                                TrkPlanarSurface* pSB,
-                                               TrkPlanarSurface* pSE, double* Rf) const
+                                               TrkPlanarSurface* pSE, double* Rf,
+                                               MagField::AtlasFieldCache &fieldCache) const
 {
   const double C=0.02999975;
   const int nStepMax=5;
@@ -200,7 +199,7 @@ double Trk::DistributedKalmanFilter::integrate(double Rk[5],
     }
   for(i=0;i<4;i++) D[i]=pSE->getPar(i);
 
-  getMagneticField(gP,gB);
+  getMagneticField(gP,gB,fieldCache);
  
   c=D[0]*gP[0]+D[1]*gP[1]+D[2]*gP[2]+D[3];
   b=D[0]*gV[0]+D[1]*gV[1]+D[2]*gV[2];
@@ -240,7 +239,7 @@ double Trk::DistributedKalmanFilter::integrate(double Rk[5],
 	{
 	  gV[i]=V[i];gP[i]=P[i];
 	}
-      getMagneticField(gP,gB);
+      getMagneticField(gP,gB, fieldCache);
       nStep--;
     }
   pSE->transformPointToLocal(P,lP);
@@ -253,12 +252,14 @@ double Trk::DistributedKalmanFilter::integrate(double Rk[5],
   return path;
 }
 
-
+// @TODO remove ? unused:
 void Trk::DistributedKalmanFilter::numericalJacobian(TrkTrackState* pTS, 
                                                      TrkPlanarSurface*,// pSB,
                                                      TrkPlanarSurface*,// pSE,
-                                                     double A[5][5]) const
+                                                     double A[5][5],
+                                                     MagField::AtlasFieldCache &fieldCache) const
 {
+  (void) fieldCache;
   const double eps=0.005;
   
   double R0[5],delta,Ri[5],Rf[5],J[5][5],Rs[5];
@@ -266,7 +267,7 @@ void Trk::DistributedKalmanFilter::numericalJacobian(TrkTrackState* pTS,
   //not sure what Rs/Rf should be intialised to - at the moment it is not set at all so setting to zero to solve coverity bugs 14380/14381...
   for(i=0;i<5;i++) {R0[i]=pTS->getTrackState(i);Rs[i]=0;Rf[i]=0;}
   
-  //s0=integrate(R0,pSB,pSE,Rs);
+  //s0=integrate(R0,pSB,pSE,Rs, fieldCache);
   
   for(i=0;i<5;i++)
   {
@@ -274,7 +275,7 @@ void Trk::DistributedKalmanFilter::numericalJacobian(TrkTrackState* pTS,
     for(j=0;j<5;j++) Ri[j]=R0[j];
     Ri[i]+=delta;
       
-    //s1=integrate(Ri,pSB,pSE,Rf);
+    //s1=integrate(Ri,pSB,pSE,Rf, fieldCache);
       
     // dsdp[i]=(s1-s0)/delta;
     for(j=0;j<5;j++)
@@ -298,7 +299,8 @@ void Trk::DistributedKalmanFilter::numericalJacobian(TrkTrackState* pTS,
 
 Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState* pTS, 
                                                               Trk::TrkPlanarSurface* pSB,
-                                                              Trk::TrkPlanarSurface* pSE) const
+                                                              Trk::TrkPlanarSurface* pSE,
+                                                              MagField::AtlasFieldCache &fieldCache) const
 {
   const double C=0.02999975;
   const double minStep=30.0;
@@ -325,7 +327,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
     int nStep,nStepMax;
     double sl,ds,path=0.0;
 
-    //numericalJacobian(pTS,pSB,pSE,J);
+    //numericalJacobian(pTS,pSB,pSE,J, fieldCache);
     double sint,cost,sinf,cosf;
     sint=sin(pTS->getTrackState(3));cosf=cos(pTS->getTrackState(2));
     sinf=sin(pTS->getTrackState(2));cost=cos(pTS->getTrackState(3));
@@ -364,7 +366,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
     for(i=0;i<4;i++) D[i]=pSE->getPar(i);
     for(i=0;i<3;i++) gPi[i]=gP[i];
   
-    getMagneticField(gP,gB);
+    getMagneticField(gP,gB, fieldCache);
 
     for(i=0;i<3;i++) gBi[i]=gB[i];
     
@@ -419,7 +421,7 @@ Trk::TrkTrackState* Trk::DistributedKalmanFilter::extrapolate(Trk::TrkTrackState
     V[1]=gV[1]+Av*DVy;
     V[2]=gV[2]+Av*DVz;
     
-    getMagneticField(P,gB);
+    getMagneticField(P,gB,fieldCache);
   
     for(i=0;i<3;i++) gBf[i]=gB[i];
     for(i=0;i<3;i++)
@@ -758,7 +760,7 @@ void Trk::DistributedKalmanFilter::matrixInversion5x5(double a[5][5]) const
   for(i=0;i<5;i++) for(j=0;j<5;j++) a[i][j]=b[i][j];
 }
 
-bool Trk::DistributedKalmanFilter::runForwardKalmanFilter(TrkTrackState* pInitState) const
+bool Trk::DistributedKalmanFilter::runForwardKalmanFilter(TrkTrackState* pInitState, MagField::AtlasFieldCache &fieldCache) const
 {
   std::vector<TrkBaseNode*>::iterator pnIt(m_pvpNodes->begin()),pnEnd(m_pvpNodes->end());
   bool OK=true;
@@ -769,7 +771,7 @@ bool Trk::DistributedKalmanFilter::runForwardKalmanFilter(TrkTrackState* pInitSt
   for(;pnIt!=pnEnd;++pnIt)
   {
     pSE=(*pnIt)->getSurface();
-    Trk::TrkTrackState* pNS=extrapolate(pTS,pSB,pSE);
+    Trk::TrkTrackState* pNS=extrapolate(pTS,pSB,pSE, fieldCache);
       pSB=pSE;
       if(pNS!=NULL)
 	{
@@ -923,15 +925,6 @@ Trk::Perigee* Trk::DistributedKalmanFilter::createMeasuredPerigee(TrkTrackState*
   return pMP;
 }
 
-void Trk::DistributedKalmanFilter::getMagneticField(double gP[3], double* pB) const 
-{ 
-
-  pB[0]=0.0;pB[1]=0.0;pB[2]=0.0;
-  double field[3];
-  m_MagFieldSvc->getField(gP,field);//field is returned in kT
-  for(int i=0;i<3;i++) pB[i]=field[i]/Gaudi::Units::kilogauss;//convert to kG
-}
-
 // fit a set of PrepRawData objects
 Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepRDColl,
 					      const Trk::TrackParameters&  estimatedParametersNearOrigine,
@@ -1151,13 +1144,24 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepR
     }
   msg(MSG::VERBOSE) << " Number of nodes/surfaces created: "<< m_pvpNodes->size()<<"/"<<m_pvpSurfaces->size()<<endmsg;
 
+  SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey};
+  if (!readHandle.isValid()) {
+     std::stringstream msg;
+     msg << "Failed to retrieve magmnetic field conditions data " << m_fieldCacheCondObjInputKey.key() << ".";
+     throw std::runtime_error(msg.str());
+  }
+  const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
+
+  MagField::AtlasFieldCache fieldCache;
+  fieldCondObj->getInitializedCache (fieldCache);
+
   // 3. Sort vector of filtering nodes according to their distances from the perigee point
 
   //  m_sortFilteringNodes(pInitState);
 
   // 4. Main algorithm: filter and smoother (Rauch-Tung-Striebel)
-
-  if(runForwardKalmanFilter(pInitState))
+ 
+  if(runForwardKalmanFilter(pInitState, fieldCache))
   {
     runSmoother();
     if(runOutlier)
@@ -1173,7 +1177,7 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepR
       if((nOutl!=0)&&(!badTrack))
 	{
 	  deleteTrackStates();
-	  runForwardKalmanFilter(pInitState);
+	  runForwardKalmanFilter(pInitState,fieldCache);
 	  runSmoother();
 	  nOutl=findOutliers(outlCut);
 	  msg(MSG::VERBOSE) << nOutl <<" new outliers found "<<endmsg;
@@ -1183,7 +1187,7 @@ Trk::Track* Trk::DistributedKalmanFilter::fit(const Trk::PrepRawDataSet&   prepR
       {
 	calculateLRsolution();
 	deleteTrackStates();
-	runForwardKalmanFilter(pInitState);
+	runForwardKalmanFilter(pInitState,fieldCache);
 	runSmoother();
       }
   
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h
index 260653f83c01ae18401d83eedb43211d296bfacc..83a41352d7d85d33a9164d33ab4caa92d7d02be8 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.h
@@ -20,7 +20,7 @@ template<typename T, size_t Alignment>
  * https://en.cppreference.com/w/cpp/memory/c/aligned_alloc
  *
  * Provides
- * - Additional RAII functionality 
+ * - Additional RAII functionality
  * - Default initialization of elements
  * - Initialization with copies of elements with value value.
  */
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc
index 51e68450d5c450f326d0a57af1b149f73c39b913..d42c8583b3ae9ebf9564f5ef327686a854a90c4e 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/AlignedDynArray.icc
@@ -19,7 +19,7 @@ inline AlignedDynArray<T, Alignment>::AlignedDynArray(size_t n)
 {
   const size_t bufferSize = n * sizeof(T);
   m_buffer = static_cast<T*>(std::aligned_alloc(Alignment, bufferSize));
-  std::uninitialized_default_construct(m_buffer,m_buffer+m_size);
+  std::uninitialized_default_construct(m_buffer, m_buffer + m_size);
 }
 
 template<typename T, size_t Alignment>
@@ -29,7 +29,7 @@ inline AlignedDynArray<T, Alignment>::AlignedDynArray(size_t n, const T& value)
 {
   const size_t bufferSize = n * sizeof(T);
   m_buffer = static_cast<T*>(std::aligned_alloc(Alignment, bufferSize));
-  std::uninitialized_fill(m_buffer,m_buffer+m_size,value);
+  std::uninitialized_fill(m_buffer, m_buffer + m_size, value);
 }
 
 template<typename T, size_t Alignment>
@@ -88,7 +88,8 @@ inline T& AlignedDynArray<T, Alignment>::operator[](const std::size_t pos)
 }
 
 template<typename T, size_t Alignment>
-inline const T& AlignedDynArray<T, Alignment>::operator[](const std::size_t pos) const
+inline const T& AlignedDynArray<T, Alignment>::operator[](
+  const std::size_t pos) const
 {
   return m_buffer[pos];
 }
@@ -113,4 +114,3 @@ AlignedDynArray<T, Alignment>::cleanup()
 }
 
 } // namespace GSFUtils
-
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/ForwardGsfFitter.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/ForwardGsfFitter.h
index f198aa219a59a9166c80da1d964ba53d28ba8a4e..91b98ac3fc2f1876b5ac7c1a79e9704cfe6079f8 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/ForwardGsfFitter.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/ForwardGsfFitter.h
@@ -9,7 +9,8 @@ begin                : Wednesday 9th March 2005
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
 decription           : Class definition for the forward GSF fitter
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #ifndef TrkForwardGsfFitter_H
 #define TrkForwardGsfFitter_H
@@ -52,33 +53,37 @@ public:
       - Configure the extrapolator
       - Configure the measurement updator
       - Configure the RIO_OnTrack creator */
-  virtual StatusCode configureTools(const ToolHandle<Trk::IMultiStateExtrapolator>&,
-                                    const ToolHandle<Trk::IMultiStateMeasurementUpdator>&,
-                                    const ToolHandle<Trk::IRIO_OnTrackCreator>&) override final;
+  virtual StatusCode configureTools(
+    const ToolHandle<Trk::IMultiStateExtrapolator>&,
+    const ToolHandle<Trk::IMultiStateMeasurementUpdator>&,
+    const ToolHandle<Trk::IRIO_OnTrackCreator>&) override final;
 
   /** Forward GSF fit using PrepRawData */
   virtual std::unique_ptr<ForwardTrajectory> fitPRD(
     const PrepRawDataSet&,
     const TrackParameters&,
-    const ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+    const ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
   /** Forward GSF fit using MeasurementSet */
   virtual std::unique_ptr<ForwardTrajectory> fitMeasurements(
     const MeasurementSet&,
     const TrackParameters&,
-    const ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+    const ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
   /** The interface will later be extended so that the initial
    * state can be additionally a MultiComponentState object! */
 
 private:
   /** Progress one step along the fit */
-  bool stepForwardFit(ForwardTrajectory*,
-                      const PrepRawData*,
-                      const MeasurementBase*,
-                      const Surface&,
-                      MultiComponentState&,
-                      const ParticleHypothesis particleHypothesis = nonInteracting) const;
+  bool stepForwardFit(
+    ForwardTrajectory*,
+    const PrepRawData*,
+    const MeasurementBase*,
+    const Surface&,
+    MultiComponentState&,
+    const ParticleHypothesis particleHypothesis = nonInteracting) const;
 
 private:
   /**These are passed via the configure tools so not retrieved from this tool*/
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h
index b9786dd38b912abc355cd80dab98b7c7002da0ef..f200f6049d0fbe6c72b4619d4ca3149d5f6484bf 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GaussianSumFitter.h
@@ -10,7 +10,8 @@ author               : amorley, atkinson
 email                : Anthony.Morley@cern.ch, Tom.Atkinson@cern.ch
 decription           : Class for fitting according to the Gaussian Sum Filter
                        formalisation.
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #include "TrkEventPrimitives/PropDirection.h"
 #include "TrkEventUtils/TrkParametersComparisonFunction.h"
@@ -62,68 +63,88 @@ public:
 
   virtual Track* fit(const Track&,
                      const RunOutlierRemoval outlierRemoval = false,
-                     const ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+                     const ParticleHypothesis particleHypothesis =
+                       nonInteracting) const override final;
 
   /** Fit a collection of 'PrepRawData' objects using the Gaussian Sum Filter
-      - This requires that an trackParameters object be supplied also as an initial guess */
+      - This requires that an trackParameters object be supplied also as an
+     initial guess */
   virtual Track* fit(const PrepRawDataSet&,
                      const TrackParameters&,
                      const RunOutlierRemoval outlierRemoval = false,
-                     const ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+                     const ParticleHypothesis particleHypothesis =
+                       nonInteracting) const override final;
 
   /** Fit a collection of 'RIO_OnTrack' objects using the Gaussian Sum Filter
-      - This requires that an trackParameters object be supplied also as an initial guess */
+      - This requires that an trackParameters object be supplied also as an
+     initial guess */
   virtual Track* fit(const MeasurementSet&,
                      const TrackParameters&,
                      const RunOutlierRemoval outlierRemoval = false,
-                     const ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+                     const ParticleHypothesis particleHypothesis =
+                       nonInteracting) const override final;
 
   /** Refit a track adding a PrepRawDataSet - Not done! */
-  virtual Track* fit(const Track&,
-                     const PrepRawDataSet&,
-                     const RunOutlierRemoval runOutlier = false,
-                     const ParticleHypothesis matEffects = nonInteracting) const override final;
+  virtual Track* fit(
+    const Track&,
+    const PrepRawDataSet&,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = nonInteracting) const override final;
 
   /** Refit a track adding a RIO_OnTrack set
-      - This has no form of outlier rejection and will use all hits on orginal track...
-        i.e. very basic impleneation at the moment*/
-  virtual Track* fit(const Track&,
-                     const MeasurementSet&,
-                     const RunOutlierRemoval runOutlier = false,
-                     const ParticleHypothesis matEffects = nonInteracting) const override final;
+      - This has no form of outlier rejection and will use all hits on orginal
+     track... i.e. very basic impleneation at the moment*/
+  virtual Track* fit(
+    const Track&,
+    const MeasurementSet&,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = nonInteracting) const override final;
 
   /** Combine two tracks by refitting - Not done! */
-  virtual Track* fit(const Track&,
-                     const Track&,
-                     const RunOutlierRemoval runOutlier = false,
-                     const ParticleHypothesis matEffects = nonInteracting) const override final;
+  virtual Track* fit(
+    const Track&,
+    const Track&,
+    const RunOutlierRemoval runOutlier = false,
+    const ParticleHypothesis matEffects = nonInteracting) const override final;
 
 private:
   /** Produces a perigee from a smoothed trajectory */
-  const MultiComponentStateOnSurface* makePerigee(const SmoothedTrajectory*,
-                                                  const ParticleHypothesis particleHypothesis = nonInteracting) const;
+  const MultiComponentStateOnSurface* makePerigee(
+    const SmoothedTrajectory*,
+    const ParticleHypothesis particleHypothesis = nonInteracting) const;
 
   //* Calculate the fit quality */
   const Trk::FitQuality* buildFitQuality(const Trk::SmoothedTrajectory&) const;
 
 private:
-  ToolHandle<IMultiStateExtrapolator> m_extrapolator{ this,
-                                                      "ToolForExtrapolation",
-                                                      "Trk::GsfExtrapolator/GsfExtrapolator",
-                                                      "" };
-  ToolHandle<IMultiStateMeasurementUpdator> m_updator{ this,
-                                                       "MeasurementUpdatorType",
-                                                       "Trk::GsfMeasurementUpdator/GsfMeasurementUpdator",
-                                                       "" };
-  ToolHandle<IRIO_OnTrackCreator> m_rioOnTrackCreator{ this,
-                                                       "ToolForROTCreation",
-                                                       "Trk::RioOnTrackCreator/RIO_OnTrackCreator",
-                                                       "" };
-  ToolHandle<IForwardGsfFitter> m_forwardGsfFitter{ this,
-                                                    "ForwardGsfFitter",
-                                                    "Trk::ForwardGsfFitter/ForwardGsfFitter",
-                                                    "" };
-  ToolHandle<IGsfSmoother> m_gsfSmoother{ this, "GsfSmoother", "Trk::GsfSmoother/GsfSmoother", "" };
+  ToolHandle<IMultiStateExtrapolator> m_extrapolator{
+    this,
+    "ToolForExtrapolation",
+    "Trk::GsfExtrapolator/GsfExtrapolator",
+    ""
+  };
+  ToolHandle<IMultiStateMeasurementUpdator> m_updator{
+    this,
+    "MeasurementUpdatorType",
+    "Trk::GsfMeasurementUpdator/GsfMeasurementUpdator",
+    ""
+  };
+  ToolHandle<IRIO_OnTrackCreator> m_rioOnTrackCreator{
+    this,
+    "ToolForROTCreation",
+    "Trk::RioOnTrackCreator/RIO_OnTrackCreator",
+    ""
+  };
+  ToolHandle<IForwardGsfFitter> m_forwardGsfFitter{
+    this,
+    "ForwardGsfFitter",
+    "Trk::ForwardGsfFitter/ForwardGsfFitter",
+    ""
+  };
+  ToolHandle<IGsfSmoother> m_gsfSmoother{ this,
+                                          "GsfSmoother",
+                                          "Trk::GsfSmoother/GsfSmoother",
+                                          "" };
 
   bool m_reintegrateOutliers;
   bool m_makePerigee;
@@ -136,12 +157,14 @@ private:
   TrackFitInputPreparator* m_inputPreparator;
 
   // GSF Fit Statistics
-  mutable std::atomic<int> m_FitPRD;             // Number of Fit PrepRawData Calls
-  mutable std::atomic<int> m_FitMeasurementBase; // Number of Fit MeasurementBase Calls
-  mutable std::atomic<int> m_ForwardFailure;     // Number of Foward Fit Failures
-  mutable std::atomic<int> m_SmootherFailure;    // Number of Smoother Failures
-  mutable std::atomic<int> m_PerigeeFailure;     // Number of MakePerigee Failures
-  mutable std::atomic<int> m_fitQualityFailure;  // Number of Tracks that fail fit Quailty test
+  mutable std::atomic<int> m_FitPRD; // Number of Fit PrepRawData Calls
+  mutable std::atomic<int>
+    m_FitMeasurementBase; // Number of Fit MeasurementBase Calls
+  mutable std::atomic<int> m_ForwardFailure;  // Number of Foward Fit Failures
+  mutable std::atomic<int> m_SmootherFailure; // Number of Smoother Failures
+  mutable std::atomic<int> m_PerigeeFailure;  // Number of MakePerigee Failures
+  mutable std::atomic<int>
+    m_fitQualityFailure; // Number of Tracks that fail fit Quailty test
 };
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h
index 9511aeca28e3a75e27e44dcbc9e7e71512d00f4b..64c4415b778ca8eac17201419f2690153e647a39 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfBetheHeitlerEffects.h
@@ -29,7 +29,6 @@ class GsfBetheHeitlerEffects
 {
 
 private:
-  
   /** Helper class for construction and evaluation of polynomial */
   class Polynomial
   {
@@ -37,7 +36,8 @@ private:
     // Default constructor
     Polynomial() = default;
 
-    /** Constructor from a vector of coefficients (in decreasing order of powers of x */
+    /** Constructor from a vector of coefficients (in decreasing order of powers
+     * of x */
     Polynomial(const std::vector<double>& coefficients)
       : m_coefficients(coefficients){};
 
@@ -47,16 +47,17 @@ private:
       double sum(0.);
       std::vector<double>::const_iterator coefficient = m_coefficients.begin();
 
-      for (; coefficient != m_coefficients.end(); ++coefficient)
+      for (; coefficient != m_coefficients.end(); ++coefficient) {
         sum = t * sum + (*coefficient);
+      }
 
       return sum;
     }
+
   private:
     std::vector<double> m_coefficients;
   };
 
-
   struct ComponentValues
   {
     // Default ctors/dtor/assignment operators
@@ -77,9 +78,10 @@ private:
     double variance;
   };
 
-
 public:
-  GsfBetheHeitlerEffects(const std::string&, const std::string&, const IInterface*);
+  GsfBetheHeitlerEffects(const std::string&,
+                         const std::string&,
+                         const IInterface*);
 
   virtual ~GsfBetheHeitlerEffects() = default;
 
@@ -94,7 +96,8 @@ public:
                        const MaterialProperties&,
                        double,
                        PropDirection direction = anyDirection,
-                       ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+                       ParticleHypothesis particleHypothesis =
+                         nonInteracting) const override final;
 
 private:
   typedef std::vector<ComponentValues> MixtureParameters;
@@ -121,13 +124,22 @@ private:
   double correctedFirstVariance(const double, const MixtureParameters&) const;
 
   // Logistic function - needed for transformation of weight and mean
-  inline double logisticFunction(const double x) const { return (double)1. / (1. + exp(-x)); }
+  inline double logisticFunction(const double x) const
+  {
+    return (double)1. / (1. + exp(-x));
+  }
 
   // First moment of the Bethe-Heitler distribution
-  inline double betheHeitlerMean(const double r) const { return (double)exp(-r); }
+  inline double betheHeitlerMean(const double r) const
+  {
+    return (double)exp(-r);
+  }
 
   // Second moment of the Bethe-Heitler distribution
-  inline double betheHeitlerVariance(const double r) const { return (double)exp(-r * log(3.) / log(2.)) - exp(-2 * r); }
+  inline double betheHeitlerVariance(const double r) const
+  {
+    return (double)exp(-r * log(3.) / log(2.)) - exp(-2 * r);
+  }
 
 private:
   std::string m_parameterisationFileName;
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfCombinedMaterialEffects.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfCombinedMaterialEffects.h
index 273ae852fa927a57c28e47e9d9c2978690a9ebe9..416ff54b121390a42ce6b1cdf4f220163e0421c9 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfCombinedMaterialEffects.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfCombinedMaterialEffects.h
@@ -8,8 +8,8 @@
 begin                : Friday 11th January 2005
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
-decription           : Class definition for consideration of multiple scatter and
-                       energy loss effects from material simultaneously.
+decription           : Class definition for consideration of multiple scatter
+and energy loss effects from material simultaneously.
 *********************************************************************************/
 
 #ifndef TrkGsfCombinedMaterialEffects_H
@@ -17,9 +17,9 @@ decription           : Class definition for consideration of multiple scatter an
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
-#include "TrkGaussianSumFilter/IMultiStateMaterialEffects.h"
-#include "TrkExInterfaces/IMultipleScatteringUpdator.h"
 #include "TrkExInterfaces/IEnergyLossUpdator.h"
+#include "TrkExInterfaces/IMultipleScatteringUpdator.h"
+#include "TrkGaussianSumFilter/IMultiStateMaterialEffects.h"
 
 namespace Trk {
 class GsfCombinedMaterialEffects
@@ -28,7 +28,9 @@ class GsfCombinedMaterialEffects
 {
 public:
   /** Constructor with AlgTool parameters*/
-  GsfCombinedMaterialEffects(const std::string&, const std::string&, const IInterface*);
+  GsfCombinedMaterialEffects(const std::string&,
+                             const std::string&,
+                             const IInterface*);
 
   /** Virtual destructor */
   virtual ~GsfCombinedMaterialEffects() override;
@@ -39,16 +41,15 @@ public:
   /** AlgTool finalise method */
   StatusCode finalize() override;
 
-  virtual void compute(IMultiStateMaterialEffects::Cache&,
-                       const ComponentParameters&,
-                       const MaterialProperties&,
-                       double,
-                       PropDirection = anyDirection,
-                       ParticleHypothesis = nonInteracting) const override final; 
+  virtual void compute(
+    IMultiStateMaterialEffects::Cache&,
+    const ComponentParameters&,
+    const MaterialProperties&,
+    double,
+    PropDirection = anyDirection,
+    ParticleHypothesis = nonInteracting) const override final;
 
 private:
-  
- 
   void scattering(IMultiStateMaterialEffects::Cache&,
                   const ComponentParameters&,
                   const MaterialProperties&,
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
index 0e6c82d8c93fb6eb29903e00a2ca15f5d2ff12ec..a2bddfdbd0e4efc1cb768de1a8172f7cdae911c2 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.h
@@ -49,7 +49,8 @@ class IMultiComponentStateMerger;
 class IMaterialMixtureConvolution;
 class IMultipleScatteringUpdator;
 /** @struct StateAtBoundarySurface
-  - Structure to contain information about a state at the interface between tracking volumes
+  - Structure to contain information about a state at the interface between
+  tracking volumes
   */
 
 struct StateAtBoundarySurface
@@ -98,57 +99,45 @@ public:
   /** AlgTool finalise method */
   virtual StatusCode finalize() override final;
 
-  /** Extrapolation of a MutiComponentState to a destination surface (1) */
-  virtual MultiComponentState extrapolate(
-    const IPropagator&,
-    const MultiComponentState&,
-    const Surface&,
-    PropDirection direction = anyDirection,
-    const BoundaryCheck& boundaryCheck = true,
-    ParticleHypothesis particleHypothesis = nonInteracting) const override final;
-
-  /** - Extrapolation of a MultiComponentState to destination surface without material effects (2)
-   */
-  virtual MultiComponentState extrapolateDirectly(
-    const IPropagator&,
-    const MultiComponentState&,
-    const Surface&,
-    PropDirection direction = anyDirection,
-    const BoundaryCheck& boundaryCheck = true,
-    ParticleHypothesis particleHypothesis = nonInteracting) const override final;
-
   /** Configured AlgTool extrapolation method (1) */
   virtual MultiComponentState extrapolate(
+    const EventContext& ctx,
     const MultiComponentState&,
     const Surface&,
     PropDirection direction = anyDirection,
     const BoundaryCheck& boundaryCheck = true,
-    ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+    ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
   /** Configured AlgTool extrapolation without material effects method (2) */
   virtual MultiComponentState extrapolateDirectly(
+    const EventContext& ctx,
     const MultiComponentState&,
     const Surface&,
     PropDirection direction = anyDirection,
     const BoundaryCheck& boundaryCheck = true,
-    ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+    ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
-  virtual std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>> extrapolateM(
-    const MultiComponentState&,
-    const Surface& sf,
-    PropDirection dir,
-    const BoundaryCheck& bcheck,
-    ParticleHypothesis particle) const override final;
+  virtual std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>>
+  extrapolateM(const EventContext& ctx,
+               const MultiComponentState&,
+               const Surface& sf,
+               PropDirection dir,
+               const BoundaryCheck& bcheck,
+               ParticleHypothesis particle) const override final;
 
 private:
   struct Cache
   {
-    bool m_recall;                                   //!< Flag the recall solution
-    const Surface* m_recallSurface;                  //!< Surface for recall
-    const Layer* m_recallLayer;                      //!< Layer for recall
-    const TrackingVolume* m_recallTrackingVolume;    //!< Tracking volume for recall
-    StateAtBoundarySurface m_stateAtBoundarySurface; //!< Instance of structure describing the state
-                                                     //!< at a boundary of tracking volumes
+    bool m_recall;                  //!< Flag the recall solution
+    const Surface* m_recallSurface; //!< Surface for recall
+    const Layer* m_recallLayer;     //!< Layer for recall
+    const TrackingVolume*
+      m_recallTrackingVolume; //!< Tracking volume for recall
+    StateAtBoundarySurface
+      m_stateAtBoundarySurface; //!< Instance of structure describing the state
+                                //!< at a boundary of tracking volumes
     std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>> m_matstates;
     std::vector<std::unique_ptr<const MultiComponentState>>
       m_mcsGarbageBin; //!< Garbage bin for MultiComponentState objects
@@ -167,8 +156,10 @@ private:
     {}
   };
 
-  /** These are the methods that do the actual heavy lifting when extrapolating with a cache */
+  /** These are the methods that do the actual heavy lifting when extrapolating
+   * with a cache */
   MultiComponentState extrapolateImpl(
+    const EventContext& ctx,
     Cache& cache,
     const IPropagator&,
     const MultiComponentState&,
@@ -177,8 +168,10 @@ private:
     const BoundaryCheck& boundaryCheck = true,
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
-  MultiComponentState extrapolateImpl(
-    Cache& cache,
+  /** Configured AlgTool extrapolation without material effects method (2) */
+  MultiComponentState extrapolateDirectlyImpl(
+    const EventContext& ctx,
+    const IPropagator&,
     const MultiComponentState&,
     const Surface&,
     PropDirection direction = anyDirection,
@@ -186,21 +179,25 @@ private:
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
   /** Two primary private extrapolation methods
-    - extrapolateToVolumeBoundary - extrapolates to the exit of the destination tracking volume
+    - extrapolateToVolumeBoundary - extrapolates to the exit of the destination
+    tracking volume
     - Exit layer surface will be hit in this method.
-    - extrapolateInsideVolume     - extrapolates to the destination surface in the final tracking
-    volume
+    - extrapolateInsideVolume     - extrapolates to the destination surface in
+    the final tracking volume
     */
 
-  void extrapolateToVolumeBoundary(Cache& cache,
-                                   const IPropagator&,
-                                   const MultiComponentState&,
-                                   const Layer*,
-                                   const TrackingVolume&,
-                                   PropDirection direction = anyDirection,
-                                   ParticleHypothesis particleHypothesis = nonInteracting) const;
+  void extrapolateToVolumeBoundary(
+    const EventContext& ctx,
+    Cache& cache,
+    const IPropagator&,
+    const MultiComponentState&,
+    const Layer*,
+    const TrackingVolume&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const;
 
   MultiComponentState extrapolateInsideVolume(
+    const EventContext& ctx,
     Cache& cache,
     const IPropagator&,
     const MultiComponentState&,
@@ -215,6 +212,7 @@ private:
 
   /** Layer stepping, stopping at the last layer before destination */
   MultiComponentState extrapolateFromLayerToLayer(
+    const EventContext& ctx,
     Cache& cache,
     const IPropagator&,
     const MultiComponentState&,
@@ -225,7 +223,8 @@ private:
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
   /** Single extrapolation step to an intermediate layer */
-   MultiComponentState extrapolateToIntermediateLayer(
+  MultiComponentState extrapolateToIntermediateLayer(
+    const EventContext& ctx,
     Cache& cache,
     const IPropagator&,
     const MultiComponentState&,
@@ -237,6 +236,7 @@ private:
 
   /** Final extrapolation step to a destination layer */
   MultiComponentState extrapolateToDestinationLayer(
+    const EventContext& ctx,
     Cache& cache,
     const IPropagator&,
     const MultiComponentState&,
@@ -247,9 +247,10 @@ private:
     const BoundaryCheck& boundaryCheck = true,
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
-  /** Extrapolation to consider material effects assuming all material on active sensor elements -
-   * CTB method */
+  /** Extrapolation to consider material effects assuming all material on active
+   * sensor elements - CTB method */
   Trk::MultiComponentState extrapolateSurfaceBasedMaterialEffects(
+    const EventContext& ctx,
     const IPropagator&,
     const MultiComponentState&,
     const Surface&,
@@ -259,6 +260,7 @@ private:
 
   /** GSF Method to propagate a number of components simultaneously */
   Trk::MultiComponentState multiStatePropagate(
+    const EventContext& ctx,
     const IPropagator&,
     const MultiComponentState&,
     const Surface&,
@@ -269,9 +271,10 @@ private:
   /** Method to choose propagator type */
   unsigned int propagatorType(const TrackingVolume& trackingVolume) const;
 
-  /** Method to initialise navigation parameters including starting state, layer and volume, and
-   * destination volume */
-  void initialiseNavigation(Cache& cache,
+  /** Method to initialise navigation parameters including starting state, layer
+   * and volume, and destination volume */
+  void initialiseNavigation(const EventContext& ctx,
+                            Cache& cache,
                             const IPropagator& propagator,
                             const MultiComponentState& initialState,
                             const Surface& surface,
@@ -281,6 +284,14 @@ private:
                             const TrackParameters*& referenceParameters,
                             PropDirection direction) const;
 
+  bool radialDirectionCheck(const EventContext& ctx,
+                            const IPropagator& prop,
+                            const MultiComponentState& startParm,
+                            const MultiComponentState& parsOnLayer,
+                            const TrackingVolume& tvol,
+                            PropDirection dir,
+                            ParticleHypothesis particle) const;
+
   /** Method to set the recall information */
   void setRecallInformation(Cache& cache,
                             const Surface&,
@@ -299,27 +310,25 @@ private:
   /** Private method to empty garbage bins */
   void emptyGarbageBins(Cache& cache) const;
   /** Add material to vector*/
-  void addMaterialtoVector(Cache& cache,
-                           const Trk::Layer* nextLayer,
-                           const Trk::TrackParameters* nextPar,
-                           PropDirection direction = anyDirection,
-                           ParticleHypothesis particleHypothesis = nonInteracting) const;
+  void addMaterialtoVector(
+    Cache& cache,
+    const Trk::Layer* nextLayer,
+    const Trk::TrackParameters* nextPar,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const;
 
   std::string layerRZoutput(const Trk::Layer* lay) const;
 
   std::string positionOutput(const Amg::Vector3D& pos) const;
 
-  int radialDirection(const Trk::MultiComponentState& pars, PropDirection dir) const;
-
-  bool radialDirectionCheck(const IPropagator& prop,
-                            const MultiComponentState& startParm,
-                            const MultiComponentState& parsOnLayer,
-                            const TrackingVolume& tvol,
-                            PropDirection dir,
-                            ParticleHypothesis particle) const;
+  int radialDirection(const Trk::MultiComponentState& pars,
+                      PropDirection dir) const;
 
   ToolHandleArray<IPropagator> m_propagators{ this, "Propagators", {}, "" };
-  ToolHandle<INavigator> m_navigator{ this, "Navigator", "Trk::Navigator/Navigator", "" };
+  ToolHandle<INavigator> m_navigator{ this,
+                                      "Navigator",
+                                      "Trk::Navigator/Navigator",
+                                      "" };
   ToolHandle<IMaterialMixtureConvolution> m_materialUpdator{
     this,
     "GsfMaterialConvolution",
@@ -332,85 +341,52 @@ private:
     "Trk::MultipleScatteringUpdator/AtlasMultipleScatteringUpdator",
     ""
   };
-  ToolHandle<IEnergyLossUpdator> m_elossupdators{ this,
-                                                  "EnergyLossUpdator",
-                                                  "Trk::EnergyLossUpdator/AtlasEnergyLossUpdator",
-                                                  "" };
+  ToolHandle<IEnergyLossUpdator> m_elossupdators{
+    this,
+    "EnergyLossUpdator",
+    "Trk::EnergyLossUpdator/AtlasEnergyLossUpdator",
+    ""
+  };
 
-  bool m_propagatorStickyConfiguration; //!< Switch between simple and full configured propagators
-  bool m_surfaceBasedMaterialEffects;   //!< Switch to turn on/off surface based material effects
+  bool m_propagatorStickyConfiguration; //!< Switch between simple and full
+                                        //!< configured propagators
+  bool m_surfaceBasedMaterialEffects;   //!< Switch to turn on/off surface based
+                                        //!< material effects
   bool m_fastField;
-  unsigned int m_propagatorConfigurationLevel; //!< Configuration level of the propagator
-  unsigned int m_propagatorSearchLevel;        //!< Search level of the propagator
+  unsigned int
+    m_propagatorConfigurationLevel; //!< Configuration level of the propagator
+  unsigned int m_propagatorSearchLevel; //!< Search level of the propagator
   Trk::MagneticFieldProperties m_fieldProperties;
 
-  mutable Gaudi::Accumulators::Counter<int, Gaudi::Accumulators::atomicity::full>
-    m_extrapolateCalls; //!< Statistics: Number of calls to the main extrapolate method
-  mutable Gaudi::Accumulators::Counter<int, Gaudi::Accumulators::atomicity::full>
-    m_extrapolateDirectlyCalls; //!< Statistics: Number of calls to the extrapolate directly method
-  mutable Gaudi::Accumulators::Counter<int, Gaudi::Accumulators::atomicity::full>
-    m_extrapolateDirectlyFallbacks; //!< Statistics: Number of calls to the extrapolate directly
-                                    //!< fallback
-  mutable Gaudi::Accumulators::Counter<int, Gaudi::Accumulators::atomicity::full>
-    m_navigationDistanceIncreaseBreaks; //!< Statistics: Number of times navigation stepping fails
-                                        //!< to go the right way
-  mutable Gaudi::Accumulators::Counter<int, Gaudi::Accumulators::atomicity::full>
-    m_oscillationBreaks; //!< Statistics: Number of times a tracking volume oscillation is detected
-  mutable Gaudi::Accumulators::Counter<int, Gaudi::Accumulators::atomicity::full>
-    m_missedVolumeBoundary; //!< Statistics: Number of times the volume boundary is missed
+  mutable Gaudi::Accumulators::Counter<int,
+                                       Gaudi::Accumulators::atomicity::full>
+    m_extrapolateCalls; //!< Statistics: Number of calls to the main extrapolate
+                        //!< method
+  mutable Gaudi::Accumulators::Counter<int,
+                                       Gaudi::Accumulators::atomicity::full>
+    m_extrapolateDirectlyCalls; //!< Statistics: Number of calls to the
+                                //!< extrapolate directly method
+  mutable Gaudi::Accumulators::Counter<int,
+                                       Gaudi::Accumulators::atomicity::full>
+    m_extrapolateDirectlyFallbacks; //!< Statistics: Number of calls to the
+                                    //!< extrapolate directly fallback
+  mutable Gaudi::Accumulators::Counter<int,
+                                       Gaudi::Accumulators::atomicity::full>
+    m_navigationDistanceIncreaseBreaks; //!< Statistics: Number of times
+                                        //!< navigation stepping fails to go the
+                                        //!< right way
+  mutable Gaudi::Accumulators::Counter<int,
+                                       Gaudi::Accumulators::atomicity::full>
+    m_oscillationBreaks; //!< Statistics: Number of times a tracking volume
+                         //!< oscillation is detected
+  mutable Gaudi::Accumulators::Counter<int,
+                                       Gaudi::Accumulators::atomicity::full>
+    m_missedVolumeBoundary; //!< Statistics: Number of times the volume boundary
+                            //!< is missed
 };
 
 } // end namespace Trk
 
-inline void
-Trk::GsfExtrapolator::setRecallInformation(Cache& cache,
-                                           const Trk::Surface& recallSurface,
-                                           const Trk::Layer& recallLayer,
-                                           const Trk::TrackingVolume& recallTrackingVolume) const
-{
-  cache.m_recall = true;
-  cache.m_recallSurface = &recallSurface;
-  cache.m_recallLayer = &recallLayer;
-  cache.m_recallTrackingVolume = &recallTrackingVolume;
-}
-
-inline void
-Trk::GsfExtrapolator::resetRecallInformation(Cache& cache) const
-{
-  cache.m_recall = false;
-  cache.m_recallSurface = nullptr;
-  cache.m_recallLayer = nullptr;
-  cache.m_recallTrackingVolume = nullptr;
-}
-
-inline void
-Trk::GsfExtrapolator::throwIntoGarbageBin(Cache& cache,
-                                          const Trk::MultiComponentState* garbage) const
-{
-  if (garbage) {
-    std::unique_ptr<const Trk::MultiComponentState> sink(garbage);
-    cache.m_mcsGarbageBin.push_back(std::move(sink));
-  }
-}
-
-inline void
-Trk::GsfExtrapolator::throwIntoGarbageBin(Cache& cache, const Trk::TrackParameters* garbage) const
-{
-  if (garbage) {
-    std::unique_ptr<const Trk::TrackParameters> sink(garbage);
-    cache.m_tpGarbageBin.push_back(std::move(sink));
-  }
-}
-
-inline void
-Trk::GsfExtrapolator::emptyGarbageBins(Cache& cache) const
-{
-  // Reset the boundary information
-  StateAtBoundarySurface freshState;
-  cache.m_stateAtBoundarySurface = freshState;
-  cache.m_mcsGarbageBin.clear();
-  cache.m_tpGarbageBin.clear();
-  cache.m_matstates.reset(nullptr);
-}
-
+// for the inline implementations
+#include "GsfExtrapolator.icc"
 #endif
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.icc b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.icc
new file mode 100644
index 0000000000000000000000000000000000000000..55109aa68bbfd7f155a5c08dc7fa94654edc8afd
--- /dev/null
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfExtrapolator.icc
@@ -0,0 +1,58 @@
+/*
+   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+ */
+
+inline void
+Trk::GsfExtrapolator::setRecallInformation(
+  Cache& cache,
+  const Trk::Surface& recallSurface,
+  const Trk::Layer& recallLayer,
+  const Trk::TrackingVolume& recallTrackingVolume) const
+{
+  cache.m_recall = true;
+  cache.m_recallSurface = &recallSurface;
+  cache.m_recallLayer = &recallLayer;
+  cache.m_recallTrackingVolume = &recallTrackingVolume;
+}
+
+inline void
+Trk::GsfExtrapolator::resetRecallInformation(Cache& cache) const
+{
+  cache.m_recall = false;
+  cache.m_recallSurface = nullptr;
+  cache.m_recallLayer = nullptr;
+  cache.m_recallTrackingVolume = nullptr;
+}
+
+inline void
+Trk::GsfExtrapolator::throwIntoGarbageBin(
+  Cache& cache,
+  const Trk::MultiComponentState* garbage) const
+{
+  if (garbage) {
+    std::unique_ptr<const Trk::MultiComponentState> sink(garbage);
+    cache.m_mcsGarbageBin.push_back(std::move(sink));
+  }
+}
+
+inline void
+Trk::GsfExtrapolator::throwIntoGarbageBin(
+  Cache& cache,
+  const Trk::TrackParameters* garbage) const
+{
+  if (garbage) {
+    std::unique_ptr<const Trk::TrackParameters> sink(garbage);
+    cache.m_tpGarbageBin.push_back(std::move(sink));
+  }
+}
+
+inline void
+Trk::GsfExtrapolator::emptyGarbageBins(Cache& cache) const
+{
+  // Reset the boundary information
+  StateAtBoundarySurface freshState;
+  cache.m_stateAtBoundarySurface = freshState;
+  cache.m_mcsGarbageBin.clear();
+  cache.m_tpGarbageBin.clear();
+  cache.m_matstates.reset(nullptr);
+}
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialEffectsUpdator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialEffectsUpdator.h
index 481277df4bd7b7a5478341d63eabdab1fad9b7ae..f13c4bcf2f0b9021d129c8a124ae3b7d0cc82716 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialEffectsUpdator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialEffectsUpdator.h
@@ -30,7 +30,9 @@ class GsfMaterialEffectsUpdator
 
 public:
   /** Constructor with AlgTool parameters */
-  GsfMaterialEffectsUpdator(const std::string&, const std::string&, const IInterface*);
+  GsfMaterialEffectsUpdator(const std::string&,
+                            const std::string&,
+                            const IInterface*);
 
   /** Virtual destructor */
   virtual ~GsfMaterialEffectsUpdator();
@@ -41,15 +43,16 @@ public:
   /** AlgTool finalisation*/
   StatusCode finalize();
 
-  /** Method for updating the state with material effects provided by the layer object */
+  /** Method for updating the state with material effects provided by the layer
+   * object */
   virtual Trk::MultiComponentState updateState(
     const ComponentParameters&,
     const Layer&,
     PropDirection direction = anyDirection,
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
-  /** Method for updating the state with material effects provided by a material properties object
-   * and a pathlength */
+  /** Method for updating the state with material effects provided by a material
+   * properties object and a pathlength */
   virtual Trk::MultiComponentState updateState(
     const ComponentParameters&,
     const MaterialProperties&,
@@ -57,7 +60,8 @@ public:
     PropDirection direction = anyDirection,
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
-  /** Method for the state with material effects provided by the layer object prior to propagation
+  /** Method for the state with material effects provided by the layer object
+   * prior to propagation
    */
   virtual Trk::MultiComponentState preUpdateState(
     const ComponentParameters&,
@@ -65,7 +69,8 @@ public:
     PropDirection direction = anyDirection,
     ParticleHypothesis particleHypothesis = nonInteracting) const;
 
-  /** Method for the state with material effects provided by the layer object after propagation */
+  /** Method for the state with material effects provided by the layer object
+   * after propagation */
   virtual Trk::MultiComponentState postUpdateState(
     const ComponentParameters&,
     const Layer&,
@@ -74,18 +79,23 @@ public:
 
 private:
   /** Method to perform centralised calculation of updated state */
-  Trk::MultiComponentState compute(const ComponentParameters&,
-                                   const MaterialProperties&,
-                                   double,
-                                   PropDirection direction = anyDirection,
-                                   ParticleHypothesis particleHypothesis = nonInteracting) const;
+  Trk::MultiComponentState compute(
+    const ComponentParameters&,
+    const MaterialProperties&,
+    double,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const;
 
   /** Method to calculate the updated momentum based on material effects */
   bool updateP(AmgVector(5) &, double) const;
 
 private:
-  ToolHandle<IMultiStateMaterialEffects>
-    m_materialEffects{ this, "MaterialEffects", "Trk::GsfCombinedMaterialEffects/GsfCombinedMaterialEffects", "" };
+  ToolHandle<IMultiStateMaterialEffects> m_materialEffects{
+    this,
+    "MaterialEffects",
+    "Trk::GsfCombinedMaterialEffects/GsfCombinedMaterialEffects",
+    ""
+  };
   bool m_useReferenceMaterial;
   double m_momentumCut;
 };
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h
index 96576d8dee199f16619e740c8405a71ef242e4f0..bdc93e3f8a761a736121f920bc1f66ae528da5c8 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMaterialMixtureConvolution.h
@@ -32,7 +32,9 @@ class GsfMaterialMixtureConvolution
 
 public:
   //!< Constructor with AlgTool parameters
-  GsfMaterialMixtureConvolution(const std::string&, const std::string&, const IInterface*);
+  GsfMaterialMixtureConvolution(const std::string&,
+                                const std::string&,
+                                const IInterface*);
 
   //!< Destructor
   virtual ~GsfMaterialMixtureConvolution();
@@ -44,43 +46,47 @@ public:
   virtual StatusCode finalize() override;
 
   //!< Convolution with full material properties
-  virtual MultiComponentState update(
-    const MultiComponentState&,
-    const Layer&,
-    PropDirection direction = anyDirection,
-    ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+  virtual MultiComponentState update(const MultiComponentState&,
+                                     const Layer&,
+                                     PropDirection direction = anyDirection,
+                                     ParticleHypothesis particleHypothesis =
+                                       nonInteracting) const override final;
 
   //!< Convolution with pre-measurement-update material properties
   virtual MultiComponentState preUpdate(const MultiComponentState&,
                                         const Layer&,
                                         PropDirection direction = anyDirection,
-                                        ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+                                        ParticleHypothesis particleHypothesis =
+                                          nonInteracting) const override final;
 
   //!< Convolution with post-measurement-update material properties
   virtual MultiComponentState postUpdate(const MultiComponentState&,
                                          const Layer&,
                                          PropDirection direction = anyDirection,
-                                         ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+                                         ParticleHypothesis particleHypothesis =
+                                           nonInteracting) const override final;
 
   //!< Retain for now redundant simplified material effects
   virtual MultiComponentState simplifiedMaterialUpdate(
     const MultiComponentState& multiComponentState,
     PropDirection direction = anyDirection,
-    ParticleHypothesis particleHypothesis = nonInteracting) const override final;
+    ParticleHypothesis particleHypothesis =
+      nonInteracting) const override final;
 
 private:
-
-  Gaudi::Property<unsigned int> m_maximumNumberOfComponents{ this,
-                                                             "MaximumNumberOfComponents",
-                                                             12,
-                                                             "Maximum number of components" };
- 
- 
-  ToolHandle<IMultiStateMaterialEffectsUpdator> m_updator{ this,
-                                                           "MaterialEffectsUpdator",
-                                                           "Trk::GsfMaterialEffectsUpdator/GsfMaterialEffectsUpdator",
-                                                           "" };
-  
+  Gaudi::Property<unsigned int> m_maximumNumberOfComponents{
+    this,
+    "MaximumNumberOfComponents",
+    12,
+    "Maximum number of components"
+  };
+
+  ToolHandle<IMultiStateMaterialEffectsUpdator> m_updator{
+    this,
+    "MaterialEffectsUpdator",
+    "Trk::GsfMaterialEffectsUpdator/GsfMaterialEffectsUpdator",
+    ""
+  };
 };
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMeasurementUpdator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMeasurementUpdator.h
index 15ab30c8ac1a1228faebd65b69e567df3fae11a5..7325b7d56940c55ac48e5dd4471a59b7649f5e02 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMeasurementUpdator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfMeasurementUpdator.h
@@ -8,8 +8,8 @@
 begin                : Friday 25th February 2005
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
-decription           : Class for performing updates on multi-component states for
-                       the gaussian-sum filter. Now an AlgTool
+decription           : Class for performing updates on multi-component states
+for the gaussian-sum filter. Now an AlgTool
 *********************************************************************************/
 
 #ifndef TrkGsfMeasurementUpdator_H
@@ -36,16 +36,19 @@ class GsfMeasurementUpdator
 {
 
 private:
-  /** Private typedef for calling the correct updator member function depending of direction of
-   * fitting */
-  typedef Trk::TrackParameters* (Trk::IUpdator::*Updator)(const Trk::TrackParameters&,
-                                                          const LocalParameters&,
-                                                          const Amg::MatrixX&,
-                                                          FitQualityOnSurface*&)const;
+  /** Private typedef for calling the correct updator member function depending
+   * of direction of fitting */
+  typedef Trk::TrackParameters* (Trk::IUpdator::*Updator)(
+    const Trk::TrackParameters&,
+    const LocalParameters&,
+    const Amg::MatrixX&,
+    FitQualityOnSurface*&)const;
 
 public:
   /** Constructor with parameters to be passed to AlgTool */
-  GsfMeasurementUpdator(const std::string&, const std::string&, const IInterface*);
+  GsfMeasurementUpdator(const std::string&,
+                        const std::string&,
+                        const IInterface*);
 
   /** Virtual destructor */
   virtual ~GsfMeasurementUpdator() = default;
@@ -57,39 +60,49 @@ public:
   StatusCode finalize() override;
 
   /** Method for updating the multi-state with a new measurement */
-  virtual MultiComponentState update(MultiComponentState&&,
-                                     const MeasurementBase&) const override final;
+  virtual MultiComponentState update(
+    MultiComponentState&&,
+    const MeasurementBase&) const override final;
 
-  /** Method for updating the multi-state with a new measurement and calculate the fit qaulity at
-   * the same time*/
+  /** Method for updating the multi-state with a new measurement and calculate
+   * the fit qaulity at the same time*/
   virtual MultiComponentState update(
     Trk::MultiComponentState&&,
     const Trk::MeasurementBase&,
     std::unique_ptr<FitQualityOnSurface>& fitQoS) const override final;
 
-  /** Method for GSF smoother to calculate unbiased parameters of the multi-component state */
-  virtual MultiComponentState getUnbiasedTrackParameters(MultiComponentState&&,
-                                                         const MeasurementBase&) const override final;
+  /** Method for GSF smoother to calculate unbiased parameters of the
+   * multi-component state */
+  virtual MultiComponentState getUnbiasedTrackParameters(
+    MultiComponentState&&,
+    const MeasurementBase&) const override final;
 
-  /** Method for determining the chi2 of the multi-component state and the number of degrees of
-   * freedom */
-  virtual const FitQualityOnSurface* fitQuality(const MultiComponentState&, const MeasurementBase&) const override;
+  /** Method for determining the chi2 of the multi-component state and the
+   * number of degrees of freedom */
+  virtual const FitQualityOnSurface* fitQuality(
+    const MultiComponentState&,
+    const MeasurementBase&) const override;
 
 private:
   MultiComponentState calculateFilterStep(MultiComponentState&&,
                                           const MeasurementBase&,
                                           const Updator) const;
 
-  MultiComponentState calculateFilterStep(MultiComponentState&&,
-                                          const MeasurementBase&,
-                                          std::unique_ptr<FitQualityOnSurface>& fitQoS) const;
+  MultiComponentState calculateFilterStep(
+    MultiComponentState&&,
+    const MeasurementBase&,
+    std::unique_ptr<FitQualityOnSurface>& fitQoS) const;
 
   bool invalidComponent(const Trk::TrackParameters* trackParameters) const;
 
-  MultiComponentState rebuildState(Trk::MultiComponentState&& stateBeforeUpdate) const;
+  MultiComponentState rebuildState(
+    Trk::MultiComponentState&& stateBeforeUpdate) const;
 
 private:
-  ToolHandle<IUpdator> m_updator{ this, "Updator", "Trk::KalmanUpdator/KalmanUpdator", "" };
+  ToolHandle<IUpdator> m_updator{ this,
+                                  "Updator",
+                                  "Trk::KalmanUpdator/KalmanUpdator",
+                                  "" };
 };
 }
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfSmoother.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfSmoother.h
index 39a17bbdb42c5920f6d7a00e98df2297a4163a20..4158cebf49cf019784c62629cd7e9ba02c881405 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfSmoother.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/GsfSmoother.h
@@ -9,18 +9,19 @@ begin                : Wednesday 9th March 2005
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
 decription           : Class definition for the GSF smoother
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #ifndef TrkGsfSmoother_H
 #define TrkGsfSmoother_H
 
 #include "TrkGaussianSumFilter/IGsfSmoother.h"
 
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
 #include "TrkEventPrimitives/ParticleHypothesis.h"
 #include "TrkFitterUtils/FitterTypes.h"
 #include "TrkMultiComponentStateOnSurface/MultiComponentState.h"
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
 
 namespace Trk {
 
@@ -49,30 +50,36 @@ public:
   /** Configure the GSF smoother
       - Configure the extrapolator
       - Configure the measurement updator */
-  virtual StatusCode configureTools(const ToolHandle<IMultiStateExtrapolator>&,
-                                    const ToolHandle<IMultiStateMeasurementUpdator>&);
+  virtual StatusCode configureTools(
+    const ToolHandle<IMultiStateExtrapolator>&,
+    const ToolHandle<IMultiStateMeasurementUpdator>&);
 
   /** Gsf smoother method */
-  virtual SmoothedTrajectory* fit(const ForwardTrajectory&,
-                                  const ParticleHypothesis particleHypothesis = nonInteracting,
-                                  const CaloCluster_OnTrack* ccot = nullptr) const;
+  virtual SmoothedTrajectory* fit(
+    const ForwardTrajectory&,
+    const ParticleHypothesis particleHypothesis = nonInteracting,
+    const CaloCluster_OnTrack* ccot = nullptr) const;
 
 private:
   /** Method for combining the forwards fitted state and the smoothed state */
-  MultiComponentState  combine(const MultiComponentState&, const MultiComponentState&) const;
+  MultiComponentState combine(const MultiComponentState&,
+                              const MultiComponentState&) const;
 
   /** Methof to add the CaloCluster onto the track */
-  MultiComponentState  addCCOT(const Trk::TrackStateOnSurface* currentState,
-                               const Trk::CaloCluster_OnTrack* ccot,
-                               Trk::SmoothedTrajectory* smoothedTrajectory) const;
+  MultiComponentState addCCOT(
+    const Trk::TrackStateOnSurface* currentState,
+    const Trk::CaloCluster_OnTrack* ccot,
+    Trk::SmoothedTrajectory* smoothedTrajectory) const;
 
 private:
   bool m_combineWithFitter;
 
-  Gaudi::Property<unsigned int> m_maximumNumberOfComponents{ this,
-                                                             "MaximumNumberOfComponents",
-                                                             12,
-                                                             "Maximum number of components" };
+  Gaudi::Property<unsigned int> m_maximumNumberOfComponents{
+    this,
+    "MaximumNumberOfComponents",
+    12,
+    "Maximum number of components"
+  };
   /*
    * Special Tool Handles set by the configureTools
    */
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IForwardGsfFitter.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IForwardGsfFitter.h
index 8354dcf618a6fb5bb3344db4ea641766b6d5718e..0193e7adb93726d41bbb82967453b7922e354c38 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IForwardGsfFitter.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IForwardGsfFitter.h
@@ -9,7 +9,8 @@ created              : Thursday 8th January 2009
 authors              : amorley,christos
 email                : Anthony.Morley@cern.ch
 decription           : Abstract interface for the forward GSF fitter
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #ifndef TrkIForwardGsfFitter_H
 #define TrkIForwardGsfFitter_H
@@ -36,7 +37,10 @@ class IForwardGsfFitter : virtual public IAlgTool
 
 public:
   /** AlgTool interface method */
-  static const InterfaceID& interfaceID() { return InterfaceID_ForwardGsfFitter; };
+  static const InterfaceID& interfaceID()
+  {
+    return InterfaceID_ForwardGsfFitter;
+  };
 
   /** Virtual destructor */
   virtual ~IForwardGsfFitter() = default;
@@ -45,9 +49,10 @@ public:
       - Configure the extrapolator
       - Configure the measurement updator
       - Configure the RIO_OnTrack creator */
-  virtual StatusCode configureTools(const ToolHandle<Trk::IMultiStateExtrapolator>&,
-                                    const ToolHandle<Trk::IMultiStateMeasurementUpdator>&,
-                                    const ToolHandle<Trk::IRIO_OnTrackCreator>&) = 0;
+  virtual StatusCode configureTools(
+    const ToolHandle<Trk::IMultiStateExtrapolator>&,
+    const ToolHandle<Trk::IMultiStateMeasurementUpdator>&,
+    const ToolHandle<Trk::IRIO_OnTrackCreator>&) = 0;
 
   /** Forward GSF fit using PrepRawData */
   virtual std::unique_ptr<ForwardTrajectory> fitPRD(
@@ -61,8 +66,8 @@ public:
     const TrackParameters&,
     const ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 
-  /** The interface will later be extended so that the initial state can be additionally a
-   * MultiComponentState object!
+  /** The interface will later be extended so that the initial state can be
+   * additionally a MultiComponentState object!
    */
 };
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IGsfSmoother.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IGsfSmoother.h
index b60d348354d33f24c2322946189dd30ff2c71d04..aa20ac008a75bc3b63d0f3d329e1af05d55dd403 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IGsfSmoother.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IGsfSmoother.h
@@ -9,7 +9,8 @@ created              : Thursday 8th January 2009
 author               : amorley
 email                : Anthony.Morley@cern.ch
 decription           : Abstract interface for the GSF smoother
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #ifndef TrkIGsfSmoother_H
 #define TrkIGsfSmoother_H
@@ -42,13 +43,15 @@ public:
   /** Configure the GSF smoother
       - Configure the extrapolator
       - Configure the measurement updator */
-  virtual StatusCode configureTools(const ToolHandle<IMultiStateExtrapolator>&,
-                                    const ToolHandle<IMultiStateMeasurementUpdator>&) = 0;
+  virtual StatusCode configureTools(
+    const ToolHandle<IMultiStateExtrapolator>&,
+    const ToolHandle<IMultiStateMeasurementUpdator>&) = 0;
 
   /** Gsf smoother method */
-  virtual SmoothedTrajectory* fit(const ForwardTrajectory&,
-                                  const ParticleHypothesis particleHypothesis = nonInteracting,
-                                  const CaloCluster_OnTrack* ccot = nullptr) const = 0;
+  virtual SmoothedTrajectory* fit(
+    const ForwardTrajectory&,
+    const ParticleHypothesis particleHypothesis = nonInteracting,
+    const CaloCluster_OnTrack* ccot = nullptr) const = 0;
 };
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMaterialMixtureConvolution.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMaterialMixtureConvolution.h
index d92d16f7da2283f6fa8e8d57966368e6b053d9aa..19906cd287913ddfbc4c0556a8b70e7ae3ca27e7 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMaterialMixtureConvolution.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMaterialMixtureConvolution.h
@@ -21,35 +21,42 @@ decription           : Abstract base class for convolution of material effects
 
 namespace Trk {
 class Layer;
-static const InterfaceID IID_IMaterialMixtureConvolution("IMaterialMixtureConvolution", 1, 0);
+static const InterfaceID
+  IID_IMaterialMixtureConvolution("IMaterialMixtureConvolution", 1, 0);
 
 class IMaterialMixtureConvolution : virtual public IAlgTool
 {
 
 public:
   //!< IAlgTool and AlgTool interface method
-  static const InterfaceID& interfaceID() { return IID_IMaterialMixtureConvolution; };
+  static const InterfaceID& interfaceID()
+  {
+    return IID_IMaterialMixtureConvolution;
+  };
 
   //!< Virtual destructor
   virtual ~IMaterialMixtureConvolution() = default;
 
   //!< Convolution with full material properties
-  virtual MultiComponentState update(const MultiComponentState&,
-                                     const Layer&,
-                                     PropDirection direction = anyDirection,
-                                     ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+  virtual MultiComponentState update(
+    const MultiComponentState&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 
   //!< Convolution with pre-measurement-update material properties
-  virtual MultiComponentState preUpdate(const MultiComponentState&,
-                                        const Layer&,
-                                        PropDirection direction = anyDirection,
-                                        ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+  virtual MultiComponentState preUpdate(
+    const MultiComponentState&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 
   //!< Convolution with post-measurement-update material properties
-  virtual MultiComponentState postUpdate(const MultiComponentState&,
-                                         const Layer&,
-                                         PropDirection direction = anyDirection,
-                                         ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+  virtual MultiComponentState postUpdate(
+    const MultiComponentState&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 
   //!< Retain for now redundant simplified material effects
   virtual MultiComponentState simplifiedMaterialUpdate(
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateExtrapolator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateExtrapolator.h
index afe38e6c6534f0664b523f66e29d810a737a4c95..84406c0487bd6bc4308c8658a3ebdcf2d726591e 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateExtrapolator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateExtrapolator.h
@@ -9,7 +9,8 @@ begin                : Tuesday 25th January 2005
 author               : atkinson,Morley,Anastopoulos
 decription           : Extrapolation of a MultiComponentState to a destination
                        surface
-================================================================================= */
+=================================================================================
+*/
 
 #ifndef TrkIMultiStateExtrapolator_H
 #define TrkIMultiStateExtrapolator_H
@@ -22,9 +23,12 @@ decription           : Extrapolation of a MultiComponentState to a destination
 #include "TrkParameters/TrackParameters.h"
 #include "TrkSurfaces/BoundaryCheck.h"
 
+#include "GaudiKernel/EventContext.h"
 #include "GaudiKernel/IAlgTool.h"
+
 #include <memory>
 #include <vector>
+
 namespace Trk {
 
 class IPropagator;
@@ -33,7 +37,9 @@ class Track;
 class TrackingVolume;
 class TrackStateOnSurface;
 
-static const InterfaceID IID_IMultiStateExtrapolator("IMultiStateExtrapolator", 1, 0);
+static const InterfaceID IID_IMultiStateExtrapolator("IMultiStateExtrapolator",
+                                                     1,
+                                                     0);
 
 class IMultiStateExtrapolator : virtual public IAlgTool
 {
@@ -42,29 +48,14 @@ public:
   virtual ~IMultiStateExtrapolator() = default;
 
   /** AlgTool interface method */
-  static const InterfaceID& interfaceID() { return IID_IMultiStateExtrapolator; };
-
-  /** Extrapolation of a MutiComponentState to a destination surface (1) */
-  virtual MultiComponentState extrapolate(
-    const IPropagator&,
-    const MultiComponentState&,
-    const Surface&,
-    PropDirection direction = anyDirection,
-    const BoundaryCheck& boundaryCheck = true,
-    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
-
-  /** - Extrapolation of a MultiComponentState to destination surface without material effects (2)
-   */
-  virtual MultiComponentState extrapolateDirectly(
-    const IPropagator&,
-    const MultiComponentState&,
-    const Surface&,
-    PropDirection direction = anyDirection,
-    const BoundaryCheck& boundaryCheck = true,
-    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+  static const InterfaceID& interfaceID()
+  {
+    return IID_IMultiStateExtrapolator;
+  };
 
   /** Configured AlgTool extrapolation method (1) */
   virtual MultiComponentState extrapolate(
+    const EventContext& ctx,
     const MultiComponentState&,
     const Surface&,
     PropDirection direction = anyDirection,
@@ -73,18 +64,20 @@ public:
 
   /** Configured AlgTool extrapolation without material effects method (2) */
   virtual MultiComponentState extrapolateDirectly(
+    const EventContext& ctx,
     const MultiComponentState&,
     const Surface&,
     PropDirection direction = anyDirection,
     const BoundaryCheck& boundaryCheck = true,
     ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 
-  virtual std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>> extrapolateM(
-    const MultiComponentState&,
-    const Surface&,
-    PropDirection dir = anyDirection,
-    const BoundaryCheck& bcheck = true,
-    ParticleHypothesis particle = nonInteracting) const = 0;
+  virtual std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>>
+  extrapolateM(const EventContext& ctx,
+               const MultiComponentState&,
+               const Surface&,
+               PropDirection dir = anyDirection,
+               const BoundaryCheck& bcheck = true,
+               ParticleHypothesis particle = nonInteracting) const = 0;
 };
 
 } // end trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h
index 1858ed4be01d39098128a169520f40fd01864036..3ed6d6c547c1417a694190404be5bc25f6a1c064 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffects.h
@@ -11,7 +11,8 @@ email                : Tom.Atkinson@cern.ch
 decription           : (Non-pure) abstract base class for defining material
                        effects including energy loss and multiple scattering for
                        use in the multi-component state environment. These
-                       material effects will produce multi-component state outputs
+                       material effects will produce multi-component state
+outputs
 ************************************************************************************/
 
 #ifndef Trk_IMultiStateMaterialEffects_H
@@ -26,14 +27,15 @@ decription           : (Non-pure) abstract base class for defining material
 
 #include "TrkExInterfaces/IMaterialEffectsUpdator.h"
 
-#include<Eigen/StdVector>
+#include <Eigen/StdVector>
 #include <memory>
 
 namespace Trk {
 
 class MaterialProperties;
 
-static const InterfaceID IID_IMultiStateMaterialEffects("IMultiStateMaterialEffects", 1, 0);
+static const InterfaceID
+  IID_IMultiStateMaterialEffects("IMultiStateMaterialEffects", 1, 0);
 
 class IMultiStateMaterialEffects : virtual public IAlgTool
 {
@@ -56,12 +58,13 @@ public:
     std::vector<double> weights;
     std::vector<double> deltaPs;
     /*
-     * Suggested 
+     * Suggested
      * by Eigen 3.3.7 manual
-     * "you must use the Eigen::aligned_allocator (not another aligned allocator), 
-     * and #include <Eigen/StdVector>."
+     * "you must use the Eigen::aligned_allocator (not another aligned
+     * allocator), and #include <Eigen/StdVector>."
      */
-    std::vector<AmgSymMatrix(5),Eigen::aligned_allocator<AmgSymMatrix(5)> > deltaCovariances;
+    std::vector<AmgSymMatrix(5), Eigen::aligned_allocator<AmgSymMatrix(5)>>
+      deltaCovariances;
     void reset()
     {
       weights.clear();
@@ -71,17 +74,21 @@ public:
   };
 
   /** Alg tool and IAlgTool interface method */
-  static const InterfaceID& interfaceID() { return IID_IMultiStateMaterialEffects; };
+  static const InterfaceID& interfaceID()
+  {
+    return IID_IMultiStateMaterialEffects;
+  };
 
   /** virtual destructor */
   virtual ~IMultiStateMaterialEffects() = default;
 
-  virtual void compute(IMultiStateMaterialEffects::Cache&,
-                       const ComponentParameters&,
-                       const MaterialProperties&,
-                       double,
-                       PropDirection direction = anyDirection,
-                       ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+  virtual void compute(
+    IMultiStateMaterialEffects::Cache&,
+    const ComponentParameters&,
+    const MaterialProperties&,
+    double,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 };
 }
 #endif
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffectsUpdator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffectsUpdator.h
index 376ceb9a5c011a0d0caffda836c5140b6712c277..89db28e7a8130743a0741bfc68ee5f3d8624657b 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffectsUpdator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMaterialEffectsUpdator.h
@@ -27,44 +27,57 @@ namespace Trk {
 class MaterialProperties;
 class Layer;
 
-static const InterfaceID IID_IMultiStateMaterialEffectsUpdator("IMultiStateMaterialEffectsUpdator", 1, 0);
+static const InterfaceID IID_IMultiStateMaterialEffectsUpdator(
+  "IMultiStateMaterialEffectsUpdator",
+  1,
+  0);
 
 class IMultiStateMaterialEffectsUpdator : virtual public IAlgTool
 {
 
 public:
   /** AlgTool interface method */
-  static const InterfaceID& interfaceID() { return IID_IMultiStateMaterialEffectsUpdator; };
+  static const InterfaceID& interfaceID()
+  {
+    return IID_IMultiStateMaterialEffectsUpdator;
+  };
 
   /** Virtual destructor */
   virtual ~IMultiStateMaterialEffectsUpdator() = default;
 
-  /** Method for updating the state with material effects provided by the layer object */
-  virtual Trk::MultiComponentState updateState(const ComponentParameters&,
-                                               const Layer&,
-                                               PropDirection direction = alongMomentum,
-                                               ParticleHypothesis = nonInteracting) const = 0;
-
-  /** Method for updating the state with material effects provided by a material properties object
-   * and a pathlength */
-  virtual Trk::MultiComponentState updateState(const ComponentParameters&,
-                                               const MaterialProperties&,
-                                               double,
-                                               PropDirection = alongMomentum,
-                                               ParticleHypothesis = nonInteracting) const = 0;
-
-  /** Method for the state with material effects provided by the layer object prior to propagation
+  /** Method for updating the state with material effects provided by the layer
+   * object */
+  virtual Trk::MultiComponentState updateState(
+    const ComponentParameters&,
+    const Layer&,
+    PropDirection direction = alongMomentum,
+    ParticleHypothesis = nonInteracting) const = 0;
+
+  /** Method for updating the state with material effects provided by a material
+   * properties object and a pathlength */
+  virtual Trk::MultiComponentState updateState(
+    const ComponentParameters&,
+    const MaterialProperties&,
+    double,
+    PropDirection = alongMomentum,
+    ParticleHypothesis = nonInteracting) const = 0;
+
+  /** Method for the state with material effects provided by the layer object
+   * prior to propagation
    */
-  virtual Trk::MultiComponentState preUpdateState(const ComponentParameters&,
-                                                  const Layer&,
-                                                  PropDirection direction = anyDirection,
-                                                  ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
-
-  /**  Method for the state with material effects provided by the layer object after propagation */
-  virtual Trk::MultiComponentState postUpdateState(const ComponentParameters&,
-                                                   const Layer&,
-                                                   PropDirection direction = anyDirection,
-                                                   ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+  virtual Trk::MultiComponentState preUpdateState(
+    const ComponentParameters&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
+
+  /**  Method for the state with material effects provided by the layer object
+   * after propagation */
+  virtual Trk::MultiComponentState postUpdateState(
+    const ComponentParameters&,
+    const Layer&,
+    PropDirection direction = anyDirection,
+    ParticleHypothesis particleHypothesis = nonInteracting) const = 0;
 };
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMeasurementUpdator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMeasurementUpdator.h
index 246129e4a238bc8d092ff53d71fff8c5f8820236..2965b0d6d0856bbfe71d7b4f772ada623306d347 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMeasurementUpdator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/IMultiStateMeasurementUpdator.h
@@ -24,33 +24,44 @@ namespace Trk {
 
 class MeasurementBase;
 
-static const InterfaceID IID_IMultiStateMeasurementUpdator("IMultiStateMeasurementUpdator", 1, 0);
+static const InterfaceID
+  IID_IMultiStateMeasurementUpdator("IMultiStateMeasurementUpdator", 1, 0);
 
 class IMultiStateMeasurementUpdator : virtual public IAlgTool
 {
 
 public:
   /** IAlgTool and AlgTool interface method */
-  static const InterfaceID& interfaceID() { return IID_IMultiStateMeasurementUpdator; };
+  static const InterfaceID& interfaceID()
+  {
+    return IID_IMultiStateMeasurementUpdator;
+  };
 
   /** Virtual destructor */
   virtual ~IMultiStateMeasurementUpdator() = default;
 
   /** Method for forward filters to incorporate measurement updates */
-  virtual MultiComponentState update(MultiComponentState&&, const MeasurementBase&) const = 0;
+  virtual MultiComponentState update(MultiComponentState&&,
+                                     const MeasurementBase&) const = 0;
 
-  /** Method for updating the multi-state with a new measurement and calculate the fit qaulity at
-   * the same time*/
-  virtual MultiComponentState update(Trk::MultiComponentState&&,
-                                     const Trk::MeasurementBase&,
-                                     std::unique_ptr<FitQualityOnSurface>& fitQoS) const = 0;
+  /** Method for updating the multi-state with a new measurement and calculate
+   * the fit qaulity at the same time*/
+  virtual MultiComponentState update(
+    Trk::MultiComponentState&&,
+    const Trk::MeasurementBase&,
+    std::unique_ptr<FitQualityOnSurface>& fitQoS) const = 0;
 
-  /** Method for reverse filters (smoothers) to determine the unbiased track parameters */
-  virtual MultiComponentState getUnbiasedTrackParameters(MultiComponentState&&,
-                                                         const MeasurementBase&) const = 0;
+  /** Method for reverse filters (smoothers) to determine the unbiased track
+   * parameters */
+  virtual MultiComponentState getUnbiasedTrackParameters(
+    MultiComponentState&&,
+    const MeasurementBase&) const = 0;
 
-  /** Method for determining the chi2 of the track and the number of degrees of freedom */
-  virtual const FitQualityOnSurface* fitQuality(const MultiComponentState&, const MeasurementBase&) const = 0;
+  /** Method for determining the chi2 of the track and the number of degrees of
+   * freedom */
+  virtual const FitQualityOnSurface* fitQuality(
+    const MultiComponentState&,
+    const MeasurementBase&) const = 0;
 };
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
index a17d7a6786ef5cbe433d011213054c897a7c628e..2525c5632efd681aafa7d8e97d75786be35c91fb 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/KLGaussianMixtureReduction.h
@@ -3,53 +3,54 @@
 */
 
 /**
-* @file  KLGaussianMixtureReduction.h
-* @author amorley
-* @author Anastopoulos
-* @date 26th November 2019
-* @brief Function that help implement component merging .
-*/
+ * @file  KLGaussianMixtureReduction.h
+ * @author amorley
+ * @author Anastopoulos
+ * @date 26th November 2019
+ * @brief Function that help implement component merging .
+ */
 #ifndef KLGaussianMixReductionUtils_H
 #define KLGaussianMixReductionUtils_H
 
-#include "CxxUtils/restrict.h"
 #include "CxxUtils/features.h"
-#include <vector>
-#include <utility>
+#include "CxxUtils/restrict.h"
 #include <cstdint>
+#include <utility>
+#include <vector>
 
 namespace GSFUtils {
 
 /**
  * Alignment used  for SIMD
  */
-constexpr size_t alignment =32;
+constexpr size_t alignment = 32;
 
 /**
  * The main pupropse of the utilities here
- * are to facilitate the calculation of the 
- * divergence between components of the mixture 
+ * are to facilitate the calculation of the
+ * divergence between components of the mixture
  * and the merging of similar componets.
  *
- * For a revies of available methods look 
+ * For a revies of available methods look
  * https://arxiv.org/pdf/2001.00727.pdf
  *
- * Here we opt for formula 10. 
- * For an 1D Normal distributions this becomes: 
+ * Here we opt for formula 10.
+ * For an 1D Normal distributions this becomes:
  *
- * (variance1-variance2) (1/variance1 - 1/variance2) - 
+ * (variance1-variance2) (1/variance1 - 1/variance2) -
  * (mean1-mean2)(1/variance+1/variance)(mean1-mean2)
  *
  * We use doubles for the intermediate calculations
  * but we store the final distances to short in an array
  * of floats.
  *
-*/
-struct Component1D{
-  double mean=0.;
-  double cov=0.;
-  double invCov=1e10; 
-  double weight=0.;
+ */
+struct Component1D
+{
+  double mean = 0.;
+  double cov = 0.;
+  double invCov = 1e10;
+  double weight = 0.;
 };
 
 /**
@@ -63,45 +64,46 @@ struct Component1D{
  *   [.............................
  *   [(N-1,0),(N-1,1),(N-1,2),(N-1,3).......(N-1,N-2)]
  *
- *   With size 
+ *   With size
  *   1+2+3+ .... (N-1) = N*(N-1)/2
  *
  *   The lexicographical storage allocation function is
- *   Loc(i,j) = i*(i-1)/2 + j 
+ *   Loc(i,j) = i*(i-1)/2 + j
  *   e.g
- *   (1,0) --> 1 *(1-1)/2 + 0 --> 0 
+ *   (1,0) --> 1 *(1-1)/2 + 0 --> 0
  *   (2,0) --> 2 *(2-1)/2 + 0 --> 1
  *   (2,1) --> 2 *(2-1)/2 + 1 --> 2
  *   (3,0) --> 3 * (3-1)/2 +0 --> 3
- *   Leading to  
+ *   Leading to
  *   [(1,0),(2,0),(2,1),(3,0),(3,1),(3,2)...... (N-1,N-2)]
- * 
+ *
  *
  *   The N-1 Rows  map to value K of the 1st element in the pair.
- *   K=1,2,3,...N-1  and each one has size K. 
+ *   K=1,2,3,...N-1  and each one has size K.
  *   Each Row starts at array positions K*(K-1)/2
- *   e.g 
+ *   e.g
  *   The row for element 1 starts at array position 0.
  *   The row for element 2 starts at array position 1.
  *   The row for element N-1  starts at array positon (N-1)*(N-2)/2
- *   
- *   The N-1 Columns map to the value K of the second  element in the pair 
+ *
+ *   The N-1 Columns map to the value K of the second  element in the pair
  *   0,1,2 ... N-2
  *   The array position follow (i-1)*i/2+K;
  *   where i : K+1 .... N-1 [for(i=K+1;i<N;++i)
- *   e.g 
- *   0 appears as 2nd element in the pair at array positions 
+ *   e.g
+ *   0 appears as 2nd element in the pair at array positions
  *   [0,1,3,6...]
  *   1 appears as 2nd element in the pair at array positions
- *   [2,4,7...] 
+ *   [2,4,7...]
  *   2 appears as 2nd element in the pair at array positions
- *   [5,8,12....] 
+ *   [5,8,12....]
  *   N-2 appears as 2nd element once at position [N(N-1)/2-1]
  *
  */
-struct triangularToIJ{
-  int32_t I=-1;
-  int32_t J=-1;
+struct triangularToIJ
+{
+  int32_t I = -1;
+  int32_t J = -1;
 };
 
 /**
@@ -111,12 +113,12 @@ typedef float* ATH_RESTRICT floatPtrRestrict;
 typedef Component1D* ATH_RESTRICT componentPtrRestrict;
 
 /**
- * Merge the componentsIn and return 
+ * Merge the componentsIn and return
  * which componets got merged
  */
 std::vector<std::pair<int32_t, int32_t>>
-findMerges(componentPtrRestrict componentsIn, 
-           const int32_t inputSize, 
+findMerges(componentPtrRestrict componentsIn,
+           const int32_t inputSize,
            const int32_t reducedSize);
 
 /**
@@ -125,24 +127,18 @@ findMerges(componentPtrRestrict componentsIn,
  */
 #if HAVE_FUNCTION_MULTIVERSIONING
 #if defined(__x86_64__)
-__attribute__((target("avx2")))
-std::pair<int32_t,float> 
+__attribute__((target("avx2"))) std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
-__attribute__((target("sse4.1"))) 
-std::pair<int32_t,float> 
+__attribute__((target("sse4.1"))) std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
-__attribute__((target("sse2"))) 
-std::pair<int32_t,float> 
+__attribute__((target("sse2"))) std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
-#endif //x86_64 specific targets
+#endif // x86_64 specific targets
 __attribute__((target("default")))
-#endif// function multiversioning
-std::pair<int32_t,float> 
+#endif // function multiversioning
+std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int32_t n);
 
 } // namespace KLGaussianMixtureReduction
 
-      
-
-
 #endif
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateAssembler.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateAssembler.h
index 902c027c6e5d27ed9a6329a8cc9ad4fa61a5e2d0..f92bf819fef786132c12c502918a8b3c9880bb88 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateAssembler.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateAssembler.h
@@ -52,13 +52,13 @@ struct Cache
 void
 reset(Cache& cache);
 
-/** Method to add a single set of Trk::ComponentParameters to the cached Trk::MultiComponentState
- * object under construction */
+/** Method to add a single set of Trk::ComponentParameters to the cached
+ * Trk::MultiComponentState object under construction */
 bool
 addComponent(Cache& cache, ComponentParameters&&);
 
-/** Method to add a new Trk::MultiComponentState to the cached Trk::MultiComponentState o
- * bject under construction */
+/** Method to add a new Trk::MultiComponentState to the cached
+ * Trk::MultiComponentState o bject under construction */
 bool
 addMultiState(Cache& cache, Trk::MultiComponentState&&);
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h
index ad65f1117fb85c1ecfb1e4cbb7aa1edc339673a7..c6bc1accc8198fb4003a09e2c1d28a7a1ffe85ef 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateCombiner.h
@@ -23,18 +23,25 @@ namespace MultiComponentStateCombiner {
 
 /** Calculate combined state of many components */
 std::unique_ptr<Trk::TrackParameters>
-combine(const MultiComponentState&, const bool useMode = false, const double fractionPDFused = 1.0);
+combine(const MultiComponentState&,
+        const bool useMode = false,
+        const double fractionPDFused = 1.0);
 
 /** Combined/merge a component to another one */
 void
-combineWithWeight(Trk::ComponentParameters& mergeTo, const Trk::ComponentParameters& addThis);
+combineWithWeight(Trk::ComponentParameters& mergeTo,
+                  const Trk::ComponentParameters& addThis);
 
 /** Calculate combined state and weight of many components */
 std::unique_ptr<Trk::ComponentParameters>
-combineWithWeight(const MultiComponentState&, const bool useMode = false, const double fractionPDFused = 1.0);
+combineWithWeight(const MultiComponentState&,
+                  const bool useMode = false,
+                  const double fractionPDFused = 1.0);
 
 std::unique_ptr<Trk::ComponentParameters>
-compute(const MultiComponentState*, const bool useMode = false, const double fractionPDFused = 1.0);
+compute(const MultiComponentState*,
+        const bool useMode = false,
+        const double fractionPDFused = 1.0);
 }
 } // end Trk namespace
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateModeCalculator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateModeCalculator.h
index 7a21a20efeff8d0fb2bfcff31af360c08397840b..d1892ae88c1f55719f1bb1bf38a4284fe3baa529 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateModeCalculator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/MultiComponentStateModeCalculator.h
@@ -8,7 +8,8 @@
 begin                : Thursday 6th July 2006
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
-description          : Class to calculate the mode (q/p) of a gaussian mixtureArray
+description          : Class to calculate the mode (q/p) of a gaussian
+mixtureArray
 ***********************************************************************************/
 
 #ifndef Trk_MultiComponentStateModeCalculator_H
@@ -45,11 +46,14 @@ struct Component
 std::array<double, 10>
 calculateMode(const MultiComponentState&);
 
-//!<  method to extract the weight, mean and sigma values from the multi-component state
+//!<  method to extract the weight, mean and sigma values from the
+//!<  multi-component state
 void
-fillMixture(const MultiComponentState&, std::array<std::vector<Component>, 5>& mixture);
+fillMixture(const MultiComponentState&,
+            std::array<std::vector<Component>, 5>& mixture);
 
-//!<  method to find the mode using the Newton-Raphson method based on a starting guess
+//!<  method to find the mode using the Newton-Raphson method based on a
+//!<  starting guess
 double
 findMode(double, int, const std::array<std::vector<Component>, 5>& mixture);
 
@@ -61,16 +65,20 @@ pdf(double, int, const std::array<std::vector<Component>, 5>& mixture);
 double
 d1pdf(double, int, const std::array<std::vector<Component>, 5>& mixture);
 
-//!<  method to determine the second order derivative of the pdf at a given value
+//!<  method to determine the second order derivative of the pdf at a given
+//!<  value
 double
 d2pdf(double, int, const std::array<std::vector<Component>, 5>& mixture);
 
-//!<  method to determine the value of the a gaussian distribution at a given value
+//!<  method to determine the value of the a gaussian distribution at a given
+//!<  value
 double
 gaus(double x, double mean, double sigma);
 
 double
-findModeGlobal(double, int, const std::array<std::vector<Component>, 5>& mixture);
+findModeGlobal(double,
+               int,
+               const std::array<std::vector<Component>, 5>& mixture);
 
 double
 width(int i, const std::array<std::vector<Component>, 5>& mixture);
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/PosteriorWeightsCalculator.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/PosteriorWeightsCalculator.h
index 6de5445a03a8f24cee9cfbece1759cf2170a61cf..78c1d5edea01038b7a32003aaa9ce849ff02adfc 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/PosteriorWeightsCalculator.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/PosteriorWeightsCalculator.h
@@ -28,61 +28,72 @@ namespace Trk {
 class PosteriorWeightsCalculator
 {
 public:
-  std::vector<Trk::ComponentParameters> weights(MultiComponentState&&, const MeasurementBase&) const;
+  std::vector<Trk::ComponentParameters> weights(MultiComponentState&&,
+                                                const MeasurementBase&) const;
 
 private:
-  /** Function to calculate the determinant and  chi2 of a measurement for a 1D hit */
-  std::pair<double, double> calculateWeight_1D(const TrackParameters* componentTrackParameters,
-                                               const AmgSymMatrix(5) * predictedCov,
-                                               const double measPar,
-                                               const double measCov,
-                                               int paramKey) const;
-
-  /** Function to calculate the determinant and  chi2 of a measurement for a 2D hit
-      specially when the measurements are when local x and local y  */
-  std::pair<double, double> calculateWeight_2D_3(const TrackParameters* componentTrackParameters,
-                                                 const AmgSymMatrix(5) * predictedCov,
-                                                 const AmgVector(2) & measPar,
-                                                 const AmgSymMatrix(2) & measCov) const;
-
-  /** Tempplated Function to calculate the determinant and  chi2 of a measurement for a N'D hit */
+  /** Function to calculate the determinant and  chi2 of a measurement for a 1D
+   * hit */
+  std::pair<double, double> calculateWeight_1D(
+    const TrackParameters* componentTrackParameters,
+    const AmgSymMatrix(5) * predictedCov,
+    const double measPar,
+    const double measCov,
+    int paramKey) const;
+
+  /** Function to calculate the determinant and  chi2 of a measurement for a 2D
+     hit specially when the measurements are when local x and local y  */
+  std::pair<double, double> calculateWeight_2D_3(
+    const TrackParameters* componentTrackParameters,
+    const AmgSymMatrix(5) * predictedCov,
+    const AmgVector(2) & measPar,
+    const AmgSymMatrix(2) & measCov) const;
+
+  /** Tempplated Function to calculate the determinant and  chi2 of a
+   * measurement for a N'D hit */
   template<int DIM>
-  std::pair<double, double> calculateWeight_T(const TrackParameters* componentTrackParameters,
-                                              const AmgSymMatrix(5) * predictedCov,
-                                              const AmgVector(DIM) & measPar,
-                                              const AmgSymMatrix(DIM) & measCov,
-                                              int paramKey) const;
+  std::pair<double, double> calculateWeight_T(
+    const TrackParameters* componentTrackParameters,
+    const AmgSymMatrix(5) * predictedCov,
+    const AmgVector(DIM) & measPar,
+    const AmgSymMatrix(DIM) & measCov,
+    int paramKey) const;
 };
 
 template<int DIM>
 std::pair<double, double>
-PosteriorWeightsCalculator::calculateWeight_T(const TrackParameters* componentTrackParameters,
-                                              const AmgSymMatrix(5) * predictedCov,
-                                              const AmgVector(DIM) & measPar,
-                                              const AmgSymMatrix(DIM) & measCov,
-                                              int paramKey) const
+PosteriorWeightsCalculator::calculateWeight_T(
+  const TrackParameters* componentTrackParameters,
+  const AmgSymMatrix(5) * predictedCov,
+  const AmgVector(DIM) & measPar,
+  const AmgSymMatrix(DIM) & measCov,
+  int paramKey) const
 {
 
-  static const ProjectionMatricesSet reMatrices(5); //!< expansion and reduction matrices set
+  static const ProjectionMatricesSet reMatrices(
+    5); //!< expansion and reduction matrices set
   // Define the expansion matrix
-  const AmgMatrix(DIM, 5) H = reMatrices.expansionMatrix(paramKey).block<DIM, 5>(0, 0);
+  const AmgMatrix(DIM, 5) H =
+    reMatrices.expansionMatrix(paramKey).block<DIM, 5>(0, 0);
 
   // Calculate the residual
   AmgVector(DIM) r = measPar - H * componentTrackParameters->parameters();
 
-  // Residual covariance. Posterior weights is calculated used predicted state and measurement.
-  // Therefore add covariances
+  // Residual covariance. Posterior weights is calculated used predicted state
+  // and measurement. Therefore add covariances
   AmgSymMatrix(DIM) R(measCov + H * (*predictedCov) * H.transpose());
 
   // compute determinant of residual
   const double det = R.determinant();
 
   if (det == 0) {
-    // ATH_MSG_WARNING( "Determinant is 0, cannot invert matrix... Ignoring component" );
+    // ATH_MSG_WARNING( "Determinant is 0, cannot invert matrix... Ignoring
+    // component" );
     return std::pair<double, double>(0, 0);
   }
   // Compute Chi2
-  return std::pair<double, double>(det, (1. / (double)DIM) * ((r.transpose() * R.inverse() * r)(0, 0)));
+  return std::pair<double, double>(
+    det, (1. / (double)DIM) * ((r.transpose() * R.inverse() * r)(0, 0)));
 }
 
 } // end Trk namespace
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h
index 2515056819b2e4fbf5edb2b72d83f7176c52cf76..69e3582be5f0de983609e6aadd6056b0e1e4737a 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h
@@ -22,9 +22,8 @@ decription           : Class for merging components of a multi-state based on
 namespace Trk {
 class IMultiComponentStateCombiner;
 class TrackStateOnSurface;
-namespace QuickCloseComponentsMultiStateMerger
-{
-  /** Method for merging components - ownership of objects is passed */
+namespace QuickCloseComponentsMultiStateMerger {
+/** Method for merging components - ownership of objects is passed */
 MultiComponentState
 merge(Trk::MultiComponentState&&, const unsigned int maximumNumberOfComponents);
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/ForwardGsfFitter.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/ForwardGsfFitter.cxx
index 6aa4cc14dab01f95a1d792cdfe2c2558347de338..8d3b574cca28536d15d0874d04d520eb92a3f264 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/ForwardGsfFitter.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/ForwardGsfFitter.cxx
@@ -9,7 +9,8 @@ begin                : Wednesday 9th March 2005
 author               : amorley, atkinson
 email                : Anthony.Morley@cern.ch, Tom.Atkinson@cern.ch
 decription           : Implementation code for ForwardGsfFitter class
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #include "TrkGaussianSumFilter/ForwardGsfFitter.h"
 
@@ -27,7 +28,9 @@ decription           : Implementation code for ForwardGsfFitter class
 #include "TrkSurfaces/Surface.h"
 #include "TrkToolInterfaces/IRIO_OnTrackCreator.h"
 
-Trk::ForwardGsfFitter::ForwardGsfFitter(const std::string& type, const std::string& name, const IInterface* parent)
+Trk::ForwardGsfFitter::ForwardGsfFitter(const std::string& type,
+                                        const std::string& name,
+                                        const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_cutChiSquaredPerNumberDOF(50.)
   , m_overideMaterialEffects(4)
@@ -37,7 +40,8 @@ Trk::ForwardGsfFitter::ForwardGsfFitter(const std::string& type, const std::stri
 
   declareInterface<IForwardGsfFitter>(this);
   declareProperty("StateChi2PerNDOFCut", m_cutChiSquaredPerNumberDOF);
-  declareProperty("OverideForwardsMaterialEffects", m_overideMaterialEffectsSwitch);
+  declareProperty("OverideForwardsMaterialEffects",
+                  m_overideMaterialEffectsSwitch);
   declareProperty("MaterialEffectsInForwardFitter", m_overideMaterialEffects);
 }
 
@@ -45,12 +49,15 @@ StatusCode
 Trk::ForwardGsfFitter::initialize()
 {
 
-  ATH_MSG_DEBUG("A cut on Chi2 / NDOF: " << m_cutChiSquaredPerNumberDOF << " will be applied");
+  ATH_MSG_DEBUG("A cut on Chi2 / NDOF: " << m_cutChiSquaredPerNumberDOF
+                                         << " will be applied");
 
   Trk::ParticleSwitcher particleSwitcher;
-  m_overideParticleHypothesis = particleSwitcher.particle[m_overideMaterialEffects];
+  m_overideParticleHypothesis =
+    particleSwitcher.particle[m_overideMaterialEffects];
   if (m_overideMaterialEffectsSwitch) {
-    ATH_MSG_INFO("Material effects in forwards fitter have been overiden by jobOptions... New "
+    ATH_MSG_INFO("Material effects in forwards fitter have been overiden by "
+                 "jobOptions... New "
                  "Trk::ParticleHypothesis: "
                  << m_overideMaterialEffects);
   }
@@ -68,9 +75,10 @@ Trk::ForwardGsfFitter::finalize()
 }
 
 StatusCode
-Trk::ForwardGsfFitter::configureTools(const ToolHandle<IMultiStateExtrapolator>& extrapolator,
-                                      const ToolHandle<IMultiStateMeasurementUpdator>& measurementUpdator,
-                                      const ToolHandle<IRIO_OnTrackCreator>& rioOnTrackCreator)
+Trk::ForwardGsfFitter::configureTools(
+  const ToolHandle<IMultiStateExtrapolator>& extrapolator,
+  const ToolHandle<IMultiStateMeasurementUpdator>& measurementUpdator,
+  const ToolHandle<IRIO_OnTrackCreator>& rioOnTrackCreator)
 {
   m_extrapolator = extrapolator;
   m_updator = measurementUpdator;
@@ -85,9 +93,10 @@ Trk::ForwardGsfFitter::configureTools(const ToolHandle<IMultiStateExtrapolator>&
    =============================================================================================================*/
 
 std::unique_ptr<Trk::ForwardTrajectory>
-Trk::ForwardGsfFitter::fitPRD(const Trk::PrepRawDataSet& inputPrepRawDataSet,
-                              const Trk::TrackParameters& estimatedTrackParametersNearOrigin,
-                              const Trk::ParticleHypothesis particleHypothesis) const
+Trk::ForwardGsfFitter::fitPRD(
+  const Trk::PrepRawDataSet& inputPrepRawDataSet,
+  const Trk::TrackParameters& estimatedTrackParametersNearOrigin,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
 
   // Check that the updator is instansiated
@@ -102,7 +111,8 @@ Trk::ForwardGsfFitter::fitPRD(const Trk::PrepRawDataSet& inputPrepRawDataSet,
   }
 
   if (!m_rioOnTrackCreator) {
-    ATH_MSG_ERROR("The RIO_OnTrackCreator is not configured for use with the PrepRawData set... Exiting!");
+    ATH_MSG_ERROR("The RIO_OnTrackCreator is not configured for use with the "
+                  "PrepRawData set... Exiting!");
     return nullptr;
   }
 
@@ -120,8 +130,8 @@ Trk::ForwardGsfFitter::fitPRD(const Trk::PrepRawDataSet& inputPrepRawDataSet,
     configuredParticleHypothesis = particleHypothesis;
   }
 
-  // Extract PrepRawDataSet into new local object and check that the PrepRawData is associated with
-  // a detector element
+  // Extract PrepRawDataSet into new local object and check that the PrepRawData
+  // is associated with a detector element
   Trk::PrepRawDataSet prepRawDataSet;
   Trk::PrepRawDataSet::const_iterator prepRawData = inputPrepRawDataSet.begin();
 
@@ -137,29 +147,38 @@ Trk::ForwardGsfFitter::fitPRD(const Trk::PrepRawDataSet& inputPrepRawDataSet,
   // Create new trajectory
   auto forwardTrajectory = std::make_unique<Trk::ForwardTrajectory>();
 
-  // Prepare the multi-component state. For starting guess this has single component, weight 1
+  // Prepare the multi-component state. For starting guess this has single
+  // component, weight 1
   const AmgVector(5)& par = estimatedTrackParametersNearOrigin.parameters();
 
   Trk::ComponentParameters componentParametersNearOrigin(
-    estimatedTrackParametersNearOrigin.associatedSurface().createTrackParameters(
-      par[Trk::loc1], par[Trk::loc2], par[Trk::phi], par[Trk::theta], par[Trk::qOverP], nullptr /*no errors*/),
+    estimatedTrackParametersNearOrigin.associatedSurface()
+      .createTrackParameters(par[Trk::loc1],
+                             par[Trk::loc2],
+                             par[Trk::phi],
+                             par[Trk::theta],
+                             par[Trk::qOverP],
+                             nullptr /*no errors*/),
     1.);
 
   Trk::MultiComponentState multiComponentStateNearOrigin{};
-  multiComponentStateNearOrigin.push_back(std::move(componentParametersNearOrigin));
+  multiComponentStateNearOrigin.push_back(
+    std::move(componentParametersNearOrigin));
 
   // Loop over all PrepRawData measurements
   prepRawData = prepRawDataSet.begin();
 
   for (; prepRawData != prepRawDataSet.end(); ++prepRawData) {
 
-    // Every valid step the ForwardTrajectory object passed to the stepForwardFit method is updated
-    bool stepIsValid = stepForwardFit(forwardTrajectory.get(),
-                                      *prepRawData,
-                                      nullptr,
-                                      (*prepRawData)->detectorElement()->surface((*prepRawData)->identify()),
-                                      multiComponentStateNearOrigin,
-                                      configuredParticleHypothesis);
+    // Every valid step the ForwardTrajectory object passed to the
+    // stepForwardFit method is updated
+    bool stepIsValid = stepForwardFit(
+      forwardTrajectory.get(),
+      *prepRawData,
+      nullptr,
+      (*prepRawData)->detectorElement()->surface((*prepRawData)->identify()),
+      multiComponentStateNearOrigin,
+      configuredParticleHypothesis);
 
     if (!stepIsValid) {
       ATH_MSG_DEBUG("Fitter step is not valid... Exiting!");
@@ -175,9 +194,10 @@ Trk::ForwardGsfFitter::fitPRD(const Trk::PrepRawDataSet& inputPrepRawDataSet,
  */
 
 std::unique_ptr<Trk::ForwardTrajectory>
-Trk::ForwardGsfFitter::fitMeasurements(const Trk::MeasurementSet& inputMeasurementSet,
-                                       const Trk::TrackParameters& estimatedTrackParametersNearOrigin,
-                                       const Trk::ParticleHypothesis particleHypothesis) const
+Trk::ForwardGsfFitter::fitMeasurements(
+  const Trk::MeasurementSet& inputMeasurementSet,
+  const Trk::TrackParameters& estimatedTrackParametersNearOrigin,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
   // Check that the updator is instansiated
   if (!m_updator) {
@@ -207,18 +227,25 @@ Trk::ForwardGsfFitter::fitMeasurements(const Trk::MeasurementSet& inputMeasureme
   // This memory should be freed by the fitter / smoother master method
   auto forwardTrajectory = std::make_unique<Trk::ForwardTrajectory>();
 
-  // Prepare the multi-component state. For starting guess this has single component, weight 1
+  // Prepare the multi-component state. For starting guess this has single
+  // component, weight 1
   const AmgVector(5)& par = estimatedTrackParametersNearOrigin.parameters();
 
   AmgSymMatrix(5)* covariance = nullptr;
 
   Trk::ComponentParameters componentParametersNearOrigin(
-    estimatedTrackParametersNearOrigin.associatedSurface().createTrackParameters(
-      par[Trk::loc1], par[Trk::loc2], par[Trk::phi], par[Trk::theta], par[Trk::qOverP], covariance /*no errors*/),
+    estimatedTrackParametersNearOrigin.associatedSurface()
+      .createTrackParameters(par[Trk::loc1],
+                             par[Trk::loc2],
+                             par[Trk::phi],
+                             par[Trk::theta],
+                             par[Trk::qOverP],
+                             covariance /*no errors*/),
     1.);
 
   Trk::MultiComponentState multiComponentStateNearOrigin{};
-  multiComponentStateNearOrigin.push_back(std::move(componentParametersNearOrigin));
+  multiComponentStateNearOrigin.push_back(
+    std::move(componentParametersNearOrigin));
 
   // Loop over all MeasurementBase objects in set
   Trk::MeasurementSet::const_iterator measurement = inputMeasurementSet.begin();
@@ -245,16 +272,18 @@ Trk::ForwardGsfFitter::fitMeasurements(const Trk::MeasurementSet& inputMeasureme
  */
 
 bool
-Trk::ForwardGsfFitter::stepForwardFit(ForwardTrajectory* forwardTrajectory,
-                                      const Trk::PrepRawData* originalPrepRawData,
-                                      const Trk::MeasurementBase* originalMeasurement,
-                                      const Trk::Surface& surface,
-                                      Trk::MultiComponentState& updatedState,
-                                      const Trk::ParticleHypothesis particleHypothesis) const
+Trk::ForwardGsfFitter::stepForwardFit(
+  ForwardTrajectory* forwardTrajectory,
+  const Trk::PrepRawData* originalPrepRawData,
+  const Trk::MeasurementBase* originalMeasurement,
+  const Trk::Surface& surface,
+  Trk::MultiComponentState& updatedState,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
   // Protect against undefined Measurement or PrepRawData
   if (!originalPrepRawData && !originalMeasurement) {
-    ATH_MSG_WARNING("No measurement information passed to StepForwardFit... Exiting!");
+    ATH_MSG_WARNING(
+      "No measurement information passed to StepForwardFit... Exiting!");
     return false;
   }
 
@@ -267,7 +296,12 @@ Trk::ForwardGsfFitter::stepForwardFit(ForwardTrajectory* forwardTrajectory,
   // Extrapolate multi-component state to the next measurement surface
   // =================================================================
   Trk::MultiComponentState extrapolatedState =
-    m_extrapolator->extrapolate(updatedState, surface, Trk::alongMomentum, false, particleHypothesis);
+    m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
+                                updatedState,
+                                surface,
+                                Trk::alongMomentum,
+                                false,
+                                particleHypothesis);
   if (extrapolatedState.empty()) {
     ATH_MSG_DEBUG("Extrapolation failed... returning false");
     return false;
@@ -286,48 +320,60 @@ Trk::ForwardGsfFitter::stepForwardFit(ForwardTrajectory* forwardTrajectory,
       ATH_MSG_WARNING("State combination failed... exiting");
       return false;
     }
-    // Create a new MeasurementBase object from PrepRawData using new calibration
-    measurement.reset(m_rioOnTrackCreator->correct(*originalPrepRawData, *combinedState));
+    // Create a new MeasurementBase object from PrepRawData using new
+    // calibration
+    measurement.reset(
+      m_rioOnTrackCreator->correct(*originalPrepRawData, *combinedState));
     combinedState.reset();
   }
   // ==========================
   // Perform measurement update
   // ==========================
   if (!measurement) {
-    ATH_MSG_WARNING("Cannot use MeasurementBase for measurement update, it is not defined... Exiting!");
+    ATH_MSG_WARNING("Cannot use MeasurementBase for measurement update, it is "
+                    "not defined... Exiting!");
     return false;
   }
   std::unique_ptr<Trk::FitQualityOnSurface> fitQuality;
-  updatedState =
-    m_updator->update(std::move(*(MultiComponentStateHelpers::clone(extrapolatedState))), *measurement, fitQuality);
+  updatedState = m_updator->update(
+    std::move(*(MultiComponentStateHelpers::clone(extrapolatedState))),
+    *measurement,
+    fitQuality);
   if (updatedState.empty()) {
     ATH_MSG_DEBUG("Measurement update of the state failed... Exiting!");
     return false;
   }
- // Bail if the fit quality is not defined:
+  // Bail if the fit quality is not defined:
   if (!fitQuality) {
-    ATH_MSG_DEBUG("Failed to make fit quality... rejecting forwards trajectory");
+    ATH_MSG_DEBUG(
+      "Failed to make fit quality... rejecting forwards trajectory");
     return false;
   }
   // Reject hits with excessive Chi2
-  else if (fitQuality->chiSquared() > m_cutChiSquaredPerNumberDOF * fitQuality->numberDoF()) {
-    ATH_MSG_DEBUG("Update with new measurement caused track to fail Chi Squared test, removing the object");
+  if (fitQuality->chiSquared() >
+      m_cutChiSquaredPerNumberDOF * fitQuality->numberDoF()) {
+    ATH_MSG_DEBUG("Update with new measurement caused track to fail Chi "
+                  "Squared test, removing the object");
     fitQuality = std::make_unique<FitQuality>(1, 1);
     std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type(0);
     type.set(TrackStateOnSurface::Outlier);
     const Trk::MultiComponentStateOnSurface* multiComponentStateOnSurface =
-      new MultiComponentStateOnSurface(measurement.release(),
-                                       MultiComponentStateHelpers::clone(extrapolatedState).release(),
-                                       fitQuality.release(),
-                                       nullptr,
-                                       type);
+      new MultiComponentStateOnSurface(
+        measurement.release(),
+        MultiComponentStateHelpers::clone(extrapolatedState).release(),
+        fitQuality.release(),
+        nullptr,
+        type);
 
     forwardTrajectory->push_back(multiComponentStateOnSurface);
     // Clean up objects associated with removed measurement
     updatedState = std::move(extrapolatedState);
   } else {
-    const Trk::MultiComponentStateOnSurface* multiComponentStateOnSurface = new MultiComponentStateOnSurface(
-      measurement.release(), MultiComponentStateHelpers::clone(extrapolatedState).release(), fitQuality.release());
+    const Trk::MultiComponentStateOnSurface* multiComponentStateOnSurface =
+      new MultiComponentStateOnSurface(
+        measurement.release(),
+        MultiComponentStateHelpers::clone(extrapolatedState).release(),
+        fitQuality.release());
     forwardTrajectory->push_back(multiComponentStateOnSurface);
   }
   return true;
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx
index f282011bae9b5ba1afb50d0c3d5b45adf4416149..65be4c549ec523ee3bc5ffd9175aeea32656bb9f 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GaussianSumFitter.cxx
@@ -9,7 +9,8 @@ begin                : Monday 7th March 2005
 author               : amorley atkinson
 email                : Anthony.Morley@cern.ch Tom.Atkinson@cern.ch
 decription           : Implementation code for Gaussian Sum Fitter class
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #include "TrkGaussianSumFilter/GaussianSumFitter.h"
 #include "TrkGaussianSumFilter/IForwardGsfFitter.h"
@@ -40,7 +41,9 @@ decription           : Implementation code for Gaussian Sum Fitter class
 #include <algorithm>
 #include <vector>
 
-Trk::GaussianSumFitter::GaussianSumFitter(const std::string& type, const std::string& name, const IInterface* parent)
+Trk::GaussianSumFitter::GaussianSumFitter(const std::string& type,
+                                          const std::string& name,
+                                          const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_reintegrateOutliers(false)
   , m_makePerigee(true)
@@ -80,43 +83,52 @@ Trk::GaussianSumFitter::initialize()
   // Request the Chrono Service
   ATH_CHECK(m_chronoSvc.retrieve());
 
-  // Request the GSF forward fitter - hardwired type and instanace name for the GSF
+  // Request the GSF forward fitter - hardwired type and instanace name for the
+  // GSF
   ATH_CHECK(m_forwardGsfFitter.retrieve());
 
   // Request the GSF smoother - hardwired type and instance name for the GSF
   ATH_CHECK(m_gsfSmoother.retrieve());
 
-  // Request the GSF measurement updator - hardwired type and instance name for the GSF
+  // Request the GSF measurement updator - hardwired type and instance name for
+  // the GSF
   ATH_CHECK(m_updator.retrieve());
 
   // Request the GSF extrapolator
   ATH_CHECK(m_extrapolator.retrieve());
 
   // Request the RIO_OnTrack creator
-  // No need to return if RioOnTrack creator tool, only if PrepRawData is used in fit
+  // No need to return if RioOnTrack creator tool, only if PrepRawData is used
+  // in fit
   if (m_rioOnTrackCreator.retrieve().isFailure()) {
 
     if (!m_refitOnMeasurementBase) {
-      ATH_MSG_FATAL("Attempting to use PrepRawData with no RIO_OnTrack creator tool provided... Exiting!");
+      ATH_MSG_FATAL("Attempting to use PrepRawData with no RIO_OnTrack creator "
+                    "tool provided... Exiting!");
       return StatusCode::FAILURE;
-    } else {
-      ATH_MSG_INFO("Request to retrieve the RIO_OnTrack Creator"
-                   << "failed but track is fit at the MeasurementBase level... Continuing!");
     }
+    ATH_MSG_INFO(
+      "Request to retrieve the RIO_OnTrack Creator"
+      << "failed but track is fit at the MeasurementBase level... Continuing!");
   }
 
   // Initialise the closest track parameters search algorithm
-  Amg::Vector3D referencePosition(m_sortingReferencePoint[0], m_sortingReferencePoint[1], m_sortingReferencePoint[2]);
+  Amg::Vector3D referencePosition(m_sortingReferencePoint[0],
+                                  m_sortingReferencePoint[1],
+                                  m_sortingReferencePoint[2]);
 
-  m_trkParametersComparisonFunction = new Trk::TrkParametersComparisonFunction(referencePosition);
+  m_trkParametersComparisonFunction =
+    new Trk::TrkParametersComparisonFunction(referencePosition);
 
   if (!m_trkParametersComparisonFunction) {
-    ATH_MSG_FATAL("Request to instansiate the ClosestTrackParametersFinder object failed... Exiting!");
+    ATH_MSG_FATAL("Request to instansiate the ClosestTrackParametersFinder "
+                  "object failed... Exiting!");
     return StatusCode::FAILURE;
   }
 
   // Configure forward fitter
-  sc = m_forwardGsfFitter->configureTools(m_extrapolator, m_updator, m_rioOnTrackCreator);
+  sc = m_forwardGsfFitter->configureTools(
+    m_extrapolator, m_updator, m_rioOnTrackCreator);
 
   if (sc.isFailure()) {
     ATH_MSG_FATAL("Could not configure the forwards GSF fitter... Exiting!");
@@ -158,12 +170,18 @@ Trk::GaussianSumFitter::finalize()
   msg(MSG::INFO) << "            Some Brief GSF Statistics          " << endmsg;
   msg(MSG::INFO) << "-----------------------------------------------" << endmsg;
 
-  msg(MSG::INFO) << "Number of Fit PrepRawData Calls:          " << m_FitPRD << endmsg;
-  msg(MSG::INFO) << "Number of Fit MeasurementBase Calls:      " << m_FitMeasurementBase << endmsg;
-  msg(MSG::INFO) << "Number of Forward Fit Failures:           " << m_ForwardFailure << endmsg;
-  msg(MSG::INFO) << "Number of Smoother Failures:              " << m_SmootherFailure << endmsg;
-  msg(MSG::INFO) << "Number of MakePerigee Failures:           " << m_PerigeeFailure << endmsg;
-  msg(MSG::INFO) << "Number of Trks that fail fitquality test: " << m_fitQualityFailure << endmsg;
+  msg(MSG::INFO) << "Number of Fit PrepRawData Calls:          " << m_FitPRD
+                 << endmsg;
+  msg(MSG::INFO) << "Number of Fit MeasurementBase Calls:      "
+                 << m_FitMeasurementBase << endmsg;
+  msg(MSG::INFO) << "Number of Forward Fit Failures:           "
+                 << m_ForwardFailure << endmsg;
+  msg(MSG::INFO) << "Number of Smoother Failures:              "
+                 << m_SmootherFailure << endmsg;
+  msg(MSG::INFO) << "Number of MakePerigee Failures:           "
+                 << m_PerigeeFailure << endmsg;
+  msg(MSG::INFO) << "Number of Trks that fail fitquality test: "
+                 << m_fitQualityFailure << endmsg;
   msg(MSG::INFO) << "-----------------------------------------------" << endmsg;
 
   msg(MSG::INFO) << "Finalisation of " << name() << " was successful" << endmsg;
@@ -177,35 +195,44 @@ Trk::GaussianSumFitter::finalize()
 */
 
 Trk::Track*
-Trk::GaussianSumFitter::fit(const Trk::Track& inputTrack,
-                            const Trk::RunOutlierRemoval outlierRemoval,
-                            const Trk::ParticleHypothesis particleHypothesis) const
+Trk::GaussianSumFitter::fit(
+  const Trk::Track& inputTrack,
+  const Trk::RunOutlierRemoval outlierRemoval,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
 
-  if (msgLvl(MSG::VERBOSE))
+  if (msgLvl(MSG::VERBOSE)) {
     msg() << "Trk::GaussianSumFilter::fit() - Refitting a track" << endmsg;
+  }
 
   // Start the timer
   Chrono chrono(&(*m_chronoSvc), name());
 
   // Check that the input track has well defined parameters
   if (inputTrack.trackParameters()->empty()) {
-    msg(MSG::FATAL) << "No estimation of track parameters near origin... Exiting!" << endmsg;
+    msg(MSG::FATAL)
+      << "No estimation of track parameters near origin... Exiting!" << endmsg;
     return nullptr;
   }
 
   // Check that the input track has associated MeasurementBase objects
   if (inputTrack.trackStateOnSurfaces()->empty()) {
-    msg(MSG::FATAL) << "Attempting to fit track to empty MeasurementBase collection... Exiting!" << endmsg;
+    msg(MSG::FATAL) << "Attempting to fit track to empty MeasurementBase "
+                       "collection... Exiting!"
+                    << endmsg;
     return nullptr;
   }
 
   // Retrieve the set of track parameters closest to the reference point
-  const Trk::TrackParameters* parametersNearestReference = *(std::min_element(
-    inputTrack.trackParameters()->begin(), inputTrack.trackParameters()->end(), *m_trkParametersComparisonFunction));
+  const Trk::TrackParameters* parametersNearestReference =
+    *(std::min_element(inputTrack.trackParameters()->begin(),
+                       inputTrack.trackParameters()->end(),
+                       *m_trkParametersComparisonFunction));
 
-  if (msgLvl(MSG::VERBOSE))
-    msg() << "Estimation parameters near reference point: " << *parametersNearestReference << endmsg;
+  if (msgLvl(MSG::VERBOSE)) {
+    msg() << "Estimation parameters near reference point: "
+          << *parametersNearestReference << endmsg;
+  }
 
   // If refitting of track is at the MeasurementBase level
   // extract the MeasurementBase from the input track and create a new vector
@@ -213,70 +240,82 @@ Trk::GaussianSumFitter::fit(const Trk::Track& inputTrack,
 
     MeasurementSet measurementSet;
 
-    DataVector<const Trk::TrackStateOnSurface>::const_iterator trackStateOnSurface =
-      inputTrack.trackStateOnSurfaces()->begin();
-    for (; trackStateOnSurface != inputTrack.trackStateOnSurfaces()->end(); ++trackStateOnSurface) {
+    DataVector<const Trk::TrackStateOnSurface>::const_iterator
+      trackStateOnSurface = inputTrack.trackStateOnSurfaces()->begin();
+    for (; trackStateOnSurface != inputTrack.trackStateOnSurfaces()->end();
+         ++trackStateOnSurface) {
 
       if (!(*trackStateOnSurface)) {
-        ATH_MSG_WARNING("This track contains an empty MeasurementBase object that won't be included in the fit");
+        ATH_MSG_WARNING("This track contains an empty MeasurementBase object "
+                        "that won't be included in the fit");
         continue;
       }
 
       if ((*trackStateOnSurface)->measurementOnTrack()) {
         if ((*trackStateOnSurface)->type(TrackStateOnSurface::Measurement)) {
-          measurementSet.push_back((*trackStateOnSurface)->measurementOnTrack());
-        } else if (m_reintegrateOutliers && (*trackStateOnSurface)->type(TrackStateOnSurface::Outlier)) {
-          measurementSet.push_back((*trackStateOnSurface)->measurementOnTrack());
+          measurementSet.push_back(
+            (*trackStateOnSurface)->measurementOnTrack());
+        } else if (m_reintegrateOutliers &&
+                   (*trackStateOnSurface)->type(TrackStateOnSurface::Outlier)) {
+          measurementSet.push_back(
+            (*trackStateOnSurface)->measurementOnTrack());
         }
       }
     }
 
     // Apply GSF fit to MeasurementBase objects
-    return fit(measurementSet, *parametersNearestReference, outlierRemoval, particleHypothesis);
-
+    return fit(measurementSet,
+               *parametersNearestReference,
+               outlierRemoval,
+               particleHypothesis);
   }
 
-  // If refitting of the track is at the PrepRawData level then extract the PrepRawData objects from
-  // the input track
-  else {
-
-    PrepRawDataSet prepRawDataSet;
+  // If refitting of the track is at the PrepRawData level then extract the
+  // PrepRawData objects from the input track
 
-    DataVector<const Trk::MeasurementBase>::const_iterator measurementOnTrack =
-      inputTrack.measurementsOnTrack()->begin();
+  PrepRawDataSet prepRawDataSet;
 
-    for (; measurementOnTrack != inputTrack.measurementsOnTrack()->end(); ++measurementOnTrack) {
+  DataVector<const Trk::MeasurementBase>::const_iterator measurementOnTrack =
+    inputTrack.measurementsOnTrack()->begin();
 
-      if (!(*measurementOnTrack)) {
-        ATH_MSG_DEBUG("This track contains an empty MeasurementBase object... Ignoring object");
-        continue;
-      }
+  for (; measurementOnTrack != inputTrack.measurementsOnTrack()->end();
+       ++measurementOnTrack) {
 
-      // Dynamic cast to a RIO_OnTrack object
-      const Trk::RIO_OnTrack* rioOnTrack = nullptr;
-      if ((*measurementOnTrack)->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
-        rioOnTrack = static_cast<const Trk::RIO_OnTrack*>(*measurementOnTrack);
-      }
+    if (!(*measurementOnTrack)) {
+      ATH_MSG_DEBUG("This track contains an empty MeasurementBase object... "
+                    "Ignoring object");
+      continue;
+    }
 
-      if (!rioOnTrack) {
-        ATH_MSG_DEBUG("Measurement could not be cast as a RIO_OnTrack object... continuing");
-        continue;
-      }
+    // Dynamic cast to a RIO_OnTrack object
+    const Trk::RIO_OnTrack* rioOnTrack = nullptr;
+    if ((*measurementOnTrack)->type(Trk::MeasurementBaseType::RIO_OnTrack)) {
+      rioOnTrack = static_cast<const Trk::RIO_OnTrack*>(*measurementOnTrack);
+    }
 
-      const PrepRawData* prepRawData = rioOnTrack->prepRawData();
+    if (!rioOnTrack) {
+      ATH_MSG_DEBUG(
+        "Measurement could not be cast as a RIO_OnTrack object... continuing");
+      continue;
+    }
 
-      if (!prepRawData) {
-        ATH_MSG_DEBUG("Defined RIO_OnTrack object has no associated PrepRawData object..."
-                      << "this object will be ignored in fit");
-        continue;
-      }
+    const PrepRawData* prepRawData = rioOnTrack->prepRawData();
 
-      prepRawDataSet.push_back(prepRawData);
+    if (!prepRawData) {
+      ATH_MSG_DEBUG(
+        "Defined RIO_OnTrack object has no associated PrepRawData object..."
+        << "this object will be ignored in fit");
+      continue;
     }
 
-    // Apply GSF fit to PrepRawData objects
-    return fit(prepRawDataSet, *parametersNearestReference, outlierRemoval, particleHypothesis);
+    prepRawDataSet.push_back(prepRawData);
   }
+
+  // Apply GSF fit to PrepRawData objects
+  return fit(prepRawDataSet,
+             *parametersNearestReference,
+             outlierRemoval,
+             particleHypothesis);
 }
 
 /* ==================================================================================================================
@@ -285,16 +324,18 @@ Trk::GaussianSumFitter::fit(const Trk::Track& inputTrack,
 */
 
 Trk::Track*
-Trk::GaussianSumFitter::fit(const Trk::PrepRawDataSet& prepRawDataSet,
-                            const Trk::TrackParameters& estimatedParametersNearOrigin,
-                            const Trk::RunOutlierRemoval outlierRemoval,
-                            const Trk::ParticleHypothesis particleHypothesis) const
+Trk::GaussianSumFitter::fit(
+  const Trk::PrepRawDataSet& prepRawDataSet,
+  const Trk::TrackParameters& estimatedParametersNearOrigin,
+  const Trk::RunOutlierRemoval outlierRemoval,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
 
-  ATH_MSG_VERBOSE("Trk::GaussianSumFilter::fit() - Fitting a set of PrepRawData objects"
-                  << '\n'
-                  << "Material effects switch: " << particleHypothesis << '\n'
-                  << "Outlier removal switch:  " << outlierRemoval);
+  ATH_MSG_VERBOSE(
+    "Trk::GaussianSumFilter::fit() - Fitting a set of PrepRawData objects"
+    << '\n'
+    << "Material effects switch: " << particleHypothesis << '\n'
+    << "Outlier removal switch:  " << outlierRemoval);
 
   ++m_FitPRD;
 
@@ -307,20 +348,28 @@ Trk::GaussianSumFitter::fit(const Trk::PrepRawDataSet& prepRawDataSet,
     return nullptr;
   }
 
-  // A const stl container cannot be sorted. This will re-cast it so that it can.
+  // A const stl container cannot be sorted. This will re-cast it so that it
+  // can.
   Trk::PrepRawDataSet sortedPrepRawDataSet = PrepRawDataSet(prepRawDataSet);
 
   if (m_doHitSorting) {
-    Trk::PrepRawDataComparisonFunction* prdComparisonFunction = new Trk::PrepRawDataComparisonFunction(
-      estimatedParametersNearOrigin.position(), estimatedParametersNearOrigin.momentum());
-    std::sort(sortedPrepRawDataSet.begin(), sortedPrepRawDataSet.end(), *prdComparisonFunction);
+    Trk::PrepRawDataComparisonFunction* prdComparisonFunction =
+      new Trk::PrepRawDataComparisonFunction(
+        estimatedParametersNearOrigin.position(),
+        estimatedParametersNearOrigin.momentum());
+    std::sort(sortedPrepRawDataSet.begin(),
+              sortedPrepRawDataSet.end(),
+              *prdComparisonFunction);
 
     delete prdComparisonFunction;
   }
 
   // Perform GSF forwards fit
   ForwardTrajectory* forwardTrajectory =
-    m_forwardGsfFitter->fitPRD(sortedPrepRawDataSet, estimatedParametersNearOrigin, particleHypothesis).release();
+    m_forwardGsfFitter
+      ->fitPRD(
+        sortedPrepRawDataSet, estimatedParametersNearOrigin, particleHypothesis)
+      .release();
 
   if (!forwardTrajectory) {
     ATH_MSG_DEBUG("Forward GSF fit failed... Exiting!");
@@ -338,7 +387,8 @@ Trk::GaussianSumFitter::fit(const Trk::PrepRawDataSet& prepRawDataSet,
   ATH_MSG_VERBOSE("*** Forward GSF fit passed! ***");
 
   // Perform GSF smoother operation
-  SmoothedTrajectory* smoothedTrajectory = m_gsfSmoother->fit(*forwardTrajectory, particleHypothesis);
+  SmoothedTrajectory* smoothedTrajectory =
+    m_gsfSmoother->fit(*forwardTrajectory, particleHypothesis);
 
   // Protect against failed smoother fit
   if (!smoothedTrajectory) {
@@ -364,16 +414,18 @@ Trk::GaussianSumFitter::fit(const Trk::PrepRawDataSet& prepRawDataSet,
   Track* fittedTrack = nullptr;
 
   if (outlierRemoval) {
-    ATH_MSG_DEBUG("Outlier removal not yet implemented for the Gaussian Sum Filter");
+    ATH_MSG_DEBUG(
+      "Outlier removal not yet implemented for the Gaussian Sum Filter");
   }
 
   if (m_makePerigee) {
     const Trk::MultiComponentStateOnSurface* perigeeMultiStateOnSurface =
       this->makePerigee(smoothedTrajectory, particleHypothesis);
-    ATH_MSG_DEBUG("perigeeMultiStateOnSurface  :" << perigeeMultiStateOnSurface);
-    if (perigeeMultiStateOnSurface)
+    ATH_MSG_DEBUG(
+      "perigeeMultiStateOnSurface  :" << perigeeMultiStateOnSurface);
+    if (perigeeMultiStateOnSurface) {
       smoothedTrajectory->push_back(perigeeMultiStateOnSurface);
-    else {
+    } else {
       ATH_MSG_DEBUG("Perigee asked to be created but failed.....Exiting");
       ++m_PerigeeFailure;
       delete smoothedTrajectory;
@@ -397,8 +449,10 @@ Trk::GaussianSumFitter::fit(const Trk::PrepRawDataSet& prepRawDataSet,
   if (fittedTrack) {
     ATH_MSG_VERBOSE("Fitting of a set of PrepRawData objects is successful"
                     << '\n'
-                    << "Track fit chi squared... " << fitQuality->chiSquared() << '\n'
-                    << "Track fit number of degrees of freedom... " << fitQuality->numberDoF());
+                    << "Track fit chi squared... " << fitQuality->chiSquared()
+                    << '\n'
+                    << "Track fit number of degrees of freedom... "
+                    << fitQuality->numberDoF());
   } else {
     ATH_MSG_DEBUG("Trk::GaussianSumFilter::fit() failed!");
   }
@@ -407,23 +461,26 @@ Trk::GaussianSumFitter::fit(const Trk::PrepRawDataSet& prepRawDataSet,
 
 /* ================================================================================================
    Fitting of a set of MeasurementBase objects
-============== ====================================================================================
+==============
+====================================================================================
 */
 
 Trk::Track*
-Trk::GaussianSumFitter::fit(const Trk::MeasurementSet& measurementSet,
-                            const Trk::TrackParameters& estimatedParametersNearOrigin,
-                            const Trk::RunOutlierRemoval outlierRemoval,
-                            const Trk::ParticleHypothesis particleHypothesis) const
+Trk::GaussianSumFitter::fit(
+  const Trk::MeasurementSet& measurementSet,
+  const Trk::TrackParameters& estimatedParametersNearOrigin,
+  const Trk::RunOutlierRemoval outlierRemoval,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
 
   // Start the timer
   Chrono chrono(&(*m_chronoSvc), name());
 
-  ATH_MSG_VERBOSE("Trk::GaussianSumFilter::fit() - Fitting a set of MeasurementBase objects"
-                  << '\n'
-                  << "Material effects switch: " << particleHypothesis << '\n'
-                  << "Outlier removal switch:  " << outlierRemoval);
+  ATH_MSG_VERBOSE(
+    "Trk::GaussianSumFilter::fit() - Fitting a set of MeasurementBase objects"
+    << '\n'
+    << "Material effects switch: " << particleHypothesis << '\n'
+    << "Outlier removal switch:  " << outlierRemoval);
 
   ++m_FitMeasurementBase;
   // Protect against empty PrepRawDataSet object
@@ -440,7 +497,8 @@ Trk::GaussianSumFitter::fit(const Trk::MeasurementSet& measurementSet,
   MeasurementSet::const_iterator itSetEnd = measurementSet.end();
   for (; itSet != itSetEnd; ++itSet) {
     if (!(*itSet)) {
-      ATH_MSG_WARNING("There is an empty MeasurementBase object in the track! Skip this object..");
+      ATH_MSG_WARNING("There is an empty MeasurementBase object in the track! "
+                      "Skip this object..");
     } else {
       ccot = nullptr;
       if ((*itSet)->type(Trk::MeasurementBaseType::CaloCluster_OnTrack)) {
@@ -449,23 +507,31 @@ Trk::GaussianSumFitter::fit(const Trk::MeasurementSet& measurementSet,
       if (!ccot) {
         cleanedMeasurementSet.push_back(*itSet);
       } else {
-        ATH_MSG_DEBUG("The  MeasurementBase object is a Trk::CaloCluster_OnTrack");
+        ATH_MSG_DEBUG(
+          "The  MeasurementBase object is a Trk::CaloCluster_OnTrack");
       }
     }
   }
 
-  // A const stl container cannot be sorted. This will re-cast it so that it can.
-  Trk::MeasurementSet sortedMeasurementSet = MeasurementSet(cleanedMeasurementSet);
+  // A const stl container cannot be sorted. This will re-cast it so that it
+  // can.
+  Trk::MeasurementSet sortedMeasurementSet =
+    MeasurementSet(cleanedMeasurementSet);
 
   if (m_doHitSorting) {
 
-    Trk::MeasurementBaseComparisonFunction measurementBaseComparisonFunction(estimatedParametersNearOrigin.position(),
-                                                                             estimatedParametersNearOrigin.momentum());
-    sort(sortedMeasurementSet.begin(), sortedMeasurementSet.end(), measurementBaseComparisonFunction);
+    Trk::MeasurementBaseComparisonFunction measurementBaseComparisonFunction(
+      estimatedParametersNearOrigin.position(),
+      estimatedParametersNearOrigin.momentum());
+    sort(sortedMeasurementSet.begin(),
+         sortedMeasurementSet.end(),
+         measurementBaseComparisonFunction);
   }
   // Perform GSF forwards fit - new memory allocated in forwards fitter
   ForwardTrajectory* forwardTrajectory =
-    m_forwardGsfFitter->fitMeasurements(sortedMeasurementSet, estimatedParametersNearOrigin, particleHypothesis)
+    m_forwardGsfFitter
+      ->fitMeasurements(
+        sortedMeasurementSet, estimatedParametersNearOrigin, particleHypothesis)
       .release();
 
   if (!forwardTrajectory) {
@@ -484,7 +550,8 @@ Trk::GaussianSumFitter::fit(const Trk::MeasurementSet& measurementSet,
   ATH_MSG_VERBOSE("*** Forward GSF fit passed! ***");
 
   // Perform GSF smoother operation
-  SmoothedTrajectory* smoothedTrajectory = m_gsfSmoother->fit(*forwardTrajectory, particleHypothesis, ccot);
+  SmoothedTrajectory* smoothedTrajectory =
+    m_gsfSmoother->fit(*forwardTrajectory, particleHypothesis, ccot);
 
   // Protect against failed smoother fit
   if (!smoothedTrajectory) {
@@ -507,16 +574,18 @@ Trk::GaussianSumFitter::fit(const Trk::MeasurementSet& measurementSet,
   }
 
   if (outlierRemoval) {
-    ATH_MSG_DEBUG("Outlier removal not yet implemented for the Gaussian Sum Filter");
+    ATH_MSG_DEBUG(
+      "Outlier removal not yet implemented for the Gaussian Sum Filter");
   }
   if (m_makePerigee) {
     const Trk::MultiComponentStateOnSurface* perigeeMultiStateOnSurface =
       this->makePerigee(smoothedTrajectory, particleHypothesis);
-    ATH_MSG_DEBUG("perigeeMultiStateOnSurface  :" << perigeeMultiStateOnSurface);
+    ATH_MSG_DEBUG(
+      "perigeeMultiStateOnSurface  :" << perigeeMultiStateOnSurface);
 
-    if (perigeeMultiStateOnSurface)
+    if (perigeeMultiStateOnSurface) {
       smoothedTrajectory->push_back(perigeeMultiStateOnSurface);
-    else {
+    } else {
       ATH_MSG_DEBUG("Perigee asked to be created but failed.....Exiting");
       ++m_PerigeeFailure;
       delete fitQuality;
@@ -541,8 +610,10 @@ Trk::GaussianSumFitter::fit(const Trk::MeasurementSet& measurementSet,
   if (fittedTrack) {
     ATH_MSG_DEBUG("Fitting of a set of MeasurementBase objects is successful"
                   << '\n'
-                  << "Track fit chi squared... " << fitQuality->chiSquared() << '\n'
-                  << "Track fit number of degrees of freedom... " << fitQuality->numberDoF());
+                  << "Track fit chi squared... " << fitQuality->chiSquared()
+                  << '\n'
+                  << "Track fit number of degrees of freedom... "
+                  << fitQuality->numberDoF());
   } else {
     ATH_MSG_DEBUG("Trk::GaussianSumFilter::fit() failed!");
   }
@@ -558,32 +629,38 @@ Trk::GaussianSumFitter::fit(const Track& intrk,
 
   ATH_MSG_VERBOSE("--> enter GaussianSumFitter::fit(Track,PrdSet,,)"
                   << '\n'
-                  << "    with Track from author = " << intrk.info().dumpInfo());
+                  << "    with Track from author = "
+                  << intrk.info().dumpInfo());
 
   // protection, if empty PrepRawDataSet
   if (addPrdColl.empty()) {
-    ATH_MSG_WARNING("client tries to add an empty PrepRawDataSet to the track fit.");
+    ATH_MSG_WARNING(
+      "client tries to add an empty PrepRawDataSet to the track fit.");
     return fit(intrk, runOutlier, matEffects);
   }
 
   /*  determine the Track Parameter which is the start of the trajectory,
       i.e. closest to the reference point */
-  ATH_MSG_DEBUG("get track parameters near origin " << (m_doHitSorting ? "via STL sort" : "from 1st state"));
+  ATH_MSG_DEBUG("get track parameters near origin "
+                << (m_doHitSorting ? "via STL sort" : "from 1st state"));
 
   const TrackParameters* estimatedStartParameters =
-    m_doHitSorting
-      ? *(std::min_element(
-          intrk.trackParameters()->begin(), intrk.trackParameters()->end(), *m_trkParametersComparisonFunction))
-      : *intrk.trackParameters()->begin();
+    m_doHitSorting ? *(std::min_element(intrk.trackParameters()->begin(),
+                                        intrk.trackParameters()->end(),
+                                        *m_trkParametersComparisonFunction))
+                   : *intrk.trackParameters()->begin();
 
   // use external preparator class to prepare PRD set for fitter interface
 
-  Amg::Vector3D referencePosition(m_sortingReferencePoint[0], m_sortingReferencePoint[1], m_sortingReferencePoint[2]);
+  Amg::Vector3D referencePosition(m_sortingReferencePoint[0],
+                                  m_sortingReferencePoint[1],
+                                  m_sortingReferencePoint[2]);
 
-  TrackFitInputPreparator* inputPreparator = new TrackFitInputPreparator(referencePosition);
+  TrackFitInputPreparator* inputPreparator =
+    new TrackFitInputPreparator(referencePosition);
 
-  PrepRawDataSet orderedPRDColl =
-    inputPreparator->stripPrepRawData(intrk, addPrdColl, m_doHitSorting, true /* do not lose outliers! */);
+  PrepRawDataSet orderedPRDColl = inputPreparator->stripPrepRawData(
+    intrk, addPrdColl, m_doHitSorting, true /* do not lose outliers! */);
 
   delete inputPreparator;
 
@@ -597,11 +674,13 @@ Trk::GaussianSumFitter::fit(const Track& inputTrack,
                             const ParticleHypothesis matEffects) const
 {
 
-  ATH_MSG_VERBOSE("Trk::GaussianSumFilter::fit() - Refitting a track with a additional information ");
+  ATH_MSG_VERBOSE("Trk::GaussianSumFilter::fit() - Refitting a track with a "
+                  "additional information ");
 
   // protection, if empty MeasurementSet
   if (measurementSet.empty()) {
-    ATH_MSG_WARNING("Client tries to add an empty MeasurementSet to the track fit.");
+    ATH_MSG_WARNING(
+      "Client tries to add an empty MeasurementSet to the track fit.");
     return fit(inputTrack, runOutlier, matEffects);
   }
 
@@ -613,15 +692,19 @@ Trk::GaussianSumFitter::fit(const Track& inputTrack,
 
   // Check that the input track has associated MeasurementBase objects
   if (inputTrack.trackStateOnSurfaces()->empty()) {
-    ATH_MSG_FATAL("Attempting to fit track to empty MeasurementBase collection... Exiting!");
+    ATH_MSG_FATAL("Attempting to fit track to empty MeasurementBase "
+                  "collection... Exiting!");
     return nullptr;
   }
 
   // Retrieve the set of track parameters closest to the reference point
-  const Trk::TrackParameters* parametersNearestReference = *(std::min_element(
-    inputTrack.trackParameters()->begin(), inputTrack.trackParameters()->end(), *m_trkParametersComparisonFunction));
+  const Trk::TrackParameters* parametersNearestReference =
+    *(std::min_element(inputTrack.trackParameters()->begin(),
+                       inputTrack.trackParameters()->end(),
+                       *m_trkParametersComparisonFunction));
 
-  MeasurementSet combinedMS = m_inputPreparator->stripMeasurements(inputTrack, measurementSet, true, false);
+  MeasurementSet combinedMS = m_inputPreparator->stripMeasurements(
+    inputTrack, measurementSet, true, false);
 
   // Apply GSF fit to MeasurementBase objects
   return fit(combinedMS, *parametersNearestReference, runOutlier, matEffects);
@@ -635,21 +718,30 @@ Trk::GaussianSumFitter::fit(const Track& intrk1,
 {
   // Not a great implementation but simple...  Just add the hits on track
   // protection against not having measurements on the input tracks
-  if (!intrk1.trackStateOnSurfaces() || !intrk2.trackStateOnSurfaces() || intrk1.trackStateOnSurfaces()->size() < 2) {
-    msg(MSG::WARNING) << "called to refit empty track or track with too little information, reject fit" << endmsg;
+  if (!intrk1.trackStateOnSurfaces() || !intrk2.trackStateOnSurfaces() ||
+      intrk1.trackStateOnSurfaces()->size() < 2) {
+    msg(MSG::WARNING) << "called to refit empty track or track with too little "
+                         "information, reject fit"
+                      << endmsg;
     return nullptr;
   }
 
   if (!intrk1.trackParameters() || intrk1.trackParameters()->empty()) {
-    msg(MSG::WARNING) << "input #1 fails to provide track parameters for seeding the GXF, reject fit" << endmsg;
+    msg(MSG::WARNING) << "input #1 fails to provide track parameters for "
+                         "seeding the GXF, reject fit"
+                      << endmsg;
     return nullptr;
   }
 
   const TrackParameters* minPar = *intrk1.trackParameters()->begin();
-  DataVector<const TrackStateOnSurface>::const_iterator itStates = intrk1.trackStateOnSurfaces()->begin();
-  DataVector<const TrackStateOnSurface>::const_iterator endState = intrk1.trackStateOnSurfaces()->end();
-  DataVector<const TrackStateOnSurface>::const_iterator itStates2 = intrk2.trackStateOnSurfaces()->begin();
-  DataVector<const TrackStateOnSurface>::const_iterator endState2 = intrk2.trackStateOnSurfaces()->end();
+  DataVector<const TrackStateOnSurface>::const_iterator itStates =
+    intrk1.trackStateOnSurfaces()->begin();
+  DataVector<const TrackStateOnSurface>::const_iterator endState =
+    intrk1.trackStateOnSurfaces()->end();
+  DataVector<const TrackStateOnSurface>::const_iterator itStates2 =
+    intrk2.trackStateOnSurfaces()->begin();
+  DataVector<const TrackStateOnSurface>::const_iterator endState2 =
+    intrk2.trackStateOnSurfaces()->end();
 
   Trk::MeasurementSet ms;
 
@@ -659,7 +751,8 @@ Trk::GaussianSumFitter::fit(const Track& intrk1,
       continue;
     }
 
-    if ((*itStates)->measurementOnTrack()->type(Trk::MeasurementBaseType::PseudoMeasurementOnTrack)) {
+    if ((*itStates)->measurementOnTrack()->type(
+          Trk::MeasurementBaseType::PseudoMeasurementOnTrack)) {
       continue;
     }
 
@@ -673,7 +766,9 @@ Trk::GaussianSumFitter::fit(const Track& intrk1,
       continue;
     }
 
-    if ((*itStates2)->measurementOnTrack()->type(Trk::MeasurementBaseType::PseudoMeasurementOnTrack)) {
+    if ((*itStates2)
+          ->measurementOnTrack()
+          ->type(Trk::MeasurementBaseType::PseudoMeasurementOnTrack)) {
       continue;
     }
 
@@ -684,29 +779,40 @@ Trk::GaussianSumFitter::fit(const Track& intrk1,
 }
 
 const Trk::MultiComponentStateOnSurface*
-Trk::GaussianSumFitter::makePerigee(const Trk::SmoothedTrajectory* smoothedTrajectory,
-                                    const Trk::ParticleHypothesis particleHypothesis) const
+Trk::GaussianSumFitter::makePerigee(
+  const Trk::SmoothedTrajectory* smoothedTrajectory,
+  const Trk::ParticleHypothesis particleHypothesis) const
 {
 
   // Propagate track to perigee
   const Trk::PerigeeSurface perigeeSurface;
-  const Trk::TrackStateOnSurface* stateOnSurfaceNearestOrigin = smoothedTrajectory->back();
-  const Trk::MultiComponentStateOnSurface* multiComponentStateOnSurfaceNearestOrigin =
-    dynamic_cast<const Trk::MultiComponentStateOnSurface*>(stateOnSurfaceNearestOrigin);
+  const Trk::TrackStateOnSurface* stateOnSurfaceNearestOrigin =
+    smoothedTrajectory->back();
+  const Trk::MultiComponentStateOnSurface*
+    multiComponentStateOnSurfaceNearestOrigin =
+      dynamic_cast<const Trk::MultiComponentStateOnSurface*>(
+        stateOnSurfaceNearestOrigin);
 
   const Trk::MultiComponentState* multiComponentState = nullptr;
   if (!multiComponentStateOnSurfaceNearestOrigin) {
     // we need to make a dummy multicomponent surface
-    Trk::ComponentParameters dummyComponent(stateOnSurfaceNearestOrigin->trackParameters()->clone(), 1.);
+    Trk::ComponentParameters dummyComponent(
+      stateOnSurfaceNearestOrigin->trackParameters()->clone(), 1.);
     auto tmp_multiComponentState = std::make_unique<Trk::MultiComponentState>();
     tmp_multiComponentState->push_back(std::move(dummyComponent));
     multiComponentState = tmp_multiComponentState.release();
   } else {
-    multiComponentState = multiComponentStateOnSurfaceNearestOrigin->components();
+    multiComponentState =
+      multiComponentStateOnSurfaceNearestOrigin->components();
   }
   // Extrapolate to perigee, taking material effects considerations into account
   Trk::MultiComponentState stateExtrapolatedToPerigee =
-    m_extrapolator->extrapolate(*multiComponentState, perigeeSurface, m_directionToPerigee, false, particleHypothesis);
+    m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
+                                *multiComponentState,
+                                perigeeSurface,
+                                m_directionToPerigee,
+                                false,
+                                particleHypothesis);
 
   if (stateExtrapolatedToPerigee.empty()) {
     ATH_MSG_DEBUG("Track could not be extrapolated to perigee... returning 0");
@@ -723,38 +829,45 @@ Trk::GaussianSumFitter::makePerigee(const Trk::SmoothedTrajectory* smoothedTraje
   double modeQoverP = 0;
 
   if (modeQoverP) {
-    ATH_MSG_VERBOSE("Calculated mode is stored by default in the Perigee Parameters"
-                    << "and is NO Longer Stored as a seperate Parameter");
+    ATH_MSG_VERBOSE(
+      "Calculated mode is stored by default in the Perigee Parameters"
+      << "and is NO Longer Stored as a seperate Parameter");
   }
-  // Determine the combined state as well to be passed to the MultiComponentStateOnSurface object
+  // Determine the combined state as well to be passed to the
+  // MultiComponentStateOnSurface object
   std::unique_ptr<Trk::TrackParameters> combinedPerigee =
     MultiComponentStateCombiner::combine(stateExtrapolatedToPerigee, true);
 
   // Perigee is given as an additional MultiComponentStateOnSurface
-  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> pattern(0);
+  std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes>
+    pattern(0);
   pattern.set(Trk::TrackStateOnSurface::Perigee);
 
   if (fabs(combinedPerigee->parameters()[Trk::qOverP]) > 1e8) {
-    // GC: protection against 0-momentum track .. this check should NEVER be needed.
+    // GC: protection against 0-momentum track .. this check should NEVER be
+    // needed.
     //    actual cutoff is 0.01eV track
-    ATH_MSG_ERROR("makePerigee() about to return with 0 momentum!! Returning null instead");
+    ATH_MSG_ERROR(
+      "makePerigee() about to return with 0 momentum!! Returning null instead");
     return nullptr;
   }
 
   const Trk::MultiComponentStateOnSurface* perigeeMultiStateOnSurface =
-    new MultiComponentStateOnSurface(nullptr,
-                                     combinedPerigee.release(),
-                                     MultiComponentStateHelpers::clone(stateExtrapolatedToPerigee).release(),
-                                     nullptr,
-                                     nullptr,
-                                     pattern,
-                                     modeQoverP);
+    new MultiComponentStateOnSurface(
+      nullptr,
+      combinedPerigee.release(),
+      MultiComponentStateHelpers::clone(stateExtrapolatedToPerigee).release(),
+      nullptr,
+      nullptr,
+      pattern,
+      modeQoverP);
   ATH_MSG_DEBUG("makePerigee() returning sucessfully!");
   return perigeeMultiStateOnSurface;
 }
 
 const Trk::FitQuality*
-Trk::GaussianSumFitter::buildFitQuality(const Trk::SmoothedTrajectory& smoothedTrajectory) const
+Trk::GaussianSumFitter::buildFitQuality(
+  const Trk::SmoothedTrajectory& smoothedTrajectory) const
 {
 
   ATH_MSG_VERBOSE("Gsf fitQuality");
@@ -762,21 +875,25 @@ Trk::GaussianSumFitter::buildFitQuality(const Trk::SmoothedTrajectory& smoothedT
   int numberDoF = -5;
 
   // Loop over all TrackStateOnSurface objects in trajectory
-  SmoothedTrajectory::const_iterator stateOnSurface = smoothedTrajectory.begin();
+  SmoothedTrajectory::const_iterator stateOnSurface =
+    smoothedTrajectory.begin();
 
   for (; stateOnSurface != smoothedTrajectory.end(); ++stateOnSurface) {
 
-    if (!(*stateOnSurface)->type(TrackStateOnSurface::Measurement))
+    if (!(*stateOnSurface)->type(TrackStateOnSurface::Measurement)) {
       continue;
-    if ((*stateOnSurface)->fitQualityOnSurface() == nullptr)
+    }
+    if ((*stateOnSurface)->fitQualityOnSurface() == nullptr) {
       continue;
+    }
 
     chiSquared += (*stateOnSurface)->fitQualityOnSurface()->chiSquared();
     numberDoF += (*stateOnSurface)->fitQualityOnSurface()->numberDoF();
   }
 
-  if (std::isnan(chiSquared) || chiSquared <= 0.)
+  if (std::isnan(chiSquared) || chiSquared <= 0.) {
     return nullptr;
+  }
 
   const FitQuality* fitQuality = new FitQuality(chiSquared, numberDoF);
 
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
index 65cbd6386a1f0709c5d74f2c23e625c2156b5485..4770fb6d931e22d683ae6a957ae777eaa17badef 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfBetheHeitlerEffects.cxx
@@ -8,8 +8,8 @@
 begin                : Sunday 20th February 2005
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
-decription           : Implementation code for the Bethe-Heitler material effects
-                       in the GSF package
+decription           : Implementation code for the Bethe-Heitler material
+effects in the GSF package
 *********************************************************************************/
 
 #include "TrkGaussianSumFilter/GsfBetheHeitlerEffects.h"
@@ -44,9 +44,12 @@ Trk::GsfBetheHeitlerEffects::GsfBetheHeitlerEffects(const std::string& type,
 {
 
   declareInterface<IMultiStateMaterialEffects>(this);
-  declareProperty("BetheHeitlerParameterisationFileName", m_parameterisationFileName);
-  declareProperty("BetheHeitlerParameterisationFileNameHighX0", m_parameterisationFileNameHighX0);
-  declareProperty("BetheHeitlerParameterisationCorrectionFlag", m_correctionFlag);
+  declareProperty("BetheHeitlerParameterisationFileName",
+                  m_parameterisationFileName);
+  declareProperty("BetheHeitlerParameterisationFileNameHighX0",
+                  m_parameterisationFileNameHighX0);
+  declareProperty("BetheHeitlerParameterisationCorrectionFlag",
+                  m_correctionFlag);
   declareProperty("SingleGaussianRange", m_singleGaussianRange = 0.0001);
   declareProperty("LowerRange", m_lowerRange = 0.002);
   declareProperty("XoverRange", m_xOverRange = 0.10);
@@ -59,14 +62,15 @@ StatusCode
 Trk::GsfBetheHeitlerEffects::initialize()
 {
 
-  if (m_correctionFlag == 1)
+  if (m_correctionFlag == 1) {
     ATH_MSG_INFO("1st moment of mixture will be corrected");
-  else if (m_correctionFlag == 2)
+  } else if (m_correctionFlag == 2) {
     ATH_MSG_INFO("1st and 2nd moment of mixture will be corrected");
-  else if (m_correctionFlag == 0)
+  } else if (m_correctionFlag == 0) {
     ATH_MSG_INFO("Moments of mixture will not be corrected");
-  else {
-    ATH_MSG_INFO("Inappropriate setting for Bethe-Heitler mixture correction! ...Exiting!");
+  } else {
+    ATH_MSG_INFO("Inappropriate setting for Bethe-Heitler mixture correction! "
+                 "...Exiting!");
     return StatusCode::FAILURE;
   }
 
@@ -74,13 +78,10 @@ Trk::GsfBetheHeitlerEffects::initialize()
     ATH_MSG_INFO("Parameters successfully imported from file");
     ATH_MSG_INFO("Initialisation of " << name() << " was successful");
     return StatusCode::SUCCESS;
-
   }
 
-  else {
-    ATH_MSG_ERROR("Parameters could NOT be successfully imported from file");
-    return StatusCode::FAILURE;
-  }
+  ATH_MSG_ERROR("Parameters could NOT be successfully imported from file");
+  return StatusCode::FAILURE;
 }
 
 StatusCode
@@ -94,10 +95,11 @@ Trk::GsfBetheHeitlerEffects::finalize()
 bool
 Trk::GsfBetheHeitlerEffects::readParameters()
 {
-  std::string resolvedFileName = PathResolver::find_file(m_parameterisationFileName, "DATAPATH");
-  if (!resolvedFileName.empty())
+  std::string resolvedFileName =
+    PathResolver::find_file(m_parameterisationFileName, "DATAPATH");
+  if (!resolvedFileName.empty()) {
     ATH_MSG_INFO("Parameterisation file found: " << resolvedFileName);
-  else {
+  } else {
     ATH_MSG_ERROR("Parameterisation file not found");
     return false;
   }
@@ -115,15 +117,18 @@ Trk::GsfBetheHeitlerEffects::readParameters()
   fin >> m_transformationCode;
   //
   if (not inRange(m_numberOfComponents, 0, 100)) {
-    ATH_MSG_ERROR("numberOfComponents Parameter out of range 0-100: " << m_numberOfComponents);
+    ATH_MSG_ERROR("numberOfComponents Parameter out of range 0-100: "
+                  << m_numberOfComponents);
     return false;
   }
   if (not inRange(orderPolynomial, 0, 10)) {
-    ATH_MSG_ERROR("orderPolynomial Parameter out of range 0-10: " << orderPolynomial);
+    ATH_MSG_ERROR(
+      "orderPolynomial Parameter out of range 0-10: " << orderPolynomial);
     return false;
   }
   if (not inRange(m_transformationCode, 0, 10)) {
-    ATH_MSG_ERROR("transformationCode Parameter out of range 0-10: " << m_transformationCode);
+    ATH_MSG_ERROR("transformationCode Parameter out of range 0-10: "
+                  << m_transformationCode);
     return false;
   }
   if (!fin) {
@@ -139,10 +144,11 @@ Trk::GsfBetheHeitlerEffects::readParameters()
   }
 
   if (m_useHighX0) {
-    resolvedFileName = PathResolver::find_file(m_parameterisationFileNameHighX0, "DATAPATH");
-    if (!resolvedFileName.empty())
+    resolvedFileName =
+      PathResolver::find_file(m_parameterisationFileNameHighX0, "DATAPATH");
+    if (!resolvedFileName.empty()) {
       ATH_MSG_INFO("Parameterisation file found: " << resolvedFileName);
-    else {
+    } else {
       ATH_MSG_ERROR("Parameterisation file not found");
       return false;
     }
@@ -161,15 +167,18 @@ Trk::GsfBetheHeitlerEffects::readParameters()
     fin >> m_transformationCodeHighX0;
     //
     if (not inRange(m_numberOfComponentsHighX0, 0, 100)) {
-      ATH_MSG_ERROR("numberOfComponents Parameter out of range 0-100: " << m_numberOfComponentsHighX0);
+      ATH_MSG_ERROR("numberOfComponents Parameter out of range 0-100: "
+                    << m_numberOfComponentsHighX0);
       return false;
     }
     if (not inRange(orderPolynomial, 0, 10)) {
-      ATH_MSG_ERROR("orderPolynomial Parameter out of range 0-10: " << orderPolynomial);
+      ATH_MSG_ERROR(
+        "orderPolynomial Parameter out of range 0-10: " << orderPolynomial);
       return false;
     }
     if (not inRange(m_transformationCodeHighX0, 0, 10)) {
-      ATH_MSG_ERROR("transformationCode Parameter out of range 0-10: " << m_transformationCodeHighX0);
+      ATH_MSG_ERROR("transformationCode Parameter out of range 0-10: "
+                    << m_transformationCodeHighX0);
       return false;
     }
     if (fin.bad()) {
@@ -181,7 +190,8 @@ Trk::GsfBetheHeitlerEffects::readParameters()
     for (; componentIndex < m_numberOfComponentsHighX0; ++componentIndex) {
       m_polynomialWeightsHighX0.push_back(readPolynomial(fin, orderPolynomial));
       m_polynomialMeansHighX0.push_back(readPolynomial(fin, orderPolynomial));
-      m_polynomialVariancesHighX0.push_back(readPolynomial(fin, orderPolynomial));
+      m_polynomialVariancesHighX0.push_back(
+        readPolynomial(fin, orderPolynomial));
     }
   }
   return true;
@@ -197,7 +207,8 @@ Trk::GsfBetheHeitlerEffects::readPolynomial(std::ifstream& fin, const int order)
 
   for (; orderIndex < (order + 1); ++orderIndex) {
     if (!fin) {
-      throw std::runtime_error("Reached end of stream but still expecting data.");
+      throw std::runtime_error(
+        "Reached end of stream but still expecting data.");
     }
     fin >> coefficients[orderIndex];
   }
@@ -206,12 +217,13 @@ Trk::GsfBetheHeitlerEffects::readPolynomial(std::ifstream& fin, const int order)
 }
 
 void
-Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
-                                     const Trk::ComponentParameters& componentParameters,
-                                     const Trk::MaterialProperties& materialProperties,
-                                     double pathLength,
-                                     Trk::PropDirection direction,
-                                     Trk::ParticleHypothesis) const
+Trk::GsfBetheHeitlerEffects::compute(
+  Cache& cache,
+  const Trk::ComponentParameters& componentParameters,
+  const Trk::MaterialProperties& materialProperties,
+  double pathLength,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis) const
 {
   // Clear cache
   cache.reset();
@@ -222,26 +234,28 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
   double radiationLength = materialProperties.x0();
   double pathlengthInX0 = pathLength / radiationLength;
   double momentum = globalMomentum.mag();
-  
+
   // Produce a multi-component State
   if (pathlengthInX0 > m_singleGaussianRange) {
 
-    // If the amount of material is between 0.0001 and 0.01 return the gaussian approximation to the
-    // Bethe-Heitler distribution
+    // If the amount of material is between 0.0001 and 0.01 return the gaussian
+    // approximation to the Bethe-Heitler distribution
     if (pathlengthInX0 < m_lowerRange) {
 
-      ATH_MSG_DEBUG("Amount of material less than" << m_lowerRange << "... Parameterising Bethe-Heitler as Gaussian");
+      ATH_MSG_DEBUG("Amount of material less than"
+                    << m_lowerRange
+                    << "... Parameterising Bethe-Heitler as Gaussian");
 
       const double meanZ = exp(-1. * pathlengthInX0);
       const double sign = (direction == Trk::oppositeMomentum) ? 1. : -1.;
-      const double varZ = exp(-1. * pathlengthInX0 * log(3.) / log(2.)) - exp(-2. * pathlengthInX0);
+      const double varZ = exp(-1. * pathlengthInX0 * log(3.) / log(2.)) -
+                          exp(-2. * pathlengthInX0);
       double deltaP(0.);
       double varQoverP(0.);
-      if (direction == Trk::alongMomentum){
+      if (direction == Trk::alongMomentum) {
         deltaP = sign * momentum * (1. - meanZ);
         varQoverP = 1. / (meanZ * meanZ * momentum * momentum) * varZ;
-      }
-      else{
+      } else {
         deltaP = sign * momentum * (1. / meanZ - 1.);
         varQoverP = varZ / (momentum * momentum);
       }
@@ -252,20 +266,20 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
       cache.deltaPs.push_back(deltaP);
       cache.weights.push_back(1.);
       cache.deltaCovariances.push_back(std::move(newCovarianceMatrix));
-      ATH_MSG_VERBOSE("Weight / deltaP / var (delta q/p) " << 1. << "\t" << deltaP << "\t" << varQoverP);
+      ATH_MSG_VERBOSE("Weight / deltaP / var (delta q/p) "
+                      << 1. << "\t" << deltaP << "\t" << varQoverP);
       return;
     }
 
-    if (pathlengthInX0 > m_upperRange){
+    if (pathlengthInX0 > m_upperRange) {
       pathlengthInX0 = m_upperRange;
     }
 
     MixtureParameters mixture;
     mixture.reserve(m_numberOfComponents);
-    if (m_useHighX0 && pathlengthInX0 > m_xOverRange){
+    if (m_useHighX0 && pathlengthInX0 > m_xOverRange) {
       getMixtureParametersHighX0(pathlengthInX0, mixture);
-    }
-    else{
+    } else {
       getMixtureParameters(pathlengthInX0, mixture);
     }
     correctWeights(mixture);
@@ -283,10 +297,11 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
     int componentWithHighestMean(0);
 
     for (; componentIndex < m_numberOfComponents; ++componentIndex) {
-      if (mixture[componentIndex].mean > mixture[componentWithHighestMean].mean){
+      if (mixture[componentIndex].mean >
+          mixture[componentWithHighestMean].mean) {
         componentWithHighestMean = componentIndex;
       }
-      if (mixture[componentIndex].mean >= m_componentMeanCut){
+      if (mixture[componentIndex].mean >= m_componentMeanCut) {
         continue;
       }
       weightToBeRemoved += mixture[componentIndex].weight;
@@ -295,13 +310,13 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
     for (; componentIndex < m_numberOfComponents; ++componentIndex) {
       double varianceInverseMomentum;
       // This is not mathematically correct but it does stabilize the GSF
-      if (mixture[componentIndex].mean < m_componentMeanCut){
+      if (mixture[componentIndex].mean < m_componentMeanCut) {
         continue;
       }
-      if (componentIndex == componentWithHighestMean){
-        cache.weights.push_back(mixture[componentIndex].weight + weightToBeRemoved);
-      }
-      else{
+      if (componentIndex == componentWithHighestMean) {
+        cache.weights.push_back(mixture[componentIndex].weight +
+                                weightToBeRemoved);
+      } else {
         cache.weights.push_back(mixture[componentIndex].weight);
       }
 
@@ -317,7 +332,8 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
         // For backwards propagation
         deltaP = momentum * (1. / mixture[componentIndex].mean - 1.);
         cache.deltaPs.push_back(deltaP);
-        varianceInverseMomentum = mixture[componentIndex].variance / (momentum * momentum);
+        varianceInverseMomentum =
+          mixture[componentIndex].variance / (momentum * momentum);
       } // end backwards propagation if clause
 
       AmgSymMatrix(5) newCovarianceMatrix;
@@ -330,7 +346,9 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
   } // end material limiting if clause
 
   else {
-    ATH_MSG_DEBUG("Trying to apply energy loss to " << pathlengthInX0 << " x/x0. No Bethe-Heitler effects applied");
+    ATH_MSG_DEBUG("Trying to apply energy loss to "
+                  << pathlengthInX0
+                  << " x/x0. No Bethe-Heitler effects applied");
     cache.weights.push_back(1.);
     cache.deltaPs.push_back(0.);
     AmgSymMatrix(5) newCovarianceMatrix;
@@ -340,85 +358,94 @@ Trk::GsfBetheHeitlerEffects::compute(Cache& cache,
 }
 
 void
-Trk::GsfBetheHeitlerEffects::getMixtureParameters(const double pathlengthInX0,
-                                                  Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
+Trk::GsfBetheHeitlerEffects::getMixtureParameters(
+  const double pathlengthInX0,
+  Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
 {
 
   int componentIndex = 0;
   for (; componentIndex < m_numberOfComponents; ++componentIndex) {
     double updatedWeight = m_polynomialWeights[componentIndex](pathlengthInX0);
     double updatedMean = m_polynomialMeans[componentIndex](pathlengthInX0);
-    double updatedVariance = m_polynomialVariances[componentIndex](pathlengthInX0);
-    if (m_transformationCode){
+    double updatedVariance =
+      m_polynomialVariances[componentIndex](pathlengthInX0);
+    if (m_transformationCode) {
       updatedWeight = logisticFunction(updatedWeight);
       updatedMean = logisticFunction(updatedMean);
       updatedVariance = exp(updatedVariance);
-    }
-    else{
+    } else {
       updatedVariance = updatedVariance * updatedVariance;
     }
-    mixture.emplace_back(updatedWeight,updatedMean,updatedVariance);
+    mixture.emplace_back(updatedWeight, updatedMean, updatedVariance);
   }
 }
 
 void
-Trk::GsfBetheHeitlerEffects::getMixtureParametersHighX0(const double pathlengthInX0,
-                                                        Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
+Trk::GsfBetheHeitlerEffects::getMixtureParametersHighX0(
+  const double pathlengthInX0,
+  Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
 {
 
   int componentIndex = 0;
   for (; componentIndex < m_numberOfComponentsHighX0; ++componentIndex) {
-    double updatedWeight = m_polynomialWeightsHighX0[componentIndex](pathlengthInX0);
-    double updatedMean = m_polynomialMeansHighX0[componentIndex](pathlengthInX0);
-    double updatedVariance = m_polynomialVariancesHighX0[componentIndex](pathlengthInX0);
-    if (m_transformationCodeHighX0){
+    double updatedWeight =
+      m_polynomialWeightsHighX0[componentIndex](pathlengthInX0);
+    double updatedMean =
+      m_polynomialMeansHighX0[componentIndex](pathlengthInX0);
+    double updatedVariance =
+      m_polynomialVariancesHighX0[componentIndex](pathlengthInX0);
+    if (m_transformationCodeHighX0) {
       updatedWeight = logisticFunction(updatedWeight);
       updatedMean = logisticFunction(updatedMean);
       updatedVariance = exp(updatedVariance);
-    }
-    else{
+    } else {
       updatedVariance = updatedVariance * updatedVariance;
     }
-    mixture.emplace_back(updatedWeight,updatedMean,updatedVariance);
+    mixture.emplace_back(updatedWeight, updatedMean, updatedVariance);
   }
 }
 
 void
-Trk::GsfBetheHeitlerEffects::correctWeights(Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
+Trk::GsfBetheHeitlerEffects::correctWeights(
+  Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
 {
 
-  if (mixture.empty()){
+  if (mixture.empty()) {
     return;
   }
 
   // Obtain the sum of weights
   double weightSum(0.);
 
-  Trk::GsfBetheHeitlerEffects::MixtureParameters::const_iterator component = mixture.begin();
-  for (; component != mixture.end(); ++component){
+  Trk::GsfBetheHeitlerEffects::MixtureParameters::const_iterator component =
+    mixture.begin();
+  for (; component != mixture.end(); ++component) {
     weightSum += (*component).weight;
   }
 
   // Rescale so that total weighting is 1
-  Trk::GsfBetheHeitlerEffects::MixtureParameters::iterator modifiableComponent = mixture.begin();
+  Trk::GsfBetheHeitlerEffects::MixtureParameters::iterator modifiableComponent =
+    mixture.begin();
 
-  for (; modifiableComponent != mixture.end(); ++modifiableComponent){
+  for (; modifiableComponent != mixture.end(); ++modifiableComponent) {
     (*modifiableComponent).weight /= weightSum;
   }
 }
 
 double
-Trk::GsfBetheHeitlerEffects::correctedFirstMean(const double pathlengthInX0,
-                                                const Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
+Trk::GsfBetheHeitlerEffects::correctedFirstMean(
+  const double pathlengthInX0,
+  const Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
 {
 
-  if (mixture.empty()){
+  if (mixture.empty()) {
     return 0.;
   }
   // Obtain the difference between the true and weighted sum
   double meanBH = betheHeitlerMean(pathlengthInX0);
-  Trk::GsfBetheHeitlerEffects::MixtureParameters::const_iterator component = mixture.begin() + 1;
-  for (; component != mixture.end(); ++component){
+  Trk::GsfBetheHeitlerEffects::MixtureParameters::const_iterator component =
+    mixture.begin() + 1;
+  for (; component != mixture.end(); ++component) {
     meanBH -= (*component).weight * (*component).mean;
   }
   // return the corrected mean for the first component
@@ -426,22 +453,26 @@ Trk::GsfBetheHeitlerEffects::correctedFirstMean(const double pathlengthInX0,
 }
 
 double
-Trk::GsfBetheHeitlerEffects::correctedFirstVariance(const double pathlengthInX0,
-                                                    const Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
+Trk::GsfBetheHeitlerEffects::correctedFirstVariance(
+  const double pathlengthInX0,
+  const Trk::GsfBetheHeitlerEffects::MixtureParameters& mixture) const
 {
 
-  if (mixture.empty()){
+  if (mixture.empty()) {
     return 0.;
   }
 
   // Obtain the difference between the true and weighed sum variances
   double varianceBH =
-    betheHeitlerVariance(pathlengthInX0) + (betheHeitlerMean(pathlengthInX0) * betheHeitlerMean(pathlengthInX0));
+    betheHeitlerVariance(pathlengthInX0) +
+    (betheHeitlerMean(pathlengthInX0) * betheHeitlerMean(pathlengthInX0));
   varianceBH -= mixture[0].weight * mixture[0].mean * mixture[0].mean;
 
-  Trk::GsfBetheHeitlerEffects::MixtureParameters::const_iterator component = mixture.begin() + 1;
-  for (; component != mixture.end(); ++component){
-    varianceBH -= (*component).weight * ((*component).mean * (*component).mean + (*component).variance);
+  Trk::GsfBetheHeitlerEffects::MixtureParameters::const_iterator component =
+    mixture.begin() + 1;
+  for (; component != mixture.end(); ++component) {
+    varianceBH -= (*component).weight * ((*component).mean * (*component).mean +
+                                         (*component).variance);
   }
   return std::max(varianceBH / mixture[0].weight, 0.);
 }
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfCombinedMaterialEffects.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfCombinedMaterialEffects.cxx
index 55bb5aaa72c9f1805cba3e05b33503a651779692..c5b2735ab7536d41f3b4db68959c1bbb94b2ade6 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfCombinedMaterialEffects.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfCombinedMaterialEffects.cxx
@@ -13,19 +13,20 @@ decription           : Implementation code for GsfCombinedMaterialEffects class
 #include "TrkGaussianSumFilter/GsfCombinedMaterialEffects.h"
 
 #include "GaudiKernel/ToolHandle.h"
-#include "TrkSurfaces/Surface.h"
+#include "TrkEventPrimitives/ParamDefs.h"
 #include "TrkGeometry/Layer.h"
-#include "TrkParameters/TrackParameters.h"
 #include "TrkMaterialOnTrack/EnergyLoss.h"
-#include "TrkEventPrimitives/ParamDefs.h"
+#include "TrkParameters/TrackParameters.h"
+#include "TrkSurfaces/Surface.h"
 
 namespace {
 const Trk::ParticleMasses s_particleMasses{};
 }
 
-Trk::GsfCombinedMaterialEffects::GsfCombinedMaterialEffects(const std::string& type,
-                                                            const std::string& name,
-                                                            const IInterface* parent)
+Trk::GsfCombinedMaterialEffects::GsfCombinedMaterialEffects(
+  const std::string& type,
+  const std::string& name,
+  const IInterface* parent)
   : AthAlgTool(type, name, parent)
 {
   declareInterface<IMultiStateMaterialEffects>(this);
@@ -36,11 +37,13 @@ Trk::GsfCombinedMaterialEffects::~GsfCombinedMaterialEffects() = default;
 StatusCode
 Trk::GsfCombinedMaterialEffects::initialize()
 {
-  // Retrieve and configure multiple scattering effects for multi-state operation
+  // Retrieve and configure multiple scattering effects for multi-state
+  // operation
   ATH_MSG_INFO("Configuring for multiple scattering");
   ATH_CHECK(m_msUpdator.retrieve());
 
-  // Retrieve and configure the std energy loss effects for multi-state operation
+  // Retrieve and configure the std energy loss effects for multi-state
+  // operation
   ATH_MSG_INFO("Configuring for normal energy loss");
   ATH_CHECK(m_EnergyLossUpdator.retrieve());
 
@@ -104,10 +107,18 @@ Trk::GsfCombinedMaterialEffects::compute(
 
   IMultiStateMaterialEffects::Cache cache_energyLoss;
   if (particleHypothesis == electron) {
-    m_betheHeitlerEffects->compute(cache_energyLoss, componentParameters, materialProperties, pathLength, direction);
+    m_betheHeitlerEffects->compute(cache_energyLoss,
+                                   componentParameters,
+                                   materialProperties,
+                                   pathLength,
+                                   direction);
   } else if (particleHypothesis != nonInteracting) {
-    this->energyLoss(
-      cache_energyLoss, componentParameters, materialProperties, pathLength, direction, particleHypothesis);
+    this->energyLoss(cache_energyLoss,
+                     componentParameters,
+                     materialProperties,
+                     pathLength,
+                     direction,
+                     particleHypothesis);
   }
 
   // Protect if there are no new components
@@ -126,7 +137,8 @@ Trk::GsfCombinedMaterialEffects::compute(
   // Iterators over the multiple scattering components
   auto multipleScatter_weightsIterator = cache_multipleScatter.weights.begin();
   auto multipleScatter_deltaPsIterator = cache_multipleScatter.deltaPs.begin();
-  auto multipleScatter_deltaCovariancesIterator = cache_multipleScatter.deltaCovariances.begin();
+  auto multipleScatter_deltaCovariancesIterator =
+    cache_multipleScatter.deltaCovariances.begin();
 
   // Loop over multiple scattering components
   for (; multipleScatter_weightsIterator != cache_multipleScatter.weights.end();
@@ -137,22 +149,28 @@ Trk::GsfCombinedMaterialEffects::compute(
     // Iterators over the energy loss components
     auto energyLoss_weightsIterator = cache_energyLoss.weights.begin();
     auto energyLoss_deltaPsIterator = cache_energyLoss.deltaPs.begin();
-    auto energyLoss_deltaCovariancesIterator = cache_energyLoss.deltaCovariances.begin();
+    auto energyLoss_deltaCovariancesIterator =
+      cache_energyLoss.deltaCovariances.begin();
 
     // Loop over energy loss components
 
     for (; energyLoss_weightsIterator != cache_energyLoss.weights.end();
-         ++energyLoss_weightsIterator, ++energyLoss_deltaPsIterator, ++energyLoss_deltaCovariancesIterator) {
+         ++energyLoss_weightsIterator,
+         ++energyLoss_deltaPsIterator,
+         ++energyLoss_deltaCovariancesIterator) {
 
-      double combinedWeight = (*multipleScatter_weightsIterator) * (*energyLoss_weightsIterator);
-      double combinedDeltaP = (*multipleScatter_deltaPsIterator) + (*energyLoss_deltaPsIterator);
+      double combinedWeight =
+        (*multipleScatter_weightsIterator) * (*energyLoss_weightsIterator);
+      double combinedDeltaP =
+        (*multipleScatter_deltaPsIterator) + (*energyLoss_deltaPsIterator);
 
       cache.weights.push_back(combinedWeight);
       cache.deltaPs.push_back(combinedDeltaP);
 
       if (measuredCov) {
         AmgSymMatrix(5) summedCovariance =
-          (*multipleScatter_deltaCovariancesIterator) + (*energyLoss_deltaCovariancesIterator);
+          (*multipleScatter_deltaCovariancesIterator) +
+          (*energyLoss_deltaCovariancesIterator);
         cache.deltaCovariances.push_back(std::move(summedCovariance));
       }
     } // end for loop over energy loss components
@@ -171,13 +189,14 @@ Trk::GsfCombinedMaterialEffects::scattering(
 {
   // Reset the cache
   cache.reset();
-  
+
   // Request track parameters from component parameters
   const Trk::TrackParameters* trackParameters = componentParameters.first.get();
   const AmgSymMatrix(5)* measuredTrackCov = trackParameters->covariance();
 
   if (!measuredTrackCov) {
-    ATH_MSG_DEBUG("No measurement associated with track parameters... returning original parameters");
+    ATH_MSG_DEBUG("No measurement associated with track parameters... "
+                  "returning original parameters");
     return;
   }
 
@@ -185,13 +204,17 @@ Trk::GsfCombinedMaterialEffects::scattering(
   double p = globalMomentum.mag();
 
   double pathcorrection = 1.;
-  if (materialProperties.thickness() != 0)
+  if (materialProperties.thickness() != 0) {
     pathcorrection = pathLength / materialProperties.thickness();
+  }
 
-  // Here we know the path length to be meff.thicknessX0, so we set pathcorrection = 1
-  // and create a dummy materialProperties with the properties we are interested in
-  MaterialProperties mprop(materialProperties.thicknessInX0(), 1., 0., 0., 0., 0.);
-  const double angularVariation = m_msUpdator->sigmaSquare(mprop, p, pathcorrection, Trk::muon);
+  // Here we know the path length to be meff.thicknessX0, so we set
+  // pathcorrection = 1 and create a dummy materialProperties with the
+  // properties we are interested in
+  MaterialProperties mprop(
+    materialProperties.thicknessInX0(), 1., 0., 0., 0., 0.);
+  const double angularVariation =
+    m_msUpdator->sigmaSquare(mprop, p, pathcorrection, Trk::muon);
 
   AmgSymMatrix(5) deltaCov;
   deltaCov.setZero();
@@ -220,14 +243,19 @@ Trk::GsfCombinedMaterialEffects::energyLoss(
   const Trk::TrackParameters* trackParameters = componentParameters.first.get();
   const AmgSymMatrix(5)* measuredCov = trackParameters->covariance();
   if (!measuredCov) {
-    ATH_MSG_DEBUG("No measurement on track parameters... returning original track parameters");
+    ATH_MSG_DEBUG("No measurement on track parameters... returning original "
+                  "track parameters");
     return;
   }
   double pathcorrection = pathLength / materialProperties.thickness();
   const Amg::Vector3D& globalMomentum = trackParameters->momentum();
 
-  EnergyLoss* energyLoss = m_EnergyLossUpdator->energyLoss(
-    materialProperties, globalMomentum.mag(), pathcorrection, direction, particleHypothesis, true);
+  EnergyLoss* energyLoss = m_EnergyLossUpdator->energyLoss(materialProperties,
+                                                           globalMomentum.mag(),
+                                                           pathcorrection,
+                                                           direction,
+                                                           particleHypothesis,
+                                                           true);
 
   // update for mean energy loss
   const double deltaE = energyLoss ? energyLoss->deltaE() : 0;
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx
index dfcb800d0307dfe20be9abc71260ad307c59c014..80513e339cb2ab7739e1472944e4f88d9934fe4e 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfExtrapolator.cxx
@@ -13,13 +13,13 @@ decription           : Implementation code for GsfExtrapolator class
 
 #include "TrkGaussianSumFilter/GsfExtrapolator.h"
 
-#include "TrkGaussianSumFilter/IMaterialMixtureConvolution.h"
 #include "TrkExInterfaces/IMultipleScatteringUpdator.h"
+#include "TrkGaussianSumFilter/IMaterialMixtureConvolution.h"
 
 #include "TrkGeometry/Layer.h"
+#include "TrkGeometry/MagneticFieldProperties.h"
 #include "TrkGeometry/MaterialProperties.h"
 #include "TrkGeometry/TrackingVolume.h"
-#include "TrkGeometry/MagneticFieldProperties.h"
 
 #include "TrkExUtils/MaterialUpdateMode.h"
 
@@ -38,7 +38,9 @@ namespace {
 const bool useBoundaryMaterialUpdate(true);
 }
 
-Trk::GsfExtrapolator::GsfExtrapolator(const std::string& type, const std::string& name, const IInterface* parent)
+Trk::GsfExtrapolator::GsfExtrapolator(const std::string& type,
+                                      const std::string& name,
+                                      const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_propagatorStickyConfiguration(true)
   , m_surfaceBasedMaterialEffects(false)
@@ -72,24 +74,23 @@ Trk::GsfExtrapolator::initialize()
 {
 
   // Request the Propagator AlgTools
-  if (not m_propagators.empty()) {
-    ATH_MSG_INFO("Attempting to retrieve propagator tool.... ");
+  unsigned int retrievedPropagators = 0;
+  if (!m_propagators.empty()) {
     ATH_CHECK(m_propagators.retrieve());
     ATH_MSG_INFO("Retrieved tools " << m_propagators);
-    unsigned int retrievedPropagators = m_propagators.size();
-    if (!retrievedPropagators) {
-      ATH_MSG_WARNING("None of the specified propagators could be retrieved! Extrapolators will "
-                      "operate in unconfigured mode.");
-      m_propagatorConfigurationLevel = 10;
-    } else {
-      // Set the configuration level for the retrieved propagators
-      m_propagatorConfigurationLevel = m_propagators.size() - 1;
-    }
-    ATH_MSG_INFO("Propagator configuration level: " << m_propagatorConfigurationLevel);
-  } else {
-    ATH_MSG_WARNING("List of propagators to retrieve is empty. Extrapolators will work in unconfigured mode");
+    retrievedPropagators = m_propagators.size();
+    // Set the configuration level for the retrieved propagators
+    m_propagatorConfigurationLevel = m_propagators.size() - 1;
   }
 
+  if (!retrievedPropagators) {
+    ATH_MSG_ERROR("Propagators could be retrieved!");
+    return StatusCode::FAILURE;
+  }
+
+  ATH_MSG_INFO(
+    "Propagator configuration level: " << m_propagatorConfigurationLevel);
+
   // Request the Navigation AlgTool
   ATH_CHECK(m_navigator.retrieve());
 
@@ -100,8 +101,9 @@ Trk::GsfExtrapolator::initialize()
 
   ATH_CHECK(m_msupdators.retrieve());
 
-  m_fieldProperties =
-    m_fastField ? Trk::MagneticFieldProperties(Trk::FastField) : Trk::MagneticFieldProperties(Trk::FullField);
+  m_fieldProperties = m_fastField
+                        ? Trk::MagneticFieldProperties(Trk::FastField)
+                        : Trk::MagneticFieldProperties(Trk::FullField);
 
   ATH_MSG_INFO("Initialisation of " << name() << " was successful");
   return StatusCode::SUCCESS;
@@ -110,16 +112,20 @@ Trk::GsfExtrapolator::initialize()
 StatusCode
 Trk::GsfExtrapolator::finalize()
 {
-
-  ATH_MSG_INFO("*** Extrapolator " << name() << " performance statistics ***********");
-  ATH_MSG_INFO(" * - Number of extrapolate() calls:                " << m_extrapolateCalls);
-  ATH_MSG_INFO(" * - Number of extrapolateDirectly() fallbacks:    " << m_extrapolateDirectlyFallbacks);
-  ATH_MSG_INFO(" * - Number of navigation distance check breaks:   " << m_navigationDistanceIncreaseBreaks);
-  ATH_MSG_INFO(" * - Number of volume boundary search failures:    " << m_missedVolumeBoundary);
-  ATH_MSG_INFO(" * - Number of tracking volume oscillation breaks: " << m_oscillationBreaks);
-  ATH_MSG_INFO("***********************************************************************************"
-               "****************");
-
+  ATH_MSG_INFO("*** Extrapolator " << name()
+                                   << " performance statistics ***********");
+  ATH_MSG_INFO(" * - Number of extrapolate() calls:                "
+               << m_extrapolateCalls);
+  ATH_MSG_INFO(" * - Number of extrapolateDirectly() fallbacks:    "
+               << m_extrapolateDirectlyFallbacks);
+  ATH_MSG_INFO(" * - Number of navigation distance check breaks:   "
+               << m_navigationDistanceIncreaseBreaks);
+  ATH_MSG_INFO(" * - Number of volume boundary search failures:    "
+               << m_missedVolumeBoundary);
+  ATH_MSG_INFO(" * - Number of tracking volume oscillation breaks: "
+               << m_oscillationBreaks);
+  ATH_MSG_INFO("***************************************************************"
+               "********************)");
   ATH_MSG_INFO("Finalisation of " << name() << " was successful");
   return StatusCode::SUCCESS;
 }
@@ -129,25 +135,39 @@ Trk::GsfExtrapolator::finalize()
  * The other one will end up calling this one passing the internal cache
  */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
-                                      const Trk::IPropagator& propagator,
-                                      const Trk::MultiComponentState& multiComponentState,
-                                      const Trk::Surface& surface,
-                                      Trk::PropDirection direction,
-                                      const Trk::BoundaryCheck& boundaryCheck,
-                                      Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateImpl(
+  const EventContext& ctx,
+  Cache& cache,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  Trk::PropDirection direction,
+  const Trk::BoundaryCheck& boundaryCheck,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
   auto buff_extrapolateCalls = m_extrapolateCalls.buffer();
 
-  // If the extrapolation is to be without material effects simply revert to the extrapolateDirectly
-  // method
+  // If the extrapolation is to be without material effects simply revert to the
+  // extrapolateDirectly method
   if (particleHypothesis == Trk::nonInteracting) {
-    return extrapolateDirectly(propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
+    return extrapolateDirectlyImpl(ctx,
+                                   propagator,
+                                   multiComponentState,
+                                   surface,
+                                   direction,
+                                   boundaryCheck,
+                                   particleHypothesis);
   }
-  // Surface based material effects (assumes all material is on active sensor elements)
+  // Surface based material effects (assumes all material is on active sensor
+  // elements)
   if (m_surfaceBasedMaterialEffects) {
-    return extrapolateSurfaceBasedMaterialEffects(
-      propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
+    return extrapolateSurfaceBasedMaterialEffects(ctx,
+                                                  propagator,
+                                                  multiComponentState,
+                                                  surface,
+                                                  direction,
+                                                  boundaryCheck,
+                                                  particleHypothesis);
   }
   // statistics
   ++buff_extrapolateCalls;
@@ -157,7 +177,8 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
   const Trk::TrackingVolume* destinationVolume = nullptr;
   const Trk::TrackParameters* referenceParameters = nullptr;
 
-  initialiseNavigation(cache,
+  initialiseNavigation(ctx,
+                       cache,
                        propagator,
                        multiComponentState,
                        surface,
@@ -168,21 +189,31 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
                        direction);
 
   // Bail to direct extrapolation if the direction cannot be determined
-  if (direction == Trk::anyDirection)
-    return extrapolateDirectly(propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
+  if (direction == Trk::anyDirection) {
+    return extrapolateDirectlyImpl(ctx,
+                                   propagator,
+                                   multiComponentState,
+                                   surface,
+                                   direction,
+                                   boundaryCheck,
+                                   particleHypothesis);
+  }
 
-  const Trk::TrackParameters* combinedState = multiComponentState.begin()->first.get();
+  const Trk::TrackParameters* combinedState =
+    multiComponentState.begin()->first.get();
 
   const Trk::MultiComponentState* currentState = &multiComponentState;
 
-  /* Define the initial distance between destination and current position. Destination should be
-     determined from either
+  /* Define the initial distance between destination and current position.
+     Destination should be determined from either
      - reference parameters (prefered if they exist) or
      - destination surface
      */
 
-  Amg::Vector3D globalSeparation = referenceParameters ? referenceParameters->position() - combinedState->position()
-                                                       : surface.globalReferencePoint() - combinedState->position();
+  Amg::Vector3D globalSeparation =
+    referenceParameters
+      ? referenceParameters->position() - combinedState->position()
+      : surface.globalReferencePoint() - combinedState->position();
   double initialDistance = globalSeparation.mag();
   // Clean up memory from combiner. It is no longer needed
   combinedState = nullptr;
@@ -204,22 +235,34 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
   const Trk::TrackingVolume* previousVolume = nullptr;
   auto buff_missedVolumeBoundary = m_missedVolumeBoundary.buffer();
   auto buff_oscillationBreaks = m_oscillationBreaks.buffer();
-  auto buff_navigationDistanceIncreaseBreaks = m_navigationDistanceIncreaseBreaks.buffer();
+  auto buff_navigationDistanceIncreaseBreaks =
+    m_navigationDistanceIncreaseBreaks.buffer();
 
   while (currentVolume && currentVolume != destinationVolume && currentState) {
     // Configure propagator based on the current tracking volume
     currentPropagator =
-      m_propagatorStickyConfiguration ? &propagator : &(*m_propagators[this->propagatorType(*currentVolume)]);
+      m_propagatorStickyConfiguration
+        ? &propagator
+        : &(*m_propagators[this->propagatorType(*currentVolume)]);
 
     // Extrapolate to volume boundary
-    extrapolateToVolumeBoundary(
-      cache, *currentPropagator, *currentState, associatedLayer, *currentVolume, direction, particleHypothesis);
-
-    // New current state is the state extrapolated to the tracking volume boundary.
+    extrapolateToVolumeBoundary(ctx,
+                                cache,
+                                *currentPropagator,
+                                *currentState,
+                                associatedLayer,
+                                *currentVolume,
+                                direction,
+                                particleHypothesis);
+
+    // New current state is the state extrapolated to the tracking volume
+    // boundary.
     currentState = cache.m_stateAtBoundarySurface.stateAtBoundary;
 
-    // The volume that the extrapolation is about to enter into is called the nextVolume
-    const Trk::TrackingVolume* nextVolume = cache.m_stateAtBoundarySurface.trackingVolume;
+    // The volume that the extrapolation is about to enter into is called the
+    // nextVolume
+    const Trk::TrackingVolume* nextVolume =
+      cache.m_stateAtBoundarySurface.trackingVolume;
 
     // Break the loop if the next tracking volume is the same as the current one
     if (!nextVolume || nextVolume == currentVolume) {
@@ -229,7 +272,8 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
       break;
     }
 
-    // New reference parameters are the navigation parameters at the boundary surface
+    // New reference parameters are the navigation parameters at the boundary
+    // surface
     referenceParameters = cache.m_stateAtBoundarySurface.navigationParameters;
 
     // Break the lop if an oscillation is detected
@@ -244,11 +288,18 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
       break;
     }
 
-    // Break the loop if the distance between the surface and the track parameters has increased
+    // Break the loop if the distance between the surface and the track
+    // parameters has increased
     combinedState = currentState->begin()->first.get();
 
-    const TrackParameters* parametersAtDestination = currentPropagator->propagateParameters(
-      *combinedState, surface, direction, false, m_fieldProperties, Trk::electron);
+    const TrackParameters* parametersAtDestination =
+      currentPropagator->propagateParameters(ctx,
+                                             *combinedState,
+                                             surface,
+                                             direction,
+                                             false,
+                                             m_fieldProperties,
+                                             Trk::electron);
     Amg::Vector3D newDestination;
     if (parametersAtDestination) {
       newDestination = parametersAtDestination->position();
@@ -258,24 +309,29 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
       newDestination = surface.center();
     }
 
-    double revisedDistance = (referenceParameters->position() - newDestination).mag();
+    double revisedDistance =
+      (referenceParameters->position() - newDestination).mag();
 
     double distanceChange = fabs(revisedDistance - initialDistance);
 
     if (revisedDistance > initialDistance && distanceChange > 0.01) {
-      ATH_MSG_DEBUG("Navigation break. Initial separation: " << initialDistance
-                                                             << " Current Sepatation: " << revisedDistance);
-      ATH_MSG_DEBUG(".... Volume  " << nextVolume->volumeName() << " from " << currentVolume->volumeName());
+      ATH_MSG_DEBUG("Navigation break. Initial separation: "
+                    << initialDistance
+                    << " Current Sepatation: " << revisedDistance);
+      ATH_MSG_DEBUG(".... Volume  " << nextVolume->volumeName() << " from "
+                                    << currentVolume->volumeName());
       foundFinalBoundary = false;
       ++buff_navigationDistanceIncreaseBreaks;
       break;
     }
 
     combinedState = nullptr;
-    ATH_MSG_DEBUG("Switching tracking volume look for Material: " << nextVolume->volumeName());
+    ATH_MSG_DEBUG("Switching tracking volume look for Material: "
+                  << nextVolume->volumeName());
     // Initialise the oscillation checker
     previousVolume = currentVolume;
-    // As the extrapolation is moving into the next volume, the next volume -> current volume
+    // As the extrapolation is moving into the next volume, the next volume ->
+    // current volume
     currentVolume = nextVolume;
     // Associated layer now needs to be reset
     // if(!entryLayerFound)
@@ -284,22 +340,31 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
 
   // Look to catch failures now
   if (!currentState) {
-    ATH_MSG_DEBUG("No current state at boundary... Falling back to original state");
+    ATH_MSG_DEBUG(
+      "No current state at boundary... Falling back to original state");
     currentState = &multiComponentState;
     foundFinalBoundary = false;
   }
 
   if (currentVolume != destinationVolume) {
-    ATH_MSG_DEBUG("Trk::GsfExtrapolator::extrapolate failed to reach destination volume... ");
+    ATH_MSG_DEBUG("Trk::GsfExtrapolator::extrapolate failed to reach "
+                  "destination volume... ");
     currentState = &multiComponentState;
     foundFinalBoundary = false;
   }
 
   if (!foundFinalBoundary) {
-    ATH_MSG_DEBUG("Could not find final boundary switch to direct EXTRAPOLATION");
+    ATH_MSG_DEBUG(
+      "Could not find final boundary switch to direct EXTRAPOLATION");
 
     Trk::MultiComponentState bailOutState =
-      multiStatePropagate(propagator, *currentState, surface, Trk::anyDirection, boundaryCheck, particleHypothesis);
+      multiStatePropagate(ctx,
+                          propagator,
+                          *currentState,
+                          surface,
+                          Trk::anyDirection,
+                          boundaryCheck,
+                          particleHypothesis);
 
     if (bailOutState.empty()) {
       ATH_MSG_DEBUG("Fallback to propagation failed... Returning 0");
@@ -315,35 +380,48 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
 
   // Configure propagator based on the current tracking volume
   currentPropagator =
-    m_propagatorStickyConfiguration ? &propagator : &(*m_propagators[this->propagatorType(*currentVolume)]);
+    m_propagatorStickyConfiguration
+      ? &propagator
+      : &(*m_propagators[this->propagatorType(*currentVolume)]);
 
   // extrapolate inside destination volume
-  Trk::MultiComponentState destinationState = extrapolateInsideVolume(cache,
-                                                                      *currentPropagator,
-                                                                      *currentState,
-                                                                      surface,
-                                                                      associatedLayer,
-                                                                      *currentVolume,
-                                                                      direction,
-                                                                      boundaryCheck,
-                                                                      particleHypothesis);
-
-  // FALLBACK POINT: Crisis if extrapolation fails here... As per extrapolation to volume boundary,
-  // in emergency revert to extrapolateDirectly
+  Trk::MultiComponentState destinationState =
+    extrapolateInsideVolume(ctx,
+                            cache,
+                            *currentPropagator,
+                            *currentState,
+                            surface,
+                            associatedLayer,
+                            *currentVolume,
+                            direction,
+                            boundaryCheck,
+                            particleHypothesis);
+
+  // FALLBACK POINT: Crisis if extrapolation fails here... As per extrapolation
+  // to volume boundary, in emergency revert to extrapolateDirectly
 
   // or we failed to reach the target
-  if (!destinationState.empty() && &((*(destinationState.begin())).first->associatedSurface()) != &surface) {
-    ATH_MSG_DEBUG("Failed to reach destination surface  ... reached some other surface");
+  if (!destinationState.empty() &&
+      &((*(destinationState.begin())).first->associatedSurface()) != &surface) {
+    ATH_MSG_DEBUG(
+      "Failed to reach destination surface  ... reached some other surface");
     destinationState.clear();
   }
 
   // Gaudi counter buffer
-  auto buff_extrapolateDirectlyFallbacks = m_extrapolateDirectlyFallbacks.buffer();
+  auto buff_extrapolateDirectlyFallbacks =
+    m_extrapolateDirectlyFallbacks.buffer();
 
   if (destinationState.empty()) {
-    ATH_MSG_DEBUG("extrapolateInsideVolume() failed... falling back to direct propagation");
-    destinationState =
-      multiStatePropagate(propagator, *currentState, surface, Trk::anyDirection, boundaryCheck, particleHypothesis);
+    ATH_MSG_DEBUG(
+      "extrapolateInsideVolume() failed... falling back to direct propagation");
+    destinationState = multiStatePropagate(ctx,
+                                           propagator,
+                                           *currentState,
+                                           surface,
+                                           Trk::anyDirection,
+                                           boundaryCheck,
+                                           particleHypothesis);
 
     // statistics
     ++buff_extrapolateDirectlyFallbacks;
@@ -356,141 +434,128 @@ Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
   // After successful extrapolation return the state
   return destinationState;
 }
-
 /*
- * When the propagator is configured
- * We can go through this overload
+ * Extrapolate Directly method. Does not use a cache
  */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateImpl(Cache& cache,
-                                      const Trk::MultiComponentState& multiComponentState,
-                                      const Trk::Surface& surface,
-                                      Trk::PropDirection direction,
-                                      const Trk::BoundaryCheck& boundaryCheck,
-                                      Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateDirectlyImpl(
+  const EventContext& ctx,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  Trk::PropDirection direction,
+  const Trk::BoundaryCheck& boundaryCheck,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
-  if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("MultiComponentState is empty... returning 0");
-    return {};
-  }
-  if (m_propagatorConfigurationLevel < 10) {
-
-    // Set the propagator to that one corresponding to the configuration level
-    const Trk::IPropagator* currentPropagator = &(*m_propagators[m_propagatorConfigurationLevel]);
-    return extrapolateImpl(
-      cache, *currentPropagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
-  }
-  ATH_MSG_ERROR("No default propagator is selected in 'extrapolate'. Check job options!");
-  return {};
+  return multiStatePropagate(ctx,
+                             propagator,
+                             multiComponentState,
+                             surface,
+                             direction,
+                             boundaryCheck,
+                             particleHypothesis);
 }
 
 /************************************************************/
 /*
  * Done with the internal actual implementation methods here
- * Implement the public ones
+ * Implement the public extrapolate ones
  */
 /************************************************************/
 
 /*
- * Extrapolation methods without configured propagator
+ * Extrapolate Interface
  */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolate(const Trk::IPropagator& propagator,
-                                  const Trk::MultiComponentState& multiComponentState,
-                                  const Trk::Surface& surface,
-                                  Trk::PropDirection direction,
-                                  const Trk::BoundaryCheck& boundaryCheck,
-                                  Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolate(
+  const EventContext& ctx,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  Trk::PropDirection direction,
+  const Trk::BoundaryCheck& boundaryCheck,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
   Cache cache{};
-  return extrapolateImpl(cache, propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
+  if (multiComponentState.empty()) {
+    ATH_MSG_DEBUG("MultiComponentState is empty...");
+    return {};
+  }
+
+  // Set the propagator to that one corresponding to the configuration level
+  const Trk::IPropagator* currentPropagator =
+    &(*m_propagators[m_propagatorConfigurationLevel]);
+  return extrapolateImpl(ctx,
+                         cache,
+                         *currentPropagator,
+                         multiComponentState,
+                         surface,
+                         direction,
+                         boundaryCheck,
+                         particleHypothesis);
 }
 
 /*
- * Direct method
- * does not uses a cache
+ * Extrapolate Directly method. Does not use a cache
  */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateDirectly(const Trk::IPropagator& propagator,
-                                          const Trk::MultiComponentState& multiComponentState,
-                                          const Trk::Surface& surface,
-                                          Trk::PropDirection direction,
-                                          const Trk::BoundaryCheck& boundaryCheck,
-                                          Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateDirectly(
+  const EventContext& ctx,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  Trk::PropDirection direction,
+  const Trk::BoundaryCheck& boundaryCheck,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
+  if (multiComponentState.empty()) {
+    ATH_MSG_DEBUG("MultiComponentState is empty...");
+    return {};
+  }
+  // Set the propagator to that one corresponding to the configuration level
+  const Trk::IPropagator* currentPropagator =
+    &(*m_propagators[m_propagatorConfigurationLevel]);
 
   auto buff_extrapolateDirectlyCalls = m_extrapolateDirectlyCalls.buffer();
   // statistics
   ++buff_extrapolateDirectlyCalls;
   const Trk::TrackingVolume* currentVolume = m_navigator->highestVolume();
   if (!currentVolume) {
-    ATH_MSG_WARNING("Current tracking volume could not be determined... returning 0");
+    ATH_MSG_WARNING(
+      "Current tracking volume could not be determined... returning 0");
     return {};
   }
-  return multiStatePropagate(propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
-}
-
-/*
- * Methods that can use a configured propagator
- */
-Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolate(const Trk::MultiComponentState& multiComponentState,
-                                  const Trk::Surface& surface,
-                                  Trk::PropDirection direction,
-                                  const Trk::BoundaryCheck& boundaryCheck,
-                                  Trk::ParticleHypothesis particleHypothesis) const
-{
-  Cache cache{};
-  return extrapolateImpl(cache, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
-}
-
-/*
- * Direct method does not uses a cache
- */
-Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateDirectly(const Trk::MultiComponentState& multiComponentState,
-                                          const Trk::Surface& surface,
-                                          Trk::PropDirection direction,
-                                          const Trk::BoundaryCheck& boundaryCheck,
-                                          Trk::ParticleHypothesis particleHypothesis) const
-{
-
-  if (m_propagatorConfigurationLevel < 10) {
-    // Set the propagator to that one corresponding to the configuration level
-    const Trk::IPropagator* currentPropagator = &(*m_propagators[m_propagatorConfigurationLevel]);
-    if (!currentPropagator) {
-      ATH_MSG_ERROR("No current propagator is defined... Exiting");
-      return {};
-    }
-
-    return extrapolateDirectly(
-      *currentPropagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
-  }
-  ATH_MSG_ERROR("No default propagator is selected in 'extrapolateDirectly'. Check job options!");
-  return {};
+  return extrapolateDirectlyImpl(ctx,
+                                 *currentPropagator,
+                                 multiComponentState,
+                                 surface,
+                                 direction,
+                                 boundaryCheck,
+                                 particleHypothesis);
 }
 
 /*
  * Extrapolate M
  */
-
 std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>>
-Trk::GsfExtrapolator::extrapolateM(const Trk::MultiComponentState& mcsparameters,
-                                   const Surface& sf,
-                                   PropDirection dir,
-                                   const BoundaryCheck& bcheck,
-                                   ParticleHypothesis particle) const
+Trk::GsfExtrapolator::extrapolateM(
+  const EventContext& ctx,
+  const Trk::MultiComponentState& mcsparameters,
+  const Surface& sf,
+  PropDirection dir,
+  const BoundaryCheck& bcheck,
+  ParticleHypothesis particle) const
 {
   // create a new vector for the material to be collected
 
-  /* =============================================
-     Look for current volume
-     ============================================= */
-
+  // Look for current volume
   Cache cache{};
   cache.m_matstates.reset();
   // collect the material
-  MultiComponentState parameterAtDestination = extrapolateImpl(cache, mcsparameters, sf, dir, bcheck, particle);
+
+  // Set the propagator to that one corresponding to the configuration level
+  const Trk::IPropagator* currentPropagator =
+    &(*m_propagators[m_propagatorConfigurationLevel]);
+  MultiComponentState parameterAtDestination = extrapolateImpl(
+    ctx, cache, *currentPropagator, mcsparameters, sf, dir, bcheck, particle);
   // there are no parameters
   if (parameterAtDestination.empty()) {
     // loop over and clean up
@@ -500,11 +565,12 @@ Trk::GsfExtrapolator::extrapolateM(const Trk::MultiComponentState& mcsparameters
     emptyGarbageBins(cache);
     return nullptr;
   }
-  cache.m_matstates->push_back(
-    new TrackStateOnSurface(nullptr, parameterAtDestination.begin()->first->clone(), nullptr, nullptr));
+  cache.m_matstates->push_back(new TrackStateOnSurface(
+    nullptr, parameterAtDestination.begin()->first->clone(), nullptr, nullptr));
 
   // assign the temporary states
-  std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>> tmpMatStates = std::move(cache.m_matstates);
+  std::unique_ptr<std::vector<const Trk::TrackStateOnSurface*>> tmpMatStates =
+    std::move(cache.m_matstates);
   emptyGarbageBins(cache);
   // return the material states
   return tmpMatStates;
@@ -516,18 +582,19 @@ Trk::GsfExtrapolator::extrapolateM(const Trk::MultiComponentState& mcsparameters
  * that perform actual calculations
  */
 /************************************************************/
-
 /*
  *   Extrapolate to Volume Boundary!
  */
 void
-Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
-                                                  const Trk::IPropagator& propagator,
-                                                  const Trk::MultiComponentState& multiComponentState,
-                                                  const Trk::Layer* layer,
-                                                  const Trk::TrackingVolume& trackingVolume,
-                                                  Trk::PropDirection direction,
-                                                  Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateToVolumeBoundary(
+  const EventContext& ctx,
+  Cache& cache,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Layer* layer,
+  const Trk::TrackingVolume& trackingVolume,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
   // MultiComponentState propagation and material effects
@@ -536,31 +603,39 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
   // Determine the current layer - the state combiner is required
 
   if (!currentState) {
-    ATH_MSG_WARNING("extrapolateToVolumeBoundary: Trying to extrapolate nothing?? -  return");
+    ATH_MSG_WARNING(
+      "extrapolateToVolumeBoundary: Trying to extrapolate nothing?? -  return");
     return;
   }
 
-  const Trk::TrackParameters* combinedState = currentState->begin()->first.get();
+  const Trk::TrackParameters* combinedState =
+    currentState->begin()->first.get();
   const Trk::Layer* associatedLayer = layer;
 
   if (!associatedLayer) {
     ATH_MSG_DEBUG("No associated layer passed with volume.... lets get one");
-    // Get entry layer but do not use it as  it should have already be hit if it was desired
+    // Get entry layer but do not use it as  it should have already be hit if it
+    // was desired
     associatedLayer = trackingVolume.associatedLayer(combinedState->position());
-    associatedLayer = associatedLayer ? associatedLayer
-                                      : trackingVolume.nextLayer(combinedState->position(),
-                                                                 direction * combinedState->momentum().unit(),
-                                                                 associatedLayer);
+    associatedLayer =
+      associatedLayer
+        ? associatedLayer
+        : trackingVolume.nextLayer(combinedState->position(),
+                                   direction * combinedState->momentum().unit(),
+                                   associatedLayer);
     ATH_MSG_DEBUG("Found layer in Volume " << layerRZoutput(associatedLayer));
   }
   // Only loop over layers if they can be found within the tracking volume
-  else if (trackingVolume.confinedLayers() && associatedLayer->layerMaterialProperties()) {
-    Trk::MultiComponentState updatedState =
-      m_materialUpdator->postUpdate(*currentState, *layer, direction, particleHypothesis);
+  else if (trackingVolume.confinedLayers() &&
+           associatedLayer->layerMaterialProperties()) {
+    Trk::MultiComponentState updatedState = m_materialUpdator->postUpdate(
+      *currentState, *layer, direction, particleHypothesis);
 
     if (!updatedState.empty()) {
       addMaterialtoVector(cache, layer, currentState->begin()->first.get());
-      currentState = std::make_unique<Trk::MultiComponentState>(std::move(updatedState)).release();
+      currentState =
+        std::make_unique<Trk::MultiComponentState>(std::move(updatedState))
+          .release();
     }
   }
 
@@ -568,19 +643,30 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
   combinedState = nullptr;
 
   Trk::MultiComponentState nextState{};
-  // If an associated surface can be found, extrapolation within the tracking volume is mandatory
-  // This will take extrapolate to the last layer in the volume
+  // If an associated surface can be found, extrapolation within the tracking
+  // volume is mandatory This will take extrapolate to the last layer in the
+  // volume
   if (associatedLayer) {
-    nextState = extrapolateFromLayerToLayer(
-      cache, propagator, *currentState, trackingVolume, associatedLayer, nullptr, direction, particleHypothesis);
+    nextState = extrapolateFromLayerToLayer(ctx,
+                                            cache,
+                                            propagator,
+                                            *currentState,
+                                            trackingVolume,
+                                            associatedLayer,
+                                            nullptr,
+                                            direction,
+                                            particleHypothesis);
     // if we have a next State update the currentState
     if (!nextState.empty()) {
-      // We can delete the currentState as long as it does not point to the input
+      // We can delete the currentState as long as it does not point to the
+      // input
       if (currentState != &multiComponentState) {
         delete currentState;
       }
       // currentState now owns the ptr
-      currentState = std::make_unique<Trk::MultiComponentState>(std::move(nextState)).release();
+      currentState =
+        std::make_unique<Trk::MultiComponentState>(std::move(nextState))
+          .release();
     }
   }
 
@@ -593,51 +679,48 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
   combinedState = currentState->begin()->first->clone();
 
   const Trk::TrackingVolume* nextVolume = nullptr;
-  const Trk::TrackParameters* navigationParameters = cache.m_stateAtBoundarySurface.navigationParameters
-                                                       ? cache.m_stateAtBoundarySurface.navigationParameters
-                                                       : combinedState;
+  const Trk::TrackParameters* navigationParameters =
+    cache.m_stateAtBoundarySurface.navigationParameters
+      ? cache.m_stateAtBoundarySurface.navigationParameters
+      : combinedState;
 
   unsigned int navigationPropagatorIndex = 0;
 
-  if (m_propagatorConfigurationLevel < 10) {
+  while (navigationPropagatorIndex <= m_propagatorConfigurationLevel) {
 
-    // Not the default
-    while (navigationPropagatorIndex <= m_propagatorConfigurationLevel) {
+    const Trk::IPropagator* navigationPropagator =
+      &(*m_propagators[navigationPropagatorIndex]);
 
-      const Trk::IPropagator* navigationPropagator = &(*m_propagators[navigationPropagatorIndex]);
-
-      if (!navigationPropagator) {
-        ATH_MSG_WARNING("Navigation propagator cannot be retrieved... Continuing");
-        continue;
-      }
+    if (!navigationPropagator) {
+      ATH_MSG_WARNING(
+        "Navigation propagator cannot be retrieved... Continuing");
+      continue;
+    }
 
-      nextNavigationCell =
-        m_navigator->nextTrackingVolume(*navigationPropagator, *navigationParameters, direction, trackingVolume);
-      nextVolume = nextNavigationCell.nextVolume;
-      if (navigationPropagatorIndex >= 1)
-        delete navigationParameters;
-      navigationParameters = nextNavigationCell.parametersOnBoundary;
+    nextNavigationCell = m_navigator->nextTrackingVolume(
+      *navigationPropagator, *navigationParameters, direction, trackingVolume);
+    nextVolume = nextNavigationCell.nextVolume;
+    if (navigationPropagatorIndex >= 1) {
+      delete navigationParameters;
+    }
+    navigationParameters = nextNavigationCell.parametersOnBoundary;
 
-      ++navigationPropagatorIndex;
+    ++navigationPropagatorIndex;
 
-      // If the next tracking volume is found then no need to continue looping
-      if (nextVolume)
-        break;
+    // If the next tracking volume is found then no need to continue looping
+    if (nextVolume) {
+      break;
     }
-  } else {
-    // The Default
-    nextNavigationCell = m_navigator->nextTrackingVolume(propagator, *navigationParameters, direction, trackingVolume);
-    nextVolume = nextNavigationCell.nextVolume;
-    navigationParameters = nextNavigationCell.parametersOnBoundary;
   }
-
   // Clean up memory allocated by the combiner
   if (navigationParameters != combinedState) {
     delete combinedState;
   }
 
   if (!nextVolume) {
-    ATH_MSG_DEBUG("Cannot find next TrackingVolume from initial tracking volume: " << trackingVolume.volumeName());
+    ATH_MSG_DEBUG(
+      "Cannot find next TrackingVolume from initial tracking volume: "
+      << trackingVolume.volumeName());
     // Reset the layer recall
     resetRecallInformation(cache);
   }
@@ -651,9 +734,12 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
     // If so, apply material effects update.
 
     // Get layer associated with boundary surface.
-    const Trk::TrackParameters* paramsAtBoundary = nextNavigationCell.parametersOnBoundary;
+    const Trk::TrackParameters* paramsAtBoundary =
+      nextNavigationCell.parametersOnBoundary;
     const Trk::Layer* layerAtBoundary =
-      (paramsAtBoundary) ? (paramsAtBoundary->associatedSurface()).materialLayer() : nullptr;
+      (paramsAtBoundary)
+        ? (paramsAtBoundary->associatedSurface()).materialLayer()
+        : nullptr;
     const Trk::TrackParameters* matUpdatedParameters = nullptr;
     Trk::MultiComponentState matUpdatedState{};
 
@@ -661,16 +747,20 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
       if (layerAtBoundary->layerMaterialProperties()) {
         ATH_MSG_DEBUG("Boundary surface has material - updating properties");
         assert(currentState);
-        matUpdatedState = m_materialUpdator->postUpdate(*currentState, *layerAtBoundary, direction, particleHypothesis);
+        matUpdatedState = m_materialUpdator->postUpdate(
+          *currentState, *layerAtBoundary, direction, particleHypothesis);
       }
     }
 
-    // If state has changed due to boundary material, modify state, parameters accordingly.
+    // If state has changed due to boundary material, modify state, parameters
+    // accordingly.
     if (!matUpdatedState.empty()) {
       ATH_MSG_DEBUG("Performing state update");
       // Clean out memory, update state.
       delete currentState;
-      currentState = std::make_unique<Trk::MultiComponentState>(std::move(matUpdatedState)).release();
+      currentState =
+        std::make_unique<Trk::MultiComponentState>(std::move(matUpdatedState))
+          .release();
       // Update navigation parameters (?).
       matUpdatedParameters = currentState->begin()->first->clone();
       if (matUpdatedParameters != navigationParameters) {
@@ -678,12 +768,14 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
         navigationParameters = matUpdatedParameters;
       }
       // Add to material vector.
-      addMaterialtoVector(cache, layerAtBoundary, currentState->begin()->first.get());
+      addMaterialtoVector(
+        cache, layerAtBoundary, currentState->begin()->first.get());
     }
   }
 
   // Update the boundary information in the cache
-  cache.m_stateAtBoundarySurface.updateBoundaryInformation(currentState, navigationParameters, nextVolume);
+  cache.m_stateAtBoundarySurface.updateBoundaryInformation(
+    currentState, navigationParameters, nextVolume);
 
   // Make sure navigation parameters
   // and currentstate (if is not the same as input)
@@ -699,67 +791,72 @@ Trk::GsfExtrapolator::extrapolateToVolumeBoundary(Cache& cache,
  */
 
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateInsideVolume(Cache& cache,
-                                              const Trk::IPropagator& propagator,
-                                              const Trk::MultiComponentState& multiComponentState,
-                                              const Trk::Surface& surface,
-                                              const Trk::Layer* layer,
-                                              const Trk::TrackingVolume& trackingVolume,
-                                              Trk::PropDirection direction,
-                                              const Trk::BoundaryCheck& boundaryCheck,
-                                              Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateInsideVolume(
+  const EventContext& ctx,
+  Cache& cache,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  const Trk::Layer* layer,
+  const Trk::TrackingVolume& trackingVolume,
+  Trk::PropDirection direction,
+  const Trk::BoundaryCheck& boundaryCheck,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
-  ATH_MSG_DEBUG("GSF extrapolateInsideVolume() in tracking volume: " << trackingVolume.volumeName());
+  ATH_MSG_DEBUG("GSF extrapolateInsideVolume() in tracking volume: "
+                << trackingVolume.volumeName());
 
   /*
    * We use current State to track where we are
    */
   const Trk::MultiComponentState* currentState = &multiComponentState;
 
-  /* ==================================================
-     Retrieve the destination layer
-     ================================================== */
-
+  // Retrieve the destination layer
   // 1. Association
   const Trk::Layer* destinationLayer = surface.associatedLayer();
 
   // 2. Recall and Global Search
   if (!destinationLayer) {
     ATH_MSG_DEBUG("No associated later to surface");
-    destinationLayer = (&surface == cache.m_recallSurface)
-                         ? cache.m_recallLayer
-                         : trackingVolume.associatedLayer(surface.globalReferencePoint());
+    destinationLayer =
+      (&surface == cache.m_recallSurface)
+        ? cache.m_recallLayer
+        : trackingVolume.associatedLayer(surface.globalReferencePoint());
   }
 
-  /* ==================================================
-     Retrieve the current layer
-     ================================================== */
-
+  // Retrieve the current layer
   // Produce a combined state
-  const Trk::TrackParameters* combinedState = currentState->begin()->first.get();
+  const Trk::TrackParameters* combinedState =
+    currentState->begin()->first.get();
 
   const Trk::Layer* associatedLayer = layer;
 
   Trk::MultiComponentState updatedState{};
   if (!associatedLayer) {
     ATH_MSG_DEBUG("No assoicated layer passed with volume.... lets get one");
-    // Get entry layer but do not use it as  it should have already be hit if it was desired
+    // Get entry layer but do not use it as  it should have already be hit if it
+    // was desired
     associatedLayer = trackingVolume.associatedLayer(combinedState->position());
-    associatedLayer = associatedLayer ? associatedLayer
-                                      : trackingVolume.nextLayer(combinedState->position(),
-                                                                 direction * combinedState->momentum().unit(),
-                                                                 associatedLayer);
+    associatedLayer =
+      associatedLayer
+        ? associatedLayer
+        : trackingVolume.nextLayer(combinedState->position(),
+                                   direction * combinedState->momentum().unit(),
+                                   associatedLayer);
     ATH_MSG_DEBUG("Found layer in Volume " << layerRZoutput(associatedLayer));
   }
 
-  else if (associatedLayer != destinationLayer && trackingVolume.confinedLayers() &&
+  else if (associatedLayer != destinationLayer &&
+           trackingVolume.confinedLayers() &&
            associatedLayer->layerMaterialProperties()) {
 
-    updatedState = m_materialUpdator->postUpdate(*currentState, *associatedLayer, direction, particleHypothesis);
+    updatedState = m_materialUpdator->postUpdate(
+      *currentState, *associatedLayer, direction, particleHypothesis);
 
     if (!updatedState.empty()) {
-      addMaterialtoVector(cache, associatedLayer, currentState->begin()->first.get());
+      addMaterialtoVector(
+        cache, associatedLayer, currentState->begin()->first.get());
       // Refresh the current state pointer
       currentState = &updatedState;
     }
@@ -769,9 +866,11 @@ Trk::GsfExtrapolator::extrapolateInsideVolume(Cache& cache,
   combinedState = nullptr;
   Trk::MultiComponentState nextState{};
   if (destinationLayer) {
-    // If there are intermediate layers then additional extrapolations need to be done
+    // If there are intermediate layers then additional extrapolations need to
+    // be done
     if (associatedLayer && associatedLayer != destinationLayer) {
-      nextState = extrapolateFromLayerToLayer(cache,
+      nextState = extrapolateFromLayerToLayer(ctx,
+                                              cache,
                                               propagator,
                                               *currentState,
                                               trackingVolume,
@@ -787,29 +886,40 @@ Trk::GsfExtrapolator::extrapolateInsideVolume(Cache& cache,
       }
     }
     // Final extrapolation to destination surface
-    Trk::MultiComponentState returnState = extrapolateToDestinationLayer(cache,
-                                                                         propagator,
-                                                                         *currentState,
-                                                                         surface,
-                                                                         *destinationLayer,
-                                                                         // trackingVolume,
-                                                                         associatedLayer,
-                                                                         direction,
-                                                                         boundaryCheck,
-                                                                         particleHypothesis);
+    Trk::MultiComponentState returnState =
+      extrapolateToDestinationLayer(ctx,
+                                    cache,
+                                    propagator,
+                                    *currentState,
+                                    surface,
+                                    *destinationLayer,
+                                    // trackingVolume,
+                                    associatedLayer,
+                                    direction,
+                                    boundaryCheck,
+                                    particleHypothesis);
     // Set the information for the current layer, surface, tracking volume
     setRecallInformation(cache, surface, *destinationLayer, trackingVolume);
     return returnState;
   }
 
-  // FALLBACK POINT: If no destination layer is found fall-back and extrapolate directly
-  ATH_MSG_DEBUG("extrapolateInsideVolume() could not find the destination layer... propagating "
+  // FALLBACK POINT: If no destination layer is found fall-back and extrapolate
+  // directly
+  ATH_MSG_DEBUG("extrapolateInsideVolume() could not find the destination "
+                "layer... propagating "
                 "directly to surface");
 
   Trk::MultiComponentState returnState =
-    multiStatePropagate(propagator, *currentState, surface, direction, boundaryCheck, particleHypothesis);
-
-  // No destination layer exists so layer recall method cannot be used and should be reset
+    multiStatePropagate(ctx,
+                        propagator,
+                        *currentState,
+                        surface,
+                        direction,
+                        boundaryCheck,
+                        particleHypothesis);
+
+  // No destination layer exists so layer recall method cannot be used and
+  // should be reset
   resetRecallInformation(cache);
 
   return returnState;
@@ -819,25 +929,29 @@ Trk::GsfExtrapolator::extrapolateInsideVolume(Cache& cache,
  * Extrapolate from Layer to Layer
  */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateFromLayerToLayer(Cache& cache,
-                                                  const IPropagator& propagator,
-                                                  const MultiComponentState& multiComponentState,
-                                                  const TrackingVolume& trackingVolume,
-                                                  const Layer* startLayer,
-                                                  const Layer* destinationLayer,
-                                                  PropDirection direction,
-                                                  ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateFromLayerToLayer(
+  const EventContext& ctx,
+  Cache& cache,
+  const IPropagator& propagator,
+  const MultiComponentState& multiComponentState,
+  const TrackingVolume& trackingVolume,
+  const Layer* startLayer,
+  const Layer* destinationLayer,
+  PropDirection direction,
+  ParticleHypothesis particleHypothesis) const
 {
 
   const Trk::Layer* currentLayer = startLayer;
   Trk::MultiComponentState currentState{};
 
-  const Trk::TrackParameters* combinedState = multiComponentState.begin()->first.get();
+  const Trk::TrackParameters* combinedState =
+    multiComponentState.begin()->first.get();
   Amg::Vector3D currentPosition = combinedState->position();
   Amg::Vector3D currentDirection = direction * combinedState->momentum().unit();
 
   // No need to extrapolate to start layer, find the next one
-  const Trk::Layer* nextLayer = currentLayer->nextLayer(currentPosition, currentDirection);
+  const Trk::Layer* nextLayer =
+    currentLayer->nextLayer(currentPosition, currentDirection);
 
   std::set<const Trk::Layer*> layersHit;
   layersHit.insert(currentLayer);
@@ -845,16 +959,28 @@ Trk::GsfExtrapolator::extrapolateFromLayerToLayer(Cache& cache,
   // Begin while loop over all intermediate layers
   while (nextLayer && nextLayer != destinationLayer) {
     layersHit.insert(nextLayer);
-    // Only extrapolate to an intermediate layer if it requires material update... otherwise step
-    // over it
+    // Only extrapolate to an intermediate layer if it requires material
+    // update... otherwise step over it
     if (nextLayer && nextLayer->layerMaterialProperties()) {
 
       if (!currentState.empty()) {
-        currentState = extrapolateToIntermediateLayer(
-          cache, propagator, currentState, *nextLayer, trackingVolume, direction, particleHypothesis);
+        currentState = extrapolateToIntermediateLayer(ctx,
+                                                      cache,
+                                                      propagator,
+                                                      currentState,
+                                                      *nextLayer,
+                                                      trackingVolume,
+                                                      direction,
+                                                      particleHypothesis);
       } else {
-        currentState = extrapolateToIntermediateLayer(
-          cache, propagator, multiComponentState, *nextLayer, trackingVolume, direction, particleHypothesis);
+        currentState = extrapolateToIntermediateLayer(ctx,
+                                                      cache,
+                                                      propagator,
+                                                      multiComponentState,
+                                                      *nextLayer,
+                                                      trackingVolume,
+                                                      direction,
+                                                      particleHypothesis);
       }
     }
 
@@ -873,8 +999,10 @@ Trk::GsfExtrapolator::extrapolateFromLayerToLayer(Cache& cache,
     }
   }
 
-  if (destinationLayer && nextLayer != destinationLayer && !currentState.empty()) {
-    ATH_MSG_DEBUG("extrapolateFromLayerToLayer failed to reach destination layer..  return nullptr");
+  if (destinationLayer && nextLayer != destinationLayer &&
+      !currentState.empty()) {
+    ATH_MSG_DEBUG("extrapolateFromLayerToLayer failed to reach destination "
+                  "layer..  return nullptr");
     ATH_MSG_DEBUG("Current layer     " << layerRZoutput(currentLayer));
     ATH_MSG_DEBUG("NextLayer layer   " << layerRZoutput(nextLayer));
     ATH_MSG_DEBUG("Destination layer " << layerRZoutput(destinationLayer));
@@ -889,16 +1017,19 @@ Trk::GsfExtrapolator::extrapolateFromLayerToLayer(Cache& cache,
  */
 
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateToIntermediateLayer(Cache& cache,
-                                                     const Trk::IPropagator& propagator,
-                                                     const Trk::MultiComponentState& multiComponentState,
-                                                     const Trk::Layer& layer,
-                                                     const Trk::TrackingVolume& trackingVolume,
-                                                     Trk::PropDirection direction,
-                                                     Trk::ParticleHypothesis particleHypothesis,
-                                                     bool doPerpCheck) const
+Trk::GsfExtrapolator::extrapolateToIntermediateLayer(
+  const EventContext& ctx,
+  Cache& cache,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Layer& layer,
+  const Trk::TrackingVolume& trackingVolume,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis,
+  bool doPerpCheck) const
 {
-  const Trk::Surface* startSurface = &(multiComponentState.begin()->first->associatedSurface());
+  const Trk::Surface* startSurface =
+    &(multiComponentState.begin()->first->associatedSurface());
   if (startSurface) {
     const Trk::Layer* startLayer = startSurface->associatedLayer();
     ATH_MSG_DEBUG("Starting Layer: " << layerRZoutput(startLayer));
@@ -911,7 +1042,13 @@ Trk::GsfExtrapolator::extrapolateToIntermediateLayer(Cache& cache,
 
   // Propagate over all components
   Trk::MultiComponentState destinationState =
-    multiStatePropagate(propagator, *initialState, layer.surfaceRepresentation(), direction, true, particleHypothesis);
+    multiStatePropagate(ctx,
+                        propagator,
+                        *initialState,
+                        layer.surfaceRepresentation(),
+                        direction,
+                        true,
+                        particleHypothesis);
 
   if (destinationState.empty()) {
     ATH_MSG_DEBUG("Multi-state propagation failed... Returning 0!");
@@ -919,18 +1056,27 @@ Trk::GsfExtrapolator::extrapolateToIntermediateLayer(Cache& cache,
   }
 
   // the layer has been intersected
-  // ------------------------------------------------------------------------ check for radial
-  // direction change ---------------------------------------------------------------------
+  // ------------------------------------------------------------------------
+  // check for radial direction change
+  // ---------------------------------------------------------------------
   int rDirection = radialDirection(multiComponentState, direction);
   int newrDirection = radialDirection(destinationState, direction);
   if (newrDirection != rDirection && doPerpCheck) {
-    // it is unfortunate that the cancelling could invalidate the material collection
-    ATH_MSG_DEBUG("  [!] Perpendicular direction of track has changed -- checking");
+    // it is unfortunate that the cancelling could invalidate the material
+    // collection
+    ATH_MSG_DEBUG(
+      "  [!] Perpendicular direction of track has changed -- checking");
     // reset the nextParameters if the radial change is not allowed
     //  resetting is ok - since the parameters are in the garbage bin already
-    if (!radialDirectionCheck(
-          propagator, multiComponentState, destinationState, trackingVolume, direction, particleHypothesis)) {
-      ATH_MSG_DEBUG("  [+] Perpendicular direction check cancelled this layer intersection.");
+    if (!radialDirectionCheck(ctx,
+                              propagator,
+                              multiComponentState,
+                              destinationState,
+                              trackingVolume,
+                              direction,
+                              particleHypothesis)) {
+      ATH_MSG_DEBUG("  [+] Perpendicular direction check cancelled this layer "
+                    "intersection.");
       return {};
     }
   }
@@ -939,14 +1085,18 @@ Trk::GsfExtrapolator::extrapolateToIntermediateLayer(Cache& cache,
      Material effects
      ------------------------------------- */
 
-  Trk::MultiComponentState updatedState =
-    m_materialUpdator->update(destinationState, layer, direction, particleHypothesis);
+  Trk::MultiComponentState updatedState = m_materialUpdator->update(
+    destinationState, layer, direction, particleHypothesis);
 
   if (updatedState.empty()) {
     return destinationState;
   }
 
-  addMaterialtoVector(cache, &layer, updatedState.begin()->first.get(), direction, particleHypothesis);
+  addMaterialtoVector(cache,
+                      &layer,
+                      updatedState.begin()->first.get(),
+                      direction,
+                      particleHypothesis);
 
   return updatedState;
 }
@@ -955,16 +1105,18 @@ Trk::GsfExtrapolator::extrapolateToIntermediateLayer(Cache& cache,
    Extrapolate to Destination Layer
 */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateToDestinationLayer(Cache& cache,
-                                                    const Trk::IPropagator& propagator,
-                                                    const Trk::MultiComponentState& multiComponentState,
-                                                    const Trk::Surface& surface,
-                                                    const Trk::Layer& layer,
-                                                    // const Trk::TrackingVolume& trackingVolume,
-                                                    const Trk::Layer* startLayer,
-                                                    Trk::PropDirection direction,
-                                                    const Trk::BoundaryCheck& boundaryCheck,
-                                                    Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateToDestinationLayer(
+  const EventContext& ctx,
+  Cache& cache,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  const Trk::Layer& layer,
+  // const Trk::TrackingVolume& trackingVolume,
+  const Trk::Layer* startLayer,
+  Trk::PropDirection direction,
+  const Trk::BoundaryCheck& boundaryCheck,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
   const Trk::MultiComponentState* initialState = &multiComponentState;
@@ -972,17 +1124,29 @@ Trk::GsfExtrapolator::extrapolateToDestinationLayer(Cache& cache,
 
   // Propagate over all components
   Trk::MultiComponentState destinationState =
-    multiStatePropagate(propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
+    multiStatePropagate(ctx,
+                        propagator,
+                        multiComponentState,
+                        surface,
+                        direction,
+                        boundaryCheck,
+                        particleHypothesis);
 
-  // Require a fall-back if the initial state is close to the destination surface then a fall-back
-  // solution is required
+  // Require a fall-back if the initial state is close to the destination
+  // surface then a fall-back solution is required
 
   if (destinationState.empty()) {
     combinedState = initialState->begin()->first.get();
-    if (surface.isOnSurface(combinedState->position(), true, 0.5 * layer.thickness())) {
+    if (surface.isOnSurface(
+          combinedState->position(), true, 0.5 * layer.thickness())) {
       ATH_MSG_DEBUG("Initiating fall-back from failed propagation");
-      destinationState =
-        multiStatePropagate(propagator, *initialState, surface, Trk::anyDirection, boundaryCheck, particleHypothesis);
+      destinationState = multiStatePropagate(ctx,
+                                             propagator,
+                                             *initialState,
+                                             surface,
+                                             Trk::anyDirection,
+                                             boundaryCheck,
+                                             particleHypothesis);
     }
     combinedState = nullptr;
     if (destinationState.empty()) {
@@ -997,14 +1161,19 @@ Trk::GsfExtrapolator::extrapolateToDestinationLayer(Cache& cache,
 
   Trk::MultiComponentState updatedState{};
   if (startLayer != &layer) {
-    updatedState = m_materialUpdator->preUpdate(destinationState, layer, direction, particleHypothesis);
+    updatedState = m_materialUpdator->preUpdate(
+      destinationState, layer, direction, particleHypothesis);
   }
 
-  if (updatedState.empty())
+  if (updatedState.empty()) {
     return destinationState;
+  }
 
-  addMaterialtoVector(cache, &layer, updatedState.begin()->first.get(), direction, particleHypothesis);
-
+  addMaterialtoVector(cache,
+                      &layer,
+                      updatedState.begin()->first.get(),
+                      direction,
+                      particleHypothesis);
   return updatedState;
 }
 
@@ -1012,12 +1181,14 @@ Trk::GsfExtrapolator::extrapolateToDestinationLayer(Cache& cache,
  * Extrapolate based on material on active surfaces
  */
 Trk::MultiComponentState
-Trk::GsfExtrapolator::extrapolateSurfaceBasedMaterialEffects(const IPropagator& propagator,
-                                                             const MultiComponentState& multiComponentState,
-                                                             const Surface& surface,
-                                                             PropDirection direction,
-                                                             const BoundaryCheck& boundaryCheck,
-                                                             ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::extrapolateSurfaceBasedMaterialEffects(
+  const EventContext& ctx,
+  const IPropagator& propagator,
+  const MultiComponentState& multiComponentState,
+  const Surface& surface,
+  PropDirection direction,
+  const BoundaryCheck& boundaryCheck,
+  ParticleHypothesis particleHypothesis) const
 {
 
   /* -------------------------------------
@@ -1026,14 +1197,20 @@ Trk::GsfExtrapolator::extrapolateSurfaceBasedMaterialEffects(const IPropagator&
 
   // Check the multi-component state is populated
   if (multiComponentState.empty()) {
-    ATH_MSG_WARNING("Multi component state passed to extrapolateInsideVolume is not populated... returning 0");
+    ATH_MSG_WARNING("Multi component state passed to extrapolateInsideVolume "
+                    "is not populated... returning 0");
     return {};
   }
 
   // const Trk::TrackingVolume* currentVolume = m_navigator->highestVolume();
 
-  Trk::MultiComponentState lastState =
-    multiStatePropagate(propagator, multiComponentState, surface, direction, boundaryCheck, particleHypothesis);
+  Trk::MultiComponentState lastState = multiStatePropagate(ctx,
+                                                           propagator,
+                                                           multiComponentState,
+                                                           surface,
+                                                           direction,
+                                                           boundaryCheck,
+                                                           particleHypothesis);
 
   if (lastState.empty()) {
     ATH_MSG_DEBUG("Propagated state is empty... returning 0");
@@ -1045,7 +1222,8 @@ Trk::GsfExtrapolator::extrapolateSurfaceBasedMaterialEffects(const IPropagator&
      ---------------------------------------- */
 
   Trk::MultiComponentState finalState =
-    m_materialUpdator->simplifiedMaterialUpdate(lastState, direction, particleHypothesis);
+    m_materialUpdator->simplifiedMaterialUpdate(
+      lastState, direction, particleHypothesis);
   if (finalState.empty()) {
     ATH_MSG_DEBUG("Simple material effects updator failed");
     return lastState;
@@ -1058,33 +1236,44 @@ Trk::GsfExtrapolator::extrapolateSurfaceBasedMaterialEffects(const IPropagator&
  */
 
 Trk::MultiComponentState
-Trk::GsfExtrapolator::multiStatePropagate(const IPropagator& propagator,
-                                          const Trk::MultiComponentState& multiComponentState,
-                                          const Surface& surface,
-                                          PropDirection direction,
-                                          const BoundaryCheck& boundaryCheck,
-                                          ParticleHypothesis particleHypothesis) const
+Trk::GsfExtrapolator::multiStatePropagate(
+  const EventContext& ctx,
+  const IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Surface& surface,
+  PropDirection direction,
+  const BoundaryCheck& boundaryCheck,
+  ParticleHypothesis particleHypothesis) const
 {
 
-  ATH_MSG_DEBUG("GSF multiStatePropagate() propagating " << multiComponentState.size() << " components\n"
-                                                         << "\t\t\t\t\t...Propagating to surface [r,z] ["
-                                                         << surface.center().perp() << ",\t" << surface.center().z()
-                                                         << ']');
+  ATH_MSG_DEBUG("GSF multiStatePropagate() propagating "
+                << multiComponentState.size() << " components\n"
+                << "\t\t\t\t\t...Propagating to surface [r,z] ["
+                << surface.center().perp() << ",\t" << surface.center().z()
+                << ']');
   const Trk::Layer* layer = surface.associatedLayer();
   ATH_MSG_DEBUG("...associated layer to surface " << layerRZoutput(layer));
 
   Trk::MultiComponentState propagatedState{};
   propagatedState.reserve(multiComponentState.size());
-  Trk::MultiComponentState::const_iterator component = multiComponentState.begin();
+  Trk::MultiComponentState::const_iterator component =
+    multiComponentState.begin();
   double sumw(0); // HACK variable to avoid propagation errors
   for (; component != multiComponentState.end(); ++component) {
     const Trk::TrackParameters* currentParameters = component->first.get();
     if (!currentParameters) {
-      ATH_MSG_DEBUG("Component parameters not defined... component will not be propagated... continuing");
+      ATH_MSG_DEBUG("Component parameters not defined... component will not be "
+                    "propagated... continuing");
       continue;
     }
-    Trk::TrackParameters* propagatedParameters = propagator.propagate(
-      *currentParameters, surface, direction, boundaryCheck, m_fieldProperties, particleHypothesis);
+    Trk::TrackParameters* propagatedParameters =
+      propagator.propagate(ctx,
+                           *currentParameters,
+                           surface,
+                           direction,
+                           boundaryCheck,
+                           m_fieldProperties,
+                           particleHypothesis);
     if (!propagatedParameters) {
       ATH_MSG_DEBUG("Propagation of component failed... continuing");
       continue;
@@ -1094,7 +1283,8 @@ Trk::GsfExtrapolator::multiStatePropagate(const IPropagator& propagator,
     propagatedState.emplace_back(propagatedParameters, component->second);
   }
 
-  ATH_MSG_DEBUG("GSF multiStatePropagate() propagated  " << propagatedState.size() << "components");
+  ATH_MSG_DEBUG("GSF multiStatePropagate() propagated  "
+                << propagatedState.size() << "components");
   // Protect against empty propagation
   if (propagatedState.empty() || sumw < 0.1) {
     ATH_MSG_DEBUG("multiStatePropagate failed... ");
@@ -1107,29 +1297,36 @@ Trk::GsfExtrapolator::multiStatePropagate(const IPropagator& propagator,
  * PropagatorType
  */
 unsigned int
-Trk::GsfExtrapolator::propagatorType(const Trk::TrackingVolume& trackingVolume) const
+Trk::GsfExtrapolator::propagatorType(
+  const Trk::TrackingVolume& trackingVolume) const
 {
   if (m_propagatorStickyConfiguration) {
-    if (m_propagators.size() > m_propagatorConfigurationLevel)
+    if (m_propagators.size() > m_propagatorConfigurationLevel) {
       return m_propagatorConfigurationLevel;
-    ATH_MSG_WARNING("Misconfigured propagator type, set to " << m_propagatorConfigurationLevel << "->0");
+    }
+    ATH_MSG_WARNING("Misconfigured propagator type, set to "
+                    << m_propagatorConfigurationLevel << "->0");
     return 0;
   }
 
   // Determine what sort of magnetic field is present
   unsigned int magneticFieldMode = m_fieldProperties.magneticFieldMode();
 
-  // Chose between runge-kutta and step propagators depending on field magnetic field and material
-  // properties ST : the following check may fail as the dEdX is often dummy for dense volumes -
-  // switch to rho or zOverAtimesRho ?
-  unsigned int propagatorMode = (magneticFieldMode > 1 && fabs(trackingVolume.dEdX) < 10e-2) ? 2 : 3;
+  // Chose between runge-kutta and step propagators depending on field magnetic
+  // field and material properties ST : the following check may fail as the dEdX
+  // is often dummy for dense volumes - switch to rho or zOverAtimesRho ?
+  unsigned int propagatorMode =
+    (magneticFieldMode > 1 && fabs(trackingVolume.dEdX) < 10e-2) ? 2 : 3;
 
-  unsigned int returnType =
-    (propagatorMode > m_propagatorConfigurationLevel) ? m_propagatorConfigurationLevel : propagatorMode;
+  unsigned int returnType = (propagatorMode > m_propagatorConfigurationLevel)
+                              ? m_propagatorConfigurationLevel
+                              : propagatorMode;
 
-  if (m_propagators.size() > returnType)
+  if (m_propagators.size() > returnType) {
     return returnType;
-  ATH_MSG_WARNING("Misconfigured propagator type, set to " << returnType << "->0");
+  }
+  ATH_MSG_WARNING("Misconfigured propagator type, set to " << returnType
+                                                           << "->0");
   return 0;
 }
 
@@ -1138,30 +1335,37 @@ Trk::GsfExtrapolator::propagatorType(const Trk::TrackingVolume& trackingVolume)
  */
 
 void
-Trk::GsfExtrapolator::initialiseNavigation(Cache& cache,
-                                           const Trk::IPropagator& propagator,
-                                           const Trk::MultiComponentState& multiComponentState,
-                                           const Trk::Surface& surface,
-                                           const Trk::Layer*& currentLayer,
-                                           const Trk::TrackingVolume*& currentVolume,
-                                           const Trk::TrackingVolume*& destinationVolume,
-                                           const Trk::TrackParameters*& referenceParameters,
-                                           Trk::PropDirection direction) const
+Trk::GsfExtrapolator::initialiseNavigation(
+  const EventContext& ctx,
+  Cache& cache,
+  const Trk::IPropagator& propagator,
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Surface& surface,
+  const Trk::Layer*& currentLayer,
+  const Trk::TrackingVolume*& currentVolume,
+  const Trk::TrackingVolume*& destinationVolume,
+  const Trk::TrackParameters*& referenceParameters,
+  Trk::PropDirection direction) const
 {
 
   ATH_MSG_DEBUG("initialiseNavigation !!!");
   // Empty the garbage bin
-  ATH_MSG_DEBUG("Destination to surface [r,z] [" << surface.center().perp() << ",\t" << surface.center().z() << ']');
+  ATH_MSG_DEBUG("Destination to surface [r,z] ["
+                << surface.center().perp() << ",\t" << surface.center().z()
+                << ']');
   emptyGarbageBins(cache);
-  const Trk::TrackParameters* combinedState = multiComponentState.begin()->first.get();
+  const Trk::TrackParameters* combinedState =
+    multiComponentState.begin()->first.get();
   /* =============================================
      Look for current volume
      ============================================= */
   // 1. See if the current layer is associated with a tracking volume
 
   const Trk::Surface* associatedSurface = &(combinedState->associatedSurface());
-  currentLayer = associatedSurface ? associatedSurface->associatedLayer() : currentLayer;
-  currentVolume = currentLayer ? currentLayer->enclosingTrackingVolume() : currentVolume;
+  currentLayer =
+    associatedSurface ? associatedSurface->associatedLayer() : currentLayer;
+  currentVolume =
+    currentLayer ? currentLayer->enclosingTrackingVolume() : currentVolume;
 
   // If the association method failed then try the recall method
 
@@ -1175,7 +1379,9 @@ Trk::GsfExtrapolator::initialiseNavigation(Cache& cache,
     // If the recall method fails then the cashed information needs to be reset
     resetRecallInformation(cache);
     currentVolume = m_navigator->volume(combinedState->position());
-    currentLayer = (currentVolume) ? currentVolume->associatedLayer(combinedState->position()) : nullptr;
+    currentLayer = (currentVolume)
+                     ? currentVolume->associatedLayer(combinedState->position())
+                     : nullptr;
   }
   /* =============================================
      Determine the resolved direction
@@ -1187,13 +1393,19 @@ Trk::GsfExtrapolator::initialiseNavigation(Cache& cache,
       ATH_MSG_DEBUG("Any direction initialisation");
     }
     referenceParameters =
-      currentVolume ? propagator.propagateParameters(*combinedState, surface, direction, false, m_fieldProperties)
-                    : nullptr;
-    // These parameters will need to be deleted later. Add to list of garbage to be collected
+      currentVolume
+        ? propagator.propagateParameters(
+            ctx, *combinedState, surface, direction, false, m_fieldProperties)
+        : nullptr;
+    // These parameters will need to be deleted later. Add to list of garbage to
+    // be collected
     throwIntoGarbageBin(cache, referenceParameters);
     if (referenceParameters) {
-      Amg::Vector3D surfaceDirection(referenceParameters->position() - combinedState->position());
-      direction = (surfaceDirection.dot(combinedState->momentum()) > 0.) ? Trk::alongMomentum : Trk::oppositeMomentum;
+      Amg::Vector3D surfaceDirection(referenceParameters->position() -
+                                     combinedState->position());
+      direction = (surfaceDirection.dot(combinedState->momentum()) > 0.)
+                    ? Trk::alongMomentum
+                    : Trk::oppositeMomentum;
     }
   }
 
@@ -1202,9 +1414,12 @@ Trk::GsfExtrapolator::initialiseNavigation(Cache& cache,
      ============================================= */
 
   // 1. See if the destination layer is associated with a tracking volume
-  destinationVolume = surface.associatedLayer() ? surface.associatedLayer()->enclosingTrackingVolume() : nullptr;
-  if (!surface.associatedLayer())
+  destinationVolume = surface.associatedLayer()
+                        ? surface.associatedLayer()->enclosingTrackingVolume()
+                        : nullptr;
+  if (!surface.associatedLayer()) {
     ATH_MSG_DEBUG("No layer associated to the surface");
+  }
 
   // 2. See if there is a cashed recall surface
   if (!destinationVolume && &surface == cache.m_recallSurface) {
@@ -1212,9 +1427,12 @@ Trk::GsfExtrapolator::initialiseNavigation(Cache& cache,
     // If no reference parameters are defined, then determine them
     if (!referenceParameters) {
       referenceParameters =
-        currentVolume ? propagator.propagateParameters(*combinedState, surface, direction, false, m_fieldProperties)
-                      : nullptr;
-      // These parameters will need to be deleted later. Add to list of garbage to be collected
+        currentVolume
+          ? propagator.propagateParameters(
+              ctx, *combinedState, surface, direction, false, m_fieldProperties)
+          : nullptr;
+      // These parameters will need to be deleted later. Add to list of garbage
+      // to be collected
       throwIntoGarbageBin(cache, referenceParameters);
     }
 
@@ -1223,16 +1441,20 @@ Trk::GsfExtrapolator::initialiseNavigation(Cache& cache,
     // If no reference parameters are defined, then determine them
     if (!referenceParameters) {
       referenceParameters =
-        currentVolume ? propagator.propagateParameters(*combinedState, surface, direction, false, m_fieldProperties)
-                      : nullptr;
-      // These parameters will need to be deleted later. Add to list of garbage to be collected
+        currentVolume
+          ? propagator.propagateParameters(
+              ctx, *combinedState, surface, direction, false, m_fieldProperties)
+          : nullptr;
+      // These parameters will need to be deleted later. Add to list of garbage
+      // to be collected
       throwIntoGarbageBin(cache, referenceParameters);
     }
     // Global search of tracking geometry to find the destination volume
     if (referenceParameters) {
       destinationVolume = m_navigator->volume(referenceParameters->position());
     }
-    // If destination volume is still not found then global search based on surface position
+    // If destination volume is still not found then global search based on
+    // surface position
     else {
       destinationVolume = m_navigator->volume(surface.globalReferencePoint());
     }
@@ -1264,22 +1486,30 @@ Trk::GsfExtrapolator::addMaterialtoVector(Cache& cache,
   // Get the surface associated with the parameters
   const Trk::Surface* surface = &(nextPar->associatedSurface());
 
-  // Only utilise the reference material if an associated detector element exists
+  // Only utilise the reference material if an associated detector element
+  // exists
   if (surface && surface->associatedDetectorElement()) {
 
     // Get the layer material properties
-    const Trk::LayerMaterialProperties* layerMaterial = nextLayer->layerMaterialProperties();
+    const Trk::LayerMaterialProperties* layerMaterial =
+      nextLayer->layerMaterialProperties();
 
     // Assign the material properties
-    materialProperties = layerMaterial ? layerMaterial->fullMaterial(nextPar->position()) : nullptr;
+    materialProperties = layerMaterial
+                           ? layerMaterial->fullMaterial(nextPar->position())
+                           : nullptr;
 
     // Determine the pathCorrection if the material properties exist
-    pathcorr = materialProperties ? 1. / fabs(surface->normal().dot(nextPar->momentum().unit())) : 0.;
+    pathcorr = materialProperties
+                 ? 1. / fabs(surface->normal().dot(nextPar->momentum().unit()))
+                 : 0.;
   }
 
-  // Check that the material properties have been defined - if not define them from the layer
-  // information
-  materialProperties = materialProperties ? materialProperties : nextLayer->fullUpdateMaterialProperties(*nextPar);
+  // Check that the material properties have been defined - if not define them
+  // from the layer information
+  materialProperties = materialProperties
+                         ? materialProperties
+                         : nextLayer->fullUpdateMaterialProperties(*nextPar);
 
   if (!materialProperties) {
     ATH_MSG_DEBUG("addMaterialVector:   layer has no MaterialProperties!! ");
@@ -1289,25 +1519,29 @@ Trk::GsfExtrapolator::addMaterialtoVector(Cache& cache,
   if (cache.m_matstates) {
     pathcorr = pathcorr > 0.
                  ? pathcorr
-                 : nextLayer->surfaceRepresentation().pathCorrection(nextPar->position(), nextPar->momentum());
+                 : nextLayer->surfaceRepresentation().pathCorrection(
+                     nextPar->position(), nextPar->momentum());
     double thick = pathcorr * materialProperties->thickness();
     double dInX0 = thick / materialProperties->x0();
     double absP = 1 / fabs(nextPar->parameters()[Trk::qOverP]);
-    double scatsigma = sqrt(m_msupdators->sigmaSquare(*materialProperties, absP, pathcorr, particle));
-    Trk::ScatteringAngles* newsa =
-      new Trk::ScatteringAngles(0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
+    double scatsigma = sqrt(
+      m_msupdators->sigmaSquare(*materialProperties, absP, pathcorr, particle));
+    Trk::ScatteringAngles* newsa = new Trk::ScatteringAngles(
+      0, 0, scatsigma / sin(nextPar->parameters()[Trk::theta]), scatsigma);
     // energy loss
-    Trk::EnergyLoss* eloss =
-      m_elossupdators->energyLoss(*materialProperties, absP, pathcorr, dir, particle, Trk::addNoise);
+    Trk::EnergyLoss* eloss = m_elossupdators->energyLoss(
+      *materialProperties, absP, pathcorr, dir, particle, Trk::addNoise);
 
     // use curvilinear TPs to simplify retrieval by fitters
-    Trk::CurvilinearParameters* cvlTP =
-      new Trk::CurvilinearParameters(nextPar->position(), nextPar->momentum(), nextPar->charge());
-    Trk::MaterialEffectsOnTrack* mefot =
-      new Trk::MaterialEffectsOnTrack(dInX0, newsa, eloss, cvlTP->associatedSurface());
-    cache.m_matstates->push_back(new TrackStateOnSurface(nullptr, cvlTP, nullptr, mefot));
-    ATH_MSG_DEBUG("addMaterialVector: from layer:" << layerRZoutput(nextLayer) << ". Size is now "
-                                                   << cache.m_matstates->size());
+    Trk::CurvilinearParameters* cvlTP = new Trk::CurvilinearParameters(
+      nextPar->position(), nextPar->momentum(), nextPar->charge());
+    Trk::MaterialEffectsOnTrack* mefot = new Trk::MaterialEffectsOnTrack(
+      dInX0, newsa, eloss, cvlTP->associatedSurface());
+    cache.m_matstates->push_back(
+      new TrackStateOnSurface(nullptr, cvlTP, nullptr, mefot));
+    ATH_MSG_DEBUG("addMaterialVector: from layer:"
+                  << layerRZoutput(nextLayer) << ". Size is now "
+                  << cache.m_matstates->size());
   }
 }
 
@@ -1315,10 +1549,13 @@ std::string
 Trk::GsfExtrapolator::layerRZoutput(const Trk::Layer* lay) const
 {
   std::string result("NULL");
-  if (not lay)
+  if (not lay) {
     return result;
-  result = "[r,z] = [ " + std::to_string(lay->surfaceRepresentation().bounds().r()) + ", " +
-           std::to_string(lay->surfaceRepresentation().center().z()) + " ] - Index ";
+  }
+  result = "[r,z] = [ " +
+           std::to_string(lay->surfaceRepresentation().bounds().r()) + ", " +
+           std::to_string(lay->surfaceRepresentation().center().z()) +
+           " ] - Index ";
   result += std::to_string(lay->layerIndex().value());
   return result;
 }
@@ -1327,28 +1564,34 @@ std::string
 Trk::GsfExtrapolator::positionOutput(const Amg::Vector3D& pos) const
 {
   std::stringstream outStream;
-  outStream << "[r,phi,z] = [ " << pos.perp() << ", " << pos.phi() << ", " << pos.z() << " ]";
+  outStream << "[r,phi,z] = [ " << pos.perp() << ", " << pos.phi() << ", "
+            << pos.z() << " ]";
   return outStream.str();
 }
 
 int
-Trk::GsfExtrapolator::radialDirection(const Trk::MultiComponentState& pars, PropDirection dir) const
+Trk::GsfExtrapolator::radialDirection(const Trk::MultiComponentState& pars,
+                                      PropDirection dir) const
 {
   // safe inbound/outbound estimation
   double prePositionR = pars.begin()->first->position().perp();
   return (prePositionR >
-          (pars.begin()->first->position() + dir * 0.5 * prePositionR * pars.begin()->first->momentum().unit()).perp())
+          (pars.begin()->first->position() +
+           dir * 0.5 * prePositionR * pars.begin()->first->momentum().unit())
+            .perp())
            ? -1
            : 1;
 }
 
 bool
-Trk::GsfExtrapolator::radialDirectionCheck(const IPropagator& prop,
-                                           const MultiComponentState& startParm,
-                                           const MultiComponentState& parsOnLayer,
-                                           const TrackingVolume& tvol,
-                                           PropDirection dir,
-                                           ParticleHypothesis particle) const
+Trk::GsfExtrapolator::radialDirectionCheck(
+  const EventContext& ctx,
+  const IPropagator& prop,
+  const MultiComponentState& startParm,
+  const MultiComponentState& parsOnLayer,
+  const TrackingVolume& tvol,
+  PropDirection dir,
+  ParticleHypothesis particle) const
 {
   const Amg::Vector3D& startPosition = startParm.begin()->first->position();
   const Amg::Vector3D& onLayerPosition = parsOnLayer.begin()->first->position();
@@ -1356,27 +1599,43 @@ Trk::GsfExtrapolator::radialDirectionCheck(const IPropagator& prop,
   // the 3D distance to the layer intersection
   double distToLayer = (startPosition - onLayerPosition).mag();
   // get the innermost contained surface for crosscheck
-  const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>& boundarySurfaces = tvol.boundarySurfaces();
+  const std::vector<SharedObject<const BoundarySurface<TrackingVolume>>>&
+    boundarySurfaces = tvol.boundarySurfaces();
   // only for tubes the crossing makes sense to check for validity
   if (boundarySurfaces.size() == 4) {
     // propagate to the inside surface and compare the distance:
-    // it can be either the next layer from the initial point, or the inner tube boundary surface
-    const Trk::Surface& insideSurface = (boundarySurfaces[Trk::tubeInnerCover].get())->surfaceRepresentation();
+    // it can be either the next layer from the initial point, or the inner tube
+    // boundary surface
+    const Trk::Surface& insideSurface =
+      (boundarySurfaces[Trk::tubeInnerCover].get())->surfaceRepresentation();
     const Trk::TrackParameters* parsOnInsideSurface =
-      prop.propagateParameters(*(startParm.begin()->first), insideSurface, dir, true, m_fieldProperties, particle);
+      prop.propagateParameters(ctx,
+                               *(startParm.begin()->first),
+                               insideSurface,
+                               dir,
+                               true,
+                               m_fieldProperties,
+                               particle);
     double distToInsideSurface =
-      parsOnInsideSurface ? (startPosition - (parsOnInsideSurface->position())).mag() : 10e10;
-
-    ATH_MSG_DEBUG("  Radial direction check start - at " << positionOutput(startPosition));
-    ATH_MSG_DEBUG("  Radial direction check layer - at " << positionOutput(onLayerPosition));
-    if (parsOnInsideSurface)
-      ATH_MSG_DEBUG("  Radial direction check inner - at " << positionOutput(parsOnInsideSurface->position()));
+      parsOnInsideSurface
+        ? (startPosition - (parsOnInsideSurface->position())).mag()
+        : 10e10;
+
+    ATH_MSG_DEBUG("  Radial direction check start - at "
+                  << positionOutput(startPosition));
+    ATH_MSG_DEBUG("  Radial direction check layer - at "
+                  << positionOutput(onLayerPosition));
+    if (parsOnInsideSurface) {
+      ATH_MSG_DEBUG("  Radial direction check inner - at "
+                    << positionOutput(parsOnInsideSurface->position()));
+    }
 
     // memory cleanup (no garbage bin, this is faster)
     delete parsOnInsideSurface;
-    ATH_MSG_DEBUG("  Check radial direction: distance layer / boundary = " << distToLayer << " / "
-                                                                           << distToInsideSurface);
-    // the intersection with the original layer is valid if it is before the inside surface
+    ATH_MSG_DEBUG("  Check radial direction: distance layer / boundary = "
+                  << distToLayer << " / " << distToInsideSurface);
+    // the intersection with the original layer is valid if it is before the
+    // inside surface
     return distToLayer < distToInsideSurface;
   }
   return true;
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialEffectsUpdator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialEffectsUpdator.cxx
index 50017bd0f155d3e7702d15d3d56c1ebd93b4bed1..9657a682b8513f15c507950d39186a9ba9f1e9f8 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialEffectsUpdator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialEffectsUpdator.cxx
@@ -7,7 +7,8 @@
                         ---------------------------------------------
 begin                : Wednesday 9th January 2005
 author               : atkinson,morley,anastopoulos
-decription           : Implementation code for the class GsfMaterialEffectsUpdator
+decription           : Implementation code for the class
+GsfMaterialEffectsUpdator
 ***********************************************************************************/
 
 #include "TrkGaussianSumFilter/GsfMaterialEffectsUpdator.h"
@@ -21,9 +22,10 @@ decription           : Implementation code for the class GsfMaterialEffectsUpdat
 #include "TrkGeometry/Layer.h"
 #include "TrkGeometry/MaterialProperties.h"
 
-Trk::GsfMaterialEffectsUpdator::GsfMaterialEffectsUpdator(const std::string& type,
-                                                          const std::string& name,
-                                                          const IInterface* parent)
+Trk::GsfMaterialEffectsUpdator::GsfMaterialEffectsUpdator(
+  const std::string& type,
+  const std::string& name,
+  const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_useReferenceMaterial(false)
   , m_momentumCut(250. * Gaudi::Units::MeV)
@@ -53,13 +55,15 @@ Trk::GsfMaterialEffectsUpdator::finalize()
 
 /* ============================================================================
    Full update based on layer information
-   ============================================================================ */
+   ============================================================================
+ */
 
 Trk::MultiComponentState
-Trk::GsfMaterialEffectsUpdator::updateState(const Trk::ComponentParameters& componentParameters,
-                                            const Trk::Layer& layer,
-                                            Trk::PropDirection direction,
-                                            Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialEffectsUpdator::updateState(
+  const Trk::ComponentParameters& componentParameters,
+  const Trk::Layer& layer,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
   const Trk::TrackParameters* trackParameters = componentParameters.first.get();
@@ -78,23 +82,32 @@ Trk::GsfMaterialEffectsUpdator::updateState(const Trk::ComponentParameters& comp
     // Get the surface associated with the parameters
     const Trk::Surface* surface = &(trackParameters->associatedSurface());
 
-    // Only utilise the reference material if an associated detector element exists
+    // Only utilise the reference material if an associated detector element
+    // exists
     if (surface && surface->associatedDetectorElement()) {
 
       // Get the layer material properties
-      const Trk::LayerMaterialProperties* layerMaterial = layer.layerMaterialProperties();
+      const Trk::LayerMaterialProperties* layerMaterial =
+        layer.layerMaterialProperties();
 
       // Assign the material properties
-      materialProperties = layerMaterial ? layerMaterial->fullMaterial(trackParameters->position()) : nullptr;
+      materialProperties =
+        layerMaterial ? layerMaterial->fullMaterial(trackParameters->position())
+                      : nullptr;
 
       // Determine the pathCorrection if the material properties exist
-      pathCorrection = materialProperties ? 1. / fabs(surface->normal().dot(trackParameters->momentum().unit())) : 0.;
+      pathCorrection =
+        materialProperties
+          ? 1. / fabs(surface->normal().dot(trackParameters->momentum().unit()))
+          : 0.;
     }
   }
 
-  // Check that the material properties have been defined - if not define them from the layer
-  // information
-  materialProperties = materialProperties ? materialProperties : layer.fullUpdateMaterialProperties(*trackParameters);
+  // Check that the material properties have been defined - if not define them
+  // from the layer information
+  materialProperties = materialProperties
+                         ? materialProperties
+                         : layer.fullUpdateMaterialProperties(*trackParameters);
 
   // Bail out if still no material properties can be found
   if (!materialProperties) {
@@ -104,55 +117,73 @@ Trk::GsfMaterialEffectsUpdator::updateState(const Trk::ComponentParameters& comp
   }
 
   // Define the path correction
-  pathCorrection = pathCorrection > 0. ? pathCorrection
-                                       : layer.surfaceRepresentation().pathCorrection(trackParameters->position(),
-                                                                                      trackParameters->momentum());
-
-  // The pathlength ( in mm ) is the path correction * the thickness of the material
+  pathCorrection =
+    pathCorrection > 0.
+      ? pathCorrection
+      : layer.surfaceRepresentation().pathCorrection(
+          trackParameters->position(), trackParameters->momentum());
+
+  // The pathlength ( in mm ) is the path correction * the thickness of the
+  // material
   double pathLength = pathCorrection * materialProperties->thickness();
 
-  auto updatedState = compute(componentParameters, *materialProperties, pathLength, direction, particleHypothesis);
+  auto updatedState = compute(componentParameters,
+                              *materialProperties,
+                              pathLength,
+                              direction,
+                              particleHypothesis);
 
   return updatedState;
 }
 
 /* ============================================================================
    Full update based on path-length & material properties information
-   ============================================================================ */
+   ============================================================================
+ */
 
 Trk::MultiComponentState
-Trk::GsfMaterialEffectsUpdator::updateState(const Trk::ComponentParameters& componentParameters,
-                                            const Trk::MaterialProperties& materialProperties,
-                                            double pathLength,
-                                            Trk::PropDirection direction,
-                                            Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialEffectsUpdator::updateState(
+  const Trk::ComponentParameters& componentParameters,
+  const Trk::MaterialProperties& materialProperties,
+  double pathLength,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
-  auto updatedState = compute(componentParameters, materialProperties, pathLength, direction, particleHypothesis);
+  auto updatedState = compute(componentParameters,
+                              materialProperties,
+                              pathLength,
+                              direction,
+                              particleHypothesis);
   return updatedState;
 }
 
 /* ============================================================================
    Pre-update based on layer information
-   ============================================================================ */
+   ============================================================================
+ */
 Trk::MultiComponentState
-Trk::GsfMaterialEffectsUpdator::preUpdateState(const Trk::ComponentParameters& componentParameters,
-                                               const Trk::Layer& layer,
-                                               Trk::PropDirection direction,
-                                               Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialEffectsUpdator::preUpdateState(
+  const Trk::ComponentParameters& componentParameters,
+  const Trk::Layer& layer,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
-  ATH_MSG_DEBUG("Material effects update prior to propagation using layer information and particle hypothesis: "
+  ATH_MSG_DEBUG("Material effects update prior to propagation using layer "
+                "information and particle hypothesis: "
                 << particleHypothesis);
 
   const Trk::TrackParameters* trackParameters = componentParameters.first.get();
 
   if (!trackParameters) {
-    ATH_MSG_ERROR("Trying to update component without trackParameters... returing 0!");
+    ATH_MSG_ERROR(
+      "Trying to update component without trackParameters... returing 0!");
     return {};
   }
 
   // Get the pre-update factor
-  double preUpdateFactor = layer.preUpdateMaterialFactor(*trackParameters, direction);
+  double preUpdateFactor =
+    layer.preUpdateMaterialFactor(*trackParameters, direction);
 
   // Bail if the pre-update factor is small
   if (preUpdateFactor < 0.01) {
@@ -169,70 +200,92 @@ Trk::GsfMaterialEffectsUpdator::preUpdateState(const Trk::ComponentParameters& c
     // Get the surface associated with the parameters
     const Trk::Surface* surface = &(trackParameters->associatedSurface());
 
-    // Only utilise the reference material if an associated detector element exists
+    // Only utilise the reference material if an associated detector element
+    // exists
     if (surface && surface->associatedDetectorElement()) {
 
       // Get the layer material properties
-      const Trk::LayerMaterialProperties* layerMaterial = layer.layerMaterialProperties();
+      const Trk::LayerMaterialProperties* layerMaterial =
+        layer.layerMaterialProperties();
 
       // Assign the material properties
-      materialProperties = layerMaterial ? layerMaterial->fullMaterial(trackParameters->position()) : nullptr;
+      materialProperties =
+        layerMaterial ? layerMaterial->fullMaterial(trackParameters->position())
+                      : nullptr;
 
       // Determine the pathCorrection if the material properties exist
-      pathCorrection = materialProperties ? 1. / fabs(surface->normal().dot(trackParameters->momentum().unit())) : 0.;
+      pathCorrection =
+        materialProperties
+          ? 1. / fabs(surface->normal().dot(trackParameters->momentum().unit()))
+          : 0.;
     }
   }
 
-  // Check that the material properties have been defined - if not define them from the layer
-  // information
-  materialProperties = materialProperties ? materialProperties : layer.fullUpdateMaterialProperties(*trackParameters);
+  // Check that the material properties have been defined - if not define them
+  // from the layer information
+  materialProperties = materialProperties
+                         ? materialProperties
+                         : layer.fullUpdateMaterialProperties(*trackParameters);
 
   // Bail out if still no material properties can be found
   if (!materialProperties) {
     Trk::MultiComponentState clonedMultiComponentState{};
-    clonedMultiComponentState.emplace_back(componentParameters.first->clone(), componentParameters.second);
+    clonedMultiComponentState.emplace_back(componentParameters.first->clone(),
+                                           componentParameters.second);
     return clonedMultiComponentState;
   }
 
   // Define the path correction
-  pathCorrection = pathCorrection > 0. ? pathCorrection
-                                       : layer.surfaceRepresentation().pathCorrection(trackParameters->position(),
-                                                                                      trackParameters->momentum());
+  pathCorrection =
+    pathCorrection > 0.
+      ? pathCorrection
+      : layer.surfaceRepresentation().pathCorrection(
+          trackParameters->position(), trackParameters->momentum());
 
   // Scale the correction by the pre-update factor
   pathCorrection *= preUpdateFactor;
 
-  // The pathlength ( in mm ) is the path correction * the thickness of the material
+  // The pathlength ( in mm ) is the path correction * the thickness of the
+  // material
   double pathLength = pathCorrection * materialProperties->thickness();
 
-  auto updatedState = compute(componentParameters, *materialProperties, pathLength, direction, particleHypothesis);
+  auto updatedState = compute(componentParameters,
+                              *materialProperties,
+                              pathLength,
+                              direction,
+                              particleHypothesis);
 
   return updatedState;
 }
 
 /* ============================================================================
    Post-update based on layer information
-   ============================================================================ */
+   ============================================================================
+ */
 
 Trk::MultiComponentState
-Trk::GsfMaterialEffectsUpdator::postUpdateState(const Trk::ComponentParameters& componentParameters,
-                                                const Layer& layer,
-                                                PropDirection direction,
-                                                ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialEffectsUpdator::postUpdateState(
+  const Trk::ComponentParameters& componentParameters,
+  const Layer& layer,
+  PropDirection direction,
+  ParticleHypothesis particleHypothesis) const
 {
 
-  ATH_MSG_DEBUG("Material effects update after propagation using layer information and particle hypothesis: "
+  ATH_MSG_DEBUG("Material effects update after propagation using layer "
+                "information and particle hypothesis: "
                 << particleHypothesis);
 
   Trk::TrackParameters* trackParameters = componentParameters.first.get();
 
   if (!trackParameters) {
-    ATH_MSG_ERROR("Trying to update component without trackParameters... returing component!");
+    ATH_MSG_ERROR("Trying to update component without trackParameters... "
+                  "returing component!");
     return {};
   }
 
   // Get the post-update factor
-  double postUpdateFactor = layer.postUpdateMaterialFactor(*trackParameters, direction);
+  double postUpdateFactor =
+    layer.postUpdateMaterialFactor(*trackParameters, direction);
 
   // Bail if the postUpdateFactor is small
   if (postUpdateFactor < 0.01) {
@@ -247,55 +300,73 @@ Trk::GsfMaterialEffectsUpdator::postUpdateState(const Trk::ComponentParameters&
     // Get the surface associated with the parameters
     const Trk::Surface* surface = &(trackParameters->associatedSurface());
 
-    // Only utilise the reference material if an associated detector element exists
+    // Only utilise the reference material if an associated detector element
+    // exists
     if (surface && surface->associatedDetectorElement()) {
 
       // Get the layer material properties
-      const Trk::LayerMaterialProperties* layerMaterial = layer.layerMaterialProperties();
+      const Trk::LayerMaterialProperties* layerMaterial =
+        layer.layerMaterialProperties();
 
       // Assign the material properties
-      materialProperties = layerMaterial ? layerMaterial->fullMaterial(trackParameters->position()) : nullptr;
+      materialProperties =
+        layerMaterial ? layerMaterial->fullMaterial(trackParameters->position())
+                      : nullptr;
 
       // Determine the pathCorrection if the material properties exist
-      pathCorrection = materialProperties ? 1. / fabs(surface->normal().dot(trackParameters->momentum().unit())) : 0.;
+      pathCorrection =
+        materialProperties
+          ? 1. / fabs(surface->normal().dot(trackParameters->momentum().unit()))
+          : 0.;
     }
   }
 
-  // Check that the material properties have been defined - if not define them from the layer
-  // information
-  materialProperties = materialProperties ? materialProperties : layer.fullUpdateMaterialProperties(*trackParameters);
+  // Check that the material properties have been defined - if not define them
+  // from the layer information
+  materialProperties = materialProperties
+                         ? materialProperties
+                         : layer.fullUpdateMaterialProperties(*trackParameters);
 
   // Bail out if still no material properties can be found
   if (!materialProperties) {
     Trk::MultiComponentState clonedMultiComponentState{};
-    clonedMultiComponentState.emplace_back(componentParameters.first->clone(), componentParameters.second);
+    clonedMultiComponentState.emplace_back(componentParameters.first->clone(),
+                                           componentParameters.second);
     return clonedMultiComponentState;
   }
 
   // Define the path correction
-  pathCorrection = pathCorrection > 0. ? pathCorrection
-                                       : layer.surfaceRepresentation().pathCorrection(trackParameters->position(),
-                                                                                      trackParameters->momentum());
+  pathCorrection =
+    pathCorrection > 0.
+      ? pathCorrection
+      : layer.surfaceRepresentation().pathCorrection(
+          trackParameters->position(), trackParameters->momentum());
   // Scale the correction by the pre-update factor
   pathCorrection *= postUpdateFactor;
 
-  // The pathlength ( in mm ) is the path correction * the thickness of the material
+  // The pathlength ( in mm ) is the path correction * the thickness of the
+  // material
   double pathLength = pathCorrection * materialProperties->thickness();
 
-  return compute(componentParameters, *materialProperties, pathLength, direction, particleHypothesis);
-
+  return compute(componentParameters,
+                 *materialProperties,
+                 pathLength,
+                 direction,
+                 particleHypothesis);
 }
 
 /* ============================================================================
    Compute method
-   ============================================================================ */
+   ============================================================================
+ */
 
 Trk::MultiComponentState
-Trk::GsfMaterialEffectsUpdator::compute(const Trk::ComponentParameters& componentParameters,
-                                        const Trk::MaterialProperties& materialProperties,
-                                        double pathLength,
-                                        Trk::PropDirection direction,
-                                        Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialEffectsUpdator::compute(
+  const Trk::ComponentParameters& componentParameters,
+  const Trk::MaterialProperties& materialProperties,
+  double pathLength,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
   double momentum = componentParameters.first->momentum().mag();
@@ -303,7 +374,8 @@ Trk::GsfMaterialEffectsUpdator::compute(const Trk::ComponentParameters& componen
   if (momentum <= m_momentumCut) {
     ATH_MSG_DEBUG("Ignoring material effects... Momentum too low");
     Trk::MultiComponentState clonedMultiComponentState{};
-    clonedMultiComponentState.emplace_back(componentParameters.first->clone(), componentParameters.second);
+    clonedMultiComponentState.emplace_back(componentParameters.first->clone(),
+                                           componentParameters.second);
     return clonedMultiComponentState;
   }
 
@@ -316,11 +388,17 @@ Trk::GsfMaterialEffectsUpdator::compute(const Trk::ComponentParameters& componen
   const AmgSymMatrix(5)* measuredCov = trackParameters->covariance();
 
   Trk::IMultiStateMaterialEffects::Cache cache;
-  m_materialEffects->compute(cache, componentParameters, materialProperties, pathLength, direction, particleHypothesis);
+  m_materialEffects->compute(cache,
+                             componentParameters,
+                             materialProperties,
+                             pathLength,
+                             direction,
+                             particleHypothesis);
 
   // check all vectors have the same size
   if (cache.weights.size() != cache.deltaPs.size()) {
-    ATH_MSG_ERROR("Inconsistent number of components in the updator!!! return nullptr");
+    ATH_MSG_ERROR(
+      "Inconsistent number of components in the updator!!! return nullptr");
     return {};
   }
 
@@ -332,25 +410,28 @@ Trk::GsfMaterialEffectsUpdator::compute(const Trk::ComponentParameters& componen
   for (; componentIndex < cache.weights.size(); ++componentIndex) {
     AmgVector(5) updatedStateVector = trackParameters->parameters();
 
-    // Adjust the momentum of the component's parameters vector here. Check to make sure update is
-    // good.
+    // Adjust the momentum of the component's parameters vector here. Check to
+    // make sure update is good.
     if (!updateP(updatedStateVector, cache.deltaPs[componentIndex])) {
       ATH_MSG_ERROR("Cannot update state vector momentum!!! return nullptr");
       return {};
     }
 
     AmgSymMatrix(5)* updatedCovariance = nullptr;
-    if (measuredCov && cache.deltaCovariances.size()>componentIndex) {
-      updatedCovariance = new AmgSymMatrix(5)(cache.deltaCovariances[componentIndex] + *measuredCov);
+    if (measuredCov && cache.deltaCovariances.size() > componentIndex) {
+      updatedCovariance = new AmgSymMatrix(5)(
+        cache.deltaCovariances[componentIndex] + *measuredCov);
     }
     Trk::TrackParameters* updatedTrackParameters =
-      trackParameters->associatedSurface().createTrackParameters(updatedStateVector[Trk::loc1],
-                                                                 updatedStateVector[Trk::loc2],
-                                                                 updatedStateVector[Trk::phi],
-                                                                 updatedStateVector[Trk::theta],
-                                                                 updatedStateVector[Trk::qOverP],
-                                                                 updatedCovariance);
-    double updatedWeight = componentParameters.second * cache.weights[componentIndex];
+      trackParameters->associatedSurface().createTrackParameters(
+        updatedStateVector[Trk::loc1],
+        updatedStateVector[Trk::loc2],
+        updatedStateVector[Trk::phi],
+        updatedStateVector[Trk::theta],
+        updatedStateVector[Trk::qOverP],
+        updatedCovariance);
+    double updatedWeight =
+      componentParameters.second * cache.weights[componentIndex];
     computedState.emplace_back(updatedTrackParameters, updatedWeight);
   }
   return computedState;
@@ -358,10 +439,12 @@ Trk::GsfMaterialEffectsUpdator::compute(const Trk::ComponentParameters& componen
 
 /* ============================================================================
    updateP method
-   ============================================================================ */
+   ============================================================================
+ */
 
 bool
-Trk::GsfMaterialEffectsUpdator::updateP(AmgVector(5) & stateVector, double deltaP) const
+Trk::GsfMaterialEffectsUpdator::updateP(AmgVector(5) & stateVector,
+                                        double deltaP) const
 {
   double p = 1. / fabs(stateVector[Trk::qOverP]);
   p += deltaP;
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx
index 2b42448fff656124c70d3085ca7ca76a9bd63f21..438bb317b845b090869ba45e02fbd2a9f18af03d 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMaterialMixtureConvolution.cxx
@@ -22,9 +22,10 @@ decription           : Implementation code for GSF material mixture convolution
 #include "TrkMultiComponentStateOnSurface/MultiComponentState.h"
 #include "TrkSurfaces/PerigeeSurface.h"
 
-Trk::GsfMaterialMixtureConvolution::GsfMaterialMixtureConvolution(const std::string& type,
-                                                                  const std::string& name,
-                                                                  const IInterface* parent)
+Trk::GsfMaterialMixtureConvolution::GsfMaterialMixtureConvolution(
+  const std::string& type,
+  const std::string& name,
+  const IInterface* parent)
   : AthAlgTool(type, name, parent)
 {
   declareInterface<IMaterialMixtureConvolution>(this);
@@ -37,12 +38,11 @@ Trk::GsfMaterialMixtureConvolution::initialize()
 {
 
   if (m_updator.retrieve().isFailure()) {
-    ATH_MSG_ERROR("Could not retrieve the material effects updator instance " << m_updator.typeAndName()
-                                                                              << "... Exiting");
+    ATH_MSG_ERROR("Could not retrieve the material effects updator instance "
+                  << m_updator.typeAndName() << "... Exiting");
     return StatusCode::FAILURE;
   }
 
-
   return StatusCode::SUCCESS;
 }
 
@@ -57,10 +57,11 @@ Trk::GsfMaterialMixtureConvolution::finalize()
    ========================================== */
 
 Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolution::update(const Trk::MultiComponentState& multiComponentState,
-                                           const Trk::Layer& layer,
-                                           Trk::PropDirection direction,
-                                           Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialMixtureConvolution::update(
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Layer& layer,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
   const Trk::MaterialProperties* materialProperties =
@@ -81,34 +82,39 @@ Trk::GsfMaterialMixtureConvolution::update(const Trk::MultiComponentState& multi
 
   // Check the multi-component state is populated
   if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is not populated... returning 0");
+    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is "
+                  "not populated... returning 0");
     return {};
   }
 
   // Loop over all components and perform material effects update separately
-  Trk::MultiComponentState::const_iterator component = multiComponentState.begin();
+  Trk::MultiComponentState::const_iterator component =
+    multiComponentState.begin();
 
   for (; component != multiComponentState.end(); ++component) {
 
     Trk::MultiComponentState updatedState =
       m_updator->updateState(*component, layer, direction, particleHypothesis);
 
-    if (updatedState.empty()){
+    if (updatedState.empty()) {
       continue;
     }
 
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(cache, std::move(updatedState));
+    bool componentAdded = MultiComponentStateAssembler::addMultiState(
+      cache, std::move(updatedState));
 
     if (!componentAdded) {
-      ATH_MSG_WARNING("Component could not be added to the state in the assembler");
+      ATH_MSG_WARNING(
+        "Component could not be added to the state in the assembler");
     }
   }
 
-  Trk::MultiComponentState mergedState = QuickCloseComponentsMultiStateMerger::merge(
-    std::move(cache.multiComponentState), m_maximumNumberOfComponents);
+  Trk::MultiComponentState mergedState =
+    QuickCloseComponentsMultiStateMerger::merge(
+      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
 
   if (mergedState.empty()) {
-    return  {};
+    return {};
   }
   // Renormalise state
   MultiComponentStateHelpers::renormaliseState(mergedState);
@@ -121,10 +127,11 @@ Trk::GsfMaterialMixtureConvolution::update(const Trk::MultiComponentState& multi
    ========================================== */
 
 Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolution::preUpdate(const Trk::MultiComponentState& multiComponentState,
-                                              const Trk::Layer& layer,
-                                              Trk::PropDirection direction,
-                                              Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialMixtureConvolution::preUpdate(
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Layer& layer,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
   const Trk::MaterialProperties* materialProperties =
     layer.fullUpdateMaterialProperties(*(multiComponentState.begin()->first));
@@ -139,30 +146,36 @@ Trk::GsfMaterialMixtureConvolution::preUpdate(const Trk::MultiComponentState& mu
 
   // Check the multi-component state is populated
   if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is not populated... returning 0");
+    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is "
+                  "not populated... returning 0");
     return {};
   }
 
   // Loop over all components and perform material effects update separately
-  Trk::MultiComponentState::const_iterator component = multiComponentState.begin();
+  Trk::MultiComponentState::const_iterator component =
+    multiComponentState.begin();
 
   for (; component != multiComponentState.end(); ++component) {
 
-    Trk::MultiComponentState updatedState =
-      m_updator->preUpdateState(*component, layer, direction, particleHypothesis);
+    Trk::MultiComponentState updatedState = m_updator->preUpdateState(
+      *component, layer, direction, particleHypothesis);
 
-    if (updatedState.empty()){
+    if (updatedState.empty()) {
       continue;
     }
 
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(cache, std::move(updatedState));
+    bool componentAdded = MultiComponentStateAssembler::addMultiState(
+      cache, std::move(updatedState));
 
-    if (!componentAdded)
-      ATH_MSG_WARNING("Component could not be added to the state in the assembler");
+    if (!componentAdded) {
+      ATH_MSG_WARNING(
+        "Component could not be added to the state in the assembler");
+    }
   }
 
-  Trk::MultiComponentState mergedState = QuickCloseComponentsMultiStateMerger::merge(
-    std::move(cache.multiComponentState), m_maximumNumberOfComponents);
+  Trk::MultiComponentState mergedState =
+    QuickCloseComponentsMultiStateMerger::merge(
+      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
 
   if (mergedState.empty()) {
     return {};
@@ -178,10 +191,11 @@ Trk::GsfMaterialMixtureConvolution::preUpdate(const Trk::MultiComponentState& mu
    ========================================== */
 
 Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolution::postUpdate(const Trk::MultiComponentState& multiComponentState,
-                                               const Trk::Layer& layer,
-                                               Trk::PropDirection direction,
-                                               Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialMixtureConvolution::postUpdate(
+  const Trk::MultiComponentState& multiComponentState,
+  const Trk::Layer& layer,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
 
   const Trk::MaterialProperties* materialProperties =
@@ -198,31 +212,36 @@ Trk::GsfMaterialMixtureConvolution::postUpdate(const Trk::MultiComponentState& m
 
   // Check the multi-component state is populated
   if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is not populated... returning 0");
+    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is "
+                  "not populated... returning 0");
     return {};
   }
 
   // Loop over all components and perform material effects update separately
-  Trk::MultiComponentState::const_iterator component = multiComponentState.begin();
+  Trk::MultiComponentState::const_iterator component =
+    multiComponentState.begin();
 
   for (; component != multiComponentState.end(); ++component) {
 
-    Trk::MultiComponentState updatedState =
-      m_updator->postUpdateState(*component, layer, direction, particleHypothesis);
+    Trk::MultiComponentState updatedState = m_updator->postUpdateState(
+      *component, layer, direction, particleHypothesis);
 
-    if (updatedState.empty()){
+    if (updatedState.empty()) {
       continue;
     }
 
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(cache, std::move(updatedState));
+    bool componentAdded = MultiComponentStateAssembler::addMultiState(
+      cache, std::move(updatedState));
 
     if (!componentAdded) {
-      ATH_MSG_WARNING("Component could not be added to the state in the assembler");
+      ATH_MSG_WARNING(
+        "Component could not be added to the state in the assembler");
     }
   }
 
-  Trk::MultiComponentState mergedState = QuickCloseComponentsMultiStateMerger::merge(
-    std::move(cache.multiComponentState), m_maximumNumberOfComponents);
+  Trk::MultiComponentState mergedState =
+    QuickCloseComponentsMultiStateMerger::merge(
+      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
 
   if (mergedState.empty()) {
     return {};
@@ -238,9 +257,10 @@ Trk::GsfMaterialMixtureConvolution::postUpdate(const Trk::MultiComponentState& m
    ========================================== */
 
 Trk::MultiComponentState
-Trk::GsfMaterialMixtureConvolution::simplifiedMaterialUpdate(const Trk::MultiComponentState& multiComponentState,
-                                                             Trk::PropDirection direction,
-                                                             Trk::ParticleHypothesis particleHypothesis) const
+Trk::GsfMaterialMixtureConvolution::simplifiedMaterialUpdate(
+  const Trk::MultiComponentState& multiComponentState,
+  Trk::PropDirection direction,
+  Trk::ParticleHypothesis particleHypothesis) const
 {
   /* -------------------------------------
      Preliminary checks
@@ -250,24 +270,29 @@ Trk::GsfMaterialMixtureConvolution::simplifiedMaterialUpdate(const Trk::MultiCom
 
   // Check the multi-component state is populated
   if (multiComponentState.empty()) {
-    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is not populated... returning 0");
+    ATH_MSG_DEBUG("Multi component state passed to extrapolateInsideVolume is "
+                  "not populated... returning 0");
     return {};
   }
 
   // Hardwired material effects based on approximate material distribution
-  std::unique_ptr<Trk::TrackParameters> combinedState = MultiComponentStateCombiner::combine(multiComponentState);
+  std::unique_ptr<Trk::TrackParameters> combinedState =
+    MultiComponentStateCombiner::combine(multiComponentState);
   const Amg::Vector3D& globalPosition = combinedState->position();
 
   const Trk::MaterialProperties* materialProperties = nullptr;
 
   // Material properties 2.5% X0 - pixels
   if (globalPosition.x() >= 180. && globalPosition.x() < 350.) {
-    materialProperties = new Trk::MaterialProperties(2.34, 93.6, 0.3879, 28.0855, 14, 0.00233);
+    materialProperties =
+      new Trk::MaterialProperties(2.34, 93.6, 0.3879, 28.0855, 14, 0.00233);
   }
 
-  // Material properties 0.75% X0 - SCT ( total for a module = 1.5% - 2 measurement surfaces )
+  // Material properties 0.75% X0 - SCT ( total for a module = 1.5% - 2
+  // measurement surfaces )
   else if (globalPosition.x() >= 350. && globalPosition.x() < 1200.) {
-    materialProperties = new Trk::MaterialProperties(0.702, 93.6, 0.3879, 28.0855, 14, 0.00233);
+    materialProperties =
+      new Trk::MaterialProperties(0.702, 93.6, 0.3879, 28.0855, 14, 0.00233);
   }
 
   if (!materialProperties) {
@@ -285,29 +310,39 @@ Trk::GsfMaterialMixtureConvolution::simplifiedMaterialUpdate(const Trk::MultiCom
     return std::move(*MultiComponentStateHelpers::clone(multiComponentState));
   }
 
-  // Assume tracks normal to detector surface. Approximation resonable for the CTB
+  // Assume tracks normal to detector surface. Approximation resonable for the
+  // CTB
   double pathLength = materialProperties->thickness();
 
   // Loop over all components and perform material effects update separately
-  Trk::MultiComponentState::const_iterator component = multiComponentState.begin();
+  Trk::MultiComponentState::const_iterator component =
+    multiComponentState.begin();
 
   for (; component != multiComponentState.end(); ++component) {
-     Trk::MultiComponentState updatedState =
-      m_updator->updateState(*component, *materialProperties, pathLength, direction, particleHypothesis);
+    Trk::MultiComponentState updatedState =
+      m_updator->updateState(*component,
+                             *materialProperties,
+                             pathLength,
+                             direction,
+                             particleHypothesis);
 
-    if (updatedState.empty())
+    if (updatedState.empty()) {
       continue;
+    }
 
-    bool componentAdded = MultiComponentStateAssembler::addMultiState(cache, std::move(updatedState));
+    bool componentAdded = MultiComponentStateAssembler::addMultiState(
+      cache, std::move(updatedState));
 
     if (!componentAdded) {
-      ATH_MSG_WARNING("Component could not be added to the state in the assembler");
+      ATH_MSG_WARNING(
+        "Component could not be added to the state in the assembler");
     }
 
   } // end loop over components
 
-  Trk::MultiComponentState mergedState = QuickCloseComponentsMultiStateMerger::merge(
-    std::move(cache.multiComponentState), m_maximumNumberOfComponents);
+  Trk::MultiComponentState mergedState =
+    QuickCloseComponentsMultiStateMerger::merge(
+      std::move(cache.multiComponentState), m_maximumNumberOfComponents);
 
   if (mergedState.empty()) {
     return {};
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMeasurementUpdator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMeasurementUpdator.cxx
index 77871ebdd75c94137fde37127ace47dc4893b14d..40148d8932a38d58810d4d78070e41e436043d53 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMeasurementUpdator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfMeasurementUpdator.cxx
@@ -34,7 +34,8 @@ Trk::GsfMeasurementUpdator::initialize()
 {
   // Retrieve the updator tool
   if (m_updator.retrieve().isFailure()) {
-    ATH_MSG_FATAL("Could not retrieve measurement updator AlgTool ... Exiting!");
+    ATH_MSG_FATAL(
+      "Could not retrieve measurement updator AlgTool ... Exiting!");
     return StatusCode::FAILURE;
   }
 
@@ -50,44 +51,51 @@ Trk::GsfMeasurementUpdator::finalize()
 }
 
 Trk::MultiComponentState
-Trk::GsfMeasurementUpdator::update(Trk::MultiComponentState&& stateBeforeUpdate,
-                                   const Trk::MeasurementBase& measurement) const
+Trk::GsfMeasurementUpdator::update(
+  Trk::MultiComponentState&& stateBeforeUpdate,
+  const Trk::MeasurementBase& measurement) const
 {
-   MultiComponentState updatedState{};
-  // Point to the correct member function of the linear fitter measurement updator for fitting in
-  // the direction of momentum
+  MultiComponentState updatedState{};
+  // Point to the correct member function of the linear fitter measurement
+  // updator for fitting in the direction of momentum
   Updator updator = &Trk::IUpdator::addToState;
   // Check all components have associated error matricies
   Trk::MultiComponentState::iterator component = stateBeforeUpdate.begin();
   bool rebuildStateWithErrors = false;
-  // Perform initial check of state awaiting update. If all states have associated error matricies
-  // then no need to perform the rebuild
+  // Perform initial check of state awaiting update. If all states have
+  // associated error matricies then no need to perform the rebuild
   for (; component != stateBeforeUpdate.end(); ++component) {
-    rebuildStateWithErrors = rebuildStateWithErrors || invalidComponent(component->first.get());
+    rebuildStateWithErrors =
+      rebuildStateWithErrors || invalidComponent(component->first.get());
   }
 
   if (rebuildStateWithErrors) {
-    Trk::MultiComponentState stateWithInsertedErrors = rebuildState(std::move(stateBeforeUpdate));
+    Trk::MultiComponentState stateWithInsertedErrors =
+      rebuildState(std::move(stateBeforeUpdate));
     // Perform the measurement update with the modified state
-    updatedState = calculateFilterStep(std::move(stateWithInsertedErrors), measurement, updator);
+    updatedState = calculateFilterStep(
+      std::move(stateWithInsertedErrors), measurement, updator);
     return updatedState;
   }
 
   // Perform the measurement update
-  updatedState = calculateFilterStep(std::move(stateBeforeUpdate), measurement, updator);
+  updatedState =
+    calculateFilterStep(std::move(stateBeforeUpdate), measurement, updator);
 
   return updatedState;
 }
 
 Trk::MultiComponentState
-Trk::GsfMeasurementUpdator::getUnbiasedTrackParameters(Trk::MultiComponentState&& stateBeforeUpdate,
-                                                       const MeasurementBase& measurement) const
+Trk::GsfMeasurementUpdator::getUnbiasedTrackParameters(
+  Trk::MultiComponentState&& stateBeforeUpdate,
+  const MeasurementBase& measurement) const
 {
   // Point to the correct member function of the linear fitter measurement
   // updator for fitting in the direction opposite to momentum (smoothing)
   Updator updator = &Trk::IUpdator::removeFromState;
   // Calculate the weight of each state after the measurement
-  return calculateFilterStep(std::move(stateBeforeUpdate), measurement, updator);
+  return calculateFilterStep(
+    std::move(stateBeforeUpdate), measurement, updator);
 }
 
 const Trk::FitQualityOnSurface*
@@ -95,11 +103,12 @@ Trk::GsfMeasurementUpdator::fitQuality(const MultiComponentState& updatedState,
                                        const MeasurementBase& measurement) const
 {
 
-  // Fit quality assumes that a state that has been updated by the measurement updator has been
-  // supplied to it
+  // Fit quality assumes that a state that has been updated by the measurement
+  // updator has been supplied to it
 
   if (updatedState.empty()) {
-    ATH_MSG_WARNING("Attempting to calculate chi2 of a hit with respect to an empty multiple-component state");
+    ATH_MSG_WARNING("Attempting to calculate chi2 of a hit with respect to an "
+                    "empty multiple-component state");
     return nullptr;
   }
 
@@ -110,19 +119,24 @@ Trk::GsfMeasurementUpdator::fitQuality(const MultiComponentState& updatedState,
   for (; component != updatedState.end(); ++component) {
     const Trk::TrackParameters* trackParameters = component->first.get();
 
-    // IUpdator interface change (27/09/2005) to allow for fit quality calculations depending on if
-    // the track parameters incorporate the information contained in the measurement. I ALWAYS do
-    // this - hence the fullStateFitQuality method is used
+    // IUpdator interface change (27/09/2005) to allow for fit quality
+    // calculations depending on if the track parameters incorporate the
+    // information contained in the measurement. I ALWAYS do this - hence the
+    // fullStateFitQuality method is used
     const Trk::FitQualityOnSurface* componentFitQuality =
-      m_updator->fullStateFitQuality(*trackParameters, measurement.localParameters(), measurement.localCovariance());
+      m_updator->fullStateFitQuality(*trackParameters,
+                                     measurement.localParameters(),
+                                     measurement.localCovariance());
 
     double componentChi2 = componentFitQuality->chiSquared();
 
     chi2 += component->second * componentChi2;
 
-    // The same measurement is included in each update so it is the same for each component
-    if (component == updatedState.begin())
+    // The same measurement is included in each update so it is the same for
+    // each component
+    if (component == updatedState.begin()) {
       degreesOfFreedom = componentFitQuality->numberDoF();
+    }
 
     delete componentFitQuality;
   }
@@ -132,15 +146,17 @@ Trk::GsfMeasurementUpdator::fitQuality(const MultiComponentState& updatedState,
     return nullptr;
   }
 
-  const Trk::FitQualityOnSurface* fitQualityOnSurface = new FitQualityOnSurface(chi2, degreesOfFreedom);
+  const Trk::FitQualityOnSurface* fitQualityOnSurface =
+    new FitQualityOnSurface(chi2, degreesOfFreedom);
 
   return fitQualityOnSurface;
 }
 
 Trk::MultiComponentState
-Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& stateBeforeUpdate,
-                                                const Trk::MeasurementBase& measurement,
-                                                const Updator updator) const
+Trk::GsfMeasurementUpdator::calculateFilterStep(
+  Trk::MultiComponentState&& stateBeforeUpdate,
+  const Trk::MeasurementBase& measurement,
+  const Updator updator) const
 {
   // state Assembler cache
   MultiComponentStateAssembler::Cache cache;
@@ -152,27 +168,34 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
 
   // Calculate the weight of each component after the measurement
   PosteriorWeightsCalculator pwc;
-  std::vector<Trk::ComponentParameters> stateWithNewWeights = pwc.weights(std::move(stateBeforeUpdate), measurement);
+  std::vector<Trk::ComponentParameters> stateWithNewWeights =
+    pwc.weights(std::move(stateBeforeUpdate), measurement);
   if (stateWithNewWeights.empty()) {
     ATH_MSG_DEBUG("Cacluation of state posterior weights failed... Exiting!");
     return {};
   }
 
   // Update each component using the specified updator
-  Trk::MultiComponentState::const_iterator component = stateWithNewWeights.begin();
+  Trk::MultiComponentState::const_iterator component =
+    stateWithNewWeights.begin();
 
   for (; component != stateWithNewWeights.end(); ++component) {
 
     Trk::FitQualityOnSurface* fitQuality = nullptr;
 
     // Track updates using a pointer to the member function
-    std::unique_ptr<Trk::TrackParameters> updatedTrackParameters(((&(*m_updator))->*updator)(
-      *(*component).first, measurement.localParameters(), measurement.localCovariance(), fitQuality));
+    std::unique_ptr<Trk::TrackParameters> updatedTrackParameters(
+      ((&(*m_updator))->*updator)(*(*component).first,
+                                  measurement.localParameters(),
+                                  measurement.localCovariance(),
+                                  fitQuality));
 
     if (!updatedTrackParameters) {
-      ATH_MSG_DEBUG("Update of state with Measurement has failed 1... Exiting!");
-      if (fitQuality)
+      ATH_MSG_DEBUG(
+        "Update of state with Measurement has failed 1... Exiting!");
+      if (fitQuality) {
         delete fitQuality;
+      }
       continue;
     }
     if (fitQuality && fitQuality->chiSquared() <= 0.) {
@@ -185,16 +208,21 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
     delete fitQuality;
 
     // Updator does not change the weighting
-    ComponentParameters updatedComponentParameters(std::move(updatedTrackParameters), component->second);
-    // Add component to state being prepared for assembly and check that it is valid
-    bool componentAdded = MultiComponentStateAssembler::addComponent(cache, std::move(updatedComponentParameters));
+    ComponentParameters updatedComponentParameters(
+      std::move(updatedTrackParameters), component->second);
+    // Add component to state being prepared for assembly and check that it is
+    // valid
+    bool componentAdded = MultiComponentStateAssembler::addComponent(
+      cache, std::move(updatedComponentParameters));
 
     if (!componentAdded) {
-      ATH_MSG_DEBUG("Component could not be added to the state in the assembler");
+      ATH_MSG_DEBUG(
+        "Component could not be added to the state in the assembler");
     }
   }
 
-  Trk::MultiComponentState assembledUpdatedState = MultiComponentStateAssembler::assembledState(cache);
+  Trk::MultiComponentState assembledUpdatedState =
+    MultiComponentStateAssembler::assembledState(cache);
 
   if (assembledUpdatedState.empty()) {
     return {};
@@ -205,9 +233,10 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
 }
 
 Trk::MultiComponentState
-Trk::GsfMeasurementUpdator::update(Trk::MultiComponentState&& stateBeforeUpdate,
-                                   const Trk::MeasurementBase& measurement,
-                                   std::unique_ptr<FitQualityOnSurface>& fitQoS) const
+Trk::GsfMeasurementUpdator::update(
+  Trk::MultiComponentState&& stateBeforeUpdate,
+  const Trk::MeasurementBase& measurement,
+  std::unique_ptr<FitQualityOnSurface>& fitQoS) const
 {
 
   Trk::MultiComponentState updatedState{};
@@ -217,16 +246,19 @@ Trk::GsfMeasurementUpdator::update(Trk::MultiComponentState&& stateBeforeUpdate,
 
   bool rebuildStateWithErrors = false;
 
-  // Perform initial check of state awaiting update. If all states have associated error matricies
-  // then no need to perform the rebuild
+  // Perform initial check of state awaiting update. If all states have
+  // associated error matricies then no need to perform the rebuild
   for (; component != stateBeforeUpdate.end(); ++component) {
-    rebuildStateWithErrors = rebuildStateWithErrors || invalidComponent(component->first.get());
+    rebuildStateWithErrors =
+      rebuildStateWithErrors || invalidComponent(component->first.get());
   }
 
   if (rebuildStateWithErrors) {
-    Trk::MultiComponentState stateWithInsertedErrors = rebuildState(std::move(stateBeforeUpdate));
+    Trk::MultiComponentState stateWithInsertedErrors =
+      rebuildState(std::move(stateBeforeUpdate));
     // Perform the measurement update with the modified state
-    updatedState = calculateFilterStep(std::move(stateWithInsertedErrors), measurement, fitQoS);
+    updatedState = calculateFilterStep(
+      std::move(stateWithInsertedErrors), measurement, fitQoS);
     if (updatedState.empty()) {
       ATH_MSG_DEBUG("Updated state could not be calculated... Returning 0");
       fitQoS.reset();
@@ -236,7 +268,8 @@ Trk::GsfMeasurementUpdator::update(Trk::MultiComponentState&& stateBeforeUpdate,
   }
 
   // Perform the measurement update
-  updatedState = calculateFilterStep(std::move(stateBeforeUpdate), measurement, fitQoS);
+  updatedState =
+    calculateFilterStep(std::move(stateBeforeUpdate), measurement, fitQoS);
 
   if (updatedState.empty()) {
     ATH_MSG_DEBUG("Updated state could not be calculated... Returning 0");
@@ -247,9 +280,10 @@ Trk::GsfMeasurementUpdator::update(Trk::MultiComponentState&& stateBeforeUpdate,
 }
 
 Trk::MultiComponentState
-Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& stateBeforeUpdate,
-                                                const Trk::MeasurementBase& measurement,
-                                                std::unique_ptr<FitQualityOnSurface>& fitQoS) const
+Trk::GsfMeasurementUpdator::calculateFilterStep(
+  Trk::MultiComponentState&& stateBeforeUpdate,
+  const Trk::MeasurementBase& measurement,
+  std::unique_ptr<FitQualityOnSurface>& fitQoS) const
 {
   // state Assembler cache
   MultiComponentStateAssembler::Cache cache;
@@ -269,7 +303,8 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
   }
 
   // Update each component using the specified updator
-  Trk::MultiComponentState::const_iterator component = stateWithNewWeights.begin();
+  Trk::MultiComponentState::const_iterator component =
+    stateWithNewWeights.begin();
 
   double chiSquared = 0;
   int degreesOfFreedom = 0;
@@ -277,16 +312,21 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
   for (; component != stateWithNewWeights.end(); ++component) {
 
     if (fabs((*component).first->parameters()[Trk::qOverP]) > 0.033333) {
-      ATH_MSG_DEBUG("About to update component with p<30MeV...skipping component! (2)");
+      ATH_MSG_DEBUG(
+        "About to update component with p<30MeV...skipping component! (2)");
       continue;
     }
     Trk::FitQualityOnSurface* componentFitQuality = nullptr;
     // Track update alternates between update and getUnbiasedTrackParams
-    std::unique_ptr<Trk::TrackParameters> updatedTrackParameters(m_updator->addToState(
-      *(*component).first, measurement.localParameters(), measurement.localCovariance(), componentFitQuality));
+    std::unique_ptr<Trk::TrackParameters> updatedTrackParameters(
+      m_updator->addToState(*(*component).first,
+                            measurement.localParameters(),
+                            measurement.localCovariance(),
+                            componentFitQuality));
 
     if (!updatedTrackParameters) {
-      ATH_MSG_DEBUG("Update of state with Measurement has failed 2... Exiting!");
+      ATH_MSG_DEBUG(
+        "Update of state with Measurement has failed 2... Exiting!");
       if (componentFitQuality) {
         delete componentFitQuality;
       }
@@ -296,10 +336,12 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
     if (invalidComponent(updatedTrackParameters.get())) {
       ATH_MSG_DEBUG("Invalid cov matrix after update... Exiting!");
       if ((*component).first->covariance()) {
-        ATH_MSG_DEBUG("Original has a COV\n " << *(*component).first->covariance());
+        ATH_MSG_DEBUG("Original has a COV\n "
+                      << *(*component).first->covariance());
       }
       if (updatedTrackParameters->covariance()) {
-        ATH_MSG_DEBUG("Result has a COV\n" << *updatedTrackParameters->covariance());
+        ATH_MSG_DEBUG("Result has a COV\n"
+                      << *updatedTrackParameters->covariance());
       }
       updatedTrackParameters.reset();
       delete componentFitQuality;
@@ -316,7 +358,8 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
     double componentChi2 = componentFitQuality->chiSquared();
     chiSquared += component->second * componentChi2;
 
-    // The same measurement is included in each update so it is the same for each component
+    // The same measurement is included in each update so it is the same for
+    // each component
     if (component == stateWithNewWeights.begin()) {
       degreesOfFreedom = componentFitQuality->numberDoF();
     }
@@ -324,16 +367,21 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
     delete componentFitQuality;
 
     // Updator does not change the weighting
-    ComponentParameters updatedComponentParameters(std::move(updatedTrackParameters), component->second);
-    // Add component to state being prepared for assembly and check that it is valid
-    bool componentAdded = MultiComponentStateAssembler::addComponent(cache, std::move(updatedComponentParameters));
+    ComponentParameters updatedComponentParameters(
+      std::move(updatedTrackParameters), component->second);
+    // Add component to state being prepared for assembly and check that it is
+    // valid
+    bool componentAdded = MultiComponentStateAssembler::addComponent(
+      cache, std::move(updatedComponentParameters));
 
     if (!componentAdded) {
-      ATH_MSG_DEBUG("Component could not be added to the state in the assembler");
+      ATH_MSG_DEBUG(
+        "Component could not be added to the state in the assembler");
     }
   }
 
-  Trk::MultiComponentState assembledUpdatedState = MultiComponentStateAssembler::assembledState(cache);
+  Trk::MultiComponentState assembledUpdatedState =
+    MultiComponentStateAssembler::assembledState(cache);
 
   if (assembledUpdatedState.empty()) {
     return {};
@@ -346,7 +394,8 @@ Trk::GsfMeasurementUpdator::calculateFilterStep(Trk::MultiComponentState&& state
 }
 
 bool
-Trk::GsfMeasurementUpdator::invalidComponent(const Trk::TrackParameters* trackParameters) const
+Trk::GsfMeasurementUpdator::invalidComponent(
+  const Trk::TrackParameters* trackParameters) const
 {
   auto measuredCov = trackParameters->covariance();
   bool rebuildCov = false;
@@ -354,15 +403,17 @@ Trk::GsfMeasurementUpdator::invalidComponent(const Trk::TrackParameters* trackPa
     rebuildCov = true;
   } else {
     for (int i(0); i < 5; ++i) {
-      if ((*measuredCov)(i, i) <= 0.)
+      if ((*measuredCov)(i, i) <= 0.) {
         rebuildCov = true;
+      }
     }
   }
   return rebuildCov;
 }
 
 Trk::MultiComponentState
-Trk::GsfMeasurementUpdator::rebuildState(Trk::MultiComponentState&& stateBeforeUpdate) const
+Trk::GsfMeasurementUpdator::rebuildState(
+  Trk::MultiComponentState&& stateBeforeUpdate) const
 {
   Trk::MultiComponentState stateWithInsertedErrors{};
 
@@ -383,8 +434,14 @@ Trk::GsfMeasurementUpdator::rebuildState(Trk::MultiComponentState&& stateBeforeU
       (*bigNewCovarianceMatrix)(4, 4) = 0.001 * 0.001;
 
       AmgVector(5) par = trackParameters->parameters();
-      Trk::TrackParameters* trackParametersWithError = trackParameters->associatedSurface().createTrackParameters(
-        par[Trk::loc1], par[Trk::loc2], par[Trk::phi], par[Trk::theta], par[Trk::qOverP], bigNewCovarianceMatrix);
+      Trk::TrackParameters* trackParametersWithError =
+        trackParameters->associatedSurface().createTrackParameters(
+          par[Trk::loc1],
+          par[Trk::loc2],
+          par[Trk::phi],
+          par[Trk::theta],
+          par[Trk::qOverP],
+          bigNewCovarianceMatrix);
       stateWithInsertedErrors.emplace_back(trackParametersWithError, weight);
     } else {
       stateWithInsertedErrors.push_back(std::move(*component));
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx
index d5721e1ac237b1f3c2f7147a7ab9869887addfa0..af2de668dc091b6c29eea1524c9ebbd093f853b8 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/GsfSmoother.cxx
@@ -9,7 +9,8 @@ begin                : Wednesday 9th March 2005
 author               : atkinson
 email                : Tom.Atkinson@cern.ch
 decription           : Implementation code for the class GsfSmoother
-********************************************************************************** */
+**********************************************************************************
+*/
 
 #include "TrkGaussianSumFilter/GsfSmoother.h"
 
@@ -22,13 +23,15 @@ decription           : Implementation code for the class GsfSmoother
 #include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h"
 #include "TrkSurfaces/Surface.h"
 
-#include "TrkMultiComponentStateOnSurface/MultiComponentStateOnSurface.h"
-#include "TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h"
 #include "TrkGaussianSumFilter/IMultiStateExtrapolator.h"
 #include "TrkGaussianSumFilter/IMultiStateMeasurementUpdator.h"
 #include "TrkGaussianSumFilter/MultiComponentStateCombiner.h"
+#include "TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h"
+#include "TrkMultiComponentStateOnSurface/MultiComponentStateOnSurface.h"
 
-Trk::GsfSmoother::GsfSmoother(const std::string& type, const std::string& name, const IInterface* parent)
+Trk::GsfSmoother::GsfSmoother(const std::string& type,
+                              const std::string& name,
+                              const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_combineWithFitter(false)
 {
@@ -50,8 +53,9 @@ Trk::GsfSmoother::finalize()
 }
 
 StatusCode
-Trk::GsfSmoother::configureTools(const ToolHandle<IMultiStateExtrapolator>& extrapolator,
-                                 const ToolHandle<IMultiStateMeasurementUpdator>& measurementUpdator)
+Trk::GsfSmoother::configureTools(
+  const ToolHandle<IMultiStateExtrapolator>& extrapolator,
+  const ToolHandle<IMultiStateMeasurementUpdator>& measurementUpdator)
 {
   m_extrapolator = extrapolator;
   m_updator = measurementUpdator;
@@ -75,14 +79,15 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
   }
   // Check that the forward trajectory is filled
   if (forwardTrajectory.empty()) {
-    ATH_MSG_ERROR("Attempting to smooth an empty forward trajectory... Exiting!");
+    ATH_MSG_ERROR(
+      "Attempting to smooth an empty forward trajectory... Exiting!");
     return nullptr;
   }
 
-  /* Instansiate the return trajectory. This is a vectory of TrackStateOnSurface object
-     In the GSF Smoother these TrackStateOnSurface objects are the base class for the
-     MultiComponentStateOnSurface. This memory should be freed by the fitter / smoother master
-     method */
+  /* Instansiate the return trajectory. This is a vectory of TrackStateOnSurface
+     object In the GSF Smoother these TrackStateOnSurface objects are the base
+     class for the MultiComponentStateOnSurface. This memory should be freed by
+     the fitter / smoother master method */
 
   /*
    * In general for things we want to control their lifetime locally
@@ -93,34 +98,41 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
    * We control the lifetime of these so unique_ptr
    */
   auto smoothedTrajectory = std::make_unique<Trk::SmoothedTrajectory>();
-  auto smootherPredictionMultiState = std::make_unique<Trk::MultiComponentState>();
+  auto smootherPredictionMultiState =
+    std::make_unique<Trk::MultiComponentState>();
   /*
-   * Get the initial smoother prediction. It is the last prediction in the forwards trajectory
+   * Get the initial smoother prediction. It is the last prediction in the
+   * forwards trajectory
    */
   /* these can be  owned by the input so const ptr*/
-  const Trk::TrackStateOnSurface* smootherPredictionStateOnSurface = forwardTrajectory.back();
+  const Trk::TrackStateOnSurface* smootherPredictionStateOnSurface =
+    forwardTrajectory.back();
   /*
    * We can have single or Multi components here, so we choose what to clone
    */
-  const Trk::MultiComponentStateOnSurface* smootherPredictionMultiStateOnSurface =
-    dynamic_cast<const Trk::MultiComponentStateOnSurface*>(smootherPredictionStateOnSurface);
+  const Trk::MultiComponentStateOnSurface*
+    smootherPredictionMultiStateOnSurface =
+      dynamic_cast<const Trk::MultiComponentStateOnSurface*>(
+        smootherPredictionStateOnSurface);
 
   if (!smootherPredictionMultiStateOnSurface) {
-    ATH_MSG_DEBUG("GSF smoother has a single component state as starting point");
+    ATH_MSG_DEBUG(
+      "GSF smoother has a single component state as starting point");
     auto dummyMultiState = std::make_unique<Trk::MultiComponentState>();
-    Trk::ComponentParameters dummyParams(smootherPredictionStateOnSurface->trackParameters()->clone(), 1.0);
+    Trk::ComponentParameters dummyParams(
+      smootherPredictionStateOnSurface->trackParameters()->clone(), 1.0);
     dummyMultiState->push_back(std::move(dummyParams));
     smootherPredictionMultiState = std::move(dummyMultiState);
   } else {
-    smootherPredictionMultiState =
-      MultiComponentStateHelpers::clone(*(smootherPredictionMultiStateOnSurface->components()));
+    smootherPredictionMultiState = MultiComponentStateHelpers::clone(
+      *(smootherPredictionMultiStateOnSurface->components()));
   }
 
   /*
    * Perform the measurement update
-   * The first smoother prediction state is equivalent to the last forwards prediction
-   * updated with the last measurement
-   * Retrieve the first MeasurementBase object for the smoother
+   * The first smoother prediction state is equivalent to the last forwards
+   * prediction updated with the last measurement Retrieve the first
+   * MeasurementBase object for the smoother
    */
 
   std::unique_ptr<Trk::FitQualityOnSurface> fitQuality;
@@ -134,12 +146,15 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
   const Trk::MeasurementBase* firstSmootherMeasurementOnTrack =
     smootherPredictionStateOnSurface->measurementOnTrack()->clone();
   if (!firstSmootherMeasurementOnTrack) {
-    ATH_MSG_WARNING("Initial state on surface in smoother does not have an associated "
-                    "MeasurementBase object... returning 0");
+    ATH_MSG_WARNING(
+      "Initial state on surface in smoother does not have an associated "
+      "MeasurementBase object... returning 0");
     return nullptr;
   }
   Trk::MultiComponentState firstSmoothedState =
-    m_updator->update(std::move(*smootherPredictionMultiState), *firstSmootherMeasurementOnTrack, fitQuality);
+    m_updator->update(std::move(*smootherPredictionMultiState),
+                      *firstSmootherMeasurementOnTrack,
+                      fitQuality);
 
   if (firstSmoothedState.empty()) {
     ATH_MSG_DEBUG("First GSF smoothing update failed... Exiting!");
@@ -151,11 +166,12 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
   std::unique_ptr<Trk::TrackParameters> combinedFirstSmoothedState =
     MultiComponentStateCombiner::combine(firstSmoothedState, true);
   /*owned be the tragectory*/
-  const Trk::MultiComponentStateOnSurface* updatedStateOnSurface = new MultiComponentStateOnSurface(
-    firstSmootherMeasurementOnTrack, 
-    combinedFirstSmoothedState.release(), 
-    MultiComponentStateHelpers::clone(firstSmoothedState).release(), 
-    fitQuality.release());
+  const Trk::MultiComponentStateOnSurface* updatedStateOnSurface =
+    new MultiComponentStateOnSurface(
+      firstSmootherMeasurementOnTrack,
+      combinedFirstSmoothedState.release(),
+      MultiComponentStateHelpers::clone(firstSmoothedState).release(),
+      fitQuality.release());
   smoothedTrajectory->push_back(updatedStateOnSurface);
   /*
    * Reset ptr
@@ -170,24 +186,29 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
   smootherPredictionMultiState.reset();
 
   if (!MultiComponentStateHelpers::isMeasured(firstSmoothedState)) {
-    ATH_MSG_WARNING("Updated state is not measured. Rejecting smoothed state... returning 0");
+    ATH_MSG_WARNING(
+      "Updated state is not measured. Rejecting smoothed state... returning 0");
     return nullptr;
   }
   /*
-   * Generate prediction by scaling the covariance of all components in the initial state
+   * Generate prediction by scaling the covariance of all components in the
+   * initial state
    *
-   * Generate a large prediction for extrapolation. This way there is no dependance on error of
-   * prediction NB local Y and theta are not blown out too much to help in the TRT
+   * Generate a large prediction for extrapolation. This way there is no
+   * dependance on error of prediction NB local Y and theta are not blown out
+   * too much to help in the TRT
    */
   std::unique_ptr<Trk::MultiComponentState> smoothedStateWithScaledError =
-    MultiComponentStateHelpers::cloneWithScaledError(firstSmoothedState, 15., 5., 15., 5., 15.);
+    MultiComponentStateHelpers::cloneWithScaledError(
+      firstSmoothedState, 15., 5., 15., 5., 15.);
 
   // Perform a measurement update on this new state
-  Trk::MultiComponentState updatedState =
-    m_updator->update(std::move(*smoothedStateWithScaledError), *firstSmootherMeasurementOnTrack);
+  Trk::MultiComponentState updatedState = m_updator->update(
+    std::move(*smoothedStateWithScaledError), *firstSmootherMeasurementOnTrack);
 
   if (updatedState.empty()) {
-    ATH_MSG_WARNING("Smoother prediction could not be determined... returning 0");
+    ATH_MSG_WARNING(
+      "Smoother prediction could not be determined... returning 0");
     return nullptr;
   }
 
@@ -195,20 +216,27 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
   firstSmootherMeasurementOnTrack = nullptr;
 
   // =============================================================================
-  // Loop over all remaining TrackStateOnSurface objects in the forward trajectory
+  // Loop over all remaining TrackStateOnSurface objects in the forward
+  // trajectory
   // =============================================================================
 
-  Trk::ForwardTrajectory::const_reverse_iterator trackStateOnSurface = forwardTrajectory.rbegin() + 1;
-  Trk::ForwardTrajectory::const_reverse_iterator lasttrackStateOnSurface = forwardTrajectory.rend() - 1;
-  // TSOS that the cluster measuremenet will added on after .. can’t be teh last as the impact
-  // parameters will be compromised
-  Trk::ForwardTrajectory::const_reverse_iterator secondLastTrackStateOnSurface = forwardTrajectory.rend() - 2;
-
-  for (; trackStateOnSurface != forwardTrajectory.rend(); ++trackStateOnSurface) {
+  Trk::ForwardTrajectory::const_reverse_iterator trackStateOnSurface =
+    forwardTrajectory.rbegin() + 1;
+  Trk::ForwardTrajectory::const_reverse_iterator lasttrackStateOnSurface =
+    forwardTrajectory.rend() - 1;
+  // TSOS that the cluster measuremenet will added on after .. can’t be teh last
+  // as the impact parameters will be compromised
+  Trk::ForwardTrajectory::const_reverse_iterator secondLastTrackStateOnSurface =
+    forwardTrajectory.rend() - 2;
+
+  for (; trackStateOnSurface != forwardTrajectory.rend();
+       ++trackStateOnSurface) {
     // Retrieve the MeasurementBase object from the TrackStateOnSurface object
-    const Trk::MeasurementBase* measurement_in = (*trackStateOnSurface)->measurementOnTrack();
+    const Trk::MeasurementBase* measurement_in =
+      (*trackStateOnSurface)->measurementOnTrack();
     if (!measurement_in) {
-      ATH_MSG_WARNING("MeasurementBase object could not be extracted from a measurement... continuing");
+      ATH_MSG_WARNING("MeasurementBase object could not be extracted from a "
+                      "measurement... continuing");
       continue;
     }
     // Clone the MeasurementBase object
@@ -218,11 +246,17 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
      next measurement surface. For the smoother the direction of propagation
      is opposite to the direction of momentum */
 
-    Trk::MultiComponentState extrapolatedState = m_extrapolator->extrapolate(
-      updatedState, measurement->associatedSurface(), Trk::oppositeMomentum, false, particleHypothesis);
+    Trk::MultiComponentState extrapolatedState =
+      m_extrapolator->extrapolate(Gaudi::Hive::currentContext(),
+                                  updatedState,
+                                  measurement->associatedSurface(),
+                                  Trk::oppositeMomentum,
+                                  false,
+                                  particleHypothesis);
 
     if (extrapolatedState.empty()) {
-      ATH_MSG_DEBUG("Extrapolation to measurement surface failed... rejecting track!");
+      ATH_MSG_DEBUG(
+        "Extrapolation to measurement surface failed... rejecting track!");
       return nullptr;
     }
 
@@ -230,23 +264,27 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
     if (!(*trackStateOnSurface)->type(TrackStateOnSurface::Measurement)) {
       updatedState = std::move(extrapolatedState);
 
-      std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type(0);
+      std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> type(
+        0);
       type.set(TrackStateOnSurface::Outlier);
 
       Trk::MultiComponentStateOnSurface* updatedStateOnSurface =
-        new Trk::MultiComponentStateOnSurface(measurement.release(),
-                                              MultiComponentStateHelpers::clone(updatedState).release(),
-                                              new FitQuality(1, 1),
-                                              nullptr,
-                                              type);
+        new Trk::MultiComponentStateOnSurface(
+          measurement.release(),
+          MultiComponentStateHelpers::clone(updatedState).release(),
+          new FitQuality(1, 1),
+          nullptr,
+          type);
       smoothedTrajectory->push_back(updatedStateOnSurface);
       continue;
     }
 
     // Update newly extrapolated state with MeasurementBase measurement
-    updatedState = m_updator->update(std::move(extrapolatedState), *measurement, fitQuality);
+    updatedState =
+      m_updator->update(std::move(extrapolatedState), *measurement, fitQuality);
     if (updatedState.empty()) {
-      ATH_MSG_WARNING("Could not update the multi-component state... rejecting track!");
+      ATH_MSG_WARNING(
+        "Could not update the multi-component state... rejecting track!");
       return nullptr;
     }
 
@@ -260,29 +298,39 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
       std::unique_ptr<Trk::MultiComponentState> forwardsMultiStateOwn;
 
       const Trk::MultiComponentStateOnSurface* forwardsMultiStateOnSurface =
-        dynamic_cast<const Trk::MultiComponentStateOnSurface*>(*trackStateOnSurface);
+        dynamic_cast<const Trk::MultiComponentStateOnSurface*>(
+          *trackStateOnSurface);
 
       if (!forwardsMultiStateOnSurface) {
         // Create new multiComponentState from single state
-        Trk::ComponentParameters componentParameters((*trackStateOnSurface)->trackParameters()->clone(), 1.);
+        Trk::ComponentParameters componentParameters(
+          (*trackStateOnSurface)->trackParameters()->clone(), 1.);
         forwardsMultiStateOwn = std::make_unique<Trk::MultiComponentState>();
         forwardsMultiStateOwn->push_back(std::move(componentParameters));
         forwardsMultiState = forwardsMultiStateOwn.get();
       } else {
         forwardsMultiState = forwardsMultiStateOnSurface->components();
       }
-      Trk::MultiComponentState combinedState2 = combine(*forwardsMultiState, updatedState);
+      Trk::MultiComponentState combinedState2 =
+        combine(*forwardsMultiState, updatedState);
       if (combinedState2.empty()) {
-        ATH_MSG_WARNING("Could not combine state from forward fit with smoother state... rejecting track!");
+        ATH_MSG_WARNING("Could not combine state from forward fit with "
+                        "smoother state... rejecting track!");
         return nullptr;
       }
-      const Trk::FitQualityOnSurface* combinedFitQuality = m_updator->fitQuality(combinedState2, *measurement);
-      // In the case of combination with forwards state - push back the combined state
-      const Trk::MultiComponentStateOnSurface* combinedStateOnSurface = new MultiComponentStateOnSurface(
-        measurement.release(), MultiComponentStateHelpers::clone(combinedState2).release(), combinedFitQuality);
+      const Trk::FitQualityOnSurface* combinedFitQuality =
+        m_updator->fitQuality(combinedState2, *measurement);
+      // In the case of combination with forwards state - push back the combined
+      // state
+      const Trk::MultiComponentStateOnSurface* combinedStateOnSurface =
+        new MultiComponentStateOnSurface(
+          measurement.release(),
+          MultiComponentStateHelpers::clone(combinedState2).release(),
+          combinedFitQuality);
       smoothedTrajectory->push_back(combinedStateOnSurface);
     } else {
-      // If combination with forwards state is not done - push back updated state
+      // If combination with forwards state is not done - push back updated
+      // state
       const Trk::MultiComponentStateOnSurface* updatedStateOnSurface = nullptr;
 
       if (trackStateOnSurface == lasttrackStateOnSurface) {
@@ -290,18 +338,22 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
           MultiComponentStateCombiner::combine(updatedState, true);
 
         if (combinedLastState) {
-          updatedStateOnSurface =
-            new Trk::MultiComponentStateOnSurface(measurement.release(),
-                                                  combinedLastState.release(),
-                                                  MultiComponentStateHelpers::clone(updatedState).release(),
-                                                  fitQuality.release());
+          updatedStateOnSurface = new Trk::MultiComponentStateOnSurface(
+            measurement.release(),
+            combinedLastState.release(),
+            MultiComponentStateHelpers::clone(updatedState).release(),
+            fitQuality.release());
         } else {
           updatedStateOnSurface = new Trk::MultiComponentStateOnSurface(
-            measurement.release(), MultiComponentStateHelpers::clone(updatedState).release(), fitQuality.release());
+            measurement.release(),
+            MultiComponentStateHelpers::clone(updatedState).release(),
+            fitQuality.release());
         }
       } else {
         updatedStateOnSurface = new Trk::MultiComponentStateOnSurface(
-          measurement.release(), MultiComponentStateHelpers::clone(updatedState).release(), fitQuality.release());
+          measurement.release(),
+          MultiComponentStateHelpers::clone(updatedState).release(),
+          fitQuality.release());
       }
 
       smoothedTrajectory->push_back(updatedStateOnSurface);
@@ -312,7 +364,8 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
 
       if (ccot && trackStateOnSurface == secondLastTrackStateOnSurface) {
 
-        Trk::MultiComponentState ccotState = addCCOT(updatedStateOnSurface, ccot, smoothedTrajectory.get());
+        Trk::MultiComponentState ccotState =
+          addCCOT(updatedStateOnSurface, ccot, smoothedTrajectory.get());
         if (!ccotState.empty()) {
           updatedState = std::move(ccotState);
         }
@@ -323,18 +376,21 @@ Trk::GsfSmoother::fit(const ForwardTrajectory& forwardTrajectory,
 }
 
 Trk::MultiComponentState
-Trk::GsfSmoother::combine(const Trk::MultiComponentState& forwardsMultiState,
-                          const Trk::MultiComponentState& smootherMultiState) const
+Trk::GsfSmoother::combine(
+  const Trk::MultiComponentState& forwardsMultiState,
+  const Trk::MultiComponentState& smootherMultiState) const
 {
 
-  std::unique_ptr<Trk::MultiComponentState> combinedMultiState = std::make_unique<MultiComponentState>();
+  std::unique_ptr<Trk::MultiComponentState> combinedMultiState =
+    std::make_unique<MultiComponentState>();
   /* ================================================
      Loop over all components in forwards multi-state
      ================================================ */
 
   for (auto& forwardsComponent : forwardsMultiState) {
     // Need to check that all components have associated weight matricies
-    const AmgSymMatrix(5)* forwardMeasuredCov = forwardsComponent.first->covariance();
+    const AmgSymMatrix(5)* forwardMeasuredCov =
+      forwardsComponent.first->covariance();
 
     /* ====================================================
        Loop over all components in the smoother multi-state
@@ -342,58 +398,74 @@ Trk::GsfSmoother::combine(const Trk::MultiComponentState& forwardsMultiState,
 
     for (auto& smootherComponent : smootherMultiState) {
       // Need to check that all components have associated weight matricies
-      const AmgSymMatrix(5)* smootherMeasuredCov = smootherComponent.first->covariance();
+      const AmgSymMatrix(5)* smootherMeasuredCov =
+        smootherComponent.first->covariance();
       if (!smootherMeasuredCov && !forwardMeasuredCov) {
-        ATH_MSG_WARNING("Cannot combine two components both without associated errors... returning 0");
+        ATH_MSG_WARNING("Cannot combine two components both without associated "
+                        "errors... returning 0");
         return {};
       }
 
       if (!forwardMeasuredCov) {
-        Trk::ComponentParameters smootherComponentOnly(smootherComponent.first->clone(), smootherComponent.second);
+        Trk::ComponentParameters smootherComponentOnly(
+          smootherComponent.first->clone(), smootherComponent.second);
         combinedMultiState->push_back(std::move(smootherComponentOnly));
         continue;
       }
 
       if (!smootherMeasuredCov) {
-        Trk::ComponentParameters forwardComponentOnly(forwardsComponent.first->clone(), forwardsComponent.second);
+        Trk::ComponentParameters forwardComponentOnly(
+          forwardsComponent.first->clone(), forwardsComponent.second);
         combinedMultiState->push_back(std::move(forwardComponentOnly));
         continue;
       }
 
-      const AmgSymMatrix(5) summedCovariance = *forwardMeasuredCov + *smootherMeasuredCov;
-      const AmgSymMatrix(5) K = *forwardMeasuredCov * summedCovariance.inverse();
+      const AmgSymMatrix(5) summedCovariance =
+        *forwardMeasuredCov + *smootherMeasuredCov;
+      const AmgSymMatrix(5) K =
+        *forwardMeasuredCov * summedCovariance.inverse();
       const Amg::VectorX newParameters =
         forwardsComponent.first->parameters() +
-        K * (smootherComponent.first->parameters() - forwardsComponent.first->parameters());
-      const Amg::VectorX parametersDiff = forwardsComponent.first->parameters() - smootherComponent.first->parameters();
-
-      AmgSymMatrix(5)* covarianceOfNewParameters = new AmgSymMatrix(5)(K * *smootherMeasuredCov);
-
-      Trk::TrackParameters* combinedTrackParameters = (forwardsComponent.first)
-                                                        ->associatedSurface()
-                                                        .createTrackParameters(newParameters[Trk::loc1],
-                                                                               newParameters[Trk::loc2],
-                                                                               newParameters[Trk::phi],
-                                                                               newParameters[Trk::theta],
-                                                                               newParameters[Trk::qOverP],
-                                                                               covarianceOfNewParameters);
-      // Covariance matrix object now owned by TrackParameters object. Reset pointer to prevent
-      // delete
+        K * (smootherComponent.first->parameters() -
+             forwardsComponent.first->parameters());
+      const Amg::VectorX parametersDiff =
+        forwardsComponent.first->parameters() -
+        smootherComponent.first->parameters();
+
+      AmgSymMatrix(5)* covarianceOfNewParameters =
+        new AmgSymMatrix(5)(K * *smootherMeasuredCov);
+
+      Trk::TrackParameters* combinedTrackParameters =
+        (forwardsComponent.first)
+          ->associatedSurface()
+          .createTrackParameters(newParameters[Trk::loc1],
+                                 newParameters[Trk::loc2],
+                                 newParameters[Trk::phi],
+                                 newParameters[Trk::theta],
+                                 newParameters[Trk::qOverP],
+                                 covarianceOfNewParameters);
+      // Covariance matrix object now owned by TrackParameters object. Reset
+      // pointer to prevent delete
       covarianceOfNewParameters = nullptr;
-      const AmgSymMatrix(5) invertedSummedCovariance = summedCovariance.inverse();
-      // Determine the scaling factor for the new weighting. Determined from the PDF of the
-      // many-dimensional gaussian
-      double exponent = parametersDiff.transpose() * invertedSummedCovariance * parametersDiff;
+      const AmgSymMatrix(5) invertedSummedCovariance =
+        summedCovariance.inverse();
+      // Determine the scaling factor for the new weighting. Determined from the
+      // PDF of the many-dimensional gaussian
+      double exponent =
+        parametersDiff.transpose() * invertedSummedCovariance * parametersDiff;
       double weightScalingFactor = exp(-0.5 * exponent);
-      double combinedWeight = smootherComponent.second * forwardsComponent.second * weightScalingFactor;
-      Trk::ComponentParameters combinedComponent(combinedTrackParameters, combinedWeight);
+      double combinedWeight = smootherComponent.second *
+                              forwardsComponent.second * weightScalingFactor;
+      Trk::ComponentParameters combinedComponent(combinedTrackParameters,
+                                                 combinedWeight);
       combinedMultiState->push_back(std::move(combinedComponent));
     }
   }
 
   // Component reduction on the combined state
-   Trk::MultiComponentState mergedState = QuickCloseComponentsMultiStateMerger::merge(
-    std::move(*combinedMultiState), m_maximumNumberOfComponents);
+  Trk::MultiComponentState mergedState =
+    QuickCloseComponentsMultiStateMerger::merge(std::move(*combinedMultiState),
+                                                m_maximumNumberOfComponents);
 
   // Before return the weights of the states need to be renormalised to one.
   MultiComponentStateHelpers::renormaliseState(mergedState);
@@ -412,7 +484,8 @@ Trk::GsfSmoother::addCCOT(const Trk::TrackStateOnSurface* currentState,
     return {};
   }
 
-  const Trk::MultiComponentState* currentMultiComponentState = currentMultiStateOS->components();
+  const Trk::MultiComponentState* currentMultiComponentState =
+    currentMultiStateOS->components();
   const Trk::MeasurementBase* measurement = currentState->measurementOnTrack();
   const Trk::Surface* currentSurface(nullptr);
 
@@ -422,41 +495,59 @@ Trk::GsfSmoother::addCCOT(const Trk::TrackStateOnSurface* currentState,
   Trk::MultiComponentState extrapolatedState{};
   // Extrapolate to the Calo
   if (currentSurface) {
-    extrapolatedState = m_extrapolator->extrapolateDirectly(
-      *currentMultiComponentState, ccot->associatedSurface(), Trk::alongMomentum, false, Trk::nonInteracting);
+    extrapolatedState =
+      m_extrapolator->extrapolateDirectly(Gaudi::Hive::currentContext(),
+                                          *currentMultiComponentState,
+                                          ccot->associatedSurface(),
+                                          Trk::alongMomentum,
+                                          false,
+                                          Trk::nonInteracting);
   }
 
   // Extrapolation Failed continue
   if (extrapolatedState.empty()) {
-    ATH_MSG_DEBUG("Extrapolation to the CCOT failed .. now not being taken in account");
+    ATH_MSG_DEBUG(
+      "Extrapolation to the CCOT failed .. now not being taken in account");
     return {};
   }
   // Update newly extrapolated state with MeasurementBase measurement
   std::unique_ptr<Trk::FitQualityOnSurface> fitQuality;
-  Trk::MultiComponentState updatedState = m_updator->update(std::move(extrapolatedState), *ccot, fitQuality);
+  Trk::MultiComponentState updatedState =
+    m_updator->update(std::move(extrapolatedState), *ccot, fitQuality);
 
   if (updatedState.empty()) {
-    ATH_MSG_DEBUG("Update of extrapolated state with CCOT failed .. now not being taken in account");
+    ATH_MSG_DEBUG("Update of extrapolated state with CCOT failed .. now not "
+                  "being taken in account");
     return {};
   }
 
   // Build TSOS with CCOT at the surface of the surface of calo
-  Trk::MultiComponentStateOnSurface* updatedMCSOS = new Trk::MultiComponentStateOnSurface(
-    ccot->clone(), MultiComponentStateHelpers::clone(updatedState).release(), fitQuality.release());
+  Trk::MultiComponentStateOnSurface* updatedMCSOS =
+    new Trk::MultiComponentStateOnSurface(
+      ccot->clone(),
+      MultiComponentStateHelpers::clone(updatedState).release(),
+      fitQuality.release());
 
   // Extrapolate back to the surface nearest the origin
-  extrapolatedState = m_extrapolator->extrapolateDirectly(
-    updatedState, *currentSurface, Trk::oppositeMomentum, false, Trk::nonInteracting);
+  extrapolatedState =
+    m_extrapolator->extrapolateDirectly(Gaudi::Hive::currentContext(),
+                                        updatedState,
+                                        *currentSurface,
+                                        Trk::oppositeMomentum,
+                                        false,
+                                        Trk::nonInteracting);
 
   if (extrapolatedState.empty()) {
-    ATH_MSG_DEBUG("Extrapolation from CCOT to 1st measurement failed .. now not being taken in account");
+    ATH_MSG_DEBUG("Extrapolation from CCOT to 1st measurement failed .. now "
+                  "not being taken in account");
     delete updatedMCSOS;
     return {};
   }
 
-  // Now build a dummy measurement ....  we dont want to a double count the measurement but
-  // we need to extrapolate back to origin to allow for the perigee parameters to be estimated
-  // Note this only important if the track is refit otherwise it has no influence.
+  // Now build a dummy measurement ....  we dont want to a double count the
+  // measurement but we need to extrapolate back to origin to allow for the
+  // perigee parameters to be estimated Note this only important if the track is
+  // refit otherwise it has no influence.
   AmgSymMatrix(5) covMatrix;
   covMatrix.setZero();
   covMatrix(0, 0) = 1e6;
@@ -466,19 +557,23 @@ Trk::GsfSmoother::addCCOT(const Trk::TrackStateOnSurface* currentState,
   defPar.push_back(locX);
   Trk::LocalParameters locpars(defPar);
 
-  Trk::PseudoMeasurementOnTrack* pseudoMeasurement = new PseudoMeasurementOnTrack(locpars, covMatrix, *currentSurface);
+  Trk::PseudoMeasurementOnTrack* pseudoMeasurement =
+    new PseudoMeasurementOnTrack(locpars, covMatrix, *currentSurface);
 
   //  Combine the state using and find the mode of the distribution
-  std::unique_ptr<Trk::TrackParameters> combinedState = MultiComponentStateCombiner::combine(extrapolatedState, true);
+  std::unique_ptr<Trk::TrackParameters> combinedState =
+    MultiComponentStateCombiner::combine(extrapolatedState, true);
 
-  const Trk::FitQualityOnSurface* combinedFitQuality = m_updator->fitQuality(extrapolatedState, *ccot);
+  const Trk::FitQualityOnSurface* combinedFitQuality =
+    m_updator->fitQuality(extrapolatedState, *ccot);
 
   // Build a TSOS using the dummy measurement and combined state
   Trk::MultiComponentStateOnSurface* finalSOS =
-    new Trk::MultiComponentStateOnSurface(pseudoMeasurement,
-                                          combinedState.release(),
-                                          MultiComponentStateHelpers::clone(extrapolatedState).release(),
-                                          combinedFitQuality);
+    new Trk::MultiComponentStateOnSurface(
+      pseudoMeasurement,
+      combinedState.release(),
+      MultiComponentStateHelpers::clone(extrapolatedState).release(),
+      combinedFitQuality);
   smoothedTrajectory->push_back(updatedMCSOS);
   smoothedTrajectory->push_back(finalSOS);
   ATH_MSG_DEBUG("Successfully added CCOT ");
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
index 47e78775b2304e9171f4ff2b473351fb255b3c5e..471707c49baf44e4509d9367d0214768845cef83 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/KLGaussianMixtureReduction.cxx
@@ -2,9 +2,9 @@
   Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 #include "TrkGaussianSumFilter/KLGaussianMixtureReduction.h"
-#include "TrkGaussianSumFilter/AlignedDynArray.h"
 #include "CxxUtils/features.h"
 #include "CxxUtils/vectorize.h"
+#include "TrkGaussianSumFilter/AlignedDynArray.h"
 #include <limits>
 #if !defined(__GNUC__)
 #define __builtin_assume_aligned(X, N) X
@@ -16,25 +16,23 @@
 #endif
 #endif
 
-//This enables -ftree-vectorize in gcc (we compile with O2)
+// This enables -ftree-vectorize in gcc (we compile with O2)
 ATH_ENABLE_VECTORIZATION;
-namespace{
+namespace {
 /**
- * Component Merging helper methods 
+ * Component Merging helper methods
  */
 using namespace GSFUtils;
 
 /**
  * Based on
- * https://www.sciencedirect.com/science/article/pii/089812218990103X 
- * equation (16) 
+ * https://www.sciencedirect.com/science/article/pii/089812218990103X
+ * equation (16)
  * but not accounting for weights
- * covI * invCovJ + covJ * invCovI + (mean1-mean2) (invcov+invcov) (mean1-mean2)  
- */  
-[[maybe_unused]]
-float
-symmetricKL(const Component1D& componentI,
-            const Component1D& componentJ)
+ * covI * invCovJ + covJ * invCovI + (mean1-mean2) (invcov+invcov) (mean1-mean2)
+ */
+[[maybe_unused]] float
+symmetricKL(const Component1D& componentI, const Component1D& componentJ)
 {
   const double meanDifference = componentI.mean - componentJ.mean;
   const double inverCovSum = componentI.invCov + componentJ.invCov;
@@ -44,11 +42,10 @@ symmetricKL(const Component1D& componentI,
 }
 /**
  * https://arxiv.org/pdf/2001.00727.pdf
- * equation (10) 
+ * equation (10)
  * Same as above but accounting for weights
- */ 
-[[maybe_unused]]
-float
+ */
+[[maybe_unused]] float
 weightedSymmetricKL(const Component1D& componentI,
                     const Component1D& componentJ)
 {
@@ -64,13 +61,12 @@ weightedSymmetricKL(const Component1D& componentI,
 /*
  * Moment-preserving merge of two 1D components
  * for example see
- * Runnalls, Andrew R.(2007) 
+ * Runnalls, Andrew R.(2007)
  * Kullback-Leibler approach to Gaussian mixture reduction
  * equations (2),(3),(4)
  */
 void
-combine(GSFUtils::Component1D& updated, 
-        GSFUtils::Component1D& removed)
+combine(GSFUtils::Component1D& updated, GSFUtils::Component1D& removed)
 {
 
   const double sumWeight = updated.weight + removed.weight;
@@ -91,8 +87,8 @@ combine(GSFUtils::Component1D& updated,
   updated.invCov = 1. / sumVariance;
   updated.weight = sumWeight;
 
-  //large numbers to enter the multiplications/sums
-  //make distance large 
+  // large numbers to enter the multiplications/sums
+  // make distance large
   removed.mean = 1e10;
   removed.cov = 1e10;
   removed.invCov = 1e10;
@@ -100,7 +96,7 @@ combine(GSFUtils::Component1D& updated,
 }
 
 /**
- * Recalculate the distances given a merged input 
+ * Recalculate the distances given a merged input
  * and return the minimum index/distance wrt to this
  * new component
  */
@@ -110,28 +106,29 @@ recalculateDistances(const componentPtrRestrict componentsIn,
                      const int32_t mini,
                      const int32_t n)
 {
-  const Component1D* components =
-    static_cast<const Component1D*>(__builtin_assume_aligned(componentsIn, alignment));
-  float* distances = static_cast<float*>(__builtin_assume_aligned(distancesIn, alignment));
+  const Component1D* components = static_cast<const Component1D*>(
+    __builtin_assume_aligned(componentsIn, alignment));
+  float* distances =
+    static_cast<float*>(__builtin_assume_aligned(distancesIn, alignment));
 
   const int32_t j = mini;
   const int32_t indexConst = (j - 1) * j / 2;
-  //Rows
+  // Rows
   const Component1D componentJ = components[j];
   for (int32_t i = 0; i < j; ++i) {
     const Component1D componentI = components[i];
     const int32_t index = indexConst + i;
     distances[index] = symmetricKL(componentI, componentJ);
   }
-  //Columns
+  // Columns
   for (int32_t i = j + 1; i < n; ++i) {
     const int32_t index = (i - 1) * i / 2 + j;
     const Component1D componentI = components[i];
-    distances[index] = symmetricKL(componentI,componentJ);
+    distances[index] = symmetricKL(componentI, componentJ);
   }
 }
 
-/** 
+/**
  * Calculate the distances for all component pairs
  */
 void
@@ -140,15 +137,16 @@ calculateAllDistances(const componentPtrRestrict componentsIn,
                       const int32_t n)
 {
 
-  const Component1D* components =
-  static_cast<const Component1D*>(__builtin_assume_aligned(componentsIn, alignment));
-  float* distances = static_cast<float*>(__builtin_assume_aligned(distancesIn, alignment));
+  const Component1D* components = static_cast<const Component1D*>(
+    __builtin_assume_aligned(componentsIn, alignment));
+  float* distances =
+    static_cast<float*>(__builtin_assume_aligned(distancesIn, alignment));
   for (int32_t i = 1; i < n; ++i) {
-    const int32_t indexConst = (i-1) * i / 2;
+    const int32_t indexConst = (i - 1) * i / 2;
     const Component1D componentI = components[i];
     for (int32_t j = 0; j < i; ++j) {
       const Component1D componentJ = components[j];
-      distances[indexConst + j] = symmetricKL(componentI,componentJ);
+      distances[indexConst + j] = symmetricKL(componentI, componentJ);
     }
   }
 }
@@ -164,13 +162,13 @@ resetDistances(floatPtrRestrict distancesIn,
   float* distances = (float*)__builtin_assume_aligned(distancesIn, alignment);
   const int32_t j = minj;
   const int32_t indexConst = (j - 1) * j / 2;
-  //Rows
+  // Rows
   for (int32_t i = 0; i < j; ++i) {
     distances[indexConst + i] = std::numeric_limits<float>::max();
   }
-  //Columns
-  for (int32_t i = j+1; i < n; ++i) {
-    const int32_t index = (i-1)*i/2 + j;
+  // Columns
+  for (int32_t i = j + 1; i < n; ++i) {
+    const int32_t index = (i - 1) * i / 2 + j;
     distances[index] = std::numeric_limits<float>::max();
   }
 }
@@ -179,7 +177,7 @@ resetDistances(floatPtrRestrict distancesIn,
 namespace GSFUtils {
 
 /*
- * Merge the componentsIn and return 
+ * Merge the componentsIn and return
  * which componets got merged
  */
 std::vector<std::pair<int32_t, int32_t>>
@@ -187,42 +185,41 @@ findMerges(componentPtrRestrict componentsIn,
            const int32_t inputSize,
            const int32_t reducedSize)
 {
-  Component1D* components =
-    static_cast<Component1D*>(__builtin_assume_aligned(componentsIn, alignment));
-  //Based on the inputSize allocate enough space for the pairwise distances
+  Component1D* components = static_cast<Component1D*>(
+    __builtin_assume_aligned(componentsIn, alignment));
+  // Based on the inputSize allocate enough space for the pairwise distances
   const int32_t n = inputSize;
-  const int32_t nn = n * (n-1)/2;
+  const int32_t nn = n * (n - 1) / 2;
   // Create a trianular mapping for the pairwise distances
   std::vector<triangularToIJ> convert;
   convert.reserve(nn);
-  for (int32_t i = 1; i<n; ++i) {
-    const int indexConst = (i-1) * i / 2;
-    for (int32_t j = 0; j<i; ++j) {
+  for (int32_t i = 1; i < n; ++i) {
+    const int indexConst = (i - 1) * i / 2;
+    for (int32_t j = 0; j < i; ++j) {
       int32_t index = indexConst + j;
-      convert[index]={i,j};
+      convert[index] = { i, j };
     }
   }
-  //We need to work with multiple of 8, in principle this is a requirement
-  //of aligned_alloc (although not in POSIX ) i.e allocation should be multiple
-  //of the requested size.
-  const int32_t nn2 =
-    (nn & 7) == 0 ? nn
-                  : nn + (8 - (nn & 7)); 
-  AlignedDynArray<float, alignment> distances(nn2, std::numeric_limits<float>::max());
-  
+  // We need to work with multiple of 8, in principle this is a requirement
+  // of aligned_alloc (although not in POSIX ) i.e allocation should be multiple
+  // of the requested size.
+  const int32_t nn2 = (nn & 7) == 0 ? nn : nn + (8 - (nn & 7));
+  AlignedDynArray<float, alignment> distances(
+    nn2, std::numeric_limits<float>::max());
+
   // vector to be returned
   std::vector<std::pair<int32_t, int32_t>> merges;
   merges.reserve(inputSize - reducedSize);
   // initial distance calculation
   calculateAllDistances(components, distances, n);
-  
+
   // merge loop
   int32_t numberOfComponentsLeft = n;
   while (numberOfComponentsLeft > reducedSize) {
     // see if we have the next already
     const std::pair<int32_t, float> minDis = findMinimumIndex(distances, nn2);
     const int32_t minIndex = minDis.first;
-    const triangularToIJ conversion= convert[minIndex];
+    const triangularToIJ conversion = convert[minIndex];
     const int32_t mini = conversion.I;
     const int32_t minj = conversion.J;
     // Combine the 2 components
@@ -232,7 +229,7 @@ findMerges(componentPtrRestrict componentsIn,
     // Reset old weights wrt the  minj position
     resetDistances(distances, minj, n);
     // keep track and decrement
-    merges.emplace_back(mini,minj);
+    merges.emplace_back(mini, minj);
     --numberOfComponentsLeft;
   } // end of merge while
   return merges;
@@ -255,7 +252,7 @@ findMerges(componentPtrRestrict componentsIn,
  * AVX2 intrinsics used :
  *
  * _mm256_set1_epi32
- * Broadcast 32-bit integer a to all elements of dst. 
+ * Broadcast 32-bit integer a to all elements of dst.
  *
  * _mm256_setr_epi32
  * Set packed 32-bit integers in dst with the supplied values in reverse order.
@@ -281,8 +278,7 @@ findMerges(componentPtrRestrict componentsIn,
  * Blend packed 8-bit integers from a and b using mask, and store the results
  * in dst.
  */
-__attribute__((target("avx2"))) 
-std::pair<int32_t,float>
+__attribute__((target("avx2"))) std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
@@ -296,12 +292,13 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
     // increment the indices
     indicesIn = _mm256_add_epi32(indicesIn, increment);
     // Get a mask indicating when an element is less than the ones we have
-    __m256i lt = _mm256_castps_si256(_mm256_cmp_ps(values, minvalues, _CMP_LT_OS));
+    __m256i lt =
+      _mm256_castps_si256(_mm256_cmp_ps(values, minvalues, _CMP_LT_OS));
     // b lend select the indices to update
     minindices = _mm256_blendv_epi8(minindices, indicesIn, lt);
     minvalues = _mm256_min_ps(values, minvalues);
   }
-  //Do the final calculation scalar way
+  // Do the final calculation scalar way
   alignas(alignment) float distances[8];
   alignas(alignment) int32_t indices[8];
   _mm256_store_ps(distances, minvalues);
@@ -314,7 +311,7 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
       minDistance = distances[i];
     }
   }
-  return {minIndex,minDistance};
+  return { minIndex, minDistance };
 }
 /*
  * SSE intrinsics used
@@ -344,12 +341,11 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
  * for compilation and does not generate any instructions, thus it has zero
  * latency.
  */
-__attribute__((target("sse4.1"))) 
-std::pair<int32_t,float>
+__attribute__((target("sse4.1"))) std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
-  //Do 2 vectors of 4 elements , so 8 at time
+  // Do 2 vectors of 4 elements , so 8 at time
   const __m128i increment = _mm_set1_epi32(8);
   __m128i indices1 = _mm_setr_epi32(0, 1, 2, 3);
   __m128i indices2 = _mm_setr_epi32(4, 5, 6, 7);
@@ -373,7 +369,7 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
     minindices2 = _mm_blendv_epi8(minindices2, indices2, lt2);
     minvalues2 = _mm_min_ps(values2, minvalues2);
   }
-  //Do the final calculation scalar way
+  // Do the final calculation scalar way
   alignas(alignment) float distances[8];
   alignas(alignment) int32_t indices[8];
   _mm_store_ps(distances, minvalues1);
@@ -389,7 +385,7 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
       minDistance = distances[i];
     }
   }
-  return {minIndex,minDistance};
+  return { minIndex, minDistance };
 }
 /*
  * SSE2 does not have a blend/select instruction.
@@ -404,12 +400,11 @@ SSE2_mm_blendv_epi8(__m128i a, __m128i b, __m128i mask)
 {
   return _mm_or_si128(_mm_andnot_si128(mask, a), _mm_and_si128(mask, b));
 }
-__attribute__((target("sse2"))) 
-std::pair<int32_t,float>
+__attribute__((target("sse2"))) std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
-  //Do 2 vectors of 4 elements, so 8 at a time
+  // Do 2 vectors of 4 elements, so 8 at a time
   const __m128i increment = _mm_set1_epi32(8);
   __m128i indices1 = _mm_setr_epi32(0, 1, 2, 3);
   __m128i indices2 = _mm_setr_epi32(4, 5, 6, 7);
@@ -433,7 +428,7 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
     minindices2 = SSE2_mm_blendv_epi8(minindices2, indices2, lt2);
     minvalues2 = _mm_min_ps(values2, minvalues2);
   }
-  //Do the final calculation scalar way
+  // Do the final calculation scalar way
   alignas(alignment) float distances[8];
   alignas(alignment) int32_t indices[8];
   _mm_store_ps(distances, minvalues1);
@@ -449,13 +444,13 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
       minDistance = distances[i];
     }
   }
-  return {minIndex,minDistance};
+  return { minIndex, minDistance };
 }
 #endif // end of x86_64 versions
 /* Always fall back to a simple default version with no intrinsics */
 __attribute__((target("default")))
 #endif // HAVE_FUNCTION_MULTIVERSIONING
-std::pair<int32_t,float>
+std::pair<int32_t, float>
 findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
 {
   float* array = (float*)__builtin_assume_aligned(distancesIn, alignment);
@@ -468,6 +463,6 @@ findMinimumIndex(const floatPtrRestrict distancesIn, const int n)
       minDistance = value;
     }
   }
-  return {minIndex,minDistance}; 
+  return { minIndex, minDistance };
 }
 } // end namespace GSFUtils
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateAssembler.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateAssembler.cxx
index 352f9137034de8b937bbd982cc94cb4b45d1fcf1..500870bdc653481e64fa67433001043705cf4326 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateAssembler.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateAssembler.cxx
@@ -20,7 +20,8 @@ class SortByLargerSimpleComponentWeight
 {
 public:
   SortByLargerSimpleComponentWeight() = default;
-  bool operator()(const Trk::ComponentParameters& firstComponent, const Trk::ComponentParameters& secondComponent) const
+  bool operator()(const Trk::ComponentParameters& firstComponent,
+                  const Trk::ComponentParameters& secondComponent) const
   {
     return firstComponent.second > secondComponent.second;
   }
@@ -39,18 +40,23 @@ Trk::MultiComponentStateAssembler::reset(Cache& cache)
 }
 
 bool
-Trk::MultiComponentStateAssembler::addComponent(Cache& cache, ComponentParameters&& componentParameters)
+Trk::MultiComponentStateAssembler::addComponent(
+  Cache& cache,
+  ComponentParameters&& componentParameters)
 {
   if (cache.assemblyDone) {
     return false;
   }
   cache.validWeightSum += componentParameters.second;
-  cache.multiComponentState.emplace_back(componentParameters.first.release(), componentParameters.second);
+  cache.multiComponentState.emplace_back(componentParameters.first.release(),
+                                         componentParameters.second);
   return true;
 }
 
 bool
-Trk::MultiComponentStateAssembler::addMultiState(Cache& cache, Trk::MultiComponentState&& multiComponentState)
+Trk::MultiComponentStateAssembler::addMultiState(
+  Cache& cache,
+  Trk::MultiComponentState&& multiComponentState)
 {
   if (cache.assemblyDone) {
     return false;
@@ -58,7 +64,8 @@ Trk::MultiComponentStateAssembler::addMultiState(Cache& cache, Trk::MultiCompone
   double sumW(0.);
   for (auto& component : multiComponentState) {
     sumW += component.second;
-    cache.multiComponentState.emplace_back(component.first.release(), component.second);
+    cache.multiComponentState.emplace_back(component.first.release(),
+                                           component.second);
   }
   multiComponentState.clear();
   cache.validWeightSum += sumW;
@@ -66,7 +73,9 @@ Trk::MultiComponentStateAssembler::addMultiState(Cache& cache, Trk::MultiCompone
 }
 
 bool
-Trk::MultiComponentStateAssembler::addInvalidComponentWeight(Cache& cache, const double invalidComponentWeight)
+Trk::MultiComponentStateAssembler::addInvalidComponentWeight(
+  Cache& cache,
+  const double invalidComponentWeight)
 {
   cache.invalidWeightSum += invalidComponentWeight;
   return true;
@@ -77,13 +86,14 @@ Trk::MultiComponentStateAssembler::prepareStateForAssembly(Cache& cache)
 {
   // Protect against empty state
   if (!isStateValid(cache)) {
-      return false;
+    return false;
   }
 
   // Check for minimum fraction of valid states
   double den = cache.validWeightSum + cache.invalidWeightSum;
   double validWeightFraction = den > 0 ? cache.validWeightSum / den : 0;
-  if (cache.invalidWeightSum > 0. && validWeightFraction < cache.minimumValidFraction) {
+  if (cache.invalidWeightSum > 0. &&
+      validWeightFraction < cache.minimumValidFraction) {
     return false;
   }
   // Check to see assembly has not already been done
@@ -94,7 +104,9 @@ Trk::MultiComponentStateAssembler::prepareStateForAssembly(Cache& cache)
   /*
    * Sort Multi-Component State by weights
    */
-  std::sort(cache.multiComponentState.begin(), cache.multiComponentState.end(), SortByLargerSimpleComponentWeight());
+  std::sort(cache.multiComponentState.begin(),
+            cache.multiComponentState.end(),
+            SortByLargerSimpleComponentWeight());
 
   double totalWeight(cache.validWeightSum + cache.invalidWeightSum);
   if (totalWeight != 0.) {
@@ -104,7 +116,8 @@ Trk::MultiComponentStateAssembler::prepareStateForAssembly(Cache& cache)
      * are before the value (i.e ordered descending).
      * return the 1st element where (element<value)
      */
-    ComponentParameters dummySmallestWeight(nullptr, cache.minimumFractionalWeight * totalWeight);
+    ComponentParameters dummySmallestWeight(
+      nullptr, cache.minimumFractionalWeight * totalWeight);
     auto lower_than = std::upper_bound(cache.multiComponentState.begin(),
                                        cache.multiComponentState.end(),
                                        dummySmallestWeight,
@@ -113,7 +126,9 @@ Trk::MultiComponentStateAssembler::prepareStateForAssembly(Cache& cache)
      * reverse iterate , so as to delete removing the last
      */
     auto lower_than_reverse = std::make_reverse_iterator(lower_than);
-    for (auto itr = cache.multiComponentState.rbegin(); itr != lower_than_reverse; ++itr) {
+    for (auto itr = cache.multiComponentState.rbegin();
+         itr != lower_than_reverse;
+         ++itr) {
       cache.multiComponentState.erase(itr.base() - 1);
     }
   }
@@ -133,14 +148,15 @@ Trk::MultiComponentStateAssembler::assembledState(Cache& cache)
     return {};
   }
   if (cache.invalidWeightSum > 0. || cache.validWeightSum <= 0.) {
-    double totalWeight = cache.validWeightSum + cache.invalidWeightSum;
+    const double totalWeight = cache.validWeightSum + cache.invalidWeightSum;
     return doStateAssembly(cache, totalWeight);
   }
   return doStateAssembly(cache, cache.validWeightSum);
 }
 
 Trk::MultiComponentState
-Trk::MultiComponentStateAssembler::assembledState(Cache& cache, const double newWeight)
+Trk::MultiComponentStateAssembler::assembledState(Cache& cache,
+                                                  const double newWeight)
 {
   if (!prepareStateForAssembly(cache)) {
     return {};
@@ -149,19 +165,23 @@ Trk::MultiComponentStateAssembler::assembledState(Cache& cache, const double new
 }
 
 Trk::MultiComponentState
-Trk::MultiComponentStateAssembler::doStateAssembly(Cache& cache, const double newWeight)
+Trk::MultiComponentStateAssembler::doStateAssembly(Cache& cache,
+                                                   const double newWeight)
 {
   if (!isStateValid(cache)) {
     return {};
   }
+  const size_t cacheSize = cache.multiComponentState.size();
+
   if (cache.validWeightSum <= 0.) {
     if (!cache.multiComponentState.empty()) {
-      double fixedWeights = 1. / (double)cache.multiComponentState.size();
+      const double fixedWeights = 1. / static_cast<double>(cacheSize);
       for (auto& component : cache.multiComponentState) {
         component.second = fixedWeights;
       }
     }
-    Trk::MultiComponentState assembledState{};
+    Trk::MultiComponentState assembledState;
+    assembledState.reserve(cacheSize);
     for (auto& component : cache.multiComponentState) {
       assembledState.emplace_back(component.first.release(), component.second);
     }
@@ -169,11 +189,13 @@ Trk::MultiComponentStateAssembler::doStateAssembly(Cache& cache, const double ne
     reset(cache);
     return assembledState;
   }
-
-  Trk::MultiComponentState assembledState{};
-  double scalingFactor = cache.validWeightSum > 0. ? newWeight / cache.validWeightSum : 1.;
+  Trk::MultiComponentState assembledState;
+  assembledState.reserve(cacheSize);
+  const double scalingFactor =
+    cache.validWeightSum > 0. ? newWeight / cache.validWeightSum : 1.;
   for (auto& component : cache.multiComponentState) {
-    assembledState.emplace_back(component.first.release(), component.second * scalingFactor);
+    assembledState.emplace_back(component.first.release(),
+                                component.second * scalingFactor);
   }
   // Reset the cache before leaving
   reset(cache);
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx
index 4b8742f9714cd8098a57c80cafe1f437170fe851..e41a362475af2046c1632e42372be1784335c0dd 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateCombiner.cxx
@@ -7,7 +7,8 @@
       -----------------------------------------------
 begin                : Monday 20th December 2004
 author               : atkinson,morley,anastopoulos
-description          : Implementation code for MultiComponentStateCombiner helpers
+description          : Implementation code for MultiComponentStateCombiner
+helpers
 *********************************************************************************/
 
 #include "TrkGaussianSumFilter/MultiComponentStateCombiner.h"
@@ -16,26 +17,30 @@ description          : Implementation code for MultiComponentStateCombiner helpe
 #include "TrkSurfaces/Surface.h"
 
 std::unique_ptr<Trk::TrackParameters>
-Trk::MultiComponentStateCombiner::combine(const Trk::MultiComponentState& uncombinedState,
-                                          const bool useMode,
-                                          const double fractionPDFused)
+Trk::MultiComponentStateCombiner::combine(
+  const Trk::MultiComponentState& uncombinedState,
+  const bool useMode,
+  const double fractionPDFused)
 {
-  std::unique_ptr<Trk::ComponentParameters> combinedComponent = compute(&uncombinedState, useMode, fractionPDFused);
+  std::unique_ptr<Trk::ComponentParameters> combinedComponent =
+    compute(&uncombinedState, useMode, fractionPDFused);
   return std::move(combinedComponent->first);
 }
 
 std::unique_ptr<Trk::ComponentParameters>
-Trk::MultiComponentStateCombiner::combineWithWeight(const Trk::MultiComponentState& uncombinedState,
-                                                    const bool useMode,
-                                                    const double fractionPDFused)
+Trk::MultiComponentStateCombiner::combineWithWeight(
+  const Trk::MultiComponentState& uncombinedState,
+  const bool useMode,
+  const double fractionPDFused)
 
 {
   return compute(&uncombinedState, useMode, fractionPDFused);
 }
 
 void
-Trk::MultiComponentStateCombiner::combineWithWeight(Trk::ComponentParameters& mergeTo,
-                                                    const Trk::ComponentParameters& addThis)
+Trk::MultiComponentStateCombiner::combineWithWeight(
+  Trk::ComponentParameters& mergeTo,
+  const Trk::ComponentParameters& addThis)
 {
 
   const Trk::TrackParameters* firstParameters = mergeTo.first.get();
@@ -64,7 +69,8 @@ Trk::MultiComponentStateCombiner::combineWithWeight(Trk::ComponentParameters& me
     parameters[2] -= 2 * M_PI;
   }
 
-  mean = firstWeight * firstParameters->parameters() + secondWeight * parameters;
+  mean =
+    firstWeight * firstParameters->parameters() + secondWeight * parameters;
   mean /= totalWeight;
 
   // Ensure that phi is between -pi and pi
@@ -75,8 +81,8 @@ Trk::MultiComponentStateCombiner::combineWithWeight(Trk::ComponentParameters& me
     mean[2] += 2 * M_PI;
   }
 
-  // Extract local error matrix: Must make sure track parameters are measured, ie have an associated
-  // error matrix.
+  // Extract local error matrix: Must make sure track parameters are measured,
+  // ie have an associated error matrix.
   if (firstMeasuredCov && secondMeasuredCov) {
     AmgSymMatrix(5) covariance;
     AmgSymMatrix(5) covariancePart1;
@@ -84,8 +90,10 @@ Trk::MultiComponentStateCombiner::combineWithWeight(Trk::ComponentParameters& me
     AmgSymMatrix(5) covariancePart2;
     covariancePart2.setZero();
 
-    covariancePart1 = firstWeight * (*firstMeasuredCov) + secondWeight * (*secondMeasuredCov);
-    AmgVector(5) parameterDifference = firstParameters->parameters() - parameters;
+    covariancePart1 =
+      firstWeight * (*firstMeasuredCov) + secondWeight * (*secondMeasuredCov);
+    AmgVector(5) parameterDifference =
+      firstParameters->parameters() - parameters;
 
     if (parameterDifference[2] > M_PI) {
       parameterDifference[2] -= 2 * M_PI;
@@ -93,8 +101,10 @@ Trk::MultiComponentStateCombiner::combineWithWeight(Trk::ComponentParameters& me
       parameterDifference[2] += 2 * M_PI;
     }
 
-    covariancePart2 = firstWeight * secondWeight * parameterDifference * parameterDifference.transpose();
-    covariance = covariancePart1 / totalWeight + covariancePart2 / (totalWeight * totalWeight);
+    covariancePart2 = firstWeight * secondWeight * parameterDifference *
+                      parameterDifference.transpose();
+    covariance = covariancePart1 / totalWeight +
+                 covariancePart2 / (totalWeight * totalWeight);
 
     mergeTo.first->updateParameters(mean, covariance);
     mergeTo.second = totalWeight;
@@ -105,22 +115,25 @@ Trk::MultiComponentStateCombiner::combineWithWeight(Trk::ComponentParameters& me
 }
 
 std::unique_ptr<Trk::ComponentParameters>
-Trk::MultiComponentStateCombiner::compute(const Trk::MultiComponentState* uncombinedState,
-                                          const bool useMode,
-                                          const double fractionPDFused)
+Trk::MultiComponentStateCombiner::compute(
+  const Trk::MultiComponentState* uncombinedState,
+  const bool useMode,
+  const double fractionPDFused)
 {
   if (uncombinedState->empty()) {
     return nullptr;
   }
 
-  const Trk::TrackParameters* firstParameters = uncombinedState->front().first.get();
+  const Trk::TrackParameters* firstParameters =
+    uncombinedState->front().first.get();
 
   // Check to see if first track parameters are measured or not
   const AmgSymMatrix(5)* firstMeasuredCov = firstParameters->covariance();
 
-  if (uncombinedState->size() == 1)
-    return std::make_unique<Trk::ComponentParameters>(uncombinedState->front().first->clone(),
-                                                      uncombinedState->front().second);
+  if (uncombinedState->size() == 1) {
+    return std::make_unique<Trk::ComponentParameters>(
+      uncombinedState->front().first->clone(), uncombinedState->front().second);
+  }
 
   double sumW(0.);
   const int dimension = (uncombinedState->front()).first->parameters().rows();
@@ -154,7 +167,8 @@ Trk::MultiComponentStateCombiner::compute(const Trk::MultiComponentState* uncomb
 
     // Ensure that we don't have any problems with the cyclical nature of phi
     // Use first state as reference poin
-    double deltaPhi = (*uncombinedState->begin()).first->parameters()[2] - parameters[2];
+    double deltaPhi =
+      (*uncombinedState->begin()).first->parameters()[2] - parameters[2];
 
     if (deltaPhi > M_PI) {
       parameters[2] += 2 * M_PI;
@@ -165,11 +179,11 @@ Trk::MultiComponentStateCombiner::compute(const Trk::MultiComponentState* uncomb
     sumW += weight;
     mean += weight * parameters;
 
-    // Extract local error matrix: Must make sure track parameters are measured, ie have an
-    // associated error matrix.
+    // Extract local error matrix: Must make sure track parameters are measured,
+    // ie have an associated error matrix.
     const AmgSymMatrix(5)* measuredCov = trackParameters->covariance();
 
-    // Calculate the combined covariance matrix 
+    // Calculate the combined covariance matrix
     // \sigma = \Sum_{m=1}^{M} w_{m}(\sigma_m + (\mu_m-\mu)(\mu_m-\mu)^{T})
     if (measuredCov) {
       // Changed from errorMatrixInMeasurementFrame
@@ -177,27 +191,37 @@ Trk::MultiComponentStateCombiner::compute(const Trk::MultiComponentState* uncomb
       covariancePart1 += weight * (*measuredCov);
 
       /* ============================================================================
-         Loop over all remaining components to find the second part of the covariance
-         ============================================================================ */
+         Loop over all remaining components to find the second part of the
+         covariance
+         ============================================================================
+       */
 
-      Trk::MultiComponentState::const_iterator remainingComponentIterator = component;
+      Trk::MultiComponentState::const_iterator remainingComponentIterator =
+        component;
 
-      for (; remainingComponentIterator != uncombinedState->end(); ++remainingComponentIterator) {
+      for (; remainingComponentIterator != uncombinedState->end();
+           ++remainingComponentIterator) {
 
-        if (remainingComponentIterator == component)
+        if (remainingComponentIterator == component) {
           continue;
+        }
 
-        AmgVector(5) parameterDifference = parameters - ((*remainingComponentIterator).first)->parameters();
+        AmgVector(5) parameterDifference =
+          parameters - ((*remainingComponentIterator).first)->parameters();
 
-        double remainingComponentIteratorWeight = (*remainingComponentIterator).second;
+        double remainingComponentIteratorWeight =
+          (*remainingComponentIterator).second;
 
-        covariancePart2 += weight * remainingComponentIteratorWeight * parameterDifference * parameterDifference.transpose();
+        covariancePart2 += weight * remainingComponentIteratorWeight *
+                           parameterDifference *
+                           parameterDifference.transpose();
 
       } // end loop over remaining components
 
     } // end clause if errors are involved
-    if (weight / totalWeight > fractionPDFused)
+    if (weight / totalWeight > fractionPDFused) {
       break;
+    }
   } // end loop over all components
 
   mean /= sumW;
@@ -215,7 +239,8 @@ Trk::MultiComponentStateCombiner::compute(const Trk::MultiComponentState* uncomb
   if (useMode && dimension == 5) {
 
     // Calculate the mode of the q/p distribution
-    std::array<double, 10> modes = Trk::MultiComponentStateModeCalculator::calculateMode(*uncombinedState);
+    std::array<double, 10> modes =
+      Trk::MultiComponentStateModeCalculator::calculateMode(*uncombinedState);
 
     //  Replace mean with mode if qOverP mode is not 0
     if (modes[4] != 0) {
@@ -280,14 +305,17 @@ Trk::MultiComponentStateCombiner::compute(const Trk::MultiComponentState* uncomb
   double phi = mean[Trk::phi];
   double theta = mean[Trk::theta];
   double qoverp = mean[Trk::qOverP];
-  if (firstMeasuredCov)
+  if (firstMeasuredCov) {
     combinedTrackParameters.reset(
-      firstParameters->associatedSurface().createTrackParameters(loc1, loc2, phi, theta, qoverp, covariance));
-  else {
+      firstParameters->associatedSurface().createTrackParameters(
+        loc1, loc2, phi, theta, qoverp, covariance));
+  } else {
     combinedTrackParameters.reset(
-      firstParameters->associatedSurface().createTrackParameters(loc1, loc2, phi, theta, qoverp, nullptr));
+      firstParameters->associatedSurface().createTrackParameters(
+        loc1, loc2, phi, theta, qoverp, nullptr));
     delete covariance;
   }
 
-  return std::make_unique<ComponentParameters>(std::move(combinedTrackParameters), totalWeight);
+  return std::make_unique<ComponentParameters>(
+    std::move(combinedTrackParameters), totalWeight);
 }
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx
index 20f0115c47bc54634ff54314c9a69e306ef15d02..1f109fe8bbf407aa77087a9733778a041d76e6f7 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/MultiComponentStateModeCalculator.cxx
@@ -8,7 +8,8 @@
 begin                : Thursday 6th July 2006
 author               : atkinson , amorley , anastopoulos
 email                : amorley@cern.ch
-description          : Implementation code for MultiComponentStateModeCalculator class
+description          : Implementation code for MultiComponentStateModeCalculator
+class
 ****************************************************************************************/
 
 #include "TrkGaussianSumFilter/MultiComponentStateModeCalculator.h"
@@ -20,7 +21,8 @@ const double invsqrt2PI = 1. / sqrt(2. * M_PI);
 }
 
 std::array<double, 10>
-Trk::MultiComponentStateModeCalculator::calculateMode(const Trk::MultiComponentState& multiComponentState)
+Trk::MultiComponentStateModeCalculator::calculateMode(
+  const Trk::MultiComponentState& multiComponentState)
 {
   std::array<double, 10> modes{};
   // Check to see if the multi-component state is measured
@@ -52,8 +54,8 @@ Trk::MultiComponentStateModeCalculator::calculateMode(const Trk::MultiComponentS
       }
     }
     modes[i] = findMode(largerMeanComponent, i, mixture);
-    // Calculate the FWHM and return this back so that it can be used to correct the covariance
-    // matrix
+    // Calculate the FWHM and return this back so that it can be used to correct
+    // the covariance matrix
     if (largerMeanComponent != modes[i]) {
       // mode calculation was successful now calulate FWHM
       double currentWidth = width(i, mixture);
@@ -72,7 +74,8 @@ Trk::MultiComponentStateModeCalculator::calculateMode(const Trk::MultiComponentS
         }
       }
 
-      bool highXFound = findRoot(highX, modes[i], upperbound, pdfVal * 0.5, i, mixture);
+      bool highXFound =
+        findRoot(highX, modes[i], upperbound, pdfVal * 0.5, i, mixture);
 
       double lowerbound = modes[i] - 1.5 * currentWidth;
       while (true) {
@@ -82,7 +85,8 @@ Trk::MultiComponentStateModeCalculator::calculateMode(const Trk::MultiComponentS
           break;
         }
       }
-      bool lowXFound = findRoot(lowX, lowerbound, modes[i], pdfVal * 0.5, i, mixture);
+      bool lowXFound =
+        findRoot(lowX, lowerbound, modes[i], pdfVal * 0.5, i, mixture);
       if (highXFound && lowXFound) {
         double FWHM = highX - lowX;
         modes[i + 5] = FWHM / 2.35482; // 2 * sqrt( 2* log(2))
@@ -101,8 +105,9 @@ Trk::MultiComponentStateModeCalculator::calculateMode(const Trk::MultiComponentS
 }
 
 void
-Trk::MultiComponentStateModeCalculator::fillMixture(const Trk::MultiComponentState& multiComponentState,
-                                                    std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::fillMixture(
+  const Trk::MultiComponentState& multiComponentState,
+  std::array<std::vector<Component>, 5>& mixture)
 {
 
   for (int i = 0; i < 5; i++) {
@@ -110,28 +115,33 @@ Trk::MultiComponentStateModeCalculator::fillMixture(const Trk::MultiComponentSta
   }
 
   // Loop over all the components in the multi-component state
-  Trk::MultiComponentState::const_iterator component = multiComponentState.begin();
-  Trk::ParamDefs parameter[5] = { Trk::d0, Trk::z0, Trk::phi, Trk::theta, Trk::qOverP };
+  Trk::MultiComponentState::const_iterator component =
+    multiComponentState.begin();
+  Trk::ParamDefs parameter[5] = {
+    Trk::d0, Trk::z0, Trk::phi, Trk::theta, Trk::qOverP
+  };
   for (; component != multiComponentState.end(); ++component) {
     for (int i = 0; i < 5; ++i) {
       const Trk::TrackParameters* componentParameters = component->first.get();
 
       const AmgSymMatrix(5)* measuredCov = componentParameters->covariance();
 
-      if (!measuredCov)
+      if (!measuredCov) {
         return;
+      }
       // Enums for Perigee //
       //                           d0=0, z0=1, phi0=2, theta=3, qOverP=4,
       double weight = component->second;
       double mean = componentParameters->parameters()[parameter[i]];
-      // FIXME ATLASRECTS-598 this fabs() should not be necessary... for some reason
-      // cov(qOverP,qOverP) can be negative
+      // FIXME ATLASRECTS-598 this fabs() should not be necessary... for some
+      // reason cov(qOverP,qOverP) can be negative
       double sigma = sqrt(fabs((*measuredCov)(parameter[i], parameter[i])));
 
       // Ensure that we don't have any problems with the cyclical nature of phi
       // Use first state as reference point
       if (i == 2) { // phi
-        double deltaPhi = multiComponentState.begin()->first->parameters()[2] - mean;
+        double deltaPhi =
+          multiComponentState.begin()->first->parameters()[2] - mean;
         if (deltaPhi > M_PI) {
           mean += 2 * M_PI;
         } else if (deltaPhi < -M_PI) {
@@ -145,9 +155,10 @@ Trk::MultiComponentStateModeCalculator::fillMixture(const Trk::MultiComponentSta
 }
 
 double
-Trk::MultiComponentStateModeCalculator::findMode(double xStart,
-                                                 int i,
-                                                 const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::findMode(
+  double xStart,
+  int i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
 
   int iteration(0);
@@ -187,9 +198,10 @@ Trk::MultiComponentStateModeCalculator::findMode(double xStart,
 }
 
 double
-Trk::MultiComponentStateModeCalculator::findModeGlobal(double mean,
-                                                       int i,
-                                                       const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::findModeGlobal(
+  double mean,
+  int i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
 
   double start(-1);
@@ -217,21 +229,28 @@ Trk::MultiComponentStateModeCalculator::findModeGlobal(double mean,
 }
 
 double
-Trk::MultiComponentStateModeCalculator::pdf(double x, int i, const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::pdf(
+  double x,
+  int i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
 
   double pdf(0.);
 
   auto component = mixture[i].begin();
 
-  for (; component != mixture[i].end(); ++component)
+  for (; component != mixture[i].end(); ++component) {
     pdf += component->weight * gaus(x, component->mean, component->sigma);
+  }
 
   return pdf;
 }
 
 double
-Trk::MultiComponentStateModeCalculator::d1pdf(double x, int i, const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::d1pdf(
+  double x,
+  int i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
 
   double result(0.);
@@ -242,14 +261,18 @@ Trk::MultiComponentStateModeCalculator::d1pdf(double x, int i, const std::array<
 
     double z = (x - component->mean) / component->sigma;
 
-    result += -1. * component->weight * z * gaus(x, component->mean, component->sigma) / component->sigma;
+    result += -1. * component->weight * z *
+              gaus(x, component->mean, component->sigma) / component->sigma;
   }
 
   return result;
 }
 
 double
-Trk::MultiComponentStateModeCalculator::d2pdf(double x, int i, const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::d2pdf(
+  double x,
+  int i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
 
   double result(0.);
@@ -260,21 +283,23 @@ Trk::MultiComponentStateModeCalculator::d2pdf(double x, int i, const std::array<
 
     double z = (x - component->mean) / component->sigma;
 
-    result += component->weight / (component->sigma * component->sigma) * (z * z - 1.) *
-              gaus(x, component->mean, component->sigma);
+    result += component->weight / (component->sigma * component->sigma) *
+              (z * z - 1.) * gaus(x, component->mean, component->sigma);
   }
 
   return result;
 }
 
 double
-Trk::MultiComponentStateModeCalculator::gaus(double x, double mean, double sigma)
+Trk::MultiComponentStateModeCalculator::gaus(double x,
+                                             double mean,
+                                             double sigma)
 {
 
   /*
    * gauss = 1/(sigma * sqrt(2*pi)) * exp  ( -0.5 * ((x-mean)/sigma)^2 )
-   * =(1/sqrt(2*pi))* (1/sigma)  * exp  (-0.5 * ((x-mean)*(1/sigma)) * ((x-mean)*(1/sigma)) )
-   * = invsqrt2PI * invertsigma * exp (-0.5 *z * z)
+   * =(1/sqrt(2*pi))* (1/sigma)  * exp  (-0.5 * ((x-mean)*(1/sigma)) *
+   * ((x-mean)*(1/sigma)) ) = invsqrt2PI * invertsigma * exp (-0.5 *z * z)
    */
   double invertsigma = 1. / sigma;
   double z = (x - mean) * invertsigma;
@@ -283,31 +308,35 @@ Trk::MultiComponentStateModeCalculator::gaus(double x, double mean, double sigma
 }
 
 double
-Trk::MultiComponentStateModeCalculator::width(int i, const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::width(
+  int i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
 
   double pdf(0.);
 
   auto component = mixture[i].begin();
 
-  for (; component != mixture[i].end(); ++component)
+  for (; component != mixture[i].end(); ++component) {
     pdf += component->weight * component->sigma;
+  }
 
   return pdf;
 }
 
 double
-Trk::MultiComponentStateModeCalculator::findRoot(double& result,
-                                                 double xlo,
-                                                 double xhi,
-                                                 double value,
-                                                 double i,
-                                                 const std::array<std::vector<Component>, 5>& mixture)
+Trk::MultiComponentStateModeCalculator::findRoot(
+  double& result,
+  double xlo,
+  double xhi,
+  double value,
+  double i,
+  const std::array<std::vector<Component>, 5>& mixture)
 {
-  // Do the root finding using the Brent-Decker method. Returns a boolean status and
-  // loads 'result' with our best guess at the root if true.
-  // Prints a warning if the initial interval does not bracket a single
-  // root or if the root is not found after a fixed number of iterations.
+  // Do the root finding using the Brent-Decker method. Returns a boolean status
+  // and loads 'result' with our best guess at the root if true. Prints a
+  // warning if the initial interval does not bracket a single root or if the
+  // root is not found after a fixed number of iterations.
 
   double a(xlo);
   double b(xhi);
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/PosteriorWeightsCalculator.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/PosteriorWeightsCalculator.cxx
index 24e2300ee099f42f25694013ccbb2c283936bd48..23fc5777c24b1a964ef07b8fa9fe60eba5737163 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/PosteriorWeightsCalculator.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/PosteriorWeightsCalculator.cxx
@@ -18,7 +18,9 @@ description          : Implementation code for PosteriorWeightsCalculator class
 #include "TrkParameters/TrackParameters.h"
 
 std::vector<Trk::ComponentParameters>
-Trk::PosteriorWeightsCalculator::weights(MultiComponentState&& predictedState, const MeasurementBase& measurement) const
+Trk::PosteriorWeightsCalculator::weights(
+  MultiComponentState&& predictedState,
+  const MeasurementBase& measurement) const
 {
 
   const size_t predictedStateSize = predictedState.size();
@@ -40,19 +42,22 @@ Trk::PosteriorWeightsCalculator::weights(MultiComponentState&& predictedState, c
 
   for (; component != predictedState.end(); ++component) {
 
-    const Trk::TrackParameters* componentTrackParameters = (*component).first.get();
+    const Trk::TrackParameters* componentTrackParameters =
+      (*component).first.get();
 
     if (!componentTrackParameters) {
       continue;
     }
 
-    const AmgSymMatrix(5)* predictedCov = componentTrackParameters->covariance();
+    const AmgSymMatrix(5)* predictedCov =
+      componentTrackParameters->covariance();
 
     if (!predictedCov) {
       continue;
     }
 
-    const Trk::LocalParameters& measurementLocalParameters = measurement.localParameters();
+    const Trk::LocalParameters& measurementLocalParameters =
+      measurement.localParameters();
     std::pair<double, double> result(0, 0);
     int nLocCoord = measurement.localParameters().dimension();
     if (nLocCoord == 1) {
@@ -63,35 +68,40 @@ Trk::PosteriorWeightsCalculator::weights(MultiComponentState&& predictedState, c
                                   measurementLocalParameters.parameterKey());
     } else if (nLocCoord == 2) {
       if (measurementLocalParameters.parameterKey() == 3) {
-        result = calculateWeight_2D_3(componentTrackParameters,
-                                      predictedCov,
-                                      measurementLocalParameters.block<2, 1>(0, 0),
-                                      measurement.localCovariance().block<2, 2>(0, 0));
+        result =
+          calculateWeight_2D_3(componentTrackParameters,
+                               predictedCov,
+                               measurementLocalParameters.block<2, 1>(0, 0),
+                               measurement.localCovariance().block<2, 2>(0, 0));
       } else {
-        result = calculateWeight_T<2>(componentTrackParameters,
-                                      predictedCov,
-                                      measurementLocalParameters.block<2, 1>(0, 0),
-                                      measurement.localCovariance().block<2, 2>(0, 0),
-                                      measurementLocalParameters.parameterKey());
+        result =
+          calculateWeight_T<2>(componentTrackParameters,
+                               predictedCov,
+                               measurementLocalParameters.block<2, 1>(0, 0),
+                               measurement.localCovariance().block<2, 2>(0, 0),
+                               measurementLocalParameters.parameterKey());
       }
     } else if (nLocCoord == 3) {
-      result = calculateWeight_T<3>(componentTrackParameters,
-                                    predictedCov,
-                                    measurementLocalParameters.block<3, 1>(0, 0),
-                                    measurement.localCovariance().block<3, 3>(0, 0),
-                                    measurementLocalParameters.parameterKey());
+      result =
+        calculateWeight_T<3>(componentTrackParameters,
+                             predictedCov,
+                             measurementLocalParameters.block<3, 1>(0, 0),
+                             measurement.localCovariance().block<3, 3>(0, 0),
+                             measurementLocalParameters.parameterKey());
     } else if (nLocCoord == 4) {
-      result = calculateWeight_T<4>(componentTrackParameters,
-                                    predictedCov,
-                                    measurementLocalParameters.block<4, 1>(0, 0),
-                                    measurement.localCovariance().block<4, 4>(0, 0),
-                                    measurementLocalParameters.parameterKey());
+      result =
+        calculateWeight_T<4>(componentTrackParameters,
+                             predictedCov,
+                             measurementLocalParameters.block<4, 1>(0, 0),
+                             measurement.localCovariance().block<4, 4>(0, 0),
+                             measurementLocalParameters.parameterKey());
     } else if (nLocCoord == 5) {
-      result = calculateWeight_T<5>(componentTrackParameters,
-                                    predictedCov,
-                                    measurementLocalParameters.block<5, 1>(0, 0),
-                                    measurement.localCovariance().block<5, 5>(0, 0),
-                                    measurementLocalParameters.parameterKey());
+      result =
+        calculateWeight_T<5>(componentTrackParameters,
+                             predictedCov,
+                             measurementLocalParameters.block<5, 1>(0, 0),
+                             measurement.localCovariance().block<5, 5>(0, 0),
+                             measurementLocalParameters.parameterKey());
     } else {
       break;
     }
@@ -103,12 +113,14 @@ Trk::PosteriorWeightsCalculator::weights(MultiComponentState&& predictedState, c
     componentDeterminantR.push_back(result.first);
     componentChi2.push_back(result.second);
 
-    if (result.second < minimumChi2)
+    if (result.second < minimumChi2) {
       minimumChi2 = result.second;
+    }
 
   } // end loop over components
 
-  if (componentDeterminantR.size() != predictedState.size() || componentChi2.size() != predictedState.size()) {
+  if (componentDeterminantR.size() != predictedState.size() ||
+      componentChi2.size() != predictedState.size()) {
     returnMultiComponentState.clear();
     return {};
   }
@@ -128,26 +140,31 @@ Trk::PosteriorWeightsCalculator::weights(MultiComponentState&& predictedState, c
     double chi2 = componentChi2[index] - minimumChi2;
 
     double updatedWeight(0.);
-    // Determinant can not be belowe 1e-19 in CLHEP .... rather ugly but protect against 0
-    // determinants Normally occur when the component is a poor fit
+    // Determinant can not be belowe 1e-19 in CLHEP .... rather ugly but protect
+    // against 0 determinants Normally occur when the component is a poor fit
     if (componentDeterminantR[index] > 1e-20) {
-      updatedWeight = priorWeight * sqrt(1. / componentDeterminantR[index]) * exp(-0.5 * chi2);
+      updatedWeight = priorWeight * sqrt(1. / componentDeterminantR[index]) *
+                      exp(-0.5 * chi2);
     } else {
       updatedWeight = 1e-10;
     }
-    returnMultiComponentState.emplace_back(component->first.release(), updatedWeight);
+    returnMultiComponentState.emplace_back(component->first.release(),
+                                           updatedWeight);
     sumWeights += updatedWeight;
   }
 
   // Renormalise the state to total weight = 1
-  Trk::MultiComponentState::iterator returnComponent = returnMultiComponentState.begin();
+  Trk::MultiComponentState::iterator returnComponent =
+    returnMultiComponentState.begin();
   component = predictedState.begin();
   if (sumWeights > 0.) {
-    for (; returnComponent != returnMultiComponentState.end(); ++returnComponent, ++component) {
+    for (; returnComponent != returnMultiComponentState.end();
+         ++returnComponent, ++component) {
       (*returnComponent).second /= sumWeights;
     }
   } else {
-    for (; returnComponent != returnMultiComponentState.end(); ++returnComponent, ++component) {
+    for (; returnComponent != returnMultiComponentState.end();
+         ++returnComponent, ++component) {
       (*returnComponent).second = component->second;
     }
   }
@@ -156,26 +173,29 @@ Trk::PosteriorWeightsCalculator::weights(MultiComponentState&& predictedState, c
 }
 
 std::pair<double, double>
-Trk::PosteriorWeightsCalculator::calculateWeight_1D(const TrackParameters* componentTrackParameters,
-                                                    const AmgSymMatrix(5) * predictedCov,
-                                                    const double measPar,
-                                                    const double measCov,
-                                                    int paramKey) const
+Trk::PosteriorWeightsCalculator::calculateWeight_1D(
+  const TrackParameters* componentTrackParameters,
+  const AmgSymMatrix(5) * predictedCov,
+  const double measPar,
+  const double measCov,
+  int paramKey) const
 {
   // use measuring coordinate (variable "mk") instead of reduction matrix
   int mk = 0;
-  if (paramKey != 1)
-    for (int i = 0; i < 5; ++i)
+  if (paramKey != 1) {
+    for (int i = 0; i < 5; ++i) {
       if (paramKey & (1 << i)) {
         mk = i;
         break;
       }
+    }
+  }
 
   // Calculate the residual
   const double r = measPar - (componentTrackParameters->parameters())(mk);
 
-  // Residual covariance. Posterior weights is calculated used predicted state and measurement.
-  // Therefore add covariances
+  // Residual covariance. Posterior weights is calculated used predicted state
+  // and measurement. Therefore add covariances
   const double R = measCov + (*predictedCov)(mk, mk);
 
   if (R == 0) {
@@ -186,22 +206,26 @@ Trk::PosteriorWeightsCalculator::calculateWeight_1D(const TrackParameters* compo
 }
 
 std::pair<double, double>
-Trk::PosteriorWeightsCalculator::calculateWeight_2D_3(const TrackParameters* componentTrackParameters,
-                                                      const AmgSymMatrix(5) * predictedCov,
-                                                      const AmgVector(2) & measPar,
-                                                      const AmgSymMatrix(2) & measCov) const
+Trk::PosteriorWeightsCalculator::calculateWeight_2D_3(
+  const TrackParameters* componentTrackParameters,
+  const AmgSymMatrix(5) * predictedCov,
+  const AmgVector(2) & measPar,
+  const AmgSymMatrix(2) & measCov) const
 {
   // Calculate the residual
-  AmgVector(2) r = measPar - componentTrackParameters->parameters().block<2, 1>(0, 0);
-  // Residual covariance. Posterior weights is calculated used predicted state and measurement.
-  // Therefore add covariances
+  AmgVector(2) r =
+    measPar - componentTrackParameters->parameters().block<2, 1>(0, 0);
+  // Residual covariance. Posterior weights is calculated used predicted state
+  // and measurement. Therefore add covariances
   AmgSymMatrix(2) R(measCov + predictedCov->block<2, 2>(0, 0));
   // compute determinant of residual
   const double det = R.determinant();
   if (det == 0) {
-    // ATH_MSG_WARNING( "Determinant is 0, cannot invert matrix... Ignoring component" );
+    // ATH_MSG_WARNING( "Determinant is 0, cannot invert matrix... Ignoring
+    // component" );
     return std::pair<double, double>(0, 0);
   }
   // Compute Chi2
-  return std::pair<double, double>(det, 0.5 * ((r.transpose() * R.inverse() * r)(0, 0)));
+  return std::pair<double, double>(
+    det, 0.5 * ((r.transpose() * R.inverse() * r)(0, 0)));
 }
diff --git a/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx b/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx
index ee5ace1928cb9eb7b0ddca1ddb4b2a14035925a2..5f91cc28d8746dfabf34ffb6eff4b58c9d7a88f2 100644
--- a/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx
+++ b/Tracking/TrkFitter/TrkGaussianSumFilter/src/QuickCloseComponentsMultiStateMerger.cxx
@@ -8,8 +8,8 @@
 begin                : Wednesday 3rd September 2008
 author               : amorley
 email                : Anthony.Morley@cern.ch
-decription           : Implementation code for QuickCloseComponentsMultiStateMerger
-                       class
+decription           : Implementation code for
+QuickCloseComponentsMultiStateMerger class
 *********************************************************************************/
 
 #include "TrkGaussianSumFilter/QuickCloseComponentsMultiStateMerger.h"
@@ -23,13 +23,15 @@ decription           : Implementation code for QuickCloseComponentsMultiStateMer
 using namespace GSFUtils;
 
 Trk::MultiComponentState
-Trk::QuickCloseComponentsMultiStateMerger::merge(Trk::MultiComponentState&& statesToMerge,
-                                                 const unsigned int maximumNumberOfComponents)
+Trk::QuickCloseComponentsMultiStateMerger::merge(
+  Trk::MultiComponentState&& statesToMerge,
+  const unsigned int maximumNumberOfComponents)
 {
   // Assembler Cache
   MultiComponentStateAssembler::Cache cache;
   if (statesToMerge.size() <= maximumNumberOfComponents) {
-    MultiComponentStateAssembler::addMultiState(cache, std::move(statesToMerge));
+    MultiComponentStateAssembler::addMultiState(cache,
+                                                std::move(statesToMerge));
     return MultiComponentStateAssembler::assembledState(cache);
   }
 
@@ -52,13 +54,14 @@ Trk::QuickCloseComponentsMultiStateMerger::merge(Trk::MultiComponentState&& stat
                 return x.second > y.second;
               });
 
-    Trk::ComponentParameters dummyCompParams(statesToMerge.begin()->first->clone(), 1.);
+    Trk::ComponentParameters dummyCompParams(
+      statesToMerge.begin()->first->clone(), 1.);
     Trk::MultiComponentState returnMultiState;
     returnMultiState.push_back(std::move(dummyCompParams));
     return returnMultiState;
   }
 
-  return mergeFullDistArray(cache, statesToMerge,maximumNumberOfComponents);
+  return mergeFullDistArray(cache, statesToMerge, maximumNumberOfComponents);
 }
 
 Trk::MultiComponentState
@@ -73,7 +76,8 @@ Trk::QuickCloseComponentsMultiStateMerger::mergeFullDistArray(
     const AmgSymMatrix(5)* measuredCov = statesToMerge[i].first->covariance();
     const AmgVector(5)& parameters = statesToMerge[i].first->parameters();
     // Fill in infomation
-    const double cov = measuredCov ? (*measuredCov)(Trk::qOverP, Trk::qOverP) : -1.;
+    const double cov =
+      measuredCov ? (*measuredCov)(Trk::qOverP, Trk::qOverP) : -1.;
     components[i].mean = parameters[Trk::qOverP];
     components[i].cov = cov;
     components[i].invCov = cov > 0 ? 1. / cov : 1e10;
@@ -88,7 +92,8 @@ Trk::QuickCloseComponentsMultiStateMerger::mergeFullDistArray(
   for (const auto& mergePair : merges) {
     const int32_t mini = mergePair.first;
     const int32_t minj = mergePair.second;
-    MultiComponentStateCombiner::combineWithWeight(statesToMerge[mini], statesToMerge[minj]);
+    MultiComponentStateCombiner::combineWithWeight(statesToMerge[mini],
+                                                   statesToMerge[minj]);
     statesToMerge[minj].first.reset();
     statesToMerge[minj].second = 0.;
   }
@@ -98,10 +103,12 @@ Trk::QuickCloseComponentsMultiStateMerger::mergeFullDistArray(
     if (!state.first) {
       continue;
     }
-    cache.multiComponentState.push_back(ComponentParameters(state.first.release(), state.second));
+    cache.multiComponentState.push_back(
+      ComponentParameters(state.first.release(), state.second));
     cache.validWeightSum += state.second;
   }
-  Trk::MultiComponentState mergedState = MultiComponentStateAssembler::assembledState(cache);
+  Trk::MultiComponentState mergedState =
+    MultiComponentStateAssembler::assembledState(cache);
   // Clear the state vector
   statesToMerge.clear();
   return mergedState;
diff --git a/Tracking/TrkVertexFitter/TrkJetVxFitter/CMakeLists.txt b/Tracking/TrkVertexFitter/TrkJetVxFitter/CMakeLists.txt
index d10f3b430fdce3fe506e2a6418af877f53d87161..e229f0f2fa5460abe0dd01b3445ceba663d22aad 100644
--- a/Tracking/TrkVertexFitter/TrkJetVxFitter/CMakeLists.txt
+++ b/Tracking/TrkVertexFitter/TrkJetVxFitter/CMakeLists.txt
@@ -11,7 +11,8 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/GeoPrimitives
                           Event/EventPrimitives
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagneticField/MagFieldConditions
+                          MagneticField/MagFieldElements
                           Tracking/TrkEvent/TrkParameters
                           Tracking/TrkEvent/TrkTrackLink
                           PRIVATE
@@ -31,11 +32,11 @@ atlas_add_library( TrkJetVxFitterLib
                    PUBLIC_HEADERS TrkJetVxFitter
                    INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives EventPrimitives GaudiKernel MagFieldInterfaces TrkParameters
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives EventPrimitives GaudiKernel MagFieldConditions MagFieldElements TrkParameters
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrkNeutralParameters TrkTrack VxJetVertex VxVertex TrkVertexFitterInterfaces )
 
 atlas_add_component( TrkJetVxFitter
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives EventPrimitives GaudiKernel MagFieldInterfaces TrkParameters TrkNeutralParameters TrkTrack VxJetVertex VxVertex TrkVertexFitterInterfaces TrkJetVxFitterLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives EventPrimitives GaudiKernel MagFieldConditions MagFieldElements TrkParameters TrkNeutralParameters TrkTrack VxJetVertex VxVertex TrkVertexFitterInterfaces TrkJetVxFitterLib )
 
diff --git a/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/JetFitterRoutines.h b/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/JetFitterRoutines.h
index 62559a1955ba8fa4cda647ea6fb649074f72dae9..e960a452f07b3b14a8ac232d6582d71bc9b150a9 100755
--- a/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/JetFitterRoutines.h
+++ b/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/JetFitterRoutines.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
 */
 
 /**
@@ -36,6 +36,9 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
 
 namespace Trk {
 
@@ -263,6 +266,9 @@ namespace Trk {
      * after checking new positions are inside the ID
      */
     void copyRecoPositionsToLinearizationPositions(VxJetCandidate & myJetCandidate) const;
+
+    SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey
+       {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
  
     ToolHandle<JetFitterInitializationHelper> m_initializationHelper;
     ToolHandle<JetFitterHelper> m_helper;
diff --git a/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/TrkDistanceFinderNeutralCharged.h b/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/TrkDistanceFinderNeutralCharged.h
index 3573b5362c012c1228c269f0a6786647f9bd60c0..0e6f7a8c7b4e01d1f2e130e3373c9086651b50c0 100644
--- a/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/TrkDistanceFinderNeutralCharged.h
+++ b/Tracking/TrkVertexFitter/TrkJetVxFitter/TrkJetVxFitter/TrkDistanceFinderNeutralCharged.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 DISTNEUCHARGED_H
@@ -7,13 +7,16 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include <vector>
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "TrkParameters/TrackParameters.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "TrkJetVxFitter/NeutralTrack.h"
 
 static const InterfaceID IID_TrkDistanceFinderNeutralCharged("TrkDistanceFinderNeutralCharged", 1,0);
 
+namespace MagField {
+   class AtlasFieldCache;
+}
+
 namespace Trk {
 
 class TrkDistanceFinderNeutralCharged : public AthAlgTool
@@ -23,10 +26,11 @@ class TrkDistanceFinderNeutralCharged : public AthAlgTool
  public:
   TrkDistanceFinderNeutralCharged(const std::string& t, const std::string& n, const IInterface*  p);
   ~TrkDistanceFinderNeutralCharged();
-  
+
   std::pair<Amg::Vector3D,double> getPointAndDistance(const Trk::NeutralTrack&,const Trk::Perigee&,
-						      double &) const;
-  
+                                                      double &,
+                                                      MagField::AtlasFieldCache &fieldCache) const;
+
   static const InterfaceID& interfaceID()
     {
       return IID_TrkDistanceFinderNeutralCharged;
@@ -40,11 +44,6 @@ class TrkDistanceFinderNeutralCharged : public AthAlgTool
   //parameters for precision
   double m_precision;//as job option
   double m_maxloopnumber;//as job option
-
-  //variables for magnetic field tool needed to retrieve the correct Bz
-  ServiceHandle<MagField::IMagFieldSvc> m_magFieldSvc;
-
-
 };
 
 namespace Error {
diff --git a/Tracking/TrkVertexFitter/TrkJetVxFitter/src/JetFitterRoutines.cxx b/Tracking/TrkVertexFitter/TrkJetVxFitter/src/JetFitterRoutines.cxx
index 62593678962021e7a4ec259c687bede7ab6346c4..389ea40048aa55b4726014fbcd7ecce3140ffe90 100755
--- a/Tracking/TrkVertexFitter/TrkJetVxFitter/src/JetFitterRoutines.cxx
+++ b/Tracking/TrkVertexFitter/TrkJetVxFitter/src/JetFitterRoutines.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
 */
 
 /***************************************************************************
@@ -21,6 +21,9 @@
 
 #include <iostream>
 
+// to get AmgMatrix plugin:
+#include "GeoPrimitives/GeoPrimitives.h"
+
 #include "TrkJetVxFitter/JetFitterRoutines.h"
 #include "VxVertex/RecVertex.h"
 #include "VxJetVertex/VxJetCandidate.h"
@@ -41,6 +44,7 @@
 
 #include <TMath.h>
 #include <cmath>
+#include <sstream>
 
 #include "TrkJetVxFitter/TrkDistanceFinderNeutralCharged.h"
 #include "TrkJetVxFitter/TrkDistanceFinderNeutralNeutral.h"
@@ -89,7 +93,8 @@ namespace Trk
   StatusCode JetFitterRoutines::initialize() {
     
     AthAlgTool::initialize().ignore();
-    
+    ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
+
     //retrieving the udator itself 	 
     ATH_CHECK( m_helper.retrieve()  );    
 
@@ -151,6 +156,15 @@ namespace Trk
     const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
     
     if (associatedVertices.empty()) {//Was that your intention? to be checked... 15.03.2007
+      SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey};
+      const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
+      if (!readHandle.isValid()) {
+         std::stringstream msg;
+         msg << "Failed to retrieve magmnetic field conditions data " << m_fieldCacheCondObjInputKey.key() << ".";
+         throw std::runtime_error(msg.str());
+      }
+      MagField::AtlasFieldCache fieldCache;
+      fieldCondObj->getInitializedCache (fieldCache);
       for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
         VxVertexOnJetAxis* myVertex=(*VtxIter);
         if (myVertex!=0) {
@@ -178,7 +192,7 @@ namespace Trk
               double distOnAxis=-999.;
               std::pair<Amg::Vector3D,double> result;
               try {
-                result=m_minDistanceFinder->getPointAndDistance(myJetAxis,*ptr,distOnAxis);
+                result=m_minDistanceFinder->getPointAndDistance(myJetAxis,*ptr,distOnAxis, fieldCache);
 
                 double R=distOnAxis*sinRecJetTheta;
                 double Z=distOnAxis*cosRecJetTheta;
diff --git a/Tracking/TrkVertexFitter/TrkJetVxFitter/src/TrkDistanceFinderNeutralCharged.cxx b/Tracking/TrkVertexFitter/TrkJetVxFitter/src/TrkDistanceFinderNeutralCharged.cxx
index d7de074085b9c03719785ba3c08c3085cac97b2c..6cd9ea28e82314a39cc5c863bce9c9a6d5d4cee9 100644
--- a/Tracking/TrkVertexFitter/TrkJetVxFitter/src/TrkDistanceFinderNeutralCharged.cxx
+++ b/Tracking/TrkVertexFitter/TrkJetVxFitter/src/TrkDistanceFinderNeutralCharged.cxx
@@ -1,7 +1,11 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
+// to get AmgMatrix plugin:
+#include "GeoPrimitives/GeoPrimitives.h"
+
+#include "MagFieldElements/AtlasFieldCache.h"
 #include "TrkJetVxFitter/TrkDistanceFinderNeutralCharged.h"
 #include "TrkParameters/TrackParameters.h"
 #include <TMath.h>
@@ -18,8 +22,7 @@ namespace Trk {
 TrkDistanceFinderNeutralCharged::TrkDistanceFinderNeutralCharged(const std::string& t, const std::string& n, const IInterface*  p) : 
   AthAlgTool(t,n,p),
   m_precision(1e-8),
-  m_maxloopnumber(20),
-  m_magFieldSvc("AtlasFieldSvc", n)
+  m_maxloopnumber(20)
 {
   declareProperty("Precision",m_precision);
   declareProperty("MaxLoops",m_maxloopnumber);
@@ -31,12 +34,6 @@ TrkDistanceFinderNeutralCharged::TrkDistanceFinderNeutralCharged(const std::stri
 StatusCode TrkDistanceFinderNeutralCharged::initialize() 
   { 
     StatusCode s = AthAlgTool::initialize();
-    s = m_magFieldSvc.retrieve();
-    if (s.isFailure())
-    {
-      ATH_MSG_FATAL("Could not find magnetic field service.");
-      return StatusCode::FAILURE;
-    }
     ATH_MSG_INFO("Initialize successful");
     return StatusCode::SUCCESS;
   }
@@ -53,7 +50,8 @@ TrkDistanceFinderNeutralCharged::~TrkDistanceFinderNeutralCharged() { }
 std::pair<Amg::Vector3D,double>  
 TrkDistanceFinderNeutralCharged::getPointAndDistance(const Trk::NeutralTrack& neutraltrk,
                                                      const Trk::Perigee& chargedtrk,
-						     double & distanceOnAxis) const {
+                                                     double & distanceOnAxis,
+                                                     MagField::AtlasFieldCache &fieldCache) const {
 
   double b_phi0=chargedtrk.parameters()[Trk::phi0];
   double b_cosphi0=cos(b_phi0);
@@ -66,7 +64,7 @@ TrkDistanceFinderNeutralCharged::getPointAndDistance(const Trk::NeutralTrack& ne
     chargedtrk.parameters()[Trk::z0];
 
   Amg::Vector3D magnFieldVect;
-  m_magFieldSvc->getField(&chargedtrk.associatedSurface().center(),&magnFieldVect);
+  fieldCache.getField(chargedtrk.associatedSurface().center().data(),magnFieldVect.data());
 
   //Magnetic field at (x0,y0,z0)
   double Bz=magnFieldVect.z()*299.792;//B field in Gev/mm
diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt b/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt
index fa3f27771d68deec1f204bef3368c1742e27095a..5e942ab46866702b571e972a41a8706d08f6dd8c 100644
--- a/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt
+++ b/Tracking/TrkVertexFitter/TrkV0Fitter/CMakeLists.txt
@@ -10,7 +10,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           Event/xAOD/xAODTracking
                           GaudiKernel
-                          MagneticField/MagFieldInterfaces
+                          MagneticField/MagFieldConditions
+                          MagneticField/MagFieldElements
                           Tracking/TrkEvent/TrkParameters
                           Tracking/TrkVertexFitter/TrkVertexFitterInterfaces
                           PRIVATE
@@ -26,10 +27,10 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( TrkV0FitterLib
                    src/*.cxx
                    PUBLIC_HEADERS TrkV0Fitter
-                   LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel MagFieldInterfaces TrkParameters TrkVertexFitterInterfaces
+                   LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel MagFieldElements MagFieldConditions TrkParameters TrkVertexFitterInterfaces
                    PRIVATE_LINK_LIBRARIES TrkDetDescrUtils TrkSurfaces TrkLinks TrkParticleBase TrkTrack VxVertex TrkExInterfaces )
 
 atlas_add_component( TrkV0Fitter
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel MagFieldInterfaces TrkParameters TrkVertexFitterInterfaces TrkDetDescrUtils TrkSurfaces TrkLinks TrkParticleBase TrkTrack VxVertex TrkExInterfaces TrkV0FitterLib )
+                     LINK_LIBRARIES AthenaBaseComps xAODTracking GaudiKernel TrkParameters TrkVertexFitterInterfaces TrkDetDescrUtils TrkSurfaces TrkLinks TrkParticleBase TrkTrack VxVertex TrkExInterfaces TrkV0FitterLib )
 
diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h b/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h
index 0c015425173ee14f0a280ae8e8d430065a608131..1cfbea79bbd138833ad1da97a9315a779c151043 100755
--- a/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.h
+++ b/Tracking/TrkVertexFitter/TrkV0Fitter/TrkV0Fitter/TrkV0VertexFitter.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
 */
 
 //////////////////////////////////////////////////////////////////
@@ -19,12 +19,14 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadCondHandleKey.h"
 #include "TrkVertexFitterInterfaces/IVertexFitter.h"
 #include "TrkParameters/TrackParameters.h"
-#include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "xAODTracking/VertexFwd.h"
 #include "xAODTracking/TrackParticleFwd.h"
 
+#include "MagFieldConditions/AtlasFieldCacheCondObj.h"
+
 namespace Trk
 {
   class Track;
@@ -172,8 +174,8 @@ namespace Trk
     /** Data members to store the results */
 
     ToolHandle< Trk::IExtrapolator > m_extrapolator;
-    ServiceHandle < MagField::IMagFieldSvc > m_magFieldSvc;
-
+    SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey
+       {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
   };
 }
 #endif
diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx b/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx
index b4b5e7a3071164c2542273222855745ebf8bbc9d..ebd594bdc73ada36743ae2d05975f5498b4bdd04 100755
--- a/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.cxx
+++ b/Tracking/TrkVertexFitter/TrkV0Fitter/src/TrkV0VertexFitter.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
 */
 
 /***************************************************************************
@@ -22,6 +22,9 @@
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/TrackParticle.h" 
 
+#include "StoreGate/ReadCondHandle.h"
+#include <sstream>
+
 /* These are some local helper classes only needed for convenience, therefore
 within anonymous namespace. They contain temporary calculations of matrices
 and vectors resulting from the vertex calculation. */
@@ -47,8 +50,7 @@ namespace Trk
       m_maxZ(5000.),
       m_firstMeas(true),
       m_deltaR(false),
-      m_extrapolator("Trk::Extrapolator/InDetExtrapolator"),
-      m_magFieldSvc("AtlasFieldSvc",n)
+      m_extrapolator("Trk::Extrapolator/InDetExtrapolator")
   {
     declareProperty("MaxIterations",             m_maxIterations);
     declareProperty("MaxChi2PerNdf",             m_maxDchi2PerNdf);
@@ -57,7 +59,6 @@ namespace Trk
     declareProperty("FirstMeasuredPoint",        m_firstMeas);
     declareProperty("Use_deltaR",                m_deltaR);
     declareProperty("Extrapolator",              m_extrapolator);
-    declareProperty("MagFieldSvc",               m_magFieldSvc);
     declareInterface<IVertexFitter>(this);
   }
 
@@ -66,27 +67,21 @@ namespace Trk
   StatusCode TrkV0VertexFitter::initialize()
   {
     if ( m_extrapolator.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_extrapolator << endmsg;
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_extrapolator);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg;
+      ATH_MSG_INFO( "Retrieved tool " << m_extrapolator );
     }
 
-  /* Get the magnetic field tool from ToolSvc */
-    if ( m_magFieldSvc.retrieve().isFailure() ) {
-      msg(MSG::FATAL) << "Failed to retrieve service " << m_magFieldSvc << endmsg;
-      return StatusCode::FAILURE;
-    } else {
-      msg(MSG::INFO) << "Retrieved service " << m_magFieldSvc << endmsg;
-    }
+    ATH_CHECK( m_fieldCacheCondObjInputKey.initialize() );
 
-    msg(MSG::INFO) << "Initialize successful" << endmsg;
+    ATH_MSG_DEBUG( "Initialize successful");
     return StatusCode::SUCCESS;
   }
 
   StatusCode TrkV0VertexFitter::finalize()
   {
-    msg(MSG::INFO) << "Finalize successful" << endmsg;
+    ATH_MSG_DEBUG( "Finalize successful" );
     return StatusCode::SUCCESS;
   }
 
@@ -462,12 +457,20 @@ namespace Trk
     ATH_MSG_DEBUG("globalPosition of starting point: " << (*globalPosition)[0] << ", " << (*globalPosition)[1] << ", " << (*globalPosition)[2]);
     if (globalPosition->perp() > m_maxR && globalPosition->z() > m_maxZ) return 0;
 
-// magnetic field  
-    double fieldXYZ[3];  double BField[3];
-    fieldXYZ[0] = globalPosition->x();
-    fieldXYZ[1] = globalPosition->y();
-    fieldXYZ[2] = globalPosition->z();
-    m_magFieldSvc->getField(fieldXYZ,BField);
+    SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, Gaudi::Hive::currentContext()};
+    if (!readHandle.isValid()) {
+       std::stringstream msg;
+       msg << "Failed to retrieve magmnetic field conditions data " << m_fieldCacheCondObjInputKey.key() << ".";
+       throw std::runtime_error(msg.str());
+    }
+    const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
+
+    MagField::AtlasFieldCache fieldCache;
+    fieldCondObj->getInitializedCache (fieldCache);
+
+    // magnetic field
+    double BField[3];
+    fieldCache.getField(globalPosition->data(),BField);
     double B_z = BField[2]*299.792;            // should be in GeV/mm
     if (B_z == 0. || std::isnan(B_z)) {
       ATH_MSG_DEBUG("Could not find a magnetic field different from zero: very very strange");
@@ -891,11 +894,8 @@ namespace Trk
 
       if (onConstr && fabs(chi2Old-chi2New) < 0.1) { break; }
 
-      double fieldXYZItr[3];  double BFieldItr[3];
-      fieldXYZItr[0] = globalPositionItr->x();
-      fieldXYZItr[1] = globalPositionItr->y();
-      fieldXYZItr[2] = globalPositionItr->z();
-      m_magFieldSvc->getField(fieldXYZItr,BFieldItr);
+      double BFieldItr[3];
+      fieldCache.getField(globalPositionItr->data(),BFieldItr);
       double B_z_new = BFieldItr[2]*299.792;            // should be in GeV/mm
       if (B_z_new == 0. || std::isnan(B_z)) {
         ATH_MSG_DEBUG("Using old B_z");
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/python/TrigDetCalibConfig.py b/Trigger/TrigAlgorithms/TrigDetCalib/python/TrigDetCalibConfig.py
index e37486a718c3868ecc36bf7b733242e4b244fa04..d102358dba3715415b841380a0552dbd979546b8 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/python/TrigDetCalibConfig.py
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/python/TrigDetCalibConfig.py
@@ -152,7 +152,7 @@ class TileSubDetListWriter(TrigSubDetListWriter):
     time = TrigTimeHistToolConfig('TileSubDetListWriter_Time')
     self.SubdetId= ['Tile','TDAQ_CTP']
     self.MaxRoIsPerEvent = 1
-    self.extraROBs = [ 5373968 ]
+    self.extraROBs = [ 5373984 ] # 0x520020
     self.AthenaMonTools = [ time ]
 
     #self.MonitoringHistoPath = '/EXPERT/TileSubDetListWriter/'
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.cxx b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.cxx
index baba42d1a0eb51fd93b59e0454646ac41a935e6b..2fb7df717be99dda035599ef3e61e33ffdbc59c7 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.cxx
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.cxx
@@ -562,7 +562,7 @@ HLT::ErrorCode TrigSubDetListWriter::fillPEBInfo(PartialEventBuildingInfo& pebIn
 
   // reserve space of ROB vector, limits to be determined
   //allROBs.reserve(120);
-  // ROB ID 0x520010, need special ROB for tile calibration
+  // ROB ID 0x520020, need special ROB for tile calibration
   //allROBs.insert(allROBs.end(),m_extrarobs.begin(),m_extrarobs.end());
 
   // including L1 Calo ROBs
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
index aabe79b81d738e99fd6c59a15b819f905f4e0a31..cef1183ac6dec22711b96dda8db19f75eb734e27 100755
--- a/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/python/TrigMuonEFConfig.py
@@ -145,6 +145,8 @@ def TMEF_iPatFitter(name='TMEF_iPatFitter',**kwargs):
     if not TriggerFlags.run2Config == '2016':
         kwargs.setdefault("MaxIterations", 15)
     kwargs.setdefault("MaterialAllocator", "TMEF_MaterialAllocator")
+    from InDetRecExample import TrackingCommon
+    kwargs.setdefault("SolenoidalIntersector",TrackingCommon.getSolenoidalIntersector())
     return CfgMgr.Trk__iPatFitter(name,**kwargs)
 
 
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
index 4b92d6098dc4302dd27348422221d003af9c4947..5a5fc342e5b8850caaaf8c5ba2af38ab01f206f5 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/CaloDef.py
@@ -68,7 +68,19 @@ def _algoL2Egamma(inputEDM="",OutputLevel=ERROR,doRinger=False, ClustersName="HL
 
 def fastCaloRecoSequence(InViewRoIs, doRinger=False, ClustersName="HLT_L2CaloEMClusters", RingerKey="HLT_FastCaloRinger"):
     fastCaloAlg = _algoL2Egamma(inputEDM=InViewRoIs, doRinger=doRinger, ClustersName=ClustersName, RingerKey=RingerKey)
-    fastCaloInViewSequence = seqAND( 'fastCaloInViewSequence', [fastCaloAlg] )
+
+    import AthenaCommon.CfgMgr as CfgMgr
+    fastCaloVDV = CfgMgr.AthViews__ViewDataVerifier("fastCaloVDV")
+    fastCaloVDV.DataObjects = [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
+                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+EMCaloRoIs' )]
+
+    # Make sure BCID average still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
+      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
+
+    fastCaloInViewSequence = seqAND( 'fastCaloInViewSequence', [fastCaloVDV, fastCaloAlg] )
     sequenceOut = fastCaloAlg.ClustersName
     return (fastCaloInViewSequence, sequenceOut)
 
@@ -128,9 +140,20 @@ def HLTFSTopoRecoSequence(RoIs):
     return (RecoSequence, topoClusterMaker.CaloClusters)
 
 def HLTRoITopoRecoSequence(RoIs):
+    import AthenaCommon.CfgMgr as CfgMgr
+    HLTRoITopoRecoSequenceVDV = CfgMgr.AthViews__ViewDataVerifier("HLTRoITopoRecoSequenceVDV")
+    HLTRoITopoRecoSequenceVDV.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+PrecisionCaloRoIs' ),
+                                             ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
+
+    # Make sure BCID average still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
+      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
+
     cellMaker = HLTCellMaker(RoIs, algSuffix="RoI")
     topoClusterMaker = _algoHLTTopoCluster(inputEDM = cellMaker.CellsName, algSuffix="RoI")
-    RecoSequence = parOR("RoITopoClusterRecoSequence", [cellMaker, topoClusterMaker])
+    RecoSequence = parOR("RoITopoClusterRecoSequence", [HLTRoITopoRecoSequenceVDV, cellMaker, topoClusterMaker])
     return (RecoSequence, topoClusterMaker.CaloClusters)
 
 
diff --git a/Trigger/TrigConfiguration/TrigConfIO/python/TriggerConfigAccessBase.py b/Trigger/TrigConfiguration/TrigConfIO/python/TriggerConfigAccessBase.py
index fe2d928b66c755fdc0382e9ded9821089179b4e9..7b05ebb6c4ac6eecdf52de3d690d895c75416cdd 100644
--- a/Trigger/TrigConfiguration/TrigConfIO/python/TriggerConfigAccessBase.py
+++ b/Trigger/TrigConfiguration/TrigConfIO/python/TriggerConfigAccessBase.py
@@ -139,7 +139,6 @@ class ConfigDBLoader(ConfigLoader):
         failures = []
         config = None
         for q in self.query:
-            print q.format(**qdict)
             try:
                 cursor.execute( q.format(**qdict) )
             except DatabaseError as e:
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py
index 21663af19045b0f853837ad69ca2fe5221a64663..e77591e155cf3ccd4468ae0f741d974a9a823115 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPrecisionElectronHypoTool.py
@@ -24,7 +24,9 @@ def _IncTool(name, threshold, sel):
                            defineHistogram('Et_em', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo cluster E_{T}^{EM};E_{T}^{EM} [MeV]", xbins=50, xmin=-2000, xmax=100000),
                            defineHistogram('Eta', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5),
                            defineHistogram('Phi', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2),
-                           defineHistogram('EtaBin', type='TH1I', path='EXPERT', title="PrecisionElectron Hypo entries per Eta bin;Eta bin no.", xbins=11, xmin=-0.5, xmax=10.5)]
+                           defineHistogram('EtaBin', type='TH1I', path='EXPERT', title="PrecisionElectron Hypo entries per Eta bin;Eta bin no.", xbins=11, xmin=-0.5, xmax=10.5),
+                           defineHistogram('LikelihoodRatio', type='TH1F', path='EXPERT', title="PrecisionElectron Hypo LH", xbins=100, xmin=-5, xmax=5),
+                           defineHistogram('mu', type='TH1F', path='EXPERT', title="Average interaction per crossing", xbins=100, xmin=0, xmax=100)]
 
     cuts=['Input','#Delta #eta EF-L1', '#Delta #phi EF-L1','eta','E_{T}^{EM}']
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx
index 783d566736e36a6e3a139498a4820532f09c1178..57e1c3d61e09e3086c4673ab89a525fcb7da30c2 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.cxx
@@ -37,6 +37,10 @@ StatusCode TrigEgammaPrecisionElectronHypoToolInc::initialize()  {
   ATH_MSG_DEBUG( "Retrieving egammaElectronLHTool..."  );
   CHECK( m_egammaElectronLHTool.retrieve() );
 
+  // Retrieving Luminosity info
+  ATH_MSG_DEBUG( "Retrieving luminosityCondData..."  );
+  ATH_CHECK( m_avgMuKey.initialize() );
+
   unsigned int nEtaBin = m_etabin.size();
   ATH_CHECK( m_eTthr.size() == nEtaBin-1 );
 
@@ -53,21 +57,28 @@ StatusCode TrigEgammaPrecisionElectronHypoToolInc::initialize()  {
 TrigEgammaPrecisionElectronHypoToolInc::~TrigEgammaPrecisionElectronHypoToolInc(){}
 
 
-bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionElectronHypoTool::ElectronInfo& input,const EventContext& ) const {
+bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionElectronHypoTool::ElectronInfo& input,const EventContext& ctx) const {
 
   bool pass = false;
 
+  // Likelihood output
+   std::vector<float> lhval_monitored;
+  // Lumi monitoring
+   std::vector<double> avgmu_monitored;
+
   auto ET           = Monitored::Scalar( "Et_em"   , -1.0 );
   auto dEta         = Monitored::Scalar( "dEta", -1. ); 
   auto dPhi         = Monitored::Scalar( "dPhi", -1. );
   auto etaBin       = Monitored::Scalar( "EtaBin", -1. );
   auto monEta       = Monitored::Scalar( "Eta", -99. ); 
   auto monPhi       = Monitored::Scalar( "Phi", -99. );
-  auto PassedCuts   = Monitored::Scalar<int>( "CutCounter", -1 );  
+  auto PassedCuts   = Monitored::Scalar<int>( "CutCounter", -1 );
+  auto mon_lhval    = Monitored::Collection("LikelihoodRatio",   lhval_monitored);
+  auto mon_mu       = Monitored::Collection("mu",   avgmu_monitored);  
   auto monitorIt    = Monitored::Group( m_monTool, 
 					       dEta, dPhi, 
                                                etaBin, monEta,
-					       monPhi,PassedCuts);
+					       monPhi,PassedCuts,mon_lhval,mon_mu);
  // when leaving scope it will ship data to monTool
   PassedCuts = PassedCuts + 1; //got called (data in place)
 
@@ -147,11 +158,36 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE
   
  
 // This is the last step. So pass is going to be the result of LH
-  asg::AcceptData accept =  m_egammaElectronLHTool->accept(input.electron); 
-  pass = (bool) accept;
 
-  ATH_MSG_DEBUG("AthenaLHSelectorTool: TAccept = " << pass);
+  // get average luminosity information to calculate LH
+
+  float avg_mu = 0;
+  float lhval=0;
+  SG::ReadDecorHandle<xAOD::EventInfo,float> eventInfoDecor(m_avgMuKey, ctx);
+  if(eventInfoDecor.isPresent()) {
+    avg_mu = eventInfoDecor(0);
+    ATH_MSG_DEBUG("Average mu " << avg_mu);
+    avgmu_monitored.push_back(avg_mu);
+    asg::AcceptData accept =  m_egammaElectronLHTool->accept(ctx,input.electron,avg_mu);
+    pass = (bool) accept;
+  
+    // Monitor the LH value
+    lhval=m_egammaElectronLHTool->calculate(ctx, input.electron,avg_mu);
+    ATH_MSG_DEBUG("LHValue with avgmu " << lhval);
+    lhval_monitored.push_back(lhval);
+  }  
+  else{
+    ATH_MSG_WARNING("EventInfo decoration not available!");
+    asg::AcceptData accept =  m_egammaElectronLHTool->accept(ctx,input.electron);
+    pass = (bool) accept;
+    // Monitor the LH value
+    lhval=m_egammaElectronLHTool->calculate(ctx, input.electron);
+    ATH_MSG_DEBUG("LHValue without avgmu " << lhval);
+    lhval_monitored.push_back(lhval);
+  }
 
+  ATH_MSG_DEBUG("AthenaLHSelectorTool: TAccept = " << pass);
+  
 
   float Rhad1(0), Rhad(0), Reta(0), Rphi(0), e277(0), weta2c(0), //emax2(0), 
     Eratio(0), DeltaE(0), f1(0), weta1c(0), wtot(0), fracm(0);
@@ -189,6 +225,7 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE
   // E(+/-3)-E(+/-1)/E(+/-1)
   input.electron->showerShapeValue(fracm, xAOD::EgammaParameters::fracs1);
 
+  ATH_MSG_DEBUG(" electron Cluster Et "<<ET);
   ATH_MSG_DEBUG( "  Rhad1  " << Rhad1 ) ;
   ATH_MSG_DEBUG( "  Rhad   " << Rhad ) ;
   ATH_MSG_DEBUG( "  e277   " << e277 ) ;
@@ -201,7 +238,9 @@ bool TrigEgammaPrecisionElectronHypoToolInc::decide( const ITrigEgammaPrecisionE
   ATH_MSG_DEBUG( "  DeltaE " << DeltaE ) ;
   ATH_MSG_DEBUG( "  wtot   " << wtot ) ;
   ATH_MSG_DEBUG( "  fracm  " << fracm ) ;
-
+  ATH_MSG_DEBUG(" trackPT "<<input.electron->trackParticle()->pt());
+  ATH_MSG_DEBUG(" d0 "<<input.electron->trackParticle()->d0());
+  ATH_MSG_DEBUG(" z0 "<<input.electron->trackParticle()->z0());
 
   if ( !pass ){
       ATH_MSG_DEBUG("REJECT Likelihood failed");
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h
index 9050559e84741c85d851d48bf4caf025737c0dbc..c4c37d3e3cc903b3ce9ed78f372996d580c5e251 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigEgammaPrecisionElectronHypoToolInc.h
@@ -16,6 +16,9 @@
 #include "ITrigEgammaPrecisionElectronHypoTool.h"
 #include "PATCore/AcceptData.h"
 #include "EgammaAnalysisInterfaces/IAsgElectronLikelihoodTool.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "LumiBlockData/LuminosityCondData.h"
+#include "StoreGate/ReadDecorHandle.h"
 
 /**
  * @class Implementation of the precision selection for electrons
@@ -31,8 +34,8 @@ class TrigEgammaPrecisionElectronHypoToolInc : public extends<AthAlgTool, ITrigE
   virtual ~TrigEgammaPrecisionElectronHypoToolInc();
   virtual StatusCode initialize() override;
 
-  virtual StatusCode decide( std::vector<ITrigEgammaPrecisionElectronHypoTool::ElectronInfo>& input, const EventContext& )  const override;
-  virtual bool decide( const ITrigEgammaPrecisionElectronHypoTool::ElectronInfo& i, const EventContext& ) const override;
+  virtual StatusCode decide( std::vector<ITrigEgammaPrecisionElectronHypoTool::ElectronInfo>& input, const EventContext& ctx)  const override;
+  virtual bool decide( const ITrigEgammaPrecisionElectronHypoTool::ElectronInfo& i, const EventContext& ctx) const override;
 
  private:
   HLT::Identifier m_decisionId;
@@ -44,7 +47,12 @@ class TrigEgammaPrecisionElectronHypoToolInc : public extends<AthAlgTool, ITrigE
   Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" };  
 
   ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
-  ToolHandle<IAsgElectronLikelihoodTool> m_egammaElectronLHTool;  
+
+  /*Likelihood tool*/
+  ToolHandle<IAsgElectronLikelihoodTool> m_egammaElectronLHTool;
+  
+  /*Luminosity info*/
+  SG::ReadDecorHandleKey<xAOD::EventInfo> m_avgMuKey { this, "AveIntPerXKey", "EventInfo.AveIntPerXDecor", "Decoration for Average Interaction Per Crossing" };
   int findCutIndex( float eta ) const;
 
 }; 
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/L1JetMonitoringConfig.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/L1JetMonitoringConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d711a8fc05ad55cbd6d694a85195f49850dff0b
--- /dev/null
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/L1JetMonitoringConfig.py
@@ -0,0 +1,25 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
+class L1JetMonAlg():
+  def __init__(self,name,jetcoll,triggerChain=''):
+    self.name           = name
+    self.L1JetContainer = jetcoll
+    self.TriggerChain   = triggerChain
+
+  def toAlg(self,monhelper):
+    from AthenaConfiguration.ComponentFactory import CompFactory
+    alg = monhelper.addAlgorithm(CompFactory.TrigL1JetMonitorAlgorithm, self.name)
+    jetcontainer       = self.L1JetContainer
+    triggerChain       = self.TriggerChain
+    alg.L1JetContainer = jetcontainer
+    alg.TriggerChain   = triggerChain
+    # Add a generic monitoring tool (a "group" in old language). The returned 
+    # object here is the standard GenericMonitoringTool
+    myGroup = monhelper.addGroup(alg,'TrigL1JetMonitor','HLT/JetMon/L1/')
+    # Configure histograms
+    Path  = jetcontainer+'/'
+    Path += 'NoTriggerSelection/' if triggerChain == '' else triggerChain+'/'
+    myGroup.defineHistogram('et8x8',title='et8x8',path=Path,xbins=400,xmin=0.0,xmax=400.0)
+    myGroup.defineHistogram('eta',title='eta',path=Path,xbins=50,xmin=-5,xmax=5)
+    myGroup.defineHistogram('phi',title='phi',path=Path,xbins=50,xmin=-3.3,xmax=3.3)
+    return alg
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
index 4f5484ab31be9ea03d15a1c5af2cfcba4a2ef57e..724caef0ba16e92f220424dd1b5f56059c26dcc1 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/python/TrigJetMonitorAlgorithm.py
@@ -19,6 +19,14 @@ OfflineJetCollections = [
   'AntiKt4EMPFlowJets',
 ]
 
+# L1 monitoring
+L1JetCollections = ['LVL1JetRoIs']
+Chain2L1JetCollDict = {
+  'L1_J15'  : 'LVL1JetRoIs',
+  'L1_J20'  : 'LVL1JetRoIs',
+  'L1_J100' : 'LVL1JetRoIs',
+}
+
 # AthenaMT
 JetCollections['MT']    = [
   'HLT_AntiKt4EMTopoJets_subjesIS',                   # default small-R
@@ -72,6 +80,16 @@ def TrigJetMonConfig(inputFlags):
   # AthenaMT or Legacy
   InputType = 'MT' if AthenaMT else 'Legacy'
 
+  # Loop over L1 jet collectoins
+  for jetcoll in L1JetCollections:
+    l1jetconf = l1JetMonitoringConfig(ConfigFlags,jetcoll)
+    l1jetconf.toAlg(helper)
+
+  # Loop over L1 jet chains
+  for chain,jetcoll in Chain2L1JetCollDict.iteritems():
+    l1chainconf = l1JetMonitoringConfig(ConfigFlags,jetcoll,chain)
+    l1chainconf.toAlg(helper)
+
   # Loop over offline jet collections
   for jetcoll in OfflineJetCollections:
     offlineMonitorConf = jetMonitoringConfig(inputFlags,jetcoll,AthenaMT)
@@ -97,12 +115,15 @@ def basicJetMonAlgSpec(jetcoll,isOnline,athenaMT):
   # we use a specialized dictionnary (JetMonAlgSpec) which will be translated into the final C++ tool
   path = 'NoTriggerSelection' if isOnline else 'standardHistos/'
 
+  TopLevelDir  = 'HLT/JetMon/'
+  TopLevelDir += 'Online/' if isOnline else 'Offline/'
+
   # Remap online Run 2 jet collections
   from TrigJetMonitoring import JetCollRemapping
   jetcollFolder = jetcoll
   if jetcoll in JetCollRemapping.JetCollRun2ToRun3 and not athenaMT:
     jetcollFolder = JetCollRemapping.JetCollRun2ToRun3[jetcoll]
-  Conf = JetMonAlgSpec(jetcoll+"Mon",JetContainerName = jetcoll, defaultPath = path, topLevelDir="HLT/JetMon/", bottomLevelDir=jetcollFolder)
+  Conf = JetMonAlgSpec(jetcoll+"Mon",JetContainerName = jetcoll, defaultPath = path, topLevelDir=TopLevelDir, bottomLevelDir=jetcollFolder, failureOnMissingContainer=False)
 
   # Now start filling the histo spec list    
   Conf.appendHistos(
@@ -156,19 +177,36 @@ def basicJetMonAlgSpec(jetcoll,isOnline,athenaMT):
 
   return Conf
 
+from JetMonitoring.JetStandardHistoSpecs import knownHistos
 # Additional histograms for offline jets
 ExtraOfflineHists = [
-  HistoSpec('HECFrac', (50,0,1), title="HECFrac;HEC fraction;entries" ),
-  HistoSpec('EMFrac', (50,0,1), title="EMFrac;EM fraction;entries" ),
-  HistoSpec('Jvt', (50,-0.1,1), title="JVT;JVT;entries" ),
+  HistoSpec('HECFrac', (50,0,1), title="HECFrac;HEC fraction;Entries" ),
+  HistoSpec('EMFrac', (50,0,1), title="EMFrac;EM fraction;Entries" ),
+  HistoSpec('Jvt', (50,-0.1,1), title="JVT;JVT;Entries" ),
+  knownHistos.pt.clone('JetConstitScaleMomentum_pt', title='ConstitScale p_{T};ConstitScale p_{T} [GeV];Entries', xvar='JetConstitScaleMomentum_pt:GeV'),
+  knownHistos.eta.clone('JetConstitScaleMomentum_eta', title='ConstitScale #eta;ConstitScale #eta;Entries', xvar='JetConstitScaleMomentum_eta'),
+  knownHistos.phi.clone('JetConstitScaleMomentum_phi', title='ConstitScale #phi;ConstitScale #phi;Entries', xvar='JetConstitScaleMomentum_phi'),
+  knownHistos.m.clone('JetConstitScaleMomentum_m', title='ConstitScale m;ConstitScale mass [GeV];Entries', xvar='JetConstitScaleMomentum_m:GeV'),
+  "JVFCorr",
+  "JvtRpt",
   "NumTrkPt1000[0]",
   "TrackWidthPt1000[0]",
+  "SumPtTrkPt500[0]",
 ]
 
 # Additional histograms for online jets
 ExtraSmallROnlineHists = [
-  HistoSpec('HECFrac', (50,0,1), title="HECFrac;HEC fraction;entries" ),
-  HistoSpec('EMFrac', (50,0,1), title="EMFrac;EM fraction;entries" ),
+  HistoSpec('HECFrac', (50,0,1), title="HECFrac;HEC fraction;Entries" ),
+  HistoSpec('EMFrac', (50,0,1), title="EMFrac;EM fraction;Entries" ),
+  HistoSpec('DetectorEta', (100,-5,5), title="DetectorEta;Detector #eta;Entries" ), 
+  HistoSpec('ActiveArea', (80,0,0.8), title="ActiveArea;Active Area;Entries" ), 
+  HistoSpec('et:GeV;eta',  (100,0,750, 50,-5,5) , title='#eta vs E_{T};E_{T} [GeV];#eta;Entries'),
+  knownHistos.pt.clone('JetConstitScaleMomentum_pt', title='ConstitScale p_{T};ConstitScale p_{T} [GeV];Entries', xvar='JetConstitScaleMomentum_pt:GeV'),
+  knownHistos.eta.clone('JetConstitScaleMomentum_eta', title='ConstitScale #eta;ConstitScale #eta;Entries', xvar='JetConstitScaleMomentum_eta'),
+  knownHistos.phi.clone('JetConstitScaleMomentum_phi', title='ConstitScale #phi;ConstitScale #phi;Entries', xvar='JetConstitScaleMomentum_phi'),
+  knownHistos.m.clone('JetConstitScaleMomentum_m', title='ConstitScale m;ConstitScale mass [GeV];Entries', xvar='JetConstitScaleMomentum_m:GeV'),
+  "EM3Frac",
+  "Tile0Frac",
 ]
 
 ExtraLargeROnlineHists = [
@@ -179,10 +217,16 @@ def jetMonitoringConfig(inputFlags,jetcoll,athenaMT):
 
    # Declare a configuration dictionnary for a JetContainer
    isOnline = True if 'HLT' in jetcoll else False
-   conf = basicJetMonAlgSpec(jetcoll,isOnline,athenaMT)
+   conf     = basicJetMonAlgSpec(jetcoll,isOnline,athenaMT)
    if isOnline:
      if 'AntiKt4' in jetcoll:
        for hist in ExtraSmallROnlineHists: conf.appendHistos(hist)
+       if 'ftf' in jetcoll:
+         conf.appendHistos("JVFCorr")
+         conf.appendHistos("JvtRpt")
+         conf.appendHistos("SumPtTrkPt500[0]")
+         conf.appendHistos("NumTrkPt1000[0]")
+         conf.appendHistos("TrackWidthPt1000[0]")
      else:
        for hist in ExtraLargeROnlineHists: conf.appendHistos(hist)
    else: # offline
@@ -190,6 +234,12 @@ def jetMonitoringConfig(inputFlags,jetcoll,athenaMT):
 
    return conf
 
+def l1JetMonitoringConfig(inputFlags,jetcoll,chain=''):
+  from TrigJetMonitoring.L1JetMonitoringConfig import L1JetMonAlg
+  name = jetcoll if chain=='' else jetcoll+'_'+chain
+  conf = L1JetMonAlg(name,jetcoll,chain)
+  return conf
+
 def jetChainMonitoringConfig(inputFlags,jetcoll,chain,athenaMT):
    '''Function to configures some algorithms in the monitoring system.'''
 
@@ -216,8 +266,9 @@ def jetChainMonitoringConfig(inputFlags,jetcoll,chain,athenaMT):
        JetContainerName = jetcoll,
        TriggerChain = chain,
        defaultPath = chain,
-       topLevelDir="HLT/JetMon/",
+       topLevelDir="HLT/JetMon/Online/",
        bottomLevelDir=jetcollFolder,
+       failureOnMissingContainer=True,
        )
    trigConf.appendHistos(
            "pt",
@@ -306,6 +357,16 @@ if __name__=='__main__':
   # AthenaMT or Legacy
   InputType = 'MT' if AthenaMT else 'Legacy'
 
+  # Loop over L1 jet collectoins
+  for jetcoll in L1JetCollections:
+    l1jetconf = l1JetMonitoringConfig(ConfigFlags,jetcoll)
+    l1jetconf.toAlg(helper)
+
+  # Loop over L1 jet chains
+  for chain,jetcoll in Chain2L1JetCollDict.iteritems():
+    l1chainconf = l1JetMonitoringConfig(ConfigFlags,jetcoll,chain)
+    l1chainconf.toAlg(helper)
+
   # Loop over offline jet collections
   for jetcoll in OfflineJetCollections:
     offlineMonitorConf = jetMonitoringConfig(ConfigFlags,jetcoll,AthenaMT)
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9a37bbff9ce6dcca3e098ed296670e3815b0059a
--- /dev/null
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.cxx
@@ -0,0 +1,55 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigL1JetMonitorAlgorithm.h"
+
+TrigL1JetMonitorAlgorithm::TrigL1JetMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
+  : AthMonitorAlgorithm(name,pSvcLocator)
+{
+  declareProperty("L1JetContainer", m_l1jetContainerkey = "LVL1JetRoIs");
+  declareProperty("TriggerChain",   m_chain             = "");
+}
+
+TrigL1JetMonitorAlgorithm::~TrigL1JetMonitorAlgorithm() {}
+
+StatusCode TrigL1JetMonitorAlgorithm::initialize() {
+  ATH_CHECK(m_l1jetContainerkey.initialize());
+  return AthMonitorAlgorithm::initialize();
+}
+
+StatusCode TrigL1JetMonitorAlgorithm::fillHistograms( const EventContext& ctx ) const {
+  using namespace Monitored;
+
+  bool triggerPassed = true;
+  if( m_chain != "" ){
+    if( !getTrigDecisionTool()->isPassed(m_chain) ) triggerPassed = false;
+  }
+  if( !triggerPassed ) return StatusCode::SUCCESS;
+
+  // Retrieve the L1 jet container
+  SG::ReadHandle<xAOD::JetRoIContainer> jets(m_l1jetContainerkey, ctx);
+  if( !jets.isValid() ){
+    ATH_MSG_WARNING("evtStore() does not contain the L1 jet collection with name " << m_l1jetContainerkey);
+    return StatusCode::FAILURE;
+  }
+
+  // Declare the quantities which should be monitored
+  auto et8x8 = Monitored::Scalar<float>("et8x8");
+  auto eta   = Monitored::Scalar<float>("eta");
+  auto phi   = Monitored::Scalar<float>("phi");
+
+  // Loop over jets
+  for(const auto& j : *jets){
+    // Set the values of the monitored variables for the event		
+    et8x8 = j->et8x8()*0.001;
+    eta   = j->eta();
+    phi   = j->phi();
+    // Fill. First argument is the tool (GMT) name as defined in TrigJetMonitorAlgorithm.py, 
+    // all others are the variables to be saved.
+    auto tool = getGroup("TrigL1JetMonitor");
+    fill(tool,et8x8,eta,phi);
+  }
+
+  return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h
new file mode 100644
index 0000000000000000000000000000000000000000..49a8c32cb7d082548465f2b5ae79de3691a02aba
--- /dev/null
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/TrigL1JetMonitorAlgorithm.h
@@ -0,0 +1,24 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGJETMONITORING_TRIGL1JETMONITORALGORITHM_H
+#define TRIGJETMONITORING_TRIGL1JETMONITORALGORITHM_H
+
+#include "AthenaMonitoring/AthMonitorAlgorithm.h"
+#include "AthenaMonitoringKernel/Monitored.h"
+#include "xAODTrigger/JetRoIContainer.h"
+
+
+class TrigL1JetMonitorAlgorithm : public AthMonitorAlgorithm {
+ public:
+  TrigL1JetMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
+  virtual ~TrigL1JetMonitorAlgorithm();
+  virtual StatusCode initialize() override;
+  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
+
+  // Name of the L1 jet collection to be monitored
+  SG::ReadHandleKey<xAOD::JetRoIContainer> m_l1jetContainerkey;
+  std::string                              m_chain;
+};
+#endif
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/src/components/TrigJetMonitoring_entries.cxx b/Trigger/TrigMonitoring/TrigJetMonitoring/src/components/TrigJetMonitoring_entries.cxx
index 65de7fbcdafa6ef584708906b27c486821a71dea..6758d84971f50b1fe2d6774d8e5a49c32d6cb7fb 100644
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/src/components/TrigJetMonitoring_entries.cxx
+++ b/Trigger/TrigMonitoring/TrigJetMonitoring/src/components/TrigJetMonitoring_entries.cxx
@@ -1,6 +1,10 @@
+/*
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+*/
 
 #include "TrigJetMonitoring/HLTJetMonTool.h"
-
+#include "../TrigL1JetMonitorAlgorithm.h"
 
 DECLARE_COMPONENT( HLTJetMonTool )
+DECLARE_COMPONENT( TrigL1JetMonitorAlgorithm )
 
diff --git a/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/CMAdata.h b/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/CMAdata.h
index 42d38da576bf9773cc1682fe004e70b43acfed4a..16b6d6edaba93a4c6c8ba8623a101c41fdb586d5 100755
--- a/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/CMAdata.h
+++ b/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/CMAdata.h
@@ -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
 */
 
 #ifndef CMADATA_H
@@ -40,10 +40,10 @@ class CMAdata : public BaseObject
     CMAdata(unsigned long int);
     
 #ifdef LVL1_STANDALONE
-    CMAdata(const RPCdata*);
+    CMAdata(const RPCdata* rpcData);
 #else
-    CMAdata(const RPCdata*,const IRPCcablingSvc*,unsigned long int);
-    CMAdata(const RPCdata*,const RpcCablingCondData*,unsigned long int);
+    CMAdata(const RPCdata* rpcData,const IRPCcablingSvc* rpcCabling, const unsigned long int debug);
+    CMAdata(const RPCdata* rpcData,const RpcCablingCondData* rpcCabling, const unsigned long int debug);
 #endif
     CMAdata(const CMAdata&);
     ~CMAdata();
@@ -64,23 +64,5 @@ class CMAdata : public BaseObject
     void PrintElement(std::ostream&,std::string,bool) const;
     void Print(std::ostream&,bool) const;
 };
-/*
-template <class X> X& operator<<(X& stream,const CMAdata& data)
-{
-#if (__GNUC__) && (__GNUC__ > 2) 
-    // put your gcc 3.2 specific code here
-    __osstream display;
-#else
-    // put your gcc 2.95 specific code here
-    char buffer[5000000];
-    for (int i=0;i<5000000;++i) buffer[i] = '\0';
-    __osstream display(buffer,5000000);
-#endif
-
-    data.Print(display,false);
-    stream << display.str();
-    return stream;
-}
-*/
 
 #endif
diff --git a/Trigger/TrigT1/TrigT1RPClogic/src/CMAdata.cxx b/Trigger/TrigT1/TrigT1RPClogic/src/CMAdata.cxx
index 9e2455ff990b42079fcee3930a59655111fb34ac..288ecdb7c98a43ae54e985741079c0f627d12ae8 100755
--- a/Trigger/TrigT1/TrigT1RPClogic/src/CMAdata.cxx
+++ b/Trigger/TrigT1/TrigT1RPClogic/src/CMAdata.cxx
@@ -1,17 +1,13 @@
 /*
-  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 "TrigT1RPClogic/CMAdata.h"
-//#include "RPCcablingInterface/CablingRPCBase.h"
 
 #ifdef LVL1_STANDALONE
-// ==> #include "RPCcabling/CablingRPC.h"
+#include "RPCcablingInterface/CablingRPCBase.h"
 #endif
 
-
-using namespace std;
-
 CMAdata::CMAdata(unsigned long int debug) : 
     BaseObject(Data,"CMApatterns"),m_debug(debug)
 {
@@ -20,89 +16,80 @@ CMAdata::CMAdata(unsigned long int debug) :
 }
 
 #ifdef LVL1_STANDALONE
-CMAdata::CMAdata(const RPCdata* rpc_data) : BaseObject(Data,"CMApatterns"),
+CMAdata::CMAdata(const RPCdata* rpcData) :
+    BaseObject(Data,"CMApatterns"),
     m_debug(0) 
 #else
-CMAdata::CMAdata(const RPCdata* rpc_data,const IRPCcablingSvc* cabling,
-                 unsigned long int debug) : 
-    BaseObject(Data,"CMApatterns"),m_debug(debug)
+CMAdata::CMAdata(const RPCdata* rpcData,const IRPCcablingSvc* rpcCabling, const unsigned long int debug) : 
+    BaseObject(Data,"CMApatterns"),
+    m_debug(debug)
 #endif
 {
     m_eta_cma_patterns.clear();
     m_phi_cma_patterns.clear();
 
 #ifdef LVL1_STANDALONE
-    const CablingRPCBase* cabling = RPCcabling::CablingRPC::instance();
+    const CablingRPCBase* rpcCabling = RPCcabling::CablingRPC::instance();
 #endif
-    //    cout << "Comincio:" << endl;
-    //    RPCcablingSvc*  cabling;
-    //    ISvcLocator* svcLoc = Gaudi::svcLocator( );
-    //    cout << "Istanziato il service locator" << endl;
-    //    StatusCode sc = svcLoc->service( "RPCcablingSvc", cabling );
-    //    if(sc.isFailure()) cout << "caZZo!" << endl; 
-    //#endif
-
-    if(!cabling) 
-    {
-        DISP << "Creation of CMA data is not possible: no cabling service!" 
-             << endl;
-	DISP_ERROR;
-        return;
-    }
 
-    RPCdata::digitList eta = rpc_data->eta_digits_list();
+    RPCdata::digitList eta = rpcData->eta_digits_list();
     RPCdata::digitList::const_iterator digi = eta.begin();
 
     while(digi != eta.end())
     {
-	const int sector       = (*digi)->decoding().logic_sector();
+    const int sector       = (*digi)->decoding().logic_sector();
         const ViewType type    = (*digi)->decoding().view();
-	const int station      = (*digi)->decoding().lvl1_station();
+    const int station      = (*digi)->decoding().lvl1_station();
         const int cabling_code = (*digi)->decoding().cabling_code();
 
-	const CMAparameters::CMAlist list =
-                          cabling->give_CMAs(sector,type,station,cabling_code);
+    const CMAparameters::CMAlist list = rpcCabling->give_CMAs(sector,type,station,cabling_code);
         CMAparameters::CMAlist::const_iterator cma = list.begin();
         while(cma != list.end())
-	{
+    {
             create_patterns(*cma,*digi);
-	    ++cma;
-	}
-	++digi;
+        ++cma;
+    }
+    ++digi;
     }     
 
-    RPCdata::digitList phi = rpc_data->phi_digits_list();
+    RPCdata::digitList phi = rpcData->phi_digits_list();
     digi = phi.begin();
     while(digi != phi.end())
     {
-	const int sector       = (*digi)->decoding().logic_sector();
+    const int sector       = (*digi)->decoding().logic_sector();
         const ViewType type    = (*digi)->decoding().view();
-	const int station      = (*digi)->decoding().lvl1_station();
+    const int station      = (*digi)->decoding().lvl1_station();
         const int cabling_code = (*digi)->decoding().cabling_code();
 
-	const CMAparameters::CMAlist list =
-                          cabling->give_CMAs(sector,type,station,cabling_code);
+    const CMAparameters::CMAlist list = rpcCabling->give_CMAs(sector,type,station,cabling_code);
         CMAparameters::CMAlist::const_iterator cma = list.begin();
         while(cma != list.end())
-	{
+    {
             create_patterns(*cma,*digi);
-	    ++cma;
-	}
-	++digi;
+        ++cma;
+    }
+    ++digi;
     }
 }
 
 #ifdef LVL1_STANDALONE
-CMAdata::CMAdata(const RPCdata* rpc_data) : BaseObject(Data,"CMApatterns"), m_debug(0) 
+CMAdata::CMAdata(const RPCdata* rpcData) :
+    BaseObject(Data,"CMApatterns"),
+    m_debug(0) 
 #else
-CMAdata::CMAdata(const RPCdata* rpc_data,const RpcCablingCondData* readCdo, unsigned long int debug) : 
-    BaseObject(Data,"CMApatterns"),m_debug(debug)
+CMAdata::CMAdata(const RPCdata* rpcData,const RpcCablingCondData* rpcCabling, const unsigned long int debug) : 
+    BaseObject(Data,"CMApatterns"),
+    m_debug(debug)
 #endif
 {
     m_eta_cma_patterns.clear();
     m_phi_cma_patterns.clear();
 
-    RPCdata::digitList eta = rpc_data->eta_digits_list();
+#ifdef LVL1_STANDALONE
+    const CablingRPCBase* rpcCabling = RPCcabling::CablingRPC::instance();
+#endif
+
+    RPCdata::digitList eta = rpcData->eta_digits_list();
     RPCdata::digitList::const_iterator digi = eta.begin();
 
     while(digi != eta.end())
@@ -112,7 +99,7 @@ CMAdata::CMAdata(const RPCdata* rpc_data,const RpcCablingCondData* readCdo, unsi
 	const int station      = (*digi)->decoding().lvl1_station();
         const int cabling_code = (*digi)->decoding().cabling_code();
 
-	const CMAparameters::CMAlist list = readCdo->give_CMAs(sector,type,station,cabling_code);
+	const CMAparameters::CMAlist list = rpcCabling->give_CMAs(sector,type,station,cabling_code);
         CMAparameters::CMAlist::const_iterator cma = list.begin();
         while(cma != list.end())
 	{
@@ -122,7 +109,7 @@ CMAdata::CMAdata(const RPCdata* rpc_data,const RpcCablingCondData* readCdo, unsi
 	++digi;
     }     
 
-    RPCdata::digitList phi = rpc_data->phi_digits_list();
+    RPCdata::digitList phi = rpcData->phi_digits_list();
     digi = phi.begin();
     while(digi != phi.end())
     {
@@ -131,7 +118,7 @@ CMAdata::CMAdata(const RPCdata* rpc_data,const RpcCablingCondData* readCdo, unsi
 	const int station      = (*digi)->decoding().lvl1_station();
         const int cabling_code = (*digi)->decoding().cabling_code();
 
-	const CMAparameters::CMAlist list = readCdo->give_CMAs(sector,type,station,cabling_code);
+	const CMAparameters::CMAlist list = rpcCabling->give_CMAs(sector,type,station,cabling_code);
         CMAparameters::CMAlist::const_iterator cma = list.begin();
         while(cma != list.end())
 	{
@@ -242,7 +229,7 @@ CMAdata::give_patterns()
 }
 
 
-void CMAdata::PrintElement(ostream& stream,std::string element,bool detail) 
+void CMAdata::PrintElement(std::ostream& stream,std::string element,bool detail) 
     const
 {
     bool all  = (element == name() || element == "")? true : false;
@@ -253,7 +240,7 @@ void CMAdata::PrintElement(ostream& stream,std::string element,bool detail)
     if(nEta && (element == (*m_eta_cma_patterns.begin()).name() || all))
     {
         stream << name() << " contains " << eta_cma_patterns().size()
-	       << " eta patterns:" << endl;  
+	       << " eta patterns:" << std::endl;  
         printed = true;
 	PATTERNSlist::const_iterator it = m_eta_cma_patterns.begin();
 	while(it != m_eta_cma_patterns.end())
@@ -266,7 +253,7 @@ void CMAdata::PrintElement(ostream& stream,std::string element,bool detail)
     if (nPhi && (element == (*m_phi_cma_patterns.begin()).name() || all))
     {
         stream << name() << " contains " << phi_cma_patterns().size()
-	       << " phi patterns:" << endl;  
+	       << " phi patterns:" << std::endl;  
         printed = true;
         PATTERNSlist::const_iterator it = m_phi_cma_patterns.begin();
 	while(it != m_phi_cma_patterns.end())
@@ -279,17 +266,17 @@ void CMAdata::PrintElement(ostream& stream,std::string element,bool detail)
     if(!printed)
     {
         if (element == "") element = "CMAs";
-        stream << name() << " contains no " << element << "!" << endl;
+        stream << name() << " contains no " << element << "!" << std::endl;
     }
 }
 
 
-void CMAdata::Print(ostream& stream,bool detail) const
+void CMAdata::Print(std::ostream& stream,bool detail) const
 {
     stream << name() << " contains " 
            << eta_cma_patterns().size()
 	   << " eta patterns and " << phi_cma_patterns().size()
-	   << " phi patterns" << endl;
+	   << " phi patterns" << std::endl;
     
     PATTERNSlist::const_iterator eta = eta_cma_patterns().begin();
     PATTERNSlist::const_iterator phi = phi_cma_patterns().begin();
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h b/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h
index ba11898279c467b6857f4f67bb6968f045985d56..23749760489ba0da8217241e67688f6475b5b870 100755
--- a/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h
+++ b/Trigger/TrigT1/TrigT1RPCsteering/TrigT1RPCsteering/TrigT1RPC.h
@@ -11,6 +11,7 @@
 #include "GaudiKernel/NTuple.h"
 
 #include "StoreGate/DataHandle.h"
+#include "StoreGate/ReadHandleKey.h"
 
 #include "RPC_CondCabling/RpcCablingCondData.h"
 #include "StoreGate/ReadCondHandleKey.h"
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx b/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx
index fdff0c9fbac5affd1499880bc45ac5a1ec00cb4f..cc9fadfa6e1425c016a0770f0e03d7ef57f410e0 100755
--- a/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx
+++ b/Trigger/TrigT1/TrigT1RPCsteering/src/TrigT1RPC.cxx
@@ -65,7 +65,7 @@ StatusCode TrigT1RPC::execute() {
 
     ATH_MSG_DEBUG ("in execute()");
 
-    SG::ReadCondHandle<RpcCablingCondData> readHandle{m_readKey};
+    SG::ReadCondHandle<RpcCablingCondData> readHandle{m_readKey, Gaudi::Hive::currentContext()};
     const RpcCablingCondData* readCdo{*readHandle};
     
     RPCsimuData data;         // instanciate the container for the RPC digits
diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamCnv.icc b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamCnv.icc
index d510aaf63ef6cb3468b666f7cffcbca4d61b409a..6c8d7cefc7295a8ea1ce23da3b36c5804d536010 100755
--- a/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamCnv.icc
+++ b/Trigger/TrigT1/TrigT1ResultByteStream/TrigT1ResultByteStream/RoIBResultByteStreamCnv.icc
@@ -24,7 +24,7 @@ template< class ROBF >
 RoIBResultByteStreamCnv< ROBF >::RoIBResultByteStreamCnv( ISvcLocator* svcloc )
   : Converter( storageType(), classID(), svcloc ),
     AthMessaging( msgSvc(), "RoIBResultByteStreamCnv" ),
-    m_tool( "RoIBResultByteStreamTool/ToolSvc.RoIBResultBSEncoderTool" ),
+    m_tool( "RoIBResultByteStreamTool/RoIBResultBSEncoderTool" ),
     m_ByteStreamCnvSvc( "ByteStreamCnvSvc", "RoIBResultByteStreamCnv" ),
     m_robDataProviderSvc( "ROBDataProviderSvc", "RoIBResultByteStreamCnv" ) {
 
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
index af06d470eac6cac575e356f9f0989a5cfe569bfc..e13073ebc5dc3dc488950bea1b3448804d31a057 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetPT.py
@@ -103,8 +103,11 @@ def makeInDetPrecisionTracking( whichSignature,
   #If run in views need to check data dependancies!
   #NOTE: this seems necessary only when PT is called from a different view than FTF otherwise causes stalls
   if verifier:
-         verifier.DataObjects += [  ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+' + TrigPixelKeys.PixelClusterAmbiguitiesMap ),
-                                  ( 'TrackCollection' , 'StoreGateSvc+' + inputFTFtracks ) ] 
+    verifier.DataObjects += [( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+' + TrigPixelKeys.PixelClusterAmbiguitiesMap ),
+                             ( 'TrackCollection' , 'StoreGateSvc+' + inputFTFtracks )]
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+' + TrigPixelKeys.PixelClusterAmbiguitiesMap )]
       
   
   from AthenaCommon.AppMgr import ToolSvc
diff --git a/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py b/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
index 12c93898f7230cd516abb077af8f872984f79a7c..89326454283eae507664d1a1a51b5d5e6b1b4929 100644
--- a/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
+++ b/Trigger/TrigTools/TrigInDetConfig/python/InDetSetup.py
@@ -2,7 +2,7 @@
 #  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
-from __future__ import print_function
+from __future__ import print_function, absolute_import
 
 from AthenaCommon.Include import include
 include.block("InDetTrigRecExample/EFInDetConfig.py")
@@ -23,9 +23,12 @@ if 'InDetTrigFlags' not in dir():
 
 
 
+def makeInDetAlgsNoView( whichSignature='', separateTrackParticleCreator='', rois = 'EMViewRoIs', doFTF = True ):
 
+  viewAlgs, viewVerify = makeInDetAlgs( whichSignature, separateTrackParticleCreator, rois, doFTF, None )
+  return viewAlgs
 
-def makeInDetAlgs( whichSignature='', separateTrackParticleCreator='', rois = 'EMViewRoIs', doFTF = True ):
+def makeInDetAlgs( whichSignature='', separateTrackParticleCreator='', rois = 'EMViewRoIs', doFTF = True, viewVerifier='IDViewDataVerifier' ):
   #If signature specified add suffix to the algorithms
   signature =  "_" + whichSignature if whichSignature else ''
   if signature != "" and separateTrackParticleCreator == "":
@@ -33,14 +36,48 @@ def makeInDetAlgs( whichSignature='', separateTrackParticleCreator='', rois = 'E
 
   #Global keys/names for Trigger collections 
   from .InDetTrigCollectionKeys import  TrigPixelKeys, TrigSCTKeys
+  from InDetRecExample.InDetKeys import InDetKeys
+  from TrigInDetConfig.TrigInDetConfig import InDetCacheNames
+  from AthenaCommon.GlobalFlags import globalflags
 
   viewAlgs = []
-  from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-  from InDetRecExample.InDetKeys import InDetKeys
 
+  ViewDataVerifier = None
+  if viewVerifier:
+    import AthenaCommon.CfgMgr as CfgMgr
+    ViewDataVerifier = CfgMgr.AthViews__ViewDataVerifier( viewVerifier + signature )
+    ViewDataVerifier.DataObjects = [( 'InDet::PixelClusterContainerCache' , InDetCacheNames.Pixel_ClusterKey ),
+                                    ( 'PixelRDO_Cache' , InDetCacheNames.PixRDOCacheKey ),
+                                    ( 'InDet::SCT_ClusterContainerCache' , InDetCacheNames.SCT_ClusterKey ),
+                                    ( 'SCT_RDO_Cache' , InDetCacheNames.SCTRDOCacheKey ),
+                                    ( 'SpacePointCache' , InDetCacheNames.SpacePointCachePix ),
+                                    ( 'SpacePointCache' , InDetCacheNames.SpacePointCacheSCT ),
+                                    ( 'IDCInDetBSErrContainer_Cache' , InDetCacheNames.SCTBSErrCacheKey ),
+                                    ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+    viewAlgs.append( ViewDataVerifier )
+
+    # Make sure required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+
+    # Load RDOs if we aren't loading bytestream
+    if not globalflags.InputFormat.is_bytestream():
+      ViewDataVerifier.DataObjects +=   [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
+                                         ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
+                                         ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
+      topSequence.SGInputLoader.Load += [( 'PixelRDO_Container' , InDetKeys.PixelRDOs() ),
+                                         ( 'SCT_RDO_Container' , InDetKeys.SCT_RDOs() ),
+                                         ( 'IDCInDetBSErrContainer' , InDetKeys.SCT_ByteStreamErrs() )]
+
+    # This object must be loaded from SG if it's not loaded in conddb (algs request it but ignore)
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.folderRequested( "Cond/StatusHT" ):
+      ViewDataVerifier.DataObjects += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
+      topSequence.SGInputLoader.Load += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
+
+  from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
   from AthenaCommon.AppMgr import ToolSvc
-  from TrigInDetConfig import InDetCacheNames
-  from AthenaCommon.GlobalFlags import globalflags
 
   #Only add raw data decoders if we're running over raw data
   if globalflags.InputFormat.is_bytestream():
@@ -280,6 +317,5 @@ def makeInDetAlgs( whichSignature='', separateTrackParticleCreator='', rois = 'E
       viewAlgs.append(theTrackParticleCreatorAlg)
 
 
+  return viewAlgs, ViewDataVerifier
 
-
-  return viewAlgs
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
index 7e6abdd7617b1f668b81466958e42e1c78978988..2f155d0dd2efb76aa42963912b6a48c37eb102c3 100644
--- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
+++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref
@@ -1,6 +1,9 @@
 TrigSignatureMoniMT                                INFO HLT_2e17_etcut_L12EM15VH #3136730292
 TrigSignatureMoniMT                                INFO -- #3136730292 Events         2          2          2          2          2          -          -          -          2
 TrigSignatureMoniMT                                INFO -- #3136730292 Features                             12         298        14         -          -          -
+TrigSignatureMoniMT                                INFO HLT_2e17_lhvloose_L12EM15VH #2280638160
+TrigSignatureMoniMT                                INFO -- #2280638160 Events         2          2          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                INFO -- #2280638160 Features                             0          0          0          0          -          -
 TrigSignatureMoniMT                                INFO HLT_2e17_lhvloose_L12EM3 #1767768251
 TrigSignatureMoniMT                                INFO -- #1767768251 Events         20         20         0          0          0          0          -          -          0
 TrigSignatureMoniMT                                INFO -- #1767768251 Features                             0          0          0          0          -          -
@@ -64,24 +67,36 @@ TrigSignatureMoniMT                                INFO -- #1834383636 Features
 TrigSignatureMoniMT                                INFO HLT_5j70_0eta240_L14J20 #1175391812
 TrigSignatureMoniMT                                INFO -- #1175391812 Events         7          7          1          -          -          -          -          -          1
 TrigSignatureMoniMT                                INFO -- #1175391812 Features                             5          -          -          -          -          -
-TrigSignatureMoniMT                                INFO HLT_e140_lhloose_L1EM24VHI #2512605388
-TrigSignatureMoniMT                                INFO -- #2512605388 Events         6          6          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #2512605388 Features                             0          0          0          0          -          -
-TrigSignatureMoniMT                                INFO HLT_e140_lhloose_nod0_L1EM24VHI #2532156734
-TrigSignatureMoniMT                                INFO -- #2532156734 Events         6          6          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #2532156734 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                INFO HLT_e140_lhloose_L1EM22VHI #3471067710
+TrigSignatureMoniMT                                INFO -- #3471067710 Events         6          6          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                INFO -- #3471067710 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                INFO HLT_e140_lhloose_nod0_L1EM22VHI #4128870680
+TrigSignatureMoniMT                                INFO -- #4128870680 Events         6          6          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                INFO -- #4128870680 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                INFO HLT_e17_lhloose_mu14_L1EM15VH_MU10 #899946230
+TrigSignatureMoniMT                                INFO -- #899946230 Events          3          3          2          2          2          2          -          -          2
+TrigSignatureMoniMT                                INFO -- #899946230 Features                              2          46         4          2          -          -
+TrigSignatureMoniMT                                INFO HLT_e17_lhvloose_nod0_L1EM15VH #140779220
+TrigSignatureMoniMT                                INFO -- #140779220 Events          8          8          6          6          6          5          -          -          5
+TrigSignatureMoniMT                                INFO -- #140779220 Features                              6          79         10         5          -          -
 TrigSignatureMoniMT                                INFO HLT_e26_etcut_L1EM22VHI #1703681121
 TrigSignatureMoniMT                                INFO -- #1703681121 Events         6          6          6          6          6          -          -          -          6
 TrigSignatureMoniMT                                INFO -- #1703681121 Features                             7          134        7          -          -          -
-TrigSignatureMoniMT                                INFO HLT_e26_lhtight_L1EM24VHI #3494457106
-TrigSignatureMoniMT                                INFO -- #3494457106 Events         6          6          5          5          5          3          -          -          3
-TrigSignatureMoniMT                                INFO -- #3494457106 Features                             5          65         8          3          -          -
+TrigSignatureMoniMT                                INFO HLT_e26_lhtight_L1EM22VHI #1995263521
+TrigSignatureMoniMT                                INFO -- #1995263521 Events         6          6          5          5          5          3          -          -          3
+TrigSignatureMoniMT                                INFO -- #1995263521 Features                             5          65         8          3          -          -
+TrigSignatureMoniMT                                INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520
+TrigSignatureMoniMT                                INFO -- #939763520 Events          6          6          5          5          5          3          -          -          3
+TrigSignatureMoniMT                                INFO -- #939763520 Features                              5          65         8          3          -          -
 TrigSignatureMoniMT                                INFO HLT_e26_lhtight_nod0_L1EM24VHI #4227411116
 TrigSignatureMoniMT                                INFO -- #4227411116 Events         6          6          5          5          5          3          -          -          3
 TrigSignatureMoniMT                                INFO -- #4227411116 Features                             5          65         8          3          -          -
-TrigSignatureMoniMT                                INFO HLT_e300_etcut_L1EM24VHI #3481091923
-TrigSignatureMoniMT                                INFO -- #3481091923 Events         6          6          0          0          0          -          -          -          0
-TrigSignatureMoniMT                                INFO -- #3481091923 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                INFO HLT_e300_etcut_L1EM22VHI #2128128255
+TrigSignatureMoniMT                                INFO -- #2128128255 Events         6          6          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                INFO -- #2128128255 Features                             0          0          0          -          -          -
+TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_mu26_L1EM8I_MU10 #2209076666
+TrigSignatureMoniMT                                INFO -- #2209076666 Events         5          5          5          2          2          2          -          -          2
+TrigSignatureMoniMT                                INFO -- #2209076666 Features                             5          2          2          2          -          -
 TrigSignatureMoniMT                                INFO HLT_e3_etcut1step_mu6fast_L1EM8I_MU10 #2086577378
 TrigSignatureMoniMT                                INFO -- #2086577378 Events         5          5          5          -          -          -          -          -          5
 TrigSignatureMoniMT                                INFO -- #2086577378 Features                             5          -          -          -          -          -
@@ -100,24 +115,36 @@ TrigSignatureMoniMT                                INFO -- #176627878 Features
 TrigSignatureMoniMT                                INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                INFO -- #2758326765 Events         20         20         16         16         16         3          -          -          3
 TrigSignatureMoniMT                                INFO -- #2758326765 Features                             45         516        84         4          -          -
-TrigSignatureMoniMT                                INFO HLT_e60_lhmedium_L1EM24VHI #713054523
-TrigSignatureMoniMT                                INFO -- #713054523 Events          6          6          2          2          2          2          -          -          2
-TrigSignatureMoniMT                                INFO -- #713054523 Features                              2          34         4          2          -          -
-TrigSignatureMoniMT                                INFO HLT_e60_lhmedium_nod0_L1EM24VHI #756001976
-TrigSignatureMoniMT                                INFO -- #756001976 Events          6          6          2          2          2          2          -          -          2
-TrigSignatureMoniMT                                INFO -- #756001976 Features                              2          34         4          2          -          -
+TrigSignatureMoniMT                                INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
+TrigSignatureMoniMT                                INFO -- #1690619419 Events         20         20         16         16         16         3          -          -          3
+TrigSignatureMoniMT                                INFO -- #1690619419 Features                             45         516        84         4          -          -
+TrigSignatureMoniMT                                INFO HLT_e60_lhmedium_L1EM22VHI #298591874
+TrigSignatureMoniMT                                INFO -- #298591874 Events          6          6          2          2          2          2          -          -          2
+TrigSignatureMoniMT                                INFO -- #298591874 Features                              2          34         4          2          -          -
+TrigSignatureMoniMT                                INFO HLT_e60_lhmedium_nod0_L1EM22VHI #4115486024
+TrigSignatureMoniMT                                INFO -- #4115486024 Events         6          6          2          2          2          2          -          -          2
+TrigSignatureMoniMT                                INFO -- #4115486024 Features                             2          34         4          2          -          -
 TrigSignatureMoniMT                                INFO HLT_e7_etcut_L1EM3 #1959043579
 TrigSignatureMoniMT                                INFO -- #1959043579 Events         20         20         20         20         20         -          -          -          20
 TrigSignatureMoniMT                                INFO -- #1959043579 Features                             89         1136       112        -          -          -
+TrigSignatureMoniMT                                INFO HLT_e7_lhmedium_mu24_L1MU20 #2970063918
+TrigSignatureMoniMT                                INFO -- #2970063918 Events         8          8          7          5          5          1          -          -          1
+TrigSignatureMoniMT                                INFO -- #2970063918 Features                             9          72         14         1          -          -
+TrigSignatureMoniMT                                INFO HLT_g140_etcut_L1EM22VHI #3879926061
+TrigSignatureMoniMT                                INFO -- #3879926061 Events         6          6          0          0          0          -          -          -          0
+TrigSignatureMoniMT                                INFO -- #3879926061 Features                             0          0          0          -          -          -
 TrigSignatureMoniMT                                INFO HLT_g140_etcut_L1EM24VHI #1045486446
 TrigSignatureMoniMT                                INFO -- #1045486446 Events         6          6          0          0          0          -          -          -          0
 TrigSignatureMoniMT                                INFO -- #1045486446 Features                             0          0          0          -          -          -
-TrigSignatureMoniMT                                INFO HLT_g140_loose_L1EM24VHI #3534544568
-TrigSignatureMoniMT                                INFO -- #3534544568 Events         6          6          0          0          0          0          -          -          0
-TrigSignatureMoniMT                                INFO -- #3534544568 Features                             0          0          0          0          -          -
+TrigSignatureMoniMT                                INFO HLT_g140_loose_L1EM22VHI #1776910226
+TrigSignatureMoniMT                                INFO -- #1776910226 Events         6          6          0          0          0          0          -          -          0
+TrigSignatureMoniMT                                INFO -- #1776910226 Features                             0          0          0          0          -          -
 TrigSignatureMoniMT                                INFO HLT_g20_etcut_LArPEB_L1EM15 #2706532790
 TrigSignatureMoniMT                                INFO -- #2706532790 Events         14         14         14         14         12         12         -          -          12
 TrigSignatureMoniMT                                INFO -- #2706532790 Features                             24         24         22         20         -          -
+TrigSignatureMoniMT                                INFO HLT_g25_medium_mu24_ivarmedium_L1MU20 #1007052793
+TrigSignatureMoniMT                                INFO -- #1007052793 Events         8          8          2          1          1          1          0          -          0
+TrigSignatureMoniMT                                INFO -- #1007052793 Features                             2          1          3          1          0          -
 TrigSignatureMoniMT                                INFO HLT_g35_medium_g25_medium_L12EM20VH #1158879722
 TrigSignatureMoniMT                                INFO -- #1158879722 Events         2          2          0          0          0          0          -          -          0
 TrigSignatureMoniMT                                INFO -- #1158879722 Features                             0          0          0          0          -          -
@@ -178,6 +205,9 @@ TrigSignatureMoniMT                                INFO -- #3295122398 Features
 TrigSignatureMoniMT                                INFO HLT_j45_ftf_L1J15 #868405538
 TrigSignatureMoniMT                                INFO -- #868405538 Events          20         20         19         -          -          -          -          -          19
 TrigSignatureMoniMT                                INFO -- #868405538 Features                              50         -          -          -          -          -
+TrigSignatureMoniMT                                INFO HLT_j45_ftf_csskpf_nojcalib_L1J20 #3533281867
+TrigSignatureMoniMT                                INFO -- #3533281867 Events         19         19         19         -          -          -          -          -          19
+TrigSignatureMoniMT                                INFO -- #3533281867 Features                             64         -          -          -          -          -
 TrigSignatureMoniMT                                INFO HLT_j45_ftf_pf_L1J20 #1335156103
 TrigSignatureMoniMT                                INFO -- #1335156103 Events         19         19         16         -          -          -          -          -          16
 TrigSignatureMoniMT                                INFO -- #1335156103 Features                             31         -          -          -          -          -
@@ -365,8 +395,8 @@ TrigSignatureMoniMT                                INFO HLT_tau25_medium1_trackt
 TrigSignatureMoniMT                                INFO -- #1433975745 Events         14         14         12         11         3          -          -          -          3
 TrigSignatureMoniMT                                INFO -- #1433975745 Features                             22         15         3          -          -          -
 TrigSignatureMoniMT                                INFO HLT_tau25_mediumRNN_tracktwoMVA_L1TAU12IM #2222894847
-TrigSignatureMoniMT                                INFO -- #2222894847 Events         14         14         12         11         6          -          -          -          6
-TrigSignatureMoniMT                                INFO -- #2222894847 Features                             22         15         6          -          -          -
+TrigSignatureMoniMT                                INFO -- #2222894847 Events         14         14         12         11         7          -          -          -          7
+TrigSignatureMoniMT                                INFO -- #2222894847 Features                             22         15         7          -          -          -
 TrigSignatureMoniMT                                INFO HLT_tau25_mediumRNN_tracktwo_L1TAU12IM #698603885
 TrigSignatureMoniMT                                INFO -- #698603885 Events          14         14         12         11         0          -          -          -          0
 TrigSignatureMoniMT                                INFO -- #698603885 Features                              22         15         0          -          -          -
@@ -377,8 +407,8 @@ TrigSignatureMoniMT                                INFO HLT_tau25_perf_tracktwo_
 TrigSignatureMoniMT                                INFO -- #1129072492 Events         14         14         14         13         13         -          -          -          13
 TrigSignatureMoniMT                                INFO -- #1129072492 Features                             24         17         17         -          -          -
 TrigSignatureMoniMT                                INFO HLT_tau25_tightRNN_tracktwoMVA_L1TAU12IM #2472860683
-TrigSignatureMoniMT                                INFO -- #2472860683 Events         14         14         12         11         5          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #2472860683 Features                             22         15         5          -          -          -
+TrigSignatureMoniMT                                INFO -- #2472860683 Events         14         14         12         11         4          -          -          -          4
+TrigSignatureMoniMT                                INFO -- #2472860683 Features                             22         15         4          -          -          -
 TrigSignatureMoniMT                                INFO HLT_tau25_tightRNN_tracktwo_L1TAU12IM #2537544560
 TrigSignatureMoniMT                                INFO -- #2537544560 Events         14         14         12         11         0          -          -          -          0
 TrigSignatureMoniMT                                INFO -- #2537544560 Features                             22         15         0          -          -          -
@@ -389,8 +419,11 @@ TrigSignatureMoniMT                                INFO HLT_tau25_verylooseRNN_t
 TrigSignatureMoniMT                                INFO -- #1275052132 Events         14         14         12         11         0          -          -          -          0
 TrigSignatureMoniMT                                INFO -- #1275052132 Features                             22         15         0          -          -          -
 TrigSignatureMoniMT                                INFO HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM #2456480859
-TrigSignatureMoniMT                                INFO -- #2456480859 Events         14         14         11         10         5          -          -          -          5
-TrigSignatureMoniMT                                INFO -- #2456480859 Features                             20         14         5          -          -          -
+TrigSignatureMoniMT                                INFO -- #2456480859 Events         14         14         11         10         6          -          -          -          6
+TrigSignatureMoniMT                                INFO -- #2456480859 Features                             20         14         6          -          -          -
+TrigSignatureMoniMT                                INFO HLT_tilecalib_laser_TilePEB_L1CALREQ2 #1063154655
+TrigSignatureMoniMT                                INFO -- #1063154655 Events         0          0          0          -          -          -          -          -          0
+TrigSignatureMoniMT                                INFO -- #1063154655 Features                             0          -          -          -          -          -
 TrigSignatureMoniMT                                INFO HLT_xe100_mht_L1XE50 #532175988
 TrigSignatureMoniMT                                INFO -- #532175988 Events          10         10         6          -          -          -          -          -          6
 TrigSignatureMoniMT                                INFO -- #532175988 Features                              6          -          -          -          -          -
diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
index 6827578b85e31822ad17e9f803333dbf4f9af590..305e6d09a5ed9a7ddc3adb8d936410816500179a 100644
--- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
+++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref
@@ -3,6 +3,9 @@ TrigSignatureMoniMT                                 INFO Sequence stepTrkCount (
 TrigSignatureMoniMT                                 INFO HLT_2e17_etcut_L12EM15VH #3136730292
 TrigSignatureMoniMT                                 INFO -- #3136730292 Events         20         20         0          0          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #3136730292 Features                             0          0          0          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_2e17_lhvloose_L12EM15VH #2280638160
+TrigSignatureMoniMT                                 INFO -- #2280638160 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2280638160 Features                             0          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_2e17_lhvloose_L12EM3 #1767768251
 TrigSignatureMoniMT                                 INFO -- #1767768251 Events         20         20         0          0          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1767768251 Features                             0          0          0          0          -          -          
@@ -72,24 +75,36 @@ TrigSignatureMoniMT                                 INFO -- #3989372080 Features
 TrigSignatureMoniMT                                 INFO HLT_costmonitor_CostMonDS_L1All #843341480
 TrigSignatureMoniMT                                 INFO -- #843341480 Events          20         20         20         -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #843341480 Features                              20         -          -          -          -          -          
-TrigSignatureMoniMT                                 INFO HLT_e140_lhloose_L1EM24VHI #2512605388
-TrigSignatureMoniMT                                 INFO -- #2512605388 Events         20         20         0          0          0          0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2512605388 Features                             0          0          0          0          -          -          
-TrigSignatureMoniMT                                 INFO HLT_e140_lhloose_nod0_L1EM24VHI #2532156734
-TrigSignatureMoniMT                                 INFO -- #2532156734 Events         20         20         0          0          0          0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #2532156734 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e140_lhloose_L1EM22VHI #3471067710
+TrigSignatureMoniMT                                 INFO -- #3471067710 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #3471067710 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e140_lhloose_nod0_L1EM22VHI #4128870680
+TrigSignatureMoniMT                                 INFO -- #4128870680 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #4128870680 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e17_lhloose_mu14_L1EM15VH_MU10 #899946230
+TrigSignatureMoniMT                                 INFO -- #899946230 Events          20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #899946230 Features                              0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e17_lhvloose_nod0_L1EM15VH #140779220
+TrigSignatureMoniMT                                 INFO -- #140779220 Events          20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #140779220 Features                              0          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e26_etcut_L1EM22VHI #1703681121
 TrigSignatureMoniMT                                 INFO -- #1703681121 Events         20         20         1          1          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1703681121 Features                             1          3          0          -          -          -          
-TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_L1EM24VHI #3494457106
-TrigSignatureMoniMT                                 INFO -- #3494457106 Events         20         20         0          0          0          0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3494457106 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_L1EM22VHI #1995263521
+TrigSignatureMoniMT                                 INFO -- #1995263521 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #1995263521 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_nod0_L1EM22VHI #939763520
+TrigSignatureMoniMT                                 INFO -- #939763520 Events          20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #939763520 Features                              0          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e26_lhtight_nod0_L1EM24VHI #4227411116
 TrigSignatureMoniMT                                 INFO -- #4227411116 Events         20         20         0          0          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #4227411116 Features                             0          0          0          0          -          -          
-TrigSignatureMoniMT                                 INFO HLT_e300_etcut_L1EM24VHI #3481091923
-TrigSignatureMoniMT                                 INFO -- #3481091923 Events         20         20         0          0          0          -          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3481091923 Features                             0          0          0          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e300_etcut_L1EM22VHI #2128128255
+TrigSignatureMoniMT                                 INFO -- #2128128255 Events         20         20         0          0          0          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2128128255 Features                             0          0          0          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e3_etcut1step_mu26_L1EM8I_MU10 #2209076666
+TrigSignatureMoniMT                                 INFO -- #2209076666 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2209076666 Features                             0          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e3_etcut1step_mu6fast_L1EM8I_MU10 #2086577378
 TrigSignatureMoniMT                                 INFO -- #2086577378 Events         20         20         0          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #2086577378 Features                             0          -          -          -          -          -          
@@ -100,32 +115,44 @@ TrigSignatureMoniMT                                 INFO HLT_e5_etcut_L1EM3 #324
 TrigSignatureMoniMT                                 INFO -- #324908483 Events          20         20         13         13         13         -          -          -          13         
 TrigSignatureMoniMT                                 INFO -- #324908483 Features                              41         141        47         -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhloose_noringer_L1EM3 #1053337356
-TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         10         10         10         0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             15         48         29         0          -          -          
+TrigSignatureMoniMT                                 INFO -- #1053337356 Events         20         20         10         10         10        1          -          -         1          
+TrigSignatureMoniMT                                 INFO -- #1053337356 Features                             15         48         29        1          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhmedium_noringer_L1EM3 #176627878
 TrigSignatureMoniMT                                 INFO -- #176627878 Events          20         20         9          9          9          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #176627878 Features                              13         49         28         0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_L1EM3 #2758326765
 TrigSignatureMoniMT                                 INFO -- #2758326765 Events         20         20         9          9          9          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #2758326765 Features                             13         49         28         0          -          -          
-TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM24VHI #713054523
-TrigSignatureMoniMT                                 INFO -- #713054523 Events          20         20         0          0          0          0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #713054523 Features                              0          0          0          0          -          -          
-TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_nod0_L1EM24VHI #756001976
-TrigSignatureMoniMT                                 INFO -- #756001976 Events          20         20         0          0          0          0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #756001976 Features                              0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e5_lhtight_noringer_nod0_L1EM3 #1690619419
+TrigSignatureMoniMT                                 INFO -- #1690619419 Events         20         20         9          9          9          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #1690619419 Features                             13         49         28         0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_L1EM22VHI #298591874
+TrigSignatureMoniMT                                 INFO -- #298591874 Events          20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #298591874 Features                              0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e60_lhmedium_nod0_L1EM22VHI #4115486024
+TrigSignatureMoniMT                                 INFO -- #4115486024 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #4115486024 Features                             0          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_e7_etcut_L1EM3 #1959043579
 TrigSignatureMoniMT                                 INFO -- #1959043579 Events         20         20         13         13         11         -          -          -          11         
 TrigSignatureMoniMT                                 INFO -- #1959043579 Features                             26         90         20         -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_e7_lhmedium_mu24_L1MU20 #2970063918
+TrigSignatureMoniMT                                 INFO -- #2970063918 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #2970063918 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g140_etcut_L1EM22VHI #3879926061
+TrigSignatureMoniMT                                 INFO -- #3879926061 Events         20         20         0          0          0          -          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #3879926061 Features                             0          0          0          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g140_etcut_L1EM24VHI #1045486446
 TrigSignatureMoniMT                                 INFO -- #1045486446 Events         20         20         0          0          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1045486446 Features                             0          0          0          -          -          -          
-TrigSignatureMoniMT                                 INFO HLT_g140_loose_L1EM24VHI #3534544568
-TrigSignatureMoniMT                                 INFO -- #3534544568 Events         20         20         0          0          0          0          -          -          0          
-TrigSignatureMoniMT                                 INFO -- #3534544568 Features                             0          0          0          0          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g140_loose_L1EM22VHI #1776910226
+TrigSignatureMoniMT                                 INFO -- #1776910226 Events         20         20         0          0          0          0          -          -          0          
+TrigSignatureMoniMT                                 INFO -- #1776910226 Features                             0          0          0          0          -          -          
 TrigSignatureMoniMT                                 INFO HLT_g20_etcut_LArPEB_L1EM15 #2706532790
 TrigSignatureMoniMT                                 INFO -- #2706532790 Events         20         20         4          4          3          3          -          -          3          
 TrigSignatureMoniMT                                 INFO -- #2706532790 Features                             5          5          4          4          -          -          
+TrigSignatureMoniMT                                 INFO HLT_g25_medium_mu24_ivarmedium_L1MU20 #1007052793
+TrigSignatureMoniMT                                 INFO -- #1007052793 Events         20         20         0          0          0          0          0          -          0          
+TrigSignatureMoniMT                                 INFO -- #1007052793 Features                             0          0          0          0          0          -          
 TrigSignatureMoniMT                                 INFO HLT_g35_medium_g25_medium_L12EM20VH #1158879722
 TrigSignatureMoniMT                                 INFO -- #1158879722 Events         20         20         0          0          0          0          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1158879722 Features                             0          0          0          0          -          -          
@@ -186,6 +213,9 @@ TrigSignatureMoniMT                                 INFO -- #3295122398 Features
 TrigSignatureMoniMT                                 INFO HLT_j45_ftf_L1J15 #868405538
 TrigSignatureMoniMT                                 INFO -- #868405538 Events          20         20         6          -          -          -          -          -          6          
 TrigSignatureMoniMT                                 INFO -- #868405538 Features                              6          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_j45_ftf_csskpf_nojcalib_L1J20 #3533281867
+TrigSignatureMoniMT                                 INFO -- #3533281867 Events         20         20         3          -          -          -          -          -          3          
+TrigSignatureMoniMT                                 INFO -- #3533281867 Features                             3          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_j45_ftf_pf_L1J20 #1335156103
 TrigSignatureMoniMT                                 INFO -- #1335156103 Events         20         20         5          -          -          -          -          -          5          
 TrigSignatureMoniMT                                 INFO -- #1335156103 Features                             5          -          -          -          -          -          
@@ -456,6 +486,33 @@ TrigSignatureMoniMT                                 INFO -- #225440053 Features
 TrigSignatureMoniMT                                 INFO HLT_noalg_L1XE80 #2742079961
 TrigSignatureMoniMT                                 INFO -- #2742079961 Events         20         20         -          -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #2742079961 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1EM3_EMPTY #2458124284
+TrigSignatureMoniMT                                 INFO -- #2458124284 Events         20         20         -          -          -          -          -          -          15         
+TrigSignatureMoniMT                                 INFO -- #2458124284 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1EM7_EMPTY #299938202
+TrigSignatureMoniMT                                 INFO -- #299938202 Events          20         20         -          -          -          -          -          -          9          
+TrigSignatureMoniMT                                 INFO -- #299938202 Features                              -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J12_EMPTY #3144024902
+TrigSignatureMoniMT                                 INFO -- #3144024902 Events         20         20         -          -          -          -          -          -          8          
+TrigSignatureMoniMT                                 INFO -- #3144024902 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J12_FIRSTEMPTY #3840098930
+TrigSignatureMoniMT                                 INFO -- #3840098930 Events         20         20         -          -          -          -          -          -          8          
+TrigSignatureMoniMT                                 INFO -- #3840098930 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J30_31ETA49_EMPTY #4143623058
+TrigSignatureMoniMT                                 INFO -- #4143623058 Events         20         20         -          -          -          -          -          -          1          
+TrigSignatureMoniMT                                 INFO -- #4143623058 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J30_EMPTY #2991490897
+TrigSignatureMoniMT                                 INFO -- #2991490897 Events         20         20         -          -          -          -          -          -          4          
+TrigSignatureMoniMT                                 INFO -- #2991490897 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1J30_FIRSTEMPTY #2214697960
+TrigSignatureMoniMT                                 INFO -- #2214697960 Events         20         20         -          -          -          -          -          -          4          
+TrigSignatureMoniMT                                 INFO -- #2214697960 Features                             -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1RD1_BGRP10 #48519027
+TrigSignatureMoniMT                                 INFO -- #48519027 Events           20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #48519027 Features                               -          -          -          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_noalg_cosmiccalo_L1RD1_EMPTY #3925252528
+TrigSignatureMoniMT                                 INFO -- #3925252528 Events         20         20         -          -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #3925252528 Features                             -          -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_sct_noise_SCTPEB_L1RD0_EMPTY #3024203296
 TrigSignatureMoniMT                                 INFO -- #3024203296 Events         20         20         20         -          -          -          -          -          20         
 TrigSignatureMoniMT                                 INFO -- #3024203296 Features                             20         -          -          -          -          -          
@@ -511,8 +568,8 @@ TrigSignatureMoniMT                                 INFO HLT_tau25_medium1_track
 TrigSignatureMoniMT                                 INFO -- #1433975745 Events         20         20         3          3          1          -          -          -          1          
 TrigSignatureMoniMT                                 INFO -- #1433975745 Features                             4          3          1          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_tau25_mediumRNN_tracktwoMVA_L1TAU12IM #2222894847
-TrigSignatureMoniMT                                 INFO -- #2222894847 Events         20         20         3          3          1          -          -          -          1          
-TrigSignatureMoniMT                                 INFO -- #2222894847 Features                             4          3          1          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2222894847 Events         20         20         3          3          2          -          -          -          2          
+TrigSignatureMoniMT                                 INFO -- #2222894847 Features                             4          3          2          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_tau25_mediumRNN_tracktwo_L1TAU12IM #698603885
 TrigSignatureMoniMT                                 INFO -- #698603885 Events          20         20         3          3          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #698603885 Features                              4          3          0          -          -          -          
@@ -535,8 +592,11 @@ TrigSignatureMoniMT                                 INFO HLT_tau25_verylooseRNN_
 TrigSignatureMoniMT                                 INFO -- #1275052132 Events         20         20         3          3          0          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #1275052132 Features                             4          3          0          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_tau35_mediumRNN_tracktwoMVA_L1TAU12IM #2456480859
-TrigSignatureMoniMT                                 INFO -- #2456480859 Events         20         20         3          3          1          -          -          -          1          
-TrigSignatureMoniMT                                 INFO -- #2456480859 Features                             4          3          1          -          -          -          
+TrigSignatureMoniMT                                 INFO -- #2456480859 Events         20         20         3          3          2          -          -          -          2          
+TrigSignatureMoniMT                                 INFO -- #2456480859 Features                             4          3          2          -          -          -          
+TrigSignatureMoniMT                                 INFO HLT_tilecalib_laser_TilePEB_L1CALREQ2 #1063154655
+TrigSignatureMoniMT                                 INFO -- #1063154655 Events         20         20         20         -          -          -          -          -          20         
+TrigSignatureMoniMT                                 INFO -- #1063154655 Features                             20         -          -          -          -          -          
 TrigSignatureMoniMT                                 INFO HLT_timeburner_L1All #819160059
 TrigSignatureMoniMT                                 INFO -- #819160059 Events          20         20         0          -          -          -          -          -          0          
 TrigSignatureMoniMT                                 INFO -- #819160059 Features                              0          -          -          -          -          -          
diff --git a/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDO.py b/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDO.py
index 4116ed38364026cbd591ccc07ed55e99f4b51d4c..a724c1bb4b7ae9dd4c667fb3dabe63c811138ceb 100644
--- a/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDO.py
+++ b/Trigger/TrigValidation/TriggerTest/share/testCommonSliceAthenaTrigRDO.py
@@ -173,6 +173,10 @@ if 'enableCostMonitoring' in dir() and bool(enableCostMonitoring) == True:
 
 #-----------------------------------------------------------
 include("RecExCommon/RecExCommon_topOptions.py")
+from AthenaCommon.AlgSequence import AlgSequence
+condSeq = AthSequencer("AthCondSeq")
+if not hasattr( condSeq, "LumiBlockMuWriter" ):
+    include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
 #-----------------------------------------------------------
 # post set up trigger monitoring
 if 'enableCostMonitoring' in dir() and bool(enableCostMonitoring) == True:
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py
index d83421415bd22de8cce78f11a835487d92f4480d..1c03c7fb7555bdcbb31ac4330ee5d6109ce7eb70 100755
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py
@@ -559,3 +559,8 @@ if not TriggerFlags.Online.doValidation():  # Suppress this printout in ATN test
     jobproperties.print_JobProperties('tree&value')
     print(AlgSequence)
     print(ServiceMgr)
+
+#-------------------------------------------------------------
+# Enable xAOD::EventInfo decorations for pileup values
+#-------------------------------------------------------------
+include ("LumiBlockComps/LumiBlockMuWriter_jobOptions.py")
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py
index e51bb3d334c5a565c4dc38bafac6c57d6a342cc9..8b80a101062ea278df6c8fd270865ae796bcc2b1 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/Physics_pp_v7_primaries.py
@@ -351,9 +351,10 @@ def setupMenu():
         ['e9_lhvloose_nod0_L1EM7',                    'L1_EM7',    [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
 
         # ATR-21242 - with L1 in the name, for validation with MT
-        ['g140_loose_L1EM24VHI',                  'L1_EM24VHI', [], [PhysicsStream], ['RATE:SinglePhoton','BW:Egamma'],-1],
+        ['g140_loose_L1EM22VHI',                  'L1_EM22VHI', [], [PhysicsStream], ['RATE:SinglePhoton','BW:Egamma'],-1],
         ['2g20_tight_L12EM20VH',                  'L1_2EM20VH', [], [PhysicsStream], ['RATE:MultiPhoton', 'BW:Egamma'],-1],
         ['e5_lhtight_nod0_L1EM3',                 'L1_EM3',     [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
+        ['e5_lhtight_noringer_nod0_L1EM3',        'L1_EM3',     [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
         ['e17_lhvloose_nod0_L1EM15VH',            'L1_EM15VH',  [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
         ['e26_lhtight_nod0_L1EM22VHI',            'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
         ['e26_lhtight_nod0_ivarloose_L1EM22VHI',  'L1_EM22VHI', [], [PhysicsStream], ['RATE:SingleElectron', 'BW:Egamma'],-1],
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py
index 8069fac44fd91275cbd6ca74cc3ddeb60653bc42..e9dfb0e8c16eb5a2ffde6601e4f397cf1a8e7026 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/menu/SignatureDicts.py
@@ -375,7 +375,7 @@ ElectronChainParts = {
     'caloInfo'       : ['L2EFCalo','HLTCalo'],
     'lhInfo'         : ['cutd0dphideta','nod0','nodphires','nodeta','smooth'],
     'L2IDAlg'        : ['L2StarA','L2StarB','L2StarC','FTK','TRT','SiTrack','IdScan'],
-    'addInfo'        : ['etcut','ringer','conv','etisem','gsf','trkcut',
+    'addInfo'        : ['etcut','ringer','noringer', 'conv','etisem','gsf','trkcut',
                         'L2Star','perf','IdTest'],
     }
 # ---- Egamma Dictinary of default Values ----
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
index 06e9ffa2a66625ad54f7b4094825632b23feae5a..0bcee22e3baaa7bb8d344cd3704428b71b831ed6 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
@@ -53,7 +53,14 @@ def bJetStep1Sequence():
     jetSelector.OutputJets = recordable( outputJetName )
     jetSelector.OutputRoi = outputRoIName
 
-    bJetEtSequence = seqAND( "bJetEtSequence",[jetSelector] )
+    #BEN
+    import AthenaCommon.CfgMgr as CfgMgr
+    bJetEtVDV = CfgMgr.AthViews__ViewDataVerifier( "bJetEtVDV" )
+    bJetEtVDV.DataObjects = [( 'xAOD::VertexContainer' , 'StoreGateSvc+HLT_EFHistoPrmVtx' ),
+                             ( 'xAOD::JetContainer' , 'StoreGateSvc+HLT_AntiKt4EMTopoJets_subjesgscIS_ftf' )]
+    #END BEN
+
+    bJetEtSequence = seqAND( "bJetEtSequence", [bJetEtVDV, jetSelector] )
     InputMakerAlg.ViewNodeName = "bJetEtSequence"
 
     # Sequence
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetTrackingConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetTrackingConfiguration.py
index d0852ba73f3ee5f7dec5de2f0e9802d86a19b861..3ceaf27a19f2ffae3570febee74e783db3af3870 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetTrackingConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetTrackingConfiguration.py
@@ -8,7 +8,21 @@ def getSecondStageBjetTracking( inputRoI ):
 
     # Second stage of Fast tracking (for precision tracking preparation)
     from TrigInDetConfig.InDetSetup import makeInDetAlgs
-    viewAlgs = makeInDetAlgs( whichSignature='Jet',separateTrackParticleCreator="_Bjet", rois=inputRoI )
+    viewAlgs, viewVerify = makeInDetAlgs( whichSignature='Jet',separateTrackParticleCreator="_Bjet", rois=inputRoI )
+
+    viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+' + inputRoI ),
+                               ( 'xAOD::VertexContainer' , 'StoreGateSvc+HLT_EFHistoPrmVtx' ),
+                               ( 'xAOD::JetContainer' , 'StoreGateSvc+InViewJets' )]
+
+    # Make sure the required objects are still available at whole-event level
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
+      from AthenaCommon.AlgSequence import AlgSequence
+      topSequence = AlgSequence()
+      topSequence.SGInputLoader.Load += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                         ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+      viewVerify.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                 ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
 
     algSequence.append( seqAND("SecondStageFastTrackingSequence",viewAlgs) )
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py
index 59fddf42bc7259360e9afef17a09a1ded7ea7127..553ee533e2ec9e805dc07a19857b0d192f4273e5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/BeamspotChainConfiguration.py
@@ -31,9 +31,18 @@ def allTE_trkfast():
         inputMakerAlg.Views = "beamspotViewRoIs"
 
         from TrigInDetConfig.InDetSetup import makeInDetAlgs
-        viewAlgs = makeInDetAlgs(whichSignature='FS', rois=inputMakerAlg.InViewRoIs)
+        viewAlgs, viewVerify = makeInDetAlgs(whichSignature='FS', rois=inputMakerAlg.InViewRoIs)
         from TrigT2BeamSpot.T2VertexBeamSpotConfig import T2VertexBeamSpot_activeAllTE
         T2VertexBeamSpot_activeAllTE.TrackCollections = ["TrigFastTrackFinder_Tracks_FS"]
+
+        viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+beamspotInputRoIs' ),
+                                   ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+
+        # Make sure the event info is still available at whole-event level
+        from AthenaCommon.AlgSequence import AlgSequence
+        topSequence = AlgSequence()
+        topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+
         beamspotSequence = seqAND("beamspotSequence",viewAlgs+[T2VertexBeamSpot_activeAllTE()])
         inputMakerAlg.ViewNodeName = beamspotSequence.name()
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/CosmicChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/CosmicChainConfiguration.py
index ee73b6fd2d9db68c22e1fbb61d79772b51455116..333d56e5cdd5f689e751cc922aa05e4294df2056 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/CosmicChainConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/CosmicChainConfiguration.py
@@ -2,7 +2,7 @@
 
 from AthenaCommon.Logging import logging
 logging.getLogger().info("Importing %s",__name__)
-log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.BeamspotChainConfiguration")
+log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.CosmicChainConfiguration")
 
 from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
 
@@ -23,7 +23,8 @@ class CosmicChainConfiguration(ChainConfigurationBase):
         # define here the names of the steps and obtain the chainStep configuration 
         # --------------------
         stepDictionary = {
-            "sct_noise":[]
+            "sct_noise":[],
+            "tilecalib_laser" : []
         }
 
         key = self.chainPart['chainPartName']
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py
index d4afe0c8f8245de39cfc091ad2cd27d0216ee44a..bc324550b3253a8dc9dda96df5d230df60cfc6c5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/GenerateCosmicChainDefs.py
@@ -13,9 +13,6 @@ log.info("Importing %s",__name__)
 
 def generateChainConfigs( chainDict ):
 
-    import pprint
-    pprint.pprint( chainDict )
-
     listOfChainDicts = splitChainDict(chainDict)
     log.debug("Will generate Config for streamer: ",chainDict['chainName'])
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py
index a856ca83967518dd8adba7dd44813ce8b81d3c8e..cf8f4b3dec84733af8425ad48ae12a921519c83b 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/EventBuildingSequenceSetup.py
@@ -74,6 +74,20 @@ def pebInfoWriterTool(name, eventBuildType):
                          SubDetector.SCT_ENDCAP_A_SIDE,
                          SubDetector.SCT_ENDCAP_C_SIDE
         ])
+    elif 'TilePEB' in eventBuildType:
+        tool = StaticPEBInfoWriterToolCfg(name)
+        tool.addSubDets([SubDetector.TILECAL_LASER_CRATE,
+                         SubDetector.TILECAL_BARREL_A_SIDE,
+                         SubDetector.TILECAL_BARREL_C_SIDE,
+                         SubDetector.TILECAL_EXT_A_SIDE,
+                         SubDetector.TILECAL_EXT_C_SIDE,
+                         SubDetector.TDAQ_CTP,
+                         SubDetector.TDAQ_CALO_PREPROC, # = 0x71
+                         SubDetector.TDAQ_CALO_CLUSTER_PROC_DAQ, # = 0x72
+                         SubDetector.TDAQ_CALO_CLUSTER_PROC_ROI, # = 0x73
+                         SubDetector.TDAQ_CALO_JET_PROC_DAQ, # = 0x74
+                         SubDetector.TDAQ_CALO_JET_PROC_ROI # = 0x75
+        ])
     elif eventBuildType in DataScoutingInfo.getAllDataScoutingIdentifiers():
         # Pure DataScouting configuration
         tool = StaticPEBInfoWriterToolCfg(name)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index 037e16318f59aaa2c08aa3e5f4ecc0db83ecddfd..1d85c060d838e5e146ab3f6f9fd5d230471f5716 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -2,7 +2,6 @@
 #  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 #
 
-import AthenaCommon.CfgMgr as CfgMgr
 from AthenaConfiguration.AllConfigFlags import ConfigFlags
 
 # menu components   
@@ -20,14 +19,13 @@ def fastElectronSequence(ConfigFlags):
   
     from TrigInDetConfig.InDetSetup import makeInDetAlgs
     RoIs = "EMIDRoIs" # contract with the fastCalo
-    viewAlgs = makeInDetAlgs(whichSignature = "Electron", separateTrackParticleCreator="_Electron", rois = RoIs)
+    viewAlgs, ViewVerify = makeInDetAlgs(whichSignature = "Electron", separateTrackParticleCreator="_Electron", rois = RoIs)
 
     # A simple algorithm to confirm that data has been inherited from parent view
     # Required to satisfy data dependencies
     from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs  
-    ViewVerify = CfgMgr.AthViews__ViewDataVerifier("electronViewDataVerifier")
-    ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+'+ CaloMenuDefs.L2CaloClusters)]
-    viewAlgs.append(ViewVerify)
+    ViewVerify.DataObjects += [( 'xAOD::TrigEMClusterContainer' , 'StoreGateSvc+' + CaloMenuDefs.L2CaloClusters ),
+                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+EMIDRoIs' )]
     
     TrackParticlesName = ""
     for viewAlg in viewAlgs:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
index f488412f3169a0043dd34cf77e24d5ba900e8ea8..3924b8bbb3f923ce9a22846a75c18931e86c9d12 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonDef.py
@@ -97,6 +97,3 @@ class PhotonChainConfiguration(ChainConfigurationBase):
     def getPrecisionPhoton(self):
         stepName = "PhotonPrecision"
         return self.getStep(4,stepName,[ precisionPhotonSequenceCfg])
-
-        
-                
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
index bdfc11fa958d6e50c12ac79546f3a921da92b410..34c0e0c125b29205d769c794f8370fee6a704ebe 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
@@ -17,7 +17,8 @@ def fastPhotonMenuSequence():
     
     from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs
     ViewVerify = CfgMgr.AthViews__ViewDataVerifier("FastPhotonViewDataVerifier")
-    ViewVerify.DataObjects = [('xAOD::TrigEMClusterContainer','StoreGateSvc+'+ CaloMenuDefs.L2CaloClusters)]
+    ViewVerify.DataObjects = [( 'xAOD::TrigEMClusterContainer' , 'StoreGateSvc+' + CaloMenuDefs.L2CaloClusters ),
+                              ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+EMIDRoIs' )]
 
     from TrigEgammaHypo.TrigL2PhotonFexMTConfig import L2PhotonFex_1
     thePhotonFex= L2PhotonFex_1()
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
index c5fb21c3145c73a07709c150124132c1c6853b61..71124be5ccf1e48d7cef2b76cf746ff9445f13cb 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
@@ -27,25 +27,46 @@ def precisionElectronRecoSequence(RoIs):
     from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuDefs
     import AthenaCommon.CfgMgr as CfgMgr
 
-    ViewVerifyPrecisionCluster = CfgMgr.AthViews__ViewDataVerifier("precisionElectronClusterVerifier")
-    ViewVerifyPrecisionCluster.DataObjects = [('xAOD::CaloClusterContainer','StoreGateSvc+'+ precisionCaloMenuDefs.precisionCaloClusters)]
-
     ## Taking Fast Track information computed in 2nd step ##
     TrackCollection="TrigFastTrackFinder_Tracks_Electron"
     ViewVerifyTrk = CfgMgr.AthViews__ViewDataVerifier("FastTrackViewDataVerifier")
     
-    
-    ViewVerifyTrk.DataObjects = [('TrackCollection','StoreGateSvc+'+TrackCollection),
-                                 ('xAOD::CaloClusterContainer' , precisionCaloMenuDefs.precisionCaloClusters),
-                                 ('CaloCellContainer' , 'StoreGateSvc+CaloCells'),
-                                 ('SCT_FlaggedCondData','StoreGateSvc+SCT_FlaggedCondData_TRIG'),
-                                 ]
+    ViewVerifyTrk.DataObjects = [( 'TrackCollection' , 'StoreGateSvc+' + TrackCollection ),
+                                 ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+' + precisionCaloMenuDefs.precisionCaloClusters ),
+                                 ( 'CaloAffectedRegionInfoVec' , 'ConditionStore+LArAffectedRegionInfo' ),
+                                 ( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' ),
+                                 ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
+                                 ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                 ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+PixelClusterAmbiguitiesMap' ), # makeInDetPrecisionTracking should get this, but it doesn't
+                                 ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ), # Seems to be necessary, despite load below
+                                 ( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' ),
+                                 ( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs_EF' ),
+                                 ( 'InDet::TRT_DriftCircleContainer' , 'StoreGateSvc+TRT_DriftCircles' ),
+                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+precisionElectron' )]
+
+    # Make sure the required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                       ( 'CaloAffectedRegionInfoVec' , 'ConditionStore+LArAffectedRegionInfo' ),
+                                       ( 'InDet::PixelGangedClusterAmbiguities' , 'StoreGateSvc+PixelClusterAmbiguitiesMap' ),
+                                       ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
+
+    # This object must be loaded from SG if it's not loaded in conddb (algs request it but ignore)
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.folderRequested( "Cond/StatusHT" ):
+      ViewVerifyTrk.DataObjects += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
+      topSequence.SGInputLoader.Load += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
+    if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
+      ViewVerifyTrk.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                    ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+      topSequence.SGInputLoader.Load += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                         ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
     
     if globalflags.InputFormat.is_bytestream():
-       ViewVerifyTrk.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
+      ViewVerifyTrk.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
                                     ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ) ]
 
-    # AlgSequence.SGInputLoader.Load.append([ ('InDetBSErrContainer','StoreGateSvc+PixelByteStreamErrs') ])
     """ Precision Track Related Setup.... """
     PTAlgs = []
     PTTracks = []
@@ -61,7 +82,6 @@ def precisionElectronRecoSequence(RoIs):
     electronPrecisionTrack = parOR("electronPrecisionTrack")
     electronPrecisionTrack += ViewVerifyTrk
     electronPrecisionTrack += PTSeq
-    electronPrecisionTrack += ViewVerifyPrecisionCluster
 
     """ Retrieve the factories now """
     from TriggerMenuMT.HLTMenuConfig.Electron.TrigElectronFactories import TrigEgammaRecElectron, TrigElectronSuperClusterBuilder, TrigTopoEgammaElectronCfg
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
index a51f08c5e2d41714098b849e2e68d9e0fb175236..efe31ef61a6eb148516be9100485eed2d468ec9e 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
@@ -91,6 +91,8 @@ def jetRecoSequence( dummyFlags, dataSource, RoIs = 'FSJETRoI', **jetRecoDict):
 
         (ungroomedJetRecoSequence,ungroomedJetsName) = RecoFragmentsPool.retrieve(jetRecoSequence,None,dataSource=dataSource, **ungroomedJetRecoDict)
         recoSeq += conf2toConfigurable( ungroomedJetRecoSequence )
+        # Need to forward the pseudojets of the parents to the groomer
+        parentpjs = getattr(ungroomedJetRecoSequence,"jetalg_{}".format(ungroomedJetsName)).Tools[0].InputPseudoJets
 
         groomDef = JetRecoConfiguration.defineGroomedJets(jetRecoDict,ungroomedDef,ungroomedJetsName)
         groomedJetsFullName = jetNamePrefix+groomDef.basename+"Jets_"+jetRecoDict["jetCalib"]
@@ -99,7 +101,7 @@ def jetRecoSequence( dummyFlags, dataSource, RoIs = 'FSJETRoI', **jetRecoDict):
         # Can add substructure mods here
 
         from JetRecConfig.JetGroomConfig import getJetGroomAlg
-        groomalg = getJetGroomAlg(groomedJetsFullName,groomDef,groomedModList)
+        groomalg = getJetGroomAlg(groomedJetsFullName,groomDef,parentpjs,groomedModList)
         recoSeq += conf2toConfigurable( groomalg )
 
         sequenceOut = recordable(groomedJetsFullName)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py
index 1ddb3e812883f70f12eae13aa08660891cdb4914..3af1957034e44d5709fff01e1d49a42ffd598603 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetTrackingConfig.py
@@ -15,10 +15,9 @@ def JetTrackingSequence(dummyFlags,trkopt,RoIs):
     verticesname = ""
 
     if trkopt=="ftf":
-        from TrigInDetConfig.InDetSetup import makeInDetAlgs
+        from TrigInDetConfig.InDetSetup import makeInDetAlgsNoView
         # Guess FS rather than making it jet-specific?
-        viewAlgs = makeInDetAlgs( "JetFS", "_FS", rois=RoIs )
-        jetTrkSeq += viewAlgs
+        jetTrkSeq += makeInDetAlgsNoView( "JetFS", "_FS", rois=RoIs )
         tracksname = recordable("HLT_IDTrack_FS_FTF")
         verticesname = recordable("HLT_EFHistoPrmVtx")
 
@@ -39,17 +38,13 @@ def JetTrackingSequence(dummyFlags,trkopt,RoIs):
         trackcollectionmap[trkopt] = trkcolls
 
     # Jet track selection
-    jettrackselloose = getTrackSelTool(trkopt)
+    jettrackselloose = getTrackSelTool(trkopt,doWriteTracks=True)
     jettracksname = jettrackselloose.OutputContainer
     jettvassoc = getTrackVertexAssocTool(trkopt)
 
     trackcollectionmap[trkopt]["JetTracks"] = jettracksname
     trackcollectionmap[trkopt]["TVA"] = tvaname
 
-    #from JetRec import JetRecConf
-    #jettrkprepalg = JetRecConf.JetAlgorithm("jetalg_TrackPrep")
-
-
     jettrkprepalg = CompFactory.JetAlgorithm("jetalg_TrackPrep")
     jettrkprepalg.Tools = [ jettrackselloose, jettvassoc ]
     jetTrkSeq += conf2toConfigurable( jettrkprepalg )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py
index 7425df5cdff696320a34a24e5d1b86632d4a4602..2d4d2ce59c22751c2c7e0bae4c54d16fc9a9d29f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py
@@ -59,8 +59,10 @@ def checkVDV( inputNodes, ancestorNames, allEVCAs ):
                 if name in allEVCAs.keys():
 
                     # Check EVCA properties
-                    if not hasattr( allEVCAs[ name ], "RequireParentView" ) or not allEVCAs[ name ].RequireParentView:
-                        raise RuntimeError( "ViewDataVerifier alg " + node.name() + " has upstream EventViewCreatorAlgorithm " + allEVCAs[ name ].name() + " with RequireParentView = False" )
+                    parentAllowed = hasattr( allEVCAs[ name ], "RequireParentView" ) and allEVCAs[ name ].RequireParentView
+                    eventLevelAllowed = hasattr( allEVCAs[ name ], "ViewFallThrough" ) and allEVCAs[ name ].ViewFallThrough
+                    if not ( parentAllowed or eventLevelAllowed ):
+                        raise RuntimeError( "ViewDataVerifier alg " + node.name() + " has upstream EventViewCreatorAlgorithm " + allEVCAs[ name ].name() + " with no external data" )
                     foundEVCA = True
                     break
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
index 6bc773918f92afe1319658c38cacf73c53c3104e..13976b6f52a683038530e8955013820d7eb95292 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
@@ -50,30 +50,32 @@ def mergeParallel(chainDefList, offset):
         from itertools import zip_longest
     else:
         from itertools import izip_longest as zip_longest
+    # Use zip_longest so that we get None in case one chain has more steps than the other
     orderedSteps = list(zip_longest(*allSteps))
     myOrderedSteps = deepcopy(orderedSteps)
 
     combChainSteps =[]
-    for step_index, steps in enumerate(myOrderedSteps):
+    log.debug("len(myOrderedSteps): %d", len(myOrderedSteps))
+    for step_index, steps in enumerate(myOrderedSteps):        
         mySteps = list(steps)
-        combStep = makeChainSteps(mySteps, step_index+1)
+        log.debug("step_index %d", step_index)
+        log.debug(mySteps)
+        combStep = makeChainSteps(mySteps, step_index+1, chainDefList)
         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.debug("All chain parts have the same number of steps")
-    else:
-        log.debug("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("Parallel merged chain %s with these steps:", chainName)
     for step in combinedChainDef.steps:
-        log.debug('   %s', step)
+        log.info('   %s', step)
 
     return combinedChainDef
 
+def getEmptySeqName(stepName, chain_index, step_number):
+    seqName = stepName  +  '_leg' + str(chain_index) + '_EmptySeqStep' + str(step_number)
+    #seqName = 'EmptySeq' + str(step_number)
+    return seqName
+
 def serial_zip(allSteps, chainName):
     n_chains = len(allSteps)
     newsteps = []
@@ -90,7 +92,7 @@ def serial_zip(allSteps, chainName):
             # all other steps should contain an empty sequence
             for step_index2, emptyStep in enumerate(stepList):
                 if emptyStep is None:
-                    seqName = str(step.name)  +  '_leg' + str(chain_index) + '_EmptySeqStep' + str(step_index+1)
+                    seqName = getEmptySeqName(step.name, chain_index, step_index+1)
                     emptySeq = EmptyMenuSequence(seqName)
                     stepList[step_index2] = ChainStep( seqName, Sequences=[emptySeq], chainDicts=step.chainDicts)            
             
@@ -124,7 +126,7 @@ def mergeSerial(chainDefList):
     combChainSteps =[]
     for step_index, steps in enumerate(mySerialSteps):
         mySteps = list(steps)
-        combStep = makeChainSteps(mySteps, step_index+1)
+        combStep = makeChainSteps(mySteps, step_index+1, chainDefList)
         combChainSteps.append(combStep)
 
     # check if all chain parts have the same number of steps
@@ -143,7 +145,7 @@ def mergeSerial(chainDefList):
     return combinedChainDef
 
 
-def makeChainSteps(steps, stepNumber):
+def makeChainSteps(steps, stepNumber, chainDefList):
     from copy import deepcopy
     from TrigCompositeUtils.TrigCompositeUtils import legName
     stepName = 'merged_Step' + str(stepNumber)
@@ -151,36 +153,46 @@ def makeChainSteps(steps, stepNumber):
     stepMult = []
     log.verbose(" steps %s ", steps)
     stepDicts = []
-    count = 0
     comboHypoTools = []
 
-    for step in steps:
+    # this function only makes sense if we are merging steps corresponding to the chains in the chainDefList
+    assert len(chainDefList)==len(steps), "makeChainSteps: Length of chain defs %d does not match length of steps to merge %d" % (len(chainDefList), len(steps))
+    
+    for chain_index, step in enumerate(steps):
         if step is None:
-            continue
-        log.info("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
-        if len(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:
-            log.error("More than one menu sequence found in combined chain!!")
-
-
-        currentStep = step.name
-
-        # the step naming for combined chains needs to be revisted!!
-        stepName += '_' + currentStep
-        if len(step.sequences):
-            seq = step.sequences[0]
-            stepSeq.append(seq)
-        # set the multiplicity of all the legs 
-        stepMult.append(sum(step.multiplicity))
-        comboHypoTools.extend(step.comboToolConfs)
-        # update the chain dict list for the combined step with the chain dict from this step
-        stepDicts += deepcopy(step.chainDicts)
+            # this happens for merging chains with different numbers of steps, we need to "pad" out with empty sequences to propogate the decisions
+            seqName = getEmptySeqName(stepName, chain_index, stepNumber)
+            log.info("  creating empty sequence %s", seqName)
+            emptySeq = EmptyMenuSequence(seqName)
+            stepSeq.append(emptySeq)
+            stepMult.append(1)
+            # we need a chain dict here, use the one corresponding to this leg of the chain
+            stepDicts.append(deepcopy(chainDefList[chain_index].steps[-1].chainDicts[-1]))
+        else:
+            # Standard step, append it to the combined step
+            log.info("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
+            if len(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:
+                log.error("More than one menu sequence found in combined chain!!")
+
+
+            currentStep = step.name
+
+            # the step naming for combined chains needs to be revisted!!
+            stepName += '_' + currentStep
+            if len(step.sequences):
+                seq = step.sequences[0]
+                stepSeq.append(seq)
+            # set the multiplicity of all the legs 
+            stepMult.append(sum(step.multiplicity))
+            comboHypoTools.extend(step.comboToolConfs)
+            # update the chain dict list for the combined step with the chain dict from this step
+            stepDicts += deepcopy(step.chainDicts)
         # for merged steps, we need to update the name to add the leg name
-        stepDicts[-1]['chainName'] = legName(stepDicts[-1]['chainName'], count)
-        count = count + 1
+        stepDicts[-1]['chainName'] = legName(stepDicts[-1]['chainName'], chain_index)
         
     comboHypoTools = list(set(comboHypoTools))
     theChainStep = ChainStep(stepName, Sequences=stepSeq, multiplicity=stepMult, chainDicts=stepDicts, comboToolConfs=comboHypoTools) 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Cosmic_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Cosmic_run3_v1.py
index 49a209071634402291489a393761787f8f1f012e..7de45793b0915579365da11e30560581d57666b4 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Cosmic_run3_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/Cosmic_run3_v1.py
@@ -39,15 +39,6 @@ def setupMenu():
     TriggerFlags.CalibSlice.signatures     = []
     TriggerFlags.CosmicSlice.signatures    = []
     TriggerFlags.StreamingSlice.signatures = [
-        ChainProp(name='HLT_noalg_cosmiccalo_L1EM3_EMPTY', stream=['CosmicCalo'],groups=['RATE:Cosmic_Calo','BW:MinBias']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1RD1_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['CosmicCalo','express'],groups=['RATE:Calibration','BW:Detector']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1J30_31ETA49_EMPTY', stream=['CosmicCalo'],groups=['RATE:Cosmic_Calo','BW:Jet']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1J12_EMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1EM7_EMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1J30_EMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1J12_FIRSTEMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1J30_FIRSTEMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
-        ChainProp(name='HLT_noalg_cosmiccalo_L1RD1_BGRP10', l1SeedThresholds=['FSNOSEED'], stream=['CosmicCalo','express'],groups=['RATE:Calibration','BW:Detector']),
 
         ChainProp(name='HLT_noalg_idcosmic_L1TRT_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['IDCosmic','express'],groups=['RATE:SeededStreamers','BW:Other']),
         ChainProp(name='HLT_noalg_idcosmic_L1TRT_FILLED', l1SeedThresholds=['FSNOSEED'], stream=['IDCosmic'],groups=['RATE:SeededStreamers','BW:Other']),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/EventBuildingInfo.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/EventBuildingInfo.py
index 14039de85bc55a3f9245e7718f1d190d1a16d6e1..1e42d4694a78a33b33e0887b73f4e5a3fcf39a6b 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/EventBuildingInfo.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/EventBuildingInfo.py
@@ -27,7 +27,8 @@ PartialEventBuildingIdentifiers = [
     'BeamSpotPEB',
     'LArPEB',
     'RPCPEBSecondaryReadout',
-    'SCTPEB'
+    'SCTPEB',
+    'TilePEB'
 ]
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
index 62bdac3838aa6b70c3fb4f9b1d51128bbdf8ab63..4a4f4a9b472c5336af380b9804027ba3992e7a88 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py
@@ -14,7 +14,7 @@ from TriggerMenuMT.HLTMenuConfig.Menu.MenuPrescaleConfig import addSliceChainsTo
 import TriggerMenuMT.HLTMenuConfig.Menu.MC_pp_run3_v1 as mc_menu
 import TriggerMenuMT.HLTMenuConfig.Menu.PhysicsP1_pp_run3_v1 as p1_menu
 
-from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import PhysicsStream,SingleMuonGroup,MultiMuonGroup,SingleElectronGroup,MultiElectronGroup,SinglePhotonGroup,MultiPhotonGroup,SingleMETGroup,MultiMETGroup,SingleJetGroup,MultiJetGroup,SingleBjetGroup,SingleTauGroup,EgammaStreamersGroup,TauStreamersGroup,JetStreamersGroup,METStreamersGroup,MinBiasGroup
+from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import PhysicsStream,SingleMuonGroup,MultiMuonGroup,SingleElectronGroup,MultiElectronGroup,SinglePhotonGroup,MultiPhotonGroup,SingleMETGroup,MultiMETGroup,SingleJetGroup,MultiJetGroup,SingleBjetGroup,SingleTauGroup,MinBiasGroup
 #BphysicsGroup (re-add to the preceding line when putting bphys back in)
 
 
@@ -37,7 +37,6 @@ def setupMenu():
         ChainProp(name='HLT_mu24_idperf_L1MU20', groups=SingleMuonGroup),        
         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),
@@ -47,7 +46,7 @@ def setupMenu():
         ChainProp(name='HLT_mu6_ivarmedium_L1MU6', groups=SingleMuonGroup),
 
         # commented because it is conflict with dimuon noL1 serial chain
-      #  ChainProp(name='HLT_mu6noL1_L1MU6', l1SeedThresholds=['FSNOSEED'], groups=SingleMuonGroup),
+        # ChainProp(name='HLT_mu6noL1_L1MU6', l1SeedThresholds=['FSNOSEED'], groups=SingleMuonGroup),
         
         ChainProp(name='HLT_mu6_msonly_L1MU6',     groups=SingleMuonGroup),
 
@@ -88,17 +87,24 @@ def setupMenu():
         ChainProp(name='HLT_e5_lhloose_noringer_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhmedium_noringer_L1EM3', groups=SingleElectronGroup),
         ChainProp(name='HLT_e5_lhtight_noringer_L1EM3', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e5_lhtight_noringer_nod0_L1EM3', groups=SingleElectronGroup),
 
         # Primary
-        ChainProp(name='HLT_e26_lhtight_L1EM24VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_lhtight_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e26_lhtight_nod0_L1EM22VHI', groups=SingleElectronGroup),
         ChainProp(name='HLT_e26_lhtight_nod0_L1EM24VHI', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e60_lhmedium_L1EM24VHI', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e60_lhmedium_nod0_L1EM24VHI', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e140_lhloose_L1EM24VHI', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e140_lhloose_nod0_L1EM24VHI', groups=SingleElectronGroup),
-        ChainProp(name='HLT_e300_etcut_L1EM24VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e60_lhmedium_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e60_lhmedium_nod0_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e140_lhloose_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e140_lhloose_nod0_L1EM22VHI', groups=SingleElectronGroup),
+        ChainProp(name='HLT_e300_etcut_L1EM22VHI', groups=SingleElectronGroup),
 
         ChainProp(name='HLT_2e17_lhvloose_L12EM3', stream=[PhysicsStream], groups=MultiElectronGroup),
+        ChainProp(name='HLT_2e17_lhvloose_L12EM15VH', stream=[PhysicsStream], groups=MultiElectronGroup),
+        ChainProp(name='HLT_e17_lhvloose_nod0_L1EM15VH', stream=[PhysicsStream], groups=SingleElectronGroup),
+
+        # for moving to PhysicsP1, ATR-21242
+        # ChainProp(name='HLT_2e17_etcut_L12EM15VHI', stream=[PhysicsStream], groups=MultiElectronGroup),
 
         # PhotonChains------------
         # these are to debug photon working points should be removed in production
@@ -107,14 +113,16 @@ def setupMenu():
         ChainProp(name='HLT_g5_medium_L1EM3', groups=SinglePhotonGroup),
         ChainProp(name='HLT_g5_tight_L1EM3', groups=SinglePhotonGroup),
         # Primary photon chains
-        ChainProp(name='HLT_g140_loose_L1EM24VHI', groups=SinglePhotonGroup),
+        ChainProp(name='HLT_g140_loose_L1EM22VHI', groups=SinglePhotonGroup),
         ChainProp(name='HLT_2g35_medium_L12EM20VH', groups=MultiPhotonGroup),
         ChainProp(name='HLT_g35_medium_g25_medium_L12EM20VH', groups=MultiPhotonGroup),
         ChainProp(name='HLT_2g20_tight_L12EM20VH', groups=MultiPhotonGroup),
 
-
         # ATR-19360
         ChainProp(name='HLT_g5_etcut_LArPEB_L1EM3',stream=['LArCells'], groups=SinglePhotonGroup),
+
+        # for moving to PhysicsP1, ATR-21242
+        ChainProp(name='HLT_g140_etcut_L1EM22VHI', groups=SinglePhotonGroup),
     ]
 
     TriggerFlags.METSlice.signatures = TriggerFlags.METSlice.signatures() + [
@@ -155,7 +163,7 @@ def setupMenu():
         ChainProp(name='HLT_j45_sktc_nojcalib_L1J20', groups=SingleJetGroup),
         ChainProp(name='HLT_j45_cssktc_nojcalib_L1J20', groups=SingleJetGroup),
         ChainProp(name='HLT_j45_ftf_pf_nojcalib_L1J20', groups=SingleJetGroup),
-#        ChainProp(name='HLT_j45_ftf_csskpf_nojcalib_L1J20', groups=SingleJetGroup),
+        ChainProp(name='HLT_j45_ftf_csskpf_nojcalib_L1J20', groups=SingleJetGroup),
 
         ChainProp(name='HLT_j260_320eta490_L1J20', groups=SingleJetGroup),
 
@@ -212,6 +220,15 @@ def setupMenu():
         # ChainProp(name='HLT_2mu4_bDimu_L12MU4',     groups=BphysicsGroup),
     ]
     TriggerFlags.CombinedSlice.signatures = TriggerFlags.CombinedSlice.signatures() + [
+        # groups need to be properly assigned here later
+
+        # Test chain that is using parallel merging with different number of steps
+        ChainProp(name='HLT_e3_etcut1step_mu26_L1EM8I_MU10', l1SeedThresholds=['EM8I', 'MU10'], stream=[PhysicsStream], groups=MultiElectronGroup),
+        # Primary e-mu chains
+        ChainProp(name='HLT_e17_lhloose_mu14_L1EM15VH_MU10', l1SeedThresholds=['EM15VH','MU10'], stream=[PhysicsStream], groups=MultiElectronGroup),
+        ChainProp(name='HLT_e7_lhmedium_mu24_L1MU20',l1SeedThresholds=['EM3','MU20'],  stream=[PhysicsStream], groups=MultiElectronGroup),
+        # Test photon-muon chain (isolation is there to have different number of steps)
+        ChainProp(name='HLT_g25_medium_mu24_ivarmedium_L1MU20',l1SeedThresholds=['EM15VH','MU20'], stream=[PhysicsStream], groups=MultiElectronGroup),
    ]
     TriggerFlags.HeavyIonSlice.signatures  = TriggerFlags.HeavyIonSlice.signatures() + []
     TriggerFlags.BeamspotSlice.signatures  = TriggerFlags.BeamspotSlice.signatures() + []
@@ -222,57 +239,10 @@ def setupMenu():
     ]
     TriggerFlags.CalibSlice.signatures     = TriggerFlags.CalibSlice.signatures() + []
     TriggerFlags.CosmicSlice.signatures    = TriggerFlags.CosmicSlice.signatures() + [
-        ChainProp(name='HLT_sct_noise_SCTPEB_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['SCTNoise'], groups=['RATE:SCTCalibration','BW:Detector']),
+        ChainProp(name='HLT_tilecalib_laser_TilePEB_L1CALREQ2', l1SeedThresholds=['FSNOSEED'], stream=['Tile'], groups=['RATE:TileCalibration','BW:Detector'])
     ]
 
     TriggerFlags.StreamingSlice.signatures = TriggerFlags.StreamingSlice.signatures() + [
-        # L1 calo streamers
-        ChainProp(name='HLT_noalg_L1EM3',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM7',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM12',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM15',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM8VH',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM10VH',     l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM15VH',     l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM20VH',     l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-        ChainProp(name='HLT_noalg_L1EM22VHI',    l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
-
-        ChainProp(name='HLT_noalg_L1TAU8',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
-        ChainProp(name='HLT_noalg_L1TAU12',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
-        ChainProp(name='HLT_noalg_L1TAU20',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
-        ChainProp(name='HLT_noalg_L1TAU30',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
-        ChainProp(name='HLT_noalg_L1TAU40',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
-        ChainProp(name='HLT_noalg_L1TAU60',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
-        ChainProp(name='HLT_noalg_L1TAU12IM',    l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),        
-        ChainProp(name='HLT_noalg_L1TAU20IM',    l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),        
-
-        ChainProp(name='HLT_noalg_L1J12',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J15',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J20',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J25',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J30',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J40',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J50',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J75',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J85',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J100',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J120',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        ChainProp(name='HLT_noalg_L1J400',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
-        
-        ChainProp(name='HLT_noalg_L1XE10',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE30',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE35',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE40',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE45',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE50',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE55',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE60',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE65',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE70',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE75',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE80',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE150',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
-        ChainProp(name='HLT_noalg_L1XE300',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
     ]
     TriggerFlags.MonitorSlice.signatures   = TriggerFlags.MonitorSlice.signatures() + [
     ]
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index d9a556085df372034843fe16640b48c8c6a52e58..e052d7f34e47dbcb835c101536b09333516b6ea5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -718,8 +718,10 @@ class Chain(object):
             if len(step.chainDicts) > 0:
                 # new way to configure hypo tools, works if the chain dictionaries have been attached to the steps
                 log.info('%s in new hypo tool creation method, step mult= %d, isCombo=%d', self.name, sum(step.multiplicity), step.isCombo)
+                log.info("N(seq)=%d, N(chainDicts)=%d", len(step.sequences), len(step.chainDicts))
+                assert len(step.sequences)==len(step.chainDicts), "createHypoTools only makes sense if number of sequences == number of chain dicts"
                 for seq, onePartChainDict in zip(step.sequences, step.chainDicts):
-                    log.info('    onePartChainDict:')
+                    log.info('    seq: %s, onePartChainDict:', seq.name)
                     log.info('    ' + str(onePartChainDict))
                     seq.createHypoTools( onePartChainDict )              
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py
index fc893500a34dedbbd87dcc3fa9135b54d495e444..d31d919822015eef021cf48f52e0a1c123adcf08 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/PhysicsP1_pp_run3_v1.py
@@ -14,7 +14,7 @@ from TriggerMenuMT.HLTMenuConfig.Menu.ChainDefInMenu import ChainProp
 import TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 as physics_menu 
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuPrescaleConfig import addSliceChainsToPrescales
 
-from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import PhysicsStream,SingleMuonGroup,SinglePhotonGroup,MinBiasGroup
+from TriggerMenuMT.HLTMenuConfig.Menu.Physics_pp_run3_v1 import PhysicsStream,SingleMuonGroup,SinglePhotonGroup,EgammaStreamersGroup,TauStreamersGroup,JetStreamersGroup,METStreamersGroup,MinBiasGroup
 
 
 def addP1Signatures():
@@ -57,10 +57,71 @@ def addP1Signatures():
     ]   
     TriggerFlags.MinBiasSlice.signatures   = TriggerFlags.MinBiasSlice.signatures() + [] 
     TriggerFlags.CalibSlice.signatures     = TriggerFlags.CalibSlice.signatures() + []
-    TriggerFlags.CosmicSlice.signatures    = TriggerFlags.CosmicSlice.signatures() + []
+    TriggerFlags.CosmicSlice.signatures    = TriggerFlags.CosmicSlice.signatures() + [
+        ChainProp(name='HLT_sct_noise_SCTPEB_L1RD0_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['SCTNoise'], groups=['RATE:SCTCalibration','BW:Detector']),
+    ]
     TriggerFlags.StreamingSlice.signatures = TriggerFlags.StreamingSlice.signatures() + [
           ChainProp(name='HLT_noalg_L1RD0_EMPTY',  l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream, 'BeamSpot'], groups=MinBiasGroup),  # FIXME: BeamSpot stream added just for testing, to be removed
           ChainProp(name='HLT_noalg_L1RD0_FILLED', l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream, 'BeamSpot'], groups=MinBiasGroup),  # FIXME: BeamSpot stream added just for testing, to be removed
+
+        # L1 calo streamers
+        ChainProp(name='HLT_noalg_L1EM3',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM7',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM12',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM15',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM8VH',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM10VH',     l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM15VH',     l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM20VH',     l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+        ChainProp(name='HLT_noalg_L1EM22VHI',    l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=EgammaStreamersGroup),
+
+        ChainProp(name='HLT_noalg_L1TAU8',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
+        ChainProp(name='HLT_noalg_L1TAU12',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
+        ChainProp(name='HLT_noalg_L1TAU20',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
+        ChainProp(name='HLT_noalg_L1TAU30',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
+        ChainProp(name='HLT_noalg_L1TAU40',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
+        ChainProp(name='HLT_noalg_L1TAU60',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),
+        ChainProp(name='HLT_noalg_L1TAU12IM',    l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),        
+        ChainProp(name='HLT_noalg_L1TAU20IM',    l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=TauStreamersGroup),        
+
+        ChainProp(name='HLT_noalg_L1J12',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J15',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J20',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J25',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J30',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J40',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J50',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J75',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J85',        l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J100',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J120',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        ChainProp(name='HLT_noalg_L1J400',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=JetStreamersGroup),
+        
+        ChainProp(name='HLT_noalg_L1XE10',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE30',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE35',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE40',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE45',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE50',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE55',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE60',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE65',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE70',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE75',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE80',       l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE150',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+        ChainProp(name='HLT_noalg_L1XE300',      l1SeedThresholds=['FSNOSEED'], stream=[PhysicsStream], groups=METStreamersGroup),
+
+        # Cosmic calo stream
+        ChainProp(name='HLT_noalg_cosmiccalo_L1EM3_EMPTY', stream=['CosmicCalo'],groups=['RATE:Cosmic_Calo','BW:MinBias']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1RD1_EMPTY', l1SeedThresholds=['FSNOSEED'], stream=['CosmicCalo','express'],groups=['RATE:Calibration','BW:Detector']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1J30_31ETA49_EMPTY', stream=['CosmicCalo'],groups=['RATE:Cosmic_Calo','BW:Jet']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1J12_EMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1EM7_EMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1J30_EMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1J12_FIRSTEMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1J30_FIRSTEMPTY', stream=['CosmicCalo','express'],groups=['RATE:Cosmic_Calo','BW:Jet']),
+        ChainProp(name='HLT_noalg_cosmiccalo_L1RD1_BGRP10', l1SeedThresholds=['FSNOSEED'], stream=['CosmicCalo','express'],groups=['RATE:Calibration','BW:Detector']),
     ]
     TriggerFlags.MonitorSlice.signatures   = TriggerFlags.MonitorSlice.signatures() + [
           ChainProp(name='HLT_costmonitor_CostMonDS_L1All',        l1SeedThresholds=['FSNOSEED'], stream=['CostMonitoring'], groups=['RATE:Monitoring','BW:Other']),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
index 780a1ec3a57e94703a2cb25bcb84844b7dd06daa..a04c8221bad71a46d13cb1d313040585dab05fab 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/StreamInfo.py
@@ -39,6 +39,7 @@ _all_streams = [
     StreamInfo('RPCSecondaryReadout', 'calibration', False, False),
     StreamInfo('CostMonitoring','calibration', False, False),
     StreamInfo('SCTNoise','calibration',False,False),
+    StreamInfo('Tile','calibration',False,False),
     # HI STREAMS
     StreamInfo('HardProbes', 'physics', True, True),
     StreamInfo('MinBias', 'physics', True, True),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py
index 71d887177c6b628ff15f421631a6317935a74d51..b9069ad0142c8cc5511f2ab03e85b21907b545fc 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/MinBias/MinBiasChainConfiguration.py
@@ -48,7 +48,21 @@ class MinBiasChainConfig(ChainConfigurationBase):
         SPInputMakerAlg.RoITool = ViewCreatorInitialROITool()
         SPInputMakerAlg.InViewRoIs = "InputRoI"
         SPInputMakerAlg.Views = "SPView"
-        idAlgs = makeInDetAlgs(whichSignature='MinBias', separateTrackParticleCreator='', rois=SPInputMakerAlg.InViewRoIs)
+        idAlgs, verifier = makeInDetAlgs(whichSignature='MinBias', separateTrackParticleCreator='', rois=SPInputMakerAlg.InViewRoIs, viewVerifier='SPViewDataVerifier' )
+        verifier.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+InputRoI' ),
+                                 ( 'SCT_ID' , 'DetectorStore+SCT_ID' ),
+                                 ( 'PixelID' , 'DetectorStore+PixelID' )]
+
+        # Make sure required objects are still available at whole-event level
+        from AthenaCommon.AlgSequence import AlgSequence
+        topSequence = AlgSequence()
+        topSequence.SGInputLoader.Load += [( 'SCT_ID' , 'DetectorStore+SCT_ID' ),
+                                           ( 'PixelID' , 'DetectorStore+PixelID' )]
+        from IOVDbSvc.CondDB import conddb
+        if not conddb.folderRequested( '/TDAQ/Resources/ATLAS/PIXEL/Modules' ):
+          verifier.DataObjects += [( 'CondAttrListCollection', 'ConditionStore+/TDAQ/Resources/ATLAS/PIXEL/Modules' )]
+          topSequence.SGInputLoader.Load += [( 'CondAttrListCollection', 'ConditionStore+/TDAQ/Resources/ATLAS/PIXEL/Modules' )]
+
         SpList = idAlgs[:-2]
 
         SpCount=TrigCountSpacePointsMT()
@@ -88,26 +102,30 @@ class MinBiasChainConfig(ChainConfigurationBase):
         TrkInputMakerAlg.ViewNodeName = "TrkCountHypoAlgMTNode"
 
         # prepare algorithms to run in views, first, inform scheduler that input data is available in parent view (has to be done by hand)
-        import AthenaCommon.CfgMgr as CfgMgr
-        ViewVerifyTrk = CfgMgr.AthViews__ViewDataVerifier("TrkrecoSeqDataVerifier")
-        ViewVerifyTrk.DataObjects = [ ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
-                                     ( 'InDet::SCT_ClusterContainer' , 'StoreGateSvc+SCT_TrigClusters' ),
-                                     ( 'SpacePointContainer' , 'StoreGateSvc+SCT_TrigSpacePoints' ),
-                                     ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
-                                     ( 'InDet::PixelClusterContainer' , 'StoreGateSvc+PixelTrigClusters' ),
-                                     ( 'SpacePointContainer' , 'StoreGateSvc+PixelTrigSpacePoints' )
-        ]
+        idAlgs, verifier = makeInDetAlgs(whichSignature='MinBias', separateTrackParticleCreator='', rois=TrkInputMakerAlg.InViewRoIs, viewVerifier='TrkrecoSeqDataVerifier')
+        verifier.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+InputRoI' ),
+                                 ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
+                                 ( 'InDet::SCT_ClusterContainer' , 'StoreGateSvc+SCT_TrigClusters' ),
+                                 ( 'SpacePointContainer' , 'StoreGateSvc+SCT_TrigSpacePoints' ),
+                                 ( 'InDet::PixelClusterContainer' , 'StoreGateSvc+PixelTrigClusters' ),
+                                 ( 'SpacePointContainer' , 'StoreGateSvc+PixelTrigSpacePoints' )]
+
         if globalflags.InputFormat.is_bytestream():
-          ViewVerifyTrk.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
-                                        ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ) ]
+          verifier.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
+                                   ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
+
+          # Make sure required objects are still available at whole-event level
+          from AthenaCommon.AlgSequence import AlgSequence
+          topSequence = AlgSequence()
+          topSequence.SGInputLoader.Load += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
+                                             ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
 
-        idAlgs = makeInDetAlgs(whichSignature='MinBias', separateTrackParticleCreator='', rois=TrkInputMakerAlg.InViewRoIs)
         TrkList = idAlgs[-2:] # FTF and Track to xAOD::TrackParticle conversion alg
         TrackCountHypo=TrackCountHypoAlgMT()
         TrackCountHypo.trackCountKey=recordable("HLT_TrackCount")
         TrackCountHypo.tracksKey=recordable("HLT_IDTrack_MinBias_FTF")
 
-        TrkrecoSeq = parOR("TrkrecoSeq", [ ViewVerifyTrk ] + TrkList)
+        TrkrecoSeq = parOR("TrkrecoSeq", [verifier]+TrkList)
         TrkSequence = seqAND("TrkSequence", [TrkInputMakerAlg, TrkrecoSeq])
         TrkInputMakerAlg.ViewNodeName = TrkrecoSeq.name()
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index 71c9e67f31db3fea738d83ae5470bbc5a0920f34..b01a2d0263600554b09a865157f4c33d02c07649 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -64,6 +64,24 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
 
   viewAlgs_MuonPRD = []  # These algs should be executed to prepare muon PRDs for muFast and muEF steps.
 
+  # Load data into the view
+  import AthenaCommon.CfgMgr as CfgMgr
+  muDataPrepVDV = CfgMgr.AthViews__ViewDataVerifier( "muDataPrepVDV" + postFix )
+  muDataPrepVDV.DataObjects = [( 'CscStripPrepDataCollection_Cache' , MuonPrdCacheNames.CscStripCache ),
+                               ( 'MdtPrepDataCollection_Cache' , MuonPrdCacheNames.MdtCache )]
+
+  # Only load these objects if they aren't available in conddb
+  from IOVDbSvc.CondDB import conddb
+  if not conddb.folderRequested( "/CSC/DCS/LAYERSTATE" ):
+    muDataPrepVDV.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/CSC/DCS/LAYERSTATE' )]
+  if not conddb.folderRequested( "/CSC/T0PHASE" ):
+    muDataPrepVDV.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' )]
+  if not conddb.folderRequested( "/CSC/T0BASE" ):
+    muDataPrepVDV.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' )]
+
+  viewAlgs_MuonPRD.append( muDataPrepVDV )
+
+
   from AthenaCommon.AppMgr import ToolSvc
 
   ### CSC RDO data ###
@@ -108,8 +126,16 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
   CscClusterBuilder = CscThresholdClusterBuilder(name            = "CscThresholdClusterBuilder",
                                                  cluster_builder = CscClusterBuilderTool)
 
+  # Make sure required objects are still available at whole-event level
+  from AthenaCommon.AlgSequence import AlgSequence
+  topSequence = AlgSequence()
+
   if globalflags.InputFormat.is_bytestream():
     viewAlgs_MuonPRD.append( CscRawDataProvider )
+    muDataPrepVDV.DataObjects += [( 'CscRawDataCollection_Cache' , MuonCacheNames.CscCache )]
+  else:
+    muDataPrepVDV.DataObjects += [( 'CscRawDataContainer' , 'StoreGateSvc+CSCRDO' )]
+    topSequence.SGInputLoader.Load += [( 'CscRawDataContainer' , 'StoreGateSvc+CSCRDO' )]
   viewAlgs_MuonPRD.append( CscRdoToCscPrepData )
   viewAlgs_MuonPRD.append( CscClusterBuilder )
 
@@ -150,6 +176,10 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
 
   if globalflags.InputFormat.is_bytestream():
     viewAlgs_MuonPRD.append( MdtRawDataProvider )
+    muDataPrepVDV.DataObjects += [( 'MdtCsm_Cache' , MuonCacheNames.MdtCsmCache )]
+  else:
+    muDataPrepVDV.DataObjects += [( 'MdtCsmContainer' , 'StoreGateSvc+MDTCSM' )]
+    topSequence.SGInputLoader.Load += [( 'MdtCsmContainer' , 'StoreGateSvc+MDTCSM' )]
   viewAlgs_MuonPRD.append( MdtRdoToMdtPrepData )
 
 
@@ -194,6 +224,10 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
 
   if globalflags.InputFormat.is_bytestream():
     viewAlgs_MuonPRD.append( RpcRawDataProvider )
+    muDataPrepVDV.DataObjects += [( 'RpcPad_Cache' , MuonCacheNames.RpcCache )]
+  else:
+    muDataPrepVDV.DataObjects += [( 'RpcPadContainer' , 'StoreGateSvc+RPCPAD' )]
+    topSequence.SGInputLoader.Load += [( 'RpcPadContainer' , 'StoreGateSvc+RPCPAD' )]
   viewAlgs_MuonPRD.append( RpcRdoToRpcPrepData )
 
 
@@ -227,6 +261,10 @@ def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
 
   if globalflags.InputFormat.is_bytestream():
     viewAlgs_MuonPRD.append( TgcRawDataProvider )
+    muDataPrepVDV.DataObjects += [( 'TgcRdo_Cache' , MuonCacheNames.TgcCache )]
+  else:
+    muDataPrepVDV.DataObjects += [( 'TgcRdoContainer' , 'StoreGateSvc+TGCRDO' )]
+    topSequence.SGInputLoader.Load += [( 'TgcRdoContainer' , 'StoreGateSvc+TGCRDO' )]
   viewAlgs_MuonPRD.append( TgcRdoToTgcPrepData )
 
   from MuonRecExample.MuonRecFlags import muonRecFlags
@@ -255,6 +293,28 @@ def muFastRecoSequence( RoIs ):
 
   muFastRecoSequence = parOR("l2MuViewNode")
 
+  import AthenaCommon.CfgMgr as CfgMgr
+  muFastRecoVDV = CfgMgr.AthViews__ViewDataVerifier("muFastRecoVDV")
+  muFastRecoVDV.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs ),
+                               ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                               ( 'DataVector< LVL1::RecMuonRoI >' , 'StoreGateSvc+HLT_RecMURoIs' )]
+
+  # Make sure event info still available at whole-event level
+  from AthenaCommon.AlgSequence import AlgSequence
+  topSequence = AlgSequence()
+  topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+
+  # Only load these objects if they aren't available in conddb
+  from IOVDbSvc.CondDB import conddb
+  if not conddb.folderRequested( "/CSC/DCS/LAYERSTATE" ):
+    muFastRecoVDV.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/CSC/DCS/LAYERSTATE' )]
+  if not conddb.folderRequested( "/CSC/T0PHASE" ):
+    muFastRecoVDV.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0PHASE' )]
+  if not conddb.folderRequested( "/CSC/T0BASE" ):
+    muFastRecoVDV.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/CSC/T0BASE' )]
+
+  muFastRecoSequence += muFastRecoVDV
+
 
   # Configure the L2 CSC data preparator - we can turn off the data decoding here
   from TrigL2MuonSA.TrigL2MuonSAConf import TrigL2MuonSA__CscDataPreparator
@@ -336,7 +396,8 @@ def muonIDFastTrackingSequence( RoIs, name ):
   ### Define input data of Inner Detector algorithms  ###
   ### and Define EventViewNodes to run the algorithms ###
   from TrigInDetConfig.InDetSetup import makeInDetAlgs
-  viewAlgs = makeInDetAlgs(whichSignature="Muon"+name, rois = RoIs)
+  viewAlgs, viewVerify = makeInDetAlgs(whichSignature="Muon"+name, rois = RoIs)
+  viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+MUIDRoIs' )]
 
 
   for viewAlg in viewAlgs:
@@ -410,14 +471,31 @@ def muEFSARecoSequence( RoIs, name ):
 
   efAlgs = []
 
+  EFMuonViewDataVerifier = CfgMgr.AthViews__ViewDataVerifier( "EFMuonViewDataVerifier_" + name )
+  EFMuonViewDataVerifier.DataObjects = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+  efAlgs.append( EFMuonViewDataVerifier )
+
+  # Make sure event info still available at whole-event level
+  from AthenaCommon.AlgSequence import AlgSequence
+  topSequence = AlgSequence()
+  topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+
+  # Only load these objects if they aren't available in conddb
+  from IOVDbSvc.CondDB import conddb
+  if not conddb.folderRequested( "/MDT/DQMF/DEAD_ELEMENT" ):
+    EFMuonViewDataVerifier.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/MDT/DQMF/DEAD_ELEMENT' )]
+    topSequence.SGInputLoader.Load += [( 'CondAttrListCollection' , 'ConditionStore+/MDT/DQMF/DEAD_ELEMENT' )]
+  if not conddb.folderRequested( "/MDT/TUBE_STATUS/DEAD_TUBE" ):
+    EFMuonViewDataVerifier.DataObjects += [( 'CondAttrListCollection' , 'ConditionStore+/MDT/TUBE_STATUS/DEAD_TUBE' )]
+    topSequence.SGInputLoader.Load += [( 'CondAttrListCollection' , 'ConditionStore+/MDT/TUBE_STATUS/DEAD_TUBE' )]
+
   if name != 'FS':
     # we now try to share the data preparation algorithms with L2, so we tell the view that it should expect the MDT, TGC, CSC and RPC PRDs to be available
-    efAlgs.append( CfgMgr.AthViews__ViewDataVerifier(name = "EFMuonViewDataVerifier",
-                                                     DataObjects = [( 'Muon::MdtPrepDataContainer'      , 'StoreGateSvc+MDT_DriftCircles' ),
-                                                                    ( 'Muon::TgcPrepDataContainer'      , 'StoreGateSvc+TGC_Measurements' ),
-                                                                    ( 'Muon::RpcPrepDataContainer'      , 'StoreGateSvc+RPC_Measurements' ),
-                                                                    ( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements'),
-                                                                    ( 'Muon::CscPrepDataContainer'      , 'StoreGateSvc+CSC_Clusters') ] ))
+    EFMuonViewDataVerifier.DataObjects += [( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ),
+                                           ( 'Muon::TgcPrepDataContainer' , 'StoreGateSvc+TGC_Measurements' ),
+                                           ( 'Muon::RpcPrepDataContainer' , 'StoreGateSvc+RPC_Measurements' ),
+                                           ( 'Muon::CscStripPrepDataContainer' , 'StoreGateSvc+CSC_Measurements' ),
+                                           ( 'Muon::CscPrepDataContainer' , 'StoreGateSvc+CSC_Clusters' )]
    
   #need MdtCondDbAlg for the MuonStationIntersectSvc (required by segment and track finding)
   from AthenaCommon.AlgSequence import AthSequencer
@@ -487,13 +565,28 @@ def muEFCBRecoSequence( RoIs, name ):
                               ( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ),  
                               ( 'Muon::TgcPrepDataContainer'      , 'StoreGateSvc+TGC_Measurements' ),
                               ( 'Muon::RpcPrepDataContainer'      , 'StoreGateSvc+RPC_Measurements' ),
-                              ( 'MuonCandidateCollection' , 'StoreGateSvc+MuonCandidates') ]
-
+                              ( 'MuonCandidateCollection' , 'StoreGateSvc+MuonCandidates'),
+                              ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+MUCBFSRoIs' ),
+                              ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData' ),
+                              ( 'MuonCandidateCollection' , 'StoreGateSvc+MuonCandidates_FS' ),
+                              ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
   muEFCBRecoSequence += ViewVerifyMS
+
+  # Make sure required objects are still available at whole-event level
+  from AthenaCommon.AlgSequence import AlgSequence
+  topSequence = AlgSequence()
+  topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+  from IOVDbSvc.CondDB import conddb
+  if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
+    topSequence.SGInputLoader.Load += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                       ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+    ViewVerifyMS.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                 ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+
   if "FS" in name:
     #Need to run tracking for full scan chains
     from TrigInDetConfig.InDetSetup import makeInDetAlgs
-    viewAlgs = makeInDetAlgs(whichSignature = "MuonFS", rois = RoIs) 
+    viewAlgs, viewVerify = makeInDetAlgs(whichSignature = "MuonFS", rois = RoIs) 
 
     for viewAlg in viewAlgs:
       muEFCBRecoSequence += viewAlg
@@ -506,7 +599,17 @@ def muEFCBRecoSequence( RoIs, name ):
     ViewVerifyTrk.DataObjects = [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+'+TrackParticlesName ),
                                  ( 'TrackCollection' , 'StoreGateSvc+'+TrackCollection ),
                                  ( 'SCT_FlaggedCondData' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
-                                 ( 'xAOD::IParticleContainer' , 'StoreGateSvc+'+TrackParticlesName )]
+                                 ( 'xAOD::IParticleContainer' , 'StoreGateSvc+'+TrackParticlesName ),
+                                 ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )] #seems to be necessary, despite the load below
+
+    # Make sure required objects are still available at whole-event level
+    topSequence.SGInputLoader.Load += [( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
+
+    # This object must be loaded from SG if it's not loaded in conddb (algs request it but ignore)
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.folderRequested( "Cond/StatusHT" ):
+      ViewVerifyTrk.DataObjects += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
+      topSequence.SGInputLoader.Load += [( 'TRTCond::StrawStatusMultChanContainer' , 'ConditionStore+/TRT/Cond/StatusHT' )]
 
     if globalflags.InputFormat.is_bytestream():
       ViewVerifyTrk.DataObjects += [( 'InDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
@@ -693,7 +796,19 @@ def efmuisoRecoSequence( RoIs, Muons ):
   efmuisoRecoSequence = seqAND("efmuIsoViewNode")
 
   from TrigInDetConfig.InDetSetup import makeInDetAlgs
-  viewAlgs = makeInDetAlgs(whichSignature="MuonIso",rois = RoIs)
+  viewAlgs, viewVerify = makeInDetAlgs(whichSignature="MuonIso",rois = RoIs)
+  viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+MUEFIsoRoIs' ),
+                             ( 'xAOD::MuonContainer' , 'StoreGateSvc+IsoViewMuons' )]
+
+  # Make sure required objects are still available at whole-event level
+  from IOVDbSvc.CondDB import conddb
+  if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                       ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+    viewVerify.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                               ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
 
   for viewAlg in viewAlgs:
     efmuisoRecoSequence += viewAlg
@@ -731,6 +846,16 @@ def efLateMuRoISequence():
   from AthenaCommon.CFElements import parOR
   efLateMuRoISequence = parOR("efLateMuRoIViewNode")
 
+  import AthenaCommon.CfgMgr as CfgMgr
+  efLateMuRoIVDV = CfgMgr.AthViews__ViewDataVerifier( "efLateMuRoIVDV" )
+  efLateMuRoIVDV.DataObjects = [( 'MuCTPI_RDO' , 'StoreGateSvc+MUCTPI_RDO' )]
+  efLateMuRoISequence += efLateMuRoIVDV
+
+  # Make sure the RDOs are still available at whole-event level
+  from AthenaCommon.AlgSequence import AlgSequence
+  topSequence = AlgSequence()
+  topSequence.SGInputLoader.Load += [( 'MuCTPI_RDO' , 'StoreGateSvc+MUCTPI_RDO' )]
+
   from TrigmuRoI.TrigmuRoIConfig import TrigmuRoIMT
   roiAlg = TrigmuRoIMT("TrigmuRoIMT")
   sequenceOut = "LateMuRoIs"
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
index 29bd316dfd05fbbb6c8ff679ca253a151d9e4efd..9e21f160f99a8fe90999f0e89460d51a3a5a141d 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
@@ -27,11 +27,16 @@ def precisionPhotonRecoSequence(RoIs):
     from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuDefs
     import AthenaCommon.CfgMgr as CfgMgr
     ViewVerify = CfgMgr.AthViews__ViewDataVerifier("PrecisionPhotonPhotonViewDataVerifier")
-    ViewVerify.DataObjects = [ 
-            ( 'xAOD::CaloClusterContainer','StoreGateSvc+'+ precisionCaloMenuDefs.precisionCaloClusters),
-            ('CaloCellContainer' , 'StoreGateSvc+CaloCells')
-            ]
-
+    ViewVerify.DataObjects = [( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+' + precisionCaloMenuDefs.precisionCaloClusters ),
+                              ( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' ),
+                              ( 'xAOD::VertexContainer' , 'StoreGateSvc+GSFConversionVertices' ),
+                              ( 'CaloAffectedRegionInfoVec' , 'ConditionStore+LArAffectedRegionInfo' )]
+
+    # Make sure the required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'xAOD::VertexContainer' , 'StoreGateSvc+GSFConversionVertices' ),
+                                       ( 'CaloAffectedRegionInfoVec' , 'ConditionStore+LArAffectedRegionInfo' )]
 
 
     # Retrieve the factories now
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
index f7bc9acb4092cc30962432bf8fc32e26d3a25f84..1bc857bdf62d1afa3260d80f62b90ae0dd6d41fc 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
@@ -7,6 +7,7 @@ from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm, ViewCreatorInitialR
 from TrigT2CaloCommon.CaloDef import HLTLCTopoRecoSequence
 from TrigEDMConfig.TriggerEDMRun3 import recordable
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import RecoFragmentsPool
+import AthenaCommon.CfgMgr as CfgMgr
 
 def _algoTauRoiUpdater(inputRoIs, clusters):
     from TrigTauHypo.TrigTauHypoConf import TrigTauCaloRoiUpdaterMT
@@ -136,6 +137,21 @@ def tauCaloSequence(ConfigFlags):
     tauCaloViewsMaker.ViewNodeName       = RecoSequenceName
     (tauCaloInViewSequence, sequenceOut) = tauCaloRecoSequence( InViewRoIs, RecoSequenceName)
 
+    tauCaloRecoVDV = CfgMgr.AthViews__ViewDataVerifier( "tauCaloRecoVDV" )
+    tauCaloRecoVDV.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
+                                     ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
+                                     ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
+                                     ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+    tauCaloInViewSequence += tauCaloRecoVDV
+
+    # Make sure the required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
+                                       ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
+      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
+
     tauCaloSequence = seqAND("tauCaloSequence", [tauCaloViewsMaker, tauCaloInViewSequence ])
     return (tauCaloSequence, tauCaloViewsMaker, sequenceOut)    
 
@@ -154,22 +170,33 @@ def tauCaloMVASequence(ConfigFlags):
     tauCaloMVAViewsMaker.ViewNodeName       = RecoSequenceName
     (tauCaloMVAInViewSequence, sequenceOut) = tauCaloMVARecoSequence(InViewRoIs, RecoSequenceName)
 
+    tauCaloMVARecoVDV = CfgMgr.AthViews__ViewDataVerifier( "tauCaloMVARecoVDV" )
+    tauCaloMVARecoVDV.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
+                                     ( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' ),
+                                     ( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
+                                     ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+    tauCaloMVAInViewSequence += tauCaloMVARecoVDV
+
+    # Make sure the required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'ILArHVScaleCorr' , 'ConditionStore+LArHVScaleCorrRecomputed' ),
+                                       ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
+    if not hasattr( topSequence, "CaloBCIDAvgAlg" ):
+      topSequence.SGInputLoader.Load += [( 'CaloBCIDAverage' , 'StoreGateSvc+CaloBCIDAverage' )]
+
     tauCaloMVASequence = seqAND("tauCaloMVASequence", [tauCaloMVAViewsMaker, tauCaloMVAInViewSequence ])
     return (tauCaloMVASequence, tauCaloMVAViewsMaker, sequenceOut)
 
 def tauIdTrackSequence( RoIs , name):
-    import AthenaCommon.CfgMgr as CfgMgr
 
-    tauIdTrackSequence = parOR(name)
+    tauIdTrackSequence = seqAND(name)
 
     signName = "Tau"
 
     if ("Iso" in name) or ("TrackTwo" in name) or ("EF" in name):
       signName = 'TauIso'
 
-    from TrigInDetConfig.InDetSetup import makeInDetAlgs
-    viewAlgs = makeInDetAlgs(whichSignature=signName,separateTrackParticleCreator="_"+signName,rois = RoIs)
-
     tauViewDataVerifierName = ""
     if "FTFId" in name:
       tauViewDataVerifierName = "tauViewDataVerifierIdFTF"
@@ -182,14 +209,32 @@ def tauIdTrackSequence( RoIs , name):
     elif "EF" in name:
       tauViewDataVerifierName = "tauViewDataVerifierEF"
 
-    ViewVerify = CfgMgr.AthViews__ViewDataVerifier(tauViewDataVerifierName)
+    from TrigInDetConfig.InDetSetup import makeInDetAlgs
+    viewAlgs, ViewVerify = makeInDetAlgs( whichSignature=signName, separateTrackParticleCreator = "_" + signName, rois = RoIs, viewVerifier = tauViewDataVerifierName )
 
     if "FTFIso" in name:
-       ViewVerify.DataObjects = [('xAOD::TauJetContainer','StoreGateSvc+HLT_TrigTauRecMerged_CaloOnlyMVA'),('xAOD::TauTrackContainer','StoreGateSvc+HLT_tautrack_dummy')]
+       ViewVerify.DataObjects += [( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnlyMVA' )]
     else:
-       ViewVerify.DataObjects = [('xAOD::TauJetContainer','StoreGateSvc+HLT_TrigTauRecMerged_CaloOnly'),('xAOD::TauTrackContainer','StoreGateSvc+HLT_tautrack_dummy')]       
-       
-    viewAlgs.append(ViewVerify)
+       ViewVerify.DataObjects += [( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnly')]
+
+    ViewVerify.DataObjects += [( 'xAOD::TauTrackContainer' , 'StoreGateSvc+HLT_tautrack_dummy' ),
+                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+' + RoIs ),
+                               ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
+                               ( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnly' ),
+                               ( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' )]
+
+    # Make sure the required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
+                                       ( 'TRT_RDO_Container' , 'StoreGateSvc+TRT_RDOs' )]
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
+      topSequence.SGInputLoader.Load += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                         ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+      ViewVerify.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                 ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
 
     for viewAlg in viewAlgs:
        tauIdTrackSequence += viewAlg
@@ -256,20 +301,30 @@ def tauIdTrackSequence( RoIs , name):
     return tauIdTrackSequence, sequenceOut
 
 def tauCoreTrackSequence( RoIs, name ):
-    import AthenaCommon.CfgMgr as CfgMgr
 
     tauCoreTrackSequence = seqAND(name)
 
     from TrigInDetConfig.InDetSetup import makeInDetAlgs
-    viewAlgs = makeInDetAlgs(whichSignature='TauCore',separateTrackParticleCreator="_TauCore",rois = RoIs)
+    viewAlgs, ViewVerify = makeInDetAlgs(whichSignature='TauCore',separateTrackParticleCreator="_TauCore",rois = RoIs)
 
     for viewAlg in viewAlgs:
        if "InDetTrigTrackParticleCreatorAlg" in viewAlg.name():
          TrackCollection = viewAlg.TrackName
 
-    ViewVerify = CfgMgr.AthViews__ViewDataVerifier("tauViewDataVerifierCoreFTF")
-    ViewVerify.DataObjects = [('xAOD::TauJetContainer','StoreGateSvc+HLT_TrigTauRecMerged_CaloOnlyMVA')]
-    viewAlgs.append(ViewVerify)
+    ViewVerify.DataObjects += [( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnlyMVA' ),
+                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+' + RoIs ),
+                               ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )] #For some reason not picked up properly
+
+    # Make sure the required objects are still available at whole-event level
+    from AthenaCommon.AlgSequence import AlgSequence
+    topSequence = AlgSequence()
+    topSequence.SGInputLoader.Load += [( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
+    from IOVDbSvc.CondDB import conddb
+    if not conddb.folderRequested( "PixelClustering/PixelClusNNCalib" ):
+      topSequence.SGInputLoader.Load += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                         ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
+      ViewVerify.DataObjects += [( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNN' ),
+                                 ( 'TTrainedNetworkCollection' , 'ConditionStore+PixelClusterNNWithTrack' )]
 
     tauTrackRoiUpdaterAlg = _algoTauTrackRoiUpdater(inputRoIs = RoIs, tracks = TrackCollection)
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py
index c702b3ffc4ab234fd207d141e76f9151faf1495a..be4d7604f3d74a695e6a4eade2e7b09787c1ed90 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py
@@ -50,7 +50,7 @@ class ViewCFTest( unittest.TestCase ):
         with self.assertRaisesRegexp( RuntimeError, "no corresponding upstream EventViewCreatorAlgorithm" ):
             checkVDV( topSequence, [topSequence.name()], {} )
         evca1.ViewNodeName = "viewSequence"
-        with self.assertRaisesRegexp( RuntimeError, "RequireParentView = False" ):
+        with self.assertRaisesRegexp( RuntimeError, "no external data" ):
             checkVDV( topSequence, [topSequence.name()], {} )
         evca1.RequireParentView = True
         checkVDV( topSequence, [topSequence.name()], {} )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py
index cdaa6760a538d7b54d25d70c29773b3407a21008..521644ecc203c0ac1e5f5c24020705c9189822cc 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/L1/Base/L1MenuFlags.py
@@ -39,10 +39,10 @@ class L1MenuFlagsCont(object):
     __slots__ = {
         "MenuSetup"               :  FlagArgs( six.string_types ),
         "CTPVersion"              :  FlagArgs( int, 4,   val_check = lambda x: x in range(5), action = lambda x: Limits.setLimits(x) ),
-        "BunchGroupPartitioning"  :  FlagArgs( Iterable, val_check = lambda x: len(filter(lambda y: y not in range(16), x))==0 ),
-        "BunchGroupNames"         :  FlagArgs( Iterable, val_check = lambda x: len(filter(lambda y: not isinstance(y, six.string_types), x))==0),
-        "MenuPartitioning"        :  FlagArgs( Iterable, val_check = lambda x: len(filter(lambda y: y not in range(512), x))==0 ),
-        "items"                   :  FlagArgs( Iterable, val_check = lambda x: len(filter(lambda y: not isinstance(y, six.string_types), x))==0),
+        "BunchGroupPartitioning"  :  FlagArgs( Iterable, val_check = lambda x: len(list(filter(lambda y: y not in range(16), x)))==0 ),
+        "BunchGroupNames"         :  FlagArgs( Iterable, val_check = lambda x: len(list(filter(lambda y: not isinstance(y, six.string_types), x)))==0),
+        "MenuPartitioning"        :  FlagArgs( Iterable, val_check = lambda x: len(list(filter(lambda y: y not in range(512), x)))==0 ),
+        "items"                   :  FlagArgs( Iterable, val_check = lambda x: len(list(filter(lambda y: not isinstance(y, six.string_types), x)))==0),
         "boards"                  :  FlagArgs( OrderedDict, OrderedDict() ),
         "legacyBoards"            :  FlagArgs( OrderedDict, OrderedDict() ),
         "prescales"               :  FlagArgs( dict, dict() ),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
index 0e389ee785c537cc27dd1c99f581dc605b7d72b7..2ae3d786e0f94666a437e5a31332ee85f136c0b9 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/menu_config_tests.py
@@ -121,8 +121,8 @@ class StructuredChainNames(MenuVerification):
         sig_type_pattern = re.compile(
             r"\d*[egj]?({})\d+s?".format(signature_types))
         def items_in_order(part):
-            indices = map(self._signature_type_order.index,
-                          sig_type_pattern.findall(part))
+            indices = [self._signature_type_order.index(x) for x in 
+                       sig_type_pattern.findall(part)]
             return indices == sorted(indices)
 
         def are_signatures_in_order(name_parts):
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/AscObj_TSOS.h b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/AscObj_TSOS.h
index 0ae0fb273075b9568d19d52be1a8e1ac8f2b0782..6f2d99ef53cd9c7758ff13bd6cbc244f94fda4e7 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/AscObj_TSOS.h
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/AscObj_TSOS.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
 */
 
 
@@ -20,12 +20,9 @@
 
 #include "VP1TrackSystems/AssociatedObjectHandleBase.h"
 #include "VP1TrackSystems/TrackCommonFlags.h"
-#include "VP1TrackSystems/MeasurementToSoNode.h"
 #include "VP1TrackSystems/TrkObjToString.h"
 #include "TrkParameters/TrackParameters.h"
 
-// Eigen migration
-//#include "TrkEventPrimitives/GlobalPosition.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 
 #include <QTreeWidgetItem>
@@ -110,7 +107,6 @@ private:
   void ensureInitSeps( SoSeparator*&shape_simple, SoSeparator*&shape_detailed);
   SoTranslation* getZTranslationTube( const Trk::Surface *, const double& maxTrans ) const;
 
-  Trk::MeasurementToSoNode m_measCnv; 
   TrkObjToString m_objToType; 
   HitToSoNode m_hitToSoNode;
 };
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/MeasurementToSoNode.h b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/MeasurementToSoNode.h
deleted file mode 100644
index 7f94a4a5c21cc589e172adfe2aef03cda4b1c1ae..0000000000000000000000000000000000000000
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/MeasurementToSoNode.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef TRK_VP1TRACKSYSTEMS_MEASUREMENTTOSONODE_H
-#define TRK_VP1TRACKSYSTEMS_MEASUREMENTTOSONODE_H
-#include <vector>
-#include <map>
-#include <string>
-#include "Identifier/Identifier.h"
-#include "VP1Utils/HitsSoNodeManager.h"
-#include "VP1TrackSystems/TrkObjToString.h"
-
-class SoNode;
-class SoCube;
-class SoTubs;
-class SoSeparator;
-class SoTransform;
-class SoMaterial;
-class CscIdHelper;
-class RpcIdHelper;
-class TgcIdHelper;
-class MdtIdHelper;
-
-namespace Muon {
-    class CscPrepData;
-    class RpcPrepData;
-    class TgcPrepData;
-    class MdtPrepData;
-    class MuonIdHelperTool;
-}
-
-namespace InDet {
-    class PixelCluster;
-    class SCT_Cluster;
-    class TRT_DriftCircle;
-}
-
-namespace InDetDD {
-    class SiDetectorElement;
-}
-
-namespace MuonGM {
-    class CscReadoutElement;
-    class RpcReadoutElement;
-    class TgcReadoutElement;
-    class MdtReadoutElement;
-}
-
-namespace Trk {
-//    class LocalPosition;
-    class TrkDetElementBase;
-    class PrepRawData;
-    class RIO_OnTrack;
-    class CompetingRIOsOnTrack;
-    class PseudoMeasurementOnTrack;
-    class MeasurementBase;
-
-    class MeasurementToSoNode {
-    public:
-
-        enum ClusterDrawMode { SingleStrip=0, MultipleStrips=1, Errors=2 };
-        enum DriftTubeDrawMode { ShortLength=0, FullLength=1 };
-
-        MeasurementToSoNode();
-
-        void initialize( const Muon::MuonIdHelperTool* muonIdHelperTool );
-
-        /** This is the most general and most complete method - it returns a separator with nodes and transform. The material is not
-        added here as it should be at the top of the tree (in general) */
-        std::pair<SoSeparator*,  std::vector<SoNode*> >              \
-                                createMeasSep(  const Trk::MeasurementBase& meas);
-
-        /** Returns a vector of SoNodes to represent the RIO_OnTrack. The cluster mode determines how the clusters are drawn -
-        i.e. as single central strip or the strips contributing to the cluster*/
-        std::vector<SoNode*>    toSoNodes(      const Trk::RIO_OnTrack& prd);
-
-        std::vector<SoNode*>    toSoNodes(      const Trk::CompetingRIOsOnTrack& crot);
-
-        std::vector<SoNode*>    toSoNodes(      const Trk::PseudoMeasurementOnTrack& crot);
-
-        // create basic shapes
-        SoNode*                 createDriftTubeMarker(  double halfLength,  double radius);
-        SoNode*                 createProjectedDriftTubeMarker(  double strawLength, double radius  );
-
-        // SoNode*                 createPointMarker();
-        SoNode*                 createLineMarker(double halfLength, bool isTube=false );
-
-        /** Generic routine which creates SoNode from passed detector element, plus measurement type*/
-        SoNode*                 toSoNode(const Trk::TrkDetElementBase* baseDetEl, Identifier id, TrkObjToString::MeasurementType prdType, Amg::Vector2D locPos);
-
-        /** handles both drift circle types*/
-        SoNode*                 toSoNodeDriftTube(const Trk::TrkDetElementBase* detEl, Identifier id, TrkObjToString::MeasurementType detType, double radius);
-
-        //specific types
-        SoNode*                 toSoNode(const InDetDD::SiDetectorElement* detElement, Identifier id, TrkObjToString::MeasurementType detType, Amg::Vector2D& locPos);
-        SoNode*                 toSoNode(const MuonGM::CscReadoutElement* detElement, Identifier id);
-        SoNode*                 toSoNode(const MuonGM::RpcReadoutElement* detElement, Identifier id);
-        SoNode*                 toSoNode(const MuonGM::TgcReadoutElement* detElement, Identifier id);
-
-        void                    setClusterDrawMode    (ClusterDrawMode mode);
-        ClusterDrawMode         clusterDrawMode       ();
-        void                    setDriftTubeDrawMode  (DriftTubeDrawMode mode);
-        void                    setDriftTubeLength  (float length);
-        DriftTubeDrawMode       driftTubeDrawMode  ();
-        void                    setSimpleView(      TrkObjToString::MeasurementType type, bool value );
-        void                    setSimpleViewAll(   bool value );
-        bool                    isSimpleView(       TrkObjToString::MeasurementType type );
-
-        void                    setTRTProjection( bool );
-        bool                    isTRTProjection() const;
-
-        /** Uses the local coords & the surface of the passed PRD to create a transform for the strip*/
-        // SoTransform*            createTransform(    const Trk::PrepRawData& prd,
-        //                                             MeasurementType detType);
-
-        /** Uses the local coords & the surface of the passed Trk::MeasurementBase to create a transform for the strip*/
-        SoTransform*            createTransform(    const Trk::MeasurementBase& rot,
-                                                    TrkObjToString::MeasurementType detType);
-
-    private:
-        std::vector<bool>       m_simpleView;
-        bool                    m_trtProjection;
-        const Muon::MuonIdHelperTool* m_muonIdHelperTool = nullptr;
-        double                  m_stripThickness; //!< Depth/Thickness of strips in z (local coords)
-        std::vector< SoMaterial* > m_materials;
-
-        DriftTubeDrawMode       m_dtDrawMode;
-        ClusterDrawMode         m_clusDrawMode;
-        float m_dtLength; //!< Only used when in ShortMode
-        
-        HitsSoNodeManager       m_nodeManager;
-        TrkObjToString          m_objToType;
-    };
-}
-
-inline void
-Trk::MeasurementToSoNode::setClusterDrawMode(Trk::MeasurementToSoNode::ClusterDrawMode mode)
-{
-    m_clusDrawMode=mode;
-}
-
-inline void
-Trk::MeasurementToSoNode::setDriftTubeDrawMode(Trk::MeasurementToSoNode::DriftTubeDrawMode mode)
-{
-    m_dtDrawMode=mode;
-}
-
-inline void
-Trk::MeasurementToSoNode::setDriftTubeLength  (float length)
-{
-    m_dtLength=length;
-}
-
-inline Trk::MeasurementToSoNode::ClusterDrawMode
-Trk::MeasurementToSoNode::clusterDrawMode()
-{
-    return m_clusDrawMode;
-}
-
-inline Trk::MeasurementToSoNode::DriftTubeDrawMode
-Trk::MeasurementToSoNode::driftTubeDrawMode()
-{
-    return m_dtDrawMode;
-}
-
-inline void
-Trk::MeasurementToSoNode::setSimpleView(TrkObjToString::MeasurementType type, bool value)
-{
-    m_simpleView[type]=value;
-}
-
-
-inline void
-Trk::MeasurementToSoNode::setTRTProjection( bool b )
-{
-  m_trtProjection = b;
-}
-
-inline bool
-Trk::MeasurementToSoNode::isTRTProjection() const
-{
-  return m_trtProjection;
-}
-
-inline void
-Trk::MeasurementToSoNode::setSimpleViewAll( bool value)
-{
-    unsigned int end = static_cast<TrkObjToString::MeasurementType>(TrkObjToString::Unknown);
-    for (unsigned int i=0; i<end; ++i) m_simpleView[i]=value;
-}
-
-inline bool
-Trk::MeasurementToSoNode::isSimpleView(TrkObjToString::MeasurementType type)
-{
-    return m_simpleView[type];
-}
-
-
-#endif
-
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrkTrack.h b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrkTrack.h
index 1d4ffb9b82b0292d8951024849abb56caea123d5..5cf284ee68524fb4bd312a0a19b27be0756c0eed 100644
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrkTrack.h
+++ b/graphics/VP1/VP1Systems/VP1TrackSystems/VP1TrackSystems/TrackHandle_TrkTrack.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
 */
 
 
@@ -18,7 +18,6 @@
 #define TRACKHANDLE_TRKTRACK_H
 
 #include "VP1TrackSystems/TrackHandleBase.h"
-#include "VP1TrackSystems/MeasurementToSoNode.h"
 
 #include "GeoPrimitives/GeoPrimitives.h"
 
@@ -78,7 +77,6 @@ private:
 
 protected:
   const Trk::Track* m_trk;
-  Trk::MeasurementToSoNode m_measToSoNode; //!< Just used to get types, so probably better to hive that functionality off. @FIXME
 };
 
 #endif
diff --git a/graphics/VP1/VP1Systems/VP1TrackSystems/src/MeasurementToSoNode.cxx b/graphics/VP1/VP1Systems/VP1TrackSystems/src/MeasurementToSoNode.cxx
deleted file mode 100644
index 74f966ec1a033049284107b818c320106398ec1a..0000000000000000000000000000000000000000
--- a/graphics/VP1/VP1Systems/VP1TrackSystems/src/MeasurementToSoNode.cxx
+++ /dev/null
@@ -1,530 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "VP1TrackSystems/MeasurementToSoNode.h"
-
-#include <Inventor/C/errors/debugerror.h>
-#include <Inventor/nodes/SoSeparator.h>
-#include <Inventor/nodes/SoTransform.h>
-#include <Inventor/nodes/SoSphere.h>
-#include "VP1HEPVis/nodes/SoTubs.h"
-#include "VP1HEPVis/nodes/SoGenericBox.h"
-#include <Inventor/nodes/SoPointSet.h>
-#include <Inventor/nodes/SoLineSet.h>
-#include <Inventor/nodes/SoCylinder.h>
-#include <Inventor/nodes/SoRotationXYZ.h>
-
-#include "VP1Utils/VP1LinAlgUtils.h"
-#include "VP1Utils/HitsSoNodeManager.h"
-#include "VP1Base/VP1Msg.h"
-
-
-
-// Amg Eigen objects
-#include "GeoPrimitives/GeoPrimitives.h"
-
-//MeasurementBase
-#include "TrkMeasurementBase/MeasurementBase.h"
-
-//ROTs
-#include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "InDetRIO_OnTrack/PixelClusterOnTrack.h"
-#include "InDetRIO_OnTrack/SCT_ClusterOnTrack.h"
-#include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h"
-#include "InDetRIO_OnTrack/SiClusterOnTrack.h"
-#include "MuonRIO_OnTrack/MuonClusterOnTrack.h"
-#include "MuonRIO_OnTrack/CscClusterOnTrack.h"
-#include "MuonRIO_OnTrack/RpcClusterOnTrack.h"
-#include "MuonRIO_OnTrack/TgcClusterOnTrack.h"
-#include "MuonRIO_OnTrack/MdtDriftCircleOnTrack.h"
-
-//CompetingROTs
-#include "TrkCompetingRIOsOnTrack/CompetingRIOsOnTrack.h"
-
-//Pseudo Measurements
-#include "TrkPseudoMeasurementOnTrack/PseudoMeasurementOnTrack.h"
-
-//Segments
-#include "TrkSegment/Segment.h"
-
-// PRDs
-#include "InDetPrepRawData/PixelCluster.h"
-#include "InDetPrepRawData/SCT_Cluster.h"
-#include "InDetPrepRawData/TRT_DriftCircle.h"
-#include "MuonPrepRawData/CscPrepData.h"
-#include "MuonPrepRawData/RpcPrepData.h"
-#include "MuonPrepRawData/TgcPrepData.h"
-#include "MuonPrepRawData/MdtPrepData.h"
-
-//IdHelpers
-#include "MuonIdHelpers/MuonIdHelperTool.h"
-
-Trk::MeasurementToSoNode::MeasurementToSoNode()
-    :
-    m_trtProjection(false),
-    m_stripThickness(0.8),
-    m_dtDrawMode(Trk::MeasurementToSoNode::ShortLength),
-    m_clusDrawMode(Trk::MeasurementToSoNode::SingleStrip),
-    m_dtLength(10.0)
-{
-  SoTubs::initClass();
-  SoGenericBox::initClass();
-  // Have simple view on by default
-  for (int i=0; i<TrkObjToString::Unknown ; i++) m_simpleView.push_back(true);
-}
-
-void
-Trk::MeasurementToSoNode::initialize( const Muon::MuonIdHelperTool* muonIdHelperTool )
-{
-  m_muonIdHelperTool=muonIdHelperTool;
-}
-
-std::pair<SoSeparator*,  std::vector<SoNode*> >
-Trk::MeasurementToSoNode::createMeasSep(  const Trk::MeasurementBase& meas)
-{
-
-    VP1Msg::messageVerbose("Trk::MeasurementToSoNode::createMeasSep()");
-
-    // Vector to hold all the nodes associated with this measurement
-    std::vector<SoNode*> measurements;
-    SoTransform*   theHitTransform=0;
-    TrkObjToString::MeasurementType detType = m_objToType.type(&meas);
-    // Find the correct type and call that method.
-
-    switch (detType)
-    {
-        case TrkObjToString::Pixel:
-        case TrkObjToString::SCT:
-        case TrkObjToString::TRT:
-        case TrkObjToString::CSC:
-        case TrkObjToString::TGC:
-        case TrkObjToString::RPC:
-        case TrkObjToString::MDT:
-        {
-            const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(&meas);
-            if (rot){
-              measurements = toSoNodes( *rot );
-              theHitTransform=createTransform(*rot, detType);
-            }
-            break;
-        }
-        case TrkObjToString::CompetingROT:
-        {
-            const Trk::CompetingRIOsOnTrack* crot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(&meas);
-            if (crot){
-              measurements = toSoNodes(*crot);
-              const Trk::RIO_OnTrack* mostProbROT =  &(crot->rioOnTrack( crot->indexOfMaxAssignProb ()));
-              theHitTransform=createTransform( static_cast<const Trk::MeasurementBase&>(*mostProbROT), TrkObjToString::type( mostProbROT ));
-            }
-            break;
-        }
-        case TrkObjToString::PseudoMeasurement:
-        {
-            const Trk::PseudoMeasurementOnTrack* pseudo = dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(&meas) ;
-            if (pseudo){
-              measurements = toSoNodes(*pseudo);
-              theHitTransform=createTransform( *pseudo, detType);
-            }
-            break;
-        }
-        case TrkObjToString::Segment:
-        case TrkObjToString::Hole:
-        case TrkObjToString::Unknown:
-        {
-            std::cerr<< "MeasurementToSoNode::createMeasSep: WARNING - Unknown detector type!"<<std::endl;
-            std::cerr<<" Dumping MeasurementBase: "<<meas<<std::endl;
-        }
-
-    }
-    // Add all the above to the separator
-    SoSeparator *theHitMarkerSep = new SoSeparator;
-    theHitMarkerSep->addChild(theHitTransform);
-
-    std::vector<SoNode*>::const_iterator it, itEnd=measurements.end();
-    for ( it = measurements.begin(); it!=itEnd; it++)
-    {
-        theHitMarkerSep->addChild(*it);
-    }
-    //std::cout<<"MeasurementToSoNode::createMeasSep - done"<<std::endl;
-
-    return std::make_pair(theHitMarkerSep, measurements);
-}
-
-std::vector<SoNode*>
-Trk::MeasurementToSoNode::toSoNodes(const Trk::RIO_OnTrack& rot)
-{
-    //std::cout<<"toSoNodes"<<std::endl;
-
-  //TODO Implement modes properly
-  std::vector<SoNode*> nodes ;
-  switch (m_clusDrawMode)
-  {
-  case SingleStrip:
-  case MultipleStrips:
-  case Errors: 
-  {
-    double coord1 = rot.localParameters().get(Trk::loc1);
-    double coord2 = 0.0;
-    if (rot.localParameters().dimension()>1) coord2 = rot.localParameters().get(Trk::loc2);
-//    nodes.push_back( toSoNode(rot.detectorElement(), rot.identify(), m_objToType.type(&rot), Trk::LocalPosition(coord1,coord2) ) );
-    nodes.push_back( toSoNode(rot.detectorElement(), rot.identify(), m_objToType.type(&rot), Amg::Vector2D(coord1,coord2) ) );
-    break;
-  }
-  default:
-    break;
-  }
-  return nodes;
-}
-
-std::vector<SoNode*>
-Trk::MeasurementToSoNode::toSoNodes(const Trk::CompetingRIOsOnTrack& crot)
-{
-    VP1Msg::messageVerbose("Trk::MeasurementToSoNode::CompetingRIOsOnTrack()");
-
-    //
-    // ++++++++++++++++++++++ TO DO! +++++++++++++++++++++++++
-    //
-    const Trk::RIO_OnTrack* mostProbROT =  &(crot.rioOnTrack( crot.indexOfMaxAssignProb ()));
-    std::vector<SoNode*> nodes = toSoNodes( *mostProbROT ); // Temporary hack - should draw all competing ROTs and show them linked somehow.
-    return nodes;
-}
-
-std::vector<SoNode*>
-Trk::MeasurementToSoNode::toSoNodes(const Trk::PseudoMeasurementOnTrack& /*rot*/)
-{
-    //
-    // ++++++++++++++++++++++ TO DO! +++++++++++++++++++++++++
-    //
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::PseudoMeasurementOnTrack()");
-
-    std::vector<SoNode*> nodes ;
-    nodes.push_back( m_nodeManager.getShapeNode_Strip(10.0, 10.0, 10.0) );
-    return nodes;
-}
-
-SoNode*
-Trk::MeasurementToSoNode::toSoNode(const Trk::TrkDetElementBase* baseDetEl, Identifier id, TrkObjToString::MeasurementType prdType, Amg::Vector2D locPos)
-{
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::toSoNode(Trk)");
-
-  SoNode *theHitMarker = 0;
-  switch (prdType)
-  {
-  case TrkObjToString::Pixel:
-  case TrkObjToString::SCT:
-    {
-      const InDetDD::SiDetectorElement* detEl = dynamic_cast<const InDetDD::SiDetectorElement*>(baseDetEl);
-      if(detEl){ // by definition this should never fail
-        theHitMarker = toSoNode(detEl, id, prdType, locPos);
-      }
-      break;
-    }
-  case TrkObjToString::MDT:
-  case TrkObjToString::TRT:
-    {
-      theHitMarker = toSoNodeDriftTube(baseDetEl, id, prdType, locPos[0]);
-      break;
-    }
-  case TrkObjToString::CSC:
-    {
-      const MuonGM::CscReadoutElement* detEl = dynamic_cast<const MuonGM::CscReadoutElement*>(baseDetEl);
-      if(detEl){ // by definition this should never fail
-        theHitMarker=toSoNode( detEl, id );
-      }
-      break;
-    }
-  case TrkObjToString::RPC:
-    {
-      const MuonGM::RpcReadoutElement* detEl = dynamic_cast<const MuonGM::RpcReadoutElement*>(baseDetEl);
-      if(detEl){ // by definition this should never fail
-        theHitMarker=toSoNode( detEl, id );
-      }
-      break;
-    }
-  case TrkObjToString::TGC:
-    {
-      const MuonGM::TgcReadoutElement* detEl = dynamic_cast<const MuonGM::TgcReadoutElement*>(baseDetEl);
-      if(detEl){ // by definition this should never fail
-        theHitMarker=toSoNode( detEl, id );
-      }
-      break;
-    }
-
-  default:
-    //message( "Specific Hit type could not be identified.");
-    theHitMarker = m_nodeManager.getShapeNode_Strip(10.0, 10.0, 10.0);
-    break;
-  }
-  return theHitMarker;
-}
-
-
-SoNode*
-Trk::MeasurementToSoNode::toSoNode( const InDetDD::SiDetectorElement* detEl, Identifier /*id*/, TrkObjToString::MeasurementType detType, Amg::Vector2D& locPos)
-{
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::toSoNode(InDetDD)");
-
-  SoNode *theHitMarker = 0;
-  if ( isSimpleView(TrkObjToString::Pixel) && detType==TrkObjToString::Pixel)
-  {
-    // theHitMarker = createPointMarker(); // Simple Pixel
-    theHitMarker = m_nodeManager.getShapeNode_Point(); // Simple Pixel
-  }
-  else
-  {
-
-    double stripLength=detEl->etaPitch() ;
-    if (isSimpleView(TrkObjToString::SCT) && detType==TrkObjToString::SCT)
-    {
-      theHitMarker = createLineMarker(stripLength/2.0); // Simple SCT
-    }
-    else
-    {
-      double stripWidth=detEl->phiPitch( locPos );
-      theHitMarker = m_nodeManager.getShapeNode_Strip(stripLength, stripWidth, m_stripThickness); // Detailed SCT/Pixel
-    }
-  }
-  return theHitMarker;
-}
-
-
-SoNode*
-Trk::MeasurementToSoNode::toSoNodeDriftTube(const Trk::TrkDetElementBase* detEl, Identifier id, TrkObjToString::MeasurementType detType, double radius)
-{
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::toSoNodeDriftTube(Trk)");
-
-  //////std::cout<<"Drift tube : isSimpleView = "<<isSimpleView(type)<<std::endl;
-  SoNode *theHitMarker = 0;
-  const Trk::CylinderBounds* ccbo = dynamic_cast<const Trk::CylinderBounds*>(&(detEl->surface(id).bounds()));
-  if (not ccbo) return theHitMarker;  
-  
-  double hlength = ccbo->halflengthZ(); // the halflength of the actual tube
-  
-  if (m_dtDrawMode==ShortLength && m_dtLength < hlength){
-      hlength =  m_dtLength;
-  }
-
-  if ( m_trtProjection && detType==TrkObjToString::TRT ) {
-    theHitMarker  = createProjectedDriftTubeMarker(hlength, true);
-  } else if ( isSimpleView(detType) )
-  {
-    theHitMarker = createLineMarker(hlength, true);
-  }
-  else
-  {
-    //TKP1 if (detType==Trk::MeasurementToSoNode::TRT) radius = 1.999;//CLHEP::mm
-    //TKP1 else if (fabs(radius)<5.0) radius = 5.0;
-    theHitMarker    = createDriftTubeMarker(hlength, radius);
-  }
-  return theHitMarker;
-}
-
-SoNode*
-Trk::MeasurementToSoNode::toSoNode(const MuonGM::CscReadoutElement* detEl, Identifier id)
-{
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::toSoNode(MuonGM::CscReadoutElement)");
-
-  SoNode *theHitMarker = 0;
-  int measPhi = m_muonIdHelperTool->cscIdHelper().measuresPhi( id );
-  int chamberLayer = m_muonIdHelperTool->cscIdHelper().chamberLayer( id );
-  double stripWidth=detEl->cathodeReadoutPitch(chamberLayer, measPhi) ;
-  double stripLength=detEl->stripLength( id );
-  if ( isSimpleView(TrkObjToString::CSC) )
-  {
-    theHitMarker = createLineMarker(stripLength/2.0);
-  }
-  else
-  {
-    theHitMarker = m_nodeManager.getShapeNode_Strip(stripLength, stripWidth, m_stripThickness);
-  }
-  return theHitMarker;
-}
-
-SoNode*
-Trk::MeasurementToSoNode::toSoNode(const MuonGM::RpcReadoutElement* detEl, Identifier id)
-{
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::toSoNode(MuonGM::RpcReadoutElement)");
-
-  SoNode *theHitMarker = 0;
-  int measPhi = m_muonIdHelperTool->rpcIdHelper().measuresPhi( id );
-  double stripWidth=detEl->StripWidth(measPhi) ;
-  double stripLength=detEl->StripLength(measPhi) ;
-  //////std::cout<<"RPC measPhi: "<< measPhi<<std::endl;
-
-  if ( isSimpleView(TrkObjToString::RPC) )
-  {
-    theHitMarker = createLineMarker(stripLength/2.0);
-  }
-  else
-  {
-    theHitMarker = m_nodeManager.getShapeNode_Strip(stripLength, stripWidth, m_stripThickness);
-  }
-  return theHitMarker;
-}
-
-SoNode*
-Trk::MeasurementToSoNode::toSoNode(const MuonGM::TgcReadoutElement* detEl, Identifier id)
-{
-	VP1Msg::messageVerbose("Trk::MeasurementToSoNode::toSoNode(MuonGM::TgcReadoutElement)");
-
-  SoNode *theHitMarker = 0;
-  int plane     = m_muonIdHelperTool->tgcIdHelper().gasGap( id );
-  int strip     = m_muonIdHelperTool->tgcIdHelper().channel( id );
-  int isStrip   = m_muonIdHelperTool->tgcIdHelper().isStrip( id );
-
-  double striplength =0.0, stripWidth = 0.0;
-
-  if (isStrip){
-    striplength = detEl->stripLength(plane, strip);
-    stripWidth  = detEl->stripWidth(plane, strip);
-  } else {        
-    striplength = detEl->gangShortWidth(plane, strip);
-    stripWidth  = detEl->gangLength(plane, strip);
-  }
-
-  if ( isSimpleView(TrkObjToString::TGC) )
-  {
-    theHitMarker = createLineMarker(striplength/2.0);
-  }
-  else
-  {
-    theHitMarker = m_nodeManager.getShapeNode_Strip(striplength, stripWidth, m_stripThickness);
-  }
-  return theHitMarker;
-}
-
-SoNode*
-Trk::MeasurementToSoNode::createLineMarker( double halfLength, bool isTube )
-{
-  //////std::cout<<"createLineMarker. halfLength="<<halfLength<<std::endl;
-  SoVertexProperty * scatVtxProperty = new SoVertexProperty();
-  if (isTube)
-  {
-    scatVtxProperty->vertex.set1Value(0, 0.0,0.0,-halfLength);
-    scatVtxProperty->vertex.set1Value(1, 0.0,0.0, halfLength);
-  }
-  else
-  {
-    scatVtxProperty->vertex.set1Value(0, 0.0,-halfLength,0.0);
-    scatVtxProperty->vertex.set1Value(1, 0.0,halfLength,0.0);
-  }
-  SoLineSet * line = new SoLineSet();
-  line->numVertices = 2;
-  line->vertexProperty = scatVtxProperty;
-  return line;
-}
-
-SoNode*
-Trk::MeasurementToSoNode::createDriftTubeMarker(double halfLength, double radius)
-{
-  //Fixme: Use SoCylinder instead!!!
-  SoTubs* tubeSurface = new SoTubs();
-//  (*lineSurface).pRMin = fabs(radius)-0.2;
-  (*tubeSurface).pRMin = 0.0;
-
-  (*tubeSurface).pRMax = std::max(float(fabs(radius)),0.05f);//min 50 micron (fixme: use line/point instead)
-  (*tubeSurface).pDz   = halfLength;
-  //////std::cout<<"createDriftTubeMarker: done"<<std::endl;
-  return tubeSurface;
-}
-
-
-SoNode*
-Trk::MeasurementToSoNode::createProjectedDriftTubeMarker(double strawLength, double /*radius*/)
-{
-  //Fix to put the hits from short barrel straws onto same z as the long barrel straws:
-  if (strawLength<160.0)
-    strawLength = 2*349.3150-strawLength;//Yeah, we hardcode a lot here... but dimensions of TRT barrel straws are not likely to change.
-
-//   SoSeparator * sep = new SoSeparator;
-
-//   SoDrawStyle * ds = new SoDrawStyle;
-//   ds->pointSize.setValue(2.0f);
-//   sep->addChild(ds);
-
-  SoPointSet       * scatPointSet    = new SoPointSet;
-  SoVertexProperty * scatVtxProperty = new SoVertexProperty;
-  scatVtxProperty->vertex.set1Value(0,0.0f,0.0f,strawLength);
-  scatPointSet->numPoints=1;
-  scatPointSet->vertexProperty.setValue(scatVtxProperty);
-  return scatPointSet;
-
-//   sep->addChild(scatPointSet);
-//   return sep;
-}
-
-
-
-SoTransform*
-Trk::MeasurementToSoNode::createTransform(  const Trk::MeasurementBase& mb, TrkObjToString::MeasurementType detType)
-{
-  const Trk::Surface& theSurface = mb.associatedSurface();
-
-  // We need to handle various cases:
-  // -> full tubes - use the surface position (or equivalent, global position of straw)
-  // -> short tubes/strips - use the global position of the ROT (but this is now done inside AscoObj_TSOS)
-  // -> long strips - use the global position of centre of strip.
-
-  SoTransform*   theHitTransform = VP1LinAlgUtils::toSoTransform(theSurface.transform());
-
-  Amg::Vector3D theHitGPos={-999.0,-999.0,-999.0} ;
-  // Amg::Vector3D theHitGPos = mb.globalPosition();
-  if ( detType==TrkObjToString::MDT || detType==TrkObjToString::TRT )
-     {
-       // for tubes, should use position of center of tube (if drawing full tube), or position of ROT for short tubes
-       if (m_dtDrawMode==FullLength) 
-         theHitGPos = theSurface.center();
-       else
-         theHitGPos = mb.globalPosition();
-     } else {
-       // so, strips
-       switch (detType) {
-         case TrkObjToString::CSC:
-         {
-           const Muon::CscClusterOnTrack* csc = dynamic_cast<const Muon::CscClusterOnTrack* >(&mb);
-            if (csc){
-              theHitGPos = csc->detectorElement()->stripPos( csc->identify() );
-            }
-            break;
-          }
-         case TrkObjToString::TGC:
-         {
-           const Muon::TgcClusterOnTrack* tgc = dynamic_cast<const Muon::TgcClusterOnTrack* >(&mb);
-            if (tgc && tgc->detectorElement()){
-              theHitGPos = tgc->detectorElement()->channelPos( tgc->identify() ); 
-            }
-            break;
-          }
-         case TrkObjToString::RPC:
-         {
-           const Muon::RpcClusterOnTrack* rpc = dynamic_cast<const Muon::RpcClusterOnTrack* >(&mb);
-            if (rpc){
-              theHitGPos = rpc->detectorElement()->stripPos( rpc->identify() );
-            }
-            break;
-          }
-         case TrkObjToString::SCT: 
-         case TrkObjToString::Pixel:
-         
-         {        // For strips we should use the centre of the strip - this is a bit of a hack - should use detector elements (add above)
-           const Amg::Vector3D* tempHitGPos = theSurface.localToGlobal( mb.localParameters() );
-           theHitGPos=*tempHitGPos;
-           delete tempHitGPos;
-           break;
-         }
-         //case TrkObjToString::MDT:  can't reach here
-         //case TrkObjToString::TRT: can't reach here
-         default:
-           // shouldn't ever get in here!
-        	 // initializations to avoid warnings
-        	 theHitGPos[0]=-999.;
-        	 theHitGPos[1]=-999.;
-        	 theHitGPos[2]=-999.;
-           break;
-       }
-     }
-  
-  theHitTransform->translation.setValue(theHitGPos[0], theHitGPos[1], theHitGPos[2]);
-  return theHitTransform;
-}